From 58fdd593d5d059e258db0402ecb8214a1ed29e34 Mon Sep 17 00:00:00 2001 From: JoseCuevasBtos Date: Tue, 25 Jun 2024 15:40:35 -0400 Subject: [PATCH] =?UTF-8?q?A=C3=B1adido:=20archivos=20de=20KaTeX=20faltant?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...a88f79bea7f9c7554bb69965564c583cf03a48e.js | 5 + ...38a39396ff1dfceb129b1db46ec6ac31c4f81e1.js | 261 ++++++++++++++++++ 2 files changed, 266 insertions(+) create mode 100644 js/paige/bootstrap/bootstrap.bundle.min.d90040d6da392517acafe3f6ea88f79bea7f9c7554bb69965564c583cf03a48e.js create mode 100644 js/paige/katex/katex.min.min.4fb156dd2c832315168ca2a1a38a39396ff1dfceb129b1db46ec6ac31c4f81e1.js diff --git a/js/paige/bootstrap/bootstrap.bundle.min.d90040d6da392517acafe3f6ea88f79bea7f9c7554bb69965564c583cf03a48e.js b/js/paige/bootstrap/bootstrap.bundle.min.d90040d6da392517acafe3f6ea88f79bea7f9c7554bb69965564c583cf03a48e.js new file mode 100644 index 0000000..69f1ee3 --- /dev/null +++ b/js/paige/bootstrap/bootstrap.bundle.min.d90040d6da392517acafe3f6ea88f79bea7f9c7554bb69965564c583cf03a48e.js @@ -0,0 +1,5 @@ +/*! + * Bootstrap v5.3.2 (https://getbootstrap.com/) + * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */(function(e,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.bootstrap=t())})(this,function(){"use strict";const C=new Map,pt={set(e,t,n){C.has(e)||C.set(e,new Map);const s=C.get(e);if(!s.has(t)&&s.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`);return}s.set(t,n)},get(e,t){return C.has(e)?C.get(e).get(t)||null:null},remove(e,t){if(!C.has(e))return;const n=C.get(e);n.delete(t),n.size===0&&C.delete(e)}},Jr=1e6,Xr=1e3,lt="transitionend",is=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),Gr=e=>e==null?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),Yr=e=>{do e+=Math.floor(Math.random()*Jr);while(document.getElementById(e))return e},Pr=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const s=Number.parseFloat(t),o=Number.parseFloat(n);return!s&&!o?0:(t=t.split(",")[0],n=n.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(n))*Xr)},ns=e=>{e.dispatchEvent(new Event(lt))},g=e=>!!e&&typeof e=="object"&&(typeof e.jquery!="undefined"&&(e=e[0]),typeof e.nodeType!="undefined"),w=e=>g(e)?e.jquery?e[0]:e:typeof e=="string"&&e.length>0?document.querySelector(is(e)):null,R=e=>{if(!g(e)||e.getClientRects().length===0)return!1;const n=getComputedStyle(e).getPropertyValue("visibility")==="visible",t=e.closest("details:not([open])");if(!t)return n;if(t!==e){const n=e.closest("summary");if(n&&n.parentNode!==t)return!1;if(n===null)return!1}return n},y=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(typeof e.disabled!="undefined"?e.disabled:e.hasAttribute("disabled")&&e.getAttribute("disabled")!=="false"),es=e=>{if(!document.documentElement.attachShadow)return null;if(typeof e.getRootNode=="function"){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?es(e.parentNode):null},le=()=>{},oe=e=>{e.offsetHeight},Jn=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Ue=[],Nr=e=>{document.readyState==="loading"?(Ue.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Ue)e()}),Ue.push(e)):e()},c=()=>document.documentElement.dir==="rtl",u=e=>{Nr(()=>{const t=Jn();if(t){const n=e.NAME,s=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=s,e.jQueryInterface)}})},o=(e,t=[],n=e)=>typeof e=="function"?e(...t):n,Zn=(e,t,n=!0)=>{if(!n){o(e);return}const a=5,r=Pr(t)+a;let s=!1;const i=({target:n})=>{if(n!==t)return;s=!0,t.removeEventListener(lt,i),o(e)};t.addEventListener(lt,i),setTimeout(()=>{s||ns(t)},r)},$e=(e,t,n,s)=>{const i=e.length;let o=e.indexOf(t);return o===-1?!n&&s?e[i-1]:e[0]:(o+=n?1:-1,s&&(o=(o+i)%i),e[Math.max(0,Math.min(o,i-1))])},zr=/[^.]*(?=\..*)\.|.*/,Tr=/\..*/,Ar=/::\d+$/,De={};let qn=1;const Un={mouseenter:"mouseover",mouseleave:"mouseout"},Er=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Hn(e,t){return t&&`${t}::${qn++}`||e.uidEvent||qn++}function Fn(e){const t=Hn(e);return e.uidEvent=t,De[t]=De[t]||{},De[t]}function xr(t,n){return function s(o){return ht(o,{delegateTarget:t}),s.oneOff&&e.off(t,o.type,n),n.apply(t,[o])}}function Or(t,n,s){return function o(i){const a=t.querySelectorAll(n);for(let{target:r}=i;r&&r!==this;r=r.parentNode)for(const c of a){if(c!==r)continue;return ht(i,{delegateTarget:r}),o.oneOff&&e.off(t,i.type,n,s),s.apply(r,[i])}}}function Sn(e,t,n=null){return Object.values(e).find(e=>e.callable===t&&e.delegationSelector===n)}function An(e,t,n){const o=typeof t=="string",i=o?n:t||n;let s=xn(e);return Er.has(s)||(s=e),[o,i,s]}function Cn(e,t,n,s,o){if(typeof t!="string"||!e)return;let[r,i,c]=An(t,n,s);if(t in Un){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};i=e(i)}const d=Fn(e),u=d[c]||(d[c]={}),l=Sn(u,i,r?n:null);if(l){l.oneOff=l.oneOff&&o;return}const h=Hn(i,t.replace(zr,"")),a=r?Or(e,n,i):xr(e,i);a.delegationSelector=r?n:null,a.callable=i,a.oneOff=o,a.uidEvent=h,u[h]=a,e.addEventListener(c,a,r)}function dt(e,t,n,s,o){const i=Sn(t[n],s,o);if(!i)return;e.removeEventListener(n,i,Boolean(o)),delete t[n][i.uidEvent]}function wr(e,t,n,s){const o=t[n]||{};for(const[a,i]of Object.entries(o))a.includes(s)&&dt(e,t,n,i.callable,i.delegationSelector)}function xn(e){return e=e.replace(Tr,""),Un[e]||e}const e={on(e,t,n,s){Cn(e,t,n,s,!1)},one(e,t,n,s){Cn(e,t,n,s,!0)},off(e,t,n,s){if(typeof t!="string"||!e)return;const[c,a,i]=An(t,n,s),l=i!==t,o=Fn(e),r=o[i]||{},d=t.startsWith(".");if(typeof a!="undefined"){if(!Object.keys(r).length)return;dt(e,o,i,a,c?n:null);return}if(d)for(const n of Object.keys(o))wr(e,o,n,t.slice(1));for(const[s,n]of Object.entries(r)){const a=s.replace(Ar,"");(!l||t.includes(a))&&dt(e,o,i,n.callable,n.delegationSelector)}},trigger(e,t,n){if(typeof t!="string"||!e)return null;const i=Jn(),l=xn(t),d=t!==l;let s=null,a=!0,r=!0,c=!1;d&&i&&(s=i.Event(t,n),i(e).trigger(s),a=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),c=s.isDefaultPrevented());const o=ht(new Event(t,{bubbles:a,cancelable:!0}),n);return c&&o.preventDefault(),r&&e.dispatchEvent(o),o.defaultPrevented&&s&&s.preventDefault(),o}};function ht(e,t={}){for(const[n,s]of Object.entries(t))try{e[n]=s}catch{Object.defineProperty(e,n,{configurable:!0,get(){return s}})}return e}function On(e){if(e==="true")return!0;if(e==="false")return!1;if(e===Number(e).toString())return Number(e);if(e===""||e==="null")return null;if(typeof e!="string")return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function Le(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const v={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${Le(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${Le(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter(e=>e.startsWith("bs")&&!e.startsWith("bsConfig"));for(const o of n){let s=o.replace(/^bs/,"");s=s.charAt(0).toLowerCase()+s.slice(1,s.length),t[s]=On(e.dataset[o])}return t},getDataAttribute(e,t){return On(e.getAttribute(`data-bs-${Le(t)}`))}};class se{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=g(t)?v.getDataAttribute(t,"config"):{};return{...this.constructor.Default,...typeof n=="object"?n:{},...g(t)?v.getDataAttributes(t):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[n,s]of Object.entries(t)){const o=e[n],i=g(o)?"element":Gr(o);if(!new RegExp(s).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${s}".`)}}}const _r="5.3.2";class h extends se{constructor(e,t){if(super(),e=w(e),!e)return;this._element=e,this._config=this._getConfig(t),pt.set(this._element,this.constructor.DATA_KEY,this)}dispose(){pt.remove(this._element,this.constructor.DATA_KEY),e.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){Zn(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return pt.get(w(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t=="object"?t:null)}static get VERSION(){return _r}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const tt=e=>{let t=e.getAttribute("data-bs-target");if(!t||t==="#"){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&n!=="#"?is(n.trim()):null}return t},t={find(e,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,e))},findOne(e,t=document.documentElement){return Element.prototype.querySelector.call(t,e)},children(e,t){return[].concat(...e.children).filter(e=>e.matches(t))},parents(e,t){const s=[];let n=e.parentNode.closest(t);for(;n;)s.push(n),n=n.parentNode.closest(t);return s},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(e=>!y(e)&&R(e))},getSelectorFromElement(e){const n=tt(e);return n?t.findOne(n)?n:null:null},getElementFromSelector(e){const n=tt(e);return n?t.findOne(n):null},getMultipleElementsFromSelector(e){const n=tt(e);return n?t.find(n):[]}},_e=(n,s="hide")=>{const i=`click.dismiss${n.EVENT_KEY}`,o=n.NAME;e.on(document,i,`[data-bs-dismiss="${o}"]`,function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),y(this))return;const i=t.getElementFromSelector(this)||this.closest(`.${o}`),a=n.getOrCreateInstance(i);a[s]()})},yr="alert",jr="bs.alert",jn=`.${jr}`,vr=`close${jn}`,cr=`closed${jn}`,ir="fade",Qa="show";class de extends h{static get NAME(){return yr}close(){const t=e.trigger(this._element,vr);if(t.defaultPrevented)return;this._element.classList.remove(Qa);const n=this._element.classList.contains(ir);this._queueCallback(()=>this._destroyElement(),this._element,n)}_destroyElement(){this._element.remove(),e.trigger(this._element,cr),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=de.getOrCreateInstance(this);if(typeof e!="string")return;if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)})}}_e(de,"close"),u(de);const Ga="button",qa="bs.button",Wa=`.${qa}`,Ba=".data-api",Pa="active",fn='[data-bs-toggle="button"]',Ta=`click${Wa}${Ba}`;class fe extends h{static get NAME(){return Ga}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Pa))}static jQueryInterface(e){return this.each(function(){const t=fe.getOrCreateInstance(this);e==="toggle"&&t[e]()})}}e.on(document,Ta,fn,e=>{e.preventDefault();const t=e.target.closest(fn),n=fe.getOrCreateInstance(t);n.toggle()}),u(fe);const ga="swipe",P=".bs.swipe",pa=`touchstart${P}`,fa=`touchmove${P}`,ma=`touchend${P}`,ua=`pointerdown${P}`,la=`pointerup${P}`,Qi="touch",Gi="pen",Vi="pointer-event",Bi=40,Ri={endCallback:null,leftCallback:null,rightCallback:null},Ni={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Re extends se{constructor(e,t){if(super(),this._element=e,!e||!Re.isSupported())return;this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents()}static get Default(){return Ri}static get DefaultType(){return Ni}static get NAME(){return ga}dispose(){e.off(this._element,P)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),o(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=Bi)return;const t=e/this._deltaX;if(this._deltaX=0,!t)return;o(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(e.on(this._element,ua,e=>this._start(e)),e.on(this._element,la,e=>this._end(e)),this._element.classList.add(Vi)):(e.on(this._element,pa,e=>this._start(e)),e.on(this._element,fa,e=>this._move(e)),e.on(this._element,ma,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===Gi||e.pointerType===Qi)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Di="carousel",zi="bs.carousel",_=`.${zi}`,Kt=".data-api",Mi="ArrowLeft",Si="ArrowRight",Ei=500,ie="next",U="prev",K="left",ke="right",ji=`slide${_}`,Be=`slid${_}`,bi=`keydown${_}`,gi=`mouseenter${_}`,li=`mouseleave${_}`,ci=`dragstart${_}`,si=`load${_}${Kt}`,ei=`click${_}${Kt}`,Pt="carousel",Ce="active",Jo="slide",Zo="carousel-item-end",Qo="carousel-item-start",Xo="carousel-item-next",Go="carousel-item-prev",zt=".active",gt=".carousel-item",Ko=zt+gt,Bo=".carousel-item img",Po=".carousel-indicators",No="[data-bs-slide], [data-bs-slide-to]",Do='[data-bs-ride="carousel"]',To={[Mi]:ke,[Si]:K},Fo={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},vo={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class ee extends h{constructor(e,n){super(e,n),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=t.findOne(Po,this._element),this._addEventListeners(),this._config.ride===Pt&&this.cycle()}static get Default(){return Fo}static get DefaultType(){return vo}static get NAME(){return Di}next(){this._slide(ie)}nextWhenVisible(){!document.hidden&&R(this._element)&&this.next()}prev(){this._slide(U)}pause(){this._isSliding&&ns(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(!this._config.ride)return;if(this._isSliding){e.one(this._element,Be,()=>this.cycle());return}this.cycle()}to(t){const n=this._getItems();if(t>n.length-1||t<0)return;if(this._isSliding){e.one(this._element,Be,()=>this.to(t));return}const s=this._getItemIndex(this._getActive());if(s===t)return;const o=t>s?ie:U;this._slide(o,n[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&e.on(this._element,bi,e=>this._keydown(e)),this._config.pause==="hover"&&(e.on(this._element,gi,()=>this.pause()),e.on(this._element,li,()=>this._maybeEnableCycle())),this._config.touch&&Re.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const n of t.find(Bo,this._element))e.on(n,ci,e=>e.preventDefault());const n=()=>{if(this._config.pause!=="hover")return;this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Ei+this._config.interval)},s={leftCallback:()=>this._slide(this._directionToOrder(K)),rightCallback:()=>this._slide(this._directionToOrder(ke)),endCallback:n};this._swipeHelper=new Re(this._element,s)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=To[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const s=t.findOne(zt,this._indicatorsElement);s.classList.remove(Ce),s.removeAttribute("aria-current");const n=t.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(Ce),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(t,n=null){if(this._isSliding)return;const o=this._getActive(),a=t===ie,s=n||$e(this._getItems(),o,a,this._config.wrap);if(s===o)return;const c=this._getItemIndex(s),l=n=>e.trigger(this._element,n,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(o),to:c}),d=l(ji);if(d.defaultPrevented)return;if(!o||!s)return;const u=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(c),this._activeElement=s;const i=a?Qo:Zo,r=a?Xo:Go;s.classList.add(r),oe(s),o.classList.add(i),s.classList.add(i);const h=()=>{s.classList.remove(i,r),s.classList.add(Ce),o.classList.remove(Ce,r,i),this._isSliding=!1,l(Be)};this._queueCallback(h,o,this._isAnimated()),u&&this.cycle()}_isAnimated(){return this._element.classList.contains(Jo)}_getActive(){return t.findOne(Ko,this._element)}_getItems(){return t.find(gt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return c()?e===K?U:ie:e===K?ie:U}_orderToDirection(e){return c()?e===U?K:ke:e===U?ke:K}static jQueryInterface(e){return this.each(function(){const t=ee.getOrCreateInstance(this,e);if(typeof e=="number"){t.to(e);return}if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}e.on(document,ei,No,function(e){const s=t.getElementFromSelector(this);if(!s||!s.classList.contains(Pt))return;e.preventDefault();const n=ee.getOrCreateInstance(s),o=this.getAttribute("data-bs-slide-to");if(o){n.to(o),n._maybeEnableCycle();return}if(v.getDataAttribute(this,"slide")==="next"){n.next(),n._maybeEnableCycle();return}n.prev(),n._maybeEnableCycle()}),e.on(window,si,()=>{const e=t.find(Do);for(const t of e)ee.getOrCreateInstance(t)}),u(ee);const rs="collapse",po="bs.collapse",J=`.${po}`,co=".data-api",ao=`show${J}`,io=`shown${J}`,Js=`hide${J}`,Qs=`hidden${J}`,Gs=`click${J}${co}`,ct="show",L="collapse",pe="collapsing",Ys="collapsed",Ks=`:scope .${L} .${L}`,Us="collapse-horizontal",Ws="width",$s="height",Vs=".collapse.show, .collapse.collapsing",nt='[data-bs-toggle="collapse"]',Bs={parent:null,toggle:!0},Is={parent:"(null|element)",toggle:"boolean"};class te extends h{constructor(e,n){super(e,n),this._isTransitioning=!1,this._triggerArray=[];const s=t.find(nt);for(const e of s){const n=t.getSelectorFromElement(e),o=t.find(n).filter(e=>e===this._element);n!==null&&o.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Bs}static get DefaultType(){return Is}static get NAME(){return rs}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let n=[];if(this._config.parent&&(n=this._getFirstLevelChildren(Vs).filter(e=>e!==this._element).map(e=>te.getOrCreateInstance(e,{toggle:!1}))),n.length&&n[0]._isTransitioning)return;const s=e.trigger(this._element,ao);if(s.defaultPrevented)return;for(const e of n)e.hide();const t=this._getDimension();this._element.classList.remove(L),this._element.classList.add(pe),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(pe),this._element.classList.add(L,ct),this._element.style[t]="",e.trigger(this._element,io)},i=t[0].toUpperCase()+t.slice(1),a=`scroll${i}`;this._queueCallback(o,this._element,!0),this._element.style[t]=`${this._element[a]}px`}hide(){if(this._isTransitioning||!this._isShown())return;const s=e.trigger(this._element,Js);if(s.defaultPrevented)return;const n=this._getDimension();this._element.style[n]=`${this._element.getBoundingClientRect()[n]}px`,oe(this._element),this._element.classList.add(pe),this._element.classList.remove(L,ct);for(const e of this._triggerArray){const n=t.getElementFromSelector(e);n&&!this._isShown(n)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(pe),this._element.classList.add(L),e.trigger(this._element,Qs)};this._element.style[n]="",this._queueCallback(o,this._element,!0)}_isShown(e=this._element){return e.classList.contains(ct)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=w(e.parent),e}_getDimension(){return this._element.classList.contains(Us)?Ws:$s}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(nt);for(const n of e){const s=t.getElementFromSelector(n);s&&this._addAriaAndCollapsedClass([n],this._isShown(s))}}_getFirstLevelChildren(e){const n=t.find(Ks,this._config.parent);return t.find(e,this._config.parent).filter(e=>!n.includes(e))}_addAriaAndCollapsedClass(e,t){if(!e.length)return;for(const n of e)n.classList.toggle(Ys,!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return typeof e=="string"&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const n=te.getOrCreateInstance(this,t);if(typeof e=="string"){if(typeof n[e]=="undefined")throw new TypeError(`No method named "${e}"`);n[e]()}})}}e.on(document,Gs,nt,function(e){(e.target.tagName==="A"||e.delegateTarget&&e.delegateTarget.tagName==="A")&&e.preventDefault();for(const e of t.getMultipleElementsFromSelector(this))te.getOrCreateInstance(e,{toggle:!1}).toggle()}),u(te);var k,A,Q,Nn,In,ae,Yn,Xn,ot,Tt,Ft,St,At,je,s="top",a="bottom",i="right",n="left",Ee="auto",Y=[s,a,i,n],T="start",q="end",Vt="clippingParents",Ve="viewport",I="popper",Ut="reference",Te=Y.reduce(function(e,t){return e.concat([t+"-"+T,t+"-"+q])},[]),Xe=[].concat(Y,[Ee]).reduce(function(e,t){return e.concat([t,t+"-"+T,t+"-"+q])},[]),Yt="beforeRead",Gt="read",Xt="afterRead",Qt="beforeMain",Zt="main",Jt="afterMain",en="beforeWrite",tn="write",nn="afterWrite",sn=[Yt,Gt,Xt,Qt,Zt,Jt,en,tn,nn];function f(e){return e?(e.nodeName||"").toLowerCase():null}function r(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t?t.defaultView||window:window}return e}function D(e){var t=r(e).Element;return e instanceof t||e instanceof Element}function l(e){var t=r(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Me(e){if(typeof ShadowRoot=="undefined")return!1;var t=r(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Hs(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var o=t.styles[e]||{},s=t.attributes[e]||{},n=t.elements[e];if(!l(n)||!f(n))return;Object.assign(n.style,o),Object.keys(s).forEach(function(e){var t=s[e];t===!1?n.removeAttribute(e):n.setAttribute(e,t===!0?"":t)})})}function Ps(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var s=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]),a=i.reduce(function(e,t){return e[t]="",e},{});if(!l(s)||!f(s))return;Object.assign(s.style,a),Object.keys(o).forEach(function(e){s.removeAttribute(e)})})}}const st={name:"applyStyles",enabled:!0,phase:"write",fn:Hs,effect:Ps,requires:["computeStyles"]};function p(e){return e.split("-")[0]}k=Math.max,Q=Math.min,A=Math.round;function et(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function bn(){return!/^((?!chrome|android).)*safari/i.test(et())}function X(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1),s=e.getBoundingClientRect(),o=1,i=1,t&&l(e)&&(o=e.offsetWidth>0?A(s.width)/e.offsetWidth||1:1,i=e.offsetHeight>0?A(s.height)/e.offsetHeight||1:1);var s,o,i,f=D(e)?r(e):window,a=f.visualViewport,u=!bn()&&n,c=(s.left+(u&&a?a.offsetLeft:0))/o,d=(s.top+(u&&a?a.offsetTop:0))/i,h=s.width/o,m=s.height/i;return{width:h,height:m,top:d,right:c+h,bottom:d+m,left:c,x:c,y:d}}function ut(e){var t=X(e),n=e.offsetWidth,s=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:s}}function _n(e,t){var n,s=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(s&&Me(s)){n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function j(e){return r(e).getComputedStyle(e)}function Rs(e){return["table","td","th"].indexOf(f(e))>=0}function E(e){return((D(e)?e.ownerDocument:e.document)||window.document).documentElement}function ge(e){return f(e)==="html"?e:e.assignedSlot||e.parentNode||(Me(e)?e.host:null)||E(e)}function En(e){return!l(e)||j(e).position==="fixed"?null:e.offsetParent}function As(e){var t,n,o,s=/firefox/i.test(et()),i=/Trident/i.test(et());if(i&&l(e)&&(o=j(e),o.position==="fixed"))return null;for(t=ge(e),Me(t)&&(t=t.host);l(t)&&["html","body"].indexOf(f(t))<0;){if(n=j(t),n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].indexOf(n.willChange)!==-1||s&&n.willChange==="filter"||s&&n.filter&&n.filter!=="none")return t;t=t.parentNode}return null}function ce(e){for(var n=r(e),t=En(e);t&&Rs(t)&&j(t).position==="static";)t=En(t);return t&&(f(t)==="html"||f(t)==="body"&&j(t).position==="static")?n:t||As(e)||n}function Qe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function re(e,t,n){return k(e,Q(t,n))}function Cs(e,t,n){var s=re(e,t,n);return s>n?n:s}function Tn(){return{top:0,right:0,bottom:0,left:0}}function zn(e){return Object.assign({},Tn(),e)}function Dn(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}Nn=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,zn(typeof t!="number"?t:Dn(t,Y))};function Os(e){var r,c,d,u,f,g,v,b,j,y,_,O,x,C,E,t=e.state,S=e.name,A=e.options,h=t.elements.arrow,m=t.modifiersData.popperOffsets,w=p(t.placement),o=Qe(w),k=[n,i].indexOf(w)>=0,l=k?"height":"width";if(!h||!m)return;g=Nn(A.padding,t),v=ut(h),b=o==="y"?s:n,j=o==="y"?a:i,y=t.rects.reference[l]+t.rects.reference[o]-m[o]-t.rects.popper[l],_=m[o]-t.rects.reference[o],c=ce(h),f=c?o==="y"?c.clientHeight||0:c.clientWidth||0:0,O=y/2-_/2,x=g[b],C=f-v[l]-g[j],u=f/2-v[l]/2+O,d=re(x,u,C),E=o,t.modifiersData[S]=(r={},r[E]=d,r.centerOffset=d-u,r)}function ys(e){var n=e.state,o=e.options,s=o.element,t=s===void 0?"[data-popper-arrow]":s;if(t==null)return;if(typeof t=="string"&&(t=n.elements.popper.querySelector(t),!t))return;if(!_n(n.elements.popper,t))return;n.elements.arrow=t}const Pn={name:"arrow",enabled:!0,phase:"main",fn:Os,effect:ys,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function V(e){return e.split("-")[1]}In={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bs(e,t){var s=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:A(s*n)/n||0,y:A(o*n)/n||0}}function Vn(e){var c,u,h,p,g,b,y,T,z,f=e.popper,N=e.popperRect,d=e.placement,A=e.variation,m=e.offsets,x=e.position,v=e.gpuAcceleration,S=e.adaptive,_=e.roundOffsets,M=e.isFixed,L=m.x,t=L===void 0?0:L,D=m.y,o=D===void 0?0:D,C=typeof _=="function"?_({x:t,y:o}):{x:t,y:o},t=C.x,o=C.y,F=m.hasOwnProperty("x"),k=m.hasOwnProperty("y"),w=n,O=s,l=window;return S&&(c=ce(f),g="clientHeight",y="clientWidth",c===r(f)&&(c=E(f),j(c).position!=="static"&&x==="absolute"&&(g="scrollHeight",y="scrollWidth")),c=c,(d===s||(d===n||d===i)&&A===q)&&(O=a,T=M&&c===l&&l.visualViewport?l.visualViewport.height:c[g],o-=T-N.height,o*=v?1:-1),(d===n||(d===s||d===a)&&A===q)&&(w=i,z=M&&c===l&&l.visualViewport?l.visualViewport.width:c[y],t-=z-N.width,t*=v?1:-1)),p=Object.assign({position:x},S&&In),b=_===!0?bs({x:t,y:o},r(f)):{x:t,y:o},t=b.x,o=b.y,v?Object.assign({},p,(h={},h[O]=k?"0":"",h[w]=F?"0":"",h.transform=(l.devicePixelRatio||1)<=1?"translate("+t+"px, "+o+"px)":"translate3d("+t+"px, "+o+"px, 0)",h)):Object.assign({},p,(u={},u[O]=k?o+"px":"",u[w]=F?t+"px":"",u.transform="",u))}function vs(e){var t=e.state,n=e.options,s=n.gpuAcceleration,c=s===void 0||s,o=n.adaptive,l=o===void 0||o,i=n.roundOffsets,a=i===void 0||i,r={placement:p(t.placement),variation:V(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:c,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Vn(Object.assign({},r,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Vn(Object.assign({},r,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Fe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:vs,data:{}};ae={passive:!0};function gs(e){var n=e.state,t=e.instance,s=e.options,o=s.scroll,i=o===void 0||o,a=s.resize,c=a===void 0||a,l=r(n.elements.popper),d=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&d.forEach(function(e){e.addEventListener("scroll",t.update,ae)}),c&&l.addEventListener("resize",t.update,ae),function(){i&&d.forEach(function(e){e.removeEventListener("scroll",t.update,ae)}),c&&l.removeEventListener("resize",t.update,ae)}}const ze={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:gs,data:{}};Yn={left:"right",right:"left",bottom:"top",top:"bottom"};function Ae(e){return e.replace(/left|right|bottom|top/g,function(e){return Yn[e]})}Xn={start:"end",end:"start"};function Qn(e){return e.replace(/start|end/g,function(e){return Xn[e]})}function We(e){var t=r(e),n=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:n,scrollTop:s}}function Ke(e){return X(E(e)).left+We(e).scrollLeft}function hs(e,t){var s,d=r(e),o=E(e),n=d.visualViewport,i=o.clientWidth,a=o.clientHeight,c=0,l=0;return n&&(i=n.width,a=n.height,s=bn(),(s||!s&&t==="fixed")&&(c=n.offsetLeft,l=n.offsetTop)),{width:i,height:a,x:c+Ke(e),y:l}}function us(e){var s,n=E(e),o=We(e),t=(s=e.ownerDocument)==null?void 0:s.body,i=k(n.scrollWidth,n.clientWidth,t?t.scrollWidth:0,t?t.clientWidth:0),r=k(n.scrollHeight,n.clientHeight,t?t.scrollHeight:0,t?t.clientHeight:0),a=-o.scrollLeft+Ke(e),c=-o.scrollTop;return j(t||n).direction==="rtl"&&(a+=k(n.clientWidth,t?t.clientWidth:0)-i),{width:i,height:r,x:a,y:c}}function Je(e){var t=j(e),n=t.overflow,s=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+s)}function ss(e){return["html","body","#document"].indexOf(f(e))>=0?e.ownerDocument.body:l(e)&&Je(e)?e:ss(ge(e))}function ne(e,t){t===void 0&&(t=[]);var s,n=ss(e),o=n===((s=e.ownerDocument)==null?void 0:s.body),i=r(n),a=o?[i].concat(i.visualViewport||[],Je(n)?n:[]):n,c=t.concat(a);return o?c:c.concat(ne(ge(a)))}function rt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Fi(e,t){var n=X(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Mt(e,t,n){return t===Ve?rt(hs(e,n)):D(t)?Fi(t,n):rt(us(E(e)))}function ls(e){var n=ne(ge(e)),s=["absolute","fixed"].indexOf(j(e).position)>=0,t=s&&l(e)?ce(e):e;return D(t)?n.filter(function(e){return D(e)&&_n(e,t)&&f(e)!=="body"}):[]}function ds(e,t,n,s){var a=t==="clippingParents"?ls(e):[].concat(t),i=[].concat(a,[n]),r=i[0],o=i.reduce(function(t,n){var o=Mt(e,n,s);return t.top=k(o.top,t.top),t.right=Q(o.right,t.right),t.bottom=Q(o.bottom,t.bottom),t.left=k(o.left,t.left),t},Mt(e,r,s));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function ts(e){var o,r,l,t=e.reference,c=e.element,d=e.placement,u=d?p(d):null,f=d?V(d):null,h=t.x+t.width/2-c.width/2,m=t.y+t.height/2-c.height/2;switch(u){case s:o={x:h,y:t.y-c.height};break;case a:o={x:h,y:t.y+t.height};break;case i:o={x:t.x+t.width,y:m};break;case n:o={x:t.x-c.width,y:m};break;default:o={x:t.x,y:t.y}}if(r=u?Qe(u):null,r!=null)switch(l=r==="y"?"height":"width",f){case T:o[r]=o[r]-(t[l]/2-c[l]/2);break;case q:o[r]=o[r]+(t[l]/2-c[l]/2);break}return o}function N(e,t){t===void 0&&(t={});var _,n=t,v=n.placement,j=v===void 0?e.placement:v,f=n.strategy,T=f===void 0?e.strategy:f,p=n.boundary,C=p===void 0?Vt:p,O=n.rootBoundary,F=O===void 0?Ve:O,x=n.elementContext,c=x===void 0?I:x,m=n.altBoundary,M=m!==void 0&&m,b=n.padding,d=b===void 0?0:b,o=zn(typeof d!="number"?d:Dn(d,Y)),S=c===I?Ut:I,w=e.rects.popper,h=e.elements[M?S:c],r=ds(D(h)?h:h.contextElement||E(e.elements.popper),C,F,T),y=X(e.elements.reference),k=ts({reference:y,element:w,strategy:"absolute",placement:j}),A=rt(Object.assign({},w,k)),l=c===I?A:y,u={top:r.top-l.top+o.top,bottom:l.bottom-r.bottom+o.bottom,left:r.left-l.left+o.left,right:l.right-r.right+o.right},g=e.modifiersData.offset;return c===I&&g&&(_=g[j],Object.keys(u).forEach(function(e){var t=[i,a].indexOf(e)>=0?1:-1,n=[s,a].indexOf(e)>=0?"y":"x";u[e]+=_[n]*t})),u}function ms(e,t){t===void 0&&(t={});var s,n=t,c=n.placement,l=n.boundary,d=n.rootBoundary,u=n.padding,h=n.flipVariations,i=n.allowedAutoPlacements,m=i===void 0?Xe:i,a=V(c),r=a?h?Te:Te.filter(function(e){return V(e)===a}):Y,o=r.filter(function(e){return m.indexOf(e)>=0});return o.length===0&&(o=r),s=o.reduce(function(t,n){return t[n]=N(e,{placement:n,boundary:l,rootBoundary:d,padding:u})[p(n)],t},{}),Object.keys(s).sort(function(e,t){return s[e]-s[t]})}function fs(e){if(p(e)===Ee)return[];var t=Ae(e);return[Qn(e),t,Qn(t)]}function ps(e){var t=e.state,o=e.options,C=e.name;if(t.modifiersData[C]._skip)return;for(var r,c,l,u,h,g,v,y,_,x,E,k,z,M=o.mainAxis,I=M===void 0||M,D=o.altAxis,P=D===void 0||D,R=o.fallbackPlacements,L=o.padding,w=o.boundary,O=o.rootBoundary,B=o.altBoundary,F=o.flipVariations,j=F===void 0||F,$=o.allowedAutoPlacements,d=t.options.placement,K=p(d),H=K===d,q=R||(H||!j?[Ae(d)]:fs(d)),f=[d].concat(q).reduce(function(e,n){return e.concat(p(n)===Ee?ms(t,{placement:n,boundary:w,rootBoundary:O,padding:L,flipVariations:j,allowedAutoPlacements:$}):n)},[]),U=t.rects.reference,W=t.rects.popper,A=new Map,S=!0,m=f[0],b=0;b=0,_=y?"width":"height",h=N(t,{placement:r,boundary:w,rootBoundary:O,altBoundary:B,padding:L}),l=y?g?i:n:g?a:s,U[_]>W[_]&&(l=Ae(l)),z=Ae(l),c=[],I&&c.push(h[v]<=0),P&&c.push(h[l]<=0,h[z]<=0),c.every(function(e){return e})){m=r,S=!1;break}A.set(r,c)}if(S)for(k=j?3:1,E=function(t){var n=f.find(function(e){var n=A.get(e);if(n)return n.slice(0,t).every(function(e){return e})});if(n)return m=n,"break"},u=k;u>0;u--)if(x=E(u),x==="break")break;t.placement!==m&&(t.modifiersData[C]._skip=!0,t.placement=m,t.reset=!0)}const Kn={name:"flip",enabled:!0,phase:"main",fn:ps,requiresIfExists:["offset"],data:{_skip:!1}};function $n(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Bn(e){return[s,i,a,n].some(function(t){return e[t]>=0})}function js(e){var t=e.state,a=e.name,r=t.rects.reference,c=t.rects.popper,l=t.modifiersData.preventOverflow,d=N(t,{elementContext:"reference"}),u=N(t,{altBoundary:!0}),n=$n(d,r),s=$n(u,c,l),o=Bn(n),i=Bn(s);t.modifiersData[a]={referenceClippingOffsets:n,popperEscapeOffsets:s,isReferenceHidden:o,hasPopperEscaped:i},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":o,"data-popper-escaped":i})}const Rn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:js};function _s(e,t,o){var c=p(e),d=[n,s].indexOf(c)>=0?-1:1,l=typeof o=="function"?o(Object.assign({},t,{placement:e})):o,a=l[0],r=l[1],a=a||0,r=(r||0)*d;return[n,i].indexOf(c)>=0?{x:r,y:a}:{x:a,y:r}}function ws(e){var t=e.state,i=e.options,a=e.name,n=i.offset,r=n===void 0?[0,0]:n,s=Xe.reduce(function(e,n){return e[n]=_s(n,t.rects,r),e},{}),o=s[t.placement],c=o.x,l=o.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[a]=s}const Ln={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ws};function xs(e){var t=e.state,n=e.name;t.modifiersData[n]=ts({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const He={name:"popperOffsets",enabled:!0,phase:"read",fn:xs,data:{}};function Es(e){return e==="x"?"y":"x"}function ks(e){var fe,r,h,P,H,$,W,U,Y,Z,J,ue,v,E,K,q,te,ne,x,oe,B,ae,le,G,me,c,f,w,A,M,F,z,D,R,I,X,t=e.state,l=e.options,be=e.name,pe=l.mainAxis,ge=pe===void 0||pe,se=l.altAxis,we=se!==void 0&&se,_e=l.boundary,ye=l.rootBoundary,ve=l.altBoundary,je=l.padding,de=l.tether,d=de===void 0||de,ie=l.tetherOffset,S=ie===void 0?0:ie,O=N(t,{boundary:_e,rootBoundary:ye,padding:je,altBoundary:ve}),ee=p(t.placement),C=V(t.placement),he=!C,o=Qe(ee),j=Es(o),b=t.modifiersData.popperOffsets,u=t.rects.reference,g=t.rects.popper,_=typeof S=="function"?S(Object.assign({},t.rects,{placement:t.placement})):S,m=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(!b)return;ge&&(P=o==="y"?s:n,H=o==="y"?a:i,r=o==="y"?"height":"width",h=b[o],$=h+O[P],W=h-O[H],U=d?-g[r]/2:0,J=C===T?u[r]:g[r],Z=C===T?-g[r]:-u[r],Y=t.elements.arrow,ue=d&&Y?ut(Y):{width:0,height:0},E=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Tn(),q=E[P],K=E[H],v=re(0,u[r],ue[r]),te=he?u[r]/2-U-v-q-m.mainAxis:J-v-q-m.mainAxis,ne=he?-u[r]/2+U+v+K+m.mainAxis:Z+v+K+m.mainAxis,x=t.elements.arrow&&ce(t.elements.arrow),oe=x?o==="y"?x.clientTop||0:x.clientLeft||0:0,B=(fe=y?.[o])!=null?fe:0,ae=h+te-B-oe,le=h+ne-B,I=re(d?Q($,ae):$,h,d?k(W,le):W),b[o]=I,L[o]=I-h),we&&(G=o==="x"?s:n,me=o==="x"?a:i,c=b[j],f=j==="y"?"height":"width",R=c+O[G],D=c-O[me],w=[s,n].indexOf(ee)!==-1,z=(X=y?.[j])!=null?X:0,F=w?R:c-u[f]-g[f]-z+m.altAxis,M=w?c+u[f]+g[f]-z-m.altAxis:D,A=d&&w?Cs(F,c,M):re(d?F:R,c,d?M:D),b[j]=A,L[j]=A-c),t.modifiersData[be]=L}const kn={name:"preventOverflow",enabled:!0,phase:"main",fn:ks,requiresIfExists:["offset"]};function Ss(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ms(e){return e===r(e)||!l(e)?We(e):Ss(e)}function Fs(e){var t=e.getBoundingClientRect(),n=A(t.width)/e.offsetWidth||1,s=A(t.height)/e.offsetHeight||1;return n!==1||s!==1}function Ts(e,t,n){n===void 0&&(n=!1);var r=l(t),c=l(t)&&Fs(t),i=E(t),o=X(e,c,n),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(r||!r&&!n)&&((f(t)!=="body"||Je(i))&&(a=Ms(t)),l(t)?(s=X(t,!0),s.x+=t.clientLeft,s.y+=t.clientTop):i&&(s.x=Ke(i))),{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function zs(e){var n=new Map,t=new Set,s=[];e.forEach(function(e){n.set(e.name,e)});function o(e){t.add(e.name);var i=[].concat(e.requires||[],e.requiresIfExists||[]);i.forEach(function(e){if(!t.has(e)){var s=n.get(e);s&&o(s)}}),s.push(e)}return e.forEach(function(e){t.has(e.name)||o(e)}),s}function Ds(e){var t=zs(e);return sn.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function Ns(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ls(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}ot={placement:"bottom",modifiers:[],strategy:"absolute"};function un(){for(var t=arguments.length,n=new Array(t),e=0;eNumber.parseInt(e,10)):typeof e=="function"?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(v.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...o(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:n}){const s=t.find(yo,this._menu).filter(e=>R(e));if(!s.length)return;$e(s,n,e===bt,!s.includes(n)).focus()}static jQueryInterface(e){return this.each(function(){const t=m.getOrCreateInstance(this,e);if(typeof e!="string")return;if(typeof t[e]=="undefined")throw new TypeError(`No method named "${e}"`);t[e]()})}static clearMenus(e){if(e.button===eo||e.type==="keyup"&&e.key!==jt)return;const n=t.find(go);for(const a of n){const t=m.getInstance(a);if(!t||t._config.autoClose===!1)continue;const s=e.composedPath(),o=s.includes(t._menu);if(s.includes(t._element)||t._config.autoClose==="inside"&&!o||t._config.autoClose==="outside"&&o)continue;if(t._menu.contains(e.target)&&(e.type==="keyup"&&e.key===jt||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const i={relatedTarget:t._element};e.type==="click"&&(i.clickEvent=e),t._completeHide(i)}}static dataApiKeydownHandler(e){const a=/input|textarea/i.test(e.target.tagName),s=e.key===Xs,o=[Zs,bt].includes(e.key);if(!o&&!s)return;if(a&&!s)return;e.preventDefault();const i=this.matches(z)?this:t.prev(this,z)[0]||t.next(this,z)[0]||t.findOne(z,e.delegateTarget.parentNode),n=m.getOrCreateInstance(i);if(o){e.stopPropagation(),n.show(),n._selectMenuItem(e);return}n._isShown()&&(e.stopPropagation(),n.hide(),i.focus())}}e.on(document,yt,z,m.dataApiKeydownHandler),e.on(document,yt,me,m.dataApiKeydownHandler),e.on(document,vt,m.clearMenus),e.on(document,ro,m.clearMenus),e.on(document,vt,z,function(e){e.preventDefault(),m.getOrCreateInstance(this).toggle()}),u(m);const _t="backdrop",zo="fade",wt="show",Ot=`mousedown.bs.${_t}`,Lo={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ro={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class xt extends se{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return Lo}static get DefaultType(){return Ro}static get NAME(){return _t}show(e){if(!this._config.isVisible){o(e);return}this._append();const t=this._getElement();this._config.isAnimated&&oe(t),t.classList.add(wt),this._emulateAnimation(()=>{o(e)})}hide(e){if(!this._config.isVisible){o(e);return}this._getElement().classList.remove(wt),this._emulateAnimation(()=>{this.dispose(),o(e)})}dispose(){if(!this._isAppended)return;e.off(this._element,Ot),this._element.remove(),this._isAppended=!1}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(zo),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=w(e.rootElement),e}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),e.on(t,Ot,()=>{o(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){Zn(e,this._getElement(),this._config.isAnimated)}}const Ho="focustrap",Io="bs.focustrap",be=`.${Io}`,Vo=`focusin${be}`,$o=`keydown.tab${be}`,Wo="Tab",Uo="forward",kt="backward",qo={autofocus:!0,trapElement:null},Yo={autofocus:"boolean",trapElement:"element"};class Dt extends se{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return qo}static get DefaultType(){return Yo}static get NAME(){return Ho}activate(){if(this._isActive)return;this._config.autofocus&&this._config.trapElement.focus(),e.off(document,be),e.on(document,Vo,e=>this._handleFocusin(e)),e.on(document,$o,e=>this._handleKeydown(e)),this._isActive=!0}deactivate(){if(!this._isActive)return;this._isActive=!1,e.off(document,be)}_handleFocusin(e){const{trapElement:n}=this._config;if(e.target===document||e.target===n||n.contains(e.target))return;const s=t.focusableChildren(n);s.length===0?n.focus():this._lastTabNavDirection===kt?s[s.length-1].focus():s[0].focus()}_handleKeydown(e){if(e.key!==Wo)return;this._lastTabNavDirection=e.shiftKey?kt:Uo}}const Nt=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Lt=".sticky-top",Oe="padding-right",Rt="margin-right";class qe{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Oe,t=>t+e),this._setElementAttributes(Nt,Oe,t=>t+e),this._setElementAttributes(Lt,Rt,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Oe),this._resetElementAttributes(Nt,Oe),this._resetElementAttributes(Lt,Rt)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const s=this.getWidth(),o=e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+s)return;this._saveInitialAttribute(e,t);const o=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(o))}px`)};this._applyManipulationCallback(e,o)}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&v.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){const n=e=>{const n=v.getDataAttribute(e,t);if(n===null){e.style.removeProperty(t);return}v.removeDataAttribute(e,t),e.style.setProperty(t,n)};this._applyManipulationCallback(e,n)}_applyManipulationCallback(e,n){if(g(e)){n(e);return}for(const s of t.find(e,this._element))n(s)}}const ti="modal",ni="bs.modal",d=`.${ni}`,oi=".data-api",ii="Escape",ai=`hide${d}`,ri=`hidePrevented${d}`,Ht=`hidden${d}`,It=`show${d}`,di=`shown${d}`,ui=`resize${d}`,hi=`click.dismiss${d}`,mi=`mousedown.dismiss${d}`,fi=`keydown.dismiss${d}`,pi=`click${d}${oi}`,Bt="modal-open",vi="fade",$t="show",Se="modal-static",yi=".modal.show",_i=".modal-dialog",wi=".modal-body",Oi='[data-bs-toggle="modal"]',xi={backdrop:!0,focus:!0,keyboard:!0},Ci={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class $ extends h{constructor(e,n){super(e,n),this._dialog=t.findOne(_i,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new qe,this._addEventListeners()}static get Default(){return xi}static get DefaultType(){return Ci}static get NAME(){return ti}toggle(e){return this._isShown?this.hide():this.show(e)}show(t){if(this._isShown||this._isTransitioning)return;const n=e.trigger(this._element,It,{relatedTarget:t});if(n.defaultPrevented)return;this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Bt),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t))}hide(){if(!this._isShown||this._isTransitioning)return;const t=e.trigger(this._element,ai);if(t.defaultPrevented)return;this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove($t),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())}dispose(){e.off(window,d),e.off(this._dialog,d),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new xt({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Dt({trapElement:this._element})}_showElement(n){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const s=t.findOne(wi,this._dialog);s&&(s.scrollTop=0),oe(this._element),this._element.classList.add($t);const o=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,e.trigger(this._element,di,{relatedTarget:n})};this._queueCallback(o,this._dialog,this._isAnimated())}_addEventListeners(){e.on(this._element,fi,e=>{if(e.key!==ii)return;if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}),e.on(window,ui,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),e.on(this._element,mi,t=>{e.one(this._element,hi,e=>{if(this._element!==t.target||this._element!==e.target)return;if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Bt),this._resetAdjustments(),this._scrollBar.reset(),e.trigger(this._element,Ht)})}_isAnimated(){return this._element.classList.contains(vi)}_triggerBackdropTransition(){const n=e.trigger(this._element,ri);if(n.defaultPrevented)return;const s=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;if(t==="hidden"||this._element.classList.contains(Se))return;s||(this._element.style.overflowY="hidden"),this._element.classList.add(Se),this._queueCallback(()=>{this._element.classList.remove(Se),this._queueCallback(()=>{this._element.style.overflowY=t},this._dialog)},this._dialog),this._element.focus()}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;if(n&&!t){const t=c()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!n&&t){const t=c()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const n=$.getOrCreateInstance(this,e);if(typeof e!="string")return;if(typeof n[e]=="undefined")throw new TypeError(`No method named "${e}"`);n[e](t)})}}e.on(document,pi,Oi,function(n){const s=t.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&n.preventDefault(),e.one(s,It,t=>{if(t.defaultPrevented)return;e.one(s,Ht,()=>{R(this)&&this.focus()})});const o=t.findOne(yi);o&&$.getInstance(o).hide();const i=$.getOrCreateInstance(s);i.toggle(this)}),_e($),u($);const ki="offcanvas",Ai="bs.offcanvas",b=`.${Ai}`,Wt=".data-api",cs=`load${b}${Wt}`,Ti="Escape",qt="show",on="showing",an="hiding",Li="offcanvas-backdrop",rn=".offcanvas.show",Pi=`show${b}`,Hi=`shown${b}`,Ii=`hide${b}`,cn=`hidePrevented${b}`,ln=`hidden${b}`,$i=`resize${b}`,Wi=`click${b}${Wt}`,Ui=`keydown.dismiss${b}`,Ki='[data-bs-toggle="offcanvas"]',qi={backdrop:!0,keyboard:!0,scroll:!1},Yi={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class O extends h{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return qi}static get DefaultType(){return Yi}static get NAME(){return ki}toggle(e){return this._isShown?this.hide():this.show(e)}show(t){if(this._isShown)return;const n=e.trigger(this._element,Pi,{relatedTarget:t});if(n.defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new qe).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(on);const s=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(qt),this._element.classList.remove(on),e.trigger(this._element,Hi,{relatedTarget:t})};this._queueCallback(s,this._element,!0)}hide(){if(!this._isShown)return;const t=e.trigger(this._element,Ii);if(t.defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(an),this._backdrop.hide();const n=()=>{this._element.classList.remove(qt,an),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new qe).reset(),e.trigger(this._element,ln)};this._queueCallback(n,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const n=()=>{if(this._config.backdrop==="static"){e.trigger(this._element,cn);return}this.hide()},t=Boolean(this._config.backdrop);return new xt({className:Li,isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?n:null})}_initializeFocusTrap(){return new Dt({trapElement:this._element})}_addEventListeners(){e.on(this._element,Ui,t=>{if(t.key!==Ti)return;if(this._config.keyboard){this.hide();return}e.trigger(this._element,cn)})}static jQueryInterface(e){return this.each(function(){const t=O.getOrCreateInstance(this,e);if(typeof e!="string")return;if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)})}}e.on(document,Wi,Ki,function(n){const s=t.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),y(this))return;e.one(s,ln,()=>{R(this)&&this.focus()});const o=t.findOne(rn);o&&o!==s&&O.getInstance(o).hide();const i=O.getOrCreateInstance(s);i.toggle(this)}),e.on(window,cs,()=>{for(const e of t.find(rn))O.getOrCreateInstance(e).show()}),e.on(window,$i,()=>{for(const e of t.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(e).position!=="fixed"&&O.getOrCreateInstance(e).hide()}),_e(O),u(O);const Xi=/^aria-[\w-]*$/i,dn={"*":["class","dir","id","lang","role",Xi],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Zi=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ji=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,ea=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!Zi.has(n)||Boolean(Ji.test(e.nodeValue)):t.filter(e=>e instanceof RegExp).some(e=>e.test(n))};function ta(e,t,n){if(!e.length)return e;if(n&&typeof n=="function")return n(e);const o=new window.DOMParser,s=o.parseFromString(e,"text/html"),i=[].concat(...s.body.querySelectorAll("*"));for(const e of i){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const s=[].concat(...e.attributes),o=[].concat(t["*"]||[],t[n]||[]);for(const t of s)ea(t,o)||e.removeAttribute(t.nodeName)}return s.body.innerHTML}const na="TemplateFactory",sa={allowList:dn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},oa={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ia={entry:"(string|element|function|null)",selector:"(string|element)"};class aa extends se{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return sa}static get DefaultType(){return oa}static get NAME(){return na}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},ia)}_setContent(e,n,s){const o=t.findOne(s,e);if(!o)return;if(n=this._resolvePossibleFunction(n),!n){o.remove();return}if(g(n)){this._putElementInTemplate(w(n),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(n);return}o.textContent=n}_maybeSanitize(e){return this._config.sanitize?ta(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return o(e,[this])}_putElementInTemplate(e,t){if(this._config.html){t.innerHTML="",t.append(e);return}t.textContent=e.textContent}}const ra="tooltip",ca=new Set(["sanitize","allowList","sanitizeFn"]),Ze="fade",da="modal",ye="show",ha=".tooltip-inner",hn=`.${da}`,mn="hide.bs.modal",Z="hover",at="focus",va="click",ba="manual",ja="hide",ya="hidden",_a="show",wa="shown",Oa="inserted",xa="click",Ca="focusin",Ea="focusout",ka="mouseenter",Aa="mouseleave",Sa={AUTO:"auto",TOP:"top",RIGHT:c()?"left":"right",BOTTOM:"bottom",LEFT:c()?"right":"left"},Ma={allowList:dn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Fa={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class H extends h{constructor(e,t){if(typeof Et=="undefined")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Ma}static get DefaultType(){return Fa}static get NAME(){return ra}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(!this._isEnabled)return;if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}dispose(){clearTimeout(this._timeout),e.off(this._element.closest(hn),mn,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const n=e.trigger(this._element,this.constructor.eventName(_a)),s=es(this._element),o=(s||this._element.ownerDocument.documentElement).contains(this._element);if(n.defaultPrevented||!o)return;this._disposePopper();const t=this._getTipElement();this._element.setAttribute("aria-describedby",t.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(t),e.trigger(this._element,this.constructor.eventName(Oa))),this._popper=this._createPopper(t),t.classList.add(ye),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))e.on(t,"mouseover",le);const a=()=>{e.trigger(this._element,this.constructor.eventName(wa)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(a,this.tip,this._isAnimated())}hide(){if(!this._isShown())return;const t=e.trigger(this._element,this.constructor.eventName(ja));if(t.defaultPrevented)return;const n=this._getTipElement();if(n.classList.remove(ye),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))e.off(t,"mouseover",le);this._activeTrigger[va]=!1,this._activeTrigger[at]=!1,this._activeTrigger[Z]=!1,this._isHovered=null;const s=()=>{if(this._isWithActiveTrigger())return;this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),e.trigger(this._element,this.constructor.eventName(ya))};this._queueCallback(s,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(Ze,ye),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=Yr(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(Ze),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new aa({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ha]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Ze)}_isShown(){return this.tip&&this.tip.classList.contains(ye)}_createPopper(e){const t=o(this._config.placement,[this,e,this._element]),n=Sa[t.toUpperCase()];return je(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(e=>Number.parseInt(e,10)):typeof e=="function"?t=>e(t,this._element):e}_resolvePossibleFunction(e){return o(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...o(this._config.popperConfig,[t])}}_setListeners(){const t=this._config.trigger.split(" ");for(const n of t)if(n==="click")e.on(this._element,this.constructor.eventName(xa),this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t.toggle()});else if(n!==ba){const t=n===Z?this.constructor.eventName(ka):this.constructor.eventName(Ca),s=n===Z?this.constructor.eventName(Aa):this.constructor.eventName(Ea);e.on(this._element,t,this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger[e.type==="focusin"?at:Z]=!0,t._enter()}),e.on(this._element,s,this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger[e.type==="focusout"?at:Z]=t._element.contains(e.relatedTarget),t._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},e.on(this._element.closest(hn),mn,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");if(!e)return;!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title")}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){if(this._isWithActiveTrigger())return;this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide)}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=v.getDataAttributes(this._element);for(const e of Object.keys(t))ca.has(e)&&delete t[e];return e={...t,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:w(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const t=H.getOrCreateInstance(this,e);if(typeof e!="string")return;if(typeof t[e]=="undefined")throw new TypeError(`No method named "${e}"`);t[e]()})}}u(H);const za="popover",Da=".popover-header",Na=".popover-body",La={...H.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},Ra={...H.DefaultType,content:"(null|string|element|function)"};class mt extends H{static get Default(){return La}static get DefaultType(){return Ra}static get NAME(){return za}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Da]:this._getTitle(),[Na]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=mt.getOrCreateInstance(this,e);if(typeof e!="string")return;if(typeof t[e]=="undefined")throw new TypeError(`No method named "${e}"`);t[e]()})}}u(mt);const Ha="scrollspy",Ia="bs.scrollspy",Ie=`.${Ia}`,Va=".data-api",$a=`activate${Ie}`,pn=`click${Ie}`,Ua=`load${Ie}${Va}`,Ka="dropdown-item",W="active",Ya='[data-bs-spy="scroll"]',Ge="[href]",Xa=".nav, .list-group",gn=".nav-link",Za=".nav-item",Ja=".list-group-item",er=`${gn}, ${Za} > ${gn}, ${Ja}`,tr=".dropdown",nr=".dropdown-toggle",sr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},or={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class xe extends h{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return sr}static get DefaultType(){return or}static get NAME(){return Ha}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=w(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(e=>Number.parseFloat(e))),e}_maybeEnableSmoothScroll(){if(!this._config.smoothScroll)return;e.off(this._config.target,pn),e.on(this._config.target,pn,Ge,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,s=t.offsetTop-this._element.offsetTop;if(n.scrollTo){n.scrollTo({top:s,behavior:"smooth"});return}n.scrollTop=s}})}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(e=>this._observerCallback(e),e)}_observerCallback(e){const n=e=>this._targetLinks.get(`#${e.target.id}`),s=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(n(e))},t=(this._rootElement||document.documentElement).scrollTop,o=t>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=t;for(const i of e){if(!i.isIntersecting){this._activeTarget=null,this._clearActiveClass(n(i));continue}const a=i.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&a){if(s(i),!t)return;continue}!o&&!a&&s(i)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=t.find(Ge,this._config.target);for(const n of e){if(!n.hash||y(n))continue;const s=t.findOne(decodeURI(n.hash),this._element);R(s)&&(this._targetLinks.set(decodeURI(n.hash),n),this._observableSections.set(n.hash,s))}}_process(t){if(this._activeTarget===t)return;this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(W),this._activateParents(t),e.trigger(this._element,$a,{relatedTarget:t})}_activateParents(e){if(e.classList.contains(Ka)){t.findOne(nr,e.closest(tr)).classList.add(W);return}for(const n of t.parents(e,Xa))for(const e of t.prev(n,er))e.classList.add(W)}_clearActiveClass(e){e.classList.remove(W);const n=t.find(`${Ge}.${W}`,e);for(const e of n)e.classList.remove(W)}static jQueryInterface(e){return this.each(function(){const t=xe.getOrCreateInstance(this,e);if(typeof e!="string")return;if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()})}}e.on(window,Ua,()=>{for(const e of t.find(Ya))xe.getOrCreateInstance(e)}),u(xe);const ar="tab",rr="bs.tab",M=`.${rr}`,lr=`hide${M}`,dr=`hidden${M}`,ur=`show${M}`,hr=`shown${M}`,mr=`click${M}`,fr=`keydown${M}`,pr=`load${M}`,gr="ArrowLeft",vn="ArrowRight",br="ArrowUp",yn="ArrowDown",ft="Home",wn="End",S="active",Mn="fade",Ye="show",Cr="dropdown",Wn=".dropdown-toggle",kr=".dropdown-menu",Ne=`:not(${Wn})`,Sr='.list-group, .nav, [role="tablist"]',Mr=".nav-item, .list-group-item",Fr=`.nav-link${Ne}, .list-group-item${Ne}, [role="tab"]${Ne}`,Gn='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Pe=`${Fr}, ${Gn}`,Dr=`.${S}[data-bs-toggle="tab"], .${S}[data-bs-toggle="pill"], .${S}[data-bs-toggle="list"]`;class B extends h{constructor(t){if(super(t),this._parent=this._element.closest(Sr),!this._parent)return;this._setInitialAttributes(this._parent,this._getChildren()),e.on(this._element,fr,e=>this._keydown(e))}static get NAME(){return ar}show(){const t=this._element;if(this._elemIsActive(t))return;const n=this._getActiveElem(),s=n?e.trigger(n,lr,{relatedTarget:t}):null,o=e.trigger(t,ur,{relatedTarget:n});if(o.defaultPrevented||s&&s.defaultPrevented)return;this._deactivate(n,t),this._activate(t,n)}_activate(n,s){if(!n)return;n.classList.add(S),this._activate(t.getElementFromSelector(n));const o=()=>{if(n.getAttribute("role")!=="tab"){n.classList.add(Ye);return}n.removeAttribute("tabindex"),n.setAttribute("aria-selected",!0),this._toggleDropDown(n,!0),e.trigger(n,hr,{relatedTarget:s})};this._queueCallback(o,n,n.classList.contains(Mn))}_deactivate(n,s){if(!n)return;n.classList.remove(S),n.blur(),this._deactivate(t.getElementFromSelector(n));const o=()=>{if(n.getAttribute("role")!=="tab"){n.classList.remove(Ye);return}n.setAttribute("aria-selected",!1),n.setAttribute("tabindex","-1"),this._toggleDropDown(n,!1),e.trigger(n,dr,{relatedTarget:s})};this._queueCallback(o,n,n.classList.contains(Mn))}_keydown(e){if(![gr,vn,br,yn,ft,wn].includes(e.key))return;e.stopPropagation(),e.preventDefault();const n=this._getChildren().filter(e=>!y(e));let t;if([ft,wn].includes(e.key))t=n[e.key===ft?0:n.length-1];else{const s=[vn,yn].includes(e.key);t=$e(n,e.target,s,!0)}t&&(t.focus({preventScroll:!0}),B.getOrCreateInstance(t).show())}_getChildren(){return t.find(Pe,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const n=t.getElementFromSelector(e);if(!n)return;this._setAttributeIfNotExists(n,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(n,"aria-labelledby",`${e.id}`)}_toggleDropDown(e,n){const s=this._getOuterElement(e);if(!s.classList.contains(Cr))return;const o=(e,o)=>{const i=t.findOne(e,s);i&&i.classList.toggle(o,n)};o(Wn,S),o(kr,Ye),s.setAttribute("aria-expanded",n)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(S)}_getInnerElement(e){return e.matches(Pe)?e:t.findOne(Pe,e)}_getOuterElement(e){return e.closest(Mr)||e}static jQueryInterface(e){return this.each(function(){const t=B.getOrCreateInstance(this);if(typeof e!="string")return;if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()})}}e.on(document,mr,Gn,function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),y(this))return;B.getOrCreateInstance(this).show()}),e.on(window,pr,()=>{for(const e of t.find(Dr))B.getOrCreateInstance(e)}),u(B);const Lr="toast",Rr="bs.toast",x=`.${Rr}`,Hr=`mouseover${x}`,Ir=`mouseout${x}`,Br=`focusin${x}`,Vr=`focusout${x}`,$r=`hide${x}`,Wr=`hidden${x}`,Ur=`show${x}`,Kr=`shown${x}`,qr="fade",os="hide",ve="show",he="showing",Qr={animation:"boolean",autohide:"boolean",delay:"number"},Zr={animation:!0,autohide:!0,delay:5e3};class ue extends h{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Zr}static get DefaultType(){return Qr}static get NAME(){return Lr}show(){const t=e.trigger(this._element,Ur);if(t.defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(qr);const n=()=>{this._element.classList.remove(he),e.trigger(this._element,Kr),this._maybeScheduleHide()};this._element.classList.remove(os),oe(this._element),this._element.classList.add(ve,he),this._queueCallback(n,this._element,this._config.animation)}hide(){if(!this.isShown())return;const t=e.trigger(this._element,$r);if(t.defaultPrevented)return;const n=()=>{this._element.classList.add(os),this._element.classList.remove(he,ve),e.trigger(this._element,Wr)};this._element.classList.add(he),this._queueCallback(n,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ve),super.dispose()}isShown(){return this._element.classList.contains(ve)}_maybeScheduleHide(){if(!this._config.autohide)return;if(this._hasMouseInteraction||this._hasKeyboardInteraction)return;this._timeout=setTimeout(()=>{this.hide()},this._config.delay)}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=t;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=t;break}}if(t){this._clearTimeout();return}const n=e.relatedTarget;if(this._element===n||this._element.contains(n))return;this._maybeScheduleHide()}_setListeners(){e.on(this._element,Hr,e=>this._onInteraction(e,!0)),e.on(this._element,Ir,e=>this._onInteraction(e,!1)),e.on(this._element,Br,e=>this._onInteraction(e,!0)),e.on(this._element,Vr,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=ue.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]=="undefined")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}_e(ue),u(ue);const ec={Alert:de,Button:fe,Carousel:ee,Collapse:te,Dropdown:m,Modal:$,Offcanvas:O,Popover:mt,ScrollSpy:xe,Tab:B,Toast:ue,Tooltip:H};return ec}) \ No newline at end of file diff --git a/js/paige/katex/katex.min.min.4fb156dd2c832315168ca2a1a38a39396ff1dfceb129b1db46ec6ac31c4f81e1.js b/js/paige/katex/katex.min.min.4fb156dd2c832315168ca2a1a38a39396ff1dfceb129b1db46ec6ac31c4f81e1.js new file mode 100644 index 0000000..8eb906c --- /dev/null +++ b/js/paige/katex/katex.min.min.4fb156dd2c832315168ca2a1a38a39396ff1dfceb129b1db46ec6ac31c4f81e1.js @@ -0,0 +1,261 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,function(){return function(){"use strict";Te={d:function(e,t){for(var n in t)Te.o(t,n)&&!Te.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},Ge={},Te.d(Ge,{default:function(){return oo}}),$t=function e(t,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var s,o,i,a,l,c="KaTeX parse error: "+t,r=n&&n.loc;return r&&r.start<=r.end&&(i=r.lexer.input,s=r.start,o=r.end,s===i.length?c+=" at end of input: ":c+=" at position "+(s+1)+": ",l=i.slice(s,o).replace(/[^]/g,"$&̲"),c+=(s>15?"…"+i.slice(s-15,s):i.slice(0,s))+l+(o+15":">","<":"<",'"':""","'":"'"},fs=/[&><"']/g,ds=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},g={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(fs,function(e){return ys[e]})},hyphenate:function(e){return e.replace(xs,"-$1").toLowerCase()},getBaseElem:ds,isCharacterBox:function(e){var t=ds(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"}},Ue={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:function(e){return"#"+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:function(e,t){return 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:function(e){return 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:function(e){return 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:function(e){return Math.max(0,e)},cli:"-e, --max-expand ",cliProcessor:function(e){return"Infinity"===e?1/0:parseInt(e)}},globalGroup:{type:"boolean",cli:!1}};function Us(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if("string"!=typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var at=function(){function t(e){for(t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},Ue)if(Ue.hasOwnProperty(t)){var t,n=Ue[t];this[t]=void 0!==e[t]?n.processor?n.processor(e[t]):e[t]:Us(n)}}var e=t.prototype;return e.reportNonstrict=function(e,t,n){var s=this.strict;if("function"==typeof s&&(s=s(e,t,n)),s&&"ignore"!==s){if(!0===s||"error"===s)throw new d("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===s?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+s+"': "+t+" ["+e+"]")}},e.useStrictBehavior=function(e,t,n){var s=this.strict;if("function"==typeof s)try{s=s(e,t,n)}catch{s="error"}return!!s&&"ignore"!==s&&(!0===s||"error"===s||("warn"===s?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+s+"': "+t+" ["+e+"]"),!1)))},e.isTrusted=function(e){e.url&&!e.protocol&&(e.protocol=g.protocolFromUrl(e.url));var t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)},t}(),ne=function(){function t(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}var e=t.prototype;return e.sup=function(){return I[_s[this.id]]},e.sub=function(){return I[ms[this.id]]},e.fracNum=function(){return I[ps[this.id]]},e.fracDen=function(){return I[ws[this.id]]},e.cramp=function(){return I[no[this.id]]},e.text=function(){return I[Zs[this.id]]},e.isTight=function(){return this.size>=2},t}(),I=[new ne(0,0,!1),new ne(1,0,!0),new ne(2,1,!1),new ne(3,1,!0),new ne(4,2,!1),new ne(5,2,!0),new ne(6,3,!1),new ne(7,3,!0)],_s=[4,5,4,5,6,7,6,7],ms=[5,5,5,5,7,7,7,7],ps=[2,3,4,5,6,7,6,7],ws=[3,3,5,5,7,7,7,7],no=[1,1,3,3,5,5,7,7],Zs=[0,1,2,3,2,3,2,3],f={DISPLAY:I[0],TEXT:I[2],SCRIPT:I[4],SCRIPTSCRIPT:I[6]},Pt=[{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]]}],pe=[];function Fn(e){for(var t=0;t=pe[t]&&e<=pe[t+1])return!0;return!1}Pt.forEach(function(e){return e.blocks.forEach(function(e){return pe.push.apply(pe,e)})});var ce=80,Dn={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`},le=function(){function t(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var e=t.prototype;return e.hasClass=function(e){return g.contains(this.classes,e)},e.toNode=function(){for(var t=document.createDocumentFragment(),e=0;e=5?0:e>=3?1:2]){var t,n,s=Nt[t]={cssEmPerMu:xe.quad[t]/18};for(n in xe)xe.hasOwnProperty(n)&&(s[n]=xe[n][t])}return Nt[t]}(this.size)),this._fontMetrics},e.getColor=function(){return this.phantom?"transparent":this.color},t}();fn.BASESIZE=6;var eo=fn,rt={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Ws={ex:!0,em:!0,mu:!0},Cn=function(e){return"string"!=typeof e&&(e=e.unit),e in rt||e in Ws||"ex"===e},w=function(e,t){var n,s;if(e.unit in rt)n=rt[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{if(s=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=s.fontMetrics().xHeight;else{if("em"!==e.unit)throw new d("Invalid unit: '"+e.unit+"'");n=s.fontMetrics().quad}s!==t&&(n*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},u=function(e){return+e.toFixed(4)+"em"},ee=function(e){return e.filter(function(e){return e}).join(" ")},Kn=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var s=t.getColor();s&&(this.style.color=s)}},Jn=function(e){var n,s,o,t=document.createElement(e);for(s in t.className=ee(this.classes),this.style)this.style.hasOwnProperty(s)&&(t.style[s]=this.style[s]);for(o in this.attributes)this.attributes.hasOwnProperty(o)&&t.setAttribute(o,this.attributes[o]);for(n=0;n"},fe=function(){function t(e,t,n,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Kn.call(this,e,n,s),this.children=t||[]}var e=t.prototype;return e.setAttribute=function(e,t){this.attributes[e]=t},e.hasClass=function(e){return g.contains(this.classes,e)},e.toNode=function(){return Jn.call(this,"span")},e.toMarkup=function(){return os.call(this,"span")},t}(),_t=function(){function t(e,t,n,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Kn.call(this,t,s),this.children=n||[],this.setAttribute("href",e)}var e=t.prototype;return e.setAttribute=function(e,t){this.attributes[e]=t},e.hasClass=function(e){return g.contains(this.classes,e)},e.toNode=function(){return Jn.call(this,"a")},e.toMarkup=function(){return os.call(this,"a")},t}(),vs=function(){function t(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}var e=t.prototype;return e.hasClass=function(e){return g.contains(this.classes,e)},e.toNode=function(){var t,e=document.createElement("img");for(t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e},e.toMarkup=function(){var t,n=""+this.alt+"=o[0]&&e<=o[1])return n.name;return null}(this.text.charCodeAt(0));c&&this.classes.push(c+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=js[this.text])}var e=t.prototype;return e.hasClass=function(e){return g.contains(this.classes,e)},e.toNode=function(){var t,n=document.createTextNode(this.text),e=null;for(t in this.italic>0&&((e=document.createElement("span")).style.marginRight=u(this.italic)),this.classes.length>0&&((e=e||document.createElement("span")).className=ee(this.classes)),this.style)this.style.hasOwnProperty(t)&&((e=e||document.createElement("span")).style[t]=this.style[t]);return e?(e.appendChild(n),e):n},e.toMarkup=function(){var t,s,o,n=!1,e="0&&(t+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(s)&&(t+=g.hyphenate(s)+":"+this.style[s]+";");return t&&(n=!0,e+=' style="'+g.escape(t)+'"'),o=g.escape(this.text),n?(e+=">",e+=o,e+=""):o},t}(),U=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e,n,t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);for(e=0;e":""},e}(),Tt=function(){function e(e){this.attributes=void 0,this.attributes=e||{}}var t=e.prototype;return t.toNode=function(){var e,t=document.createElementNS("http://www.w3.org/2000/svg","line");for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);return t},t.toMarkup=function(){var e,t="","\\gt",!0),e(t,n,i,"∈","\\in",!0),e(t,n,i,"","\\@not"),e(t,n,i,"⊂","\\subset",!0),e(t,n,i,"⊃","\\supset",!0),e(t,n,i,"⊆","\\subseteq",!0),e(t,n,i,"⊇","\\supseteq",!0),e(t,o,i,"⊈",`\\nsubseteq`,!0),e(t,o,i,"⊉",`\\nsupseteq`,!0),e(t,n,i,"⊨","\\models"),e(t,n,i,"←","\\leftarrow",!0),e(t,n,i,"≤","\\le"),e(t,n,i,"≤","\\leq",!0),e(t,n,i,"<","\\lt",!0),e(t,n,i,"→",`\\rightarrow`,!0),e(t,n,i,"→","\\to"),e(t,o,i,"≱",`\\ngeq`,!0),e(t,o,i,"≰",`\\nleq`,!0),e(t,n,K,"\xa0","\\ "),e(t,n,K,"\xa0","\\space"),e(t,n,K,"\xa0",`\\nobreakspace`),e(c,n,K,"\xa0","\\ "),e(c,n,K,"\xa0"," "),e(c,n,K,"\xa0","\\space"),e(c,n,K,"\xa0",`\\nobreakspace`),e(t,n,K,null,`\\nobreak`),e(t,n,K,null,"\\allowbreak"),e(t,n,Me,",",","),e(t,n,Me,";",";"),e(t,o,m,"⊼","\\barwedge",!0),e(t,o,m,"⊻","\\veebar",!0),e(t,n,m,"⊙","\\odot",!0),e(t,n,m,"⊕","\\oplus",!0),e(t,n,m,"⊗","\\otimes",!0),e(t,n,a,"∂","\\partial",!0),e(t,n,m,"⊘","\\oslash",!0),e(t,o,m,"⊚","\\circledcirc",!0),e(t,o,m,"⊡","\\boxdot",!0),e(t,n,m,"△","\\bigtriangleup"),e(t,n,m,"▽","\\bigtriangledown"),e(t,n,m,"†","\\dagger"),e(t,n,m,"⋄","\\diamond"),e(t,n,m,"⋆","\\star"),e(t,n,m,"◃","\\triangleleft"),e(t,n,m,"▹","\\triangleright"),e(t,n,z,"{","\\{"),e(c,n,a,"{","\\{"),e(c,n,a,"{","\\textbraceleft"),e(t,n,M,"}","\\}"),e(c,n,a,"}","\\}"),e(c,n,a,"}","\\textbraceright"),e(t,n,z,"{","\\lbrace"),e(t,n,M,"}",`\\rbrace`),e(t,n,z,"[","\\lbrack",!0),e(c,n,a,"[","\\lbrack",!0),e(t,n,M,"]",`\\rbrack`,!0),e(c,n,a,"]",`\\rbrack`,!0),e(t,n,z,"(","\\lparen",!0),e(t,n,M,")",`\\rparen`,!0),e(c,n,a,"<","\\textless",!0),e(c,n,a,">","\\textgreater",!0),e(t,n,z,"⌊","\\lfloor",!0),e(t,n,M,"⌋",`\\rfloor`,!0),e(t,n,z,"⌈","\\lceil",!0),e(t,n,M,"⌉",`\\rceil`,!0),e(t,n,a,"\\","\\backslash"),e(t,n,a,"∣","|"),e(t,n,a,"∣","\\vert"),e(c,n,a,"|","\\textbar",!0),e(t,n,a,"∥","\\|"),e(t,n,a,"∥","\\Vert"),e(c,n,a,"∥","\\textbardbl"),e(c,n,a,"~","\\textasciitilde"),e(c,n,a,"\\","\\textbackslash"),e(c,n,a,"^","\\textasciicircum"),e(t,n,i,"↑","\\uparrow",!0),e(t,n,i,"⇑","\\Uparrow",!0),e(t,n,i,"↓","\\downarrow",!0),e(t,n,i,"⇓","\\Downarrow",!0),e(t,n,i,"↕","\\updownarrow",!0),e(t,n,i,"⇕","\\Updownarrow",!0),e(t,n,k,"∐","\\coprod"),e(t,n,k,"⋁","\\bigvee"),e(t,n,k,"⋀","\\bigwedge"),e(t,n,k,"⨄","\\biguplus"),e(t,n,k,"⋂","\\bigcap"),e(t,n,k,"⋃","\\bigcup"),e(t,n,k,"∫","\\int"),e(t,n,k,"∫","\\intop"),e(t,n,k,"∬","\\iint"),e(t,n,k,"∭","\\iiint"),e(t,n,k,"∏","\\prod"),e(t,n,k,"∑","\\sum"),e(t,n,k,"⨂","\\bigotimes"),e(t,n,k,"⨁","\\bigoplus"),e(t,n,k,"⨀","\\bigodot"),e(t,n,k,"∮","\\oint"),e(t,n,k,"∯","\\oiint"),e(t,n,k,"∰","\\oiiint"),e(t,n,k,"⨆","\\bigsqcup"),e(t,n,k,"∫","\\smallint"),e(c,n,re,"…","\\textellipsis"),e(t,n,re,"…","\\mathellipsis"),e(c,n,re,"…","\\ldots",!0),e(t,n,re,"…","\\ldots",!0),e(t,n,re,"⋯","\\@cdots",!0),e(t,n,re,"⋱","\\ddots",!0),e(t,n,a,"⋮","\\varvdots"),e(t,n,_,"ˊ","\\acute"),e(t,n,_,"ˋ","\\grave"),e(t,n,_,"\xa8","\\ddot"),e(t,n,_,"~","\\tilde"),e(t,n,_,"ˉ","\\bar"),e(t,n,_,"˘","\\breve"),e(t,n,_,"ˇ","\\check"),e(t,n,_,"^","\\hat"),e(t,n,_,"⃗","\\vec"),e(t,n,_,"˙","\\dot"),e(t,n,_,"˚","\\mathring"),e(t,n,p,"","\\@imath"),e(t,n,p,"","\\@jmath"),e(t,n,a,"ı","ı"),e(t,n,a,"ȷ","ȷ"),e(c,n,a,"ı","\\i",!0),e(c,n,a,"ȷ","\\j",!0),e(c,n,a,"\xdf","\\ss",!0),e(c,n,a,"\xe6","\\ae",!0),e(c,n,a,"œ","\\oe",!0),e(c,n,a,"\xf8","\\o",!0),e(c,n,a,"\xc6","\\AE",!0),e(c,n,a,"Œ","\\OE",!0),e(c,n,a,"\xd8","\\O",!0),e(c,n,_,"ˊ","\\'"),e(c,n,_,"ˋ","\\`"),e(c,n,_,"ˆ","\\^"),e(c,n,_,"˜","\\~"),e(c,n,_,"ˉ","\\="),e(c,n,_,"˘","\\u"),e(c,n,_,"˙","\\."),e(c,n,_,"\xb8","\\c"),e(c,n,_,"˚",`\\r`),e(c,n,_,"ˇ","\\v"),e(c,n,_,"\xa8",'\\"'),e(c,n,_,"˝","\\H"),e(c,n,_,"◯","\\textcircled"),Jt={"--":!0,"---":!0,"``":!0,"''":!0},e(c,n,a,"–","--",!0),e(c,n,a,"–","\\textendash"),e(c,n,a,"—","---",!0),e(c,n,a,"—","\\textemdash"),e(c,n,a,"‘","`",!0),e(c,n,a,"‘","\\textquoteleft"),e(c,n,a,"’","'",!0),e(c,n,a,"’","\\textquoteright"),e(c,n,a,"“","``",!0),e(c,n,a,"“","\\textquotedblleft"),e(c,n,a,"”","''",!0),e(c,n,a,"”","\\textquotedblright"),e(t,n,a,"\xb0","\\degree",!0),e(c,n,a,"\xb0","\\degree"),e(c,n,a,"\xb0","\\textdegree",!0),e(t,n,a,"\xa3","\\pounds"),e(t,n,a,"\xa3","\\mathsterling",!0),e(c,n,a,"\xa3","\\pounds"),e(c,n,a,"\xa3","\\textsterling",!0),e(t,o,a,"✠","\\maltese"),e(c,o,a,"✠","\\maltese");for(Gt='0123456789/@."',Ee=0;Een&&(n=t.height),t.depth>s&&(s=t.depth),t.maxFontSize>o&&(o=t.maxFontSize);e.height=n,e.depth=s,e.maxFontSize=o},F=function(e,t,n,s){var o=new fe(e,t,n,s);return yt(o),o},xn=function(e,t,n,s){return new fe(e,t,n,s)},wn=function(e){var t=new le(e);return yt(t),t},Ye=function(e,t,n){var s="";switch(e){case"amsrm":s="AMS";break;case"textrm":s="Main";break;case"textsf":s="SansSerif";break;case"texttt":s="Typewriter";break;default:s=e}return s+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},vn={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"},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"}},gn={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},r={fontMap:vn,makeSymbol:P,mathsym:function(e,t,n,s){return void 0===s&&(s=[]),"boldsymbol"===n.font&&Be(e,"Main-Bold",t).metrics?P(e,"Main-Bold",t,n,s.concat(["mathbf"])):"\\"===e||"main"===O[t][e].font?P(e,"Main-Regular",t,n,s):P(e,"AMS-Regular",t,n,s.concat(["amsrm"]))},makeSpan:F,makeSvgSpan:xn,makeLineSpan:function(e,t,n){var s=F([e],[],t);return s.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=u(s.height),s.maxFontSize=1,s},makeAnchor:function(e,t,n,s){var o=new _t(e,t,n,s);return yt(o),o},makeFragment:wn,wrapFragment:function(e,t){return e instanceof le?F([],[e],t):e},makeVList:function(e){for(var n,o,c,l,f,g,v,j,O,x,w=function(e){if("individualShift"===e.positionType){for(var s,o,i,a,c,l,h,t=e.children,r=[t[0]],d=-t[0].shift-t[0].elem.depth,u=d,n=1;n0&&(i.push($e(o,t)),o=[]),i.push(n[s]));return o.length>0&&i.push($e(o,t)),r?((c=$e(A(r,t,!0))).classes=["tag"],i.push(c)):l&&i.push(l),a=G(["katex-html"],i),(a.setAttribute("aria-hidden","true"),c)&&(h=c.children[0],h.style.height=u(a.height+a.depth),a.depth&&(h.style.verticalAlign=u(-a.depth))),a}function cs(e){return new le(e)}var L=function(){function t(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}var e=t.prototype;return e.setAttribute=function(e,t){this.attributes[e]=t},e.getAttribute=function(e){return this.attributes[e]},e.toNode=function(){var t,n,e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&e.setAttribute(n,this.attributes[n]);this.classes.length>0&&(e.className=ee(this.classes));for(t=0;t0&&(e+=' class ="'+g.escape(ee(this.classes))+'"'),e+=">";for(t=0;t"},e.toText=function(){return this.children.map(function(e){return e.toText()}).join("")},t}(),ue=function(){function t(e){this.text=void 0,this.text=e}var e=t.prototype;return e.toNode=function(){return document.createTextNode(this.text)},e.toMarkup=function(){return g.escape(this.toText())},e.toText=function(){return this.text},t}(),l={MathNode:L,TextNode:ue,SpaceNode:function(){function t(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?"  ":e>=-.05556&&e<=-.05555?" ⁣":e>=-.1667&&e<=-.1666?" ⁣":e>=-.2223&&e<=-.2222?" ⁣":e>=-.2778&&e<=-.2777?" ⁣":null}var e=t.prototype;return e.toNode=function(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",u(this.width)),e},e.toMarkup=function(){return this.character?""+this.character+"":''},e.toText=function(){return this.character?this.character:" "},t}(),newDocumentFragment:cs},D=function(e,t,n){return!O[t][e]||!O[t][e].replace||55349===e.charCodeAt(0)||Jt.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=O[t][e].replace),new l.TextNode(e)},St=function(e){return 1===e.length?e[0]:new l.MathNode("mrow",e)},Mt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var s,o,n=t.font;return!n||"mathnormal"===n?null:(o=e.mode,"mathit"===n?"italic":"boldsymbol"===n?"textord"===e.type?"bold":"bold-italic":"mathbf"===n?"bold":"mathbb"===n?"double-struck":"mathfrak"===n?"fraktur":"mathscr"===n||"mathcal"===n?"script":"mathsf"===n?"sans-serif":"mathtt"===n?"monospace":(s=e.text,g.contains(["\\imath","\\jmath"],s)?null:(O[o][s]&&O[o][s].replace&&(s=O[o][s].replace),Rt(s,r.fontMap[n].fontName,o)?r.fontMap[n].variant:null)))},T=function(e,t,n){if(1===e.length)return i=y(e[0],t),n&&i instanceof L&&"mo"===i.type&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i];for(var s,o,i,a,l,d,u,h,m,r=[],c=0;c0&&(a.text=a.text.slice(0,1)+"̸"+a.text.slice(1),r.pop())))}r.push(s),o=s}return r},te=function(e,t,n){return St(T(e,t,n))},y=function(e,t){if(!e)return new l.MathNode("mrow");if(Xe[e.type])return Xe[e.type](e,t);throw new d("Got group of unknown type: '"+e.type+"'")};function In(e,t,n,s,o){i=T(e,n),d=1===i.length&&i[0]instanceof L&&g.contains(["mrow","mtable"],i[0].type)?i[0]:new l.MathNode("mrow",i),a=new l.MathNode("annotation",[new l.TextNode(t)]),a.setAttribute("encoding","application/x-tex");var i,a,d,u,h=new l.MathNode("semantics",[d,a]),c=new l.MathNode("math",[h]);return c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),s&&c.setAttribute("display","block"),u=o?"katex":"katex-mathml",r.makeSpan([u],[c])}var Hn=function(e){return new eo({style:e.displayMode?f.DISPLAY:f.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Pn=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=r.makeSpan(n,[e])}return e},Ms=function(e,t,n){if(s=Hn(n),"mathml"===n.output)return In(e,t,s,n.displayMode,!0);if("html"===n.output)i=Ot(e,s),o=r.makeSpan(["katex"],[i]);else{var s,o,i,a=In(e,t,s,n.displayMode,!1),c=Ot(e,s);o=r.makeSpan(["katex"],[a,c])}return Pn(o,n)},Ns={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":"="},qs={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]},Gs=function(e,t,n,s,o){var i,a,l,d,c=e.height+e.depth+n+s;return/fbox|color|angl/.test(t)?(i=r.makeSpan(["stretchy",t],[],o),"fbox"===t)&&(l=o.color&&o.getColor(),l&&(i.style.borderColor=l)):(a=[],/^[bx]cancel$/.test(t)&&a.push(new Tt({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&a.push(new Tt({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),d=new U(a,{width:"100%",height:u(c)}),i=r.makeSvgSpan([],[d],o)),i.height=c,i.style.height=u(c),i},ke=function(e){var t=new l.MathNode("mo",[new l.TextNode(Ns[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Ce=function(e,t){var s=function(){if(o=4e5,n=e.label.slice(1),g.contains(["widehat","widecheck","widetilde","utilde"],n))return v="ordgroup"===(O=e.base).type?O.body.length:1,v>5?"widehat"===n||"widecheck"===n?(l=420,o=2364,i=.42,d=n+"4"):(l=312,o=2340,i=.34,d="tilde4"):(s=[1,1,2,2,3,3][v],"widehat"===n||"widecheck"===n?(o=[0,1062,2364,2364,2364][s],l=[0,239,300,360,420][s],i=[0,.24,.3,.3,.36,.42][s],d=n+s):(o=[0,600,1033,2339,2340][s],l=[0,260,286,306,312][s],i=[0,.26,.286,.3,.306,.34][s],d="tilde"+s)),C=new Z(d),x=new U([C],{width:"100%",height:u(i),viewBox:"0 0 "+o+" "+l,preserveAspectRatio:"none"}),{span:r.makeSvgSpan([],[x],t),minWidth:0,height:i};var n,s,o,i,a,l,d,m,f,v,O,x,C,j=[],h=qs[n],y=h[0],_=h[1],w=h[2],p=w/1e3,c=y.length;if(1===c)m=["hide-tail"],f=[h[3]];else if(2===c)m=["halfarrow-left","halfarrow-right"],f=["xMinYMin","xMaxYMin"];else{if(3!==c)throw new Error(`Correct katexImagesData or update code here to support + `+c+" children.");m=["brace-left","brace-center","brace-right"],f=["xMinYMin","xMidYMin","xMaxYMin"]}for(a=0;a0&&(n.style.minWidth=u(o)),n};function v(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 tt(e){var t=Pe(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 Pe(e){return e&&("atom"===e.type||ks.hasOwnProperty(e.type))?e:null}var Kt=function(e,t){e&&"supsub"===e.type?(a=(n=v(e.base,"accent")).base,e.base=a,o=function(e){if(e instanceof fe)return e;throw new Error("Expected span but got "+String(e)+".")}(b(e,t)),e.base=n):a=(n=v(e,"accent")).base;var n,s,o,a,c,d,h,m,f,p,j,y,i=b(a,t.havingCrampedStyle()),l=0;return n.isShifty&&g.isCharacterBox(a)&&(y=g.getBaseElem(a),l=Un(b(y,t.havingCrampedStyle())).skew),m="\\c"===n.label,d=m?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight),n.isStretchy?(s=Ce(n,t),s=r.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:s,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+u(2*l)+")",marginLeft:u(2*l)}:void 0}]},t)):("\\vec"===n.label?(c=r.staticSvg("vec",t),f=r.svgData.vec[1]):((c=Un(c=r.makeOrd({mode:n.mode,text:n.label},t,"textord"))).italic=0,f=c.width,m&&(d+=c.depth)),s=r.makeSpan(["accent-body"],[c]),p="\\textcircled"===n.label,p&&(s.classes.push("accent-full"),d=i.height),j=l,p||(j-=f/2),s.style.left=u(j),"\\textcircled"===n.label&&(s.style.top=".2em"),s=r.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-d},{type:"elem",elem:s}]},t)),h=r.makeSpan(["mord","accent"],[s],t),o?(o.children[0]=h,o.height=Math.max(h.height,o.height),o.classes[0]="mord",o):h},mn=function(e,t){var s=e.isStretchy?ke(e.label):new l.MathNode("mo",[D(e.label,e.mode)]),n=new l.MathNode("mover",[y(e.base,t),s]);return n.setAttribute("accent","true"),n},hs=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(e){return"\\"+e}).join("|"));h({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:function(e,t){var s=qe(t[0]),n=!hs.test(e.funcName),o=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:o,base:s}},htmlBuilder:Kt,mathmlBuilder:mn}),h({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c",`\\r`,"\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:function(e,t){var s=t[0],n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:s}},htmlBuilder:Kt,mathmlBuilder:mn}),h({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(e,t){var n=e.parser,s=e.funcName,o=t[0];return{type:"accentUnder",mode:n.mode,label:s,base:o}},htmlBuilder:function(e,t){var n=b(e.base,t),s=Ce(e,t),o="\\utilde"===e.label?.12:0,i=r.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:s,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:n}]},t);return r.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:function(e,t){var s=ke(e.label),n=new l.MathNode("munder",[y(e.base,t),s]);return n.setAttribute("accentunder","true"),n}}),we=function(e){var t=new l.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t},h({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:function(e,t,n){var s=e.parser,o=e.funcName;return{type:"xArrow",mode:s.mode,label:o,body:t[0],below:n[0]}},htmlBuilder:function(e,t){var o,h,l=t.style,a=t.havingStyle(l.sup()),n=r.wrapFragment(b(e.body,a,t),t),d="\\x"===e.label.slice(0,2)?"x":"cd";n.classes.push(d+"-arrow-pad"),e.below&&(a=t.havingStyle(l.sub()),(o=r.wrapFragment(b(e.below,a,t),t)).classes.push(d+"-arrow-pad"));var i,s=Ce(e,t),u=-t.fontMetrics().axisHeight+.5*s.height,c=-t.fontMetrics().axisHeight-.5*s.height-.111;return(n.depth>.25||"\\xleftequilibrium"===e.label)&&(c-=n.depth),o?(h=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111,i=r.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:c},{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:h}]},t)):i=r.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:c},{type:"elem",elem:s,shift:u}]},t),i.children[0].children[0].children[1].classes.push("svg-align"),r.makeSpan(["mrel","x-arrow"],[i],t)},mathmlBuilder:function(e,t){var n,o,i,a,s=ke(e.label);return s.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body?(o=we(y(e.body,t)),e.below?(i=we(y(e.below,t)),n=new l.MathNode("munderover",[s,i,o])):n=new l.MathNode("mover",[s,o])):e.below?(a=we(y(e.below,t)),n=new l.MathNode("munder",[s,a])):(n=we(),n=new l.MathNode("mover",[s,n])),n}}),an=r.makeSpan;function on(e,t){var n=A(e.body,t,!0);return an([e.mclass],n,t)}function sn(e,t){var n,s=T(e.body,t);return"minner"===e.mclass?n=new l.MathNode("mpadded",s):"mord"===e.mclass?e.isCharacterBox?(n=s[0]).type="mi":n=new l.MathNode("mi",s):(e.isCharacterBox?(n=s[0]).type="mo":n=new l.MathNode("mo",s),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}h({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler:function(e,t){var s=e.parser,o=e.funcName,n=t[0];return{type:"mclass",mode:s.mode,mclass:"m"+o.slice(5),body:E(n),isCharacterBox:g.isCharacterBox(n)}},htmlBuilder:on,mathmlBuilder:sn}),_e=function(e){var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family},h({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(e,t){return{type:"mclass",mode:e.parser.mode,mclass:_e(t[0]),body:E(t[1]),isCharacterBox:g.isCharacterBox(t[1])}}}),h({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(e,t){var r=e.parser,n=e.funcName,s=t[1],o=t[0],a="\\stackrel"!==n?_e(s):"mrel",c={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:E(s)},i={type:"supsub",mode:o.mode,base:c,sup:"\\underset"===n?null:o,sub:"\\underset"===n?o:null};return{type:"mclass",mode:r.mode,mclass:a,body:[i],isCharacterBox:g.isCharacterBox(i)}},htmlBuilder:on,mathmlBuilder:sn}),h({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"pmb",mode:e.parser.mode,mclass:_e(t[0]),body:E(t[0])}},htmlBuilder:function(e,t){var s=A(e.body,t,!0),n=r.makeSpan([e.mclass],s,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder:function(e,t){var s=T(e.body,t),n=new l.MathNode("mstyle",s);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}}),zn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},nt=function(e){return"textord"===e.type&&"@"===e.text};function so(e,t,n){switch(s=zn[e],s){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(s,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var s,o={type:"atom",text:s,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),n.callFunction("\\Big",[o],[]),n.callFunction("\\\\cdright",[t[1]],[])]};return n.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}h({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:function(e,t){var n=e.parser,s=e.funcName;return{type:"cdlabel",mode:n.mode,side:s.slice(4),label:t[0]}},htmlBuilder:function(e,t){var s=t.havingStyle(t.style.sup()),n=r.wrapFragment(b(e.label,s,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=u(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder:function(e,t){var n=new l.MathNode("mrow",[y(e.label,t)]);return(n=new l.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new l.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),h({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:function(e,t){return{type:"cdlabelparent",mode:e.parser.mode,fragment:t[0]}},htmlBuilder:function(e,t){var n=r.wrapFragment(b(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:function(e,t){return new l.MathNode("mrow",[y(e.fragment,t)])}}),h({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){for(var n,i,r=e.parser,a=v(t[0],"ordgroup").body,s="",o=0;o=1114111)throw new d("\\@char with invalid code point "+s);return n<=65535?i=String.fromCharCode(n):(n-=65536,i=String.fromCharCode(55296+(n>>10),56320+(1023&n))),{type:"textord",mode:r.mode,text:i}}}),Zt=function(e,t){var n=A(e.body,t.withColor(e.color),!1);return r.makeFragment(n)},Qt=function(e,t){var s=T(e.body,t.withColor(e.color)),n=new l.MathNode("mstyle",s);return n.setAttribute("mathcolor",e.color),n},h({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler:function(e,t){var n=e.parser,s=v(t[0],"color-token").color,o=t[1];return{type:"color",mode:n.mode,color:s,body:E(o)}},htmlBuilder:Zt,mathmlBuilder:Qt}),h({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler:function(e,t){var o,n=e.parser,i=e.breakOnTokenText,s=v(t[0],"color-token").color;return n.gullet.macros.set("\\current@color",s),o=n.parseExpression(!0,i),{type:"color",mode:n.mode,color:s,body:o}},htmlBuilder:Zt,mathmlBuilder:Qt}),h({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler:function(e){var s=e.parser,o="["===s.gullet.future().text?s.parseSizeGroup(!0):null,i=!s.settings.displayMode||!s.settings.useStrictBehavior("newLineInDisplayMode",`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:"cr",mode:s.mode,newLine:i,size:o&&v(o,"size").value}},htmlBuilder:function(e,t){var n=r.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=u(w(e.size,t)))),n},mathmlBuilder:function(e,t){var n=new l.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",u(w(e.size,t)))),n}});var Xt={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},rn=function(e){var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new d("Expected a control sequence",e);return t},cn=function(e,t,n,s){var o=e.gullet.macros.get(n.text);o==null&&(n.noexpand=!0,o={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,o,s)};h({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler:function(e){var t,n=e.parser,s=e.funcName;if(n.consumeSpaces(),t=n.fetch(),Xt[t.text])return"\\global"!==s&&"\\\\globallong"!==s||(t.text=Xt[t.text]),v(n.parseFunction(),"internal");throw new d("Invalid token after macro prefix",t)}}),h({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var s,o,i,r,t=e.parser,a=e.funcName,n=t.gullet.popToken(),c=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(c))throw new d("Expected a control sequence",n);for(s=0,o=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){r=t.gullet.future(),o[s].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new d('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new d('Argument number "'+n.text+'" out of order');s++,o.push([])}else{if("EOF"===n.text)throw new d("Expected a macro definition");o[s].push(n.text)}return i=t.gullet.consumeArg().tokens,r&&i.unshift(r),"\\edef"!==a&&"\\xdef"!==a||(i=t.gullet.expandTokens(i)).reverse(),t.gullet.macros.set(c,{tokens:i,numArgs:s,delimiters:o},a===Xt[a]),{type:"internal",mode:t.mode}}}),h({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var n,t=e.parser,s=e.funcName,o=rn(t.gullet.popToken());return t.gullet.consumeSpaces(),n=function(e){var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t}(t),cn(t,o,n,"\\\\globallet"===s),{type:"internal",mode:t.mode}}}),h({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,s=e.funcName,o=rn(t.gullet.popToken()),i=t.gullet.popToken(),n=t.gullet.popToken();return cn(t,o,n,"\\\\globalfuture"===s),t.gullet.pushToken(n),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var Te,Ge,$t,Jt,Gt,Ee,Ut,Vt,Oe,Bt,be,Se,ve,j,C,S,Y,Q,Le,Re,he,we,an,_e,zn,nt,Zt,Qt,Ie,We,Lt,Dt,R,q,je,At,Ct,xt,wt,Je,bt,Qn,vt,gt,pt,qn,ft,Fe,Ne,mt,ut,Ve,dt,Ke,lt,ct,et,ot,ye=function(e,t,n){var s=Rt(O.math[e]&&O.math[e].replace||e,t,n);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return s},Yt=function(e,t,n,s){var i=n.havingBaseStyle(t),o=r.makeSpan(s.concat(i.sizingClasses(n)),[e],n),a=i.sizeMultiplier/n.sizeMultiplier;return o.height*=a,o.depth*=a,o.maxFontSize=i.sizeMultiplier,o},un=function(e,t,n){var o=t.havingBaseStyle(n),s=(1-t.sizeMultiplier/o.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=u(s),e.height-=s,e.depth+=s},hn=function(e,t,n,s,o,i){var c=function(e,t,n,s){return r.makeSymbol(e,"Size"+t+"-Regular",n,s)}(e,t,o,s),a=Yt(r.makeSpan(["delimsizing","size"+t],[c],s),f.TEXT,s,i);return n&&un(a,s,f.TEXT),a},qt=function(e,t,n){var s;return s="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:r.makeSpan(["delimsizinginner",s],[r.makeSpan([],[r.makeSymbol(e,t,n)])])}},Wt=function(e,t,n){var s=H["Size4-Regular"][e.charCodeAt(0)]?H["Size4-Regular"][e.charCodeAt(0)][4]:H["Size1-Regular"][e.charCodeAt(0)][4],i=new Z("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),a=new U([i],{width:u(s),height:u(t),style:"width:"+u(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=r.makeSvgSpan([],[a],n);return o.height=t,o.style.height=u(t),o.style.width=u(s),{type:"elem",elem:o}},Ae={type:"kern",size:-.008},Qs=["|","\\lvert",`\\rvert`,"\\vert"],Xs=["\\|","\\lVert",`\\rVert`,"\\Vert"],bn=function(e,t,n,s,o,i){u="",h=0,l=a=d=e,p=null,c="Size1-Regular","\\uparrow"===e?a=d="⏐":"\\Uparrow"===e?a=d="‖":"\\downarrow"===e?l=a="⏐":"\\Downarrow"===e?l=a="‖":"\\updownarrow"===e?(l="\\uparrow",a="⏐",d="\\downarrow"):"\\Updownarrow"===e?(l="\\Uparrow",a="‖",d="\\Downarrow"):g.contains(Qs,e)?(a="∣",u="vert",h=333):g.contains(Xs,e)?(a="∥",u="doublevert",h=556):"["===e||"\\lbrack"===e?(l="⎡",a="⎢",d="⎣",c="Size4-Regular",u="lbrack",h=667):"]"===e||`\\rbrack`===e?(l="⎤",a="⎥",d="⎦",c="Size4-Regular",u="rbrack",h=667):"\\lfloor"===e||"⌊"===e?(a=l="⎢",d="⎣",c="Size4-Regular",u="lfloor",h=667):"\\lceil"===e||"⌈"===e?(l="⎡",a=d="⎢",c="Size4-Regular",u="lceil",h=667):`\\rfloor`===e||"⌋"===e?(a=l="⎥",d="⎦",c="Size4-Regular",u="rfloor",h=667):`\\rceil`===e||"⌉"===e?(l="⎤",a=d="⎥",c="Size4-Regular",u="rceil",h=667):"("===e||"\\lparen"===e?(l="⎛",a="⎜",d="⎝",c="Size4-Regular",u="lparen",h=875):")"===e||`\\rparen`===e?(l="⎞",a="⎟",d="⎠",c="Size4-Regular",u="rparen",h=875):"\\{"===e||"\\lbrace"===e?(l="⎧",p="⎨",d="⎩",a="⎪",c="Size4-Regular"):"\\}"===e||`\\rbrace`===e?(l="⎫",p="⎬",d="⎭",a="⎪",c="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(l="⎧",d="⎩",a="⎪",c="Size4-Regular"):`\\rgroup`===e||"⟯"===e?(l="⎫",d="⎭",a="⎪",c="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(l="⎧",d="⎭",a="⎪",c="Size4-Regular"):`\\rmoustache`!==e&&"⎱"!==e||(l="⎫",d="⎩",a="⎪",c="Size4-Regular");var a,c,l,d,u,h,m,p,x,C,E,M,D,L,T=ye(l,c,o),b=T.height+T.depth,z=ye(a,c,o),R=z.height+z.depth,F=ye(d,c,o),y=F.height+F.depth,w=0,O=1;null!==p&&(x=ye(p,c,o),w=x.height+x.depth,O=2);var k=b+y+w,v=k+Math.max(0,Math.ceil((t-k)/(O*R)))*O*R,S=s.fontMetrics().axisHeight;if(n&&(S*=s.sizeMultiplier),D=v/2-S,m=[],u.length>0){var B=v-b-y,_=Math.round(1e3*v),I=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}}(u,Math.round(1e3*B)),H=new Z(u,I),A=(h/1e3).toFixed(3)+"em",N=(_/1e3).toFixed(3)+"em",P=new U([H],{width:A,height:N,viewBox:"0 0 "+h+" "+_}),j=r.makeSvgSpan([],[P],s);j.height=_/1e3,j.style.width=A,j.style.height=N,m.push({type:"elem",elem:j})}else m.push(qt(d,c,o)),m.push(Ae),null===p?(L=v-b-y+.016,m.push(Wt(a,L,s))):(C=(v-b-y-w)/2+.016,m.push(Wt(a,C,s)),m.push(Ae),m.push(qt(p,c,o)),m.push(Ae),m.push(Wt(a,C,s))),m.push(Ae),m.push(qt(l,c,o));return E=s.havingBaseStyle(f.TEXT),M=r.makeVList({positionType:"bottom",positionData:D,children:m},E),Yt(r.makeSpan(["delimsizing","mult"],[M],E),f.TEXT,s,i)},It=.08,Ht=function(e,t,n,s,o){var i=function(e,t,n){t*=1e3;var s="";switch(e){case"sqrtMain":s=function(e,t){return"M95,"+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+" -"+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`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+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,ce);break;case"sqrtSize1":s=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+" -"+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`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+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,ce);break;case"sqrtSize2":s=function(e,t){return"M983 "+(10+e+t)+` +l`+e/3.13+" -"+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +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+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,ce);break;case"sqrtSize3":s=function(e,t){return"M424,"+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`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+e)+" "+t+` +h400000v`+(40+e)+"h-400000z"}(t,ce);break;case"sqrtSize4":s=function(e,t){return"M473,"+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`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+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,ce);break;case"sqrtTall":s=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+` +H742v`+(n-54-t-e)+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"}(t,ce,n)}return s}(e,s,n),a=new Z(e,i),c=new U([a],{width:"400em",height:u(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return r.makeSvgSpan(["hide-tail"],[c],o)},_n=["(","\\lparen",")",`\\rparen`,"[","\\lbrack","]",`\\rbrack`,"\\{","\\lbrace","\\}",`\\rbrace`,"\\lfloor",`\\rfloor`,"⌊","⌋","\\lceil",`\\rceil`,"⌈","⌉","\\surd"],Ks=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert",`\\rvert`,"\\lVert",`\\rVert`,"\\lgroup",`\\rgroup`,"⟮","⟯","\\lmoustache",`\\rmoustache`,"⎰","⎱"],On=["<",">","\\langle",`\\rangle`,"/","\\backslash","\\lt","\\gt"],de=[0,1.2,1.8,2.4,3],Vs=[{type:"small",style:f.SCRIPTSCRIPT},{type:"small",style:f.SCRIPT},{type:"small",style:f.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ps=[{type:"small",style:f.SCRIPTSCRIPT},{type:"small",style:f.SCRIPT},{type:"small",style:f.TEXT},{type:"stack"}],kn=[{type:"small",style:f.SCRIPTSCRIPT},{type:"small",style:f.SCRIPT},{type:"small",style:f.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Cs=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Sn=function(e,t,n,s){for(o=Math.min(2,3-s.style.size);ot)return n[o]}return n[n.length-1]},en=function(e,t,n,s,o,i){"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e=`\\rangle`);var c=g.contains(On,e)?Vs:g.contains(_n,e)?kn:Ps,a=Sn(e,t,c,s);return"small"===a.type?function(e,t,n,s,o,i){var c=r.makeSymbol(e,"Main-Regular",o,s),a=Yt(c,t,s,i);return n&&un(a,s,t),a}(e,a.style,n,s,o,i):"large"===a.type?hn(e,a.size,n,s,o,i):bn(e,t,n,s,o,i)},W={sqrtImage:function(e,t){var o,c,d=t.havingBaseSizing(),i=Sn("\\surd",e*d.sizeMultiplier,kn,d),s=d.sizeMultiplier,n=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),a=0,l=0,r=0;return"small"===i.type?(e<1?s=1:e<1.4&&(s=.7),l=(1+n)/s,(o=Ht("sqrtMain",a=(1+n+It)/s,r=1e3+1e3*n+80,n,t)).style.minWidth="0.853em",c=.833/s):"large"===i.type?(r=1080*de[i.size],l=(de[i.size]+n)/s,a=(de[i.size]+n+It)/s,(o=Ht("sqrtSize"+i.size,a,r,n,t)).style.minWidth="1.02em",c=1/s):(a=e+n+It,l=e+n,r=Math.floor(1e3*e+n)+80,(o=Ht("sqrtTall",a,r,n,t)).style.minWidth="0.742em",c=1.056),o.height=l,o.style.height=u(a),{span:o,advanceWidth:c,ruleWidth:(t.fontMetrics().sqrtRuleThickness+n)*s}},sizedDelim:function(e,t,n,s,o){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e=`\\rangle`),g.contains(_n,e)||g.contains(On,e))return hn(e,t,!1,n,s,o);if(g.contains(Ks,e))return bn(e,de[t],!1,n,s,o);throw new d("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:de,customSizedDelim:en,leftRightDelim:function(e,t,n,s,o,i){var a=s.fontMetrics().axisHeight*s.sizeMultiplier,c=5/s.fontMetrics().ptPerEm,r=Math.max(t-a,n+a),l=Math.max(r/500*901,2*r-c);return en(e,l,!0,s,o,i)}},Tn={"\\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}},Fs=["(","\\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 ze(e,t){var n=Pe(e);if(n&&g.contains(Fs,n.text))return n;throw new d(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Nn(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}h({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:function(e,t){var n=ze(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Tn[e.funcName].size,mclass:Tn[e.funcName].mclass,delim:n.text}},htmlBuilder:function(e,t){return"."===e.delim?r.makeSpan([e.mclass]):W.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:function(e){var t,n,s=[];return"."!==e.delim&&s.push(D(e.delim,e.mode)),t=new l.MathNode("mo",s),"mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),n=u(W.sizeToMaxHeight[e.size]),t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}}),h({type:"leftright-right",names:[`\\right`],props:{numArgs:1,primitive:!0},handler:function(e,t){var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new d(`\\current@color set to non-string in \\right`);return{type:"leftright-right",mode:e.parser.mode,delim:ze(t[0],e).text,color:n}}}),h({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(e,t){var s,o,i=ze(t[0],e),n=e.parser;return++n.leftrightDepth,o=n.parseExpression(!1),--n.leftrightDepth,n.expect(`\\right`,!1),s=v(n.parseFunction(),"leftright-right"),{type:"leftright",mode:n.mode,body:o,left:i.text,right:s.delim,rightColor:s.color}},htmlBuilder:function(e,t){Nn(e);for(var a,c,l,d,h,n=A(e.body,t,!0,["mopen","mclose"]),s=0,o=0,u=!1,i=0;i-1?"mpadded":"menclose",[y(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":s=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*s+"pt"),n.setAttribute("height","+"+2*s+"pt"),n.setAttribute("lspace",s+"pt"),n.setAttribute("voffset",s+"pt"),"\\fcolorbox"===e.label&&(o=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),n.setAttribute("style","border: "+o+"em solid "+String(e.borderColor)));break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n},h({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(e,t){var s=e.parser,o=e.funcName,i=v(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:s.mode,label:o,backgroundColor:i,body:a}},htmlBuilder:Ie,mathmlBuilder:We}),h({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(e,t){var s=e.parser,o=e.funcName,i=v(t[0],"color-token").color,a=v(t[1],"color-token").color,r=t[2];return{type:"enclose",mode:s.mode,label:o,backgroundColor:a,borderColor:i,body:r}},htmlBuilder:Ie,mathmlBuilder:We}),h({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\fbox",body:t[0]}}}),h({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(e,t){var n=e.parser,s=e.funcName,o=t[0];return{type:"enclose",mode:n.mode,label:s,body:o}},htmlBuilder:Ie,mathmlBuilder:We}),h({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\angl",body:t[0]}}}),Lt={};function $(e){for(var t=e.type,s=e.names,a=e.props,r=e.handler,o=e.htmlBuilder,i=e.mathmlBuilder,c={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:r},n=0;n1||!x)&&r.pop(),i.length0&&(i+=.25),S.push({pos:i,isDashed:e[t]})}for(Q(Z[0]),n=0;n0&&(c<(y+=X)&&(c=y),y=0),e.addJot&&(c+=oe),m.height=M,m.depth=c,i+=M,m.pos=i,i+=c+y,a[n]=m,Q(Z[n+1])}var j,C,F=i/2+t.fontMetrics().axisHeight,R=e.cols||[],v=[],H=[];if(e.tags&&e.tags.some(function(e){return e}))for(n=0;n=_)){O=void 0,(s>0||e.hskipBeforeAndAfter)&&0!==(O=g.deflt(o.pregap,P))&&((j=r.makeSpan(["arraycolsep"],[])).style.width=u(O),v.push(j)),h=[];for(n=0;n0){for(var ne=r.makeLineSpan("hline",t,T),te=r.makeLineSpan("hdashline",t,T),$=[{type:"elem",elem:a,shift:0}];S.length>0;)U=S.pop(),q=U.pos-F,U.isDashed?$.push({type:"elem",elem:te,shift:q}):$.push({type:"elem",elem:ne,shift:q});a=r.makeVList({positionType:"individualShift",children:$},t)}return 0===H.length?r.makeSpan(["mord"],[a],t):(z=r.makeVList({positionType:"individualShift",children:H},t),z=r.makeSpan(["tag"],[z],t),r.makeFragment([a,z]))},bs={c:"center ",l:"left ",r:"right "},V=function(e,t){for(var b=[],E=new l.MathNode("mtd",[],["mtr-glue"]),C=new l.MathNode("mtd",[],["mml-eqn-num"]),d=0;d0){var n,o,i,a,c,h,p,j,s=e.cols,f="",m=!1,_=0,w=s.length;"separator"===s[0].type&&(a+="top ",_=1),"separator"===s[s.length-1].type&&(a+="bottom ",w-=1);for(i=_;i0?"left ":"",a+=o[o.length-1].length>0?"right ":"";for(c=1;c-1?"alignat":"align",h="split"===e.envName,l=J(e.parser,{cols:m,addJot:!0,autoTag:h?void 0:zt(e.envName),emptySingleRow:!0,colSeparationType:p,maxNumCols:h?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,f={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(u="",a=0;a0&&o&&(r=1),m[n]={type:"align",align:c,pregap:r,postgap:0};return l.colSeparationType=o?"align":"alignat",l};$({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(e,t){var n=(Pe(t[0])?[t[0]]:v(t[0],"ordgroup").body).map(function(e){var t=tt(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new d("Unknown column alignment: "+t,e)}),s={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return J(e.parser,s,Ft(e.envName))},htmlBuilder:B,mathmlBuilder:V}),$({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(e){var t,s,a,o={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",i={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)&&(t=e.parser,t.consumeSpaces(),"["===t.fetch().text)){if(t.consume(),t.consumeSpaces(),n=t.fetch().text,-1==="lcr".indexOf(n))throw new d("Expected l or c or r",t.nextToken);t.consume(),t.consumeSpaces(),t.expect("]"),t.consume(),i.cols=[{type:"align",align:n}]}return s=J(e.parser,i,Ft(e.envName)),a=Math.max.apply(Math,[0].concat(s.body.map(function(e){return e.length}))),s.cols=new Array(a).fill({type:"align",align:n}),o?{type:"leftright",mode:e.mode,body:[s],left:o[0],right:o[1],rightColor:void 0}:s},htmlBuilder:B,mathmlBuilder:V}),$({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(e){var t=J(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:B,mathmlBuilder:V}),$({type:"array",names:["subarray"],props:{numArgs:1},handler:function(e,t){var n,s=(Pe(t[0])?[t[0]]:v(t[0],"ordgroup").body).map(function(e){var t=tt(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new d("Unknown column alignment: "+t,e)});if(s.length>1)throw new d("{subarray} can contain only one column");if(n={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},(n=J(e.parser,n,"script")).body.length>0&&n.body[0].length>1)throw new d("{subarray} can contain only one column");return n},htmlBuilder:B,mathmlBuilder:V}),$({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(e){var t=J(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Ft(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:B,mathmlBuilder:V}),$({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Zn,htmlBuilder:B,mathmlBuilder:V}),$({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(e){g.contains(["gather","gather*"],e.envName)&&je(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:zt(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return J(e.parser,t,"display")},htmlBuilder:B,mathmlBuilder:V}),$({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Zn,htmlBuilder:B,mathmlBuilder:V}),$({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(e){je(e);var t={autoTag:zt(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return J(e.parser,t,"display")},htmlBuilder:B,mathmlBuilder:V}),$({type:"array",names:["CD"],props:{numArgs:0},handler:function(e){return je(e),function(e){a=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr",`\\\\\\relax`),e.gullet.beginGroup();;){if(a.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup(),m=e.fetch().text,"&"!==m&&"\\\\"!==m){if("\\end"===m){0===a[a.length-1].length&&a.pop();break}throw new d("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var s,o,a,r,h,m,f,p,g,v,i=[],u=[i],l=0;l-1);else{if(!("<>AV".indexOf(o)>-1))throw new d('Expected one of "<>AV=|." after @',t[n]);for(h=0;h<2;h++){for(p=!0,s=n+1;s=f.SCRIPT.id?n.text():f.DISPLAY:"text"===e&&n.size===f.DISPLAY.size?n=f.TEXT:"script"===e?n=f.SCRIPT:"scriptscript"===e&&(n=f.SCRIPTSCRIPT),n},kt=function(e,t){var n,o,i,a,d,u,h,m,p,g,v,j,y,_,O,x,c=ss(e.size,t.style),E=c.fracNum(),C=c.fracDen(),l=t.havingStyle(E),s=b(e.numer,l,t);return e.continued&&(v=8.5/t.fontMetrics().ptPerEm,y=3.5/t.fontMetrics().ptPerEm,s.height=s.height0?3*h:7*h,a=t.fontMetrics().denom1):(n>0?(i=t.fontMetrics().num2,o=h):(i=t.fontMetrics().num3,o=3*h),a=t.fontMetrics().denom2),d?(m=t.fontMetrics().axisHeight,i-s.depth-(m+.5*n)0&&(t="."===(t=e)?null:t),t},h({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var c,f=e.parser,m=t[4],d=t[5],s=qe(t[0]),l="atom"===s.type&&"open"===s.family?xt(s.text):null,i=qe(t[1]),u="atom"===i.type&&"close"===i.family?xt(i.text):null,r=v(t[2],"size"),a=null,h=!!r.isBlank||(a=r.value).number>0,o="auto",n=t[3];return"ordgroup"===n.type?n.body.length>0&&(c=v(n.body[0],"textord"),o=Ct[Number(c.text)]):(n=v(n,"textord"),o=Ct[Number(n.text)]),{type:"genfrac",mode:f.mode,numer:m,denom:d,continued:!1,hasBarLine:h,barSize:a,leftDelim:l,rightDelim:u,size:o}},htmlBuilder:kt,mathmlBuilder:Et}),h({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var n=e.parser,s=(e.funcName,e.token);return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:v(t[0],"size").value,token:s}}}),h({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var s=e.parser,o=(e.funcName,t[0]),n=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(v(t[1],"infix").size),i=t[2],a=n.number>0;return{type:"genfrac",mode:s.mode,numer:o,denom:i,continued:!1,hasBarLine:a,barSize:n,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:kt,mathmlBuilder:Et}),wt=function(e,t){a=t.style,"supsub"===e.type?(s=e.sup?b(e.sup,t.havingStyle(a.sup()),t):b(e.sub,t.havingStyle(a.sub()),t),n=v(e.base,"horizBrace")):n=v(e,"horizBrace");var n,s,o,i,a,c=b(n.base,t.havingBaseStyle(f.DISPLAY)),l=Ce(n,t);return(n.isOver?(o=r.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.1},{type:"elem",elem:l}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(o=r.makeVList({positionType:"bottom",positionData:c.depth+.1+l.height,children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:c}]},t)).children[0].children[0].children[0].classes.push("svg-align"),s)&&(i=r.makeSpan(["mord",n.isOver?"mover":"munder"],[o],t),o=n.isOver?r.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:s}]},t):r.makeVList({positionType:"bottom",positionData:i.depth+.2+s.height+s.depth,children:[{type:"elem",elem:s},{type:"kern",size:.2},{type:"elem",elem:i}]},t)),r.makeSpan(["mord",n.isOver?"mover":"munder"],[o],t)},h({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var s=e.parser,n=e.funcName;return{type:"horizBrace",mode:s.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:wt,mathmlBuilder:function(e,t){var n=ke(e.label);return new l.MathNode(e.isOver?"mover":"munder",[y(e.base,t),n])}}),h({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var n=e.parser,o=t[1],s=v(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:n.mode,href:s,body:E(o)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var n=A(e.body,t,!1);return r.makeAnchor(e.href,[],n,t)},mathmlBuilder:function(e,t){var n=te(e.body,t);return n instanceof L||(n=new L("mrow",[n])),n.setAttribute("href",e.href),n}}),h({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var o,i,a,r,n=e.parser,s=v(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:s}))return n.formatUnsupportedCmd("\\url");for(a=[],o=0;o0&&(n=w(e.totalheight,t)-a),s=0,e.width.number>0&&(s=w(e.width,t)),o={height:u(a+n)},s>0&&(o.width=u(s)),n>0&&(o.verticalAlign=u(-n)),i=new vs(e.src,e.alt,o),i.height=a,i.depth=n,i},mathmlBuilder:function(e,t){n=new l.MathNode("mglyph",[]),n.setAttribute("alt",e.alt);var n,i,o=w(e.height,t),s=0;return(e.totalheight.number>0&&(s=w(e.totalheight,t)-o,n.setAttribute("valign",u(-s))),n.setAttribute("height",u(o+s)),e.width.number>0)&&(i=w(e.width,t),n.setAttribute("width",u(i))),n.setAttribute("src",e.src),n}}),h({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(e,t){var i,a,n=e.parser,s=e.funcName,o=v(t[0],"size");return n.settings.strict&&(a="m"===s[1],i="mu"===o.value.unit,a?(i||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+s+" supports only mu units, not "+o.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+s+" works only in math mode")):i&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+s+" doesn't support mu units")),{type:"kern",mode:n.mode,dimension:o.value}},htmlBuilder:function(e,t){return r.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var n=w(e.dimension,t);return new l.SpaceNode(n)}}),h({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,s=e.funcName,o=t[0];return{type:"lap",mode:n.mode,alignment:s.slice(5),body:o}},htmlBuilder:function(e,t){"clap"===e.alignment?(s=r.makeSpan([],[b(e.body,t)]),s=r.makeSpan(["inner"],[s],t)):s=r.makeSpan(["inner"],[b(e.body,t)]);var s,i=r.makeSpan(["fix"],[]),n=r.makeSpan([e.alignment],[s,i],t),o=r.makeSpan(["strut"]);return o.style.height=u(n.height+n.depth),n.depth&&(o.style.verticalAlign=u(-n.depth)),n.children.unshift(o),n=r.makeSpan(["thinbox"],[n],t),r.makeSpan(["mord","vbox"],[n],t)},mathmlBuilder:function(e,t){var s,n=new l.MathNode("mpadded",[y(e.body,t)]);return"rlap"!==e.alignment&&(s="llap"===e.alignment?"-1":"-0.5",n.setAttribute("lspace",s+"width")),n.setAttribute("width","0px"),n}}),h({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e){var s,o,i=e.funcName,n=e.parser,a=n.mode;return n.switchMode("math"),s="\\("===i?"\\)":"$",o=n.parseExpression(!1,s),n.expect(s),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",body:o}}}),h({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e){throw new d("Mismatched "+e.funcName)}}),bt=function(e,t){switch(t.style.size){case f.DISPLAY.size:return e.display;case f.TEXT.size:return e.text;case f.SCRIPT.size:return e.script;case f.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}},h({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(e,t){return{type:"mathchoice",mode:e.parser.mode,display:E(t[0]),text:E(t[1]),script:E(t[2]),scriptscript:E(t[3])}},htmlBuilder:function(e,t){var n=bt(e,t),s=A(n,t,!1);return r.makeFragment(s)},mathmlBuilder:function(e,t){var n=bt(e,t);return te(n,t)}});var ls=function(e,t,n,s,o,i,a){e=r.makeSpan([],[e]);var c,l,d,h,m,f,p,v,j,y,_=n&&g.isCharacterBox(n);if(t&&(h=b(t,s.havingStyle(o.sup()),s),l={elem:h,kern:Math.max(s.fontMetrics().bigOpSpacing1,s.fontMetrics().bigOpSpacing3-h.depth)}),n&&(m=b(n,s.havingStyle(o.sub()),s),c={elem:m,kern:Math.max(s.fontMetrics().bigOpSpacing2,s.fontMetrics().bigOpSpacing4-m.height)}),l&&c)v=s.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+a,d=r.makeVList({positionType:"bottom",positionData:v,children:[{type:"kern",size:s.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:u(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:u(i)},{type:"kern",size:s.fontMetrics().bigOpSpacing5}]},s);else if(c)j=e.height-a,d=r.makeVList({positionType:"top",positionData:j,children:[{type:"kern",size:s.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:u(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e}]},s);else{if(!l)return e;y=e.depth+a,d=r.makeVList({positionType:"bottom",positionData:y,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:u(i)},{type:"kern",size:s.fontMetrics().bigOpSpacing5}]},s)}return f=[d],c&&0!==i&&!_&&(p=r.makeSpan(["mspace"],[],s),p.style.marginRight=u(i),f.unshift(p)),r.makeSpan(["mop","op-limits"],f,s)},is=["\\smallint"],ae=function(e,t){h=!1,"supsub"===e.type?(p=e.sup,w=e.sub,n=v(e.base,"op"),h=!0):n=v(e,"op");var n,s,o,i,a,l,d,h,m,p,b,j,y,w,_=t.style,c=!1;if(_.size===f.DISPLAY.size&&n.symbol&&!g.contains(is,n.name)&&(c=!0),n.symbol)y=c?"Size2-Regular":"Size1-Regular",o="",("\\oiint"!==n.name&&"\\oiiint"!==n.name||(o=n.name.slice(1),n.name="oiint"===o?"\\iint":"\\iiint"),s=r.makeSymbol(n.name,y,"math",t,["mop","op-symbol",c?"large-op":"small-op"]),o.length>0)&&(b=s.italic,j=r.staticSvg(o+"Size"+(c?"2":"1"),t),s=r.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:j,shift:c?.08:0}]},t),n.name="\\"+o,s.classes.unshift("mop"),s.italic=b);else if(n.body)i=A(n.body,t,!0),1===i.length&&i[0]instanceof N?(s=i[0]).classes[0]="mop":s=r.makeSpan(["mop"],i,t);else{for(d=[],l=1;l0){for(var n,s,o,i,l,d,u=n.body.map(function(e){var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),a=A(u,t.withFont("mathrm"),!0),c=0;c=0?n.setAttribute("height",u(s)):(n.setAttribute("height",u(s)),n.setAttribute("depth",u(-s))),n.setAttribute("voffset",u(s)),n}}),gt=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small",`\\normalsize`,"\\large","\\Large","\\LARGE","\\huge","\\Huge"],h({type:"sizing",names:gt,props:{numArgs:0,allowedInText:!0},handler:function(e){var s=e.breakOnTokenText,o=e.funcName,n=e.parser,i=n.parseExpression(!1,s);return{type:"sizing",mode:n.mode,size:gt.indexOf(o)+1,body:i}},htmlBuilder:function(e,t){var n=t.havingSize(e.size);return Gn(e.body,n,t)},mathmlBuilder:function(e,t){var n=t.havingSize(e.size),o=T(e.body,n),s=new l.MathNode("mstyle",o);return s.setAttribute("mathsize",u(n.sizeMultiplier)),s}}),h({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,n){var i,r,c,l=e.parser,s=!1,o=!1,a=n[0]&&v(n[0],"ordgroup");if(a)for(r="",i=0;in.height+n.depth+s&&(s=(s+m-n.height-n.depth)/2),h=l.height-n.height-s-d,n.style.paddingLeft=u(p),o=r.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+h)},{type:"elem",elem:l},{type:"kern",size:d}]},t),e.index){var v=t.havingStyle(f.SCRIPTSCRIPT),j=b(e.index,v,t),y=.6*(o.height-o.depth),_=r.makeVList({positionType:"shift",positionData:-y,children:[{type:"elem",elem:j}]},t),w=r.makeSpan(["root"],[_]);return r.makeSpan(["mord","sqrt"],[w,o],t)}return r.makeSpan(["mord","sqrt"],[o],t)},mathmlBuilder:function(e,t){var n=e.body,s=e.index;return s?new l.MathNode("mroot",[y(n,t),y(s,t)]):new l.MathNode("msqrt",[y(n,t)])}}),pt={display:f.DISPLAY,text:f.TEXT,script:f.SCRIPT,scriptscript:f.SCRIPTSCRIPT},h({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var o=e.breakOnTokenText,n=e.funcName,s=e.parser,i=s.parseExpression(!0,o),a=n.slice(1,n.length-5);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder:function(e,t){var n=pt[e.style],s=t.havingStyle(n).withFont("");return Gn(e.body,s,t)},mathmlBuilder:function(e,t){var o=pt[e.style],i=t.havingStyle(o),a=T(e.body,i),n=new l.MathNode("mstyle",a),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return n.setAttribute("scriptlevel",s[0]),n.setAttribute("displaystyle",s[1]),n}}),qn=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===f.DISPLAY.size||n.alwaysHandleSupSub)?ae:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===f.DISPLAY.size||n.limits)?vt:null:"accent"===n.type?g.isCharacterBox(n.base)?Kt:null:"horizBrace"===n.type&&!e.sub===n.isOver?wt:null:null},ie({type:"supsub",htmlBuilder:function(e,t){if(v=qn(e,t),v)return v(e,t);var o,a,l,h,m,v,j,x,k,A,S,y=e.base,C=e.sup,w=e.sub,c=b(y,t),s=t.fontMetrics(),n=0,i=0,O=y&&g.isCharacterBox(y);C&&(h=t.havingStyle(t.style.sup()),o=b(C,h,t),O||(n=c.height-h.fontMetrics().supDrop*h.sizeMultiplier/t.sizeMultiplier)),w&&(m=t.havingStyle(t.style.sub()),a=b(w,m,t),O||(i=c.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier));var p,E=t.style===f.DISPLAY?s.sup1:t.style.cramped?s.sup3:s.sup2,M=t.sizeMultiplier,d=u(.5/s.ptPerEm/M),_=null;if(a&&(x=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name),(c instanceof N||x)&&(_=u(-c.italic))),o&&a)n=Math.max(n,E,o.depth+.25*s.xHeight),i=Math.max(i,s.sub2),j=4*s.defaultRuleThickness,n-o.depth-(a.height-i)0&&(n+=l,i-=l)),k=[{type:"elem",elem:a,shift:i,marginRight:d,marginLeft:_},{type:"elem",elem:o,shift:-n,marginRight:d}],p=r.makeVList({positionType:"individualShift",children:k},t);else if(a)i=Math.max(i,s.sub1,a.height-.8*s.xHeight),A=[{type:"elem",elem:a,marginLeft:_,marginRight:d}],p=r.makeVList({positionType:"shift",positionData:i,children:A},t);else{if(!o)throw new Error("supsub must have either sup or sub.");n=Math.max(n,E,o.depth+.25*s.xHeight),p=r.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:o,marginRight:d}]},t)}return S=jt(c,"right")||"mord",r.makeSpan([S],[c,r.makeSpan(["msupsub"],[p])],t)},mathmlBuilder:function(e,t){var n,s,o,i,a,r,c=!1;return e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(c=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0),a=[y(e.base,t)],e.sub&&a.push(y(e.sub,t)),e.sup&&a.push(y(e.sup,t)),c?i=r?"mover":"munder":e.sub?e.sup?(o=e.base,i=o&&"op"===o.type&&o.limits&&t.style===f.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===f.DISPLAY||o.limits)?"munderover":"msubsup"):(n=e.base,i=n&&"op"===n.type&&n.limits&&(t.style===f.DISPLAY||n.alwaysHandleSupSub)||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(n.limits||t.style===f.DISPLAY)?"munder":"msub"):(s=e.base,i=s&&"op"===s.type&&s.limits&&(t.style===f.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===f.DISPLAY)?"mover":"msup"),new l.MathNode(i,a)}}),ie({type:"atom",htmlBuilder:function(e,t){return r.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var s,n=new l.MathNode("mo",[D(e.text,e.mode)]);return"bin"===e.family?(s=Mt(e,t),"bold-italic"===s&&n.setAttribute("mathvariant",s)):"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false"),n}}),ft={mi:"italic",mn:"normal",mtext:"normal"},ie({type:"mathord",htmlBuilder:function(e,t){return r.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var n=new l.MathNode("mi",[D(e.text,e.mode,t)]),s=Mt(e,t)||"italic";return s!==ft[n.type]&&n.setAttribute("mathvariant",s),n}}),ie({type:"textord",htmlBuilder:function(e,t){return r.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var n,s=D(e.text,e.mode,t),o=Mt(e,t)||"normal";return n="text"===e.mode?new l.MathNode("mtext",[s]):/[0-9]/.test(e.text)?new l.MathNode("mn",[s]):"\\prime"===e.text?new l.MathNode("mo",[s]):new l.MathNode("mi",[s]),o!==ft[n.type]&&n.setAttribute("mathvariant",o),n}}),Fe={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Ne={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},ie({type:"spacing",htmlBuilder:function(e,t){if(Ne.hasOwnProperty(e.text)){var n,s=Ne[e.text].className||"";return"text"===e.mode?(n=r.makeOrd(e,t,"textord"),n.classes.push(s),n):r.makeSpan(["mspace",s],[r.mathsym(e.text,e.mode,t)],t)}if(Fe.hasOwnProperty(e.text))return r.makeSpan(["mspace",Fe[e.text]],[],t);throw new d('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e){if(!Ne.hasOwnProperty(e.text)){if(Fe.hasOwnProperty(e.text))return new l.MathNode("mspace");throw new d('Unknown type of space "'+e.text+'"')}return new l.MathNode("mtext",[new l.TextNode("\xa0")])}}),mt=function(){var e=new l.MathNode("mtd",[]);return e.setAttribute("width","50%"),e},ie({type:"tag",mathmlBuilder:function(e,t){var n=new l.MathNode("mtable",[new l.MathNode("mtr",[mt(),new l.MathNode("mtd",[te(e.body,t)]),mt(),new l.MathNode("mtd",[te(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var Vn={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Bn={"\\textbf":"textbf","\\textmd":"textmd"},Ss={"\\textit":"textit","\\textup":"textup"},Rn=function(e,t){var n=e.font;return n?Vn[n]?t.withTextFontFamily(Vn[n]):Bn[n]?t.withTextFontWeight(Bn[n]):t.withTextFontShape(Ss[n]):t};h({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var n=e.parser,s=e.funcName,o=t[0];return{type:"text",mode:n.mode,body:E(o),font:s}},htmlBuilder:function(e,t){var n=Rn(e,t),s=A(e.body,n,!0);return r.makeSpan(["mord","text"],s,n)},mathmlBuilder:function(e,t){var n=Rn(e,t);return te(e.body,n)}}),h({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var n=b(e.body,t),o=r.makeLineSpan("underline-line",t),s=t.fontMetrics().defaultRuleThickness,i=r.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:s},{type:"elem",elem:o},{type:"kern",size:3*s},{type:"elem",elem:n}]},t);return r.makeSpan(["mord","underline"],[i],t)},mathmlBuilder:function(e,t){var n,s=new l.MathNode("mo",[new l.TextNode("‾")]);return s.setAttribute("stretchy","true"),n=new l.MathNode("munder",[y(e.body,t),s]),n.setAttribute("accentunder","true"),n}}),h({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var n=b(e.body,t),s=t.fontMetrics().axisHeight,o=.5*(n.height-s-(n.depth+s));return r.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:function(e,t){return new l.MathNode("mpadded",[y(e.body,t)],["vcenter"])}}),h({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(){throw new d("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var n,i=tn(e),a=[],s=t.havingStyle(t.style.text()),o=0;o0;)this.endGroup()},e.has=function(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)},e.get=function(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]},e.set=function(e,t,n){if(void 0===n&&(n=!1),n){for(var s,o=0;o0&&(this.undefStack[this.undefStack.length-1][e]=t)}else s=this.undefStack[this.undefStack.length-1],s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e]);t==null?delete this.current[e]:this.current[e]=t},t}(),Is=Dt;s(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),s("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),s("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),s("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),s("\\@ifnextchar",function(e){var n,t=e.consumeArgs(3);return e.consumeSpaces(),n=e.future(),1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),s("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),s("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}),ut={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},s("\\char",function(e){var n,o,t=e.popToken(),s="";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()).text[0])s=t.text.charCodeAt(1);else{if("EOF"===t.text)throw new d("\\char` missing argument");s=t.text.charCodeAt(0)}else n=10;if(n){if(null==(s=ut[t.text])||s>=n)throw new d("Invalid base-"+n+" digit "+t.text);for(;null!=(o=ut[e.future().text])&&o":"\\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"},s("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in dt?n=dt[t]:(`\\not`===t.slice(0,4)||t in O.math&&g.contains(["bin","rel"],O.math[t].group))&&(n="\\dotsb"),n}),Ke={")":!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},s("\\dotso",function(e){return e.future().text in Ke?"\\ldots\\,":"\\ldots"}),s("\\dotsc",function(e){var t=e.future().text;return t in Ke&&","!==t?"\\ldots\\,":"\\ldots"}),s("\\cdots",function(e){return e.future().text in Ke?"\\@cdots\\,":"\\@cdots"}),s("\\dotsb","\\cdots"),s("\\dotsm","\\cdots"),s("\\dotsi","\\!\\cdots"),s("\\dotsx","\\ldots\\,"),s("\\DOTSI",`\\relax`),s("\\DOTSB",`\\relax`),s("\\DOTSX",`\\relax`),s("\\tmspace",`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),s("\\,","\\tmspace+{3mu}{.1667em}"),s("\\thinspace","\\,"),s("\\>","\\mskip{4mu}"),s("\\:","\\tmspace+{4mu}{.2222em}"),s("\\medspace","\\:"),s("\\;","\\tmspace+{5mu}{.2777em}"),s("\\thickspace","\\;"),s("\\!","\\tmspace-{3mu}{.1667em}"),s(`\\negthinspace`,"\\!"),s(`\\negmedspace`,"\\tmspace-{4mu}{.2222em}"),s(`\\negthickspace`,"\\tmspace-{5mu}{.277em}"),s("\\enspace","\\kern.5em "),s("\\enskip",`\\hskip.5em\\relax`),s("\\quad",`\\hskip1em\\relax`),s("\\qquad",`\\hskip2em\\relax`),s("\\tag","\\@ifstar\\tag@literal\\tag@paren"),s("\\tag@paren","\\tag@literal{({#1})}"),s("\\tag@literal",function(e){if(e.macros.get("\\df@tag"))throw new d("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),s("\\bmod",`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),s("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),s("\\pmod",`\\pod{{\\rm mod}\\mkern6mu#1}`),s("\\mod",`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),s(`\\newline`,`\\\\\\relax`),s("\\TeX",`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`),lt=u(H["Main-Regular"]["T".charCodeAt(0)][1]-.7*H["Main-Regular"]["A".charCodeAt(0)][1]),s("\\LaTeX",`\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{`+lt+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),s("\\KaTeX",`\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{`+lt+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),s("\\hspace","\\@ifstar\\@hspacer\\@hspace"),s("\\@hspace",`\\hskip #1\\relax`),s("\\@hspacer",`\\rule{0pt}{0pt}\\hskip #1\\relax`),s("\\ordinarycolon",":"),s("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),s("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),s("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),s("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),s("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),s("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),s("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),s("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),s("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),s("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),s("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),s("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),s("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),s("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),s("∷","\\dblcolon"),s("∹","\\eqcolon"),s("≔","\\coloneqq"),s("≕","\\eqqcolon"),s("⩴","\\Coloneqq"),s(`\\ratio`,"\\vcentcolon"),s("\\coloncolon","\\dblcolon"),s("\\colonequals","\\coloneqq"),s("\\coloncolonequals","\\Coloneqq"),s("\\equalscolon","\\eqqcolon"),s("\\equalscoloncolon","\\Eqqcolon"),s("\\colonminus","\\coloneq"),s("\\coloncolonminus","\\Coloneq"),s("\\minuscolon","\\eqcolon"),s("\\minuscoloncolon","\\Eqcolon"),s("\\coloncolonapprox","\\Colonapprox"),s("\\coloncolonsim","\\Colonsim"),s("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),s("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),s("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),s("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),s(`\\notni`,`\\html@mathml{\\not\\ni}{\\mathrel{\\char\`∌}}`),s("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),s("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),s("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),s("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),s("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),s("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),s("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),s("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),s("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),s("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),s(`\\ngeqq`,"\\html@mathml{\\@ngeqq}{≱}"),s(`\\ngeqslant`,"\\html@mathml{\\@ngeqslant}{≱}"),s(`\\nleqq`,"\\html@mathml{\\@nleqq}{≰}"),s(`\\nleqslant`,"\\html@mathml{\\@nleqslant}{≰}"),s(`\\nshortmid`,"\\html@mathml{\\@nshortmid}{∤}"),s(`\\nshortparallel`,"\\html@mathml{\\@nshortparallel}{∦}"),s(`\\nsubseteqq`,"\\html@mathml{\\@nsubseteqq}{⊈}"),s(`\\nsupseteqq`,"\\html@mathml{\\@nsupseteqq}{⊉}"),s("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),s("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),s("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),s("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),s("\\imath","\\html@mathml{\\@imath}{ı}"),s("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),s("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),s(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),s("⟦","\\llbracket"),s("⟧",`\\rrbracket`),s("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),s(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),s("⦃","\\lBrace"),s("⦄",`\\rBrace`),s("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),s("⦵","\\minuso"),s("\\darr","\\downarrow"),s("\\dArr","\\Downarrow"),s("\\Darr","\\Downarrow"),s("\\lang","\\langle"),s(`\\rang`,`\\rangle`),s("\\uarr","\\uparrow"),s("\\uArr","\\Uparrow"),s("\\Uarr","\\Uparrow"),s("\\N","\\mathbb{N}"),s("\\R","\\mathbb{R}"),s("\\Z","\\mathbb{Z}"),s("\\alef","\\aleph"),s("\\alefsym","\\aleph"),s("\\Alpha","\\mathrm{A}"),s("\\Beta","\\mathrm{B}"),s("\\bull","\\bullet"),s("\\Chi","\\mathrm{X}"),s("\\clubs","\\clubsuit"),s("\\cnums","\\mathbb{C}"),s("\\Complex","\\mathbb{C}"),s("\\Dagger","\\ddagger"),s("\\diamonds","\\diamondsuit"),s("\\empty","\\emptyset"),s("\\Epsilon","\\mathrm{E}"),s("\\Eta","\\mathrm{H}"),s("\\exist","\\exists"),s("\\harr","\\leftrightarrow"),s("\\hArr","\\Leftrightarrow"),s("\\Harr","\\Leftrightarrow"),s("\\hearts","\\heartsuit"),s("\\image","\\Im"),s("\\infin","\\infty"),s("\\Iota","\\mathrm{I}"),s("\\isin","\\in"),s("\\Kappa","\\mathrm{K}"),s("\\larr","\\leftarrow"),s("\\lArr","\\Leftarrow"),s("\\Larr","\\Leftarrow"),s("\\lrarr","\\leftrightarrow"),s("\\lrArr","\\Leftrightarrow"),s("\\Lrarr","\\Leftrightarrow"),s("\\Mu","\\mathrm{M}"),s(`\\natnums`,"\\mathbb{N}"),s("\\Nu","\\mathrm{N}"),s("\\Omicron","\\mathrm{O}"),s("\\plusmn","\\pm"),s(`\\rarr`,`\\rightarrow`),s(`\\rArr`,"\\Rightarrow"),s("\\Rarr","\\Rightarrow"),s(`\\real`,"\\Re"),s(`\\reals`,"\\mathbb{R}"),s("\\Reals","\\mathbb{R}"),s("\\Rho","\\mathrm{P}"),s("\\sdot","\\cdot"),s("\\sect","\\S"),s("\\spades","\\spadesuit"),s("\\sub","\\subset"),s("\\sube","\\subseteq"),s("\\supe","\\supseteq"),s("\\Tau","\\mathrm{T}"),s("\\thetasym","\\vartheta"),s("\\weierp","\\wp"),s("\\Zeta","\\mathrm{Z}"),s("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),s("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),s("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),s("\\bra","\\mathinner{\\langle{#1}|}"),s("\\ket",`\\mathinner{|{#1}\\rangle}`),s("\\braket",`\\mathinner{\\langle{#1}\\rangle}`),s("\\Bra",`\\left\\langle#1\\right|`),s("\\Ket",`\\left|#1\\right\\rangle`),ct=function(e){return function(t){var s,o,i,a=t.consumeArg().tokens,r=t.consumeArg().tokens,n=t.consumeArg().tokens,c=t.consumeArg().tokens,l=t.macros.get("|"),d=t.macros.get("\\|");return t.macros.beginGroup(),s=function(t){return function(s){e&&(s.macros.set("|",l),n.length&&s.macros.set("\\|",d));var o=t;return!t&&n.length&&"|"===s.future().text&&(s.popToken(),o=!0),{tokens:o?n:r,numArgs:0}}},t.macros.set("|",s(!1)),n.length&&t.macros.set("\\|",s(!0)),o=t.consumeArg().tokens,i=t.expandTokens([].concat(c,o,a)),t.macros.endGroup(),{tokens:i.reverse(),numArgs:0}}},s("\\bra@ket",ct(!1)),s("\\bra@set",ct(!0)),s("\\Braket",`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),s("\\Set",`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),s("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),s("\\angln","{\\angl n}"),s("\\blue","\\textcolor{##6495ed}{#1}"),s("\\orange","\\textcolor{##ffa500}{#1}"),s("\\pink","\\textcolor{##ff00af}{#1}"),s(`\\red`,"\\textcolor{##df0030}{#1}"),s("\\green","\\textcolor{##28ae7b}{#1}"),s("\\gray","\\textcolor{gray}{#1}"),s("\\purple","\\textcolor{##9d38bd}{#1}"),s("\\blueA","\\textcolor{##ccfaff}{#1}"),s("\\blueB","\\textcolor{##80f6ff}{#1}"),s("\\blueC","\\textcolor{##63d9ea}{#1}"),s("\\blueD","\\textcolor{##11accd}{#1}"),s("\\blueE","\\textcolor{##0c7f99}{#1}"),s("\\tealA","\\textcolor{##94fff5}{#1}"),s("\\tealB","\\textcolor{##26edd5}{#1}"),s("\\tealC","\\textcolor{##01d1c1}{#1}"),s("\\tealD","\\textcolor{##01a995}{#1}"),s("\\tealE","\\textcolor{##208170}{#1}"),s("\\greenA","\\textcolor{##b6ffb0}{#1}"),s("\\greenB","\\textcolor{##8af281}{#1}"),s("\\greenC","\\textcolor{##74cf70}{#1}"),s("\\greenD","\\textcolor{##1fab54}{#1}"),s("\\greenE","\\textcolor{##0d923f}{#1}"),s("\\goldA","\\textcolor{##ffd0a9}{#1}"),s("\\goldB","\\textcolor{##ffbb71}{#1}"),s("\\goldC","\\textcolor{##ff9c39}{#1}"),s("\\goldD","\\textcolor{##e07d10}{#1}"),s("\\goldE","\\textcolor{##a75a05}{#1}"),s(`\\redA`,"\\textcolor{##fca9a9}{#1}"),s(`\\redB`,"\\textcolor{##ff8482}{#1}"),s(`\\redC`,"\\textcolor{##f9685d}{#1}"),s(`\\redD`,"\\textcolor{##e84d39}{#1}"),s(`\\redE`,"\\textcolor{##bc2612}{#1}"),s("\\maroonA","\\textcolor{##ffbde0}{#1}"),s("\\maroonB","\\textcolor{##ff92c6}{#1}"),s("\\maroonC","\\textcolor{##ed5fa6}{#1}"),s("\\maroonD","\\textcolor{##ca337c}{#1}"),s("\\maroonE","\\textcolor{##9e034e}{#1}"),s("\\purpleA","\\textcolor{##ddd7ff}{#1}"),s("\\purpleB","\\textcolor{##c6b9fc}{#1}"),s("\\purpleC","\\textcolor{##aa87ff}{#1}"),s("\\purpleD","\\textcolor{##7854ab}{#1}"),s("\\purpleE","\\textcolor{##543b78}{#1}"),s("\\mintA","\\textcolor{##f5f9e8}{#1}"),s("\\mintB","\\textcolor{##edf2df}{#1}"),s("\\mintC","\\textcolor{##e0e5cc}{#1}"),s("\\grayA","\\textcolor{##f6f7f7}{#1}"),s("\\grayB","\\textcolor{##f0f1f2}{#1}"),s("\\grayC","\\textcolor{##e3e5e6}{#1}"),s("\\grayD","\\textcolor{##d6d8da}{#1}"),s("\\grayE","\\textcolor{##babec2}{#1}"),s("\\grayF","\\textcolor{##888d93}{#1}"),s("\\grayG","\\textcolor{##626569}{#1}"),s("\\grayH","\\textcolor{##3b3e40}{#1}"),s("\\grayI","\\textcolor{##21242c}{#1}"),s("\\kaBlue","\\textcolor{##314453}{#1}"),s("\\kaGreen","\\textcolor{##71B307}{#1}");var yn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Ys=function(){function t(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Hs(Is,t.macros),this.mode=n,this.stack=[]}var e=t.prototype;return e.feed=function(e){this.lexer=new En(e,this.settings)},e.switchMode=function(e){this.mode=e},e.beginGroup=function(){this.macros.beginGroup()},e.endGroup=function(){this.macros.endGroup()},e.endGroups=function(){this.macros.endGroups()},e.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},e.popToken=function(){return this.future(),this.stack.pop()},e.pushToken=function(e){this.stack.push(e)},e.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},e.scanArgument=function(e){if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;s=this.popToken();var t,n,s,o,i=this.consumeArg(["]"]);o=i.tokens,t=i.end}else n=this.consumeArg(),o=n.tokens,s=n.start,t=n.end;return this.pushToken(new q("EOF",t.loc)),this.pushTokens(o),s.range(t,"")},e.consumeSpaces=function(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}},e.consumeArg=function(e){t=[],o=e&&e.length>0,o||this.consumeSpaces();var t,n,o,a=this.future(),i=0,s=0;do{if(n=this.popToken(),t.push(n),"{"===n.text)++i;else if("}"===n.text){if(-1===--i)throw new d("Extra }",n)}else if("EOF"===n.text)throw new d("Unexpected end of input in a macro argument, expected '"+(e&&o?e[s]:"}")+"'",n);if(e&&o)if((0===i||1===i&&"{"===e[s])&&n.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==i||o)return"{"===a.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:a,end:n}},e.consumeArgs=function(e,t){if(t){if(t.length!==e+1)throw new d("The length of delimiters doesn't match the number of args!");for(var n,o,i,a=t[0],s=0;sthis.settings.maxExpand)throw new d("Too many expansions: infinite loop or need to increase maxExpand setting");if(t=s.tokens,r=this.consumeArgs(s.numArgs,s.delimiters),s.numArgs)for(n=(t=t.slice()).length-1;n>=0;--n)if(o=t[n],"#"===o.text){if(0===n)throw new d("Incomplete placeholder at end of macro body",o);if("#"===(o=t[--n]).text)t.splice(n+1,1);else{if(!/^[1-9]$/.test(o.text))throw new d("Not a valid argument number",o);(c=t).splice.apply(c,[n,2].concat(r[+o.text-1]))}}return this.pushTokens(t),t.length},e.expandAfterFuture=function(){return this.expandOnce(),this.future()},e.expandNextToken=function(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}throw new Error},e.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new q(e)]):void 0},e.expandTokens=function(e){var t,n=[],s=this.stack.length;for(this.pushTokens(e);this.stack.length>s;)!1===this.expandOnce(!0)&&(t=this.stack.pop(),t.treatAsRelax&&(t.noexpand=!1,t.treatAsRelax=!1),n.push(t));return n},e.expandMacroAsText=function(e){var t=this.expandMacro(e);return t&&t.map(function(e){return e.text}).join("")},e._getExpansion=function(e){if(t=this.macros.get(e),t==null)return t;if(1===e.length&&(o=this.lexer.catcodes[e],o!=null&&13!==o))return;if(n="function"==typeof t?t(this):t,"string"==typeof n){if(s=0,-1!==n.indexOf("#"))for(r=n.replace(/##/g,"");-1!==r.indexOf("#"+(s+1));)++s;for(var t,n,s,o,r,c=new En(n,this.settings),i=[],a=c.lex();"EOF"!==a.text;)i.push(a),a=c.lex();return i.reverse(),{tokens:i,numArgs:s}}return n},e.isDefined=function(e){return this.macros.has(e)||se.hasOwnProperty(e)||O.math.hasOwnProperty(e)||O.text.hasOwnProperty(e)||yn.hasOwnProperty(e)},e.isExpandable=function(e){var t=this.macros.get(e);return t!=null?"string"==typeof t||"function"==typeof t||!t.unexpandable:se.hasOwnProperty(e)&&!se[e].primitive},t}(),jn=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,Qe=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","\xb9":"1","\xb2":"2","\xb3":"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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),it={"́":{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"}},pn={"\xe1":"á","\xe0":"à","\xe4":"ä","ǟ":"ǟ","\xe3":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","\xe2":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","\xe5":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","\xe7":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","\xe9":"é","\xe8":"è","\xeb":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","\xea":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","\xed":"í","\xec":"ì","\xef":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","\xee":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","\xf1":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","\xf3":"ó","\xf2":"ò","\xf6":"ö","ȫ":"ȫ","\xf5":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","\xf4":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","\xfa":"ú","\xf9":"ù","\xfc":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","\xfb":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","\xfd":"ý","ỳ":"ỳ","\xff":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","\xc1":"Á","\xc0":"À","\xc4":"Ä","Ǟ":"Ǟ","\xc3":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","\xc2":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","\xc5":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","\xc7":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","\xc9":"É","\xc8":"È","\xcb":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","\xca":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","\xcd":"Í","\xcc":"Ì","\xcf":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","\xce":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","\xd1":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","\xd3":"Ó","\xd2":"Ò","\xd6":"Ö","Ȫ":"Ȫ","\xd5":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","\xd4":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","\xda":"Ú","\xd9":"Ù","\xdc":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","\xdb":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","\xdd":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},dn=function(){function t(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Ys(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var e=t.prototype;return e.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new d("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},e.consume=function(){this.nextToken=null},e.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},e.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},e.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}},e.subparse=function(e){var t,n=this.nextToken;return this.consume(),this.gullet.pushToken(new q("}")),this.gullet.pushTokens(e),t=this.parseExpression(!1),this.expect("}"),this.nextToken=n,t},e.parseExpression=function(e,n){for(var s,o,i=[];;){if("math"===this.mode&&this.consumeSpaces(),s=this.fetch(),-1!==t.endOfExpression.indexOf(s.text))break;if(n&&s.text===n)break;if(e&&se[s.text]&&se[s.text].infix)break;if(o=this.parseAtom(n),!o)break;"internal"!==o.type&&i.push(o)}return"text"===this.mode&&this.formLigatures(i),this.handleInfixNodes(i)},e.handleInfixNodes=function(e){for(var s,o,i,a,r,t=-1,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+e[0]+'" used in math mode',t),r=O[this.mode][e].group,l=R.range(t),zs.hasOwnProperty(r)?(m=r,c={type:"atom",mode:this.mode,family:m,loc:l,text:e}):c={type:r,mode:this.mode,loc:l,text:e},i=c;else{if(!(e.charCodeAt(0)>=128))return null;this.settings.strict&&(Fn(e.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'" ('+e.charCodeAt(0)+")",t)),i={type:"textord",mode:"text",loc:R.range(t),text:e}}if(this.consume(),o)for(a=0;a