var NDt=Object.create;var eE=Object.defineProperty;var ODt=Object.getOwnPropertyDescriptor;var QDt=Object.getOwnPropertyNames;var TDt=Object.getPrototypeOf,JDt=Object.prototype.hasOwnProperty;var ce=(e,t)=>()=>(e&&(t=e(e=0)),t);var k=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Dn=(e,t)=>{for(var r in t)eE(e,r,{get:t[r],enumerable:!0})},HDt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of QDt(t))!JDt.call(e,a)&&a!==r&&eE(e,a,{get:()=>t[a],enumerable:!(n=ODt(t,a))||n.enumerable});return e};var Wt=(e,t,r)=>(r=e!=null?NDt(TDt(e)):{},HDt(t||!e||!e.__esModule?eE(r,"default",{value:e,enumerable:!0}):r,e));var ze=k((iE,wK)=>{"use strict";var mv=function(e){return e&&e.Math===Math&&e};wK.exports=mv(typeof globalThis=="object"&&globalThis)||mv(typeof window=="object"&&window)||mv(typeof self=="object"&&self)||mv(typeof global=="object"&&global)||mv(typeof iE=="object"&&iE)||(function(){return this})()||Function("return this")()});var we=k((mhi,UK)=>{"use strict";UK.exports=function(e){try{return!!e()}catch{return!0}}});var bi=k((phi,YK)=>{"use strict";var _Dt=we();YK.exports=!_Dt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var cb=k((bhi,EK)=>{"use strict";var jDt=we();EK.exports=!jDt(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var si=k((fhi,NK)=>{"use strict";var zDt=cb(),LR=Function.prototype.call;NK.exports=zDt?LR.bind(LR):function(){return LR.apply(LR,arguments)}});var pv=k(TK=>{"use strict";var OK={}.propertyIsEnumerable,QK=Object.getOwnPropertyDescriptor,DDt=QK&&!OK.call({1:2},1);TK.f=DDt?function(t){var r=QK(this,t);return!!r&&r.enumerable}:OK});var ko=k((vhi,JK)=>{"use strict";JK.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var Qe=k((Ghi,jK)=>{"use strict";var HK=cb(),_K=Function.prototype,rE=_K.call,MDt=HK&&_K.bind.bind(rE,rE);jK.exports=HK?MDt:function(e){return function(){return rE.apply(e,arguments)}}});var Xa=k((yhi,DK)=>{"use strict";var zK=Qe(),PDt=zK({}.toString),KDt=zK("".slice);DK.exports=function(e){return KDt(PDt(e),8,-1)}});var Oh=k((Chi,MK)=>{"use strict";var qDt=Qe(),$Dt=we(),tMt=Xa(),nE=Object,eMt=qDt("".split);MK.exports=$Dt(function(){return!nE("z").propertyIsEnumerable(0)})?function(e){return tMt(e)==="String"?eMt(e,""):nE(e)}:nE});var Gc=k((xhi,PK)=>{"use strict";PK.exports=function(e){return e==null}});var zr=k((Zhi,KK)=>{"use strict";var iMt=Gc(),rMt=TypeError;KK.exports=function(e){if(iMt(e))throw new rMt("Can't call method on "+e);return e}});var Mn=k((Rhi,qK)=>{"use strict";var nMt=Oh(),aMt=zr();qK.exports=function(e){return nMt(aMt(e))}});var ar=k((Ahi,$K)=>{"use strict";var aE=typeof document=="object"&&document.all;$K.exports=typeof aE>"u"&&aE!==void 0?function(e){return typeof e=="function"||e===aE}:function(e){return typeof e=="function"}});var xi=k((Bhi,tq)=>{"use strict";var oMt=ar();tq.exports=function(e){return typeof e=="object"?e!==null:oMt(e)}});var Mi=k((Xhi,eq)=>{"use strict";var oE=ze(),sMt=ar(),lMt=function(e){return sMt(e)?e:void 0};eq.exports=function(e,t){return arguments.length<2?lMt(oE[e]):oE[e]&&oE[e][t]}});var Ma=k((Whi,iq)=>{"use strict";var cMt=Qe();iq.exports=cMt({}.isPrototypeOf)});var Xl=k((Fhi,aq)=>{"use strict";var dMt=ze(),rq=dMt.navigator,nq=rq&&rq.userAgent;aq.exports=nq?String(nq):""});var Fl=k((Vhi,uq)=>{"use strict";var dq=ze(),sE=Xl(),oq=dq.process,sq=dq.Deno,lq=oq&&oq.versions||sq&&sq.version,cq=lq&&lq.v8,Wl,wR;cq&&(Wl=cq.split("."),wR=Wl[0]>0&&Wl[0]<4?1:+(Wl[0]+Wl[1]));!wR&&sE&&(Wl=sE.match(/Edge\/(\d+)/),(!Wl||Wl[1]>=74)&&(Wl=sE.match(/Chrome\/(\d+)/),Wl&&(wR=+Wl[1])));uq.exports=wR});var Lu=k((khi,hq)=>{"use strict";var gq=Fl(),uMt=we(),gMt=ze(),hMt=gMt.String;hq.exports=!!Object.getOwnPropertySymbols&&!uMt(function(){var e=Symbol("symbol detection");return!hMt(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&gq&&gq<41})});var lE=k((Shi,mq)=>{"use strict";var mMt=Lu();mq.exports=mMt&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var wu=k((Lhi,pq)=>{"use strict";var pMt=Mi(),bMt=ar(),fMt=Ma(),IMt=lE(),vMt=Object;pq.exports=IMt?function(e){return typeof e=="symbol"}:function(e){var t=pMt("Symbol");return bMt(t)&&fMt(t.prototype,vMt(e))}});var Uu=k((whi,bq)=>{"use strict";var GMt=String;bq.exports=function(e){try{return GMt(e)}catch{return"Object"}}});var Hi=k((Uhi,fq)=>{"use strict";var yMt=ar(),CMt=Uu(),xMt=TypeError;fq.exports=function(e){if(yMt(e))return e;throw new xMt(CMt(e)+" is not a function")}});var la=k((Yhi,Iq)=>{"use strict";var ZMt=Hi(),RMt=Gc();Iq.exports=function(e,t){var r=e[t];return RMt(r)?void 0:ZMt(r)}});var gE=k((Ehi,vq)=>{"use strict";var cE=si(),dE=ar(),uE=xi(),AMt=TypeError;vq.exports=function(e,t){var r,n;if(t==="string"&&dE(r=e.toString)&&!uE(n=cE(r,e))||dE(r=e.valueOf)&&!uE(n=cE(r,e))||t!=="string"&&dE(r=e.toString)&&!uE(n=cE(r,e)))return n;throw new AMt("Can't convert object to primitive value")}});var cr=k((Nhi,Gq)=>{"use strict";Gq.exports=!1});var UR=k((Ohi,Cq)=>{"use strict";var yq=ze(),BMt=Object.defineProperty;Cq.exports=function(e,t){try{BMt(yq,e,{value:t,configurable:!0,writable:!0})}catch{yq[e]=t}return t}});var bv=k((Qhi,Rq)=>{"use strict";var XMt=cr(),WMt=ze(),FMt=UR(),xq="__core-js_shared__",Zq=Rq.exports=WMt[xq]||FMt(xq,{});(Zq.versions||(Zq.versions=[])).push({version:"3.48.0",mode:XMt?"pure":"global",copyright:"\xA9 2013\u20132025 Denis Pushkarev (zloirock.ru), 2025\u20132026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var Qh=k((Thi,Bq)=>{"use strict";var Aq=bv();Bq.exports=function(e,t){return Aq[e]||(Aq[e]=t||{})}});var pr=k((Jhi,Xq)=>{"use strict";var VMt=zr(),kMt=Object;Xq.exports=function(e){return kMt(VMt(e))}});var Pi=k((Hhi,Wq)=>{"use strict";var SMt=Qe(),LMt=pr(),wMt=SMt({}.hasOwnProperty);Wq.exports=Object.hasOwn||function(t,r){return wMt(LMt(t),r)}});var Yu=k((_hi,Fq)=>{"use strict";var UMt=Qe(),YMt=0,EMt=Math.random(),NMt=UMt(1.1.toString);Fq.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+NMt(++YMt+EMt,36)}});var Wi=k((jhi,kq)=>{"use strict";var OMt=ze(),QMt=Qh(),Vq=Pi(),TMt=Yu(),JMt=Lu(),HMt=lE(),db=OMt.Symbol,hE=QMt("wks"),_Mt=HMt?db.for||db:db&&db.withoutSetter||TMt;kq.exports=function(e){return Vq(hE,e)||(hE[e]=JMt&&Vq(db,e)?db[e]:_Mt("Symbol."+e)),hE[e]}});var fv=k((zhi,wq)=>{"use strict";var jMt=si(),Sq=xi(),Lq=wu(),zMt=la(),DMt=gE(),MMt=Wi(),PMt=TypeError,KMt=MMt("toPrimitive");wq.exports=function(e,t){if(!Sq(e)||Lq(e))return e;var r=zMt(e,KMt),n;if(r){if(t===void 0&&(t="default"),n=jMt(r,e,t),!Sq(n)||Lq(n))return n;throw new PMt("Can't convert object to primitive value")}return t===void 0&&(t="number"),DMt(e,t)}});var Ad=k((Dhi,Uq)=>{"use strict";var qMt=fv(),$Mt=wu();Uq.exports=function(e){var t=qMt(e,"string");return $Mt(t)?t:t+""}});var Iv=k((Mhi,Eq)=>{"use strict";var t6t=ze(),Yq=xi(),mE=t6t.document,e6t=Yq(mE)&&Yq(mE.createElement);Eq.exports=function(e){return e6t?mE.createElement(e):{}}});var pE=k((Phi,Nq)=>{"use strict";var i6t=bi(),r6t=we(),n6t=Iv();Nq.exports=!i6t&&!r6t(function(){return Object.defineProperty(n6t("div"),"a",{get:function(){return 7}}).a!==7})});var ca=k(Qq=>{"use strict";var a6t=bi(),o6t=si(),s6t=pv(),l6t=ko(),c6t=Mn(),d6t=Ad(),u6t=Pi(),g6t=pE(),Oq=Object.getOwnPropertyDescriptor;Qq.f=a6t?Oq:function(t,r){if(t=c6t(t),r=d6t(r),g6t)try{return Oq(t,r)}catch{}if(u6t(t,r))return l6t(!o6t(s6t.f,t,r),t[r])}});var bE=k((qhi,Tq)=>{"use strict";var h6t=bi(),m6t=we();Tq.exports=h6t&&m6t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var gi=k(($hi,Jq)=>{"use strict";var p6t=xi(),b6t=String,f6t=TypeError;Jq.exports=function(e){if(p6t(e))return e;throw new f6t(b6t(e)+" is not an object")}});var Qr=k(_q=>{"use strict";var I6t=bi(),v6t=pE(),G6t=bE(),YR=gi(),Hq=Ad(),y6t=TypeError,fE=Object.defineProperty,C6t=Object.getOwnPropertyDescriptor,IE="enumerable",vE="configurable",GE="writable";_q.f=I6t?G6t?function(t,r,n){if(YR(t),r=Hq(r),YR(n),typeof t=="function"&&r==="prototype"&&"value"in n&&GE in n&&!n[GE]){var a=C6t(t,r);a&&a[GE]&&(t[r]=n.value,n={configurable:vE in n?n[vE]:a[vE],enumerable:IE in n?n[IE]:a[IE],writable:!1})}return fE(t,r,n)}:fE:function(t,r,n){if(YR(t),r=Hq(r),YR(n),v6t)try{return fE(t,r,n)}catch{}if("get"in n||"set"in n)throw new y6t("Accessors not supported");return"value"in n&&(t[r]=n.value),t}});var da=k((emi,jq)=>{"use strict";var x6t=bi(),Z6t=Qr(),R6t=ko();jq.exports=x6t?function(e,t,r){return Z6t.f(e,t,R6t(1,r))}:function(e,t,r){return e[t]=r,e}});var Th=k((imi,Dq)=>{"use strict";var yE=bi(),A6t=Pi(),zq=Function.prototype,B6t=yE&&Object.getOwnPropertyDescriptor,CE=A6t(zq,"name"),X6t=CE&&(function(){}).name==="something",W6t=CE&&(!yE||yE&&B6t(zq,"name").configurable);Dq.exports={EXISTS:CE,PROPER:X6t,CONFIGURABLE:W6t}});var ER=k((rmi,Mq)=>{"use strict";var F6t=Qe(),V6t=ar(),xE=bv(),k6t=F6t(Function.toString);V6t(xE.inspectSource)||(xE.inspectSource=function(e){return k6t(e)});Mq.exports=xE.inspectSource});var ZE=k((nmi,Kq)=>{"use strict";var S6t=ze(),L6t=ar(),Pq=S6t.WeakMap;Kq.exports=L6t(Pq)&&/native code/.test(String(Pq))});var vv=k((ami,$q)=>{"use strict";var w6t=Qh(),U6t=Yu(),qq=w6t("keys");$q.exports=function(e){return qq[e]||(qq[e]=U6t(e))}});var ub=k((omi,t$)=>{"use strict";t$.exports={}});var Tr=k((smi,r$)=>{"use strict";var Y6t=ZE(),i$=ze(),E6t=xi(),N6t=da(),RE=Pi(),AE=bv(),O6t=vv(),Q6t=ub(),e$="Object already initialized",BE=i$.TypeError,T6t=i$.WeakMap,NR,Gv,OR,J6t=function(e){return OR(e)?Gv(e):NR(e,{})},H6t=function(e){return function(t){var r;if(!E6t(t)||(r=Gv(t)).type!==e)throw new BE("Incompatible receiver, "+e+" required");return r}};Y6t||AE.state?(Vl=AE.state||(AE.state=new T6t),Vl.get=Vl.get,Vl.has=Vl.has,Vl.set=Vl.set,NR=function(e,t){if(Vl.has(e))throw new BE(e$);return t.facade=e,Vl.set(e,t),t},Gv=function(e){return Vl.get(e)||{}},OR=function(e){return Vl.has(e)}):(Jh=O6t("state"),Q6t[Jh]=!0,NR=function(e,t){if(RE(e,Jh))throw new BE(e$);return t.facade=e,N6t(e,Jh,t),t},Gv=function(e){return RE(e,Jh)?e[Jh]:{}},OR=function(e){return RE(e,Jh)});var Vl,Jh;r$.exports={set:NR,get:Gv,has:OR,enforce:J6t,getterFor:H6t}});var JR=k((lmi,o$)=>{"use strict";var WE=Qe(),_6t=we(),j6t=ar(),QR=Pi(),XE=bi(),z6t=Th().CONFIGURABLE,D6t=ER(),a$=Tr(),M6t=a$.enforce,P6t=a$.get,n$=String,TR=Object.defineProperty,K6t=WE("".slice),q6t=WE("".replace),$6t=WE([].join),t8t=XE&&!_6t(function(){return TR(function(){},"length",{value:8}).length!==8}),e8t=String(String).split("String"),i8t=o$.exports=function(e,t,r){K6t(n$(t),0,7)==="Symbol("&&(t="["+q6t(n$(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!QR(e,"name")||z6t&&e.name!==t)&&(XE?TR(e,"name",{value:t,configurable:!0}):e.name=t),t8t&&r&&QR(r,"arity")&&e.length!==r.arity&&TR(e,"length",{value:r.arity});try{r&&QR(r,"constructor")&&r.constructor?XE&&TR(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var n=M6t(e);return QR(n,"source")||(n.source=$6t(e8t,typeof t=="string"?t:"")),e};Function.prototype.toString=i8t(function(){return j6t(this)&&P6t(this).source||D6t(this)},"toString")});var Rr=k((cmi,s$)=>{"use strict";var r8t=ar(),n8t=Qr(),a8t=JR(),o8t=UR();s$.exports=function(e,t,r,n){n||(n={});var a=n.enumerable,o=n.name!==void 0?n.name:t;if(r8t(r)&&a8t(r,o,n),n.global)a?e[t]=r:o8t(t,r);else{try{n.unsafe?e[t]&&(a=!0):delete e[t]}catch{}a?e[t]=r:n8t.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}});var FE=k((dmi,l$)=>{"use strict";var s8t=Math.ceil,l8t=Math.floor;l$.exports=Math.trunc||function(t){var r=+t;return(r>0?l8t:s8t)(r)}});var ln=k((umi,c$)=>{"use strict";var c8t=FE();c$.exports=function(e){var t=+e;return t!==t||t===0?0:c8t(t)}});var yc=k((gmi,d$)=>{"use strict";var d8t=ln(),u8t=Math.max,g8t=Math.min;d$.exports=function(e,t){var r=d8t(e);return r<0?u8t(r+t,0):g8t(r,t)}});var So=k((hmi,u$)=>{"use strict";var h8t=ln(),m8t=Math.min;u$.exports=function(e){var t=h8t(e);return t>0?m8t(t,9007199254740991):0}});var fr=k((mmi,g$)=>{"use strict";var p8t=So();g$.exports=function(e){return p8t(e.length)}});var gb=k((pmi,m$)=>{"use strict";var b8t=Mn(),f8t=yc(),I8t=fr(),h$=function(e){return function(t,r,n){var a=b8t(t),o=I8t(a);if(o===0)return!e&&-1;var s=f8t(n,o),l;if(e&&r!==r){for(;o>s;)if(l=a[s++],l!==l)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}};m$.exports={includes:h$(!0),indexOf:h$(!1)}});var kE=k((bmi,b$)=>{"use strict";var v8t=Qe(),VE=Pi(),G8t=Mn(),y8t=gb().indexOf,C8t=ub(),p$=v8t([].push);b$.exports=function(e,t){var r=G8t(e),n=0,a=[],o;for(o in r)!VE(C8t,o)&&VE(r,o)&&p$(a,o);for(;t.length>n;)VE(r,o=t[n++])&&(~y8t(a,o)||p$(a,o));return a}});var HR=k((fmi,f$)=>{"use strict";f$.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Eu=k(I$=>{"use strict";var x8t=kE(),Z8t=HR(),R8t=Z8t.concat("length","prototype");I$.f=Object.getOwnPropertyNames||function(t){return x8t(t,R8t)}});var yv=k(v$=>{"use strict";v$.f=Object.getOwnPropertySymbols});var _R=k((Gmi,G$)=>{"use strict";var A8t=Mi(),B8t=Qe(),X8t=Eu(),W8t=yv(),F8t=gi(),V8t=B8t([].concat);G$.exports=A8t("Reflect","ownKeys")||function(t){var r=X8t.f(F8t(t)),n=W8t.f;return n?V8t(r,n(t)):r}});var Hh=k((ymi,C$)=>{"use strict";var y$=Pi(),k8t=_R(),S8t=ca(),L8t=Qr();C$.exports=function(e,t,r){for(var n=k8t(t),a=L8t.f,o=S8t.f,s=0;s{"use strict";var w8t=we(),U8t=ar(),Y8t=/#|\.prototype\./,Cv=function(e,t){var r=N8t[E8t(e)];return r===Q8t?!0:r===O8t?!1:U8t(t)?w8t(t):!!t},E8t=Cv.normalize=function(e){return String(e).replace(Y8t,".").toLowerCase()},N8t=Cv.data={},O8t=Cv.NATIVE="N",Q8t=Cv.POLYFILL="P";x$.exports=Cv});var Ut=k((xmi,Z$)=>{"use strict";var jR=ze(),T8t=ca().f,J8t=da(),H8t=Rr(),_8t=UR(),j8t=Hh(),z8t=hb();Z$.exports=function(e,t){var r=e.target,n=e.global,a=e.stat,o,s,l,c,u,g;if(n?s=jR:a?s=jR[r]||_8t(r,{}):s=jR[r]&&jR[r].prototype,s)for(l in t){if(u=t[l],e.dontCallGetSet?(g=T8t(s,l),c=g&&g.value):c=s[l],o=z8t(n?l:r+(a?".":"#")+l,e.forced),!o&&c!==void 0){if(typeof u==typeof c)continue;j8t(u,c)}(e.sham||c&&c.sham)&&J8t(u,"sham",!0),H8t(s,l,u,e)}}});var zR=k((Zmi,A$)=>{"use strict";var D8t=Wi(),M8t=D8t("toStringTag"),R$={};R$[M8t]="z";A$.exports=String(R$)==="[object z]"});var Lo=k((Rmi,B$)=>{"use strict";var P8t=zR(),K8t=ar(),DR=Xa(),q8t=Wi(),$8t=q8t("toStringTag"),tPt=Object,ePt=DR((function(){return arguments})())==="Arguments",iPt=function(e,t){try{return e[t]}catch{}};B$.exports=P8t?DR:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=iPt(t=tPt(e),$8t))=="string"?r:ePt?DR(t):(n=DR(t))==="Object"&&K8t(t.callee)?"Arguments":n}});var Li=k((Ami,X$)=>{"use strict";var rPt=Lo(),nPt=String;X$.exports=function(e){if(rPt(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return nPt(e)}});var mb=k((Bmi,W$)=>{"use strict";var aPt=kE(),oPt=HR();W$.exports=Object.keys||function(t){return aPt(t,oPt)}});var MR=k(F$=>{"use strict";var sPt=bi(),lPt=bE(),cPt=Qr(),dPt=gi(),uPt=Mn(),gPt=mb();F$.f=sPt&&!lPt?Object.defineProperties:function(t,r){dPt(t);for(var n=uPt(r),a=gPt(r),o=a.length,s=0,l;o>s;)cPt.f(t,l=a[s++],n[l]);return t}});var SE=k((Wmi,V$)=>{"use strict";var hPt=Mi();V$.exports=hPt("document","documentElement")});var ua=k((Fmi,E$)=>{"use strict";var mPt=gi(),pPt=MR(),k$=HR(),bPt=ub(),fPt=SE(),IPt=Iv(),vPt=vv(),S$=">",L$="<",wE="prototype",UE="script",U$=vPt("IE_PROTO"),LE=function(){},Y$=function(e){return L$+UE+S$+e+L$+"/"+UE+S$},w$=function(e){e.write(Y$("")),e.close();var t=e.parentWindow.Object;return e=null,t},GPt=function(){var e=IPt("iframe"),t="java"+UE+":",r;return e.style.display="none",fPt.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(Y$("document.F=Object")),r.close(),r.F},PR,KR=function(){try{PR=new ActiveXObject("htmlfile")}catch{}KR=typeof document<"u"?document.domain&&PR?w$(PR):GPt():w$(PR);for(var e=k$.length;e--;)delete KR[wE][k$[e]];return KR()};bPt[U$]=!0;E$.exports=Object.create||function(t,r){var n;return t!==null?(LE[wE]=mPt(t),n=new LE,LE[wE]=null,n[U$]=t):n=KR(),r===void 0?n:pPt.f(n,r)}});var hs=k((Vmi,N$)=>{"use strict";var yPt=Qe();N$.exports=yPt([].slice)});var qR=k((kmi,T$)=>{"use strict";var CPt=Xa(),xPt=Mn(),O$=Eu().f,ZPt=hs(),Q$=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],RPt=function(e){try{return O$(e)}catch{return ZPt(Q$)}};T$.exports.f=function(t){return Q$&&CPt(t)==="Window"?RPt(t):O$(xPt(t))}});var vn=k((Smi,H$)=>{"use strict";var J$=JR(),APt=Qr();H$.exports=function(e,t,r){return r.get&&J$(r.get,t,{getter:!0}),r.set&&J$(r.set,t,{setter:!0}),APt.f(e,t,r)}});var YE=k(_$=>{"use strict";var BPt=Wi();_$.f=BPt});var xv=k((wmi,j$)=>{"use strict";var XPt=ze();j$.exports=XPt});var Wa=k((Umi,D$)=>{"use strict";var z$=xv(),WPt=Pi(),FPt=YE(),VPt=Qr().f;D$.exports=function(e){var t=z$.Symbol||(z$.Symbol={});WPt(t,e)||VPt(t,e,{value:FPt.f(e)})}});var EE=k((Ymi,M$)=>{"use strict";var kPt=si(),SPt=Mi(),LPt=Wi(),wPt=Rr();M$.exports=function(){var e=SPt("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=LPt("toPrimitive");t&&!t[n]&&wPt(t,n,function(a){return kPt(r,this)},{arity:1})}});var mo=k((Emi,K$)=>{"use strict";var UPt=Qr().f,YPt=Pi(),EPt=Wi(),P$=EPt("toStringTag");K$.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!YPt(e,P$)&&UPt(e,P$,{configurable:!0,value:t})}});var Nu=k((Nmi,q$)=>{"use strict";var NPt=Xa(),OPt=Qe();q$.exports=function(e){if(NPt(e)==="Function")return OPt(e)}});var wo=k((Omi,ttt)=>{"use strict";var $$=Nu(),QPt=Hi(),TPt=cb(),JPt=$$($$.bind);ttt.exports=function(e,t){return QPt(e),t===void 0?e:TPt?JPt(e,t):function(){return e.apply(t,arguments)}}});var Cc=k((Qmi,ett)=>{"use strict";var HPt=Xa();ett.exports=Array.isArray||function(t){return HPt(t)==="Array"}});var Ou=k((Tmi,ott)=>{"use strict";var _Pt=Qe(),jPt=we(),itt=ar(),zPt=Lo(),DPt=Mi(),MPt=ER(),rtt=function(){},ntt=DPt("Reflect","construct"),NE=/^\s*(?:class|function)\b/,PPt=_Pt(NE.exec),KPt=!NE.test(rtt),Zv=function(t){if(!itt(t))return!1;try{return ntt(rtt,[],t),!0}catch{return!1}},att=function(t){if(!itt(t))return!1;switch(zPt(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return KPt||!!PPt(NE,MPt(t))}catch{return!0}};att.sham=!0;ott.exports=!ntt||jPt(function(){var e;return Zv(Zv.call)||!Zv(Object)||!Zv(function(){e=!0})||e})?att:Zv});var dtt=k((Jmi,ctt)=>{"use strict";var stt=Cc(),qPt=Ou(),$Pt=xi(),tKt=Wi(),eKt=tKt("species"),ltt=Array;ctt.exports=function(e){var t;return stt(e)&&(t=e.constructor,qPt(t)&&(t===ltt||stt(t.prototype))?t=void 0:$Pt(t)&&(t=t[eKt],t===null&&(t=void 0))),t===void 0?ltt:t}});var pb=k((Hmi,utt)=>{"use strict";var iKt=dtt();utt.exports=function(e,t){return new(iKt(e))(t===0?0:t)}});var Yn=k((_mi,gtt)=>{"use strict";var rKt=bi(),nKt=Qr(),aKt=ko();gtt.exports=function(e,t,r){rKt?nKt.f(e,t,aKt(0,r)):e[t]=r}});var ga=k((jmi,mtt)=>{"use strict";var oKt=wo(),sKt=Oh(),lKt=pr(),cKt=fr(),htt=pb(),OE=Yn(),Qu=function(e){var t=e===1,r=e===2,n=e===3,a=e===4,o=e===6,s=e===7,l=e===5||o;return function(c,u,g){for(var d=lKt(c),h=sKt(d),m=cKt(h),p=oKt(u,g),b=0,f=0,v=t?htt(c,m):r||s?htt(c,0):void 0,y,x;m>b;b++)if((l||b in h)&&(y=h[b],x=p(y,b,d),e))if(t)OE(v,b,x);else if(x)switch(e){case 3:return!0;case 5:return y;case 6:return b;case 2:OE(v,f++,y)}else switch(e){case 4:return!1;case 7:OE(v,f++,y)}return o?-1:n||a?a:v}};mtt.exports={forEach:Qu(0),map:Qu(1),filter:Qu(2),some:Qu(3),every:Qu(4),find:Qu(5),findIndex:Qu(6),filterReject:Qu(7)}});var Vtt=k(()=>{"use strict";var tA=Ut(),Bv=ze(),ME=si(),dKt=Qe(),uKt=cr(),bb=bi(),fb=Lu(),gKt=we(),ha=Pi(),hKt=Ma(),HE=gi(),eA=Mn(),PE=Ad(),mKt=Li(),_E=ko(),Ib=ua(),ftt=mb(),pKt=Eu(),Itt=qR(),bKt=yv(),vtt=ca(),Gtt=Qr(),fKt=MR(),ytt=pv(),QE=Rr(),IKt=vn(),KE=Qh(),vKt=vv(),Ctt=ub(),ptt=Yu(),GKt=Wi(),yKt=YE(),CKt=Wa(),xKt=EE(),ZKt=mo(),xtt=Tr(),iA=ga().forEach,Uo=vKt("hidden"),rA="Symbol",Av="prototype",RKt=xtt.set,btt=xtt.getterFor(rA),Os=Object[Av],_h=Bv.Symbol,Rv=_h&&_h[Av],AKt=Bv.RangeError,BKt=Bv.TypeError,TE=Bv.QObject,Ztt=vtt.f,jh=Gtt.f,Rtt=Itt.f,XKt=ytt.f,Att=dKt([].push),Bd=KE("symbols"),Xv=KE("op-symbols"),WKt=KE("wks"),jE=!TE||!TE[Av]||!TE[Av].findChild,Btt=function(e,t,r){var n=Ztt(Os,t);n&&delete Os[t],jh(e,t,r),n&&e!==Os&&jh(Os,t,n)},zE=bb&&gKt(function(){return Ib(jh({},"a",{get:function(){return jh(this,"a",{value:7}).a}})).a!==7})?Btt:jh,JE=function(e,t){var r=Bd[e]=Ib(Rv);return RKt(r,{type:rA,tag:e,description:t}),bb||(r.description=t),r},nA=function(t,r,n){t===Os&&nA(Xv,r,n),HE(t);var a=PE(r);return HE(n),ha(Bd,a)?(n.enumerable?(ha(t,Uo)&&t[Uo][a]&&(t[Uo][a]=!1),n=Ib(n,{enumerable:_E(0,!1)})):(ha(t,Uo)||jh(t,Uo,_E(1,Ib(null))),t[Uo][a]=!0),zE(t,a,n)):jh(t,a,n)},qE=function(t,r){HE(t);var n=eA(r),a=ftt(n).concat(Ftt(n));return iA(a,function(o){(!bb||ME(DE,n,o))&&nA(t,o,n[o])}),t},FKt=function(t,r){return r===void 0?Ib(t):qE(Ib(t),r)},DE=function(t){var r=PE(t),n=ME(XKt,this,r);return this===Os&&ha(Bd,r)&&!ha(Xv,r)?!1:n||!ha(this,r)||!ha(Bd,r)||ha(this,Uo)&&this[Uo][r]?n:!0},Xtt=function(t,r){var n=eA(t),a=PE(r);if(!(n===Os&&ha(Bd,a)&&!ha(Xv,a))){var o=Ztt(n,a);return o&&ha(Bd,a)&&!(ha(n,Uo)&&n[Uo][a])&&(o.enumerable=!0),o}},Wtt=function(t){var r=Rtt(eA(t)),n=[];return iA(r,function(a){!ha(Bd,a)&&!ha(Ctt,a)&&Att(n,a)}),n},Ftt=function(e){var t=e===Os,r=Rtt(t?Xv:eA(e)),n=[];return iA(r,function(a){ha(Bd,a)&&(!t||ha(Os,a))&&Att(n,Bd[a])}),n};fb||(_h=function(){if(hKt(Rv,this))throw new BKt("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:mKt(arguments[0]),r=ptt(t),n=function(a){var o=this===void 0?Bv:this;o===Os&&ME(n,Xv,a),ha(o,Uo)&&ha(o[Uo],r)&&(o[Uo][r]=!1);var s=_E(1,a);try{zE(o,r,s)}catch(l){if(!(l instanceof AKt))throw l;Btt(o,r,s)}};return bb&&jE&&zE(Os,r,{configurable:!0,set:n}),JE(r,t)},Rv=_h[Av],QE(Rv,"toString",function(){return btt(this).tag}),QE(_h,"withoutSetter",function(e){return JE(ptt(e),e)}),ytt.f=DE,Gtt.f=nA,fKt.f=qE,vtt.f=Xtt,pKt.f=Itt.f=Wtt,bKt.f=Ftt,yKt.f=function(e){return JE(GKt(e),e)},bb&&(IKt(Rv,"description",{configurable:!0,get:function(){return btt(this).description}}),uKt||QE(Os,"propertyIsEnumerable",DE,{unsafe:!0})));tA({global:!0,constructor:!0,wrap:!0,forced:!fb,sham:!fb},{Symbol:_h});iA(ftt(WKt),function(e){CKt(e)});tA({target:rA,stat:!0,forced:!fb},{useSetter:function(){jE=!0},useSimple:function(){jE=!1}});tA({target:"Object",stat:!0,forced:!fb,sham:!bb},{create:FKt,defineProperty:nA,defineProperties:qE,getOwnPropertyDescriptor:Xtt});tA({target:"Object",stat:!0,forced:!fb},{getOwnPropertyNames:Wtt});xKt();ZKt(_h,rA);Ctt[Uo]=!0});var $E=k((Mmi,ktt)=>{"use strict";var VKt=Lu();ktt.exports=VKt&&!!Symbol.for&&!!Symbol.keyFor});var Ltt=k(()=>{"use strict";var kKt=Ut(),SKt=Mi(),LKt=Pi(),wKt=Li(),Stt=Qh(),UKt=$E(),tN=Stt("string-to-symbol-registry"),YKt=Stt("symbol-to-string-registry");kKt({target:"Symbol",stat:!0,forced:!UKt},{for:function(e){var t=wKt(e);if(LKt(tN,t))return tN[t];var r=SKt("Symbol")(t);return tN[t]=r,YKt[r]=t,r}})});var Utt=k(()=>{"use strict";var EKt=Ut(),NKt=Pi(),OKt=wu(),QKt=Uu(),TKt=Qh(),JKt=$E(),wtt=TKt("symbol-to-string-registry");EKt({target:"Symbol",stat:!0,forced:!JKt},{keyFor:function(t){if(!OKt(t))throw new TypeError(QKt(t)+" is not a symbol");if(NKt(wtt,t))return wtt[t]}})});var Yo=k((tpi,Ott)=>{"use strict";var HKt=cb(),Ntt=Function.prototype,Ytt=Ntt.apply,Ett=Ntt.call;Ott.exports=typeof Reflect=="object"&&Reflect.apply||(HKt?Ett.bind(Ytt):function(){return Ett.apply(Ytt,arguments)})});var eN=k((epi,Qtt)=>{"use strict";var _Kt=xi(),jKt=Tr().get;Qtt.exports=function(t){if(!_Kt(t))return!1;var r=jKt(t);return!!r&&r.type==="RawJSON"}});var rN=k((ipi,_tt)=>{"use strict";var iN=Qe(),zKt=Pi(),aA=SyntaxError,DKt=parseInt,MKt=String.fromCharCode,PKt=iN("".charAt),Ttt=iN("".slice),Jtt=iN(/./.exec),Htt={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":` `,"\\r":"\r","\\t":" "},KKt=/^[\da-f]{4}$/i,qKt=/^[\u0000-\u001F]$/;_tt.exports=function(e,t){for(var r=!0,n="";t{"use strict";var $Kt=we();jtt.exports=!$Kt(function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e})});var cN=k(()=>{"use strict";var tqt=Ut(),tet=Mi(),eqt=Yo(),eet=si(),zh=Qe(),iet=we(),ztt=Cc(),lA=ar(),iqt=eN(),Dtt=wu(),Mtt=Xa(),rqt=Li(),nqt=hs(),aqt=rN(),oqt=Yu(),sqt=Lu(),nN=oA(),ret=String,Tu=tet("JSON","stringify"),sA=zh(/./.exec),oN=zh("".charAt),lqt=zh("".charCodeAt),cqt=zh("".replace),aN=zh("".slice),sN=zh([].push),dqt=zh(1.1.toString),uqt=/[\uD800-\uDFFF]/g,Ptt=/^[\uD800-\uDBFF]$/,Ktt=/^[\uDC00-\uDFFF]$/,lN=oqt(),qtt=lN.length,net=!sqt||iet(function(){var e=tet("Symbol")("stringify detection");return Tu([e])!=="[null]"||Tu({a:e})!=="{}"||Tu(Object(e))!=="{}"}),$tt=iet(function(){return Tu("\uDF06\uD834")!=='"\\udf06\\ud834"'||Tu("\uDEAD")!=='"\\udead"'}),gqt=net?function(e,t){var r=nqt(arguments),n=aet(t);if(!(!lA(n)&&(e===void 0||Dtt(e))))return r[1]=function(a,o){if(lA(n)&&(o=eet(n,this,ret(a),o)),!Dtt(o))return o},eqt(Tu,null,r)}:Tu,hqt=function(e,t,r){var n=oN(r,t-1),a=oN(r,t+1);return sA(Ptt,e)&&!sA(Ktt,a)||sA(Ktt,e)&&!sA(Ptt,n)?"\\u"+dqt(lqt(e,0),16):e},aet=function(e){if(lA(e))return e;if(ztt(e)){for(var t=e.length,r=[],n=0;n{"use strict";var mqt=Ut(),pqt=Lu(),bqt=we(),oet=yv(),fqt=pr(),Iqt=!pqt||bqt(function(){oet.f(1)});mqt({target:"Object",stat:!0,forced:Iqt},{getOwnPropertySymbols:function(t){var r=oet.f;return r?r(fqt(t)):[]}})});var cet=k(()=>{"use strict";Vtt();Ltt();Utt();cN();set()});var bet=k(()=>{"use strict";var vqt=Ut(),Gqt=bi(),yqt=ze(),cA=Qe(),Cqt=Pi(),xqt=ar(),Zqt=Ma(),Rqt=Li(),Aqt=vn(),Bqt=Hh(),Xd=yqt.Symbol,Dh=Xd&&Xd.prototype;Gqt&&xqt(Xd)&&(!("description"in Dh)||Xd().description!==void 0)&&(dN={},Wv=function(){var t=arguments.length<1||arguments[0]===void 0?void 0:Rqt(arguments[0]),r=Zqt(Dh,this)?new Xd(t):t===void 0?Xd():Xd(t);return t===""&&(dN[r]=!0),r},Bqt(Wv,Xd),Wv.prototype=Dh,Dh.constructor=Wv,det=String(Xd("description detection"))==="Symbol(description detection)",uet=cA(Dh.valueOf),get=cA(Dh.toString),het=/^Symbol\((.*)\)[^)]+$/,met=cA("".replace),pet=cA("".slice),Aqt(Dh,"description",{configurable:!0,get:function(){var t=uet(this);if(Cqt(dN,t))return"";var r=get(t),n=det?pet(r,7,-1):met(r,het,"$1");return n===""?void 0:n}}),vqt({global:!0,constructor:!0,forced:!0},{Symbol:Wv}));var dN,Wv,det,uet,get,het,met,pet});var fet=k(()=>{"use strict";var Xqt=ze(),Wqt=Wa(),Fqt=Qr().f,Vqt=ca().f,uN=Xqt.Symbol;Wqt("asyncDispose");uN&&(Fv=Vqt(uN,"asyncDispose"),Fv.enumerable&&Fv.configurable&&Fv.writable&&Fqt(uN,"asyncDispose",{value:Fv.value,enumerable:!1,configurable:!1,writable:!1}));var Fv});var Iet=k(()=>{"use strict";var kqt=Wa();kqt("asyncIterator")});var vet=k(()=>{"use strict";var Sqt=ze(),Lqt=Wa(),wqt=Qr().f,Uqt=ca().f,gN=Sqt.Symbol;Lqt("dispose");gN&&(Vv=Uqt(gN,"dispose"),Vv.enumerable&&Vv.configurable&&Vv.writable&&wqt(gN,"dispose",{value:Vv.value,enumerable:!1,configurable:!1,writable:!1}));var Vv});var Get=k(()=>{"use strict";var Yqt=Wa();Yqt("hasInstance")});var yet=k(()=>{"use strict";var Eqt=Wa();Eqt("isConcatSpreadable")});var Cet=k(()=>{"use strict";var Nqt=Wa();Nqt("iterator")});var xet=k(()=>{"use strict";var Oqt=Wa();Oqt("match")});var Zet=k(()=>{"use strict";var Qqt=Wa();Qqt("matchAll")});var Ret=k(()=>{"use strict";var Tqt=Wa();Tqt("replace")});var Aet=k(()=>{"use strict";var Jqt=Wa();Jqt("search")});var Bet=k(()=>{"use strict";var Hqt=Wa();Hqt("species")});var Xet=k(()=>{"use strict";var _qt=Wa();_qt("split")});var Wet=k(()=>{"use strict";var jqt=Wa(),zqt=EE();jqt("toPrimitive");zqt()});var Fet=k(()=>{"use strict";var Dqt=Mi(),Mqt=Wa(),Pqt=mo();Mqt("toStringTag");Pqt(Dqt("Symbol"),"Symbol")});var Vet=k(()=>{"use strict";var Kqt=Wa();Kqt("unscopables")});var kv=k((Tpi,ket)=>{"use strict";var qqt=Qe(),$qt=Hi();ket.exports=function(e,t,r){try{return qqt($qt(Object.getOwnPropertyDescriptor(e,t)[r]))}catch{}}});var hN=k((Jpi,Let)=>{"use strict";var t$t=xi();Let.exports=function(e){return t$t(e)||e===null}});var mN=k((Hpi,wet)=>{"use strict";var e$t=hN(),i$t=String,r$t=TypeError;wet.exports=function(e){if(e$t(e))return e;throw new r$t("Can't set "+i$t(e)+" as a prototype")}});var Qs=k((_pi,Uet)=>{"use strict";var n$t=kv(),a$t=xi(),o$t=zr(),s$t=mN();Uet.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var e=!1,t={},r;try{r=n$t(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch{}return function(a,o){return o$t(a),s$t(o),a$t(a)&&(e?r(a,o):a.__proto__=o),a}})():void 0)});var pN=k((jpi,Yet)=>{"use strict";var l$t=Qr().f;Yet.exports=function(e,t,r){r in e||l$t(e,r,{configurable:!0,get:function(){return t[r]},set:function(n){t[r]=n}})}});var Ju=k((zpi,Net)=>{"use strict";var c$t=ar(),d$t=xi(),Eet=Qs();Net.exports=function(e,t,r){var n,a;return Eet&&c$t(n=t.constructor)&&n!==r&&d$t(a=n.prototype)&&a!==r.prototype&&Eet(e,a),e}});var Mh=k((Dpi,Oet)=>{"use strict";var u$t=Li();Oet.exports=function(e,t){return e===void 0?arguments.length<2?"":t:u$t(e)}});var bN=k((Mpi,Qet)=>{"use strict";var g$t=xi(),h$t=da();Qet.exports=function(e,t){g$t(t)&&"cause"in t&&h$t(e,"cause",t.cause)}});var dA=k((Ppi,Het)=>{"use strict";var m$t=Qe(),Tet=Error,p$t=m$t("".replace),b$t=(function(e){return String(new Tet(e).stack)})("zxcasd"),Jet=/\n\s*at [^:]*:[^\n]*/,f$t=Jet.test(b$t);Het.exports=function(e,t){if(f$t&&typeof e=="string"&&!Tet.prepareStackTrace)for(;t--;)e=p$t(e,Jet,"");return e}});var fN=k((Kpi,_et)=>{"use strict";var I$t=we(),v$t=ko();_et.exports=!I$t(function(){var e=new Error("a");return"stack"in e?(Object.defineProperty(e,"stack",v$t(1,7)),e.stack!==7):!0})});var uA=k((qpi,zet)=>{"use strict";var G$t=da(),y$t=dA(),C$t=fN(),jet=Error.captureStackTrace;zet.exports=function(e,t,r,n){C$t&&(jet?jet(e,t):G$t(e,"stack",y$t(r,n)))}});var IN=k(($pi,tit)=>{"use strict";var Det=Mi(),x$t=Pi(),Met=da(),Z$t=Ma(),Pet=Qs(),Ket=Hh(),qet=pN(),R$t=Ju(),A$t=Mh(),B$t=bN(),X$t=uA(),W$t=bi(),$et=cr();tit.exports=function(e,t,r,n){var a="stackTraceLimit",o=n?2:1,s=e.split("."),l=s[s.length-1],c=Det.apply(null,s);if(c){var u=c.prototype;if(!$et&&x$t(u,"cause")&&delete u.cause,!r)return c;var g=Det("Error"),d=t(function(h,m){var p=A$t(n?m:h,void 0),b=n?new c(h):new c;return p!==void 0&&Met(b,"message",p),X$t(b,d,b.stack,2),this&&Z$t(u,this)&&R$t(b,this,d),arguments.length>o&&B$t(b,arguments[o]),b});if(d.prototype=u,l!=="Error"?Pet?Pet(d,g):Ket(d,g,{name:!0}):W$t&&a in c&&(qet(d,c,a),qet(d,c,"prepareStackTrace")),Ket(d,c),!$et)try{u.name!==l&&Met(u,"name",l),u.constructor=d}catch{}return d}}});var nit=k(()=>{"use strict";var iit=Ut(),F$t=ze(),xc=Yo(),rit=IN(),vN="WebAssembly",eit=F$t[vN],gA=new Error("e",{cause:7}).cause!==7,Ph=function(e,t){var r={};r[e]=rit(e,t,gA),iit({global:!0,constructor:!0,arity:1,forced:gA},r)},GN=function(e,t){if(eit&&eit[e]){var r={};r[e]=rit(vN+"."+e,t,gA),iit({target:vN,stat:!0,constructor:!0,arity:1,forced:gA},r)}};Ph("Error",function(e){return function(r){return xc(e,this,arguments)}});Ph("EvalError",function(e){return function(r){return xc(e,this,arguments)}});Ph("RangeError",function(e){return function(r){return xc(e,this,arguments)}});Ph("ReferenceError",function(e){return function(r){return xc(e,this,arguments)}});Ph("SyntaxError",function(e){return function(r){return xc(e,this,arguments)}});Ph("TypeError",function(e){return function(r){return xc(e,this,arguments)}});Ph("URIError",function(e){return function(r){return xc(e,this,arguments)}});GN("CompileError",function(e){return function(r){return xc(e,this,arguments)}});GN("LinkError",function(e){return function(r){return xc(e,this,arguments)}});GN("RuntimeError",function(e){return function(r){return xc(e,this,arguments)}})});var lit=k(()=>{"use strict";var V$t=Ut(),oit=Mi(),k$t=xi(),S$t=Lo(),L$t=we(),sit="Error",CN="DOMException",w$t=Object.setPrototypeOf||{}.__proto__,ait=oit(CN),yN=Error,hA=yN.isError,U$t=!hA||!w$t||L$t(function(){return ait&&!hA(new ait(CN))||!hA(new yN(sit,{cause:function(){}}))||hA(oit("Object","create")(yN.prototype))});V$t({target:"Error",stat:!0,sham:!0,forced:U$t},{isError:function(t){if(!k$t(t))return!1;var r=S$t(t);return r===sit||r===CN}})});var xN=k((nbi,dit)=>{"use strict";var Y$t=bi(),E$t=we(),N$t=gi(),cit=Mh(),mA=Error.prototype.toString,O$t=E$t(function(){if(Y$t){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if(mA.call(e)!=="true")return!0}return mA.call({message:1,name:2})!=="2: 1"||mA.call({})!=="Error"});dit.exports=O$t?function(){var t=N$t(this),r=cit(t.name,"Error"),n=cit(t.message);return r?n?r+": "+n:r:n}:mA});var hit=k(()=>{"use strict";var Q$t=Rr(),uit=xN(),git=Error.prototype;git.toString!==uit&&Q$t(git,"toString",uit)});var pA=k((sbi,mit)=>{"use strict";var T$t=we();mit.exports=!T$t(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var Pa=k((lbi,bit)=>{"use strict";var J$t=Pi(),H$t=ar(),_$t=pr(),j$t=vv(),z$t=pA(),pit=j$t("IE_PROTO"),ZN=Object,D$t=ZN.prototype;bit.exports=z$t?ZN.getPrototypeOf:function(e){var t=_$t(e);if(J$t(t,pit))return t[pit];var r=t.constructor;return H$t(r)&&t instanceof r?r.prototype:t instanceof ZN?D$t:null}});var vb=k((cbi,fit)=>{"use strict";fit.exports={}});var bA=k((dbi,Iit)=>{"use strict";var M$t=Wi(),P$t=vb(),K$t=M$t("iterator"),q$t=Array.prototype;Iit.exports=function(e){return e!==void 0&&(P$t.Array===e||q$t[K$t]===e)}});var Wd=k((ubi,Git)=>{"use strict";var $$t=Lo(),vit=la(),tte=Gc(),ete=vb(),ite=Wi(),rte=ite("iterator");Git.exports=function(e){if(!tte(e))return vit(e,rte)||vit(e,"@@iterator")||ete[$$t(e)]}});var Kh=k((gbi,yit)=>{"use strict";var nte=si(),ate=Hi(),ote=gi(),ste=Uu(),lte=Wd(),cte=TypeError;yit.exports=function(e,t){var r=arguments.length<2?lte(e):t;if(ate(r))return ote(nte(r,e));throw new cte(ste(e)+" is not iterable")}});var ma=k((hbi,xit)=>{"use strict";var dte=si(),Cit=gi(),ute=la();xit.exports=function(e,t,r){var n,a;Cit(e);try{if(n=ute(e,"return"),!n){if(t==="throw")throw r;return r}n=dte(n,e)}catch(o){a=!0,n=o}if(t==="throw")throw r;if(a)throw n;return Cit(n),r}});var En=k((mbi,Bit)=>{"use strict";var gte=wo(),hte=si(),mte=gi(),pte=Uu(),bte=bA(),fte=fr(),Zit=Ma(),Ite=Kh(),vte=Wd(),Rit=ma(),Gte=TypeError,fA=function(e,t){this.stopped=e,this.result=t},Ait=fA.prototype;Bit.exports=function(e,t,r){var n=r&&r.that,a=!!(r&&r.AS_ENTRIES),o=!!(r&&r.IS_RECORD),s=!!(r&&r.IS_ITERATOR),l=!!(r&&r.INTERRUPTED),c=gte(t,n),u,g,d,h,m,p,b,f=function(y){return u&&Rit(u,"normal"),new fA(!0,y)},v=function(y){return a?(mte(y),l?c(y[0],y[1],f):c(y[0],y[1])):l?c(y,f):c(y)};if(o)u=e.iterator;else if(s)u=e;else{if(g=vte(e),!g)throw new Gte(pte(e)+" is not iterable");if(bte(g)){for(d=0,h=fte(e);h>d;d++)if(m=v(e[d]),m&&Zit(Ait,m))return m;return new fA(!1)}u=Ite(e,g)}for(p=o?e.next:u.next;!(b=hte(p,u)).done;){try{m=v(b.value)}catch(y){Rit(u,"throw",y)}if(typeof m=="object"&&m&&Zit(Ait,m))return m}return new fA(!1)}});var Wit=k(()=>{"use strict";var yte=Ut(),Cte=Ma(),xte=Pa(),IA=Qs(),Zte=Hh(),Xit=ua(),RN=da(),AN=ko(),Rte=bN(),Ate=uA(),Bte=En(),Xte=Mh(),Wte=Wi(),Fte=Wte("toStringTag"),vA=Error,Vte=[].push,Gb=function(t,r){var n=Cte(BN,this),a;IA?a=IA(new vA,n?xte(this):BN):(a=n?this:Xit(BN),RN(a,Fte,"Error")),r!==void 0&&RN(a,"message",Xte(r)),Ate(a,Gb,a.stack,1),arguments.length>2&&Rte(a,arguments[2]);var o=[];return Bte(t,Vte,{that:o}),RN(a,"errors",o),a};IA?IA(Gb,vA):Zte(Gb,vA,{name:!0});var BN=Gb.prototype=Xit(vA.prototype,{constructor:AN(1,Gb),message:AN(1,""),name:AN(1,"AggregateError")});yte({global:!0,constructor:!0,arity:2},{AggregateError:Gb})});var Fit=k(()=>{"use strict";Wit()});var Lit=k(()=>{"use strict";var kte=Ut(),Ste=Mi(),Lte=Yo(),Vit=we(),wte=IN(),XN="AggregateError",kit=Ste(XN),Sit=!Vit(function(){return kit([1]).errors[0]!==1})&&Vit(function(){return kit([1],XN,{cause:7}).cause!==7});kte({global:!0,constructor:!0,arity:2,forced:Sit},{AggregateError:wte(XN,function(e){return function(r,n){return Lte(e,this,arguments)}},Sit,!0)})});var Yit=k(()=>{"use strict";var Ute=Ut(),Yte=ze(),Ete=Ma(),wit=Pa(),yA=Qs(),Nte=Hh(),Uit=ua(),GA=da(),WN=ko(),Ote=uA(),Qte=Mh(),Tte=Wi(),Jte=we(),Hte=cr(),yb=Yte.SuppressedError,_te=Tte("toStringTag"),CA=Error,jte=!!yb&&yb.length!==3,zte=!!yb&&Jte(function(){return new yb(1,2,3,{cause:4}).cause===4}),xA=jte||zte,qh=function(t,r,n){var a=Ete(Sv,this),o;return yA?o=xA&&(!a||wit(this)===Sv)?new yb:yA(new CA,a?wit(this):Sv):(o=a?this:Uit(Sv),GA(o,_te,"Error")),n!==void 0&&GA(o,"message",Qte(n)),Ote(o,qh,o.stack,1),GA(o,"error",t),GA(o,"suppressed",r),o};yA?yA(qh,CA):Nte(qh,CA,{name:!0});var Sv=qh.prototype=xA?yb.prototype:Uit(CA.prototype,{constructor:WN(1,qh),message:WN(1,""),name:WN(1,"SuppressedError")});xA&&!Hte&&(Sv.constructor=qh);Ute({global:!0,constructor:!0,arity:3,forced:xA},{SuppressedError:qh})});var po=k((xbi,Eit)=>{"use strict";var Dte=Wi(),Mte=ua(),Pte=Qr().f,FN=Dte("unscopables"),VN=Array.prototype;VN[FN]===void 0&&Pte(VN,FN,{configurable:!0,value:Mte(null)});Eit.exports=function(e){VN[FN][e]=!0}});var Nit=k(()=>{"use strict";var Kte=Ut(),qte=pr(),$te=fr(),tee=ln(),eee=po();Kte({target:"Array",proto:!0},{at:function(t){var r=qte(this),n=$te(r),a=tee(t),o=a>=0?a:n+a;return o<0||o>=n?void 0:r[o]}});eee("at")});var Hu=k((Abi,Oit)=>{"use strict";var iee=TypeError,ree=9007199254740991;Oit.exports=function(e){if(e>ree)throw iee("Maximum allowed index exceeded");return e}});var Fd=k((Bbi,Qit)=>{"use strict";var nee=bi(),aee=Cc(),oee=TypeError,see=Object.getOwnPropertyDescriptor,lee=nee&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}})();Qit.exports=lee?function(e,t){if(aee(e)&&!see(e,"length").writable)throw new oee("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}});var Cb=k((Xbi,Tit)=>{"use strict";var cee=we(),dee=Wi(),uee=Fl(),gee=dee("species");Tit.exports=function(e){return uee>=51||!cee(function(){var t=[],r=t.constructor={};return r[gee]=function(){return{foo:1}},t[e](Boolean).foo!==1})}});var jit=k(()=>{"use strict";var hee=Ut(),mee=we(),pee=Cc(),bee=xi(),fee=pr(),Iee=fr(),Jit=Hu(),Hit=Yn(),vee=Fd(),Gee=pb(),yee=Cb(),Cee=Wi(),xee=Fl(),_it=Cee("isConcatSpreadable"),Zee=xee>=51||!mee(function(){var e=[];return e[_it]=!1,e.concat()[0]!==e}),Ree=function(e){if(!bee(e))return!1;var t=e[_it];return t!==void 0?!!t:pee(e)},Aee=!Zee||!yee("concat");hee({target:"Array",proto:!0,arity:1,forced:Aee},{concat:function(t){var r=fee(this),n=Gee(r,0),a=0,o,s,l,c,u;for(o=-1,l=arguments.length;o{"use strict";var zit=Uu(),Bee=TypeError;Dit.exports=function(e,t){if(!delete e[t])throw new Bee("Cannot delete property "+zit(t)+" of "+zit(e))}});var SN=k((kbi,Mit)=>{"use strict";var Xee=pr(),kN=yc(),Wee=fr(),Fee=Lv(),Vee=Math.min;Mit.exports=[].copyWithin||function(t,r){var n=Xee(this),a=Wee(n),o=kN(t,a),s=kN(r,a),l=arguments.length>2?arguments[2]:void 0,c=Vee((l===void 0?a:kN(l,a))-s,a-o),u=1;for(s0;)s in n?n[o]=n[s]:Fee(n,o),o+=u,s+=u;return n}});var Pit=k(()=>{"use strict";var kee=Ut(),See=SN(),Lee=po();kee({target:"Array",proto:!0},{copyWithin:See});Lee("copyWithin")});var Zc=k((wbi,Kit)=>{"use strict";var wee=we();Kit.exports=function(e,t){var r=[][e];return!!r&&wee(function(){r.call(null,t||function(){return 1},1)})}});var qit=k(()=>{"use strict";var Uee=Ut(),Yee=ga().every,Eee=Zc(),Nee=Eee("every");Uee({target:"Array",proto:!0,forced:!Nee},{every:function(t){return Yee(this,t,arguments.length>1?arguments[1]:void 0)}})});var ZA=k((Ebi,trt)=>{"use strict";var Oee=pr(),$it=yc(),Qee=fr();trt.exports=function(t){for(var r=Oee(this),n=Qee(r),a=arguments.length,o=$it(a>1?arguments[1]:void 0,n),s=a>2?arguments[2]:void 0,l=s===void 0?n:$it(s,n);l>o;)r[o++]=t;return r}});var ert=k(()=>{"use strict";var Tee=Ut(),Jee=ZA(),Hee=po();Tee({target:"Array",proto:!0},{fill:Jee});Hee("fill")});var irt=k(()=>{"use strict";var _ee=Ut(),jee=ga().filter,zee=Cb(),Dee=zee("filter");_ee({target:"Array",proto:!0,forced:!Dee},{filter:function(t){return jee(this,t,arguments.length>1?arguments[1]:void 0)}})});var nrt=k(()=>{"use strict";var Mee=Ut(),Pee=ga().find,Kee=po(),LN="find",rrt=!0;LN in[]&&Array(1)[LN](function(){rrt=!1});Mee({target:"Array",proto:!0,forced:rrt},{find:function(t){return Pee(this,t,arguments.length>1?arguments[1]:void 0)}});Kee(LN)});var ort=k(()=>{"use strict";var qee=Ut(),$ee=ga().findIndex,tie=po(),wN="findIndex",art=!0;wN in[]&&Array(1)[wN](function(){art=!1});qee({target:"Array",proto:!0,forced:art},{findIndex:function(t){return $ee(this,t,arguments.length>1?arguments[1]:void 0)}});tie(wN)});var wv=k((zbi,lrt)=>{"use strict";var eie=wo(),iie=Oh(),rie=pr(),nie=fr(),srt=function(e){var t=e===1;return function(r,n,a){for(var o=rie(r),s=iie(o),l=nie(s),c=eie(n,a),u,g;l-- >0;)if(u=s[l],g=c(u,l,o),g)switch(e){case 0:return u;case 1:return l}return t?-1:void 0}};lrt.exports={findLast:srt(0),findLastIndex:srt(1)}});var crt=k(()=>{"use strict";var aie=Ut(),oie=wv().findLast,sie=po();aie({target:"Array",proto:!0},{findLast:function(t){return oie(this,t,arguments.length>1?arguments[1]:void 0)}});sie("findLast")});var drt=k(()=>{"use strict";var lie=Ut(),cie=wv().findLastIndex,die=po();lie({target:"Array",proto:!0},{findLastIndex:function(t){return cie(this,t,arguments.length>1?arguments[1]:void 0)}});die("findLastIndex")});var UN=k((qbi,grt)=>{"use strict";var uie=Cc(),gie=fr(),hie=Hu(),mie=wo(),pie=Yn(),urt=function(e,t,r,n,a,o,s,l){for(var c=a,u=0,g=s?mie(s,l):!1,d,h;u0&&uie(d)?(h=gie(d),c=urt(e,t,d,h,c,o-1)-1):(hie(c+1),pie(e,c,d)),c++),u++;return c};grt.exports=urt});var hrt=k(()=>{"use strict";var bie=Ut(),fie=UN(),Iie=pr(),vie=fr(),Gie=ln(),yie=pb();bie({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,r=Iie(this),n=vie(r),a=yie(r,0);return fie(a,r,r,n,0,t===void 0?1:Gie(t)),a}})});var mrt=k(()=>{"use strict";var Cie=Ut(),xie=UN(),Zie=Hi(),Rie=pr(),Aie=fr(),Bie=pb();Cie({target:"Array",proto:!0},{flatMap:function(t){var r=Rie(this),n=Aie(r),a;return Zie(t),a=Bie(r,0),xie(a,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),a}})});var YN=k((rfi,prt)=>{"use strict";var Xie=ga().forEach,Wie=Zc(),Fie=Wie("forEach");prt.exports=Fie?[].forEach:function(t){return Xie(this,t,arguments.length>1?arguments[1]:void 0)}});var frt=k(()=>{"use strict";var Vie=Ut(),brt=YN();Vie({target:"Array",proto:!0,forced:[].forEach!==brt},{forEach:brt})});var RA=k((ofi,Irt)=>{"use strict";var kie=gi(),Sie=ma();Irt.exports=function(e,t,r,n){try{return n?t(kie(r)[0],r[1]):t(r)}catch(a){Sie(e,"throw",a)}}});var EN=k((sfi,yrt)=>{"use strict";var Lie=wo(),wie=si(),Uie=pr(),Yie=RA(),Eie=bA(),Nie=Ou(),Oie=fr(),vrt=Yn(),Qie=Fd(),Tie=Kh(),Jie=Wd(),Grt=Array;yrt.exports=function(t){var r=Uie(t),n=Nie(this),a=arguments.length,o=a>1?arguments[1]:void 0,s=o!==void 0;s&&(o=Lie(o,a>2?arguments[2]:void 0));var l=Jie(r),c=0,u,g,d,h,m,p;if(l&&!(this===Grt&&Eie(l)))for(g=n?new this:[],h=Tie(r,l),m=h.next;!(d=wie(m,h)).done;c++)p=s?Yie(h,o,[d.value,c],!0):d.value,vrt(g,c,p);else for(u=Oie(r),g=n?new this(u):Grt(u);u>c;c++)p=s?o(r[c],c):r[c],vrt(g,c,p);return Qie(g,c),g}});var Uv=k((lfi,Rrt)=>{"use strict";var Hie=Wi(),xrt=Hie("iterator"),Zrt=!1;try{Crt=0,NN={next:function(){return{done:!!Crt++}},return:function(){Zrt=!0}},NN[xrt]=function(){return this},Array.from(NN,function(){throw 2})}catch{}var Crt,NN;Rrt.exports=function(e,t){try{if(!t&&!Zrt)return!1}catch{return!1}var r=!1;try{var n={};n[xrt]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r}});var Art=k(()=>{"use strict";var _ie=Ut(),jie=EN(),zie=Uv(),Die=!zie(function(e){Array.from(e)});_ie({target:"Array",stat:!0,forced:Die},{from:jie})});var Brt=k(()=>{"use strict";var Mie=Ut(),Pie=gb().includes,Kie=we(),qie=po(),$ie=Kie(function(){return!Array(1).includes()});Mie({target:"Array",proto:!0,forced:$ie},{includes:function(t){return Pie(this,t,arguments.length>1?arguments[1]:void 0)}});qie("includes")});var Wrt=k(()=>{"use strict";var tre=Ut(),ere=Nu(),ire=gb().indexOf,rre=Zc(),ON=ere([].indexOf),Xrt=!!ON&&1/ON([1],1,-0)<0,nre=Xrt||!rre("indexOf");tre({target:"Array",proto:!0,forced:nre},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return Xrt?ON(this,t,r)||0:ire(this,t,r)}})});var Frt=k(()=>{"use strict";var are=Ut(),ore=Cc();are({target:"Array",stat:!0},{isArray:ore})});var $h=k((ffi,Srt)=>{"use strict";var sre=we(),lre=ar(),cre=xi(),dre=ua(),Vrt=Pa(),ure=Rr(),gre=Wi(),hre=cr(),JN=gre("iterator"),krt=!1,Vd,QN,TN;[].keys&&(TN=[].keys(),"next"in TN?(QN=Vrt(Vrt(TN)),QN!==Object.prototype&&(Vd=QN)):krt=!0);var mre=!cre(Vd)||sre(function(){var e={};return Vd[JN].call(e)!==e});mre?Vd={}:hre&&(Vd=dre(Vd));lre(Vd[JN])||ure(Vd,JN,function(){return this});Srt.exports={IteratorPrototype:Vd,BUGGY_SAFARI_ITERATORS:krt}});var AA=k((Ifi,Lrt)=>{"use strict";var pre=$h().IteratorPrototype,bre=ua(),fre=ko(),Ire=mo(),vre=vb(),Gre=function(){return this};Lrt.exports=function(e,t,r,n){var a=t+" Iterator";return e.prototype=bre(pre,{next:fre(+!n,r)}),Ire(e,a,!1,!0),vre[a]=Gre,e}});var WA=k((vfi,Hrt)=>{"use strict";var yre=Ut(),Cre=si(),BA=cr(),Trt=Th(),xre=ar(),Zre=AA(),wrt=Pa(),Urt=Qs(),Rre=mo(),Are=da(),HN=Rr(),Bre=Wi(),Yrt=vb(),Jrt=$h(),Xre=Trt.PROPER,Wre=Trt.CONFIGURABLE,Ert=Jrt.IteratorPrototype,XA=Jrt.BUGGY_SAFARI_ITERATORS,Yv=Bre("iterator"),Nrt="keys",Ev="values",Ort="entries",Qrt=function(){return this};Hrt.exports=function(e,t,r,n,a,o,s){Zre(r,t,n);var l=function(v){if(v===a&&h)return h;if(!XA&&v&&v in g)return g[v];switch(v){case Nrt:return function(){return new r(this,v)};case Ev:return function(){return new r(this,v)};case Ort:return function(){return new r(this,v)}}return function(){return new r(this)}},c=t+" Iterator",u=!1,g=e.prototype,d=g[Yv]||g["@@iterator"]||a&&g[a],h=!XA&&d||l(a),m=t==="Array"&&g.entries||d,p,b,f;if(m&&(p=wrt(m.call(new e)),p!==Object.prototype&&p.next&&(!BA&&wrt(p)!==Ert&&(Urt?Urt(p,Ert):xre(p[Yv])||HN(p,Yv,Qrt)),Rre(p,c,!0,!0),BA&&(Yrt[c]=Qrt))),Xre&&a===Ev&&d&&d.name!==Ev&&(!BA&&Wre?Are(g,"name",Ev):(u=!0,h=function(){return Cre(d,this)})),a)if(b={values:l(Ev),keys:o?h:l(Nrt),entries:l(Ort)},s)for(f in b)(XA||u||!(f in g))&&HN(g,f,b[f]);else yre({target:t,proto:!0,forced:XA||u},b);return(!BA||s)&&g[Yv]!==h&&HN(g,Yv,h,{name:a}),Yrt[t]=h,b}});var _u=k((Gfi,_rt)=>{"use strict";_rt.exports=function(e,t){return{value:e,done:t}}});var Nv=k((yfi,Prt)=>{"use strict";var Fre=Mn(),_N=po(),jrt=vb(),Drt=Tr(),Vre=Qr().f,kre=WA(),FA=_u(),Sre=cr(),Lre=bi(),Mrt="Array Iterator",wre=Drt.set,Ure=Drt.getterFor(Mrt);Prt.exports=kre(Array,"Array",function(e,t){wre(this,{type:Mrt,target:Fre(e),index:0,kind:t})},function(){var e=Ure(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,FA(void 0,!0);switch(e.kind){case"keys":return FA(r,!1);case"values":return FA(t[r],!1)}return FA([r,t[r]],!1)},"values");var zrt=jrt.Arguments=jrt.Array;_N("keys");_N("values");_N("entries");if(!Sre&&Lre&&zrt.name!=="values")try{Vre(zrt,"name",{value:"values"})}catch{}});var Krt=k(()=>{"use strict";var Yre=Ut(),Ere=Qe(),Nre=Oh(),Ore=Mn(),Qre=Zc(),Tre=Ere([].join),Jre=Nre!==Object,Hre=Jre||!Qre("join",",");Yre({target:"Array",proto:!0,forced:Hre},{join:function(t){return Tre(Ore(this),t===void 0?",":t)}})});var zN=k((Zfi,$rt)=>{"use strict";var _re=Yo(),jre=Mn(),zre=ln(),Dre=fr(),Mre=Zc(),Pre=Math.min,jN=[].lastIndexOf,qrt=!!jN&&1/[1].lastIndexOf(1,-0)<0,Kre=Mre("lastIndexOf"),qre=qrt||!Kre;$rt.exports=qre?function(t){if(qrt)return _re(jN,this,arguments)||0;var r=jre(this),n=Dre(r);if(n===0)return-1;var a=n-1;for(arguments.length>1&&(a=Pre(a,zre(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in r&&r[a]===t)return a||0;return-1}:jN});var ent=k(()=>{"use strict";var $re=Ut(),tnt=zN();$re({target:"Array",proto:!0,forced:tnt!==[].lastIndexOf},{lastIndexOf:tnt})});var int=k(()=>{"use strict";var tne=Ut(),ene=ga().map,ine=Cb(),rne=ine("map");tne({target:"Array",proto:!0,forced:!rne},{map:function(t){return ene(this,t,arguments.length>1?arguments[1]:void 0)}})});var nnt=k(()=>{"use strict";var nne=Ut(),ane=we(),one=Ou(),sne=Yn(),lne=Fd(),rnt=Array,cne=ane(function(){function e(){}return!(rnt.of.call(e)instanceof e)});nne({target:"Array",stat:!0,forced:cne},{of:function(){for(var t=0,r=arguments.length,n=new(one(this)?this:rnt)(r);r>t;)sne(n,t,arguments[t++]);return lne(n,r),n}})});var ant=k(()=>{"use strict";var dne=Ut(),une=pr(),gne=fr(),hne=Fd(),mne=Hu(),pne=we(),bne=pne(function(){return[].push.call({length:4294967296},1)!==4294967297}),fne=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},Ine=bne||!fne();dne({target:"Array",proto:!0,arity:1,forced:Ine},{push:function(t){var r=une(this),n=gne(r),a=arguments.length;mne(n+a);for(var o=0;o{"use strict";var vne=Hi(),Gne=pr(),yne=Oh(),Cne=fr(),ont=TypeError,snt="Reduce of empty array with no initial value",lnt=function(e){return function(t,r,n,a){var o=Gne(t),s=yne(o),l=Cne(o);if(vne(r),l===0&&n<2)throw new ont(snt);var c=e?l-1:0,u=e?-1:1;if(n<2)for(;;){if(c in s){a=s[c],c+=u;break}if(c+=u,e?c<0:l<=c)throw new ont(snt)}for(;e?c>=0:l>c;c+=u)c in s&&(a=r(a,s[c],c,o));return a}};cnt.exports={left:lnt(!1),right:lnt(!0)}});var Tv=k((Lfi,dnt)=>{"use strict";var Qv=ze(),xne=Xl(),Zne=Xa(),VA=function(e){return xne.slice(0,e.length)===e};dnt.exports=(function(){return VA("Bun/")?"BUN":VA("Cloudflare-Workers")?"CLOUDFLARE":VA("Deno/")?"DENO":VA("Node.js/")?"NODE":Qv.Bun&&typeof Bun.version=="string"?"BUN":Qv.Deno&&typeof Deno.version=="object"?"DENO":Zne(Qv.process)==="process"?"NODE":Qv.window&&Qv.document?"BROWSER":"REST"})()});var tm=k((wfi,unt)=>{"use strict";var Rne=Tv();unt.exports=Rne==="NODE"});var hnt=k(()=>{"use strict";var Ane=Ut(),Bne=Ov().left,Xne=Zc(),gnt=Fl(),Wne=tm(),Fne=!Wne&&gnt>79&&gnt<83,Vne=Fne||!Xne("reduce");Ane({target:"Array",proto:!0,forced:Vne},{reduce:function(t){var r=arguments.length;return Bne(this,t,r,r>1?arguments[1]:void 0)}})});var pnt=k(()=>{"use strict";var kne=Ut(),Sne=Ov().right,Lne=Zc(),mnt=Fl(),wne=tm(),Une=!wne&&mnt>79&&mnt<83,Yne=Une||!Lne("reduceRight");kne({target:"Array",proto:!0,forced:Yne},{reduceRight:function(t){return Sne(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})});var fnt=k(()=>{"use strict";var Ene=Ut(),Nne=Qe(),One=Cc(),Qne=Nne([].reverse),bnt=[1,2];Ene({target:"Array",proto:!0,forced:String(bnt)===String(bnt.reverse())},{reverse:function(){return One(this)&&(this.length=this.length),Qne(this)}})});var Gnt=k(()=>{"use strict";var Tne=Ut(),Int=Cc(),Jne=Ou(),Hne=xi(),vnt=yc(),_ne=fr(),jne=Mn(),zne=Yn(),Dne=Fd(),Mne=Wi(),Pne=Cb(),Kne=hs(),qne=Pne("slice"),$ne=Mne("species"),DN=Array,tae=Math.max;Tne({target:"Array",proto:!0,forced:!qne},{slice:function(t,r){var n=jne(this),a=_ne(n),o=vnt(t,a),s=vnt(r===void 0?a:r,a),l,c,u;if(Int(n)&&(l=n.constructor,Jne(l)&&(l===DN||Int(l.prototype))?l=void 0:Hne(l)&&(l=l[$ne],l===null&&(l=void 0)),l===DN||l===void 0))return Kne(n,o,s);for(c=new(l===void 0?DN:l)(tae(s-o,0)),u=0;o{"use strict";var eae=Ut(),iae=ga().some,rae=Zc(),nae=rae("some");eae({target:"Array",proto:!0,forced:!nae},{some:function(t){return iae(this,t,arguments.length>1?arguments[1]:void 0)}})});var kA=k((jfi,xnt)=>{"use strict";var Cnt=hs(),aae=Math.floor,MN=function(e,t){var r=e.length;if(r<8)for(var n=1,a,o;n0;)e[o]=e[--o];o!==n++&&(e[o]=a)}else for(var s=aae(r/2),l=MN(Cnt(e,0,s),t),c=MN(Cnt(e,s),t),u=l.length,g=c.length,d=0,h=0;d{"use strict";var oae=Xl(),Znt=oae.match(/firefox\/(\d+)/i);Rnt.exports=!!Znt&&+Znt[1]});var KN=k((Dfi,Ant)=>{"use strict";var sae=Xl();Ant.exports=/MSIE|Trident/.test(sae)});var SA=k((Mfi,Xnt)=>{"use strict";var lae=Xl(),Bnt=lae.match(/AppleWebKit\/(\d+)\./);Xnt.exports=!!Bnt&&+Bnt[1]});var Ynt=k(()=>{"use strict";var cae=Ut(),wnt=Qe(),dae=Hi(),uae=pr(),Wnt=fr(),gae=Lv(),Fnt=Li(),qN=we(),hae=kA(),mae=Zc(),Vnt=PN(),pae=KN(),knt=Fl(),Snt=SA(),ju=[],Lnt=wnt(ju.sort),bae=wnt(ju.push),fae=qN(function(){ju.sort(void 0)}),Iae=qN(function(){ju.sort(null)}),vae=mae("sort"),Unt=!qN(function(){if(knt)return knt<70;if(!(Vnt&&Vnt>3)){if(pae)return!0;if(Snt)return Snt<603;var e="",t,r,n,a;for(t=65;t<76;t++){switch(r=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(a=0;a<47;a++)ju.push({k:r+a,v:n})}for(ju.sort(function(o,s){return s.v-o.v}),a=0;aFnt(r)?1:-1}};cae({target:"Array",proto:!0,forced:Gae},{sort:function(t){t!==void 0&&dae(t);var r=uae(this);if(Unt)return t===void 0?Lnt(r):Lnt(r,t);var n=[],a=Wnt(r),o,s;for(s=0;s{"use strict";var Cae=Mi(),xae=vn(),Zae=Wi(),Rae=bi(),Ent=Zae("species");Nnt.exports=function(e){var t=Cae(e);Rae&&t&&!t[Ent]&&xae(t,Ent,{configurable:!0,get:function(){return this}})}});var Ont=k(()=>{"use strict";var Aae=em();Aae("Array")});var Tnt=k(()=>{"use strict";var Bae=Ut(),Xae=pr(),Wae=yc(),Fae=ln(),Vae=fr(),Qnt=Fd(),kae=Hu(),Sae=pb(),Lae=Yn(),$N=Lv(),wae=Cb(),Uae=wae("splice"),Yae=Math.max,Eae=Math.min;Bae({target:"Array",proto:!0,forced:!Uae},{splice:function(t,r){var n=Xae(this),a=Vae(n),o=Wae(t,a),s=arguments.length,l,c,u,g,d,h;for(s===0?l=c=0:s===1?(l=0,c=a-o):(l=s-2,c=Eae(Yae(Fae(r),0),a-o)),kae(a+l-c),u=Sae(n,c),g=0;ga-c+l;g--)$N(n,g-1)}else if(l>c)for(g=a-c;g>o;g--)d=g+c-1,h=g+l-1,d in n?n[h]=n[d]:$N(n,h);for(g=0;g{"use strict";var Nae=Ut(),Oae=fr(),Qae=Mn(),Tae=Yn(),Jae=po(),Hae=Array;Nae({target:"Array",proto:!0},{toReversed:function(){for(var t=Qae(this),r=Oae(t),n=new Hae(r),a=0;a{"use strict";var _ae=fr();Hnt.exports=function(e,t,r){for(var n=0,a=arguments.length>2?r:_ae(t),o=new e(a);a>n;)o[n]=t[n++];return o}});var tO=k((o0i,_nt)=>{"use strict";var jae=ze();_nt.exports=function(e,t){var r=jae[e],n=r&&r.prototype;return n&&n[t]}});var jnt=k(()=>{"use strict";var zae=Ut(),Dae=Qe(),Mae=Hi(),Pae=Mn(),Kae=xb(),qae=tO(),$ae=po(),toe=Array,eoe=Dae(qae("Array","sort"));zae({target:"Array",proto:!0},{toSorted:function(t){t!==void 0&&Mae(t);var r=Pae(this),n=Kae(toe,r);return eoe(n,t)}});$ae("toSorted")});var znt=k(()=>{"use strict";var ioe=Ut(),roe=po(),noe=Hu(),aoe=fr(),ooe=yc(),soe=Mn(),loe=ln(),eO=Yn(),coe=Array,doe=Math.max,uoe=Math.min;ioe({target:"Array",proto:!0},{toSpliced:function(t,r){var n=soe(this),a=aoe(n),o=ooe(t,a),s=arguments.length,l=0,c,u,g,d;for(s===0?c=u=0:s===1?(c=0,u=a-o):(c=s-2,u=uoe(doe(loe(r),0),a-o)),g=noe(a+c-u),d=coe(g);l{"use strict";var goe=po();goe("flat")});var Mnt=k(()=>{"use strict";var hoe=po();hoe("flatMap")});var Pnt=k(()=>{"use strict";var moe=Ut(),poe=pr(),boe=fr(),foe=Fd(),Ioe=Lv(),voe=Hu(),Goe=[].unshift(0)!==1,yoe=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}},Coe=Goe||!yoe();moe({target:"Array",proto:!0,arity:1,forced:Coe},{unshift:function(t){var r=poe(this),n=boe(r),a=arguments.length;if(a){voe(n+a);for(var o=n;o--;){var s=o+a;o in r?r[s]=r[o]:Ioe(r,s)}for(var l=0;l{"use strict";var xoe=Ut(),Zoe=fr(),Roe=ln(),Aoe=Mn(),Boe=Yn(),Xoe=Array,Woe=RangeError,Foe=(function(){try{[].with({valueOf:function(){throw 4}},null)}catch(e){return e!==4}})();xoe({target:"Array",proto:!0,forced:Foe},{with:function(e,t){var r=Aoe(this),n=Zoe(r),a=Roe(e),o=a<0?n+a:a;if(o>=n||o<0)throw new Woe("Incorrect index");for(var s=new Xoe(n),l=0;l{"use strict";qnt.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"});var Rc=k((G0i,$nt)=>{"use strict";var Voe=Rr();$nt.exports=function(e,t,r){for(var n in t)Voe(e,n,t[n],r);return e}});var Eo=k((y0i,tat)=>{"use strict";var koe=Ma(),Soe=TypeError;tat.exports=function(e,t){if(koe(t,e))return e;throw new Soe("Incorrect invocation")}});var Hv=k((C0i,eat)=>{"use strict";var Loe=ln(),woe=So(),Uoe=RangeError;eat.exports=function(e){if(e===void 0)return 0;var t=Loe(e),r=woe(t);if(t!==r)throw new Uoe("Wrong length or index");return r}});var LA=k((x0i,iat)=>{"use strict";iat.exports=Math.sign||function(t){var r=+t;return r===0||r!==r?r:r<0?-1:1}});var iO=k((Z0i,nat)=>{"use strict";var Yoe=2220446049250313e-31,rat=1/Yoe;nat.exports=function(e){return e+rat-rat}});var rO=k((R0i,aat)=>{"use strict";var Eoe=LA(),Noe=iO(),Ooe=Math.abs,Qoe=2220446049250313e-31;aat.exports=function(e,t,r,n){var a=+e,o=Ooe(a),s=Eoe(a);if(or||c!==c?s*(1/0):s*c}});var nO=k((A0i,oat)=>{"use strict";var Toe=rO(),Joe=11920928955078125e-23,Hoe=34028234663852886e22,_oe=11754943508222875e-54;oat.exports=Math.fround||function(t){return Toe(t,Joe,Hoe,_oe)}});var lat=k((B0i,sat)=>{"use strict";var joe=Array,zoe=Math.abs,kd=Math.pow,Doe=Math.floor,Moe=Math.log,Poe=Math.LN2,Koe=function(e,t,r){var n=joe(r),a=r*8-t-1,o=(1<>1,l=t===23?kd(2,-24)-kd(2,-77):0,c=e<0||e===0&&1/e<0?1:0,u=0,g,d,h;for(e=zoe(e),e!==e||e===1/0?(d=e!==e?1:0,g=o):(g=Doe(Moe(e)/Poe),h=kd(2,-g),e*h<1&&(g--,h*=2),g+s>=1?e+=l/h:e+=l*kd(2,1-s),e*h>=2&&(g++,h/=2),g+s>=o?(d=0,g=o):g+s>=1?(d=(e*h-1)*kd(2,t),g+=s):(d=e*kd(2,s-1)*kd(2,t),g=0));t>=8;)n[u++]=d&255,d/=256,t-=8;for(g=g<0;)n[u++]=g&255,g/=256,a-=8;return n[u-1]|=c*128,n},qoe=function(e,t){var r=e.length,n=r*8-t-1,a=(1<>1,s=n-7,l=r-1,c=e[l--],u=c&127,g;for(c>>=7;s>0;)u=u*256+e[l--],s-=8;for(g=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)g=g*256+e[l--],s-=8;if(u===0)u=1-o;else{if(u===a)return g?NaN:c?-1/0:1/0;g+=kd(2,t),u-=o}return(c?-1:1)*g*kd(2,u-t)};sat.exports={pack:Koe,unpack:qoe}});var zv=k((X0i,Rat)=>{"use strict";var NA=ze(),cO=Qe(),aO=bi(),$oe=Jv(),Gat=Th(),tse=da(),ese=vn(),cat=Rc(),oO=we(),wA=Eo(),ise=ln(),rse=So(),YA=Hv(),nse=nO(),yat=lat(),ase=Pa(),dat=Qs(),ose=ZA(),sse=hs(),lse=Ju(),cse=Hh(),Cat=mo(),dO=Tr(),dse=Gat.PROPER,uat=Gat.CONFIGURABLE,Rb="ArrayBuffer",OA="DataView",Ab="prototype",use="Wrong length",xat="Wrong index",gat=dO.getterFor(Rb),jv=dO.getterFor(OA),hat=dO.set,kl=NA[Rb],ms=kl,Zb=ms&&ms[Ab],Ac=NA[OA],im=Ac&&Ac[Ab],mat=Object.prototype,gse=NA.Array,EA=NA.RangeError,hse=cO(ose),mse=cO([].reverse),Zat=yat.pack,pat=yat.unpack,bat=function(e){return[e&255]},fat=function(e){return[e&255,e>>8&255]},Iat=function(e){return[e&255,e>>8&255,e>>16&255,e>>24&255]},vat=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},pse=function(e){return Zat(nse(e),23,4)},bse=function(e){return Zat(e,52,8)},UA=function(e,t,r){ese(e[Ab],t,{configurable:!0,get:function(){return r(this)[t]}})},zu=function(e,t,r,n){var a=jv(e),o=YA(r),s=!!n;if(o+t>a.byteLength)throw new EA(xat);var l=a.bytes,c=o+a.byteOffset,u=sse(l,c,c+t);return s?u:mse(u)},Du=function(e,t,r,n,a,o){var s=jv(e),l=YA(r),c=n(+a),u=!!o;if(l+t>s.byteLength)throw new EA(xat);for(var g=s.bytes,d=l+s.byteOffset,h=0;h>24)},setUint8:function(t,r){lO(this,t,r<<24>>24)}},{unsafe:!0})):(ms=function(t){wA(this,Zb);var r=YA(t);hat(this,{type:Rb,bytes:hse(gse(r),0),byteLength:r}),aO||(this.byteLength=r,this.detached=!1)},Zb=ms[Ab],Ac=function(t,r,n){wA(this,im),wA(t,Zb);var a=gat(t),o=a.byteLength,s=ise(r);if(s<0||s>o)throw new EA("Wrong offset");if(n=n===void 0?o-s:rse(n),s+n>o)throw new EA(use);hat(this,{type:OA,buffer:t,byteLength:n,byteOffset:s,bytes:a.bytes}),aO||(this.buffer=t,this.byteLength=n,this.byteOffset=s)},im=Ac[Ab],aO&&(UA(ms,"byteLength",gat),UA(Ac,"buffer",jv),UA(Ac,"byteLength",jv),UA(Ac,"byteOffset",jv)),cat(im,{getInt8:function(t){return zu(this,1,t)[0]<<24>>24},getUint8:function(t){return zu(this,1,t)[0]},getInt16:function(t){var r=zu(this,2,t,arguments.length>1?arguments[1]:!1);return(r[1]<<8|r[0])<<16>>16},getUint16:function(t){var r=zu(this,2,t,arguments.length>1?arguments[1]:!1);return r[1]<<8|r[0]},getInt32:function(t){return vat(zu(this,4,t,arguments.length>1?arguments[1]:!1))},getUint32:function(t){return vat(zu(this,4,t,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(t){return pat(zu(this,4,t,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(t){return pat(zu(this,8,t,arguments.length>1?arguments[1]:!1),52)},setInt8:function(t,r){Du(this,1,t,bat,r)},setUint8:function(t,r){Du(this,1,t,bat,r)},setInt16:function(t,r){Du(this,2,t,fat,r,arguments.length>2?arguments[2]:!1)},setUint16:function(t,r){Du(this,2,t,fat,r,arguments.length>2?arguments[2]:!1)},setInt32:function(t,r){Du(this,4,t,Iat,r,arguments.length>2?arguments[2]:!1)},setUint32:function(t,r){Du(this,4,t,Iat,r,arguments.length>2?arguments[2]:!1)},setFloat32:function(t,r){Du(this,4,t,pse,r,arguments.length>2?arguments[2]:!1)},setFloat64:function(t,r){Du(this,8,t,bse,r,arguments.length>2?arguments[2]:!1)}}));var sO,_v,lO;Cat(ms,Rb);Cat(Ac,OA);Rat.exports={ArrayBuffer:ms,DataView:Ac}});var Bat=k(()=>{"use strict";var fse=Ut(),Ise=ze(),vse=zv(),Gse=em(),uO="ArrayBuffer",Aat=vse[uO],yse=Ise[uO];fse({global:!0,constructor:!0,forced:yse!==Aat},{ArrayBuffer:Aat});Gse(uO)});var or=k((V0i,Yat)=>{"use strict";var Cse=Jv(),pO=bi(),bo=ze(),Vat=ar(),JA=xi(),Pu=Pi(),bO=Lo(),xse=Uu(),Zse=da(),gO=Rr(),Rse=vn(),Ase=Ma(),HA=Pa(),Xb=Qs(),Bse=Wi(),Xse=Yu(),kat=Tr(),Sat=kat.enforce,Wse=kat.get,QA=bo.Int8Array,hO=QA&&QA.prototype,Xat=bo.Uint8ClampedArray,Wat=Xat&&Xat.prototype,Bc=QA&&HA(QA),Sl=hO&&HA(hO),Fse=Object.prototype,fO=bo.TypeError,Fat=Bse("toStringTag"),mO=Xse("TYPED_ARRAY_TAG"),TA="TypedArrayConstructor",Sd=Cse&&!!Xb&&bO(bo.opera)!=="Opera",Lat=!1,No,Mu,Bb,Ld={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},IO={BigInt64Array:8,BigUint64Array:8},Vse=function(t){if(!JA(t))return!1;var r=bO(t);return r==="DataView"||Pu(Ld,r)||Pu(IO,r)},wat=function(e){var t=HA(e);if(JA(t)){var r=Wse(t);return r&&Pu(r,TA)?r[TA]:wat(t)}},Uat=function(e){if(!JA(e))return!1;var t=bO(e);return Pu(Ld,t)||Pu(IO,t)},kse=function(e){if(Uat(e))return e;throw new fO("Target is not a typed array")},Sse=function(e){if(Vat(e)&&(!Xb||Ase(Bc,e)))return e;throw new fO(xse(e)+" is not a typed array constructor")},Lse=function(e,t,r,n){if(pO){if(r)for(var a in Ld){var o=bo[a];if(o&&Pu(o.prototype,e))try{delete o.prototype[e]}catch{try{o.prototype[e]=t}catch{}}}(!Sl[e]||r)&&gO(Sl,e,r?t:Sd&&hO[e]||t,n)}},wse=function(e,t,r){var n,a;if(pO){if(Xb){if(r){for(n in Ld)if(a=bo[n],a&&Pu(a,e))try{delete a[e]}catch{}}if(!Bc[e]||r)try{return gO(Bc,e,r?t:Sd&&Bc[e]||t)}catch{}else return}for(n in Ld)a=bo[n],a&&(!a[e]||r)&&gO(a,e,t)}};for(No in Ld)Mu=bo[No],Bb=Mu&&Mu.prototype,Bb?Sat(Bb)[TA]=Mu:Sd=!1;for(No in IO)Mu=bo[No],Bb=Mu&&Mu.prototype,Bb&&(Sat(Bb)[TA]=Mu);if((!Sd||!Vat(Bc)||Bc===Function.prototype)&&(Bc=function(){throw new fO("Incorrect invocation")},Sd))for(No in Ld)bo[No]&&Xb(bo[No],Bc);if((!Sd||!Sl||Sl===Fse)&&(Sl=Bc.prototype,Sd))for(No in Ld)bo[No]&&Xb(bo[No].prototype,Sl);Sd&&HA(Wat)!==Sl&&Xb(Wat,Sl);if(pO&&!Pu(Sl,Fat)){Lat=!0,Rse(Sl,Fat,{configurable:!0,get:function(){return JA(this)?this[mO]:void 0}});for(No in Ld)bo[No]&&Zse(bo[No],mO,No)}Yat.exports={NATIVE_ARRAY_BUFFER_VIEWS:Sd,TYPED_ARRAY_TAG:Lat&&mO,aTypedArray:kse,aTypedArrayConstructor:Sse,exportTypedArrayMethod:Lse,exportTypedArrayStaticMethod:wse,getTypedArrayConstructor:wat,isView:Vse,isTypedArray:Uat,TypedArray:Bc,TypedArrayPrototype:Sl}});var Nat=k(()=>{"use strict";var Use=Ut(),Eat=or(),Yse=Eat.NATIVE_ARRAY_BUFFER_VIEWS;Use({target:"ArrayBuffer",stat:!0,forced:!Yse},{isView:Eat.isView})});var _at=k(()=>{"use strict";var Ese=Ut(),GO=Nu(),Nse=we(),Jat=zv(),Oat=gi(),Qat=yc(),Ose=So(),yO=Jat.ArrayBuffer,vO=Jat.DataView,Hat=vO.prototype,Tat=GO(yO.prototype.slice),Qse=GO(Hat.getUint8),Tse=GO(Hat.setUint8),Jse=Nse(function(){return!new yO(2).slice(1,void 0).byteLength});Ese({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:Jse},{slice:function(t,r){if(Tat&&r===void 0)return Tat(Oat(this),t);for(var n=Oat(this).byteLength,a=Qat(t,n),o=Qat(r===void 0?n:r,n),s=new yO(Ose(o-a)),l=new vO(this),c=new vO(s),u=0;a{"use strict";var Hse=Ut(),_se=zv(),jse=Jv();Hse({global:!0,constructor:!0,forced:!jse},{DataView:_se.DataView})});var zat=k(()=>{"use strict";jat()});var qat=k(()=>{"use strict";var zse=Ut(),Dse=Qe(),Kat=Math.pow,Dat=31,Mse=1023,Mat=Kat(2,-24),Pat=.0009765625,Pse=function(e){var t=e>>>15,r=e>>>10&Dat,n=e&Mse;return r===Dat?n===0?t===0?1/0:-1/0:NaN:r===0?n*(t===0?Mat:-Mat):Kat(2,r-15)*(t===0?1+n*Pat:-1-n*Pat)},Kse=Dse(DataView.prototype.getUint16);zse({target:"DataView",proto:!0},{getFloat16:function(t){return Pse(Kse(this,t,arguments.length>1?arguments[1]:!1))}})});var tot=k((T0i,$at)=>{"use strict";var qse=Lo(),$se=TypeError;$at.exports=function(e){if(qse(e)==="DataView")return e;throw new $se("Argument is not a DataView")}});var CO=k((J0i,eot)=>{"use strict";var tle=Math.log,ele=Math.LN2;eot.exports=Math.log2||function(t){return tle(t)/ele}});var rot=k(()=>{"use strict";var ile=Ut(),rle=Qe(),nle=tot(),ale=Hv(),ole=CO(),iot=iO(),sle=Math.pow,lle=65520,cle=61005353927612305e-21,dle=16777216,xO=1024,ule=function(e){if(e!==e)return 32256;if(e===0)return(1/e===-1/0)<<15;var t=e<0;if(t&&(e=-e),e>=lle)return t<<15|31744;if(e2?arguments[2]:!1)}})});var ZO=k((j0i,oot)=>{"use strict";var aot=ze(),hle=kv(),mle=Xa(),not=aot.ArrayBuffer,ple=aot.TypeError;oot.exports=not&&hle(not.prototype,"byteLength","get")||function(e){if(mle(e)!=="ArrayBuffer")throw new ple("ArrayBuffer expected");return e.byteLength}});var RO=k((z0i,sot)=>{"use strict";var ble=ze(),fle=Jv(),Ile=ZO(),vle=ble.DataView;sot.exports=function(e){if(!fle||Ile(e)!==0)return!1;try{return new vle(e),!1}catch{return!0}}});var cot=k(()=>{"use strict";var Gle=bi(),yle=vn(),Cle=RO(),lot=ArrayBuffer.prototype;Gle&&!("detached"in lot)&&yle(lot,"detached",{configurable:!0,get:function(){return Cle(this)}})});var Wb=k((P0i,dot)=>{"use strict";var xle=RO(),Zle=TypeError;dot.exports=function(e){if(xle(e))throw new Zle("ArrayBuffer is detached");return e}});var AO=k((K0i,uot)=>{"use strict";var Rle=ze(),Ale=tm();uot.exports=function(e){if(Ale){try{return Rle.process.getBuiltinModule(e)}catch{}try{return Function('return require("'+e+'")')()}catch{}}}});var _A=k((q0i,hot)=>{"use strict";var Ble=ze(),Xle=we(),BO=Fl(),XO=Tv(),got=Ble.structuredClone;hot.exports=!!got&&!Xle(function(){if(XO==="DENO"&&BO>92||XO==="NODE"&&BO>94||XO==="BROWSER"&&BO>97)return!1;var e=new ArrayBuffer(8),t=got(e,{transfer:[e]});return e.byteLength!==0||t.byteLength!==8})});var SO=k(($0i,bot)=>{"use strict";var kO=ze(),Wle=AO(),Fle=_A(),Vle=kO.structuredClone,mot=kO.ArrayBuffer,jA=kO.MessageChannel,VO=!1,WO,pot,zA,FO;if(Fle)VO=function(e){Vle(e,{transfer:[e]})};else if(mot)try{jA||(WO=Wle("worker_threads"),WO&&(jA=WO.MessageChannel)),jA&&(pot=new jA,zA=new mot(2),FO=function(e){pot.port1.postMessage(null,[e])},zA.byteLength===2&&(FO(zA),zA.byteLength===0&&(VO=FO)))}catch{}bot.exports=VO});var NO=k((tIi,xot)=>{"use strict";var UO=ze(),YO=Qe(),Got=kv(),kle=Hv(),Sle=Wb(),Lle=ZO(),fot=SO(),LO=_A(),wle=UO.structuredClone,yot=UO.ArrayBuffer,wO=UO.DataView,Ule=Math.min,EO=yot.prototype,Cot=wO.prototype,Yle=YO(EO.slice),Iot=Got(EO,"resizable","get"),vot=Got(EO,"maxByteLength","get"),Ele=YO(Cot.getInt8),Nle=YO(Cot.setInt8);xot.exports=(LO||fot)&&function(e,t,r){var n=Lle(e),a=t===void 0?n:kle(t),o=!Iot||!Iot(e),s;if(Sle(e),LO&&(e=wle(e,{transfer:[e]}),n===a&&(r||o)))return e;if(n>=a&&(!r||o))s=Yle(e,0,a);else{var l=r&&!o&&vot?{maxByteLength:vot(e)}:void 0;s=new yot(a,l);for(var c=new wO(e),u=new wO(s),g=Ule(a,n),d=0;d{"use strict";var Ole=Ut(),Zot=NO();Zot&&Ole({target:"ArrayBuffer",proto:!0},{transfer:function(){return Zot(this,arguments.length?arguments[0]:void 0,!0)}})});var Bot=k(()=>{"use strict";var Qle=Ut(),Aot=NO();Aot&&Qle({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return Aot(this,arguments.length?arguments[0]:void 0,!1)}})});var Xot=k(()=>{"use strict";var Tle=Ut(),Jle=Qe(),Hle=we(),_le=Hle(function(){return new Date(16e11).getYear()!==120}),jle=Jle(Date.prototype.getFullYear);Tle({target:"Date",proto:!0,forced:_le},{getYear:function(){return jle(this)-1900}})});var Fot=k(()=>{"use strict";var zle=Ut(),Dle=Qe(),Wot=Date,Mle=Dle(Wot.prototype.getTime);zle({target:"Date",stat:!0},{now:function(){return Mle(new Wot)}})});var Sot=k(()=>{"use strict";var Ple=Ut(),Vot=Qe(),Kle=ln(),kot=Date.prototype,qle=Vot(kot.getTime),$le=Vot(kot.setFullYear);Ple({target:"Date",proto:!0},{setYear:function(t){qle(this);var r=Kle(t),n=r>=0&&r<=99?r+1900:r;return $le(this,n)}})});var Lot=k(()=>{"use strict";var tce=Ut();tce({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})});var Dv=k((hIi,wot)=>{"use strict";var ece=ln(),ice=Li(),rce=zr(),nce=RangeError;wot.exports=function(t){var r=ice(rce(this)),n="",a=ece(t);if(a<0||a===1/0)throw new nce("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(r+=r))a&1&&(n+=r);return n}});var Mv=k((mIi,Not)=>{"use strict";var Eot=Qe(),ace=So(),Uot=Li(),oce=Dv(),sce=zr(),lce=Eot(oce),cce=Eot("".slice),dce=Math.ceil,Yot=function(e){return function(t,r,n){var a=Uot(sce(t)),o=ace(r),s=a.length,l=n===void 0?" ":Uot(n),c,u;return o<=s||l===""?a:(c=o-s,u=lce(l,dce(c/l.length)),u.length>c&&(u=cce(u,0,c)),e?a+u:u+a)}};Not.exports={start:Yot(!1),end:Yot(!0)}});var Tot=k((pIi,Qot)=>{"use strict";var Ku=Qe(),Oot=we(),rm=Mv().start,uce=RangeError,gce=isFinite,hce=Math.abs,wd=Date.prototype,OO=wd.toISOString,mce=Ku(wd.getTime),pce=Ku(wd.getUTCDate),bce=Ku(wd.getUTCFullYear),fce=Ku(wd.getUTCHours),Ice=Ku(wd.getUTCMilliseconds),vce=Ku(wd.getUTCMinutes),Gce=Ku(wd.getUTCMonth),yce=Ku(wd.getUTCSeconds);Qot.exports=Oot(function(){return OO.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!Oot(function(){OO.call(new Date(NaN))})?function(){if(!gce(mce(this)))throw new uce("Invalid time value");var t=this,r=bce(t),n=Ice(t),a=r<0?"-":r>9999?"+":"";return a+rm(hce(r),a?6:4,0)+"-"+rm(Gce(t)+1,2,0)+"-"+rm(pce(t),2,0)+"T"+rm(fce(t),2,0)+":"+rm(vce(t),2,0)+":"+rm(yce(t),2,0)+"."+rm(n,3,0)+"Z"}:OO});var Hot=k(()=>{"use strict";var Cce=Ut(),Jot=Tot();Cce({target:"Date",proto:!0,forced:Date.prototype.toISOString!==Jot},{toISOString:Jot})});var _ot=k(()=>{"use strict";var xce=Ut(),Zce=we(),Rce=pr(),Bce=fv(),Xce=Zce(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});xce({target:"Date",proto:!0,arity:1,forced:Xce},{toJSON:function(t){var r=Rce(this),n=Bce(r,"number");return typeof n=="number"&&!isFinite(n)?null:r.toISOString()}})});var zot=k((GIi,jot)=>{"use strict";var Wce=gi(),Fce=gE(),Vce=TypeError;jot.exports=function(e){if(Wce(this),e==="string"||e==="default")e="string";else if(e!=="number")throw new Vce("Incorrect hint");return Fce(this,e)}});var Pot=k(()=>{"use strict";var kce=Pi(),Sce=Rr(),Lce=zot(),wce=Wi(),Dot=wce("toPrimitive"),Mot=Date.prototype;kce(Mot,Dot)||Sce(Mot,Dot,Lce)});var tst=k(()=>{"use strict";var qot=Qe(),Uce=Rr(),QO=Date.prototype,Kot="Invalid Date",$ot="toString",Yce=qot(QO[$ot]),Ece=qot(QO.getTime);String(new Date(NaN))!==Kot&&Uce(QO,$ot,function(){var t=Ece(this);return t===t?Yce(this):Kot})});var JO=k((RIi,ast)=>{"use strict";var Nce=Mi(),Oce=si(),Qce=Qe(),Tce=wo(),Jce=gi(),Hce=Hi(),rst=Gc(),TO=la(),nst=Wi(),_ce=nst("asyncDispose"),est=nst("dispose"),jce=Qce([].push),zce=function(e,t){if(t==="async-dispose"){var r=TO(e,_ce);return r!==void 0||(r=TO(e,est),r===void 0)?r:function(){var n=this,a=Nce("Promise");return new a(function(o){Oce(r,n),o(void 0)})}}return TO(e,est)},ist=function(e,t,r){return arguments.length<3&&!rst(e)&&(r=Hce(zce(Jce(e),t))),r===void 0?function(){}:Tce(r,e)};ast.exports=function(e,t,r,n){var a;if(arguments.length<4){if(rst(t)&&r==="sync-dispose")return;a=ist(t,r)}else a=ist(void 0,r,n);jce(e.stack,a)}});var dst=k(()=>{"use strict";var Dce=Ut(),MA=bi(),Mce=Mi(),ost=Hi(),Pce=Eo(),sst=Rr(),Kce=Rc(),qce=vn(),lst=Wi(),cst=Tr(),HO=JO(),$ce=Mce("SuppressedError"),tde=ReferenceError,ede=lst("dispose"),ide=lst("toStringTag"),KA="DisposableStack",rde=cst.set,PA=cst.getterFor(KA),_O="sync-dispose",Pv="disposed",nde="pending",DA=function(e){var t=PA(e);if(t.state===Pv)throw new tde(KA+" already disposed");return t},jO=function(){rde(Pce(this,Fb),{type:KA,state:nde,stack:[]}),MA||(this.disposed=!1)},Fb=jO.prototype;Kce(Fb,{dispose:function(){var t=PA(this);if(t.state!==Pv){t.state=Pv,MA||(this.disposed=!0);for(var r=t.stack,n=r.length,a=!1,o;n;){var s=r[--n];r[n]=null;try{s()}catch(l){a?o=new $ce(l,o):(a=!0,o=l)}}if(t.stack=null,a)throw o}},use:function(t){return HO(DA(this),t,_O),t},adopt:function(t,r){var n=DA(this);return ost(r),HO(n,void 0,_O,function(){r(t)}),t},defer:function(t){var r=DA(this);ost(t),HO(r,void 0,_O,t)},move:function(){var t=DA(this),r=new jO;return PA(r).stack=t.stack,t.stack=[],t.state=Pv,MA||(this.disposed=!0),r}});MA&&qce(Fb,"disposed",{configurable:!0,get:function(){return PA(this).state===Pv}});sst(Fb,ede,Fb.dispose,{name:"dispose"});sst(Fb,ide,KA,{nonWritable:!0});Dce({global:!0,constructor:!0},{DisposableStack:jO})});var gst=k(()=>{"use strict";var ade=Ut(),Kv=Qe(),ode=Li(),sde=Kv("".charAt),lde=Kv("".charCodeAt),cde=Kv(/./.exec),dde=Kv(1.1.toString),ude=Kv("".toUpperCase),gde=/[\w*+\-./@]/,ust=function(e,t){for(var r=dde(e,16);r.length{"use strict";var mst=Qe(),hde=Hi(),mde=xi(),pde=Pi(),hst=hs(),bde=cb(),pst=Function,fde=mst([].concat),Ide=mst([].join),zO={},vde=function(e,t,r){if(!pde(zO,t)){for(var n=[],a=0;a{"use strict";var Gde=Ut(),fst=DO();Gde({target:"Function",proto:!0,forced:Function.bind!==fst},{bind:fst})});var yst=k(()=>{"use strict";var yde=ar(),vst=xi(),Cde=Qr(),xde=Ma(),Zde=Wi(),Rde=JR(),MO=Zde("hasInstance"),Gst=Function.prototype;MO in Gst||Cde.f(Gst,MO,{value:Rde(function(e){if(!yde(this)||!vst(e))return!1;var t=this.prototype;return vst(t)?xde(t,e):e instanceof this},MO)})});var Rst=k(()=>{"use strict";var Ade=bi(),Bde=Th().EXISTS,Cst=Qe(),Xde=vn(),xst=Function.prototype,Wde=Cst(xst.toString),Zst=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Fde=Cst(Zst.exec),Vde="name";Ade&&!Bde&&Xde(xst,Vde,{configurable:!0,get:function(){try{return Fde(Zst,Wde(this))[1]}catch{return""}}})});var Ast=k(()=>{"use strict";var kde=Ut(),PO=ze();kde({global:!0,forced:PO.globalThis!==PO},{globalThis:PO})});var kst=k(()=>{"use strict";var Sde=Ut(),Lde=ze(),wde=Eo(),Ude=gi(),Yde=ar(),Ede=Pa(),Nde=vn(),Ode=Yn(),Qde=we(),$O=Pi(),Tde=Wi(),Xc=$h().IteratorPrototype,Jde=bi(),Hde=cr(),KO="constructor",Xst="Iterator",Bst=Tde("toStringTag"),Wst=TypeError,qO=Lde[Xst],Fst=Hde||!Yde(qO)||qO.prototype!==Xc||!Qde(function(){qO({})}),tQ=function(){if(wde(this,Xc),Ede(this)===Xc)throw new Wst("Abstract class Iterator not directly constructable")},Vst=function(e,t){Jde?Nde(Xc,e,{configurable:!0,get:function(){return t},set:function(r){if(Ude(this),this===Xc)throw new Wst("You can't redefine this property");$O(this,e)?this[e]=r:Ode(this,e,r)}}):Xc[e]=t};$O(Xc,Bst)||Vst(Bst,Xst);(Fst||!$O(Xc,KO)||Xc[KO]===Object)&&Vst(KO,tQ);tQ.prototype=Xc;Sde({global:!0,constructor:!0,forced:Fst},{Iterator:tQ})});var Lst=k((QIi,Sst)=>{"use strict";var _de=ma();Sst.exports=function(e,t,r){for(var n=e.length-1;n>=0;n--)if(e[n]!==void 0)try{r=_de(e[n].iterator,t,r)}catch(a){t="throw",r=a}if(t==="throw")throw r;return r}});var qu=k((TIi,Qst)=>{"use strict";var jde=si(),zde=ua(),Dde=da(),Mde=Rc(),Pde=Wi(),Ust=Tr(),Kde=la(),qde=$h().IteratorPrototype,qA=_u(),$A=ma(),$de=Lst(),tue=Pde("toStringTag"),Yst="IteratorHelper",Est="WrapForValidIterator",eQ="normal",wst="throw",eue=Ust.set,Nst=function(e){var t=Ust.getterFor(e?Est:Yst);return Mde(zde(qde),{next:function(){var n=t(this);if(e)return n.nextHandler();if(n.done)return qA(void 0,!0);try{var a=n.nextHandler();return n.returnHandlerResult?a:qA(a,n.done)}catch(o){throw n.done=!0,o}},return:function(){var r=t(this),n=r.iterator;if(r.done=!0,e){var a=Kde(n,"return");return a?jde(a,n):qA(void 0,!0)}if(r.inner)try{$A(r.inner.iterator,eQ)}catch(o){return $A(n,wst,o)}if(r.openIters)try{$de(r.openIters,eQ)}catch(o){return $A(n,wst,o)}return n&&$A(n,eQ),qA(void 0,!0)}})},iue=Nst(!0),Ost=Nst(!1);Dde(Ost,tue,"Iterator Helper");Qst.exports=function(e,t,r){var n=function(o,s){s?(s.iterator=o.iterator,s.next=o.next):s=o,s.type=t?Est:Yst,s.returnHandlerResult=!!r,s.nextHandler=e,s.counter=0,s.done=!1,eue(this,s)};return n.prototype=t?iue:Ost,n}});var Hst=k(()=>{"use strict";var rue=Ut(),Tst=si(),nue=Hi(),Jst=gi(),aue=Wd(),oue=qu(),sue=Array,lue=oue(function(){for(;;){var e=this.iterator;if(!e){var t=this.nextIterableIndex++,r=this.iterables;if(t>=r.length){this.done=!0;return}var n=r[t];this.iterables[t]=null,e=this.iterator=Tst(n.method,n.iterable),this.next=e.next}var a=Jst(Tst(this.next,e));if(a.done){this.iterator=null,this.next=null;continue}return a.value}});rue({target:"Iterator",stat:!0},{concat:function(){for(var t=arguments.length,r=sue(t),n=0;n{"use strict";var cue=si(),due=Rr(),uue=la(),gue=Pi(),hue=Wi(),_st=$h().IteratorPrototype,jst=hue("dispose");gue(_st,jst)||due(_st,jst,function(){var e=uue(this,"return");e&&cue(e,this)})});var Fa=k((zIi,Dst)=>{"use strict";Dst.exports=function(e){return{iterator:e,next:e.next,done:!1}}});var iQ=k((DIi,Mst)=>{"use strict";var mue=RangeError;Mst.exports=function(e){if(e===e)return e;throw new mue("NaN is not allowed")}});var tB=k((MIi,Pst)=>{"use strict";var pue=ln(),bue=RangeError;Pst.exports=function(e){var t=pue(e);if(t<0)throw new bue("The argument can't be less than 0");return t}});var qv=k((PIi,Kst)=>{"use strict";Kst.exports=function(e,t){var r=typeof Iterator=="function"&&Iterator.prototype[e];if(r)try{r.call({next:null},t).next()}catch{return!0}}});var Ll=k((KIi,qst)=>{"use strict";var fue=ze();qst.exports=function(e,t){var r=fue.Iterator,n=r&&r.prototype,a=n&&n[e],o=!1;if(a)try{a.call({next:function(){return{done:!0}},return:function(){o=!0}},-1)}catch(s){s instanceof t||(o=!1)}if(!o)return a}});var tlt=k(()=>{"use strict";var Iue=Ut(),rQ=si(),nQ=gi(),vue=Fa(),Gue=iQ(),yue=tB(),Cue=ma(),xue=qu(),Zue=qv(),Rue=Ll(),oQ=cr(),$st=!oQ&&!Zue("drop",0),aQ=!oQ&&!$st&&Rue("drop",RangeError),Aue=oQ||$st||aQ,Bue=xue(function(){for(var e=this.iterator,t=this.next,r,n;this.remaining;)if(this.remaining--,r=nQ(rQ(t,e)),n=this.done=!!r.done,n)return;if(r=nQ(rQ(t,e)),n=this.done=!!r.done,!n)return r.value});Iue({target:"Iterator",proto:!0,real:!0,forced:Aue},{drop:function(t){nQ(this);var r;try{r=yue(Gue(+t))}catch(n){Cue(this,"throw",n)}return aQ?rQ(aQ,this,r):new Bue(vue(this),{remaining:r})}})});var elt=k(()=>{"use strict";var Xue=Ut(),Wue=si(),Fue=En(),Vue=Hi(),kue=gi(),Sue=Fa(),Lue=ma(),wue=Ll(),sQ=wue("every",TypeError);Xue({target:"Iterator",proto:!0,real:!0,forced:sQ},{every:function(t){kue(this);try{Vue(t)}catch(a){Lue(this,"throw",a)}if(sQ)return Wue(sQ,this,t);var r=Sue(this),n=0;return!Fue(r,function(a,o){if(!t(a,n++))return o()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})});var alt=k(()=>{"use strict";var Uue=Ut(),ilt=si(),Yue=Hi(),rlt=gi(),Eue=Fa(),Nue=qu(),Oue=RA(),cQ=cr(),Que=ma(),Tue=qv(),Jue=Ll(),nlt=!cQ&&!Tue("filter",function(){}),lQ=!cQ&&!nlt&&Jue("filter",TypeError),Hue=cQ||nlt||lQ,_ue=Nue(function(){for(var e=this.iterator,t=this.predicate,r=this.next,n,a,o;;){if(n=rlt(ilt(r,e)),a=this.done=!!n.done,a)return;if(o=n.value,Oue(e,t,[o,this.counter++],!0))return o}});Uue({target:"Iterator",proto:!0,real:!0,forced:Hue},{filter:function(t){rlt(this);try{Yue(t)}catch(r){Que(this,"throw",r)}return lQ?ilt(lQ,this,t):new _ue(Eue(this),{predicate:t})}})});var olt=k(()=>{"use strict";var jue=Ut(),zue=si(),Due=En(),Mue=Hi(),Pue=gi(),Kue=Fa(),que=ma(),$ue=Ll(),dQ=$ue("find",TypeError);jue({target:"Iterator",proto:!0,real:!0,forced:dQ},{find:function(t){Pue(this);try{Mue(t)}catch(a){que(this,"throw",a)}if(dQ)return zue(dQ,this,t);var r=Kue(this),n=0;return Due(r,function(a,o){if(t(a,n++))return o(a)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})});var uQ=k((ovi,llt)=>{"use strict";var tge=si(),slt=gi(),ege=Fa(),ige=Wd();llt.exports=function(e,t){(!t||typeof e!="string")&&slt(e);var r=ige(e);return ege(slt(r!==void 0?tge(r,e):e))}});var dlt=k(()=>{"use strict";var rge=Ut(),gQ=si(),nge=Hi(),hQ=gi(),age=Fa(),oge=uQ(),sge=qu(),mQ=ma(),bQ=cr(),lge=qv(),cge=Ll();function dge(){try{var e=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(t){return t});e.next(),e.return()}catch{return!0}}var clt=!bQ&&!lge("flatMap",function(){}),pQ=!bQ&&!clt&&cge("flatMap",TypeError),uge=bQ||clt||pQ||dge(),gge=sge(function(){for(var e=this.iterator,t=this.mapper,r,n;;){if(n=this.inner)try{if(r=hQ(gQ(n.next,n.iterator)),!r.done)return r.value;this.inner=null}catch(a){mQ(e,"throw",a)}if(r=hQ(gQ(this.next,e)),this.done=!!r.done)return;try{this.inner=oge(t(r.value,this.counter++),!1)}catch(a){mQ(e,"throw",a)}}});rge({target:"Iterator",proto:!0,real:!0,forced:uge},{flatMap:function(t){hQ(this);try{nge(t)}catch(r){mQ(this,"throw",r)}return pQ?gQ(pQ,this,t):new gge(age(this),{mapper:t,inner:null})}})});var ult=k(()=>{"use strict";var hge=Ut(),mge=si(),pge=En(),bge=Hi(),fge=gi(),Ige=Fa(),vge=ma(),Gge=Ll(),fQ=Gge("forEach",TypeError);hge({target:"Iterator",proto:!0,real:!0,forced:fQ},{forEach:function(t){fge(this);try{bge(t)}catch(a){vge(this,"throw",a)}if(fQ)return mge(fQ,this,t);var r=Ige(this),n=0;pge(r,function(a){t(a,n++)},{IS_RECORD:!0})}})});var glt=k(()=>{"use strict";var yge=Ut(),Cge=si(),xge=pr(),Zge=Ma(),Rge=$h().IteratorPrototype,Age=qu(),Bge=uQ(),Xge=cr(),Wge=Xge||(function(){try{Iterator.from({return:null}).return()}catch{return!0}})(),Fge=Age(function(){return Cge(this.next,this.iterator)},!0);yge({target:"Iterator",stat:!0,forced:Wge},{from:function(t){var r=Bge(typeof t=="string"?xge(t):t,!0);return Zge(Rge,r.iterator)?r.iterator:new Fge(r)}})});var blt=k(()=>{"use strict";var Vge=Ut(),hlt=si(),kge=Hi(),mlt=gi(),Sge=Fa(),Lge=qu(),wge=RA(),Uge=ma(),Yge=qv(),Ege=Ll(),vQ=cr(),plt=!vQ&&!Yge("map",function(){}),IQ=!vQ&&!plt&&Ege("map",TypeError),Nge=vQ||plt||IQ,Oge=Lge(function(){var e=this.iterator,t=mlt(hlt(this.next,e)),r=this.done=!!t.done;if(!r)return wge(e,this.mapper,[t.value,this.counter++],!0)});Vge({target:"Iterator",proto:!0,real:!0,forced:Nge},{map:function(t){mlt(this);try{kge(t)}catch(r){Uge(this,"throw",r)}return IQ?hlt(IQ,this,t):new Oge(Sge(this),{mapper:t})}})});var vlt=k(()=>{"use strict";var Qge=Ut(),Tge=En(),Jge=Hi(),Hge=gi(),_ge=Fa(),jge=ma(),zge=Ll(),Dge=Yo(),Mge=we(),flt=TypeError,Ilt=Mge(function(){[].keys().reduce(function(){},void 0)}),GQ=!Ilt&&zge("reduce",flt);Qge({target:"Iterator",proto:!0,real:!0,forced:Ilt||GQ},{reduce:function(t){Hge(this);try{Jge(t)}catch(s){jge(this,"throw",s)}var r=arguments.length<2,n=r?void 0:arguments[1];if(GQ)return Dge(GQ,this,r?[t]:[t,n]);var a=_ge(this),o=0;if(Tge(a,function(s){r?(r=!1,n=s):n=t(n,s,o),o++},{IS_RECORD:!0}),r)throw new flt("Reduce of empty iterator with no initial value");return n}})});var Glt=k(()=>{"use strict";var Pge=Ut(),Kge=si(),qge=En(),$ge=Hi(),the=gi(),ehe=Fa(),ihe=ma(),rhe=Ll(),yQ=rhe("some",TypeError);Pge({target:"Iterator",proto:!0,real:!0,forced:yQ},{some:function(t){the(this);try{$ge(t)}catch(a){ihe(this,"throw",a)}if(yQ)return Kge(yQ,this,t);var r=ehe(this),n=0;return qge(r,function(a,o){if(t(a,n++))return o()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})});var Rlt=k(()=>{"use strict";var nhe=Ut(),ylt=si(),Clt=gi(),ahe=Fa(),ohe=iQ(),she=tB(),lhe=qu(),xlt=ma(),che=Ll(),Zlt=cr(),CQ=!Zlt&&che("take",RangeError),dhe=lhe(function(){var e=this.iterator;if(!this.remaining--)return this.done=!0,xlt(e,"normal",void 0);var t=Clt(ylt(this.next,e)),r=this.done=!!t.done;if(!r)return t.value});nhe({target:"Iterator",proto:!0,real:!0,forced:Zlt||CQ},{take:function(t){Clt(this);var r;try{r=she(ohe(+t))}catch(n){xlt(this,"throw",n)}return CQ?ylt(CQ,this,r):new dhe(ahe(this),{remaining:r})}})});var Alt=k(()=>{"use strict";var uhe=Ut(),ghe=gi(),hhe=Yn(),mhe=En(),phe=Fa();uhe({target:"Iterator",proto:!0,real:!0},{toArray:function(){var t=[],r=0;return mhe(phe(ghe(this)),function(n){hhe(t,r++,n)},{IS_RECORD:!0}),t}})});var Blt=k(()=>{"use strict";var bhe=Ut(),fhe=oA(),Ihe=eN();bhe({target:"JSON",stat:!0,forced:!fhe},{isRawJSON:Ihe})});var wlt=k(()=>{"use strict";var vhe=Ut(),Ghe=bi(),FQ=ze(),yhe=Mi(),eB=Qe(),Che=si(),Slt=ar(),xhe=xi(),Zhe=Cc(),Rhe=Pi(),Ahe=Li(),Xlt=fr(),BQ=Yn(),Llt=we(),Bhe=rN(),Xhe=Lu(),Wlt=FQ.JSON,Whe=FQ.Number,Vb=FQ.SyntaxError,VQ=Wlt&&Wlt.parse,Fhe=yhe("Object","keys"),Vhe=Object.getOwnPropertyDescriptor,Va=eB("".charAt),xQ=eB("".slice),ZQ=eB(/./.exec),Flt=eB([].push),RQ=/^\d$/,khe=/^[1-9]$/,She=/^[\d-]$/,$v=/^[\t\n\r ]$/,AQ=0,Vlt=1,Lhe=function(e,t){e=Ahe(e);var r=new WQ(e,0,""),n=r.parse(),a=n.value,o=r.skip($v,n.end);if(o{"use strict";var Ehe=we();Ult.exports=!Ehe(function(){return Object.isExtensible(Object.preventExtensions({}))})});var Qlt=k(()=>{"use strict";var Nhe=Ut(),Ohe=$u(),Qhe=oA(),kQ=Mi(),The=Qe(),Jhe=Li(),Hhe=Yn(),_he=Tr().set,Ylt=SyntaxError,jhe=kQ("JSON","parse"),zhe=kQ("Object","create"),Dhe=kQ("Object","freeze"),Elt=The("".charAt),Nlt="Unacceptable as raw JSON",Olt=function(e){return e===" "||e===" "||e===` `||e==="\r"};Nhe({target:"JSON",stat:!0,forced:!Qhe},{rawJSON:function(t){var r=Jhe(t);if(r===""||Olt(Elt(r,0))||Olt(Elt(r,r.length-1)))throw new Ylt(Nlt);var n=jhe(r);if(typeof n=="object"&&n!==null)throw new Ylt(Nlt);var a=zhe(null);return _he(a,{type:"RawJSON"}),Hhe(a,"rawJSON",r),Ohe?Dhe(a):a}})});var Tlt=k(()=>{"use strict";var Mhe=ze(),Phe=mo();Phe(Mhe.JSON,"JSON",!0)});var iB=k((kvi,Jlt)=>{"use strict";var Khe=we();Jlt.exports=Khe(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})});var nB=k((Svi,_lt)=>{"use strict";var qhe=we(),$he=xi(),tme=Xa(),Hlt=iB(),rB=Object.isExtensible,eme=qhe(function(){rB(1)});_lt.exports=eme||Hlt?function(t){return!$he(t)||Hlt&&tme(t)==="ArrayBuffer"?!1:rB?rB(t):!0}:rB});var tg=k((Lvi,Dlt)=>{"use strict";var ime=Ut(),rme=Qe(),nme=ub(),ame=xi(),SQ=Pi(),ome=Qr().f,jlt=Eu(),sme=qR(),LQ=nB(),lme=Yu(),cme=$u(),zlt=!1,Ud=lme("meta"),dme=0,wQ=function(e){ome(e,Ud,{value:{objectID:"O"+dme++,weakData:{}}})},ume=function(e,t){if(!ame(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!SQ(e,Ud)){if(!LQ(e))return"F";if(!t)return"E";wQ(e)}return e[Ud].objectID},gme=function(e,t){if(!SQ(e,Ud)){if(!LQ(e))return!0;if(!t)return!1;wQ(e)}return e[Ud].weakData},hme=function(e){return cme&&zlt&&LQ(e)&&!SQ(e,Ud)&&wQ(e),e},mme=function(){pme.enable=function(){},zlt=!0;var e=jlt.f,t=rme([].splice),r={};r[Ud]=1,e(r).length&&(jlt.f=function(n){for(var a=e(n),o=0,s=a.length;o{"use strict";var bme=Ut(),fme=ze(),Ime=Qe(),Mlt=hb(),vme=Rr(),Gme=tg(),yme=En(),Cme=Eo(),xme=ar(),Zme=Gc(),UQ=xi(),YQ=we(),Rme=Uv(),Ame=mo(),Bme=Ju();Plt.exports=function(e,t,r){var n=e.indexOf("Map")!==-1,a=e.indexOf("Weak")!==-1,o=n?"set":"add",s=fme[e],l=s&&s.prototype,c=s,u={},g=function(v){var y=Ime(l[v]);vme(l,v,v==="add"?function(C){return y(this,C===0?0:C),this}:v==="delete"?function(x){return a&&!UQ(x)?!1:y(this,x===0?0:x)}:v==="get"?function(C){return a&&!UQ(C)?void 0:y(this,C===0?0:C)}:v==="has"?function(C){return a&&!UQ(C)?!1:y(this,C===0?0:C)}:function(C,I){return y(this,C===0?0:C,I),this})},d=Mlt(e,!xme(s)||!(a||l.forEach&&!YQ(function(){new s().entries().next()})));if(d)c=r.getConstructor(t,e,n,o),Gme.enable();else if(Mlt(e,!0)){var h=new c,m=h[o](a?{}:-0,1)!==h,p=YQ(function(){h.has(1)}),b=Rme(function(v){new s(v)}),f=!a&&YQ(function(){for(var v=new s,y=5;y--;)v[o](y,y);return!v.has(-0)});b||(c=t(function(v,y){Cme(v,l);var x=Bme(new s,v,c);return Zme(y)||yme(y,x[o],{that:x,AS_ENTRIES:n}),x}),c.prototype=l,l.constructor=c),(p||f)&&(g("delete"),g("has"),n&&g("get")),(f||m)&&g(o),a&&l.clear&&delete l.clear}return u[e]=c,bme({global:!0,constructor:!0,forced:c!==s},u),Ame(c,e),a||r.setStrong(c,e,n),c}});var NQ=k((Uvi,ict)=>{"use strict";var Klt=ua(),Xme=vn(),qlt=Rc(),Wme=wo(),Fme=Eo(),Vme=Gc(),kme=En(),Sme=WA(),aB=_u(),Lme=em(),eG=bi(),$lt=tg().fastKey,ect=Tr(),tct=ect.set,EQ=ect.getterFor;ict.exports={getConstructor:function(e,t,r,n){var a=e(function(u,g){Fme(u,o),tct(u,{type:t,index:Klt(null),first:null,last:null,size:0}),eG||(u.size=0),Vme(g)||kme(g,u[n],{that:u,AS_ENTRIES:r})}),o=a.prototype,s=EQ(t),l=function(u,g,d){var h=s(u),m=c(u,g),p,b;return m?m.value=d:(h.last=m={index:b=$lt(g,!0),key:g,value:d,previous:p=h.last,next:null,removed:!1},h.first||(h.first=m),p&&(p.next=m),eG?h.size++:u.size++,b!=="F"&&(h.index[b]=m)),u},c=function(u,g){var d=s(u),h=$lt(g),m;if(h!=="F")return d.index[h];for(m=d.first;m;m=m.next)if(m.key===g)return m};return qlt(o,{clear:function(){for(var g=this,d=s(g),h=d.first;h;)h.removed=!0,h.previous&&(h.previous=h.previous.next=null),h=h.next;d.first=d.last=null,d.index=Klt(null),eG?d.size=0:g.size=0},delete:function(u){var g=this,d=s(g),h=c(g,u);if(h){var m=h.next,p=h.previous;delete d.index[h.index],h.removed=!0,p&&(p.next=m),m&&(m.previous=p),d.first===h&&(d.first=m),d.last===h&&(d.last=p),eG?d.size--:g.size--}return!!h},forEach:function(g){for(var d=s(this),h=Wme(g,arguments.length>1?arguments[1]:void 0),m;m=m?m.next:d.first;)for(h(m.value,m.key,this);m&&m.removed;)m=m.previous},has:function(g){return!!c(this,g)}}),qlt(o,r?{get:function(g){var d=c(this,g);return d&&d.value},set:function(g,d){return l(this,g===0?0:g,d)}}:{add:function(g){return l(this,g=g===0?0:g,g)}}),eG&&Xme(o,"size",{configurable:!0,get:function(){return s(this).size}}),a},setStrong:function(e,t,r){var n=t+" Iterator",a=EQ(t),o=EQ(n);Sme(e,t,function(s,l){tct(this,{type:n,target:s,state:a(s),kind:l,last:null})},function(){for(var s=o(this),l=s.kind,c=s.last;c&&c.removed;)c=c.previous;return!s.target||!(s.last=c=c?c.next:s.state.first)?(s.target=null,aB(void 0,!0)):aB(l==="keys"?c.key:l==="values"?c.value:[c.key,c.value],!1)},r?"entries":"values",!r,!0),Lme(t)}}});var rct=k(()=>{"use strict";var wme=tG(),Ume=NQ();wme("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Ume)});var nct=k(()=>{"use strict";rct()});var kb=k((Qvi,act)=>{"use strict";var oB=Qe(),iG=Map.prototype;act.exports={Map,set:oB(iG.set),get:oB(iG.get),has:oB(iG.has),remove:oB(iG.delete),proto:iG}});var lct=k(()=>{"use strict";var Yme=Ut(),Eme=Qe(),Nme=Hi(),Ome=zr(),Qme=En(),sB=kb(),oct=cr(),Tme=we(),sct=sB.Map,Jme=sB.has,Hme=sB.get,_me=sB.set,jme=Eme([].push),zme=oct||Tme(function(){return sct.groupBy("ab",function(e){return e}).get("a").length!==1});Yme({target:"Map",stat:!0,forced:oct||zme},{groupBy:function(t,r){Ome(t),Nme(r);var n=new sct,a=0;return Qme(t,function(o){var s=r(o,a++);Jme(n,s)?jme(Hme(n,s),o):_me(n,s,[o])}),n}})});var OQ=k((Hvi,cct)=>{"use strict";var Dme=kb().has;cct.exports=function(e){return Dme(e),e}});var dct=k(()=>{"use strict";var Mme=Ut(),Pme=OQ(),QQ=kb(),Kme=cr(),qme=QQ.get,$me=QQ.has,tpe=QQ.set;Mme({target:"Map",proto:!0,real:!0,forced:Kme},{getOrInsert:function(t,r){return $me(Pme(this),t)?qme(this,t):(tpe(this,t,r),r)}})});var uct=k(()=>{"use strict";var epe=Ut(),ipe=Hi(),rpe=OQ(),TQ=kb(),npe=cr(),ape=TQ.get,ope=TQ.has,spe=TQ.set;epe({target:"Map",proto:!0,real:!0,forced:npe},{getOrInsertComputed:function(t,r){if(rpe(this),ipe(r),ope(this,t))return ape(this,t);t===0&&1/t===-1/0&&(t=0);var n=r(t);return spe(this,t,n),n}})});var JQ=k((Mvi,gct)=>{"use strict";var lpe=Math.log;gct.exports=Math.log1p||function(t){var r=+t;return r>-1e-8&&r<1e-8?r-r*r/2:lpe(1+r)}});var mct=k(()=>{"use strict";var cpe=Ut(),dpe=JQ(),HQ=Math.acosh,upe=Math.log,hct=Math.sqrt,gpe=Math.LN2,hpe=!HQ||Math.floor(HQ(Number.MAX_VALUE))!==710||HQ(1/0)!==1/0;cpe({target:"Math",stat:!0,forced:hpe},{acosh:function(t){var r=+t;return r<1?NaN:r>9490626562425156e-8?upe(r)+gpe:dpe(r-1+hct(r-1)*hct(r+1))}})});var fct=k(()=>{"use strict";var mpe=Ut(),pct=Math.asinh,ppe=Math.log,bpe=Math.sqrt;function bct(e){var t=+e;return!isFinite(t)||t===0?t:t<0?-bct(-t):ppe(t+bpe(t*t+1))}var fpe=!(pct&&1/pct(0)>0);mpe({target:"Math",stat:!0,forced:fpe},{asinh:bct})});var vct=k(()=>{"use strict";var Ipe=Ut(),Ict=Math.atanh,vpe=Math.log,Gpe=!(Ict&&1/Ict(-0)<0);Ipe({target:"Math",stat:!0,forced:Gpe},{atanh:function(t){var r=+t;return r===0?r:vpe((1+r)/(1-r))/2}})});var Gct=k(()=>{"use strict";var ype=Ut(),Cpe=LA(),xpe=Math.abs,Zpe=Math.pow;ype({target:"Math",stat:!0},{cbrt:function(t){var r=+t;return Cpe(r)*Zpe(xpe(r),1/3)}})});var yct=k(()=>{"use strict";var Rpe=Ut(),Ape=Math.floor,Bpe=Math.log,Xpe=Math.LOG2E;Rpe({target:"Math",stat:!0},{clz32:function(t){var r=t>>>0;return r?31-Ape(Bpe(r+.5)*Xpe):32}})});var nG=k((oGi,Cct)=>{"use strict";var rG=Math.expm1,Wpe=Math.exp;Cct.exports=!rG||rG(10)>22025.465794806718||rG(10)<22025.465794806718||rG(-2e-17)!==-2e-17?function(t){var r=+t;return r===0?r:r>-1e-6&&r<1e-6?r+r*r/2:Wpe(r)-1}:rG});var Zct=k(()=>{"use strict";var Fpe=Ut(),Vpe=nG(),xct=Math.cosh,kpe=Math.abs,_Q=Math.E,Spe=!xct||xct(710)===1/0;Fpe({target:"Math",stat:!0,forced:Spe},{cosh:function(t){var r=Vpe(kpe(t)-1)+1;return(r+1/(r*_Q*_Q))*(_Q/2)}})});var Act=k(()=>{"use strict";var Lpe=Ut(),Rct=nG();Lpe({target:"Math",stat:!0,forced:Rct!==Math.expm1},{expm1:Rct})});var Bct=k(()=>{"use strict";var wpe=Ut(),Upe=nO();wpe({target:"Math",stat:!0},{fround:Upe})});var Xct=k(()=>{"use strict";var Ype=Ut(),Epe=rO(),Npe=.0009765625,Ope=65504,Qpe=6103515625e-14;Ype({target:"Math",stat:!0},{f16round:function(t){return Epe(t,Npe,Ope,Qpe)}})});var Fct=k(()=>{"use strict";var Tpe=Ut(),Wct=Math.hypot,Jpe=Math.abs,Hpe=Math.sqrt,_pe=!!Wct&&Wct(1/0,NaN)!==1/0;Tpe({target:"Math",stat:!0,arity:2,forced:_pe},{hypot:function(t,r){for(var n=0,a=0,o=arguments.length,s=0,l,c;a0?(c=l/s,n+=c*c):n+=l;return s===1/0?1/0:s*Hpe(n)}})});var kct=k(()=>{"use strict";var jpe=Ut(),zpe=we(),Vct=Math.imul,Dpe=zpe(function(){return Vct(4294967295,5)!==-5||Vct.length!==2});jpe({target:"Math",stat:!0,forced:Dpe},{imul:function(t,r){var n=65535,a=+t,o=+r,s=n&a,l=n&o;return 0|s*l+((n&a>>>16)*l+s*(n&o>>>16)<<16>>>0)}})});var jQ=k((vGi,Sct)=>{"use strict";var Mpe=Math.log,Ppe=Math.LOG10E;Sct.exports=Math.log10||function(t){return Mpe(t)*Ppe}});var Lct=k(()=>{"use strict";var Kpe=Ut(),qpe=jQ();Kpe({target:"Math",stat:!0},{log10:qpe})});var wct=k(()=>{"use strict";var $pe=Ut(),tbe=JQ();$pe({target:"Math",stat:!0},{log1p:tbe})});var Uct=k(()=>{"use strict";var ebe=Ut(),ibe=CO();ebe({target:"Math",stat:!0},{log2:ibe})});var Yct=k(()=>{"use strict";var rbe=Ut(),nbe=LA();rbe({target:"Math",stat:!0},{sign:nbe})});var Oct=k(()=>{"use strict";var abe=Ut(),obe=we(),Ect=nG(),sbe=Math.abs,Nct=Math.exp,lbe=Math.E,cbe=obe(function(){return Math.sinh(-2e-17)!==-2e-17});abe({target:"Math",stat:!0,forced:cbe},{sinh:function(t){var r=+t;return sbe(r)<1?(Ect(r)-Ect(-r))/2:(Nct(r-1)-Nct(-r-1))*(lbe/2)}})});var _ct=k(()=>{"use strict";var dbe=Ut(),ube=Qe(),gbe=En(),hbe=RangeError,mbe=TypeError,Ts=1/0,pbe=NaN,nm=Math.abs,PQ=Math.pow,Qct=ube([].push),aG=PQ(2,1023),bbe=PQ(2,53)-1,Tct=Number.MAX_VALUE,Jct=PQ(2,971),oG={},zQ={},DQ={},MQ={},Hct={},lB=function(e,t){var r=e+t,n=t-(r-e);return{hi:r,lo:n}};dbe({target:"Math",stat:!0},{sumPrecise:function(t){var r=[],n=0,a=MQ;switch(gbe(t,function(x){if(++n>=bbe)throw new hbe("Maximum allowed index exceeded");if(typeof x!="number")throw new mbe("Value is not a number");a!==oG&&(x!==x?a=oG:x===Ts?a=a===zQ?oG:DQ:x===-Ts?a=a===DQ?oG:zQ:(x!==0||1/x===Ts)&&(a===MQ||a===Hct)&&(a=Hct,Qct(r,x)))}),a){case oG:return pbe;case zQ:return-Ts;case DQ:return Ts;case MQ:return-0}for(var o=[],s=0,l,c,u,g,d,h,m=0;m=0?o[v]:0;if(v--,nm(s)>1||s>0&&y>0||s<0&&y<0)return s>0?Ts:-Ts;if(u=lB(s*aG,y/2),g=u.hi,d=u.lo,d*=2,nm(2*g)===Ts)return g>0?g===aG&&d===-(Jct/2)&&v>=0&&o[v]<0?Tct:Ts:g===-aG&&d===Jct/2&&v>=0&&o[v]>0?-Tct:-Ts;d!==0&&(o[++v]=d,d=0),g*=2}for(;v>=0&&(u=lB(g,o[v--]),g=u.hi,d=u.lo,d===0););return v>=0&&(d<0&&o[v]<0||d>0&&o[v]>0)&&(c=d*2,l=g+c,c===l-g&&(g=l)),g}})});var Dct=k(()=>{"use strict";var fbe=Ut(),jct=nG(),zct=Math.exp;fbe({target:"Math",stat:!0},{tanh:function(t){var r=+t,n=jct(r),a=jct(-r);return n===1/0?1:a===1/0?-1:(n-a)/(zct(r)+zct(-r))}})});var Mct=k(()=>{"use strict";var Ibe=mo();Ibe(Math,"Math",!0)});var Pct=k(()=>{"use strict";var vbe=Ut(),Gbe=FE();vbe({target:"Math",stat:!0},{trunc:Gbe})});var sG=k((EGi,Kct)=>{"use strict";var ybe=Qe();Kct.exports=ybe(1.1.valueOf)});var Sb=k((NGi,qct)=>{"use strict";qct.exports=` \v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var am=k((OGi,tdt)=>{"use strict";var Cbe=Qe(),xbe=zr(),Zbe=Li(),qQ=Sb(),$ct=Cbe("".replace),Rbe=RegExp("^["+qQ+"]+"),Abe=RegExp("(^|[^"+qQ+"])["+qQ+"]+$"),KQ=function(e){return function(t){var r=Zbe(xbe(t));return e&1&&(r=$ct(r,Rbe,"")),e&2&&(r=$ct(r,Abe,"$1")),r}};tdt.exports={start:KQ(1),end:KQ(2),trim:KQ(3)}});var sdt=k(()=>{"use strict";var Bbe=Ut(),$Q=cr(),Xbe=bi(),rdt=ze(),t5=xv(),ndt=Qe(),Wbe=hb(),edt=Pi(),Fbe=Ju(),Vbe=Ma(),kbe=wu(),adt=fv(),Sbe=we(),Lbe=Eu().f,wbe=ca().f,Ube=Qr().f,Ybe=sG(),Ebe=am().trim,lG="Number",Lb=rdt[lG],idt=t5[lG],e5=Lb.prototype,Nbe=rdt.TypeError,Obe=ndt("".slice),cB=ndt("".charCodeAt),Qbe=function(e){var t=adt(e,"number");return typeof t=="bigint"?t:Tbe(t)},Tbe=function(e){var t=adt(e,"number"),r,n,a,o,s,l,c,u;if(kbe(t))throw new Nbe("Cannot convert a Symbol value to a number");if(typeof t=="string"&&t.length>2){if(t=Ebe(t),r=cB(t,0),r===43||r===45){if(n=cB(t,2),n===88||n===120)return NaN}else if(r===48){switch(cB(t,1)){case 66:case 98:a=2,o=49;break;case 79:case 111:a=8,o=55;break;default:return+t}for(s=Obe(t,2),l=s.length,c=0;co)return NaN;return parseInt(s,a)}}return+t},i5=Wbe(lG,!Lb(" 0o1")||!Lb("0b1")||Lb("+0x1")),Jbe=function(e){return Vbe(e5,e)&&Sbe(function(){Ybe(e)})},dB=function(t){var r=arguments.length<1?0:Lb(Qbe(t));return Jbe(this)?Fbe(Object(r),this,dB):r};dB.prototype=e5;i5&&!$Q&&(e5.constructor=dB);Bbe({global:!0,constructor:!0,wrap:!0,forced:i5},{Number:dB});var odt=function(e,t){for(var r=Xbe?Lbe(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),n=0,a;r.length>n;n++)edt(t,a=r[n])&&!edt(e,a)&&Ube(e,a,wbe(t,a))};$Q&&idt&&odt(t5[lG],idt);(i5||$Q)&&odt(t5[lG],Lb)});var ldt=k(()=>{"use strict";var Hbe=Ut();Hbe({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})});var ddt=k((_Gi,cdt)=>{"use strict";var _be=ze(),jbe=_be.isFinite;cdt.exports=Number.isFinite||function(t){return typeof t=="number"&&jbe(t)}});var udt=k(()=>{"use strict";var zbe=Ut(),Dbe=ddt();zbe({target:"Number",stat:!0},{isFinite:Dbe})});var uB=k((DGi,gdt)=>{"use strict";var Mbe=xi(),Pbe=Math.floor;gdt.exports=Number.isInteger||function(t){return!Mbe(t)&&isFinite(t)&&Pbe(t)===t}});var hdt=k(()=>{"use strict";var Kbe=Ut(),qbe=uB();Kbe({target:"Number",stat:!0},{isInteger:qbe})});var mdt=k(()=>{"use strict";var $be=Ut();$be({target:"Number",stat:!0},{isNaN:function(t){return t!==t}})});var pdt=k(()=>{"use strict";var tfe=Ut(),efe=uB(),ife=Math.abs;tfe({target:"Number",stat:!0},{isSafeInteger:function(t){return efe(t)&&ife(t)<=9007199254740991}})});var bdt=k(()=>{"use strict";var rfe=Ut();rfe({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})});var fdt=k(()=>{"use strict";var nfe=Ut();nfe({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})});var r5=k((ayi,ydt)=>{"use strict";var Gdt=ze(),afe=we(),ofe=Qe(),sfe=Li(),lfe=am().trim,cfe=Sb(),dfe=ofe("".charAt),gB=Gdt.parseFloat,Idt=Gdt.Symbol,vdt=Idt&&Idt.iterator,ufe=1/gB(cfe+"-0")!==-1/0||vdt&&!afe(function(){gB(Object(vdt))});ydt.exports=ufe?function(t){var r=lfe(sfe(t)),n=gB(r);return n===0&&dfe(r,0)==="-"?-0:n}:gB});var xdt=k(()=>{"use strict";var gfe=Ut(),Cdt=r5();gfe({target:"Number",stat:!0,forced:Number.parseFloat!==Cdt},{parseFloat:Cdt})});var n5=k((lyi,Wdt)=>{"use strict";var Bdt=ze(),hfe=we(),mfe=Qe(),pfe=Li(),bfe=am().trim,Zdt=Sb(),cG=Bdt.parseInt,Rdt=Bdt.Symbol,Adt=Rdt&&Rdt.iterator,Xdt=/^[+-]?0x/i,ffe=mfe(Xdt.exec),Ife=cG(Zdt+"08")!==8||cG(Zdt+"0x16")!==22||Adt&&!hfe(function(){cG(Object(Adt))});Wdt.exports=Ife?function(t,r){var n=bfe(pfe(t));return cG(n,r>>>0||(ffe(Xdt,n)?16:10))}:cG});var Vdt=k(()=>{"use strict";var vfe=Ut(),Fdt=n5();vfe({target:"Number",stat:!0,forced:Number.parseInt!==Fdt},{parseInt:Fdt})});var Udt=k(()=>{"use strict";var Gfe=Ut(),o5=Qe(),yfe=ln(),Cfe=sG(),xfe=Dv(),Zfe=jQ(),a5=we(),Rfe=RangeError,kdt=String,Afe=isFinite,Bfe=Math.abs,Xfe=Math.floor,Sdt=Math.pow,Wfe=Math.round,Wc=o5(1.1.toExponential),Ffe=o5(xfe),Ldt=o5("".slice),wdt=Wc(-69e-12,4)==="-6.9000e-11"&&Wc(1.255,2)==="1.25e+0"&&Wc(12345,3)==="1.235e+4"&&Wc(25,0)==="3e+1",Vfe=function(){return a5(function(){Wc(1,1/0)})&&a5(function(){Wc(1,-1/0)})},kfe=function(){return!a5(function(){Wc(1/0,1/0),Wc(NaN,1/0)})},Sfe=!wdt||!Vfe()||!kfe();Gfe({target:"Number",proto:!0,forced:Sfe},{toExponential:function(t){var r=Cfe(this);if(t===void 0)return Wc(r);var n=yfe(t);if(!Afe(r))return String(r);if(n<0||n>20)throw new Rfe("Incorrect fraction digits");if(wdt)return Wc(r,n);var a="",o,s,l,c;if(r<0&&(a="-",r=-r),r===0)s=0,o=Ffe("0",n+1);else{var u=Zfe(r);s=Xfe(u);var g=Sdt(10,s-n),d=Wfe(r/g);2*r>=(2*d+1)*g&&(d+=1),d>=Sdt(10,n+1)&&(d/=10,s+=1),o=kdt(d)}return n!==0&&(o=Ldt(o,0,1)+"."+Ldt(o,1)),s===0?(l="+",c="0"):(l=s>0?"+":"-",c=kdt(Bfe(s))),o+="e"+l+c,a+o}})});var Tdt=k(()=>{"use strict";var Lfe=Ut(),c5=Qe(),wfe=ln(),Ufe=sG(),Yfe=Dv(),Ydt=we(),Efe=RangeError,Odt=String,Qdt=Math.floor,l5=c5(Yfe),Edt=c5("".slice),dG=c5(1.1.toFixed),Ub=function(e,t,r){return t===0?r:t%2===1?Ub(e,t-1,r*e):Ub(e*e,t/2,r)},Nfe=function(e){for(var t=0,r=e;r>=4096;)t+=12,r/=4096;for(;r>=2;)t+=1,r/=2;return t},wb=function(e,t,r){for(var n=-1,a=r;++n<6;)a+=t*e[n],e[n]=a%1e7,a=Qdt(a/1e7)},s5=function(e,t){for(var r=6,n=0;--r>=0;)n+=e[r],e[r]=Qdt(n/t),n=n%t*1e7},Ndt=function(e){for(var t=6,r="";--t>=0;)if(r!==""||t===0||e[t]!==0){var n=Odt(e[t]);r=r===""?n:r+l5("0",7-n.length)+n}return r},Ofe=Ydt(function(){return dG(8e-5,3)!=="0.000"||dG(.9,0)!=="1"||dG(1.255,2)!=="1.25"||dG(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!Ydt(function(){dG({})});Lfe({target:"Number",proto:!0,forced:Ofe},{toFixed:function(t){var r=Ufe(this),n=wfe(t),a=[0,0,0,0,0,0],o="",s="0",l,c,u,g;if(n<0||n>20)throw new Efe("Incorrect fraction digits");if(r!==r)return"NaN";if(r<=-1e21||r>=1e21)return Odt(r);if(r<0&&(o="-",r=-r),r>1e-21)if(l=Nfe(r*Ub(2,69,1))-69,c=l<0?r*Ub(2,-l,1):r/Ub(2,l,1),c*=4503599627370496,l=52-l,l>0){for(wb(a,0,c),u=n;u>=7;)wb(a,1e7,0),u-=7;for(wb(a,Ub(10,u,1),0),u=l-1;u>=23;)s5(a,1<<23),u-=23;s5(a,1<0?(g=s.length,s=o+(g<=n?"0."+l5("0",n-g)+s:Edt(s,0,g-n)+"."+Edt(s,g-n))):s=o+s,s}})});var _dt=k(()=>{"use strict";var Qfe=Ut(),Tfe=Qe(),Jdt=we(),Hdt=sG(),hB=Tfe(1.1.toPrecision),Jfe=Jdt(function(){return hB(1,void 0)!=="1"})||!Jdt(function(){hB({})});Qfe({target:"Number",proto:!0,forced:Jfe},{toPrecision:function(t){return t===void 0?hB(Hdt(this)):hB(Hdt(this),t)}})});var u5=k((fyi,Ddt)=>{"use strict";var jdt=bi(),Hfe=Qe(),_fe=si(),jfe=we(),d5=mb(),zfe=yv(),Dfe=pv(),Mfe=pr(),Pfe=Oh(),Yb=Object.assign,zdt=Object.defineProperty,Kfe=Hfe([].concat);Ddt.exports=!Yb||jfe(function(){if(jdt&&Yb({b:1},Yb(zdt({},"a",{enumerable:!0,get:function(){zdt(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(a){t[a]=a}),Yb({},e)[r]!==7||d5(Yb({},t)).join("")!==n})?function(t,r){for(var n=Mfe(t),a=arguments.length,o=1,s=zfe.f,l=Dfe.f;a>o;)for(var c=Pfe(arguments[o++]),u=s?Kfe(d5(c),s(c)):d5(c),g=u.length,d=0,h;g>d;)h=u[d++],(!jdt||_fe(l,c,h))&&(n[h]=c[h]);return n}:Yb});var Pdt=k(()=>{"use strict";var qfe=Ut(),Mdt=u5();qfe({target:"Object",stat:!0,arity:2,forced:Object.assign!==Mdt},{assign:Mdt})});var Kdt=k(()=>{"use strict";var $fe=Ut(),t0e=bi(),e0e=ua();$fe({target:"Object",stat:!0,sham:!t0e},{create:e0e})});var uG=k((Cyi,$dt)=>{"use strict";var i0e=cr(),r0e=ze(),n0e=we(),qdt=SA();$dt.exports=i0e||!n0e(function(){if(!(qdt&&qdt<535)){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete r0e[e]}})});var tut=k(()=>{"use strict";var a0e=Ut(),o0e=bi(),s0e=uG(),l0e=Hi(),c0e=pr(),d0e=Qr();o0e&&a0e({target:"Object",proto:!0,forced:s0e},{__defineGetter__:function(t,r){d0e.f(c0e(this),t,{get:l0e(r),enumerable:!0,configurable:!0})}})});var iut=k(()=>{"use strict";var u0e=Ut(),g0e=bi(),eut=MR().f;u0e({target:"Object",stat:!0,forced:Object.defineProperties!==eut,sham:!g0e},{defineProperties:eut})});var nut=k(()=>{"use strict";var h0e=Ut(),m0e=bi(),rut=Qr().f;h0e({target:"Object",stat:!0,forced:Object.defineProperty!==rut,sham:!m0e},{defineProperty:rut})});var aut=k(()=>{"use strict";var p0e=Ut(),b0e=bi(),f0e=uG(),I0e=Hi(),v0e=pr(),G0e=Qr();b0e&&p0e({target:"Object",proto:!0,forced:f0e},{__defineSetter__:function(t,r){G0e.f(v0e(this),t,{set:I0e(r),enumerable:!0,configurable:!0})}})});var g5=k((Vyi,dut)=>{"use strict";var sut=bi(),y0e=we(),lut=Qe(),C0e=Pa(),x0e=mb(),Z0e=Mn(),R0e=pv().f,cut=lut(R0e),A0e=lut([].push),B0e=sut&&y0e(function(){var e=Object.create(null);return e[2]=2,!cut(e,2)}),out=function(e){return function(t){for(var r=Z0e(t),n=x0e(r),a=B0e&&C0e(r)===null,o=n.length,s=0,l=[],c;o>s;)c=n[s++],(!sut||(a?c in r:cut(r,c)))&&A0e(l,e?[c,r[c]]:r[c]);return l}};dut.exports={entries:out(!0),values:out(!1)}});var uut=k(()=>{"use strict";var X0e=Ut(),W0e=g5().entries;X0e({target:"Object",stat:!0},{entries:function(t){return W0e(t)}})});var gut=k(()=>{"use strict";var F0e=Ut(),V0e=$u(),k0e=we(),S0e=xi(),L0e=tg().onFreeze,h5=Object.freeze,w0e=k0e(function(){h5(1)});F0e({target:"Object",stat:!0,forced:w0e,sham:!V0e},{freeze:function(t){return h5&&S0e(t)?h5(L0e(t)):t}})});var hut=k(()=>{"use strict";var U0e=Ut(),Y0e=En(),E0e=Yn();U0e({target:"Object",stat:!0},{fromEntries:function(t){var r={};return Y0e(t,function(n,a){E0e(r,n,a)},{AS_ENTRIES:!0}),r}})});var but=k(()=>{"use strict";var N0e=Ut(),O0e=we(),Q0e=Mn(),mut=ca().f,put=bi(),T0e=!put||O0e(function(){mut(1)});N0e({target:"Object",stat:!0,forced:T0e,sham:!put},{getOwnPropertyDescriptor:function(t,r){return mut(Q0e(t),r)}})});var fut=k(()=>{"use strict";var J0e=Ut(),H0e=bi(),_0e=_R(),j0e=Mn(),z0e=ca(),D0e=Yn();J0e({target:"Object",stat:!0,sham:!H0e},{getOwnPropertyDescriptors:function(t){for(var r=j0e(t),n=z0e.f,a=_0e(r),o={},s=0,l,c;a.length>s;)c=n(r,l=a[s++]),c!==void 0&&D0e(o,l,c);return o}})});var Iut=k(()=>{"use strict";var M0e=Ut(),P0e=we(),K0e=qR().f,q0e=P0e(function(){return!Object.getOwnPropertyNames(1)});M0e({target:"Object",stat:!0,forced:q0e},{getOwnPropertyNames:K0e})});var Gut=k(()=>{"use strict";var $0e=Ut(),tIe=we(),eIe=pr(),vut=Pa(),iIe=pA(),rIe=tIe(function(){vut(1)});$0e({target:"Object",stat:!0,forced:rIe,sham:!iIe},{getPrototypeOf:function(t){return vut(eIe(t))}})});var Cut=k(()=>{"use strict";var nIe=Ut(),aIe=Yn(),oIe=Mi(),sIe=Qe(),lIe=Hi(),cIe=zr(),dIe=Ad(),uIe=En(),gIe=we(),yut=Object.groupBy,hIe=oIe("Object","create"),mIe=sIe([].push),pIe=!yut||gIe(function(){return yut("ab",function(e){return e}).a.length!==1});nIe({target:"Object",stat:!0,forced:pIe},{groupBy:function(t,r){cIe(t),lIe(r);var n=hIe(null),a=0;return uIe(t,function(o){var s=dIe(r(o,a++));s in n?mIe(n[s],o):aIe(n,s,[o])}),n}})});var xut=k(()=>{"use strict";var bIe=Ut(),fIe=Pi();bIe({target:"Object",stat:!0},{hasOwn:fIe})});var m5=k((Pyi,Zut)=>{"use strict";Zut.exports=Object.is||function(t,r){return t===r?t!==0||1/t===1/r:t!==t&&r!==r}});var Rut=k(()=>{"use strict";var IIe=Ut(),vIe=m5();IIe({target:"Object",stat:!0},{is:vIe})});var But=k(()=>{"use strict";var GIe=Ut(),Aut=nB();GIe({target:"Object",stat:!0,forced:Object.isExtensible!==Aut},{isExtensible:Aut})});var Wut=k(()=>{"use strict";var yIe=Ut(),CIe=we(),xIe=xi(),ZIe=Xa(),Xut=iB(),p5=Object.isFrozen,RIe=Xut||CIe(function(){p5(1)});yIe({target:"Object",stat:!0,forced:RIe},{isFrozen:function(t){return!xIe(t)||Xut&&ZIe(t)==="ArrayBuffer"?!0:p5?p5(t):!1}})});var Vut=k(()=>{"use strict";var AIe=Ut(),BIe=we(),XIe=xi(),WIe=Xa(),Fut=iB(),b5=Object.isSealed,FIe=Fut||BIe(function(){b5(1)});AIe({target:"Object",stat:!0,forced:FIe},{isSealed:function(t){return!XIe(t)||Fut&&WIe(t)==="ArrayBuffer"?!0:b5?b5(t):!1}})});var Sut=k(()=>{"use strict";var VIe=Ut(),kIe=pr(),kut=mb(),SIe=we(),LIe=SIe(function(){kut(1)});VIe({target:"Object",stat:!0,forced:LIe},{keys:function(t){return kut(kIe(t))}})});var Lut=k(()=>{"use strict";var wIe=Ut(),UIe=bi(),YIe=uG(),EIe=pr(),NIe=Ad(),OIe=Pa(),QIe=ca().f;UIe&&wIe({target:"Object",proto:!0,forced:YIe},{__lookupGetter__:function(t){var r=EIe(this),n=NIe(t),a;do if(a=QIe(r,n))return a.get;while(r=OIe(r))}})});var wut=k(()=>{"use strict";var TIe=Ut(),JIe=bi(),HIe=uG(),_Ie=pr(),jIe=Ad(),zIe=Pa(),DIe=ca().f;JIe&&TIe({target:"Object",proto:!0,forced:HIe},{__lookupSetter__:function(t){var r=_Ie(this),n=jIe(t),a;do if(a=DIe(r,n))return a.set;while(r=zIe(r))}})});var Uut=k(()=>{"use strict";var MIe=Ut(),PIe=xi(),KIe=tg().onFreeze,qIe=$u(),$Ie=we(),f5=Object.preventExtensions,tve=$Ie(function(){f5(1)});MIe({target:"Object",stat:!0,forced:tve,sham:!qIe},{preventExtensions:function(t){return f5&&PIe(t)?f5(KIe(t)):t}})});var Qut=k(()=>{"use strict";var eve=bi(),ive=vn(),rve=xi(),nve=hN(),ave=pr(),ove=zr(),Yut=Object.getPrototypeOf,Eut=Object.setPrototypeOf,Nut=Object.prototype,Out="__proto__";if(eve&&Yut&&Eut&&!(Out in Nut))try{ive(Nut,Out,{configurable:!0,get:function(){return Yut(ave(this))},set:function(t){var r=ove(this);nve(t)&&rve(r)&&Eut(r,t)}})}catch{}});var Tut=k(()=>{"use strict";var sve=Ut(),lve=xi(),cve=tg().onFreeze,dve=$u(),uve=we(),I5=Object.seal,gve=uve(function(){I5(1)});sve({target:"Object",stat:!0,forced:gve,sham:!dve},{seal:function(t){return I5&&lve(t)?I5(cve(t)):t}})});var Jut=k(()=>{"use strict";var hve=Ut(),mve=Qs();hve({target:"Object",stat:!0},{setPrototypeOf:mve})});var _ut=k((v1i,Hut)=>{"use strict";var pve=zR(),bve=Lo();Hut.exports=pve?{}.toString:function(){return"[object "+bve(this)+"]"}});var jut=k(()=>{"use strict";var fve=zR(),Ive=Rr(),vve=_ut();fve||Ive(Object.prototype,"toString",vve,{unsafe:!0})});var zut=k(()=>{"use strict";var Gve=Ut(),yve=g5().values;Gve({target:"Object",stat:!0},{values:function(t){return yve(t)}})});var Mut=k(()=>{"use strict";var Cve=Ut(),Dut=r5();Cve({global:!0,forced:parseFloat!==Dut},{parseFloat:Dut})});var Kut=k(()=>{"use strict";var xve=Ut(),Put=n5();xve({global:!0,forced:parseInt!==Put},{parseInt:Put})});var mB=k((X1i,qut)=>{"use strict";var Zve=Ou(),Rve=Uu(),Ave=TypeError;qut.exports=function(e){if(Zve(e))return e;throw new Ave(Rve(e)+" is not a constructor")}});var gG=k((W1i,tgt)=>{"use strict";var $ut=gi(),Bve=mB(),Xve=Gc(),Wve=Wi(),Fve=Wve("species");tgt.exports=function(e,t){var r=$ut(e).constructor,n;return r===void 0||Xve(n=$ut(r)[Fve])?t:Bve(n)}});var ps=k((F1i,egt)=>{"use strict";var Vve=TypeError;egt.exports=function(e,t){if(e{"use strict";var kve=Xl();igt.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(kve)});var pG=k((k1i,ugt)=>{"use strict";var bs=ze(),Sve=Yo(),Lve=wo(),rgt=ar(),wve=Pi(),dgt=we(),ngt=SE(),Uve=hs(),agt=Iv(),Yve=ps(),Eve=v5(),Nve=tm(),R5=bs.setImmediate,A5=bs.clearImmediate,Ove=bs.process,G5=bs.Dispatch,Qve=bs.Function,ogt=bs.MessageChannel,Tve=bs.String,y5=0,hG={},sgt="onreadystatechange",mG,om,C5,x5;dgt(function(){mG=bs.location});var B5=function(e){if(wve(hG,e)){var t=hG[e];delete hG[e],t()}},Z5=function(e){return function(){B5(e)}},lgt=function(e){B5(e.data)},cgt=function(e){bs.postMessage(Tve(e),mG.protocol+"//"+mG.host)};(!R5||!A5)&&(R5=function(t){Yve(arguments.length,1);var r=rgt(t)?t:Qve(t),n=Uve(arguments,1);return hG[++y5]=function(){Sve(r,void 0,n)},om(y5),y5},A5=function(t){delete hG[t]},Nve?om=function(e){Ove.nextTick(Z5(e))}:G5&&G5.now?om=function(e){G5.now(Z5(e))}:ogt&&!Eve?(C5=new ogt,x5=C5.port2,C5.port1.onmessage=lgt,om=Lve(x5.postMessage,x5)):bs.addEventListener&&rgt(bs.postMessage)&&!bs.importScripts&&mG&&mG.protocol!=="file:"&&!dgt(cgt)?(om=cgt,bs.addEventListener("message",lgt,!1)):sgt in agt("script")?om=function(e){ngt.appendChild(agt("script"))[sgt]=function(){ngt.removeChild(this),B5(e)}}:om=function(e){setTimeout(Z5(e),0)});ugt.exports={set:R5,clear:A5}});var X5=k((S1i,hgt)=>{"use strict";var ggt=ze(),Jve=bi(),Hve=Object.getOwnPropertyDescriptor;hgt.exports=function(e){if(!Jve)return ggt[e];var t=Hve(ggt,e);return t&&t.value}});var W5=k((L1i,pgt)=>{"use strict";var mgt=function(){this.head=null,this.tail=null};mgt.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e){var t=this.head=e.next;return t===null&&(this.tail=null),e.item}}};pgt.exports=mgt});var fgt=k((w1i,bgt)=>{"use strict";var _ve=Xl();bgt.exports=/ipad|iphone|ipod/i.test(_ve)&&typeof Pebble<"u"});var vgt=k((U1i,Igt)=>{"use strict";var jve=Xl();Igt.exports=/web0s(?!.*chrome)/i.test(jve)});var w5=k((Y1i,Rgt)=>{"use strict";var Nb=ze(),zve=X5(),Ggt=wo(),F5=pG().set,Dve=W5(),Mve=v5(),Pve=fgt(),Kve=vgt(),V5=tm(),ygt=Nb.MutationObserver||Nb.WebKitMutationObserver,Cgt=Nb.document,xgt=Nb.process,pB=Nb.Promise,L5=zve("queueMicrotask"),Eb,k5,S5,bB,Zgt;L5||(bG=new Dve,fG=function(){var e,t;for(V5&&(e=xgt.domain)&&e.exit();t=bG.get();)try{t()}catch(r){throw bG.head&&Eb(),r}e&&e.enter()},!Mve&&!V5&&!Kve&&ygt&&Cgt?(k5=!0,S5=Cgt.createTextNode(""),new ygt(fG).observe(S5,{characterData:!0}),Eb=function(){S5.data=k5=!k5}):!Pve&&pB&&pB.resolve?(bB=pB.resolve(void 0),bB.constructor=pB,Zgt=Ggt(bB.then,bB),Eb=function(){Zgt(fG)}):V5?Eb=function(){xgt.nextTick(fG)}:(F5=Ggt(F5,Nb),Eb=function(){F5(fG)}),L5=function(e){bG.head||Eb(),bG.add(e)});var bG,fG;Rgt.exports=L5});var Bgt=k((E1i,Agt)=>{"use strict";Agt.exports=function(e,t){try{arguments.length===1?console.error(e):console.error(e,t)}catch{}}});var sm=k((N1i,Xgt)=>{"use strict";Xgt.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}});var lm=k((O1i,Wgt)=>{"use strict";var qve=ze();Wgt.exports=qve.Promise});var Ob=k((Q1i,Sgt)=>{"use strict";var $ve=ze(),IG=lm(),tGe=ar(),eGe=hb(),iGe=ER(),rGe=Wi(),Fgt=Tv(),nGe=cr(),U5=Fl(),Vgt=IG&&IG.prototype,aGe=rGe("species"),Y5=!1,kgt=tGe($ve.PromiseRejectionEvent),oGe=eGe("Promise",function(){var e=iGe(IG),t=e!==String(IG);if(!t&&U5===66||nGe&&!(Vgt.catch&&Vgt.finally))return!0;if(!U5||U5<51||!/native code/.test(e)){var r=new IG(function(o){o(1)}),n=function(o){o(function(){},function(){})},a=r.constructor={};if(a[aGe]=n,Y5=r.then(function(){})instanceof n,!Y5)return!0}return!t&&(Fgt==="BROWSER"||Fgt==="DENO")&&!kgt});Sgt.exports={CONSTRUCTOR:oGe,REJECTION_EVENT:kgt,SUBCLASSING:Y5}});var Fc=k((T1i,wgt)=>{"use strict";var Lgt=Hi(),sGe=TypeError,lGe=function(e){var t,r;this.promise=new e(function(n,a){if(t!==void 0||r!==void 0)throw new sGe("Bad Promise constructor");t=n,r=a}),this.resolve=Lgt(t),this.reject=Lgt(r)};wgt.exports.f=function(e){return new lGe(e)}});var eht=k(()=>{"use strict";var cGe=Ut(),dGe=cr(),GB=tm(),eg=ze(),uGe=xv(),Hb=si(),Ugt=Rr(),Ygt=Qs(),gGe=mo(),hGe=em(),mGe=Hi(),vB=ar(),pGe=xi(),bGe=Eo(),fGe=gG(),Tgt=pG().set,T5=w5(),IGe=Bgt(),vGe=sm(),GGe=W5(),Jgt=Tr(),yB=lm(),J5=Ob(),Hgt=Fc(),CB="Promise",_gt=J5.CONSTRUCTOR,yGe=J5.REJECTION_EVENT,CGe=J5.SUBCLASSING,E5=Jgt.getterFor(CB),xGe=Jgt.set,Qb=yB&&yB.prototype,cm=yB,fB=Qb,jgt=eg.TypeError,N5=eg.document,H5=eg.process,O5=Hgt.f,ZGe=O5,RGe=!!(N5&&N5.createEvent&&eg.dispatchEvent),zgt="unhandledrejection",AGe="rejectionhandled",Egt=0,Dgt=1,BGe=2,_5=1,Mgt=2,IB,Ngt,Pgt,Ogt,Kgt=function(e){var t;return pGe(e)&&vB(t=e.then)?t:!1},qgt=function(e,t){var r=t.value,n=t.state===Dgt,a=n?e.ok:e.fail,o=e.resolve,s=e.reject,l=e.domain,c,u,g;try{a?(n||(t.rejection===Mgt&&WGe(t),t.rejection=_5),a===!0?c=r:(l&&l.enter(),c=a(r),l&&(l.exit(),g=!0)),c===e.promise?s(new jgt("Promise-chain cycle")):(u=Kgt(c))?Hb(u,c,o,s):o(c)):s(r)}catch(d){l&&!g&&l.exit(),s(d)}},$gt=function(e,t){e.notified||(e.notified=!0,T5(function(){for(var r=e.reactions,n;n=r.get();)qgt(n,e);e.notified=!1,t&&!e.rejection&&XGe(e)}))},tht=function(e,t,r){var n,a;RGe?(n=N5.createEvent("Event"),n.promise=t,n.reason=r,n.initEvent(e,!1,!0),eg.dispatchEvent(n)):n={promise:t,reason:r},!yGe&&(a=eg["on"+e])?a(n):e===zgt&&IGe("Unhandled promise rejection",r)},XGe=function(e){Hb(Tgt,eg,function(){var t=e.facade,r=e.value,n=Qgt(e),a;if(n&&(a=vGe(function(){GB?H5.emit("unhandledRejection",r,t):tht(zgt,t,r)}),e.rejection=GB||Qgt(e)?Mgt:_5,a.error))throw a.value})},Qgt=function(e){return e.rejection!==_5&&!e.parent},WGe=function(e){Hb(Tgt,eg,function(){var t=e.facade;GB?H5.emit("rejectionHandled",t):tht(AGe,t,e.value)})},Tb=function(e,t,r){return function(n){e(t,n,r)}},Jb=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=BGe,$gt(e,!0))},Q5=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new jgt("Promise can't be resolved itself");var n=Kgt(t);n?T5(function(){var a={done:!1};try{Hb(n,t,Tb(Q5,a,e),Tb(Jb,a,e))}catch(o){Jb(a,o,e)}}):(e.value=t,e.state=Dgt,$gt(e,!1))}catch(a){Jb({done:!1},a,e)}}};if(_gt&&(cm=function(t){bGe(this,fB),mGe(t),Hb(IB,this);var r=E5(this);try{t(Tb(Q5,r),Tb(Jb,r))}catch(n){Jb(r,n)}},fB=cm.prototype,IB=function(t){xGe(this,{type:CB,done:!1,notified:!1,parent:!1,reactions:new GGe,rejection:!1,state:Egt,value:null})},IB.prototype=Ugt(fB,"then",function(t,r){var n=E5(this),a=O5(fGe(this,cm));return n.parent=!0,a.ok=vB(t)?t:!0,a.fail=vB(r)&&r,a.domain=GB?H5.domain:void 0,n.state===Egt?n.reactions.add(a):T5(function(){qgt(a,n)}),a.promise}),Ngt=function(){var e=new IB,t=E5(e);this.promise=e,this.resolve=Tb(Q5,t),this.reject=Tb(Jb,t)},Hgt.f=O5=function(e){return e===cm||e===Pgt?new Ngt(e):ZGe(e)},!dGe&&vB(yB)&&Qb!==Object.prototype)){Ogt=Qb.then,CGe||Ugt(Qb,"then",function(t,r){var n=this;return new cm(function(a,o){Hb(Ogt,n,a,o)}).then(t,r)},{unsafe:!0});try{delete Qb.constructor}catch{}Ygt&&Ygt(Qb,fB)}cGe({global:!0,constructor:!0,wrap:!0,forced:_gt},{Promise:cm});Pgt=uGe.Promise;gGe(cm,CB,!1,!0);hGe(CB)});var vG=k((_1i,iht)=>{"use strict";var FGe=lm(),VGe=Uv(),kGe=Ob().CONSTRUCTOR;iht.exports=kGe||!VGe(function(e){FGe.all(e).then(void 0,function(){})})});var rht=k(()=>{"use strict";var SGe=Ut(),LGe=si(),wGe=Hi(),UGe=Fc(),YGe=sm(),EGe=En(),NGe=vG();SGe({target:"Promise",stat:!0,forced:NGe},{all:function(t){var r=this,n=UGe.f(r),a=n.resolve,o=n.reject,s=YGe(function(){var l=wGe(r.resolve),c=[],u=0,g=1;EGe(t,function(d){var h=u++,m=!1;g++,LGe(l,r,d).then(function(p){m||(m=!0,c[h]=p,--g||a(c))},o)}),--g||a(c)});return s.error&&o(s.value),n.promise}})});var aht=k(()=>{"use strict";var OGe=Ut(),QGe=cr(),TGe=Ob().CONSTRUCTOR,z5=lm(),JGe=Mi(),HGe=ar(),_Ge=Rr(),nht=z5&&z5.prototype;OGe({target:"Promise",proto:!0,forced:TGe,real:!0},{catch:function(e){return this.then(void 0,e)}});!QGe&&HGe(z5)&&(j5=JGe("Promise").prototype.catch,nht.catch!==j5&&_Ge(nht,"catch",j5,{unsafe:!0}));var j5});var oht=k(()=>{"use strict";var jGe=Ut(),zGe=si(),DGe=Hi(),MGe=Fc(),PGe=sm(),KGe=En(),qGe=vG();jGe({target:"Promise",stat:!0,forced:qGe},{race:function(t){var r=this,n=MGe.f(r),a=n.reject,o=PGe(function(){var s=DGe(r.resolve);KGe(t,function(l){zGe(s,r,l).then(n.resolve,a)})});return o.error&&a(o.value),n.promise}})});var sht=k(()=>{"use strict";var $Ge=Ut(),tye=Fc(),eye=Ob().CONSTRUCTOR;$Ge({target:"Promise",stat:!0,forced:eye},{reject:function(t){var r=tye.f(this),n=r.reject;return n(t),r.promise}})});var D5=k((tCi,lht)=>{"use strict";var iye=gi(),rye=xi(),nye=Fc();lht.exports=function(e,t){if(iye(e),rye(t)&&t.constructor===e)return t;var r=nye.f(e),n=r.resolve;return n(t),r.promise}});var uht=k(()=>{"use strict";var aye=Ut(),oye=Mi(),cht=cr(),sye=lm(),dht=Ob().CONSTRUCTOR,lye=D5(),cye=oye("Promise"),dye=cht&&!dht;aye({target:"Promise",stat:!0,forced:cht||dht},{resolve:function(t){return lye(dye&&this===cye?sye:this,t)}})});var ght=k(()=>{"use strict";eht();rht();aht();oht();sht();uht()});var hht=k(()=>{"use strict";var uye=Ut(),gye=si(),hye=Hi(),mye=Fc(),pye=sm(),bye=En(),fye=vG();uye({target:"Promise",stat:!0,forced:fye},{allSettled:function(t){var r=this,n=mye.f(r),a=n.resolve,o=n.reject,s=pye(function(){var l=hye(r.resolve),c=[],u=0,g=1;bye(t,function(d){var h=u++,m=!1;g++,gye(l,r,d).then(function(p){m||(m=!0,c[h]={status:"fulfilled",value:p},--g||a(c))},function(p){m||(m=!0,c[h]={status:"rejected",reason:p},--g||a(c))})}),--g||a(c)});return s.error&&o(s.value),n.promise}})});var pht=k(()=>{"use strict";var Iye=Ut(),vye=si(),Gye=Hi(),yye=Mi(),Cye=Fc(),xye=sm(),Zye=En(),Rye=vG(),mht="No one promise resolved";Iye({target:"Promise",stat:!0,forced:Rye},{any:function(t){var r=this,n=yye("AggregateError"),a=Cye.f(r),o=a.resolve,s=a.reject,l=xye(function(){var c=Gye(r.resolve),u=[],g=0,d=1,h=!1;Zye(t,function(m){var p=g++,b=!1;d++,vye(c,r,m).then(function(f){b||h||(h=!0,o(f))},function(f){b||h||(b=!0,u[p]=f,--d||s(new n(u,mht)))})}),--d||s(new n(u,mht))});return l.error&&s(l.value),a.promise}})});var vht=k(()=>{"use strict";var Aye=Ut(),Bye=cr(),xB=lm(),Xye=we(),fht=Mi(),Iht=ar(),Wye=gG(),bht=D5(),Fye=Rr(),P5=xB&&xB.prototype,Vye=!!xB&&Xye(function(){P5.finally.call({then:function(){}},function(){})});Aye({target:"Promise",proto:!0,real:!0,forced:Vye},{finally:function(e){var t=Wye(this,fht("Promise")),r=Iht(e);return this.then(r?function(n){return bht(t,e()).then(function(){return n})}:e,r?function(n){return bht(t,e()).then(function(){throw n})}:e)}});!Bye&&Iht(xB)&&(M5=fht("Promise").prototype.finally,P5.finally!==M5&&Fye(P5,"finally",M5,{unsafe:!0}));var M5});var Cht=k(()=>{"use strict";var kye=Ut(),Sye=ze(),Lye=Yo(),wye=hs(),Uye=Fc(),Yye=Hi(),yht=sm(),K5=Sye.Promise,Ght=!1,Eye=!K5||!K5.try||yht(function(){K5.try(function(e){Ght=e===8},8)}).error||!Ght;kye({target:"Promise",stat:!0,forced:Eye},{try:function(e){var t=arguments.length>1?wye(arguments,1):[],r=Uye.f(this),n=yht(function(){return Lye(Yye(e),void 0,t)});return(n.error?r.reject:r.resolve)(n.value),r.promise}})});var xht=k(()=>{"use strict";var Nye=Ut(),Oye=Fc();Nye({target:"Promise",stat:!0},{withResolvers:function(){var t=Oye.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}})});var $5=k((pCi,Vht)=>{"use strict";var Xht=ze(),Wht=bv(),Fht=ar(),Qye=ua(),ZB=Pa(),Tye=Rr(),Jye=Wi(),Hye=cr(),Zht="USE_FUNCTION_CONSTRUCTOR",Rht=Jye("asyncIterator"),Aht=Xht.AsyncIterator,Bht=Wht.AsyncIteratorPrototype,Vc,q5;if(Bht)Vc=Bht;else if(Fht(Aht))Vc=Aht.prototype;else if(Wht[Zht]||Xht[Zht])try{q5=ZB(ZB(ZB(Function("return async function*(){}()")()))),ZB(q5)===Object.prototype&&(Vc=q5)}catch{}Vc?Hye&&(Vc=Qye(Vc)):Vc={};Fht(Vc[Rht])||Tye(Vc,Rht,function(){return this});Vht.exports=Vc});var eT=k((bCi,Oht)=>{"use strict";var kht=si(),Sht=gi(),_ye=ua(),jye=la(),zye=Rc(),Uht=Tr(),Dye=ma(),Mye=Mi(),Pye=$5(),Yht=_u(),tT=Mye("Promise"),Eht="AsyncFromSyncIterator",Kye=Uht.set,Lht=Uht.getterFor(Eht),wht=function(e,t,r,n,a){var o=e.done;tT.resolve(e.value).then(function(s){t(Yht(s,o))},function(s){if(!o&&a)try{Dye(n,"throw",s)}catch(l){s=l}r(s)})},Nht=function(t){t.type=Eht,Kye(this,t)};Nht.prototype=zye(_ye(Pye),{next:function(){var t=Lht(this);return new tT(function(r,n){var a=Sht(kht(t.next,t.iterator));wht(a,r,n,t.iterator,!0)})},return:function(){var e=Lht(this).iterator;return new tT(function(t,r){var n=jye(e,"return");if(n===void 0)return t(Yht(void 0,!0));var a=Sht(kht(n,e));wht(a,t,r,e)})}});Oht.exports=Nht});var Tht=k((fCi,Qht)=>{"use strict";var qye=si(),$ye=eT(),t1e=gi(),e1e=Kh(),i1e=Fa(),r1e=la(),n1e=Wi(),a1e=n1e("asyncIterator");Qht.exports=function(e,t){var r=arguments.length<2?r1e(e,a1e):t;return r?t1e(qye(r,e)):new $ye(i1e(e1e(e)))}});var Hht=k((ICi,Jht)=>{"use strict";var o1e=si(),s1e=Mi(),l1e=la();Jht.exports=function(e,t,r,n){try{var a=l1e(e,"return");if(a)return s1e("Promise").resolve(o1e(a,e)).then(function(){t(r)},function(o){n(o)})}catch(o){return n(o)}t(r)}});var zht=k((vCi,jht)=>{"use strict";var c1e=si(),d1e=Hi(),iT=gi(),u1e=xi(),g1e=Hu(),h1e=Mi(),_ht=Yn(),m1e=Fd(),p1e=Fa(),rT=Hht(),GG=function(e){var t=e===0,r=e===1,n=e===2,a=e===3;return function(o,s,l){iT(o);var c=s!==void 0;(c||!t)&&d1e(s);var u=p1e(o),g=h1e("Promise"),d=u.iterator,h=u.next,m=0;return new g(function(p,b){var f=function(y){rT(d,b,y,b)},v=function(){try{if(c)try{g1e(m)}catch(y){f(y)}g.resolve(iT(c1e(h,d))).then(function(y){try{if(iT(y).done)t?(m1e(l,m),p(l)):p(a?!1:n||void 0);else{var x=y.value;try{if(c){var C=s(x,m),I=function(Z){if(r)v();else if(n)Z?v():rT(d,p,!1,b);else if(t)try{_ht(l,m++,Z),v()}catch(F){f(F)}else Z?rT(d,p,a||x,b):v()};u1e(C)?g.resolve(C).then(I,f):I(C)}else _ht(l,m++,x),v()}catch(Z){f(Z)}}}catch(Z){b(Z)}},b)}catch(y){b(y)}};v()})}};jht.exports={toArray:GG(0),forEach:GG(1),every:GG(2),some:GG(3),find:GG(4)}});var qht=k((GCi,Kht)=>{"use strict";var b1e=wo(),Dht=Qe(),f1e=pr(),I1e=Ou(),v1e=Tht(),G1e=Kh(),y1e=Fa(),C1e=Wd(),x1e=la(),Z1e=Mi(),R1e=tO(),A1e=Wi(),B1e=eT(),X1e=zht().toArray,W1e=A1e("asyncIterator"),Mht=Dht(R1e("Array","values")),F1e=Dht(Mht([]).next),V1e=function(){return new Pht(this)},Pht=function(e){this.iterator=Mht(e)};Pht.prototype.next=function(){return F1e(this.iterator)};Kht.exports=function(t){var r=this,n=arguments.length,a=n>1?arguments[1]:void 0,o=n>2?arguments[2]:void 0;return new(Z1e("Promise"))(function(s){var l=f1e(t);a!==void 0&&(a=b1e(a,o));var c=x1e(l,W1e),u=c?void 0:C1e(l)||V1e,g=I1e(r)?new r:[],d=c?v1e(l,c):new B1e(y1e(G1e(l,u)));s(X1e(d,a,g))})}});var tmt=k(()=>{"use strict";var k1e=Ut(),S1e=qht(),L1e=we(),$ht=Array.fromAsync,w1e=!$ht||L1e(function(){var e=0;return $ht.call(function(){return e++,[]},{length:0}),e!==1});k1e({target:"Array",stat:!0,forced:w1e},{fromAsync:S1e})});var lmt=k(()=>{"use strict";var U1e=Ut(),AB=bi(),nmt=Mi(),emt=Hi(),Y1e=Eo(),amt=Rr(),E1e=Rc(),N1e=vn(),omt=Wi(),smt=Tr(),nT=JO(),imt=Fl(),rmt=nmt("Promise"),O1e=nmt("SuppressedError"),Q1e=ReferenceError,T1e=omt("asyncDispose"),J1e=omt("toStringTag"),XB="AsyncDisposableStack",H1e=smt.set,BB=smt.getterFor(XB),aT="async-dispose",yG="disposed",_1e="pending",RB=function(e){var t=BB(e);if(t.state===yG)throw new Q1e(XB+" already disposed");return t},oT=function(){H1e(Y1e(this,_b),{type:XB,state:_1e,stack:[]}),AB||(this.disposed=!1)},_b=oT.prototype;E1e(_b,{disposeAsync:function(){var t=this;return new rmt(function(r,n){var a=BB(t);if(a.state===yG)return r(void 0);a.state=yG,AB||(t.disposed=!0);var o=a.stack,s=o.length,l=!1,c,u=function(d){l?c=new O1e(d,c):(l=!0,c=d),g()},g=function(){if(s){var d=o[--s];o[s]=null;try{rmt.resolve(d()).then(g,u)}catch(h){u(h)}}else a.stack=null,l?n(c):r(void 0)};g()})},use:function(t){return nT(RB(this),t,aT),t},adopt:function(t,r){var n=RB(this);return emt(r),nT(n,void 0,aT,function(){return r(t)}),t},defer:function(t){var r=RB(this);emt(t),nT(r,void 0,aT,t)},move:function(){var t=RB(this),r=new oT;return BB(r).stack=t.stack,t.stack=[],t.state=yG,AB||(this.disposed=!0),r}});AB&&N1e(_b,"disposed",{configurable:!0,get:function(){return BB(this).state===yG}});amt(_b,T1e,_b.disposeAsync,{name:"disposeAsync"});amt(_b,J1e,XB,{nonWritable:!0});var j1e=imt&&imt<136;U1e({global:!0,constructor:!0,forced:j1e},{AsyncDisposableStack:oT})});var gmt=k(()=>{"use strict";var z1e=si(),D1e=Rr(),M1e=Mi(),P1e=la(),K1e=Pi(),q1e=Wi(),cmt=$5(),dmt=q1e("asyncDispose"),umt=M1e("Promise");K1e(cmt,dmt)||D1e(cmt,dmt,function(){var e=this;return new umt(function(t,r){var n=P1e(e,"return");n?umt.resolve(z1e(n,e)).then(function(){t(void 0)},r):t(void 0)})})});var hmt=k(()=>{"use strict";var $1e=Ut(),tCe=Yo(),eCe=Hi(),iCe=gi(),rCe=we(),nCe=!rCe(function(){Reflect.apply(function(){})});$1e({target:"Reflect",stat:!0,forced:nCe},{apply:function(t,r,n){return tCe(eCe(t),r,iCe(n))}})});var Gmt=k(()=>{"use strict";var aCe=Ut(),oCe=Mi(),sT=Yo(),sCe=DO(),mmt=mB(),lCe=gi(),pmt=xi(),cCe=ua(),fmt=we(),lT=oCe("Reflect","construct"),dCe=Object.prototype,uCe=[].push,Imt=fmt(function(){function e(){}return!(lT(function(){},[],e)instanceof e)}),vmt=!fmt(function(){lT(function(){})}),bmt=Imt||vmt;aCe({target:"Reflect",stat:!0,forced:bmt,sham:bmt},{construct:function(t,r){mmt(t),lCe(r);var n=arguments.length<3?t:mmt(arguments[2]);if(vmt&&!Imt)return lT(t,r,n);if(t===n){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var a=[null];return sT(uCe,a,r),new(sT(sCe,t,a))}var o=n.prototype,s=cCe(pmt(o)?o:dCe),l=sT(t,s,r);return pmt(l)?l:s}})});var xmt=k(()=>{"use strict";var gCe=Ut(),hCe=bi(),ymt=gi(),mCe=Ad(),Cmt=Qr(),pCe=we(),bCe=pCe(function(){Reflect.defineProperty(Cmt.f({},1,{value:1}),1,{value:2})});gCe({target:"Reflect",stat:!0,forced:bCe,sham:!hCe},{defineProperty:function(t,r,n){ymt(t);var a=mCe(r);ymt(n);try{return Cmt.f(t,a,n),!0}catch{return!1}}})});var Zmt=k(()=>{"use strict";var fCe=Ut(),ICe=gi(),vCe=ca().f;fCe({target:"Reflect",stat:!0},{deleteProperty:function(t,r){var n=vCe(ICe(t),r);return n&&!n.configurable?!1:delete t[r]}})});var cT=k((wCi,Amt)=>{"use strict";var Rmt=Pi();Amt.exports=function(e){return e!==void 0&&(Rmt(e,"value")||Rmt(e,"writable"))}});var Xmt=k(()=>{"use strict";var GCe=Ut(),yCe=si(),CCe=xi(),xCe=gi(),ZCe=cT(),RCe=ca(),ACe=Pa();function Bmt(e,t){var r=arguments.length<3?e:arguments[2],n,a;if(xCe(e)===r)return e[t];if(n=RCe.f(e,t),n)return ZCe(n)?n.value:n.get===void 0?void 0:yCe(n.get,r);if(CCe(a=ACe(e)))return Bmt(a,t,r)}GCe({target:"Reflect",stat:!0},{get:Bmt})});var Wmt=k(()=>{"use strict";var BCe=Ut(),XCe=bi(),WCe=gi(),FCe=ca();BCe({target:"Reflect",stat:!0,sham:!XCe},{getOwnPropertyDescriptor:function(t,r){return FCe.f(WCe(t),r)}})});var Fmt=k(()=>{"use strict";var VCe=Ut(),kCe=gi(),SCe=Pa(),LCe=pA();VCe({target:"Reflect",stat:!0,sham:!LCe},{getPrototypeOf:function(t){return SCe(kCe(t))}})});var Vmt=k(()=>{"use strict";var wCe=Ut();wCe({target:"Reflect",stat:!0},{has:function(t,r){return r in t}})});var kmt=k(()=>{"use strict";var UCe=Ut(),YCe=gi(),ECe=nB();UCe({target:"Reflect",stat:!0},{isExtensible:function(t){return YCe(t),ECe(t)}})});var Smt=k(()=>{"use strict";var NCe=Ut(),OCe=_R();NCe({target:"Reflect",stat:!0},{ownKeys:OCe})});var Lmt=k(()=>{"use strict";var QCe=Ut(),TCe=Mi(),JCe=gi(),HCe=$u();QCe({target:"Reflect",stat:!0,sham:!HCe},{preventExtensions:function(t){JCe(t);try{var r=TCe("Object","preventExtensions");return r&&r(t),!0}catch{return!1}}})});var Nmt=k(()=>{"use strict";var _Ce=Ut(),jCe=si(),zCe=gi(),wmt=xi(),DCe=cT(),MCe=we(),dT=Qr(),Umt=ca(),PCe=Pa(),Ymt=ko();function Emt(e,t,r){var n=arguments.length<4?e:arguments[3],a=Umt.f(zCe(e),t),o,s,l;if(!a){if(wmt(s=PCe(e)))return Emt(s,t,r,n);a=Ymt(0)}if(DCe(a)){if(a.writable===!1||!wmt(n))return!1;if(o=Umt.f(n,t)){if(o.get||o.set||o.writable===!1)return!1;o.value=r,dT.f(n,t,o)}else dT.f(n,t,Ymt(0,r))}else{if(l=a.set,l===void 0)return!1;jCe(l,n,r)}return!0}var KCe=MCe(function(){var e=function(){},t=dT.f(new e,"a",{configurable:!0});return Reflect.set(e.prototype,"a",1,t)!==!1});_Ce({target:"Reflect",stat:!0,forced:KCe},{set:Emt})});var Qmt=k(()=>{"use strict";var qCe=Ut(),$Ce=gi(),txe=mN(),Omt=Qs();Omt&&qCe({target:"Reflect",stat:!0},{setPrototypeOf:function(t,r){$Ce(t),txe(r);try{return Omt(t,r),!0}catch{return!1}}})});var Tmt=k(()=>{"use strict";var exe=Ut(),ixe=ze(),rxe=mo();exe({global:!0},{Reflect:{}});rxe(ixe.Reflect,"Reflect",!0)});var CG=k((ixi,Jmt)=>{"use strict";var nxe=xi(),axe=Xa(),oxe=Wi(),sxe=oxe("match");Jmt.exports=function(e){var t;return nxe(e)&&((t=e[sxe])!==void 0?!!t:axe(e)==="RegExp")}});var uT=k((rxi,_mt)=>{"use strict";var lxe=ze(),cxe=we(),Hmt=lxe.RegExp,dxe=!cxe(function(){var e=!0;try{Hmt(".","d")}catch{e=!1}var t={},r="",n=e?"dgimsy":"gimsy",a=function(c,u){Object.defineProperty(t,c,{get:function(){return r+=u,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};e&&(o.hasIndices="d");for(var s in o)a(s,o[s]);var l=Object.getOwnPropertyDescriptor(Hmt.prototype,"flags").get.call(t);return l!==n||r!==n});_mt.exports={correct:dxe}});var WB=k((nxi,jmt)=>{"use strict";var uxe=gi();jmt.exports=function(){var e=uxe(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}});var ig=k((axi,Dmt)=>{"use strict";var gxe=si(),hxe=Pi(),mxe=Ma(),zmt=uT(),pxe=WB(),bxe=RegExp.prototype;Dmt.exports=zmt.correct?function(e){return e.flags}:function(e){return!zmt.correct&&mxe(bxe,e)&&!hxe(e,"flags")?gxe(pxe,e):e.flags}});var xG=k((oxi,Mmt)=>{"use strict";var gT=we(),fxe=ze(),hT=fxe.RegExp,mT=gT(function(){var e=hT("a","y");return e.lastIndex=2,e.exec("abcd")!==null}),Ixe=mT||gT(function(){return!hT("a","y").sticky}),vxe=mT||gT(function(){var e=hT("^r","gy");return e.lastIndex=2,e.exec("str")!==null});Mmt.exports={BROKEN_CARET:vxe,MISSED_STICKY:Ixe,UNSUPPORTED_Y:mT}});var FB=k((sxi,Pmt)=>{"use strict";var Gxe=we(),yxe=ze(),Cxe=yxe.RegExp;Pmt.exports=Gxe(function(){var e=Cxe(".","s");return!(e.dotAll&&e.test(` `)&&e.flags==="s")})});var pT=k((lxi,Kmt)=>{"use strict";var xxe=we(),Zxe=ze(),Rxe=Zxe.RegExp;Kmt.exports=xxe(function(){var e=Rxe("(?b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$c")!=="bc"})});var spt=k(()=>{"use strict";var Axe=bi(),vT=ze(),ZG=Qe(),Bxe=hb(),Xxe=Ju(),Wxe=da(),Fxe=ua(),Vxe=Eu().f,qmt=Ma(),kxe=CG(),$mt=Li(),Sxe=ig(),rpt=xG(),Lxe=pN(),wxe=Rr(),Uxe=we(),Yxe=Pi(),Exe=Tr().enforce,Nxe=em(),Oxe=Wi(),npt=FB(),apt=pT(),Qxe=Oxe("match"),ng=vT.RegExp,jb=ng.prototype,Txe=vT.SyntaxError,Jxe=ZG(jb.exec),VB=ZG("".charAt),tpt=ZG("".replace),ept=ZG("".indexOf),ipt=ZG("".slice),Hxe=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,dm=/a/g,bT=/a/g,_xe=new ng(dm)!==dm,opt=rpt.MISSED_STICKY,jxe=rpt.UNSUPPORTED_Y,zxe=Axe&&(!_xe||opt||npt||apt||Uxe(function(){return bT[Qxe]=!1,ng(dm)!==dm||ng(bT)===bT||String(ng(dm,"i"))!=="/a/i"})),Dxe=function(e){for(var t=e.length,r=0,n="",a=!1,o;r"&&l):if(u===""||Yxe(o,u))throw new Txe("Invalid capture group name");o[u]=!0,a[a.length]=[u,c],l=!1,u="";continue}l?u+=g:n+=g}return[n,a]};if(Bxe("RegExp",zxe)){for(rg=function(t,r){var n=qmt(jb,this),a=kxe(t),o=r===void 0,s=[],l=t,c,u,g,d,h,m;if(!n&&a&&o&&t.constructor===rg)return t;if((a||qmt(jb,t))&&(t=t.source,o&&(r=Sxe(l))),t=t===void 0?"":$mt(t),r=r===void 0?"":$mt(r),l=t,npt&&"dotAll"in dm&&(u=!!r&&ept(r,"s")>-1,u&&(r=tpt(r,/s/g,""))),c=r,opt&&"sticky"in dm&&(g=!!r&&ept(r,"y")>-1,g&&jxe&&(r=tpt(r,/y/g,""))),apt&&(d=Mxe(t),t=d[0],s=d[1]),h=Xxe(ng(t,r),n?this:jb,rg),(u||g||s.length)&&(m=Exe(h),u&&(m.dotAll=!0,m.raw=rg(Dxe(t),c)),g&&(m.sticky=!0),s.length&&(m.groups=s)),t!==l)try{Wxe(h,"source",l===""?"(?:)":l)}catch{}return h},fT=Vxe(ng),IT=0;fT.length>IT;)Lxe(rg,ng,fT[IT++]);jb.constructor=rg,rg.prototype=jb,wxe(vT,"RegExp",rg,{constructor:!0})}var rg,fT,IT;Nxe("RegExp")});var RG=k((uxi,lpt)=>{"use strict";var Pxe=TypeError;lpt.exports=function(e){if(typeof e=="string")return e;throw new Pxe("Argument is not a string")}});var mpt=k(()=>{"use strict";var Kxe=Ut(),AG=Qe(),qxe=RG(),$xe=Pi(),cpt=Mv().start,tZe=Sb(),eZe=Array,dpt=RegExp.escape,upt=AG("".charAt),CT=AG("".charCodeAt),iZe=AG(1.1.toString),rZe=AG([].join),hpt=/^[0-9a-z]/i,nZe=/^[$()*+./?[\\\]^{|}]/,aZe=RegExp("^[!\"#%&',\\-:;<=>@`~"+tZe+"]"),GT=AG(hpt.exec),gpt={" ":"t","\n":"n","\v":"v","\f":"f","\r":"r"},yT=function(e){var t=iZe(CT(e,0),16);return t.length<3?"\\x"+cpt(t,2,"0"):"\\u"+cpt(t,4,"0")},oZe=!dpt||dpt("ab")!=="\\x61b";Kxe({target:"RegExp",stat:!0,forced:oZe},{escape:function(t){qxe(t);for(var r=t.length,n=eZe(r),a=0;a=56320||a+1>=r||(CT(t,a+1)&64512)!==56320?n[a]=yT(o):(n[a]=o,n[++a]=upt(t,a))}}return rZe(n,"")}})});var bpt=k(()=>{"use strict";var sZe=bi(),lZe=FB(),cZe=Xa(),dZe=vn(),uZe=Tr().get,ppt=RegExp.prototype,gZe=TypeError;sZe&&lZe&&dZe(ppt,"dotAll",{configurable:!0,get:function(){if(this!==ppt){if(cZe(this)==="RegExp")return!!uZe(this).dotAll;throw new gZe("Incompatible receiver, RegExp required")}}})});var LB=k((bxi,Ipt)=>{"use strict";var zb=si(),SB=Qe(),hZe=Li(),mZe=WB(),pZe=xG(),bZe=Qh(),fZe=ua(),IZe=Tr().get,vZe=FB(),GZe=pT(),yZe=bZe("native-string-replace",String.prototype.replace),kB=RegExp.prototype.exec,ZT=kB,CZe=SB("".charAt),xZe=SB("".indexOf),ZZe=SB("".replace),xT=SB("".slice),RT=(function(){var e=/a/,t=/b*/g;return zb(kB,e,"a"),zb(kB,t,"a"),e.lastIndex!==0||t.lastIndex!==0})(),fpt=pZe.BROKEN_CARET,AT=/()??/.exec("")[1]!==void 0,RZe=RT||AT||fpt||vZe||GZe;RZe&&(ZT=function(t){var r=this,n=IZe(r),a=hZe(t),o=n.raw,s,l,c,u,g,d,h;if(o)return o.lastIndex=r.lastIndex,s=zb(ZT,o,a),r.lastIndex=o.lastIndex,s;var m=n.groups,p=fpt&&r.sticky,b=zb(mZe,r),f=r.source,v=0,y=a;if(p&&(b=ZZe(b,"y",""),xZe(b,"g")===-1&&(b+="g"),y=xT(a,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&CZe(a,r.lastIndex-1)!==` `)&&(f="(?: "+f+")",y=" "+y,v++),l=new RegExp("^(?:"+f+")",b)),AT&&(l=new RegExp("^"+f+"$(?!\\s)",b)),RT&&(c=r.lastIndex),u=zb(kB,p?l:r,y),p?u?(u.input=xT(u.input,v),u[0]=xT(u[0],v),u.index=r.lastIndex,r.lastIndex+=u[0].length):r.lastIndex=0:RT&&u&&(r.lastIndex=r.global?u.index+u[0].length:c),AT&&u&&u.length>1&&zb(yZe,u[0],l,function(){for(g=1;g{"use strict";var AZe=Ut(),vpt=LB();AZe({target:"RegExp",proto:!0,forced:/./.exec!==vpt},{exec:vpt})});var ypt=k(()=>{"use strict";var BZe=bi(),XZe=vn(),Gpt=uT(),WZe=WB();BZe&&!Gpt.correct&&(XZe(RegExp.prototype,"flags",{configurable:!0,get:WZe}),Gpt.correct=!0)});var xpt=k(()=>{"use strict";var FZe=bi(),VZe=xG().MISSED_STICKY,kZe=Xa(),SZe=vn(),LZe=Tr().get,Cpt=RegExp.prototype,wZe=TypeError;FZe&&VZe&&SZe(Cpt,"sticky",{configurable:!0,get:function(){if(this!==Cpt){if(kZe(this)==="RegExp")return!!LZe(this).sticky;throw new wZe("Incompatible receiver, RegExp required")}}})});var Apt=k(()=>{"use strict";wB();var UZe=Ut(),Zpt=si(),YZe=ar(),Rpt=gi(),EZe=Li(),NZe=(function(){var e=!1,t=/[ac]/;return t.exec=function(){return e=!0,/./.exec.apply(this,arguments)},t.test("abc")===!0&&e})(),OZe=/./.test;UZe({target:"RegExp",proto:!0,forced:!NZe},{test:function(e){var t=Rpt(this),r=EZe(e),n=t.exec;if(!YZe(n))return Zpt(OZe,t,r);var a=Zpt(n,t,r);return a===null?!1:(Rpt(a),!0)}})});var Fpt=k(()=>{"use strict";var QZe=Th().PROPER,TZe=Rr(),JZe=gi(),Bpt=Li(),HZe=we(),_Ze=ig(),BT="toString",Xpt=RegExp.prototype,Wpt=Xpt[BT],jZe=HZe(function(){return Wpt.call({source:"a",flags:"b"})!=="/a/b"}),zZe=QZe&&Wpt.name!==BT;(jZe||zZe)&&TZe(Xpt,BT,function(){var t=JZe(this),r=Bpt(t.source),n=Bpt(_Ze(t));return"/"+r+"/"+n},{unsafe:!0})});var Vpt=k(()=>{"use strict";var DZe=tG(),MZe=NQ();DZe("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},MZe)});var kpt=k(()=>{"use strict";Vpt()});var Js=k((Vxi,Spt)=>{"use strict";var XT=Qe(),UB=Set.prototype;Spt.exports={Set,add:XT(UB.add),has:XT(UB.has),remove:XT(UB.delete),proto:UB}});var ag=k((kxi,Lpt)=>{"use strict";var PZe=Js().has;Lpt.exports=function(e){return PZe(e),e}});var og=k((Sxi,wpt)=>{"use strict";var KZe=si();wpt.exports=function(e,t,r){for(var n=r?e:e.iterator,a=e.next,o,s;!(o=KZe(a,n)).done;)if(s=t(o.value),s!==void 0)return s}});var um=k((Lxi,Opt)=>{"use strict";var Upt=Qe(),qZe=og(),Ypt=Js(),$Ze=Ypt.Set,Ept=Ypt.proto,tRe=Upt(Ept.forEach),Npt=Upt(Ept.keys),eRe=Npt(new $Ze).next;Opt.exports=function(e,t,r){return r?qZe({iterator:Npt(e),next:eRe},t):tRe(e,t)}});var YB=k((wxi,Tpt)=>{"use strict";var Qpt=Js(),iRe=um(),rRe=Qpt.Set,nRe=Qpt.add;Tpt.exports=function(e){var t=new rRe;return iRe(e,function(r){nRe(t,r)}),t}});var Db=k((Uxi,Jpt)=>{"use strict";var aRe=kv(),oRe=Js();Jpt.exports=aRe(oRe.proto,"size","get")||function(e){return e.size}});var sg=k((Yxi,Mpt)=>{"use strict";var Hpt=Hi(),zpt=gi(),_pt=si(),sRe=ln(),lRe=Fa(),jpt="Invalid size",cRe=RangeError,dRe=TypeError,uRe=Math.max,Dpt=function(e,t){this.set=e,this.size=uRe(t,0),this.has=Hpt(e.has),this.keys=Hpt(e.keys)};Dpt.prototype={getIterator:function(){return lRe(zpt(_pt(this.keys,this.set)))},includes:function(e){return _pt(this.has,this.set,e)}};Mpt.exports=function(e){zpt(e);var t=+e.size;if(t!==t)throw new dRe(jpt);var r=sRe(t);if(r<0)throw new cRe(jpt);return new Dpt(e,r)}});var $pt=k((Exi,qpt)=>{"use strict";var gRe=ag(),Kpt=Js(),hRe=YB(),mRe=Db(),pRe=sg(),bRe=um(),fRe=og(),IRe=Kpt.has,Ppt=Kpt.remove;qpt.exports=function(t){var r=gRe(this),n=pRe(t),a=hRe(r);return mRe(r)<=n.size?bRe(r,function(o){n.includes(o)&&Ppt(a,o)}):fRe(n.getIterator(),function(o){IRe(a,o)&&Ppt(a,o)}),a}});var lg=k((Nxi,ibt)=>{"use strict";var vRe=Mi(),tbt=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},ebt=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};ibt.exports=function(e,t){var r=vRe("Set");try{new r()[e](tbt(0));try{return new r()[e](tbt(-1)),!1}catch{if(!t)return!0;try{return new r()[e](ebt(-1/0)),!1}catch{var n=new r([1,2]);return t(n[e](ebt(1/0)))}}}catch{return!1}}});var rbt=k(()=>{"use strict";var GRe=Ut(),yRe=$pt(),CRe=we(),xRe=lg(),ZRe=!xRe("difference",function(e){return e.size===0}),RRe=ZRe||CRe(function(){var e={size:1,has:function(){return!0},keys:function(){var r=0;return{next:function(){var n=r++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return t.difference(e).size!==3});GRe({target:"Set",proto:!0,real:!0,forced:RRe},{difference:yRe})});var obt=k((Txi,abt)=>{"use strict";var ARe=ag(),WT=Js(),BRe=Db(),XRe=sg(),WRe=um(),FRe=og(),VRe=WT.Set,nbt=WT.add,kRe=WT.has;abt.exports=function(t){var r=ARe(this),n=XRe(t),a=new VRe;return BRe(r)>n.size?FRe(n.getIterator(),function(o){kRe(r,o)&&nbt(a,o)}):WRe(r,function(o){n.includes(o)&&nbt(a,o)}),a}});var sbt=k(()=>{"use strict";var SRe=Ut(),LRe=we(),wRe=obt(),URe=lg(),YRe=!URe("intersection",function(e){return e.size===2&&e.has(1)&&e.has(2)})||LRe(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});SRe({target:"Set",proto:!0,real:!0,forced:YRe},{intersection:wRe})});var cbt=k((_xi,lbt)=>{"use strict";var ERe=ag(),NRe=Js().has,ORe=Db(),QRe=sg(),TRe=um(),JRe=og(),HRe=ma();lbt.exports=function(t){var r=ERe(this),n=QRe(t);if(ORe(r)<=n.size)return TRe(r,function(o){if(n.includes(o))return!1},!0)!==!1;var a=n.getIterator();return JRe(a,function(o){if(NRe(r,o))return HRe(a,"normal",!1)})!==!1}});var dbt=k(()=>{"use strict";var _Re=Ut(),jRe=cbt(),zRe=lg(),DRe=!zRe("isDisjointFrom",function(e){return!e});_Re({target:"Set",proto:!0,real:!0,forced:DRe},{isDisjointFrom:jRe})});var gbt=k((Dxi,ubt)=>{"use strict";var MRe=ag(),PRe=Db(),KRe=um(),qRe=sg();ubt.exports=function(t){var r=MRe(this),n=qRe(t);return PRe(r)>n.size?!1:KRe(r,function(a){if(!n.includes(a))return!1},!0)!==!1}});var hbt=k(()=>{"use strict";var $Re=Ut(),tAe=gbt(),eAe=lg(),iAe=!eAe("isSubsetOf",function(e){return e});$Re({target:"Set",proto:!0,real:!0,forced:iAe},{isSubsetOf:tAe})});var pbt=k((Kxi,mbt)=>{"use strict";var rAe=ag(),nAe=Js().has,aAe=Db(),oAe=sg(),sAe=og(),lAe=ma();mbt.exports=function(t){var r=rAe(this),n=oAe(t);if(aAe(r){"use strict";var cAe=Ut(),dAe=pbt(),uAe=lg(),gAe=!uAe("isSupersetOf",function(e){return!e});cAe({target:"Set",proto:!0,real:!0,forced:gAe},{isSupersetOf:dAe})});var Ibt=k((tZi,fbt)=>{"use strict";var hAe=ag(),FT=Js(),mAe=YB(),pAe=sg(),bAe=og(),fAe=FT.add,IAe=FT.has,vAe=FT.remove;fbt.exports=function(t){var r=hAe(this),n=pAe(t).getIterator(),a=mAe(r);return bAe(n,function(o){IAe(r,o)?vAe(a,o):fAe(a,o)}),a}});var VT=k((eZi,vbt)=>{"use strict";vbt.exports=function(e){try{var t=new Set,r={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}},n=t[e](r);return n.size===1&&n.values().next().value===4}catch{return!1}}});var Gbt=k(()=>{"use strict";var GAe=Ut(),yAe=Ibt(),CAe=VT(),xAe=lg(),ZAe=!xAe("symmetricDifference")||!CAe("symmetricDifference");GAe({target:"Set",proto:!0,real:!0,forced:ZAe},{symmetricDifference:yAe})});var Cbt=k((nZi,ybt)=>{"use strict";var RAe=ag(),AAe=Js().add,BAe=YB(),XAe=sg(),WAe=og();ybt.exports=function(t){var r=RAe(this),n=XAe(t).getIterator(),a=BAe(r);return WAe(n,function(o){AAe(a,o)}),a}});var xbt=k(()=>{"use strict";var FAe=Ut(),VAe=Cbt(),kAe=VT(),SAe=lg(),LAe=!SAe("union")||!kAe("union");FAe({target:"Set",proto:!0,real:!0,forced:LAe},{union:VAe})});var Zbt=k(()=>{"use strict";var wAe=Ut(),UAe=Qe(),YAe=zr(),EAe=ln(),NAe=Li(),OAe=we(),QAe=UAe("".charAt),TAe=OAe(function(){return"\u{20BB7}".at(-2)!=="\uD842"});wAe({target:"String",proto:!0,forced:TAe},{at:function(t){var r=NAe(YAe(this)),n=r.length,a=EAe(t),o=a>=0?a:n+a;return o<0||o>=n?void 0:QAe(r,o)}})});var BG=k((cZi,Bbt)=>{"use strict";var kT=Qe(),JAe=ln(),HAe=Li(),_Ae=zr(),jAe=kT("".charAt),Rbt=kT("".charCodeAt),zAe=kT("".slice),Abt=function(e){return function(t,r){var n=HAe(_Ae(t)),a=JAe(r),o=n.length,s,l;return a<0||a>=o?e?"":void 0:(s=Rbt(n,a),s<55296||s>56319||a+1===o||(l=Rbt(n,a+1))<56320||l>57343?e?jAe(n,a):s:e?zAe(n,a,a+2):(s-55296<<10)+(l-56320)+65536)}};Bbt.exports={codeAt:Abt(!1),charAt:Abt(!0)}});var Xbt=k(()=>{"use strict";var DAe=Ut(),MAe=BG().codeAt;DAe({target:"String",proto:!0},{codePointAt:function(t){return MAe(this,t)}})});var EB=k((gZi,Wbt)=>{"use strict";var PAe=CG(),KAe=TypeError;Wbt.exports=function(e){if(PAe(e))throw new KAe("The method doesn't accept regular expressions");return e}});var NB=k((hZi,Fbt)=>{"use strict";var qAe=Wi(),$Ae=qAe("match");Fbt.exports=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[$Ae]=!1,"/./"[e](t)}catch{}}return!1}});var Sbt=k(()=>{"use strict";var tBe=Ut(),eBe=Nu(),iBe=ca().f,rBe=So(),Vbt=Li(),nBe=EB(),aBe=zr(),oBe=NB(),sBe=cr(),lBe=eBe("".slice),cBe=Math.min,kbt=oBe("endsWith"),dBe=!sBe&&!kbt&&!!(function(){var e=iBe(String.prototype,"endsWith");return e&&!e.writable})();tBe({target:"String",proto:!0,forced:!dBe&&!kbt},{endsWith:function(t){var r=Vbt(aBe(this));nBe(t);var n=arguments.length>1?arguments[1]:void 0,a=r.length,o=n===void 0?a:cBe(rBe(n),a),s=Vbt(t);return lBe(r,o-s.length,o)===s}})});var ST=k(()=>{"use strict";var uBe=Ut(),gBe=Qe(),hBe=yc(),mBe=RangeError,Lbt=String.fromCharCode,wbt=String.fromCodePoint,pBe=gBe([].join),bBe=!!wbt&&wbt.length!==1;uBe({target:"String",stat:!0,arity:1,forced:bBe},{fromCodePoint:function(t){for(var r=[],n=arguments.length,a=0,o;n>a;){if(o=+arguments[a++],hBe(o,1114111)!==o)throw new mBe(o+" is not a valid code point");r[a]=o<65536?Lbt(o):Lbt(((o-=65536)>>10)+55296,o%1024+56320)}return pBe(r,"")}})});var Ybt=k(()=>{"use strict";var fBe=Ut(),IBe=Qe(),vBe=EB(),GBe=zr(),Ubt=Li(),yBe=NB(),CBe=IBe("".indexOf);fBe({target:"String",proto:!0,forced:!yBe("includes")},{includes:function(t){return!!~CBe(Ubt(GBe(this)),Ubt(vBe(t)),arguments.length>1?arguments[1]:void 0)}})});var Nbt=k(()=>{"use strict";var xBe=Ut(),ZBe=Qe(),RBe=zr(),ABe=Li(),Ebt=ZBe("".charCodeAt);xBe({target:"String",proto:!0},{isWellFormed:function(){for(var t=ABe(RBe(this)),r=t.length,n=0;n=56320||++n>=r||(Ebt(t,n)&64512)!==56320))return!1}return!0}})});var LT=k(()=>{"use strict";var BBe=BG().charAt,XBe=Li(),Qbt=Tr(),WBe=WA(),Obt=_u(),Tbt="String Iterator",FBe=Qbt.set,VBe=Qbt.getterFor(Tbt);WBe(String,"String",function(e){FBe(this,{type:Tbt,string:XBe(e),index:0})},function(){var t=VBe(this),r=t.string,n=t.index,a;return n>=r.length?Obt(void 0,!0):(a=BBe(r,n),t.index+=a.length,Obt(a,!1))})});var XG=k((ZZi,zbt)=>{"use strict";wB();var Jbt=si(),Hbt=Rr(),kBe=LB(),_bt=we(),jbt=Wi(),SBe=da(),LBe=jbt("species"),wT=RegExp.prototype;zbt.exports=function(e,t,r,n){var a=jbt(e),o=!_bt(function(){var u={};return u[a]=function(){return 7},""[e](u)!==7}),s=o&&!_bt(function(){var u=!1,g=/a/;if(e==="split"){var d={};d[LBe]=function(){return g},g={constructor:d,flags:""},g[a]=/./[a]}return g.exec=function(){return u=!0,null},g[a](""),!u});if(!o||!s||r){var l=/./[a],c=t(a,""[e],function(u,g,d,h,m){var p=g.exec;return p===kBe||p===wT.exec?o&&!m?{done:!0,value:Jbt(l,g,d,h)}:{done:!0,value:Jbt(u,d,g,h)}:{done:!1}});Hbt(String.prototype,e,c[0]),Hbt(wT,a,c[1])}n&&SBe(wT[a],"sham",!0)}});var WG=k((RZi,Dbt)=>{"use strict";var wBe=BG().charAt;Dbt.exports=function(e,t,r){return t+(r?wBe(e,t).length:1)}});var Mb=k((AZi,Pbt)=>{"use strict";var Mbt=si(),UBe=gi(),YBe=ar(),EBe=Xa(),NBe=LB(),OBe=TypeError;Pbt.exports=function(e,t){var r=e.exec;if(YBe(r)){var n=Mbt(r,e,t);return n!==null&&UBe(n),n}if(EBe(e)==="RegExp")return Mbt(NBe,e,t);throw new OBe("RegExp#exec called on incompatible receiver")}});var $bt=k(()=>{"use strict";var QBe=si(),TBe=Qe(),JBe=XG(),HBe=gi(),_Be=xi(),jBe=So(),OB=Li(),zBe=zr(),DBe=la(),MBe=WG(),PBe=ig(),Kbt=Mb(),qbt=TBe("".indexOf);JBe("match",function(e,t,r){return[function(a){var o=zBe(this),s=_Be(a)?DBe(a,e):void 0;return s?QBe(s,a,o):new RegExp(a)[e](OB(o))},function(n){var a=HBe(this),o=OB(n),s=r(t,a,o);if(s.done)return s.value;var l=OB(PBe(a));if(qbt(l,"g")===-1)return Kbt(a,o);var c=qbt(l,"u")!==-1;a.lastIndex=0;for(var u=[],g=0,d;(d=Kbt(a,o))!==null;){var h=OB(d[0]);u[g]=h,h===""&&(a.lastIndex=MBe(o,jBe(a.lastIndex),c)),g++}return g===0?null:u}]})});var cft=k(()=>{"use strict";var KBe=Ut(),tft=si(),rft=Nu(),qBe=AA(),QB=_u(),eft=zr(),nft=So(),FG=Li(),$Be=gi(),tXe=xi(),eXe=Xa(),iXe=CG(),aft=ig(),rXe=la(),nXe=Rr(),aXe=we(),oXe=Wi(),sXe=gG(),lXe=WG(),cXe=Mb(),oft=Tr(),ET=cr(),TB=oXe("matchAll"),sft="RegExp String",lft=sft+" Iterator",dXe=oft.set,uXe=oft.getterFor(lft),ift=RegExp.prototype,gXe=TypeError,NT=rft("".indexOf),JB=rft("".matchAll),UT=!!JB&&!aXe(function(){JB("a",/./)}),hXe=qBe(function(t,r,n,a){dXe(this,{type:lft,regexp:t,string:r,global:n,unicode:a,done:!1})},sft,function(){var t=uXe(this);if(t.done)return QB(void 0,!0);var r=t.regexp,n=t.string,a=cXe(r,n);return a===null?(t.done=!0,QB(void 0,!0)):t.global?(FG(a[0])===""&&(r.lastIndex=lXe(n,nft(r.lastIndex),t.unicode)),QB(a,!1)):(t.done=!0,QB(a,!1))}),OT=function(e){var t=$Be(this),r=FG(e),n=sXe(t,RegExp),a=FG(aft(t)),o,s,l;return o=new n(n===RegExp?t.source:t,a),s=!!~NT(a,"g"),l=!!~NT(a,"u"),o.lastIndex=nft(t.lastIndex),new hXe(o,r,s,l)};KBe({target:"String",proto:!0,forced:UT},{matchAll:function(t){var r=eft(this),n,a,o,s;if(tXe(t)){if(iXe(t)&&(n=FG(eft(aft(t))),!~NT(n,"g")))throw new gXe("`.matchAll` does not allow non-global regexes");if(UT)return JB(r,t);if(o=rXe(t,TB),o===void 0&&ET&&eXe(t)==="RegExp"&&(o=OT),o)return tft(o,t,r)}else if(UT)return JB(r,t);return a=FG(r),s=new RegExp(t,"g"),ET?tft(OT,s,a):s[TB](a)}});ET||TB in ift||nXe(ift,TB,OT)});var QT=k((VZi,dft)=>{"use strict";var mXe=Xl();dft.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(mXe)});var uft=k(()=>{"use strict";var pXe=Ut(),bXe=Mv().end,fXe=QT();pXe({target:"String",proto:!0,forced:fXe},{padEnd:function(t){return bXe(this,t,arguments.length>1?arguments[1]:void 0)}})});var gft=k(()=>{"use strict";var IXe=Ut(),vXe=Mv().start,GXe=QT();IXe({target:"String",proto:!0,forced:GXe},{padStart:function(t){return vXe(this,t,arguments.length>1?arguments[1]:void 0)}})});var bft=k(()=>{"use strict";var yXe=Ut(),pft=Qe(),CXe=Mn(),xXe=pr(),hft=Li(),ZXe=fr(),mft=pft([].push),RXe=pft([].join);yXe({target:"String",stat:!0},{raw:function(t){var r=CXe(xXe(t).raw),n=ZXe(r);if(!n)return"";for(var a=arguments.length,o=[],s=0;;){if(mft(o,hft(r[s++])),s===n)return RXe(o,"");s{"use strict";var AXe=Ut(),BXe=Dv();AXe({target:"String",proto:!0},{repeat:BXe})});var _T=k((OZi,Ift)=>{"use strict";var HT=Qe(),XXe=pr(),WXe=Math.floor,TT=HT("".charAt),FXe=HT("".replace),JT=HT("".slice),VXe=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,kXe=/\$([$&'`]|\d{1,2})/g;Ift.exports=function(e,t,r,n,a,o){var s=r+e.length,l=n.length,c=kXe;return a!==void 0&&(a=XXe(a),c=VXe),FXe(o,c,function(u,g){var d;switch(TT(g,0)){case"$":return"$";case"&":return e;case"`":return JT(t,0,r);case"'":return JT(t,s);case"<":d=a[JT(g,1,-1)];break;default:var h=+g;if(h===0)return u;if(h>l){var m=WXe(h/10);return m===0?u:m<=l?n[m-1]===void 0?TT(g,1):n[m-1]+TT(g,1):u}d=n[h-1]}return d===void 0?"":d})}});var Cft=k(()=>{"use strict";var SXe=Yo(),vft=si(),_B=Qe(),LXe=XG(),wXe=we(),UXe=gi(),YXe=ar(),EXe=xi(),NXe=ln(),OXe=So(),gm=Li(),QXe=zr(),TXe=WG(),JXe=la(),HXe=_T(),_Xe=ig(),jXe=Mb(),zXe=Wi(),zT=zXe("replace"),DXe=Math.max,MXe=Math.min,PXe=_B([].concat),jT=_B([].push),HB=_B("".indexOf),Gft=_B("".slice),KXe=function(e){return e===void 0?e:String(e)},qXe=(function(){return"a".replace(/./,"$0")==="$0"})(),yft=(function(){return/./[zT]?/./[zT]("a","$0")==="":!1})(),$Xe=!wXe(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$")!=="7"});LXe("replace",function(e,t,r){var n=yft?"$":"$0";return[function(o,s){var l=QXe(this),c=EXe(o)?JXe(o,zT):void 0;return c?vft(c,o,l,s):vft(t,gm(l),o,s)},function(a,o){var s=UXe(this),l=gm(a);if(typeof o=="string"&&HB(o,n)===-1&&HB(o,"$<")===-1){var c=r(t,s,l,o);if(c.done)return c.value}var u=YXe(o);u||(o=gm(o));var g=gm(_Xe(s)),d=HB(g,"g")!==-1,h;d&&(h=HB(g,"u")!==-1,s.lastIndex=0);for(var m=[],p;p=jXe(s,l),!(p===null||(jT(m,p),!d));){var b=gm(p[0]);b===""&&(s.lastIndex=TXe(l,OXe(s.lastIndex),h))}for(var f="",v=0,y=0;y=v&&(f+=Gft(l,v,C)+Z,v=C+x.length)}return f+Gft(l,v)}]},!$Xe||!qXe||yft)});var Rft=k(()=>{"use strict";var tWe=Ut(),eWe=si(),MT=Qe(),xft=zr(),iWe=ar(),rWe=xi(),nWe=CG(),Pb=Li(),aWe=la(),oWe=ig(),sWe=_T(),lWe=Wi(),cWe=cr(),dWe=lWe("replace"),uWe=TypeError,DT=MT("".indexOf),gWe=MT("".replace),Zft=MT("".slice),hWe=Math.max;tWe({target:"String",proto:!0},{replaceAll:function(t,r){var n=xft(this),a,o,s,l,c,u,g,d,h,m,p=0,b="";if(rWe(t)){if(a=nWe(t),a&&(o=Pb(xft(oWe(t))),!~DT(o,"g")))throw new uWe("`.replaceAll` does not allow non-global regexes");if(s=aWe(t,dWe),s)return eWe(s,t,n,r);if(cWe&&a)return gWe(Pb(n),t,r)}for(l=Pb(n),c=Pb(t),u=iWe(r),u||(r=Pb(r)),g=c.length,d=hWe(1,g),h=DT(l,c);h!==-1;)m=u?Pb(r(c,h,l)):sWe(c,l,h,[],void 0,r),b+=Zft(l,p,h)+m,p=h+g,h=h+d>l.length?-1:DT(l,c,h+d);return p{"use strict";var mWe=si(),pWe=XG(),bWe=gi(),fWe=xi(),IWe=zr(),Aft=m5(),Bft=Li(),vWe=la(),GWe=Mb();pWe("search",function(e,t,r){return[function(a){var o=IWe(this),s=fWe(a)?vWe(a,e):void 0;return s?mWe(s,a,o):new RegExp(a)[e](Bft(o))},function(n){var a=bWe(this),o=Bft(n),s=r(t,a,o);if(s.done)return s.value;var l=a.lastIndex;Aft(l,0)||(a.lastIndex=0);var c=GWe(a,o);return Aft(a.lastIndex,l)||(a.lastIndex=l),c===null?-1:c.index}]})});var Sft=k(()=>{"use strict";var PT=si(),kft=Qe(),yWe=XG(),CWe=gi(),xWe=xi(),ZWe=zr(),RWe=gG(),AWe=WG(),BWe=So(),Wft=Li(),XWe=la(),Fft=Mb(),WWe=xG(),FWe=we(),Kb=WWe.UNSUPPORTED_Y,VWe=4294967295,kWe=Math.min,KT=kft([].push),qT=kft("".slice),SWe=!FWe(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return r.length!==2||r[0]!=="a"||r[1]!=="b"}),Vft="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;yWe("split",function(e,t,r){var n="0".split(void 0,0).length?function(a,o){return a===void 0&&o===0?[]:PT(t,this,a,o)}:t;return[function(o,s){var l=ZWe(this),c=xWe(o)?XWe(o,e):void 0;return c?PT(c,o,l,s):PT(n,Wft(l),o,s)},function(a,o){var s=CWe(this),l=Wft(a);if(!Vft){var c=r(n,s,l,o,n!==t);if(c.done)return c.value}var u=RWe(s,RegExp),g=s.unicode,d=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(Kb?"g":"y"),h=new u(Kb?"^(?:"+s.source+")":s,d),m=o===void 0?VWe:o>>>0;if(m===0)return[];if(l.length===0)return Fft(h,l)===null?[l]:[];for(var p=0,b=0,f=[];b{"use strict";var LWe=Ut(),wWe=Nu(),UWe=ca().f,YWe=So(),Lft=Li(),EWe=EB(),NWe=zr(),OWe=NB(),QWe=cr(),TWe=wWe("".slice),JWe=Math.min,wft=OWe("startsWith"),HWe=!QWe&&!wft&&!!(function(){var e=UWe(String.prototype,"startsWith");return e&&!e.writable})();LWe({target:"String",proto:!0,forced:!HWe&&!wft},{startsWith:function(t){var r=Lft(NWe(this));EWe(t);var n=YWe(JWe(arguments.length>1?arguments[1]:void 0,r.length)),a=Lft(t);return TWe(r,n,n+a.length)===a}})});var Eft=k(()=>{"use strict";var _We=Ut(),jWe=Qe(),zWe=zr(),Yft=ln(),DWe=Li(),MWe=jWe("".slice),PWe=Math.max,KWe=Math.min,qWe=!"".substr||"ab".substr(-1)!=="b";_We({target:"String",proto:!0,forced:qWe},{substr:function(t,r){var n=DWe(zWe(this)),a=n.length,o=Yft(t),s,l;return o===1/0&&(o=0),o<0&&(o=PWe(a+o,0)),s=r===void 0?a:Yft(r),s<=0||s===1/0?"":(l=KWe(o+s,a),o>=l?"":MWe(n,o,l))}})});var Tft=k(()=>{"use strict";var $We=Ut(),Qft=si(),e4=Qe(),tFe=zr(),eFe=Li(),iFe=we(),rFe=Array,$T=e4("".charAt),Nft=e4("".charCodeAt),nFe=e4([].join),t4="".toWellFormed,aFe="\uFFFD",Oft=t4&&iFe(function(){return Qft(t4,1)!=="1"});$We({target:"String",proto:!0,forced:Oft},{toWellFormed:function(){var t=eFe(tFe(this));if(Oft)return Qft(t4,t);for(var r=t.length,n=rFe(r),a=0;a=56320||a+1>=r||(Nft(t,a+1)&64512)!==56320?n[a]=aFe:(n[a]=$T(t,a),n[++a]=$T(t,a))}return nFe(n,"")}})});var jB=k((eRi,_ft)=>{"use strict";var oFe=Th().PROPER,sFe=we(),Jft=Sb(),Hft="\u200B\x85\u180E";_ft.exports=function(e){return sFe(function(){return!!Jft[e]()||Hft[e]()!==Hft||oFe&&Jft[e].name!==e})}});var jft=k(()=>{"use strict";var lFe=Ut(),cFe=am().trim,dFe=jB();lFe({target:"String",proto:!0,forced:dFe("trim")},{trim:function(){return cFe(this)}})});var i4=k((nRi,zft)=>{"use strict";var uFe=am().end,gFe=jB();zft.exports=gFe("trimEnd")?function(){return uFe(this)}:"".trimEnd});var Mft=k(()=>{"use strict";var hFe=Ut(),Dft=i4();hFe({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==Dft},{trimRight:Dft})});var Kft=k(()=>{"use strict";Mft();var mFe=Ut(),Pft=i4();mFe({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==Pft},{trimEnd:Pft})});var r4=k((cRi,qft)=>{"use strict";var pFe=am().start,bFe=jB();qft.exports=bFe("trimStart")?function(){return pFe(this)}:"".trimStart});var t0t=k(()=>{"use strict";var fFe=Ut(),$ft=r4();fFe({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==$ft},{trimLeft:$ft})});var i0t=k(()=>{"use strict";t0t();var IFe=Ut(),e0t=r4();IFe({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==e0t},{trimStart:e0t})});var Oo=k((mRi,n0t)=>{"use strict";var vFe=Qe(),GFe=zr(),r0t=Li(),yFe=/"/g,CFe=vFe("".replace);n0t.exports=function(e,t,r,n){var a=r0t(GFe(e)),o="<"+t;return r!==""&&(o+=" "+r+'="'+CFe(r0t(n),yFe,""")+'"'),o+">"+a+""}});var Qo=k((pRi,a0t)=>{"use strict";var xFe=we();a0t.exports=function(e){return xFe(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})}});var o0t=k(()=>{"use strict";var ZFe=Ut(),RFe=Oo(),AFe=Qo();ZFe({target:"String",proto:!0,forced:AFe("anchor")},{anchor:function(t){return RFe(this,"a","name",t)}})});var s0t=k(()=>{"use strict";var BFe=Ut(),XFe=Oo(),WFe=Qo();BFe({target:"String",proto:!0,forced:WFe("big")},{big:function(){return XFe(this,"big","","")}})});var l0t=k(()=>{"use strict";var FFe=Ut(),VFe=Oo(),kFe=Qo();FFe({target:"String",proto:!0,forced:kFe("blink")},{blink:function(){return VFe(this,"blink","","")}})});var c0t=k(()=>{"use strict";var SFe=Ut(),LFe=Oo(),wFe=Qo();SFe({target:"String",proto:!0,forced:wFe("bold")},{bold:function(){return LFe(this,"b","","")}})});var d0t=k(()=>{"use strict";var UFe=Ut(),YFe=Oo(),EFe=Qo();UFe({target:"String",proto:!0,forced:EFe("fixed")},{fixed:function(){return YFe(this,"tt","","")}})});var u0t=k(()=>{"use strict";var NFe=Ut(),OFe=Oo(),QFe=Qo();NFe({target:"String",proto:!0,forced:QFe("fontcolor")},{fontcolor:function(t){return OFe(this,"font","color",t)}})});var g0t=k(()=>{"use strict";var TFe=Ut(),JFe=Oo(),HFe=Qo();TFe({target:"String",proto:!0,forced:HFe("fontsize")},{fontsize:function(t){return JFe(this,"font","size",t)}})});var h0t=k(()=>{"use strict";var _Fe=Ut(),jFe=Oo(),zFe=Qo();_Fe({target:"String",proto:!0,forced:zFe("italics")},{italics:function(){return jFe(this,"i","","")}})});var m0t=k(()=>{"use strict";var DFe=Ut(),MFe=Oo(),PFe=Qo();DFe({target:"String",proto:!0,forced:PFe("link")},{link:function(t){return MFe(this,"a","href",t)}})});var p0t=k(()=>{"use strict";var KFe=Ut(),qFe=Oo(),$Fe=Qo();KFe({target:"String",proto:!0,forced:$Fe("small")},{small:function(){return qFe(this,"small","","")}})});var b0t=k(()=>{"use strict";var tVe=Ut(),eVe=Oo(),iVe=Qo();tVe({target:"String",proto:!0,forced:iVe("strike")},{strike:function(){return eVe(this,"strike","","")}})});var f0t=k(()=>{"use strict";var rVe=Ut(),nVe=Oo(),aVe=Qo();rVe({target:"String",proto:!0,forced:aVe("sub")},{sub:function(){return nVe(this,"sub","","")}})});var I0t=k(()=>{"use strict";var oVe=Ut(),sVe=Oo(),lVe=Qo();oVe({target:"String",proto:!0,forced:lVe("sup")},{sup:function(){return sVe(this,"sup","","")}})});var zB=k((TRi,G0t)=>{"use strict";var v0t=ze(),n4=we(),cVe=Uv(),dVe=or().NATIVE_ARRAY_BUFFER_VIEWS,uVe=v0t.ArrayBuffer,hm=v0t.Int8Array;G0t.exports=!dVe||!n4(function(){hm(1)})||!n4(function(){new hm(-1)})||!cVe(function(e){new hm,new hm(null),new hm(1.5),new hm(e)},!0)||n4(function(){return new hm(new uVe(2),1,void 0).length!==1})});var a4=k((JRi,y0t)=>{"use strict";var gVe=tB(),hVe=RangeError;y0t.exports=function(e,t){var r=gVe(e);if(r%t)throw new hVe("Wrong offset");return r}});var x0t=k((HRi,C0t)=>{"use strict";var mVe=Math.round;C0t.exports=function(e){var t=mVe(e);return t<0?0:t>255?255:t&255}});var o4=k((_Ri,Z0t)=>{"use strict";var pVe=Lo();Z0t.exports=function(e){var t=pVe(e);return t==="BigInt64Array"||t==="BigUint64Array"}});var DB=k((jRi,R0t)=>{"use strict";var bVe=fv(),fVe=TypeError;R0t.exports=function(e){var t=bVe(e,"number");if(typeof t=="number")throw new fVe("Can't convert number to bigint");return BigInt(t)}});var s4=k((zRi,A0t)=>{"use strict";var IVe=wo(),vVe=si(),GVe=mB(),yVe=pr(),CVe=fr(),xVe=Kh(),ZVe=Wd(),RVe=bA(),AVe=o4(),BVe=or().aTypedArrayConstructor,XVe=DB();A0t.exports=function(t){var r=GVe(this),n=yVe(t),a=arguments.length,o=a>1?arguments[1]:void 0,s=o!==void 0,l=ZVe(n),c,u,g,d,h,m,p,b;if(l&&!RVe(l))for(p=xVe(n,l),b=p.next,n=[];!(m=vVe(b,p)).done;)n.push(m.value);for(s&&a>2&&(o=IVe(o,arguments[2])),u=CVe(n),g=new(BVe(r))(u),d=AVe(g),c=0;u>c;c++)h=s?o(n[c],c):n[c],g[c]=d?XVe(h):+h;return g}});var kc=k((DRi,m4)=>{"use strict";var B0t=Ut(),E0t=ze(),X0t=si(),WVe=bi(),FVe=zB(),LG=or(),N0t=zv(),W0t=Eo(),VVe=ko(),VG=da(),kVe=uB(),SVe=So(),F0t=Hv(),l4=a4(),LVe=x0t(),O0t=Ad(),kG=Pi(),wVe=Lo(),u4=xi(),UVe=wu(),YVe=ua(),EVe=Ma(),MB=Qs(),NVe=Eu().f,V0t=s4(),OVe=ga().forEach,QVe=em(),TVe=vn(),Q0t=Qr(),T0t=ca(),k0t=xb(),p4=Tr(),JVe=Ju(),g4=p4.get,HVe=p4.set,_Ve=p4.enforce,J0t=Q0t.f,jVe=T0t.f,c4=E0t.RangeError,H0t=N0t.ArrayBuffer,zVe=H0t.prototype,DVe=N0t.DataView,PB=LG.NATIVE_ARRAY_BUFFER_VIEWS,S0t=LG.TYPED_ARRAY_TAG,L0t=LG.TypedArray,SG=LG.TypedArrayPrototype,h4=LG.isTypedArray,KB="BYTES_PER_ELEMENT",d4="Wrong length",qB=function(e,t){TVe(e,t,{configurable:!0,get:function(){return g4(this)[t]}})},w0t=function(e){var t;return EVe(zVe,e)||(t=wVe(e))==="ArrayBuffer"||t==="SharedArrayBuffer"},_0t=function(e,t){return h4(e)&&!UVe(t)&&t in e&&kVe(+t)&&t>=0},U0t=function(t,r){return r=O0t(r),_0t(t,r)?VVe(2,t[r]):jVe(t,r)},Y0t=function(t,r,n){return r=O0t(r),_0t(t,r)&&u4(n)&&kG(n,"value")&&!kG(n,"get")&&!kG(n,"set")&&!n.configurable&&(!kG(n,"writable")||n.writable)&&(!kG(n,"enumerable")||n.enumerable)?(t[r]=n.value,t):J0t(t,r,n)};WVe?(PB||(T0t.f=U0t,Q0t.f=Y0t,qB(SG,"buffer"),qB(SG,"byteOffset"),qB(SG,"byteLength"),qB(SG,"length")),B0t({target:"Object",stat:!0,forced:!PB},{getOwnPropertyDescriptor:U0t,defineProperty:Y0t}),m4.exports=function(e,t,r){var n=e.match(/\d+/)[0]/8,a=e+(r?"Clamped":"")+"Array",o="get"+e,s="set"+e,l=E0t[a],c=l,u=c&&c.prototype,g={},d=function(b,f){var v=g4(b);return v.view[o](f*n+v.byteOffset,!0)},h=function(b,f,v){var y=g4(b);y.view[s](f*n+y.byteOffset,r?LVe(v):v,!0)},m=function(b,f){J0t(b,f,{get:function(){return d(this,f)},set:function(v){return h(this,f,v)},enumerable:!0})};PB?FVe&&(c=t(function(b,f,v,y){return W0t(b,u),JVe((function(){return u4(f)?w0t(f)?y!==void 0?new l(f,l4(v,n),y):v!==void 0?new l(f,l4(v,n)):new l(f):h4(f)?k0t(c,f):X0t(V0t,c,f):new l(F0t(f))})(),b,c)}),MB&&MB(c,L0t),OVe(NVe(l),function(b){b in c||VG(c,b,l[b])}),c.prototype=u):(c=t(function(b,f,v,y){W0t(b,u);var x=0,C=0,I,Z,F;if(!u4(f))F=F0t(f),Z=F*n,I=new H0t(Z);else if(w0t(f)){I=f,C=l4(v,n);var R=f.byteLength;if(y===void 0){if(R%n)throw new c4(d4);if(Z=R-C,Z<0)throw new c4(d4)}else if(Z=SVe(y)*n,Z+C>R)throw new c4(d4);F=Z/n}else return h4(f)?k0t(c,f):X0t(V0t,c,f);for(HVe(b,{buffer:I,byteOffset:C,byteLength:Z,length:F,view:new DVe(I)});x{"use strict";var MVe=kc();MVe("Float32",function(e){return function(r,n,a){return e(this,r,n,a)}})});var z0t=k(()=>{"use strict";var PVe=kc();PVe("Float64",function(e){return function(r,n,a){return e(this,r,n,a)}})});var D0t=k(()=>{"use strict";var KVe=kc();KVe("Int8",function(e){return function(r,n,a){return e(this,r,n,a)}})});var M0t=k(()=>{"use strict";var qVe=kc();qVe("Int16",function(e){return function(r,n,a){return e(this,r,n,a)}})});var P0t=k(()=>{"use strict";var $Ve=kc();$Ve("Int32",function(e){return function(r,n,a){return e(this,r,n,a)}})});var K0t=k(()=>{"use strict";var t2e=kc();t2e("Uint8",function(e){return function(r,n,a){return e(this,r,n,a)}})});var q0t=k(()=>{"use strict";var e2e=kc();e2e("Uint8",function(e){return function(r,n,a){return e(this,r,n,a)}},!0)});var $0t=k(()=>{"use strict";var i2e=kc();i2e("Uint16",function(e){return function(r,n,a){return e(this,r,n,a)}})});var tIt=k(()=>{"use strict";var r2e=kc();r2e("Uint32",function(e){return function(r,n,a){return e(this,r,n,a)}})});var iIt=k(()=>{"use strict";var eIt=or(),n2e=fr(),a2e=ln(),o2e=eIt.aTypedArray,s2e=eIt.exportTypedArrayMethod;s2e("at",function(t){var r=o2e(this),n=n2e(r),a=a2e(t),o=a>=0?a:n+a;return o<0||o>=n?void 0:r[o]})});var nIt=k(()=>{"use strict";var l2e=Qe(),rIt=or(),c2e=SN(),d2e=l2e(c2e),u2e=rIt.aTypedArray,g2e=rIt.exportTypedArrayMethod;g2e("copyWithin",function(t,r){return d2e(u2e(this),t,r,arguments.length>2?arguments[2]:void 0)})});var oIt=k(()=>{"use strict";var aIt=or(),h2e=ga().every,m2e=aIt.aTypedArray,p2e=aIt.exportTypedArrayMethod;p2e("every",function(t){return h2e(m2e(this),t,arguments.length>1?arguments[1]:void 0)})});var lIt=k(()=>{"use strict";var sIt=or(),b2e=ZA(),f2e=DB(),I2e=Lo(),v2e=si(),G2e=Qe(),y2e=we(),C2e=sIt.aTypedArray,x2e=sIt.exportTypedArrayMethod,Z2e=G2e("".slice),R2e=y2e(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),e!==1});x2e("fill",function(t){var r=arguments.length;C2e(this);var n=Z2e(I2e(this),0,3)==="Big"?f2e(t):+t;return v2e(b2e,this,n,r>1?arguments[1]:void 0,r>2?arguments[2]:void 0)},R2e)});var b4=k((yAi,cIt)=>{"use strict";var A2e=xb(),B2e=or().getTypedArrayConstructor;cIt.exports=function(e,t){return A2e(B2e(e),t)}});var uIt=k(()=>{"use strict";var dIt=or(),X2e=ga().filter,W2e=b4(),F2e=dIt.aTypedArray,V2e=dIt.exportTypedArrayMethod;V2e("filter",function(t){var r=X2e(F2e(this),t,arguments.length>1?arguments[1]:void 0);return W2e(this,r)})});var hIt=k(()=>{"use strict";var gIt=or(),k2e=ga().find,S2e=gIt.aTypedArray,L2e=gIt.exportTypedArrayMethod;L2e("find",function(t){return k2e(S2e(this),t,arguments.length>1?arguments[1]:void 0)})});var pIt=k(()=>{"use strict";var mIt=or(),w2e=ga().findIndex,U2e=mIt.aTypedArray,Y2e=mIt.exportTypedArrayMethod;Y2e("findIndex",function(t){return w2e(U2e(this),t,arguments.length>1?arguments[1]:void 0)})});var fIt=k(()=>{"use strict";var bIt=or(),E2e=wv().findLast,N2e=bIt.aTypedArray,O2e=bIt.exportTypedArrayMethod;O2e("findLast",function(t){return E2e(N2e(this),t,arguments.length>1?arguments[1]:void 0)})});var vIt=k(()=>{"use strict";var IIt=or(),Q2e=wv().findLastIndex,T2e=IIt.aTypedArray,J2e=IIt.exportTypedArrayMethod;J2e("findLastIndex",function(t){return Q2e(T2e(this),t,arguments.length>1?arguments[1]:void 0)})});var yIt=k(()=>{"use strict";var GIt=or(),H2e=ga().forEach,_2e=GIt.aTypedArray,j2e=GIt.exportTypedArrayMethod;j2e("forEach",function(t){H2e(_2e(this),t,arguments.length>1?arguments[1]:void 0)})});var CIt=k(()=>{"use strict";var z2e=zB(),D2e=or().exportTypedArrayStaticMethod,M2e=s4();D2e("from",M2e,z2e)});var ZIt=k(()=>{"use strict";var xIt=or(),P2e=gb().includes,K2e=xIt.aTypedArray,q2e=xIt.exportTypedArrayMethod;q2e("includes",function(t){return P2e(K2e(this),t,arguments.length>1?arguments[1]:void 0)})});var AIt=k(()=>{"use strict";var RIt=or(),$2e=gb().indexOf,tke=RIt.aTypedArray,eke=RIt.exportTypedArrayMethod;eke("indexOf",function(t){return $2e(tke(this),t,arguments.length>1?arguments[1]:void 0)})});var VIt=k(()=>{"use strict";var ike=ze(),rke=we(),f4=Qe(),XIt=or(),I4=Nv(),nke=Wi(),v4=nke("iterator"),BIt=ike.Uint8Array,ake=f4(I4.values),oke=f4(I4.keys),ske=f4(I4.entries),G4=XIt.aTypedArray,$B=XIt.exportTypedArrayMethod,qb=BIt&&BIt.prototype,tX=!rke(function(){qb[v4].call([1])}),WIt=!!qb&&qb.values&&qb[v4]===qb.values&&qb.values.name==="values",FIt=function(){return ake(G4(this))};$B("entries",function(){return ske(G4(this))},tX);$B("keys",function(){return oke(G4(this))},tX);$B("values",FIt,tX||!WIt,{name:"values"});$B(v4,FIt,tX||!WIt,{name:"values"})});var SIt=k(()=>{"use strict";var kIt=or(),lke=Qe(),cke=kIt.aTypedArray,dke=kIt.exportTypedArrayMethod,uke=lke([].join);dke("join",function(t){return uke(cke(this),t)})});var wIt=k(()=>{"use strict";var LIt=or(),gke=Yo(),hke=zN(),mke=LIt.aTypedArray,pke=LIt.exportTypedArrayMethod;pke("lastIndexOf",function(t){var r=arguments.length;return gke(hke,mke(this),r>1?[t,arguments[1]]:[t])})});var YIt=k(()=>{"use strict";var UIt=or(),bke=ga().map,fke=b4(),Ike=UIt.aTypedArray,vke=UIt.exportTypedArrayMethod;vke("map",function(t){var r=bke(Ike(this),t,arguments.length>1?arguments[1]:void 0);return fke(this,r)})});var NIt=k(()=>{"use strict";var EIt=or(),Gke=zB(),yke=EIt.aTypedArrayConstructor,Cke=EIt.exportTypedArrayStaticMethod;Cke("of",function(){for(var t=0,r=arguments.length,n=new(yke(this))(r);r>t;)n[t]=arguments[t++];return n},Gke)});var QIt=k(()=>{"use strict";var OIt=or(),xke=Ov().left,Zke=OIt.aTypedArray,Rke=OIt.exportTypedArrayMethod;Rke("reduce",function(t){var r=arguments.length;return xke(Zke(this),t,r,r>1?arguments[1]:void 0)})});var JIt=k(()=>{"use strict";var TIt=or(),Ake=Ov().right,Bke=TIt.aTypedArray,Xke=TIt.exportTypedArrayMethod;Xke("reduceRight",function(t){var r=arguments.length;return Ake(Bke(this),t,r,r>1?arguments[1]:void 0)})});var _It=k(()=>{"use strict";var HIt=or(),Wke=HIt.aTypedArray,Fke=HIt.exportTypedArrayMethod,Vke=Math.floor;Fke("reverse",function(){for(var t=this,r=Wke(t).length,n=Vke(r/2),a=0,o;a{"use strict";var zIt=ze(),DIt=si(),x4=or(),kke=fr(),Ske=a4(),Lke=pr(),MIt=we(),wke=zIt.RangeError,y4=zIt.Int8Array,jIt=y4&&y4.prototype,PIt=jIt&&jIt.set,Uke=x4.aTypedArray,Yke=x4.exportTypedArrayMethod,C4=!MIt(function(){var e=new Uint8ClampedArray(2);return DIt(PIt,e,{length:1,0:3},1),e[1]!==3}),Eke=C4&&x4.NATIVE_ARRAY_BUFFER_VIEWS&&MIt(function(){var e=new y4(2);return e.set(1),e.set("2",1),e[0]!==0||e[1]!==2});Yke("set",function(t){Uke(this);var r=Ske(arguments.length>1?arguments[1]:void 0,1),n=Lke(t);if(C4)return DIt(PIt,this,n,r);var a=this.length,o=kke(n),s=0;if(o+r>a)throw new wke("Wrong length");for(;s{"use strict";var Z4=or(),Nke=we(),Oke=hs(),Qke=Z4.aTypedArray,Tke=Z4.getTypedArrayConstructor,Jke=Z4.exportTypedArrayMethod,Hke=Nke(function(){new Int8Array(1).slice()});Jke("slice",function(t,r){for(var n=Oke(Qke(this),t,r),a=Tke(this),o=0,s=n.length,l=new a(s);s>o;)l[o]=n[o++];return l},Hke)});var tvt=k(()=>{"use strict";var $It=or(),_ke=ga().some,jke=$It.aTypedArray,zke=$It.exportTypedArrayMethod;zke("some",function(t){return _ke(jke(this),t,arguments.length>1?arguments[1]:void 0)})});var ovt=k(()=>{"use strict";var Dke=ze(),Mke=Nu(),R4=we(),Pke=Hi(),Kke=kA(),avt=or(),evt=PN(),qke=KN(),ivt=Fl(),rvt=SA(),$ke=avt.aTypedArray,tSe=avt.exportTypedArrayMethod,wG=Dke.Uint16Array,$b=wG&&Mke(wG.prototype.sort),eSe=!!$b&&!(R4(function(){$b(new wG(2),null)})&&R4(function(){$b(new wG(2),{})})),nvt=!!$b&&!R4(function(){if(ivt)return ivt<74;if(evt)return evt<67;if(qke)return!0;if(rvt)return rvt<602;var e=new wG(516),t=Array(516),r,n;for(r=0;r<516;r++)n=r%4,e[r]=515-r,t[r]=r-2*n+3;for($b(e,function(a,o){return(a/4|0)-(o/4|0)}),r=0;r<516;r++)if(e[r]!==t[r])return!0}),iSe=function(e){return function(t,r){return e!==void 0?+e(t,r)||0:r!==r?-1:t!==t?1:t===0&&r===0?1/t>0&&1/r<0?1:-1:t>r}};tSe("sort",function(t){return t!==void 0&&Pke(t),nvt?$b(this,t):Kke($ke(this),iSe(t))},!nvt||eSe)});var lvt=k(()=>{"use strict";var A4=or(),rSe=So(),svt=yc(),nSe=A4.aTypedArray,aSe=A4.getTypedArrayConstructor,oSe=A4.exportTypedArrayMethod;oSe("subarray",function(t,r){var n=nSe(this),a=n.length,o=svt(t,a),s=aSe(n);return new s(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,rSe((r===void 0?a:svt(r,a))-o))})});var hvt=k(()=>{"use strict";var sSe=ze(),lSe=Yo(),uvt=or(),B4=we(),cvt=hs(),eX=sSe.Int8Array,dvt=uvt.aTypedArray,cSe=uvt.exportTypedArrayMethod,gvt=[].toLocaleString,dSe=!!eX&&B4(function(){gvt.call(new eX(1))}),uSe=B4(function(){return[1,2].toLocaleString()!==new eX([1,2]).toLocaleString()})||!B4(function(){eX.prototype.toLocaleString.call([1,2])});cSe("toLocaleString",function(){return lSe(gvt,dSe?cvt(dvt(this)):dvt(this),cvt(arguments))},uSe)});var mvt=k(()=>{"use strict";var gSe=fr(),X4=or(),hSe=X4.aTypedArray,mSe=X4.exportTypedArrayMethod,pSe=X4.getTypedArrayConstructor;mSe("toReversed",function(){for(var t=hSe(this),r=gSe(t),n=new(pSe(t))(r),a=0;a{"use strict";var iX=or(),bSe=Qe(),fSe=Hi(),ISe=xb(),vSe=iX.aTypedArray,GSe=iX.getTypedArrayConstructor,ySe=iX.exportTypedArrayMethod,CSe=bSe(iX.TypedArrayPrototype.sort);ySe("toSorted",function(t){t!==void 0&&fSe(t);var r=vSe(this),n=ISe(GSe(r),r);return CSe(n,t)})});var fvt=k(()=>{"use strict";var xSe=or().exportTypedArrayMethod,ZSe=we(),RSe=ze(),ASe=Qe(),bvt=RSe.Uint8Array,BSe=bvt&&bvt.prototype||{},rX=[].toString,XSe=ASe([].join);ZSe(function(){rX.call({})})&&(rX=function(){return XSe(this)});var WSe=BSe.toString!==rX;xSe("toString",rX,WSe)});var vvt=k(()=>{"use strict";var W4=or(),FSe=o4(),VSe=fr(),kSe=ln(),SSe=DB(),LSe=W4.aTypedArray,wSe=W4.getTypedArrayConstructor,USe=W4.exportTypedArrayMethod,YSe=RangeError,Ivt=(function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return e===8}})(),ESe=Ivt&&(function(){try{new Int8Array(1).with(-.5,1)}catch{return!0}})();USe("with",function(e,t){var r=LSe(this),n=VSe(r),a=kSe(e),o=a<0?n+a:a,s=FSe(r)?SSe(t):+t;if(o>=n||o<0)throw new YSe("Incorrect index");for(var l=new(wSe(r))(n),c=0;c{"use strict";var NSe=xi(),OSe=String,QSe=TypeError;Gvt.exports=function(e){if(e===void 0||NSe(e))return e;throw new QSe(OSe(e)+" is not an object or undefined")}});var UG=k((xBi,Rvt)=>{"use strict";var Zvt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",yvt=Zvt+"+/",Cvt=Zvt+"-_",xvt=function(e){for(var t={},r=0;r<64;r++)t[e.charAt(r)]=r;return t};Rvt.exports={i2c:yvt,c2i:xvt(yvt),i2cUrl:Cvt,c2iUrl:xvt(Cvt)}});var V4=k((ZBi,Avt)=>{"use strict";var TSe=TypeError;Avt.exports=function(e){var t=e&&e.alphabet;if(t===void 0||t==="base64"||t==="base64url")return t||"base64";throw new TSe("Incorrect `alphabet` option")}});var w4=k((RBi,Wvt)=>{"use strict";var Bvt=ze(),JSe=Qe(),HSe=F4(),_Se=RG(),jSe=Pi(),Xvt=UG(),zSe=V4(),DSe=Wb(),MSe=Xvt.c2i,PSe=Xvt.c2iUrl,cg=Bvt.SyntaxError,KSe=Bvt.TypeError,mm=JSe("".charAt),k4=function(e,t){for(var r=e.length;t>16&255,a>>8&255,a&255];if(n===2){if(r&&o[1]!==0)throw new cg("Extra bits");return[o[0]]}if(n===3){if(r&&o[2]!==0)throw new cg("Extra bits");return[o[0],o[1]]}return o},L4=function(e,t,r){for(var n=t.length,a=0;a0){if(o==="stop-before-partial")break;if(o==="loose"){if(g.length===1)throw new cg("Malformed padding: exactly one additional character");c=L4(l,S4(g,a,!1),c)}else throw new cg("Missing padding")}u=s;break}var h=mm(e,d);if(++d,h==="="){if(g.length<2)throw new cg("Padding is too early");if(d=k4(e,d),g.length===2){if(d===s){if(o==="stop-before-partial")break;throw new cg("Malformed padding: only one =")}mm(e,d)==="="&&(++d,d=k4(e,d))}if(d{"use strict";var qSe=Ut(),$Se=ze(),tLe=xb(),eLe=w4(),tf=$Se.Uint8Array,iLe=!tf||!tf.fromBase64||!(function(){try{tf.fromBase64("a");return}catch{}try{tf.fromBase64("",null)}catch{return!0}})();tf&&qSe({target:"Uint8Array",stat:!0,forced:iLe},{fromBase64:function(t){var r=eLe(t,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return tLe(tf,r.bytes)}})});var Y4=k((XBi,Lvt)=>{"use strict";var U4=ze(),kvt=Qe(),rLe=U4.Uint8Array,Vvt=U4.SyntaxError,nLe=U4.parseInt,aLe=Math.min,Svt=/[^\da-f]/i,oLe=kvt(Svt.exec),sLe=kvt("".slice);Lvt.exports=function(e,t){var r=e.length;if(r%2!==0)throw new Vvt("String should be an even number of characters");for(var n=t?aLe(t.length,r/2):r/2,a=t||new rLe(n),o=0,s=0;s{"use strict";var lLe=Ut(),cLe=ze(),dLe=RG(),uLe=Y4();cLe.Uint8Array&&lLe({target:"Uint8Array",stat:!0},{fromHex:function(t){return uLe(dLe(t)).bytes}})});var YG=k((VBi,Uvt)=>{"use strict";var gLe=Lo(),hLe=TypeError;Uvt.exports=function(e){if(gLe(e)==="Uint8Array")return e;throw new hLe("Argument is not an Uint8Array")}});var Yvt=k(()=>{"use strict";var mLe=Ut(),pLe=ze(),bLe=w4(),fLe=YG(),nX=pLe.Uint8Array,ILe=!nX||!nX.prototype.setFromBase64||!(function(){var e=new nX([255,255,255,255,255]);try{e.setFromBase64("",null);return}catch{}try{e.setFromBase64("a");return}catch{}try{e.setFromBase64("MjYyZg===")}catch{return e[0]===50&&e[1]===54&&e[2]===50&&e[3]===255&&e[4]===255}})();nX&&mLe({target:"Uint8Array",proto:!0,forced:ILe},{setFromBase64:function(t){fLe(this);var r=bLe(t,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:r.read,written:r.written}}})});var Evt=k(()=>{"use strict";var vLe=Ut(),GLe=ze(),yLe=RG(),CLe=YG(),xLe=Wb(),ZLe=Y4();function RLe(){try{var e=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(e).setFromHex("cafed00d")}catch{return!0}}GLe.Uint8Array&&vLe({target:"Uint8Array",proto:!0,forced:RLe()},{setFromHex:function(t){CLe(this),yLe(t),xLe(this.buffer);var r=ZLe(t,this).read;return{read:r,written:r/2}}})});var Ovt=k(()=>{"use strict";var ALe=Ut(),BLe=ze(),XLe=Qe(),WLe=F4(),FLe=YG(),VLe=Wb(),Nvt=UG(),kLe=V4(),SLe=Nvt.i2c,LLe=Nvt.i2cUrl,wLe=XLe("".charAt),aX=BLe.Uint8Array,ULe=!aX||!aX.prototype.toBase64||!(function(){try{var e=new aX;e.toBase64(null)}catch{return!0}})();aX&&ALe({target:"Uint8Array",proto:!0,forced:ULe},{toBase64:function(){var t=FLe(this),r=arguments.length?WLe(arguments[0]):void 0,n=kLe(r)==="base64"?SLe:LLe,a=!!r&&!!r.omitPadding;VLe(this.buffer);for(var o="",s=0,l=t.length,c,u=function(g){return wLe(n,c>>6*g&63)};s+2{"use strict";var YLe=Ut(),ELe=ze(),NLe=Qe(),OLe=YG(),QLe=Wb(),TLe=NLe(1.1.toString),oX=ELe.Uint8Array,JLe=!oX||!oX.prototype.toHex||!(function(){try{var e=new oX([255,255,255,255,255,255,255,255]);return e.toHex()==="ffffffffffffffff"}catch{return!1}})();oX&&YLe({target:"Uint8Array",proto:!0,forced:JLe},{toHex:function(){OLe(this),QLe(this.buffer);for(var t="",r=0,n=this.length;r{"use strict";var HLe=Ut(),E4=Qe(),_Le=Li(),Tvt=String.fromCharCode,Jvt=E4("".charAt),Hvt=E4(/./.exec),_vt=E4("".slice),jLe=/^[\da-f]{2}$/i,zLe=/^[\da-f]{4}$/i;HLe({global:!0},{unescape:function(t){for(var r=_Le(t),n="",a=r.length,o=0,s,l;o{"use strict";var DLe=Qe(),zvt=Rc(),sX=tg().getWeakData,MLe=Eo(),PLe=gi(),KLe=Gc(),N4=xi(),qLe=En(),Mvt=ga(),Dvt=Pi(),Pvt=Tr(),$Le=Pvt.set,twe=Pvt.getterFor,ewe=Mvt.find,iwe=Mvt.findIndex,rwe=DLe([].splice),nwe=0,lX=function(e){return e.frozen||(e.frozen=new Kvt)},Kvt=function(){this.entries=[]},O4=function(e,t){return ewe(e.entries,function(r){return r[0]===t})};Kvt.prototype={get:function(e){var t=O4(this,e);if(t)return t[1]},has:function(e){return!!O4(this,e)},set:function(e,t){var r=O4(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=iwe(this.entries,function(r){return r[0]===e});return~t&&rwe(this.entries,t,1),!!~t}};qvt.exports={getConstructor:function(e,t,r,n){var a=e(function(c,u){MLe(c,o),$Le(c,{type:t,id:nwe++,frozen:null}),KLe(u)||qLe(u,c[n],{that:c,AS_ENTRIES:r})}),o=a.prototype,s=twe(t),l=function(c,u,g){var d=s(c),h=sX(PLe(u),!0);return h===!0?lX(d).set(u,g):h[d.id]=g,c};return zvt(o,{delete:function(c){var u=s(this);if(!N4(c))return!1;var g=sX(c);return g===!0?lX(u).delete(c):g&&Dvt(g,u.id)&&delete g[u.id]},has:function(u){var g=s(this);if(!N4(u))return!1;var d=sX(u);return d===!0?lX(g).has(u):d&&Dvt(d,g.id)}}),zvt(o,r?{get:function(u){var g=s(this);if(N4(u)){var d=sX(u);if(d===!0)return lX(g).get(u);if(d)return d[g.id]}},set:function(u,g){return l(this,u,g)}}:{add:function(u){return l(this,u,!0)}}),a}}});var oGt=k(()=>{"use strict";var awe=$u(),$vt=ze(),gX=Qe(),tGt=Rc(),owe=tg(),swe=tG(),eGt=Q4(),cX=xi(),dX=Tr().enforce,lwe=we(),cwe=ZE(),OG=Object,dwe=Array.isArray,uX=OG.isExtensible,iGt=OG.isFrozen,uwe=OG.isSealed,rGt=OG.freeze,gwe=OG.seal,hwe=!$vt.ActiveXObject&&"ActiveXObject"in $vt,EG,nGt=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},aGt=swe("WeakMap",nGt,eGt),ef=aGt.prototype,hX=gX(ef.set),mwe=function(){return awe&&lwe(function(){var e=rGt([]);return hX(new aGt,e,1),!iGt(e)})};cwe&&(hwe?(EG=eGt.getConstructor(nGt,"WeakMap",!0),owe.enable(),T4=gX(ef.delete),NG=gX(ef.has),J4=gX(ef.get),tGt(ef,{delete:function(e){if(cX(e)&&!uX(e)){var t=dX(this);return t.frozen||(t.frozen=new EG),T4(this,e)||t.frozen.delete(e)}return T4(this,e)},has:function(t){if(cX(t)&&!uX(t)){var r=dX(this);return r.frozen||(r.frozen=new EG),NG(this,t)||r.frozen.has(t)}return NG(this,t)},get:function(t){if(cX(t)&&!uX(t)){var r=dX(this);return r.frozen||(r.frozen=new EG),NG(this,t)?J4(this,t):r.frozen.get(t)}return J4(this,t)},set:function(t,r){if(cX(t)&&!uX(t)){var n=dX(this);n.frozen||(n.frozen=new EG),NG(this,t)?hX(this,t,r):n.frozen.set(t,r)}else hX(this,t,r);return this}})):mwe()&&tGt(ef,{set:function(t,r){var n;return dwe(t)&&(iGt(t)?n=rGt:uwe(t)&&(n=gwe)),hX(this,t,r),n&&n(t),this}}));var T4,NG,J4});var sGt=k(()=>{"use strict";oGt()});var QG=k((zBi,lGt)=>{"use strict";var mX=Qe(),pX=WeakMap.prototype;lGt.exports={WeakMap,set:mX(pX.set),get:mX(pX.get),has:mX(pX.has),remove:mX(pX.delete)}});var H4=k((DBi,cGt)=>{"use strict";var pwe=QG().has;cGt.exports=function(e){return pwe(e),e}});var dGt=k(()=>{"use strict";var bwe=Ut(),fwe=H4(),_4=QG(),Iwe=cr(),vwe=_4.get,Gwe=_4.has,ywe=_4.set;bwe({target:"WeakMap",proto:!0,real:!0,forced:Iwe},{getOrInsert:function(t,r){return Gwe(fwe(this),t)?vwe(this,t):(ywe(this,t,r),r)}})});var hGt=k((KBi,gGt)=>{"use strict";var j4=QG(),uGt=new j4.WeakMap,Cwe=j4.set,xwe=j4.remove;gGt.exports=function(e){return Cwe(uGt,e,1),xwe(uGt,e),e}});var mGt=k(()=>{"use strict";var Zwe=Ut(),Rwe=Hi(),Awe=H4(),Bwe=hGt(),z4=QG(),Xwe=cr(),Wwe=z4.get,Fwe=z4.has,Vwe=z4.set,kwe=Xwe||!(function(){try{WeakMap.prototype.getOrInsertComputed&&new WeakMap().getOrInsertComputed(1,function(){throw 1})}catch(e){return e instanceof TypeError}})();Zwe({target:"WeakMap",proto:!0,real:!0,forced:kwe},{getOrInsertComputed:function(t,r){if(Awe(this),Bwe(t),Rwe(r),Fwe(this,t))return Wwe(this,t);var n=r(t);return Vwe(this,t,n),n}})});var pGt=k(()=>{"use strict";var Swe=tG(),Lwe=Q4();Swe("WeakSet",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Lwe)});var bGt=k(()=>{"use strict";pGt()});var xGt=k(()=>{"use strict";var wwe=Ut(),Uwe=ze(),vGt=Mi(),D4=Qe(),Ywe=si(),bX=we(),Ewe=Li(),Nwe=ps(),fGt=UG().c2i,GGt=/[^\d+/a-z]/i,Owe=/[\t\n\f\r ]+/g,Qwe=/[=]{1,2}$/,pm=vGt("atob"),Twe=String.fromCharCode,Jwe=D4("".charAt),IGt=D4("".replace),Hwe=D4(GGt.exec),rf=!!pm&&!bX(function(){return pm("aGk=")!=="hi"}),yGt=rf&&bX(function(){return pm(" ")!==""}),CGt=rf&&!bX(function(){pm("a")}),_we=rf&&!bX(function(){pm()}),jwe=rf&&pm.length!==1,zwe=!rf||yGt||CGt||_we||jwe;wwe({global:!0,bind:!0,enumerable:!0,forced:zwe},{atob:function(t){if(Nwe(arguments.length,1),rf&&!yGt&&!CGt)return Ywe(pm,Uwe,t);var r=IGt(Ewe(t),Owe,""),n="",a=0,o=0,s,l,c;if(r.length%4===0&&(r=IGt(r,Qwe,"")),s=r.length,s%4===1||Hwe(GGt,r))throw new(vGt("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;a>(-2*o&6)));return n}})});var XGt=k(()=>{"use strict";var Dwe=Ut(),Mwe=ze(),AGt=Mi(),BGt=Qe(),Pwe=si(),M4=we(),ZGt=Li(),Kwe=ps(),qwe=UG().i2c,nf=AGt("btoa"),RGt=BGt("".charAt),$we=BGt("".charCodeAt),TG=!!nf&&!M4(function(){return nf("hi")!=="aGk="}),tUe=TG&&!M4(function(){nf()}),eUe=TG&&M4(function(){return nf(null)!=="bnVsbA=="}),iUe=TG&&nf.length!==1;Dwe({global:!0,bind:!0,enumerable:!0,forced:!TG||tUe||eUe||iUe},{btoa:function(t){if(Kwe(arguments.length,1),TG)return Pwe(nf,Mwe,ZGt(t));for(var r=ZGt(t),n="",a=0,o=qwe,s,l;RGt(r,a)||(o="=",a%1);){if(l=$we(r,a+=3/4),l>255)throw new(AGt("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");s=s<<8|l,n+=RGt(o,63&s>>8-a%1*8)}return n}})});var P4=k((lXi,WGt)=>{"use strict";WGt.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var q4=k((cXi,VGt)=>{"use strict";var rUe=Iv(),K4=rUe("span").classList,FGt=K4&&K4.constructor&&K4.constructor.prototype;VGt.exports=FGt===Object.prototype?void 0:FGt});var wGt=k(()=>{"use strict";var kGt=ze(),SGt=P4(),nUe=q4(),$4=YN(),aUe=da(),LGt=function(e){if(e&&e.forEach!==$4)try{aUe(e,"forEach",$4)}catch{e.forEach=$4}};for(fX in SGt)SGt[fX]&&LGt(kGt[fX]&&kGt[fX].prototype);var fX;LGt(nUe)});var OGt=k(()=>{"use strict";var UGt=ze(),EGt=P4(),oUe=q4(),JG=Nv(),YGt=da(),sUe=mo(),lUe=Wi(),tJ=lUe("iterator"),eJ=JG.values,NGt=function(e,t){if(e){if(e[tJ]!==eJ)try{YGt(e,tJ,eJ)}catch{e[tJ]=eJ}if(sUe(e,t,!0),EGt[t]){for(var r in JG)if(e[r]!==JG[r])try{YGt(e,r,JG[r])}catch{e[r]=JG[r]}}}};for(IX in EGt)NGt(UGt[IX]&&UGt[IX].prototype,IX);var IX;NGt(oUe,"DOMTokenList")});var iJ=k((mXi,QGt)=>{"use strict";QGt.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}});var qGt=k(()=>{"use strict";var cUe=Ut(),yX=Mi(),dUe=AO(),lJ=we(),uUe=ua(),cJ=ko(),CX=Qr().f,gUe=Rr(),vX=vn(),GX=Pi(),hUe=Eo(),mUe=gi(),HGt=xN(),TGt=Mh(),af=iJ(),pUe=dA(),_Gt=Tr(),dJ=bi(),jGt=cr(),of="DOMException",sJ="DATA_CLONE_ERR",ZX=yX("Error"),Yd=yX(of)||(function(){try{var e=yX("MessageChannel")||dUe("worker_threads").MessageChannel;new e().port1.postMessage(new WeakMap)}catch(t){if(t.name===sJ&&t.code===25)return t.constructor}})(),bUe=Yd&&Yd.prototype,zGt=ZX.prototype,fUe=_Gt.set,IUe=_Gt.getterFor(of),vUe="stack"in new ZX(of),DGt=function(e){return GX(af,e)&&af[e].m?af[e].c:0},uJ=function(){hUe(this,_G);var t=arguments.length,r=TGt(t<1?void 0:arguments[0]),n=TGt(t<2?void 0:arguments[1],"Error"),a=DGt(n);if(fUe(this,{type:of,name:n,message:r,code:a}),dJ||(this.name=n,this.message=r,this.code=a),vUe){var o=new ZX(r);o.name=of,CX(this,"stack",cJ(1,pUe(o.stack,1)))}},_G=uJ.prototype=uUe(zGt),MGt=function(e){return{enumerable:!0,configurable:!0,get:e}},rJ=function(e){return MGt(function(){return IUe(this)[e]})};dJ&&(vX(_G,"code",rJ("code")),vX(_G,"message",rJ("message")),vX(_G,"name",rJ("name")));CX(_G,"constructor",cJ(1,uJ));var RX=lJ(function(){return!(new Yd instanceof ZX)}),PGt=RX||lJ(function(){return zGt.toString!==HGt||String(new Yd(1,2))!=="2: 1"}),KGt=RX||lJ(function(){return new Yd(1,"DataCloneError").code!==25}),GUe=RX||Yd[sJ]!==25||bUe[sJ]!==25,JGt=jGt?PGt||KGt||GUe:RX;cUe({global:!0,constructor:!0,forced:JGt},{DOMException:JGt?uJ:Yd});var jG=yX(of),xX=jG.prototype;PGt&&(jGt||Yd===jG)&&gUe(xX,"toString",HGt);KGt&&dJ&&Yd===jG&&vX(xX,"code",MGt(function(){return DGt(mUe(this).name)}));for(nJ in af)GX(af,nJ)&&(aJ=af[nJ],HG=aJ.s,oJ=cJ(6,aJ.c),GX(jG,HG)||CX(jG,HG,oJ),GX(xX,HG)||CX(xX,HG,oJ));var aJ,HG,oJ,nJ});var ayt=k(()=>{"use strict";var yUe=Ut(),CUe=ze(),vJ=Mi(),fJ=ko(),IJ=Qr().f,$Gt=Pi(),xUe=Eo(),ZUe=Ju(),tyt=Mh(),gJ=iJ(),RUe=dA(),AUe=bi(),ryt=cr(),DG="DOMException",nyt=vJ("Error"),MG=vJ(DG),GJ=function(){xUe(this,BUe);var t=arguments.length,r=tyt(t<1?void 0:arguments[0]),n=tyt(t<2?void 0:arguments[1],"Error"),a=new MG(r,n),o=new nyt(r);return o.name=DG,IJ(a,"stack",fJ(1,RUe(o.stack,1))),ZUe(a,this,GJ),a},BUe=GJ.prototype=MG.prototype,XUe="stack"in new nyt(DG),WUe="stack"in new MG(1,2),hJ=MG&&AUe&&Object.getOwnPropertyDescriptor(CUe,DG),FUe=!!hJ&&!(hJ.writable&&hJ.configurable),eyt=XUe&&!FUe&&!WUe;yUe({global:!0,constructor:!0,forced:ryt||eyt},{DOMException:eyt?GJ:MG});var zG=vJ(DG),iyt=zG.prototype;if(iyt.constructor!==zG){ryt||IJ(iyt,"constructor",fJ(1,zG));for(mJ in gJ)$Gt(gJ,mJ)&&(pJ=gJ[mJ],bJ=pJ.s,$Gt(zG,bJ)||IJ(zG,bJ,fJ(6,pJ.c)))}var pJ,bJ,mJ});var syt=k(()=>{"use strict";var VUe=Mi(),kUe=mo(),oyt="DOMException";kUe(VUe(oyt),oyt)});var cyt=k(()=>{"use strict";var SUe=Ut(),LUe=ze(),lyt=pG().clear;SUe({global:!0,bind:!0,enumerable:!0,forced:LUe.clearImmediate!==lyt},{clearImmediate:lyt})});var AX=k((xXi,uyt)=>{"use strict";var dyt=ze(),wUe=Yo(),UUe=ar(),YUe=Tv(),EUe=Xl(),NUe=hs(),OUe=ps(),QUe=dyt.Function,TUe=/MSIE .\./.test(EUe)||YUe==="BUN"&&(function(){var e=dyt.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")})();uyt.exports=function(e,t){var r=t?2:1;return TUe?function(n,a){var o=OUe(arguments.length,1)>r,s=UUe(n)?n:QUe(n),l=o?NUe(arguments,r):[],c=o?function(){wUe(s,this,l)}:s;return t?e(c,a):e(c)}:e}});var pyt=k(()=>{"use strict";var JUe=Ut(),myt=ze(),gyt=pG().set,HUe=AX(),hyt=myt.setImmediate?HUe(gyt,!1):gyt;JUe({global:!0,bind:!0,enumerable:!0,forced:myt.setImmediate!==hyt},{setImmediate:hyt})});var byt=k(()=>{"use strict";cyt();pyt()});var fyt=k(()=>{"use strict";var _Ue=Ut(),jUe=ze(),zUe=w5(),DUe=Hi(),MUe=ps(),PUe=we(),KUe=bi(),qUe=PUe(function(){return KUe&&Object.getOwnPropertyDescriptor(jUe,"queueMicrotask").value.length!==1});_Ue({global:!0,enumerable:!0,dontCallGetSet:!0,forced:qUe},{queueMicrotask:function(t){MUe(arguments.length,1),zUe(DUe(t))}})});var vyt=k(()=>{"use strict";var $Ue=Ut(),dg=ze(),tYe=vn(),eYe=bi(),iYe=TypeError,rYe=Object.defineProperty,Iyt=dg.self!==dg;try{eYe?(BX=Object.getOwnPropertyDescriptor(dg,"self"),(Iyt||!BX||!BX.get||!BX.enumerable)&&tYe(dg,"self",{get:function(){return dg},set:function(t){if(this!==dg)throw new iYe("Illegal invocation");rYe(dg,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})):$Ue({global:!0,simple:!0,forced:Iyt},{self:dg})}catch{}var BX});var Fyt=k(()=>{"use strict";var nYe=cr(),aYe=Ut(),Sa=ze(),KG=Mi(),$G=Qe(),AJ=we(),oYe=Yu(),lf=ar(),sYe=Ou(),lYe=Gc(),kX=xi(),cYe=wu(),dYe=En(),Cyt=gi(),FX=Lo(),uYe=Pi(),gYe=Yn(),yJ=da(),XX=fr(),hYe=ps(),mYe=ig(),SX=kb(),BJ=Js(),pYe=um(),Gyt=SO(),bYe=fN(),XJ=_A(),PG=Sa.Object,fYe=Sa.Array,xyt=Sa.Date,Zyt=Sa.Error,IYe=Sa.TypeError,vYe=Sa.PerformanceMark,bm=KG("DOMException"),ZJ=SX.Map,WJ=SX.has,Ryt=SX.get,VX=SX.set,Ayt=BJ.Set,Byt=BJ.add,GYe=BJ.has,yYe=KG("Object","keys"),CYe=$G([].push),xYe=$G((!0).valueOf),ZYe=$G(1.1.valueOf),RYe=$G("".valueOf),AYe=$G(xyt.prototype.getTime),RJ=oYe("structuredClone"),qG="DataCloneError",WX="Transferring",Xyt=function(e){return!AJ(function(){var t=new Sa.Set([7]),r=e(t),n=e(PG(7));return r===t||!r.has(7)||!kX(n)||+n!=7})&&e},yyt=function(e,t){return!AJ(function(){var r=new t,n=e({a:r,b:r});return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===r.stack)})},BYe=function(e){return!AJ(function(){var t=e(new Sa.AggregateError([1],RJ,{cause:3}));return t.name!=="AggregateError"||t.errors[0]!==1||t.message!==RJ||t.cause!==3})},sf=Sa.structuredClone,XYe=nYe||!yyt(sf,Zyt)||!yyt(sf,bm)||!BYe(sf),WYe=!sf&&Xyt(function(e){return new vYe(RJ,{detail:e}).detail}),Ed=Xyt(sf)||WYe,CJ=function(e){throw new bm("Uncloneable type: "+e,qG)},To=function(e,t){throw new bm((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",qG)},xJ=function(e,t){return Ed||To(t),Ed(e)},FYe=function(){var e;try{e=new Sa.DataTransfer}catch{try{e=new Sa.ClipboardEvent("").clipboardData}catch{}}return e&&e.items&&e.files?e:null},Wyt=function(e,t,r){if(WJ(t,e))return Ryt(t,e);var n=r||FX(e),a,o,s,l,c,u;if(n==="SharedArrayBuffer")Ed?a=Ed(e):a=e;else{var g=Sa.DataView;!g&&!lf(e.slice)&&To("ArrayBuffer");try{if(lf(e.slice)&&!e.resizable)a=e.slice(0);else for(o=e.byteLength,s=("maxByteLength"in e)?{maxByteLength:e.maxByteLength}:void 0,a=new ArrayBuffer(o,s),l=new g(e),c=new g(a),u=0;u1&&!lYe(arguments[1])?Cyt(arguments[1]):void 0,n=r?r.transfer:void 0,a,o;n!==void 0&&(a=new ZJ,o=kYe(n,a));var s=ka(t,a);return o&&SYe(o),s}})});var Syt=k(()=>{"use strict";var LYe=Ut(),kyt=ze(),wYe=AX(),Vyt=wYe(kyt.setInterval,!0);LYe({global:!0,bind:!0,forced:kyt.setInterval!==Vyt},{setInterval:Vyt})});var Uyt=k(()=>{"use strict";var UYe=Ut(),wyt=ze(),YYe=AX(),Lyt=YYe(wyt.setTimeout,!0);UYe({global:!0,bind:!0,forced:wyt.setTimeout!==Lyt},{setTimeout:Lyt})});var Yyt=k(()=>{"use strict";Syt();Uyt()});var ty=k((OXi,Nyt)=>{"use strict";var EYe=we(),NYe=Wi(),OYe=bi(),Eyt=cr(),QYe=NYe("iterator");Nyt.exports=!EYe(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach(function(a,o){t.delete("b"),n+=o+a}),r.delete("a",2),r.delete("b",void 0),Eyt&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(Eyt||!OYe)||!t.sort||e.href!=="https://a/c%20d?a=1&c=3"||t.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!t[QYe]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("https://a#\u0431").hash!=="#%D0%B1"||n!=="a1c3"||new URL("https://x",void 0).host!=="x"})});var Dyt=k((QXi,zyt)=>{"use strict";var fm=Qe(),FJ=2147483647,ey=36,Hyt=1,SJ=26,TYe=38,JYe=700,HYe=72,_Ye=128,jYe="-",zYe=/[^\0-\u007E]/,_yt=/[.\u3002\uFF0E\uFF61]/g,Oyt="Overflow: input needs wider integers to process",VJ=ey-Hyt,Qyt=RangeError,DYe=fm(_yt.exec),cf=Math.floor,kJ=String.fromCharCode,Tyt=fm("".charCodeAt),jyt=fm([].join),ug=fm([].push),MYe=fm("".replace),PYe=fm("".split),KYe=fm("".toLowerCase),qYe=function(e){for(var t=[],r=0,n=e.length;r=55296&&a<=56319&&r>1,e+=cf(e/t);e>VJ*SJ>>1;)e=cf(e/VJ),n+=ey;return cf(n+(VJ+1)*e/(e+TYe))},tEe=function(e){var t=[];e=qYe(e);var r=e.length,n=_Ye,a=0,o=HYe,s,l;for(s=0;s=n&&lcf((FJ-a)/d))throw new Qyt(Oyt);for(a+=(g-n)*d,n=g,s=0;sFJ)throw new Qyt(Oyt);if(l===n){for(var h=a,m=ey;;){var p=m<=o?Hyt:m>=o+SJ?SJ:m-o;if(h{"use strict";Nv();ST();var NJ=Ut(),s1t=ze(),OJ=X5(),eEe=Mi(),LX=si(),wl=Qe(),iy=bi(),l1t=ty(),c1t=Rr(),iEe=vn(),rEe=Rc(),nEe=mo(),aEe=AA(),QJ=Tr(),d1t=Eo(),LJ=ar(),oEe=Pi(),sEe=wo(),lEe=Lo(),cEe=gi(),u1t=xi(),fo=Li(),dEe=ua(),Myt=ko(),Pyt=Kh(),uEe=Wd(),wX=_u(),df=ps(),gEe=Wi(),hEe=kA(),mEe=gEe("iterator"),gf="URLSearchParams",g1t=gf+"Iterator",h1t=QJ.set,Hs=QJ.getterFor(gf),pEe=QJ.getterFor(g1t),Kyt=OJ("fetch"),EX=OJ("Request"),ry=OJ("Headers"),wJ=EX&&EX.prototype,qyt=ry&&ry.prototype,bEe=s1t.TypeError,fEe=s1t.encodeURIComponent,IEe=String.fromCharCode,vEe=eEe("String","fromCodePoint"),GEe=parseInt,YX=wl("".charAt),$yt=wl([].join),gg=wl([].push),m1t=wl("".replace),yEe=wl([].shift),t1t=wl([].splice),e1t=wl("".split),p1t=wl("".slice),CEe=wl(/./.exec),xEe=/\+/g,UJ="\uFFFD",ZEe=/^[0-9a-f]+$/i,i1t=function(e,t){var r=p1t(e,t,t+2);return CEe(ZEe,r)?GEe(r,16):NaN},REe=function(e){for(var t=0,r=128;r>0&&(e&r)!==0;r>>=1)t++;return t},AEe=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(e[0]&31)<<6|e[1]&63;break;case 3:t=(e[0]&15)<<12|(e[1]&63)<<6|e[2]&63;break;case 4:t=(e[0]&7)<<18|(e[1]&63)<<12|(e[2]&63)<<6|e[3]&63;break}return t>1114111?null:t},r1t=function(e){e=m1t(e,xEe," ");for(var t=e.length,r="",n=0;nt){r+="%",n++;continue}var o=i1t(e,n+1);if(o!==o){r+=a,n++;continue}n+=2;var s=REe(o);if(s===0)a=IEe(o);else{if(s===1||s>4){r+=UJ,n++;continue}for(var l=[o],c=1;ct||YX(e,n)!=="%"));){var u=i1t(e,n+1);if(u!==u){n+=3;break}if(u>191||u<128)break;gg(l,u),n+=2,c++}if(l.length!==s){r+=UJ;continue}var g=AEe(l);g===null?r+=UJ:a=vEe(g)}}r+=a,n++}return r},BEe=/[!'()~]|%20/g,XEe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},WEe=function(e){return XEe[e]},n1t=function(e){return m1t(fEe(e),BEe,WEe)},YJ=aEe(function(t,r){h1t(this,{type:g1t,target:Hs(t).entries,index:0,kind:r})},gf,function(){var t=pEe(this),r=t.target,n=t.index++;if(!r||n>=r.length)return t.target=null,wX(void 0,!0);var a=r[n];switch(t.kind){case"keys":return wX(a.key,!1);case"values":return wX(a.value,!1)}return wX([a.key,a.value],!1)},!0),b1t=function(e){this.entries=[],this.url=null,e!==void 0&&(u1t(e)?this.parseObject(e):this.parseQuery(typeof e=="string"?YX(e,0)==="?"?p1t(e,1):e:fo(e)))};b1t.prototype={type:gf,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t=this.entries,r=uEe(e),n,a,o,s,l,c,u;if(r)for(n=Pyt(e,r),a=n.next;!(o=LX(a,n)).done;){if(s=Pyt(cEe(o.value)),l=s.next,(c=LX(l,s)).done||(u=LX(l,s)).done||!LX(l,s).done)throw new bEe("Expected sequence with length 2");gg(t,{key:fo(c.value),value:fo(u.value)})}else for(var g in e)oEe(e,g)&&gg(t,{key:g,value:fo(e[g])})},parseQuery:function(e){if(e)for(var t=this.entries,r=e1t(e,"&"),n=0,a,o;n0?arguments[0]:void 0,r=h1t(this,new b1t(t));iy||(this.size=r.entries.length)},uf=NX.prototype;rEe(uf,{append:function(t,r){var n=Hs(this);df(arguments.length,2),gg(n.entries,{key:fo(t),value:fo(r)}),iy||this.size++,n.updateURL()},delete:function(e){for(var t=Hs(this),r=df(arguments.length,1),n=t.entries,a=fo(e),o=r<2?void 0:arguments[1],s=o===void 0?o:fo(o),l=0;ln.key?1:-1}),t.updateURL()},forEach:function(t){for(var r=Hs(this).entries,n=sEe(t,arguments.length>1?arguments[1]:void 0),a=0,o;a1?EJ(arguments[1]):{})}}),LJ(EX)&&(UX=function(t){return d1t(this,wJ),new EX(t,arguments.length>1?EJ(arguments[1]):{})},wJ.constructor=UX,UX.prototype=wJ,NJ({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:UX})));var a1t,o1t,EJ,UX;f1t.exports={URLSearchParams:NX,getState:Hs}});var w1t=k(()=>{"use strict";LT();var FEe=Ut(),aH=bi(),VEe=ty(),oH=ze(),I1t=wo(),Ms=Qe(),HX=Rr(),_s=vn(),kEe=Eo(),iH=Pi(),sH=u5(),hf=EN(),Ul=hs(),SEe=BG().codeAt,LEe=Dyt(),Od=Li(),wEe=mo(),UEe=ps(),W1t=TJ(),F1t=Tr(),YEe=F1t.set,_X=F1t.getterFor("URL"),EEe=W1t.URLSearchParams,NEe=W1t.getState,ny=oH.URL,rH=oH.TypeError,jX=oH.parseInt,OEe=Math.floor,v1t=Math.pow,Ds=Ms("".charAt),Yl=Ms(/./.exec),oy=Ms([].join),QEe=Ms(1.1.toString),TEe=Ms([].pop),pf=Ms([].push),JJ=Ms("".replace),JEe=Ms([].shift),HEe=Ms("".split),ly=Ms("".slice),zX=Ms("".toLowerCase),_Ee=Ms([].unshift),jEe="Invalid authority",HJ="Invalid scheme",Im="Invalid host",G1t="Invalid port",V1t=/[a-z]/i,zEe=/[\d+-.a-z]/i,nH=/\d/,DEe=/^0x/i,MEe=/^[0-7]+$/,PEe=/^\d+$/,k1t=/^[\da-f]+$/i,KEe=/[\0\t\n\r #%/:<>?@[\\\]^|]/,qEe=/[\0\t\n\r #/:<>?@[\\\]^|]/,$Ee=/^[\u0000-\u0020]+/,tNe=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,eNe=/[\t\n\r]/g,js,iNe=function(e){var t=HEe(e,"."),r,n,a,o,s,l,c;if(t.length&&t[t.length-1]===""&&t.length--,r=t.length,r>4)return e;for(n=[],a=0;a1&&Ds(o,0)==="0"&&(s=Yl(DEe,o)?16:8,o=ly(o,s===8?1:2)),o==="")l=0;else{if(!Yl(s===10?PEe:s===8?MEe:k1t,o))return e;l=jX(o,s)}pf(n,l)}for(a=0;a=v1t(256,5-r))return null}else if(l>255)return null;for(c=TEe(n),a=0;a6))return;for(l=0;h();){if(c=null,l>0)if(h()==="."&&l<4)a++;else return;if(!Yl(nH,h()))return;for(;Yl(nH,h());){if(u=jX(h(),10),c===null)c=u;else{if(c===0)return;c=c*10+u}if(c>255)return;a++}t[r]=t[r]*256+c,l++,(l===2||l===4)&&r++}if(l!==4)return;break}else if(h()===":"){if(a++,!h())return}else if(h())return;t[r++]=o}if(n!==null)for(g=r-n,r=7;r!==0&&g>0;)d=t[r],t[r--]=t[n+g-1],t[n+--g]=d;else if(r!==8)return;return t},nNe=function(e){for(var t=null,r=1,n=null,a=0,o=0;o<8;o++)e[o]!==0?(a>r&&(t=n,r=a),n=null,a=0):(n===null&&(n=o),++a);return a>r?n:t},ay=function(e){var t,r,n,a;if(typeof e=="number"){for(t=[],r=0;r<4;r++)_Ee(t,e%256),e=OEe(e/256);return oy(t,".")}if(typeof e=="object"){for(t="",n=nNe(e),r=0;r<8;r++)a&&e[r]===0||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=QEe(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},JX={},S1t=sH({},JX,{" ":1,'"':1,"<":1,">":1,"`":1}),L1t=sH({},S1t,{"#":1,"?":1,"{":1,"}":1}),_J=sH({},L1t,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),hg=function(e,t){var r=SEe(e,0);return r>32&&r<127&&!iH(t,e)?e:encodeURIComponent(e)},OX={ftp:21,file:null,http:80,https:443,ws:80,wss:443},sy=function(e,t){var r;return e.length===2&&Yl(V1t,Ds(e,0))&&((r=Ds(e,1))===":"||!t&&r==="|")},y1t=function(e){var t;return e.length>1&&sy(ly(e,0,2))&&(e.length===2||(t=Ds(e,2))==="/"||t==="\\"||t==="?"||t==="#")},aNe=function(e){return e==="."||zX(e)==="%2e"},oNe=function(e){return e=zX(e),e===".."||e==="%2e."||e===".%2e"||e==="%2e%2e"},jJ={},C1t={},zJ={},x1t={},Z1t={},DJ={},R1t={},A1t={},QX={},TX={},MJ={},PJ={},KJ={},qJ={},B1t={},$J={},mf={},Sc={},X1t={},vm={},Nd={},lH=function(e,t,r){var n=Od(e),a,o,s;if(t){if(o=this.parse(n),o)throw new rH(o);this.searchParams=null}else{if(r!==void 0&&(a=new lH(r,!0)),o=this.parse(n,null,a),o)throw new rH(o);s=NEe(new EEe),s.bindURL(this),this.searchParams=s}};lH.prototype={type:"URL",parse:function(e,t,r){var n=this,a=t||jJ,o=0,s="",l=!1,c=!1,u=!1,g,d,h,m;for(e=Od(e),t||(n.scheme="",n.username="",n.password="",n.host=null,n.port=null,n.path=[],n.query=null,n.fragment=null,n.cannotBeABaseURL=!1,e=JJ(e,$Ee,""),e=JJ(e,tNe,"$1")),e=JJ(e,eNe,""),g=hf(e);o<=g.length;){switch(d=g[o],a){case jJ:if(d&&Yl(V1t,d))s+=zX(d),a=C1t;else{if(t)return HJ;a=zJ;continue}break;case C1t:if(d&&(Yl(zEe,d)||d==="+"||d==="-"||d==="."))s+=zX(d);else if(d===":"){if(t&&(n.isSpecial()!==iH(OX,s)||s==="file"&&(n.includesCredentials()||n.port!==null)||n.scheme==="file"&&!n.host))return;if(n.scheme=s,t){n.isSpecial()&&OX[n.scheme]===n.port&&(n.port=null);return}s="",n.scheme==="file"?a=qJ:n.isSpecial()&&r&&r.scheme===n.scheme?a=x1t:n.isSpecial()?a=A1t:g[o+1]==="/"?(a=Z1t,o++):(n.cannotBeABaseURL=!0,pf(n.path,""),a=X1t)}else{if(t)return HJ;s="",a=zJ,o=0;continue}break;case zJ:if(!r||r.cannotBeABaseURL&&d!=="#")return HJ;if(r.cannotBeABaseURL&&d==="#"){n.scheme=r.scheme,n.path=Ul(r.path),n.query=r.query,n.fragment="",n.cannotBeABaseURL=!0,a=Nd;break}a=r.scheme==="file"?qJ:DJ;continue;case x1t:if(d==="/"&&g[o+1]==="/")a=QX,o++;else{a=DJ;continue}break;case Z1t:if(d==="/"){a=TX;break}else{a=Sc;continue}case DJ:if(n.scheme=r.scheme,d===js)n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Ul(r.path),n.query=r.query;else if(d==="/"||d==="\\"&&n.isSpecial())a=R1t;else if(d==="?")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Ul(r.path),n.query="",a=vm;else if(d==="#")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Ul(r.path),n.query=r.query,n.fragment="",a=Nd;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Ul(r.path),n.path.length--,a=Sc;continue}break;case R1t:if(n.isSpecial()&&(d==="/"||d==="\\"))a=QX;else if(d==="/")a=TX;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,a=Sc;continue}break;case A1t:if(a=QX,d!=="/"||Ds(s,o+1)!=="/")continue;o++;break;case QX:if(d!=="/"&&d!=="\\"){a=TX;continue}break;case TX:if(d==="@"){l&&(s="%40"+s),l=!0,h=hf(s);for(var p=0;p65535)return G1t;n.port=n.isSpecial()&&v===OX[n.scheme]?null:v,s=""}if(t)return;a=mf;continue}else return G1t;break;case qJ:if(n.scheme="file",d==="/"||d==="\\")a=B1t;else if(r&&r.scheme==="file")switch(d){case js:n.host=r.host,n.path=Ul(r.path),n.query=r.query;break;case"?":n.host=r.host,n.path=Ul(r.path),n.query="",a=vm;break;case"#":n.host=r.host,n.path=Ul(r.path),n.query=r.query,n.fragment="",a=Nd;break;default:y1t(oy(Ul(g,o),""))||(n.host=r.host,n.path=Ul(r.path),n.shortenPath()),a=Sc;continue}else{a=Sc;continue}break;case B1t:if(d==="/"||d==="\\"){a=$J;break}r&&r.scheme==="file"&&!y1t(oy(Ul(g,o),""))&&(sy(r.path[0],!0)?pf(n.path,r.path[0]):n.host=r.host),a=Sc;continue;case $J:if(d===js||d==="/"||d==="\\"||d==="?"||d==="#"){if(!t&&sy(s))a=Sc;else if(s===""){if(n.host="",t)return;a=mf}else{if(m=n.parseHost(s),m)return m;if(n.host==="localhost"&&(n.host=""),t)return;s="",a=mf}continue}else s+=d;break;case mf:if(n.isSpecial()){if(a=Sc,d!=="/"&&d!=="\\")continue}else if(!t&&d==="?")n.query="",a=vm;else if(!t&&d==="#")n.fragment="",a=Nd;else if(d!==js&&(a=Sc,d!=="/"))continue;break;case Sc:if(d===js||d==="/"||d==="\\"&&n.isSpecial()||!t&&(d==="?"||d==="#")){if(oNe(s)?(n.shortenPath(),d!=="/"&&!(d==="\\"&&n.isSpecial())&&pf(n.path,"")):aNe(s)?d!=="/"&&!(d==="\\"&&n.isSpecial())&&pf(n.path,""):(n.scheme==="file"&&!n.path.length&&sy(s)&&(n.host&&(n.host=""),s=Ds(s,0)+":"),pf(n.path,s)),s="",n.scheme==="file"&&(d===js||d==="?"||d==="#"))for(;n.path.length>1&&n.path[0]==="";)JEe(n.path);d==="?"?(n.query="",a=vm):d==="#"&&(n.fragment="",a=Nd)}else s+=hg(d,L1t);break;case X1t:d==="?"?(n.query="",a=vm):d==="#"?(n.fragment="",a=Nd):d!==js&&(n.path[0]+=hg(d,JX));break;case vm:!t&&d==="#"?(n.fragment="",a=Nd):d!==js&&(d==="'"&&n.isSpecial()?n.query+="%27":d==="#"?n.query+="%23":n.query+=hg(d,JX));break;case Nd:d!==js&&(n.fragment+=hg(d,S1t));break}o++}},parseHost:function(e){var t,r,n;if(Ds(e,0)==="["){if(Ds(e,e.length-1)!=="]"||(t=rNe(ly(e,1,-1)),!t))return Im;this.host=t}else if(this.isSpecial()){if(e=LEe(e),Yl(KEe,e)||(t=iNe(e),t===null))return Im;this.host=t}else{if(Yl(qEe,e))return Im;for(t="",r=hf(e),n=0;n1?arguments[1]:void 0,a=YEe(r,new lH(t,!1,n));aH||(r.href=a.serialize(),r.origin=a.getOrigin(),r.protocol=a.getProtocol(),r.username=a.getUsername(),r.password=a.getPassword(),r.host=a.getHost(),r.hostname=a.getHostname(),r.port=a.getPort(),r.pathname=a.getPathname(),r.search=a.getSearch(),r.searchParams=a.getSearchParams(),r.hash=a.getHash())},Io=bf.prototype,zs=function(e,t){return{get:function(){return _X(this)[e]()},set:t&&function(r){return _X(this)[t](r)},configurable:!0,enumerable:!0}};aH&&(_s(Io,"href",zs("serialize","setHref")),_s(Io,"origin",zs("getOrigin")),_s(Io,"protocol",zs("getProtocol","setProtocol")),_s(Io,"username",zs("getUsername","setUsername")),_s(Io,"password",zs("getPassword","setPassword")),_s(Io,"host",zs("getHost","setHost")),_s(Io,"hostname",zs("getHostname","setHostname")),_s(Io,"port",zs("getPort","setPort")),_s(Io,"pathname",zs("getPathname","setPathname")),_s(Io,"search",zs("getSearch","setSearch")),_s(Io,"searchParams",zs("getSearchParams")),_s(Io,"hash",zs("getHash","setHash")));HX(Io,"toJSON",function(){return _X(this).serialize()},{enumerable:!0});HX(Io,"toString",function(){return _X(this).serialize()},{enumerable:!0});ny&&(tH=ny.createObjectURL,eH=ny.revokeObjectURL,tH&&HX(bf,"createObjectURL",I1t(tH,ny)),eH&&HX(bf,"revokeObjectURL",I1t(eH,ny)));var tH,eH;wEe(bf,"URL");FEe({global:!0,constructor:!0,forced:!VEe,sham:!aH},{URL:bf})});var U1t=k(()=>{"use strict";w1t()});var N1t=k(()=>{"use strict";var sNe=Ut(),lNe=Mi(),E1t=we(),cNe=ps(),Y1t=Li(),dNe=ty(),cH=lNe("URL"),uNe=dNe&&E1t(function(){cH.canParse()}),gNe=E1t(function(){return cH.canParse.length!==1});sNe({target:"URL",stat:!0,forced:!uNe||gNe},{canParse:function(t){var r=cNe(arguments.length,1),n=Y1t(t),a=r<2||arguments[1]===void 0?void 0:Y1t(arguments[1]);try{return!!new cH(n,a)}catch{return!1}}})});var Q1t=k(()=>{"use strict";var hNe=Ut(),mNe=Mi(),pNe=ps(),O1t=Li(),bNe=ty(),fNe=mNe("URL");hNe({target:"URL",stat:!0,forced:!bNe},{parse:function(t){var r=pNe(arguments.length,1),n=O1t(t),a=r<2||arguments[1]===void 0?void 0:O1t(arguments[1]);try{return new fNe(n,a)}catch{return null}}})});var T1t=k(()=>{"use strict";var INe=Ut(),vNe=si();INe({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return vNe(URL.prototype.toString,this)}})});var J1t=k(()=>{"use strict";TJ()});var z1t=k(()=>{"use strict";var GNe=Rr(),DX=Qe(),H1t=Li(),yNe=ps(),j1t=URLSearchParams,MX=j1t.prototype,CNe=DX(MX.append),_1t=DX(MX.delete),xNe=DX(MX.forEach),ZNe=DX([].push),dH=new j1t("a=1&a=2&b=3");dH.delete("a",1);dH.delete("b",void 0);dH+""!="a=2"&&GNe(MX,"delete",function(e){var t=arguments.length,r=t<2?void 0:arguments[1];if(t&&r===void 0)return _1t(this,e);var n=[];xNe(this,function(d,h){ZNe(n,{key:h,value:d})}),yNe(t,1);for(var a=H1t(e),o=H1t(r),s=0,l=0,c=!1,u=n.length,g;s{"use strict";var RNe=Rr(),M1t=Qe(),ANe=Li(),BNe=ps(),P1t=URLSearchParams,uH=P1t.prototype,XNe=M1t(uH.getAll),WNe=M1t(uH.has),D1t=new P1t("a=1");(D1t.has("a",2)||!D1t.has("a",void 0))&&RNe(uH,"has",function(t){var r=arguments.length,n=r<2?void 0:arguments[1];if(r&&n===void 0)return WNe(this,t);var a=XNe(this,t);BNe(r,1);for(var o=ANe(n),s=0;s{"use strict";var FNe=bi(),VNe=Qe(),kNe=vn(),gH=URLSearchParams.prototype,SNe=VNe(gH.forEach);FNe&&!("size"in gH)&&kNe(gH,"size",{get:function(){var t=0;return SNe(this,function(){t++}),t},configurable:!0,enumerable:!0})});var tCt=k((sWi,$1t)=>{"use strict";cet();bet();fet();Iet();vet();Get();yet();Cet();xet();Zet();Ret();Aet();Bet();Xet();Wet();Fet();Vet();nit();lit();hit();Fit();Lit();Yit();Nit();jit();Pit();qit();ert();irt();nrt();ort();crt();drt();hrt();mrt();frt();Art();Brt();Wrt();Frt();Nv();Krt();ent();int();nnt();ant();hnt();pnt();fnt();Gnt();ynt();Ynt();Ont();Tnt();Jnt();jnt();znt();Dnt();Mnt();Pnt();Knt();Bat();Nat();_at();zat();qat();rot();cot();Rot();Bot();Xot();Fot();Sot();Lot();Hot();_ot();Pot();tst();dst();gst();Ist();yst();Rst();Ast();kst();Hst();zst();tlt();elt();alt();olt();dlt();ult();glt();blt();vlt();Glt();Rlt();Alt();Blt();wlt();Qlt();cN();Tlt();nct();lct();dct();uct();mct();fct();vct();Gct();yct();Zct();Act();Bct();Xct();Fct();kct();Lct();wct();Uct();Yct();Oct();_ct();Dct();Mct();Pct();sdt();ldt();udt();hdt();mdt();pdt();bdt();fdt();xdt();Vdt();Udt();Tdt();_dt();Pdt();Kdt();tut();iut();nut();aut();uut();gut();hut();but();fut();Iut();Gut();Cut();xut();Rut();But();Wut();Vut();Sut();Lut();wut();Uut();Qut();Tut();Jut();jut();zut();Mut();Kut();ght();hht();pht();vht();Cht();xht();tmt();lmt();gmt();hmt();Gmt();xmt();Zmt();Xmt();Wmt();Fmt();Vmt();kmt();Smt();Lmt();Nmt();Qmt();Tmt();spt();mpt();bpt();wB();ypt();xpt();Apt();Fpt();kpt();rbt();sbt();dbt();hbt();bbt();Gbt();xbt();Zbt();Xbt();Sbt();ST();Ybt();Nbt();LT();$bt();cft();uft();gft();bft();fft();Cft();Rft();Xft();Sft();Uft();Eft();Tft();jft();Kft();i0t();o0t();s0t();l0t();c0t();d0t();u0t();g0t();h0t();m0t();p0t();b0t();f0t();I0t();j0t();z0t();D0t();M0t();P0t();K0t();q0t();$0t();tIt();iIt();nIt();oIt();lIt();uIt();hIt();pIt();fIt();vIt();yIt();CIt();ZIt();AIt();VIt();SIt();wIt();YIt();NIt();QIt();JIt();_It();KIt();qIt();tvt();ovt();lvt();hvt();mvt();pvt();fvt();vvt();Fvt();wvt();Yvt();Evt();Ovt();Qvt();jvt();sGt();dGt();mGt();bGt();xGt();XGt();wGt();OGt();qGt();ayt();syt();byt();fyt();vyt();Fyt();Yyt();U1t();N1t();Q1t();T1t();J1t();z1t();K1t();q1t();$1t.exports=xv()});var Ps=k((lWi,eCt)=>{var LNe=Array.isArray;eCt.exports=LNe});var hH=k((cWi,iCt)=>{var wNe=typeof global=="object"&&global&&global.Object===Object&&global;iCt.exports=wNe});var El=k((dWi,rCt)=>{var UNe=hH(),YNe=typeof self=="object"&&self&&self.Object===Object&&self,ENe=UNe||YNe||Function("return this")();rCt.exports=ENe});var ff=k((uWi,nCt)=>{var NNe=El(),ONe=NNe.Symbol;nCt.exports=ONe});var lCt=k((gWi,sCt)=>{var aCt=ff(),oCt=Object.prototype,QNe=oCt.hasOwnProperty,TNe=oCt.toString,cy=aCt?aCt.toStringTag:void 0;function JNe(e){var t=QNe.call(e,cy),r=e[cy];try{e[cy]=void 0;var n=!0}catch{}var a=TNe.call(e);return n&&(t?e[cy]=r:delete e[cy]),a}sCt.exports=JNe});var dCt=k((hWi,cCt)=>{var HNe=Object.prototype,_Ne=HNe.toString;function jNe(e){return _Ne.call(e)}cCt.exports=jNe});var Gm=k((mWi,hCt)=>{var uCt=ff(),zNe=lCt(),DNe=dCt(),MNe="[object Null]",PNe="[object Undefined]",gCt=uCt?uCt.toStringTag:void 0;function KNe(e){return e==null?e===void 0?PNe:MNe:gCt&&gCt in Object(e)?zNe(e):DNe(e)}hCt.exports=KNe});var mg=k((pWi,mCt)=>{function qNe(e){return e!=null&&typeof e=="object"}mCt.exports=qNe});var If=k((bWi,pCt)=>{var $Ne=Gm(),tOe=mg(),eOe="[object Symbol]";function iOe(e){return typeof e=="symbol"||tOe(e)&&$Ne(e)==eOe}pCt.exports=iOe});var PX=k((fWi,bCt)=>{var rOe=Ps(),nOe=If(),aOe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oOe=/^\w*$/;function sOe(e,t){if(rOe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||nOe(e)?!0:oOe.test(e)||!aOe.test(e)||t!=null&&e in Object(t)}bCt.exports=sOe});var Lc=k((IWi,fCt)=>{function lOe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}fCt.exports=lOe});var KX=k((vWi,ICt)=>{var cOe=Gm(),dOe=Lc(),uOe="[object AsyncFunction]",gOe="[object Function]",hOe="[object GeneratorFunction]",mOe="[object Proxy]";function pOe(e){if(!dOe(e))return!1;var t=cOe(e);return t==gOe||t==hOe||t==uOe||t==mOe}ICt.exports=pOe});var GCt=k((GWi,vCt)=>{var bOe=El(),fOe=bOe["__core-js_shared__"];vCt.exports=fOe});var xCt=k((yWi,CCt)=>{var mH=GCt(),yCt=(function(){var e=/[^.]+$/.exec(mH&&mH.keys&&mH.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function IOe(e){return!!yCt&&yCt in e}CCt.exports=IOe});var pH=k((CWi,ZCt)=>{var vOe=Function.prototype,GOe=vOe.toString;function yOe(e){if(e!=null){try{return GOe.call(e)}catch{}try{return e+""}catch{}}return""}ZCt.exports=yOe});var ACt=k((xWi,RCt)=>{var COe=KX(),xOe=xCt(),ZOe=Lc(),ROe=pH(),AOe=/[\\^$.*+?()[\]{}|]/g,BOe=/^\[object .+?Constructor\]$/,XOe=Function.prototype,WOe=Object.prototype,FOe=XOe.toString,VOe=WOe.hasOwnProperty,kOe=RegExp("^"+FOe.call(VOe).replace(AOe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function SOe(e){if(!ZOe(e)||xOe(e))return!1;var t=COe(e)?kOe:BOe;return t.test(ROe(e))}RCt.exports=SOe});var XCt=k((ZWi,BCt)=>{function LOe(e,t){return e?.[t]}BCt.exports=LOe});var pg=k((RWi,WCt)=>{var wOe=ACt(),UOe=XCt();function YOe(e,t){var r=UOe(e,t);return wOe(r)?r:void 0}WCt.exports=YOe});var dy=k((AWi,FCt)=>{var EOe=pg(),NOe=EOe(Object,"create");FCt.exports=NOe});var SCt=k((BWi,kCt)=>{var VCt=dy();function OOe(){this.__data__=VCt?VCt(null):{},this.size=0}kCt.exports=OOe});var wCt=k((XWi,LCt)=>{function QOe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}LCt.exports=QOe});var YCt=k((WWi,UCt)=>{var TOe=dy(),JOe="__lodash_hash_undefined__",HOe=Object.prototype,_Oe=HOe.hasOwnProperty;function jOe(e){var t=this.__data__;if(TOe){var r=t[e];return r===JOe?void 0:r}return _Oe.call(t,e)?t[e]:void 0}UCt.exports=jOe});var NCt=k((FWi,ECt)=>{var zOe=dy(),DOe=Object.prototype,MOe=DOe.hasOwnProperty;function POe(e){var t=this.__data__;return zOe?t[e]!==void 0:MOe.call(t,e)}ECt.exports=POe});var QCt=k((VWi,OCt)=>{var KOe=dy(),qOe="__lodash_hash_undefined__";function $Oe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=KOe&&t===void 0?qOe:t,this}OCt.exports=$Oe});var JCt=k((kWi,TCt)=>{var tQe=SCt(),eQe=wCt(),iQe=YCt(),rQe=NCt(),nQe=QCt();function vf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{function aQe(){this.__data__=[],this.size=0}HCt.exports=aQe});var Gf=k((LWi,jCt)=>{function oQe(e,t){return e===t||e!==e&&t!==t}jCt.exports=oQe});var uy=k((wWi,zCt)=>{var sQe=Gf();function lQe(e,t){for(var r=e.length;r--;)if(sQe(e[r][0],t))return r;return-1}zCt.exports=lQe});var MCt=k((UWi,DCt)=>{var cQe=uy(),dQe=Array.prototype,uQe=dQe.splice;function gQe(e){var t=this.__data__,r=cQe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():uQe.call(t,r,1),--this.size,!0}DCt.exports=gQe});var KCt=k((YWi,PCt)=>{var hQe=uy();function mQe(e){var t=this.__data__,r=hQe(t,e);return r<0?void 0:t[r][1]}PCt.exports=mQe});var $Ct=k((EWi,qCt)=>{var pQe=uy();function bQe(e){return pQe(this.__data__,e)>-1}qCt.exports=bQe});var ext=k((NWi,txt)=>{var fQe=uy();function IQe(e,t){var r=this.__data__,n=fQe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}txt.exports=IQe});var gy=k((OWi,ixt)=>{var vQe=_Ct(),GQe=MCt(),yQe=KCt(),CQe=$Ct(),xQe=ext();function yf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{var ZQe=pg(),RQe=El(),AQe=ZQe(RQe,"Map");rxt.exports=AQe});var oxt=k((TWi,axt)=>{var nxt=JCt(),BQe=gy(),XQe=qX();function WQe(){this.size=0,this.__data__={hash:new nxt,map:new(XQe||BQe),string:new nxt}}axt.exports=WQe});var lxt=k((JWi,sxt)=>{function FQe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}sxt.exports=FQe});var hy=k((HWi,cxt)=>{var VQe=lxt();function kQe(e,t){var r=e.__data__;return VQe(t)?r[typeof t=="string"?"string":"hash"]:r.map}cxt.exports=kQe});var uxt=k((_Wi,dxt)=>{var SQe=hy();function LQe(e){var t=SQe(this,e).delete(e);return this.size-=t?1:0,t}dxt.exports=LQe});var hxt=k((jWi,gxt)=>{var wQe=hy();function UQe(e){return wQe(this,e).get(e)}gxt.exports=UQe});var pxt=k((zWi,mxt)=>{var YQe=hy();function EQe(e){return YQe(this,e).has(e)}mxt.exports=EQe});var fxt=k((DWi,bxt)=>{var NQe=hy();function OQe(e,t){var r=NQe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}bxt.exports=OQe});var $X=k((MWi,Ixt)=>{var QQe=oxt(),TQe=uxt(),JQe=hxt(),HQe=pxt(),_Qe=fxt();function Cf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{var vxt=$X(),jQe="Expected a function";function bH(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(jQe);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var s=e.apply(this,n);return r.cache=o.set(a,s)||o,s};return r.cache=new(bH.Cache||vxt),r}bH.Cache=vxt;Gxt.exports=bH});var xxt=k((KWi,Cxt)=>{var zQe=yxt(),DQe=500;function MQe(e){var t=zQe(e,function(n){return r.size===DQe&&r.clear(),n}),r=t.cache;return t}Cxt.exports=MQe});var Rxt=k((qWi,Zxt)=>{var PQe=xxt(),KQe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qQe=/\\(\\)?/g,$Qe=PQe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(KQe,function(r,n,a,o){t.push(a?o.replace(qQe,"$1"):n||r)}),t});Zxt.exports=$Qe});var fH=k(($Wi,Axt)=>{function t5e(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r{var Bxt=ff(),e5e=fH(),i5e=Ps(),r5e=If(),n5e=1/0,Xxt=Bxt?Bxt.prototype:void 0,Wxt=Xxt?Xxt.toString:void 0;function Fxt(e){if(typeof e=="string")return e;if(i5e(e))return e5e(e,Fxt)+"";if(r5e(e))return Wxt?Wxt.call(e):"";var t=e+"";return t=="0"&&1/e==-n5e?"-0":t}Vxt.exports=Fxt});var ym=k((eFi,Sxt)=>{var a5e=kxt();function o5e(e){return e==null?"":a5e(e)}Sxt.exports=o5e});var IH=k((iFi,Lxt)=>{var s5e=Ps(),l5e=PX(),c5e=Rxt(),d5e=ym();function u5e(e,t){return s5e(e)?e:l5e(e,t)?[e]:c5e(d5e(e))}Lxt.exports=u5e});var my=k((rFi,wxt)=>{var g5e=If(),h5e=1/0;function m5e(e){if(typeof e=="string"||g5e(e))return e;var t=e+"";return t=="0"&&1/e==-h5e?"-0":t}wxt.exports=m5e});var tW=k((nFi,Uxt)=>{var p5e=IH(),b5e=my();function f5e(e,t){t=p5e(t,e);for(var r=0,n=t.length;e!=null&&r{var I5e=tW();function v5e(e,t,r){var n=e==null?void 0:I5e(e,t);return n===void 0?r:n}Yxt.exports=v5e});var Nxt=k((oFi,Ext)=>{var G5e=Object.prototype,y5e=G5e.hasOwnProperty;function C5e(e,t){return e!=null&&y5e.call(e,t)}Ext.exports=C5e});var Qxt=k((sFi,Oxt)=>{var x5e=Gm(),Z5e=mg(),R5e="[object Arguments]";function A5e(e){return Z5e(e)&&x5e(e)==R5e}Oxt.exports=A5e});var py=k((lFi,Hxt)=>{var Txt=Qxt(),B5e=mg(),Jxt=Object.prototype,X5e=Jxt.hasOwnProperty,W5e=Jxt.propertyIsEnumerable,F5e=Txt((function(){return arguments})())?Txt:function(e){return B5e(e)&&X5e.call(e,"callee")&&!W5e.call(e,"callee")};Hxt.exports=F5e});var eW=k((cFi,_xt)=>{var V5e=9007199254740991,k5e=/^(?:0|[1-9]\d*)$/;function S5e(e,t){var r=typeof e;return t=t??V5e,!!t&&(r=="number"||r!="symbol"&&k5e.test(e))&&e>-1&&e%1==0&&e{var L5e=9007199254740991;function w5e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=L5e}jxt.exports=w5e});var GH=k((uFi,zxt)=>{var U5e=IH(),Y5e=py(),E5e=Ps(),N5e=eW(),O5e=iW(),Q5e=my();function T5e(e,t,r){t=U5e(t,e);for(var n=-1,a=t.length,o=!1;++n{var J5e=Nxt(),H5e=GH();function _5e(e,t){return e!=null&&H5e(e,t,J5e)}Dxt.exports=_5e});var Kxt=k((hFi,Pxt)=>{var j5e=gy();function z5e(){this.__data__=new j5e,this.size=0}Pxt.exports=z5e});var $xt=k((mFi,qxt)=>{function D5e(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}qxt.exports=D5e});var eZt=k((pFi,tZt)=>{function M5e(e){return this.__data__.get(e)}tZt.exports=M5e});var rZt=k((bFi,iZt)=>{function P5e(e){return this.__data__.has(e)}iZt.exports=P5e});var aZt=k((fFi,nZt)=>{var K5e=gy(),q5e=qX(),$5e=$X(),tTe=200;function eTe(e,t){var r=this.__data__;if(r instanceof K5e){var n=r.__data__;if(!q5e||n.length{var iTe=gy(),rTe=Kxt(),nTe=$xt(),aTe=eZt(),oTe=rZt(),sTe=aZt();function xf(e){var t=this.__data__=new iTe(e);this.size=t.size}xf.prototype.clear=rTe;xf.prototype.delete=nTe;xf.prototype.get=aTe;xf.prototype.has=oTe;xf.prototype.set=sTe;oZt.exports=xf});var yH=k((vFi,sZt)=>{var lTe=pg(),cTe=(function(){try{var e=lTe(Object,"defineProperty");return e({},"",{}),e}catch{}})();sZt.exports=cTe});var nW=k((GFi,cZt)=>{var lZt=yH();function dTe(e,t,r){t=="__proto__"&&lZt?lZt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}cZt.exports=dTe});var CH=k((yFi,dZt)=>{var uTe=nW(),gTe=Gf();function hTe(e,t,r){(r!==void 0&&!gTe(e[t],r)||r===void 0&&!(t in e))&&uTe(e,t,r)}dZt.exports=hTe});var gZt=k((CFi,uZt)=>{function mTe(e){return function(t,r,n){for(var a=-1,o=Object(t),s=n(t),l=s.length;l--;){var c=s[e?l:++a];if(r(o[c],c,o)===!1)break}return t}}uZt.exports=mTe});var xH=k((xFi,hZt)=>{var pTe=gZt(),bTe=pTe();hZt.exports=bTe});var IZt=k((by,Zf)=>{var fTe=El(),fZt=typeof by=="object"&&by&&!by.nodeType&&by,mZt=fZt&&typeof Zf=="object"&&Zf&&!Zf.nodeType&&Zf,ITe=mZt&&mZt.exports===fZt,pZt=ITe?fTe.Buffer:void 0,bZt=pZt?pZt.allocUnsafe:void 0;function vTe(e,t){if(t)return e.slice();var r=e.length,n=bZt?bZt(r):new e.constructor(r);return e.copy(n),n}Zf.exports=vTe});var ZH=k((ZFi,vZt)=>{var GTe=El(),yTe=GTe.Uint8Array;vZt.exports=yTe});var CZt=k((RFi,yZt)=>{var GZt=ZH();function CTe(e){var t=new e.constructor(e.byteLength);return new GZt(t).set(new GZt(e)),t}yZt.exports=CTe});var ZZt=k((AFi,xZt)=>{var xTe=CZt();function ZTe(e,t){var r=t?xTe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}xZt.exports=ZTe});var AZt=k((BFi,RZt)=>{function RTe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r{var ATe=Lc(),BZt=Object.create,BTe=(function(){function e(){}return function(t){if(!ATe(t))return{};if(BZt)return BZt(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();XZt.exports=BTe});var RH=k((WFi,FZt)=>{function XTe(e,t){return function(r){return e(t(r))}}FZt.exports=XTe});var AH=k((FFi,VZt)=>{var WTe=RH(),FTe=WTe(Object.getPrototypeOf,Object);VZt.exports=FTe});var aW=k((VFi,kZt)=>{var VTe=Object.prototype;function kTe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||VTe;return e===r}kZt.exports=kTe});var LZt=k((kFi,SZt)=>{var STe=WZt(),LTe=AH(),wTe=aW();function UTe(e){return typeof e.constructor=="function"&&!wTe(e)?STe(LTe(e)):{}}SZt.exports=UTe});var Cm=k((SFi,wZt)=>{var YTe=KX(),ETe=iW();function NTe(e){return e!=null&&ETe(e.length)&&!YTe(e)}wZt.exports=NTe});var YZt=k((LFi,UZt)=>{var OTe=Cm(),QTe=mg();function TTe(e){return QTe(e)&&OTe(e)}UZt.exports=TTe});var NZt=k((wFi,EZt)=>{function JTe(){return!1}EZt.exports=JTe});var oW=k((fy,Rf)=>{var HTe=El(),_Te=NZt(),TZt=typeof fy=="object"&&fy&&!fy.nodeType&&fy,OZt=TZt&&typeof Rf=="object"&&Rf&&!Rf.nodeType&&Rf,jTe=OZt&&OZt.exports===TZt,QZt=jTe?HTe.Buffer:void 0,zTe=QZt?QZt.isBuffer:void 0,DTe=zTe||_Te;Rf.exports=DTe});var _Zt=k((UFi,HZt)=>{var MTe=Gm(),PTe=AH(),KTe=mg(),qTe="[object Object]",$Te=Function.prototype,t4e=Object.prototype,JZt=$Te.toString,e4e=t4e.hasOwnProperty,i4e=JZt.call(Object);function r4e(e){if(!KTe(e)||MTe(e)!=qTe)return!1;var t=PTe(e);if(t===null)return!0;var r=e4e.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&JZt.call(r)==i4e}HZt.exports=r4e});var zZt=k((YFi,jZt)=>{var n4e=Gm(),a4e=iW(),o4e=mg(),s4e="[object Arguments]",l4e="[object Array]",c4e="[object Boolean]",d4e="[object Date]",u4e="[object Error]",g4e="[object Function]",h4e="[object Map]",m4e="[object Number]",p4e="[object Object]",b4e="[object RegExp]",f4e="[object Set]",I4e="[object String]",v4e="[object WeakMap]",G4e="[object ArrayBuffer]",y4e="[object DataView]",C4e="[object Float32Array]",x4e="[object Float64Array]",Z4e="[object Int8Array]",R4e="[object Int16Array]",A4e="[object Int32Array]",B4e="[object Uint8Array]",X4e="[object Uint8ClampedArray]",W4e="[object Uint16Array]",F4e="[object Uint32Array]",Dr={};Dr[C4e]=Dr[x4e]=Dr[Z4e]=Dr[R4e]=Dr[A4e]=Dr[B4e]=Dr[X4e]=Dr[W4e]=Dr[F4e]=!0;Dr[s4e]=Dr[l4e]=Dr[G4e]=Dr[c4e]=Dr[y4e]=Dr[d4e]=Dr[u4e]=Dr[g4e]=Dr[h4e]=Dr[m4e]=Dr[p4e]=Dr[b4e]=Dr[f4e]=Dr[I4e]=Dr[v4e]=!1;function V4e(e){return o4e(e)&&a4e(e.length)&&!!Dr[n4e(e)]}jZt.exports=V4e});var BH=k((EFi,DZt)=>{function k4e(e){return function(t){return e(t)}}DZt.exports=k4e});var PZt=k((Iy,Af)=>{var S4e=hH(),MZt=typeof Iy=="object"&&Iy&&!Iy.nodeType&&Iy,vy=MZt&&typeof Af=="object"&&Af&&!Af.nodeType&&Af,L4e=vy&&vy.exports===MZt,XH=L4e&&S4e.process,w4e=(function(){try{var e=vy&&vy.require&&vy.require("util").types;return e||XH&&XH.binding&&XH.binding("util")}catch{}})();Af.exports=w4e});var sW=k((NFi,$Zt)=>{var U4e=zZt(),Y4e=BH(),KZt=PZt(),qZt=KZt&&KZt.isTypedArray,E4e=qZt?Y4e(qZt):U4e;$Zt.exports=E4e});var WH=k((OFi,tRt)=>{function N4e(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}tRt.exports=N4e});var FH=k((QFi,eRt)=>{var O4e=nW(),Q4e=Gf(),T4e=Object.prototype,J4e=T4e.hasOwnProperty;function H4e(e,t,r){var n=e[t];(!(J4e.call(e,t)&&Q4e(n,r))||r===void 0&&!(t in e))&&O4e(e,t,r)}eRt.exports=H4e});var rRt=k((TFi,iRt)=>{var _4e=FH(),j4e=nW();function z4e(e,t,r,n){var a=!r;r||(r={});for(var o=-1,s=t.length;++o{function D4e(e,t){for(var r=-1,n=Array(e);++r{var M4e=aRt(),P4e=py(),K4e=Ps(),q4e=oW(),$4e=eW(),tJe=sW(),eJe=Object.prototype,iJe=eJe.hasOwnProperty;function rJe(e,t){var r=K4e(e),n=!r&&P4e(e),a=!r&&!n&&q4e(e),o=!r&&!n&&!a&&tJe(e),s=r||n||a||o,l=s?M4e(e.length,String):[],c=l.length;for(var u in e)(t||iJe.call(e,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||$4e(u,c)))&&l.push(u);return l}oRt.exports=rJe});var lRt=k((_Fi,sRt)=>{function nJe(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}sRt.exports=nJe});var dRt=k((jFi,cRt)=>{var aJe=Lc(),oJe=aW(),sJe=lRt(),lJe=Object.prototype,cJe=lJe.hasOwnProperty;function dJe(e){if(!aJe(e))return sJe(e);var t=oJe(e),r=[];for(var n in e)n=="constructor"&&(t||!cJe.call(e,n))||r.push(n);return r}cRt.exports=dJe});var kH=k((zFi,uRt)=>{var uJe=VH(),gJe=dRt(),hJe=Cm();function mJe(e){return hJe(e)?uJe(e,!0):gJe(e)}uRt.exports=mJe});var hRt=k((DFi,gRt)=>{var pJe=rRt(),bJe=kH();function fJe(e){return pJe(e,bJe(e))}gRt.exports=fJe});var vRt=k((MFi,IRt)=>{var mRt=CH(),IJe=IZt(),vJe=ZZt(),GJe=AZt(),yJe=LZt(),pRt=py(),bRt=Ps(),CJe=YZt(),xJe=oW(),ZJe=KX(),RJe=Lc(),AJe=_Zt(),BJe=sW(),fRt=WH(),XJe=hRt();function WJe(e,t,r,n,a,o,s){var l=fRt(e,r),c=fRt(t,r),u=s.get(c);if(u){mRt(e,r,u);return}var g=o?o(l,c,r+"",e,t,s):void 0,d=g===void 0;if(d){var h=bRt(c),m=!h&&xJe(c),p=!h&&!m&&BJe(c);g=c,h||m||p?bRt(l)?g=l:CJe(l)?g=GJe(l):m?(d=!1,g=IJe(c,!0)):p?(d=!1,g=vJe(c,!0)):g=[]:AJe(c)||pRt(c)?(g=l,pRt(l)?g=XJe(l):(!RJe(l)||ZJe(l))&&(g=yJe(c))):d=!1}d&&(s.set(c,g),a(g,c,n,o,s),s.delete(c)),mRt(e,r,g)}IRt.exports=WJe});var CRt=k((PFi,yRt)=>{var FJe=rW(),VJe=CH(),kJe=xH(),SJe=vRt(),LJe=Lc(),wJe=kH(),UJe=WH();function GRt(e,t,r,n,a){e!==t&&kJe(t,function(o,s){if(a||(a=new FJe),LJe(o))SJe(e,t,s,r,GRt,n,a);else{var l=n?n(UJe(e,s),o,s+"",e,t,a):void 0;l===void 0&&(l=o),VJe(e,s,l)}},wJe)}yRt.exports=GRt});var Gy=k((KFi,xRt)=>{function YJe(e){return e}xRt.exports=YJe});var RRt=k((qFi,ZRt)=>{function EJe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}ZRt.exports=EJe});var XRt=k(($Fi,BRt)=>{var NJe=RRt(),ARt=Math.max;function OJe(e,t,r){return t=ARt(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,o=ARt(n.length-t,0),s=Array(o);++a{function QJe(e){return function(){return e}}WRt.exports=QJe});var SRt=k((eVi,kRt)=>{var TJe=FRt(),VRt=yH(),JJe=Gy(),HJe=VRt?function(e,t){return VRt(e,"toString",{configurable:!0,enumerable:!1,value:TJe(t),writable:!0})}:JJe;kRt.exports=HJe});var wRt=k((iVi,LRt)=>{var _Je=800,jJe=16,zJe=Date.now;function DJe(e){var t=0,r=0;return function(){var n=zJe(),a=jJe-(n-r);if(r=n,a>0){if(++t>=_Je)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}LRt.exports=DJe});var YRt=k((rVi,URt)=>{var MJe=SRt(),PJe=wRt(),KJe=PJe(MJe);URt.exports=KJe});var SH=k((nVi,ERt)=>{var qJe=Gy(),$Je=XRt(),tHe=YRt();function eHe(e,t){return tHe($Je(e,t,qJe),e+"")}ERt.exports=eHe});var yy=k((aVi,NRt)=>{var iHe=Gf(),rHe=Cm(),nHe=eW(),aHe=Lc();function oHe(e,t,r){if(!aHe(r))return!1;var n=typeof t;return(n=="number"?rHe(r)&&nHe(t,r.length):n=="string"&&t in r)?iHe(r[t],e):!1}NRt.exports=oHe});var QRt=k((oVi,ORt)=>{var sHe=SH(),lHe=yy();function cHe(e){return sHe(function(t,r){var n=-1,a=r.length,o=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(a--,o):void 0,s&&lHe(r[0],r[1],s)&&(o=a<3?void 0:o,a=1),t=Object(t);++n{var dHe=CRt(),uHe=QRt(),gHe=uHe(function(e,t,r){dHe(e,t,r)});TRt.exports=gHe});var _Rt=k((lVi,HRt)=>{var hHe="__lodash_hash_undefined__";function mHe(e){return this.__data__.set(e,hHe),this}HRt.exports=mHe});var zRt=k((cVi,jRt)=>{function pHe(e){return this.__data__.has(e)}jRt.exports=pHe});var LH=k((dVi,DRt)=>{var bHe=$X(),fHe=_Rt(),IHe=zRt();function lW(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new bHe;++t{function vHe(e,t,r,n){for(var a=e.length,o=r+(n?1:-1);n?o--:++o{function GHe(e){return e!==e}KRt.exports=GHe});var tAt=k((hVi,$Rt)=>{function yHe(e,t,r){for(var n=r-1,a=e.length;++n{var CHe=PRt(),xHe=qRt(),ZHe=tAt();function RHe(e,t,r){return t===t?ZHe(e,t,r):CHe(e,xHe,r)}eAt.exports=RHe});var nAt=k((pVi,rAt)=>{var AHe=iAt();function BHe(e,t){var r=e==null?0:e.length;return!!r&&AHe(e,t,0)>-1}rAt.exports=BHe});var oAt=k((bVi,aAt)=>{function XHe(e,t,r){for(var n=-1,a=e==null?0:e.length;++n{function WHe(e,t){return e.has(t)}sAt.exports=WHe});var UH=k((IVi,lAt)=>{var FHe=pg(),VHe=El(),kHe=FHe(VHe,"Set");lAt.exports=kHe});var dAt=k((vVi,cAt)=>{function SHe(){}cAt.exports=SHe});var cW=k((GVi,uAt)=>{function LHe(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}uAt.exports=LHe});var hAt=k((yVi,gAt)=>{var YH=UH(),wHe=dAt(),UHe=cW(),YHe=1/0,EHe=YH&&1/UHe(new YH([,-0]))[1]==YHe?function(e){return new YH(e)}:wHe;gAt.exports=EHe});var pAt=k((CVi,mAt)=>{var NHe=LH(),OHe=nAt(),QHe=oAt(),THe=wH(),JHe=hAt(),HHe=cW(),_He=200;function jHe(e,t,r){var n=-1,a=OHe,o=e.length,s=!0,l=[],c=l;if(r)s=!1,a=QHe;else if(o>=_He){var u=t?null:JHe(e);if(u)return HHe(u);s=!1,a=THe,c=new NHe}else c=t?[]:l;t:for(;++n{var zHe=pAt();function DHe(e){return e&&e.length?zHe(e):[]}bAt.exports=DHe});var CAt=k((XVi,yAt)=>{function KHe(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(a);++n{var qHe=CAt();function $He(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:qHe(e,t,r)}xAt.exports=$He});var EH=k((FVi,RAt)=>{var t3e="\\ud800-\\udfff",e3e="\\u0300-\\u036f",i3e="\\ufe20-\\ufe2f",r3e="\\u20d0-\\u20ff",n3e=e3e+i3e+r3e,a3e="\\ufe0e\\ufe0f",o3e="\\u200d",s3e=RegExp("["+o3e+t3e+n3e+a3e+"]");function l3e(e){return s3e.test(e)}RAt.exports=l3e});var BAt=k((VVi,AAt)=>{function c3e(e){return e.split("")}AAt.exports=c3e});var wAt=k((kVi,LAt)=>{var XAt="\\ud800-\\udfff",d3e="\\u0300-\\u036f",u3e="\\ufe20-\\ufe2f",g3e="\\u20d0-\\u20ff",h3e=d3e+u3e+g3e,m3e="\\ufe0e\\ufe0f",p3e="["+XAt+"]",NH="["+h3e+"]",OH="\\ud83c[\\udffb-\\udfff]",b3e="(?:"+NH+"|"+OH+")",WAt="[^"+XAt+"]",FAt="(?:\\ud83c[\\udde6-\\uddff]){2}",VAt="[\\ud800-\\udbff][\\udc00-\\udfff]",f3e="\\u200d",kAt=b3e+"?",SAt="["+m3e+"]?",I3e="(?:"+f3e+"(?:"+[WAt,FAt,VAt].join("|")+")"+SAt+kAt+")*",v3e=SAt+kAt+I3e,G3e="(?:"+[WAt+NH+"?",NH,FAt,VAt,p3e].join("|")+")",y3e=RegExp(OH+"(?="+OH+")|"+G3e+v3e,"g");function C3e(e){return e.match(y3e)||[]}LAt.exports=C3e});var YAt=k((SVi,UAt)=>{var x3e=BAt(),Z3e=EH(),R3e=wAt();function A3e(e){return Z3e(e)?R3e(e):x3e(e)}UAt.exports=A3e});var NAt=k((LVi,EAt)=>{var B3e=ZAt(),X3e=EH(),W3e=YAt(),F3e=ym();function V3e(e){return function(t){t=F3e(t);var r=X3e(t)?W3e(t):void 0,n=r?r[0]:t.charAt(0),a=r?B3e(r,1).join(""):t.slice(1);return n[e]()+a}}EAt.exports=V3e});var QAt=k((wVi,OAt)=>{var k3e=NAt(),S3e=k3e("toUpperCase");OAt.exports=S3e});var JAt=k((UVi,TAt)=>{var L3e=ym(),w3e=QAt();function U3e(e){return w3e(L3e(e).toLowerCase())}TAt.exports=U3e});var _At=k((YVi,HAt)=>{function Y3e(e,t,r,n){var a=-1,o=e==null?0:e.length;for(n&&o&&(r=e[++a]);++a{function E3e(e){return function(t){return e?.[t]}}jAt.exports=E3e});var MAt=k((NVi,DAt)=>{var N3e=zAt(),O3e={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Q3e=N3e(O3e);DAt.exports=Q3e});var KAt=k((OVi,PAt)=>{var T3e=MAt(),J3e=ym(),H3e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_3e="\\u0300-\\u036f",j3e="\\ufe20-\\ufe2f",z3e="\\u20d0-\\u20ff",D3e=_3e+j3e+z3e,M3e="["+D3e+"]",P3e=RegExp(M3e,"g");function K3e(e){return e=J3e(e),e&&e.replace(H3e,T3e).replace(P3e,"")}PAt.exports=K3e});var $At=k((QVi,qAt)=>{var q3e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function $3e(e){return e.match(q3e)||[]}qAt.exports=$3e});var eBt=k((TVi,tBt)=>{var t9e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e9e(e){return t9e.test(e)}tBt.exports=e9e});var GBt=k((JVi,vBt)=>{var oBt="\\ud800-\\udfff",i9e="\\u0300-\\u036f",r9e="\\ufe20-\\ufe2f",n9e="\\u20d0-\\u20ff",a9e=i9e+r9e+n9e,sBt="\\u2700-\\u27bf",lBt="a-z\\xdf-\\xf6\\xf8-\\xff",o9e="\\xac\\xb1\\xd7\\xf7",s9e="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",l9e="\\u2000-\\u206f",c9e=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",cBt="A-Z\\xc0-\\xd6\\xd8-\\xde",d9e="\\ufe0e\\ufe0f",dBt=o9e+s9e+l9e+c9e,uBt="['\u2019]",iBt="["+dBt+"]",u9e="["+a9e+"]",gBt="\\d+",g9e="["+sBt+"]",hBt="["+lBt+"]",mBt="[^"+oBt+dBt+gBt+sBt+lBt+cBt+"]",h9e="\\ud83c[\\udffb-\\udfff]",m9e="(?:"+u9e+"|"+h9e+")",p9e="[^"+oBt+"]",pBt="(?:\\ud83c[\\udde6-\\uddff]){2}",bBt="[\\ud800-\\udbff][\\udc00-\\udfff]",Bf="["+cBt+"]",b9e="\\u200d",rBt="(?:"+hBt+"|"+mBt+")",f9e="(?:"+Bf+"|"+mBt+")",nBt="(?:"+uBt+"(?:d|ll|m|re|s|t|ve))?",aBt="(?:"+uBt+"(?:D|LL|M|RE|S|T|VE))?",fBt=m9e+"?",IBt="["+d9e+"]?",I9e="(?:"+b9e+"(?:"+[p9e,pBt,bBt].join("|")+")"+IBt+fBt+")*",v9e="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",G9e="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",y9e=IBt+fBt+I9e,C9e="(?:"+[g9e,pBt,bBt].join("|")+")"+y9e,x9e=RegExp([Bf+"?"+hBt+"+"+nBt+"(?="+[iBt,Bf,"$"].join("|")+")",f9e+"+"+aBt+"(?="+[iBt,Bf+rBt,"$"].join("|")+")",Bf+"?"+rBt+"+"+nBt,Bf+"+"+aBt,G9e,v9e,gBt,C9e].join("|"),"g");function Z9e(e){return e.match(x9e)||[]}vBt.exports=Z9e});var CBt=k((HVi,yBt)=>{var R9e=$At(),A9e=eBt(),B9e=ym(),X9e=GBt();function W9e(e,t,r){return e=B9e(e),t=r?void 0:t,t===void 0?A9e(e)?X9e(e):R9e(e):e.match(t)||[]}yBt.exports=W9e});var ZBt=k((_Vi,xBt)=>{var F9e=_At(),V9e=KAt(),k9e=CBt(),S9e="['\u2019]",L9e=RegExp(S9e,"g");function w9e(e){return function(t){return F9e(k9e(V9e(t).replace(L9e,"")),e,"")}}xBt.exports=w9e});var ABt=k((jVi,RBt)=>{var U9e=JAt(),Y9e=ZBt(),E9e=Y9e(function(e,t,r){return t=t.toLowerCase(),e+(r?U9e(t):t)});RBt.exports=E9e});var VBt=k((t2i,FBt)=>{var O9e=9007199254740991,Q9e=Math.floor;function T9e(e,t){var r="";if(!e||t<1||t>O9e)return r;do t%2&&(r+=e),t=Q9e(t/2),t&&(e+=e);while(t);return r}FBt.exports=T9e});var SBt=k((e2i,kBt)=>{var J9e=/\s/;function H9e(e){for(var t=e.length;t--&&J9e.test(e.charAt(t)););return t}kBt.exports=H9e});var wBt=k((i2i,LBt)=>{var _9e=SBt(),j9e=/^\s+/;function z9e(e){return e&&e.slice(0,_9e(e)+1).replace(j9e,"")}LBt.exports=z9e});var NBt=k((r2i,EBt)=>{var D9e=wBt(),UBt=Lc(),M9e=If(),YBt=NaN,P9e=/^[-+]0x[0-9a-f]+$/i,K9e=/^0b[01]+$/i,q9e=/^0o[0-7]+$/i,$9e=parseInt;function t_e(e){if(typeof e=="number")return e;if(M9e(e))return YBt;if(UBt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=UBt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=D9e(e);var r=K9e.test(e);return r||q9e.test(e)?$9e(e.slice(2),r?2:8):P9e.test(e)?YBt:+e}EBt.exports=t_e});var _H=k((n2i,QBt)=>{var e_e=NBt(),OBt=1/0,i_e=17976931348623157e292;function r_e(e){if(!e)return e===0?e:0;if(e=e_e(e),e===OBt||e===-OBt){var t=e<0?-1:1;return t*i_e}return e===e?e:0}QBt.exports=r_e});var JBt=k((a2i,TBt)=>{var n_e=_H();function a_e(e){var t=n_e(e),r=t%1;return t===t?r?t-r:t:0}TBt.exports=a_e});var _Bt=k((o2i,HBt)=>{var o_e=VBt(),s_e=yy(),l_e=JBt(),c_e=ym();function d_e(e,t,r){return(r?s_e(e,t,r):t===void 0)?t=1:t=l_e(t),o_e(c_e(e),t)}HBt.exports=d_e});var zH=k((x2i,zBt)=>{function p_e(e,t){for(var r=-1,n=t.length,a=e.length;++r{var DBt=ff(),b_e=py(),f_e=Ps(),MBt=DBt?DBt.isConcatSpreadable:void 0;function I_e(e){return f_e(e)||b_e(e)||!!(MBt&&e&&e[MBt])}PBt.exports=I_e});var tXt=k((R2i,$Bt)=>{var v_e=zH(),G_e=KBt();function qBt(e,t,r,n,a){var o=-1,s=e.length;for(r||(r=G_e),a||(a=[]);++o0&&r(l)?t>1?qBt(l,t-1,r,n,a):v_e(a,l):n||(a[a.length]=l)}return a}$Bt.exports=qBt});var iXt=k((A2i,eXt)=>{function y_e(e,t){for(var r=-1,n=e==null?0:e.length;++r{var C_e=LH(),x_e=iXt(),Z_e=wH(),R_e=1,A_e=2;function B_e(e,t,r,n,a,o){var s=r&R_e,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=o.get(e),g=o.get(t);if(u&&g)return u==t&&g==e;var d=-1,h=!0,m=r&A_e?new C_e:void 0;for(o.set(e,t),o.set(t,e);++d{function X_e(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}nXt.exports=X_e});var dXt=k((W2i,cXt)=>{var oXt=ff(),sXt=ZH(),W_e=Gf(),F_e=DH(),V_e=aXt(),k_e=cW(),S_e=1,L_e=2,w_e="[object Boolean]",U_e="[object Date]",Y_e="[object Error]",E_e="[object Map]",N_e="[object Number]",O_e="[object RegExp]",Q_e="[object Set]",T_e="[object String]",J_e="[object Symbol]",H_e="[object ArrayBuffer]",__e="[object DataView]",lXt=oXt?oXt.prototype:void 0,MH=lXt?lXt.valueOf:void 0;function j_e(e,t,r,n,a,o,s){switch(r){case __e:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case H_e:return!(e.byteLength!=t.byteLength||!o(new sXt(e),new sXt(t)));case w_e:case U_e:case N_e:return W_e(+e,+t);case Y_e:return e.name==t.name&&e.message==t.message;case O_e:case T_e:return e==t+"";case E_e:var l=V_e;case Q_e:var c=n&S_e;if(l||(l=k_e),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=L_e,s.set(e,t);var g=F_e(l(e),l(t),n,a,o,s);return s.delete(e),g;case J_e:if(MH)return MH.call(e)==MH.call(t)}return!1}cXt.exports=j_e});var gXt=k((F2i,uXt)=>{var z_e=zH(),D_e=Ps();function M_e(e,t,r){var n=t(e);return D_e(e)?n:z_e(n,r(e))}uXt.exports=M_e});var mXt=k((V2i,hXt)=>{function P_e(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r{function K_e(){return[]}pXt.exports=K_e});var vXt=k((S2i,IXt)=>{var q_e=mXt(),$_e=bXt(),t7e=Object.prototype,e7e=t7e.propertyIsEnumerable,fXt=Object.getOwnPropertySymbols,i7e=fXt?function(e){return e==null?[]:(e=Object(e),q_e(fXt(e),function(t){return e7e.call(e,t)}))}:$_e;IXt.exports=i7e});var yXt=k((L2i,GXt)=>{var r7e=RH(),n7e=r7e(Object.keys,Object);GXt.exports=n7e});var xXt=k((w2i,CXt)=>{var a7e=aW(),o7e=yXt(),s7e=Object.prototype,l7e=s7e.hasOwnProperty;function c7e(e){if(!a7e(e))return o7e(e);var t=[];for(var r in Object(e))l7e.call(e,r)&&r!="constructor"&&t.push(r);return t}CXt.exports=c7e});var hW=k((U2i,ZXt)=>{var d7e=VH(),u7e=xXt(),g7e=Cm();function h7e(e){return g7e(e)?d7e(e):u7e(e)}ZXt.exports=h7e});var AXt=k((Y2i,RXt)=>{var m7e=gXt(),p7e=vXt(),b7e=hW();function f7e(e){return m7e(e,b7e,p7e)}RXt.exports=f7e});var WXt=k((E2i,XXt)=>{var BXt=AXt(),I7e=1,v7e=Object.prototype,G7e=v7e.hasOwnProperty;function y7e(e,t,r,n,a,o){var s=r&I7e,l=BXt(e),c=l.length,u=BXt(t),g=u.length;if(c!=g&&!s)return!1;for(var d=c;d--;){var h=l[d];if(!(s?h in t:G7e.call(t,h)))return!1}var m=o.get(e),p=o.get(t);if(m&&p)return m==t&&p==e;var b=!0;o.set(e,t),o.set(t,e);for(var f=s;++d{var C7e=pg(),x7e=El(),Z7e=C7e(x7e,"DataView");FXt.exports=Z7e});var SXt=k((O2i,kXt)=>{var R7e=pg(),A7e=El(),B7e=R7e(A7e,"Promise");kXt.exports=B7e});var wXt=k((Q2i,LXt)=>{var X7e=pg(),W7e=El(),F7e=X7e(W7e,"WeakMap");LXt.exports=F7e});var JXt=k((T2i,TXt)=>{var PH=VXt(),KH=qX(),qH=SXt(),$H=UH(),t3=wXt(),QXt=Gm(),Xf=pH(),UXt="[object Map]",V7e="[object Object]",YXt="[object Promise]",EXt="[object Set]",NXt="[object WeakMap]",OXt="[object DataView]",k7e=Xf(PH),S7e=Xf(KH),L7e=Xf(qH),w7e=Xf($H),U7e=Xf(t3),Rm=QXt;(PH&&Rm(new PH(new ArrayBuffer(1)))!=OXt||KH&&Rm(new KH)!=UXt||qH&&Rm(qH.resolve())!=YXt||$H&&Rm(new $H)!=EXt||t3&&Rm(new t3)!=NXt)&&(Rm=function(e){var t=QXt(e),r=t==V7e?e.constructor:void 0,n=r?Xf(r):"";if(n)switch(n){case k7e:return OXt;case S7e:return UXt;case L7e:return YXt;case w7e:return EXt;case U7e:return NXt}return t});TXt.exports=Rm});var KXt=k((J2i,PXt)=>{var e3=rW(),Y7e=DH(),E7e=dXt(),N7e=WXt(),HXt=JXt(),_Xt=Ps(),jXt=oW(),O7e=sW(),Q7e=1,zXt="[object Arguments]",DXt="[object Array]",mW="[object Object]",T7e=Object.prototype,MXt=T7e.hasOwnProperty;function J7e(e,t,r,n,a,o){var s=_Xt(e),l=_Xt(t),c=s?DXt:HXt(e),u=l?DXt:HXt(t);c=c==zXt?mW:c,u=u==zXt?mW:u;var g=c==mW,d=u==mW,h=c==u;if(h&&jXt(e)){if(!jXt(t))return!1;s=!0,g=!1}if(h&&!g)return o||(o=new e3),s||O7e(e)?Y7e(e,t,r,n,a,o):E7e(e,t,c,r,n,a,o);if(!(r&Q7e)){var m=g&&MXt.call(e,"__wrapped__"),p=d&&MXt.call(t,"__wrapped__");if(m||p){var b=m?e.value():e,f=p?t.value():t;return o||(o=new e3),a(b,f,r,n,o)}}return h?(o||(o=new e3),N7e(e,t,r,n,a,o)):!1}PXt.exports=J7e});var i3=k((H2i,tWt)=>{var H7e=KXt(),qXt=mg();function $Xt(e,t,r,n,a){return e===t?!0:e==null||t==null||!qXt(e)&&!qXt(t)?e!==e&&t!==t:H7e(e,t,r,n,$Xt,a)}tWt.exports=$Xt});var iWt=k((_2i,eWt)=>{var _7e=rW(),j7e=i3(),z7e=1,D7e=2;function M7e(e,t,r,n){var a=r.length,o=a,s=!n;if(e==null)return!o;for(e=Object(e);a--;){var l=r[a];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a{var P7e=Lc();function K7e(e){return e===e&&!P7e(e)}rWt.exports=K7e});var aWt=k((z2i,nWt)=>{var q7e=r3(),$7e=hW();function tje(e){for(var t=$7e(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,q7e(a)]}return t}nWt.exports=tje});var n3=k((D2i,oWt)=>{function eje(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}oWt.exports=eje});var lWt=k((M2i,sWt)=>{var ije=iWt(),rje=aWt(),nje=n3();function aje(e){var t=rje(e);return t.length==1&&t[0][2]?nje(t[0][0],t[0][1]):function(r){return r===e||ije(r,e,t)}}sWt.exports=aje});var dWt=k((P2i,cWt)=>{function oje(e,t){return e!=null&&t in Object(e)}cWt.exports=oje});var gWt=k((K2i,uWt)=>{var sje=dWt(),lje=GH();function cje(e,t){return e!=null&&lje(e,t,sje)}uWt.exports=cje});var mWt=k((q2i,hWt)=>{var dje=i3(),uje=vH(),gje=gWt(),hje=PX(),mje=r3(),pje=n3(),bje=my(),fje=1,Ije=2;function vje(e,t){return hje(e)&&mje(t)?pje(bje(e),t):function(r){var n=uje(r,e);return n===void 0&&n===t?gje(r,e):dje(t,n,fje|Ije)}}hWt.exports=vje});var bWt=k(($2i,pWt)=>{function Gje(e){return function(t){return t?.[e]}}pWt.exports=Gje});var IWt=k((tki,fWt)=>{var yje=tW();function Cje(e){return function(t){return yje(t,e)}}fWt.exports=Cje});var GWt=k((eki,vWt)=>{var xje=bWt(),Zje=IWt(),Rje=PX(),Aje=my();function Bje(e){return Rje(e)?xje(Aje(e)):Zje(e)}vWt.exports=Bje});var CWt=k((iki,yWt)=>{var Xje=lWt(),Wje=mWt(),Fje=Gy(),Vje=Ps(),kje=GWt();function Sje(e){return typeof e=="function"?e:e==null?Fje:typeof e=="object"?Vje(e)?Wje(e[0],e[1]):Xje(e):kje(e)}yWt.exports=Sje});var ZWt=k((rki,xWt)=>{var Lje=xH(),wje=hW();function Uje(e,t){return e&&Lje(e,t,wje)}xWt.exports=Uje});var AWt=k((nki,RWt)=>{var Yje=Cm();function Eje(e,t){return function(r,n){if(r==null)return r;if(!Yje(r))return e(r,n);for(var a=r.length,o=t?a:-1,s=Object(r);(t?o--:++o{var Nje=ZWt(),Oje=AWt(),Qje=Oje(Nje);BWt.exports=Qje});var FWt=k((oki,WWt)=>{var Tje=XWt(),Jje=Cm();function Hje(e,t){var r=-1,n=Jje(e)?Array(e.length):[];return Tje(e,function(a,o,s){n[++r]=t(a,o,s)}),n}WWt.exports=Hje});var kWt=k((ski,VWt)=>{function _je(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}VWt.exports=_je});var wWt=k((lki,LWt)=>{var SWt=If();function jje(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,o=SWt(e),s=t!==void 0,l=t===null,c=t===t,u=SWt(t);if(!l&&!u&&!o&&e>t||o&&s&&c&&!l&&!u||n&&s&&c||!r&&c||!a)return 1;if(!n&&!o&&!u&&e{var zje=wWt();function Dje(e,t,r){for(var n=-1,a=e.criteria,o=t.criteria,s=a.length,l=r.length;++n=l)return c;var u=r[n];return c*(u=="desc"?-1:1)}}return e.index-t.index}UWt.exports=Dje});var NWt=k((dki,EWt)=>{var a3=fH(),Mje=tW(),Pje=CWt(),Kje=FWt(),qje=kWt(),$je=BH(),tze=YWt(),eze=Gy(),ize=Ps();function rze(e,t,r){t.length?t=a3(t,function(o){return ize(o)?function(s){return Mje(s,o.length===1?o[0]:o)}:o}):t=[eze];var n=-1;t=a3(t,$je(Pje));var a=Kje(e,function(o,s,l){var c=a3(t,function(u){return u(o)});return{criteria:c,index:++n,value:o}});return qje(a,function(o,s){return tze(o,s,r)})}EWt.exports=rze});var TWt=k((uki,QWt)=>{var nze=tXt(),aze=NWt(),oze=SH(),OWt=yy(),sze=oze(function(e,t){if(e==null)return[];var r=t.length;return r>1&&OWt(e,t[0],t[1])?t=[]:r>2&&OWt(t[0],t[1],t[2])&&(t=[t[0]]),aze(e,nze(t,1),[])});QWt.exports=sze});var HWt=k((gki,JWt)=>{function lze(e,t,r){for(var n=-1,a=e.length,o=t.length,s={};++n{var cze=FH(),dze=HWt();function uze(e,t){return dze(e||[],t||[],cze)}_Wt.exports=uze});var KWt=k((Wki,PWt)=>{var mze=Math.ceil,pze=Math.max;function bze(e,t,r,n){for(var a=-1,o=pze(mze((t-e)/(r||1)),0),s=Array(o);o--;)s[n?o:++a]=e,e+=r;return s}PWt.exports=bze});var $Wt=k((Fki,qWt)=>{var fze=KWt(),Ize=yy(),d3=_H();function vze(e){return function(t,r,n){return n&&typeof n!="number"&&Ize(t,r,n)&&(r=n=void 0),t=d3(t),r===void 0?(r=t,t=0):r=d3(r),n=n===void 0?t{var Gze=$Wt(),yze=Gze();tFt.exports=yze});function re(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");h3(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function bW(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ql(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,o=[],s;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function er(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,o;n{h3=function(e,t){return h3=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},h3(e,t)};Lt=function(){return Lt=Object.assign||function(t){for(var r,n=1,a=arguments.length;n{});var jt=k((b3,WFt)=>{(function(e,t){typeof define=="function"&&define.amd?define(t):typeof b3=="object"?WFt.exports=t():window.jQuery?window.jQuery.onmount=t():e.onmount=t()})(b3,function(e){var t,r,n,a=0,o=0;function s(v,y,x,C){if(typeof x=="object"&&(C=x,x=void 0),arguments.length===0||b(v)||f(v))s.poll();else if(arguments.length===1)s.poll(v);else{var I=new l(v,y,x,C);r.push(I),I.register()}return this}s.$=window.jQuery||window.Zepto||window.Ender,s.MutationObserver=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,s.poll=function(y){y&&(y=s.selectify(y));var x=(y?n[y]:t)||[];p(x,function(C){C()})},s.observe=function(){var y=s.MutationObserver;if(!(typeof y>"u")){var x=new y(function(C){p(r,function(I){p(C,function(Z){p(Z.addedNodes,function(F){m(F,I.selector)&&I.visitEnter(F)}),p(Z.removedNodes,function(F){m(F,I.selector)&&I.doExit(F)})})})});return x.observe(document,{subtree:!0,childList:!0}),s.observer=x,s(),!0}},s.unobserve=function(){this.observer&&(this.observer.disconnect(),delete this.observer)},s.teardown=function(){p(r,function(y){p(y.loaded,function(x,C){x&&y.doExit(x,C)})})},s.reset=function(){t=s.handlers=[],n=s.selectors={},r=s.behaviors=[]},s.selectify=function(y){return y[0]==="@"?'[role~="'+y.substr(1).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]':y};function l(v,y,x,C){this.id="b"+a++,this.init=y,this.exit=x,this.selector=s.selectify(v),this.loaded=[],this.key="__onmount:"+a,this.detectMutate=C&&C.detectMutate}l.prototype.register=function(){var v=this,y=this.loaded,x=this.selector;h(x,function(){var C=u(x);p(y,function(I,Z){v.visitExit(I,Z,C)}),g(C,function(I){v.visitEnter(I)})})},l.prototype.visitEnter=function(v){if(!v[this.key]){var y={id:"c"+o,selector:this.selector};this.init.call(v,y)!==!1&&(v[this.key]=y,this.loaded.push(v),o++)}},l.prototype.visitExit=function(v,y,x){if(v){if(this.detectMutate){if(!d(x,v))return this.doExit(v,y)}else if(!c(v))return this.doExit(v,y)}},l.prototype.doExit=function(v,y){typeof y>"u"&&(y=this.loaded.indexOf(v)),this.loaded[y]=void 0,this.exit&&this.exit.call(v,v[this.key])!==!1&&delete v[this.key]};function c(v){for(;v;){if(v===document.documentElement)return!0;v=v.parentElement}}function u(v,y){return s.$?s.$(v):document.querySelectorAll(v)}function g(v,y){return s.$?v.each(function(x){y(this,x)}):p(v,y)}function d(v,y){return s.$?v.index(y)>-1:v.indexOf(y)>-1}function h(v,y){n[v]||(n[v]=[]),n[v].push(y),t.push(y)}function m(v,y){var x=v.matches||v.matchesSelector||v.msMatchesSelector||v.mozMatchesSelector||v.webkitMatchesSelector||v.oMatchesSelector;if(s.$)return s.$(v).is(y);if(x)return x.call(v,y);if(v.parentNode){for(var C=v.parentNode.querySelectorAll(y),I=C.length;I--;0)if(C[I]===v)return!0;return!1}}function p(v,y){var x,C=v.length;if(C===+C)for(x=0;x{Am="a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",Bm={selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},wy="select[data-remote], input[data-remote], textarea[data-remote]",wc="form:not([data-turbo=true])",ky="form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",v3="input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",CW="input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",Qze="input[name][type=file]:not([disabled])",Sf="a[data-disable-with], a[data-disable]",Yy="button[data-remote][data-disable-with], button[data-remote][data-disable]",kFt=null,G3=()=>{let e=document.querySelector("meta[name=csp-nonce]");return kFt=e&&e.content},SFt=()=>kFt||G3(),f3=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,Nn=function(e,t){return t.exclude?f3.call(e,t.selector)&&!f3.call(e,t.exclude):f3.call(e,t)},Uy="_ujsData",Uc=(e,t)=>e[Uy]?e[Uy][t]:void 0,La=function(e,t,r){return e[Uy]||(e[Uy]={}),e[Uy][t]=r},GW=e=>Array.prototype.slice.call(document.querySelectorAll(e)),xW=function(e){var t=!1;do{if(e.isContentEditable){t=!0;break}e=e.parentElement}while(e);return t},ZW=()=>{let e=document.querySelector("meta[name=csrf-token]");return e&&e.content},y3=()=>{let e=document.querySelector("meta[name=csrf-param]");return e&&e.content},C3=e=>{let t=ZW();if(t)return e.setRequestHeader("X-CSRF-Token",t)},LFt=()=>{let e=ZW(),t=y3();if(e&&t)return GW('form input[name="'+t+'"]').forEach((r=>r.value=e))},FFt={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},wFt=e=>{e=Tze(e);var t=Jze(e,(function(){let r=Hze(t.response!=null?t.response:t.responseText,t.getResponseHeader("Content-Type"));return Math.floor(t.status/100)===2?typeof e.success=="function"&&e.success(r,t.statusText,t):typeof e.error=="function"&&e.error(r,t.statusText,t),typeof e.complete=="function"?e.complete(t,t.statusText):void 0}));if(e.beforeSend&&!e.beforeSend(t,e))return!1;if(t.readyState===XMLHttpRequest.OPENED)return t.send(e.data)},Tze=function(e){return e.url=e.url||location.href,e.type=e.type.toUpperCase(),e.type==="GET"&&e.data&&(e.url.indexOf("?")<0?e.url+="?"+e.data:e.url+="&"+e.data),e.dataType in FFt||(e.dataType="*"),e.accept=FFt[e.dataType],e.dataType!=="*"&&(e.accept+=", */*; q=0.01"),e},Jze=function(e,t){let r=new XMLHttpRequest;return r.open(e.type,e.url,!0),r.setRequestHeader("Accept",e.accept),typeof e.data=="string"&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.crossDomain||(r.setRequestHeader("X-Requested-With","XMLHttpRequest"),C3(r)),r.withCredentials=!!e.withCredentials,r.onreadystatechange=function(){if(r.readyState===XMLHttpRequest.DONE)return t(r)},r},Hze=function(e,t){if(typeof e=="string"&&typeof t=="string"){if(t.match(/\bjson\b/))try{e=JSON.parse(e)}catch{}else if(t.match(/\b(?:java|ecma)script\b/)){let r=document.createElement("script");r.setAttribute("nonce",SFt()),r.text=e,document.head.appendChild(r).parentNode.removeChild(r)}else if(t.match(/\b(xml|html|svg)\b/)){let r=new DOMParser;t=t.replace(/;.+/,"");try{e=r.parseFromString(e,t)}catch{}}}return e},_ze=e=>e.href,x3=function(e){let t=document.createElement("a");t.href=location.href;let r=document.createElement("a");try{return r.href=e,!((!r.protocol||r.protocol===":")&&!r.host||t.protocol+"//"+t.host==r.protocol+"//"+r.host)}catch{return!0}},{CustomEvent:Ff}=window;typeof Ff!="function"&&(Ff=function(e,t){let r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r},Ff.prototype=window.Event.prototype,{preventDefault:VFt}=Ff.prototype,Ff.prototype.preventDefault=function(){let e=VFt.call(this);return this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get(){return!0}}),e});Is=(e,t,r)=>{let n=new Ff(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(n),!n.defaultPrevented},Xm=e=>{Is(e.target,"ujs:everythingStopped"),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()},Xr=(e,t,r,n)=>e.addEventListener(r,(function(a){let{target:o}=a;for(;o instanceof Element&&!Nn(o,t);)o=o.parentNode;o instanceof Element&&n.call(o,a)===!1&&(a.preventDefault(),a.stopPropagation())})),yW=e=>Array.prototype.slice.call(e),I3=(e,t)=>{let r=[e];Nn(e,"form")&&(r=yW(e.elements));let n=[];return r.forEach((function(a){!a.name||a.disabled||Nn(a,"fieldset[disabled] *")||(Nn(a,"select")?yW(a.options).forEach((function(o){o.selected&&n.push({name:a.name,value:o.value})})):(a.checked||["radio","checkbox","submit"].indexOf(a.type)===-1)&&n.push({name:a.name,value:a.value}))})),t&&n.push(t),n.map((function(a){return a.name?`${encodeURIComponent(a.name)}=${encodeURIComponent(a.value)}`:a})).join("&")},Z3=(e,t)=>Nn(e,"form")?yW(e.elements).filter((r=>Nn(r,t))):yW(e.querySelectorAll(t)),jze=e=>function(t){Dze(this,e)||Xm(t)},zze=(e,t)=>window.confirm(e),Dze=function(e,t){let r,n=e.getAttribute("data-confirm");if(!n)return!0;let a=!1;if(Is(e,"confirm")){try{a=t.confirm(n,e)}catch{}r=Is(e,"confirm:complete",[a])}return a&&r},Vf=function(e){this.disabled&&Xm(e)},Ig=e=>{let t;if(e instanceof Event){if($ze(e))return;t=e.target}else t=e;if(!xW(t)){if(Nn(t,Sf))return Pze(t);if(Nn(t,Yy)||Nn(t,CW))return YFt(t);if(Nn(t,wc))return qze(t)}},Sy=e=>{let t=e instanceof Event?e.target:e;if(!xW(t)){if(Nn(t,Sf))return Mze(t);if(Nn(t,Yy)||Nn(t,v3))return UFt(t);if(Nn(t,wc))return Kze(t)}},Mze=function(e){if(Uc(e,"ujs:disabled"))return;let t=e.getAttribute("data-disable-with");return t!=null&&(La(e,"ujs:enable-with",e.innerHTML),e.innerHTML=t),e.addEventListener("click",Xm),La(e,"ujs:disabled",!0)},Pze=function(e){let t=Uc(e,"ujs:enable-with");return t!=null&&(e.innerHTML=t,La(e,"ujs:enable-with",null)),e.removeEventListener("click",Xm),La(e,"ujs:disabled",null)},Kze=e=>Z3(e,v3).forEach(UFt),UFt=function(e){if(Uc(e,"ujs:disabled"))return;let t=e.getAttribute("data-disable-with");return t!=null&&(Nn(e,"button")?(La(e,"ujs:enable-with",e.innerHTML),e.innerHTML=t):(La(e,"ujs:enable-with",e.value),e.value=t)),e.disabled=!0,La(e,"ujs:disabled",!0)},qze=e=>Z3(e,CW).forEach((t=>YFt(t))),YFt=function(e){let t=Uc(e,"ujs:enable-with");return t!=null&&(Nn(e,"button")?e.innerHTML=t:e.value=t,La(e,"ujs:enable-with",null)),e.disabled=!1,La(e,"ujs:disabled",null)},$ze=function(e){let t=e.detail?e.detail[0]:void 0;return t&&t.getResponseHeader("X-Xhr-Redirect")},tDe=e=>function(t){let r=this,n=r.getAttribute("data-method");if(!n||xW(this))return;let a=e.href(r),o=ZW(),s=y3(),l=document.createElement("form"),c=``;s&&o&&!x3(a)&&(c+=``),c+='',l.method="post",l.action=a,l.target=r.target,l.innerHTML=c,l.style.display="none",document.body.appendChild(l),l.querySelector('[type="submit"]').click(),Xm(t)},eDe=function(e){let t=e.getAttribute("data-remote");return t!=null&&t!=="false"},iDe=e=>function(t){let r,n,a,o=this;if(!eDe(o))return!0;if(!Is(o,"ajax:before")||xW(o))return Is(o,"ajax:stopped"),!1;let s=o.getAttribute("data-with-credentials"),l=o.getAttribute("data-type")||"script";if(Nn(o,wc)){let c=Uc(o,"ujs:submit-button");n=Uc(o,"ujs:submit-button-formmethod")||o.getAttribute("method")||"get",a=Uc(o,"ujs:submit-button-formaction")||o.getAttribute("action")||location.href,n.toUpperCase()==="GET"&&(a=a.replace(/\?.*$/,"")),o.enctype==="multipart/form-data"?(r=new FormData(o),c!=null&&r.append(c.name,c.value)):r=I3(o,c),La(o,"ujs:submit-button",null),La(o,"ujs:submit-button-formmethod",null),La(o,"ujs:submit-button-formaction",null)}else Nn(o,Bm)||Nn(o,wy)?(n=o.getAttribute("data-method"),a=o.getAttribute("data-url"),r=I3(o,o.getAttribute("data-params"))):(n=o.getAttribute("data-method"),a=e.href(o),r=o.getAttribute("data-params"));wFt({type:n||"GET",url:a,data:r,dataType:l,beforeSend(c,u){return Is(o,"ajax:beforeSend",[c,u])?Is(o,"ajax:send",[c]):(Is(o,"ajax:stopped"),!1)},success(...c){return Is(o,"ajax:success",c)},error(...c){return Is(o,"ajax:error",c)},complete(...c){return Is(o,"ajax:complete",c)},crossDomain:x3(a),withCredentials:s!=null&&s!=="false"}),Xm(t)},EFt=function(e){let t=this,{form:r}=t;if(r)return t.name&&La(r,"ujs:submit-button",{name:t.name,value:t.value}),La(r,"ujs:formnovalidate-button",t.formNoValidate),La(r,"ujs:submit-button-formaction",t.getAttribute("formaction")),La(r,"ujs:submit-button-formmethod",t.getAttribute("formmethod"))},vW=function(e){let t=this,r=(t.getAttribute("data-method")||"GET").toUpperCase(),n=t.getAttribute("data-params"),o=(e.metaKey||e.ctrlKey)&&r==="GET"&&!n;(e.button!=null&&e.button!==0||o)&&e.stopImmediatePropagation()},Qt={$:GW,ajax:wFt,buttonClickSelector:Bm,buttonDisableSelector:Yy,confirm:zze,cspNonce:SFt,csrfToken:ZW,csrfParam:y3,CSRFProtection:C3,delegate:Xr,disableElement:Sy,enableElement:Ig,fileInputSelector:Qze,fire:Is,formElements:Z3,formEnableSelector:CW,formDisableSelector:v3,formInputClickSelector:ky,formSubmitButtonClick:EFt,formSubmitSelector:wc,getData:Uc,handleDisabledElement:Vf,href:_ze,inputChangeSelector:wy,isCrossDomain:x3,linkClickSelector:Am,linkDisableSelector:Sf,loadCSPNonce:G3,matches:Nn,preventInsignificantClick:vW,refreshCSRFTokens:LFt,serializeElement:I3,setData:La,stopEverything:Xm},kf=jze(Qt);Qt.handleConfirm=kf;NFt=tDe(Qt);Qt.handleMethod=NFt;Ly=iDe(Qt);Qt.handleRemote=Ly;rDe=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",(function(){GW(CW).forEach((function(e){Uc(e,"ujs:disabled")&&Ig(e)})),GW(Sf).forEach((function(e){Uc(e,"ujs:disabled")&&Ig(e)}))})),Xr(document,Sf,"ajax:complete",Ig),Xr(document,Sf,"ajax:stopped",Ig),Xr(document,Yy,"ajax:complete",Ig),Xr(document,Yy,"ajax:stopped",Ig),Xr(document,Am,"click",vW),Xr(document,Am,"click",Vf),Xr(document,Am,"click",kf),Xr(document,Am,"click",Sy),Xr(document,Am,"click",Ly),Xr(document,Am,"click",NFt),Xr(document,Bm,"click",vW),Xr(document,Bm,"click",Vf),Xr(document,Bm,"click",kf),Xr(document,Bm,"click",Sy),Xr(document,Bm,"click",Ly),Xr(document,wy,"change",Vf),Xr(document,wy,"change",kf),Xr(document,wy,"change",Ly),Xr(document,wc,"submit",Vf),Xr(document,wc,"submit",kf),Xr(document,wc,"submit",Ly),Xr(document,wc,"submit",(e=>setTimeout((()=>Sy(e)),13))),Xr(document,wc,"ajax:send",Sy),Xr(document,wc,"ajax:complete",Ig),Xr(document,ky,"click",vW),Xr(document,ky,"click",Vf),Xr(document,ky,"click",kf),Xr(document,ky,"click",EFt),document.addEventListener("DOMContentLoaded",LFt),document.addEventListener("DOMContentLoaded",G3),window._rails_loaded=!0};Qt.start=rDe;if(typeof jQuery<"u"&&jQuery&&jQuery.ajax){if(jQuery.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");jQuery.rails=Qt,jQuery.ajaxPrefilter((function(e,t,r){if(!e.crossDomain)return C3(r)}))}});function Ke(e,t){let r=null;return function(...n){clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}function RW(e,t){let r=new Map;return function(...n){let a=JSON.stringify(n);r.has(a)&&clearTimeout(r.get(a));let o=setTimeout(()=>{e.apply(this,n),r.delete(a)},t);r.set(a,o)}}function vg(e,t,r=!1){let n=null,a=!0;return function(...o){let s=r&&a,l=()=>{e.apply(this,o),n=null};s&&(a=!1,l()),n||(n=setTimeout(l,t))}}function gr(e,t){let r=[];return Object.entries(e).forEach(([n,a])=>{let o=t?`${t}[${n}]`:n;a!==null&&typeof a=="object"?r.push(gr(a,o)):a!==null&&r.push(`${encodeURIComponent(o)}=${encodeURIComponent(a)}`)}),r.join("&")}function Tl(e){let t=0;for(;t":">","'":"'",'"':"""};return e.toString().replace(/[&<>"']/g,r=>t[r])}function Lf(){return window.location.host.includes("woots")}function Gg(e){e.previousHotkeysDisabled!==void 0?document.body.dataset.hotkeysDisabled=e.previousHotkeysDisabled:delete document.body.dataset.hotkeysDisabled}var oi=ce(()=>{window.updateUrl=Ey});var jFt=k(R3=>{var _Ft=Wt(jt());(0,_Ft.default)("[data-js-sort-event]",()=>{function e(t){t.detail.evt.item.closest("[data-js-choices]").querySelectorAll("[data-js-choice]").forEach((n,a)=>{let o=n.querySelector("[data-js-choice-position]");o.value=a+1})}R3.handleChoiceMoved=e,document.addEventListener("choiceMoved",R3.handleChoiceMoved)},function(){document.removeEventListener("choiceMoved",this.handleChoiceMoved)})});var hVt=k(Jl=>{var gVt=Wt(jt());_e();oi();(0,gVt.default)("[data-js-dashboard-live]",()=>{let e=document.querySelector("[data-js-online-users-chart]"),t,r,n,a=document.querySelector("[data-js-tasks-chart]"),o,s,l,c=document.querySelector("[data-js-task-performance-chart]"),u,g,d;function h(Q){return Q*60*1e3}function m(Q){return Q.forEach(T=>{T[0]=new Date(T[0])}),Q}function p(Q){return Q.forEach(T=>{T[1]===0&&(T[1]=.1),T[2]===0&&(T[2]=.1)}),Q}function b(Q,T){let O=new Date;for(O.setHours(O.getHours()-T);Q.getValue(0,0){f(Q);let T=Q[Q.length-1];document.querySelector("[data-js-online-users-count]").innerHTML=parseInt(T[1]+T[2],10)}})}function y(Q){let{wootsUsers:T,ansUsers:O}=Q.detail;document.querySelector("[data-js-online-users-count]").innerHTML=O+T,b(r,24),r.addRow([new Date,T,O]),t.draw(r,n)}Jl.updateOnlineUsersData=y;function x(Q){let T=new google.visualization.DataTable;T.addColumn("date","Time"),T.addColumn("number","Tasks"),T.addColumn("number","Servers"),T.addRows(p(m(Q))),s=T,l={backgroundColor:{fill:"transparent"},chartArea:{width:"80%"},colors:["#FFA574","#3BBA98"],legend:{position:"none"},series:{0:{targetAxisIndex:0},1:{targetAxisIndex:1}},hAxis:{format:"HH:mm",textStyle:{color:"#FFF",opacity:.6},baselineColor:{color:"#333"},lineColor:{color:"#333"},gridlines:{color:"#333"},minorGridlines:{color:"#333"}},vAxes:{0:{title:"Tasks"},1:{title:"Servers"}},vAxis:{viewWindow:{min:.1,max:Math.max(10,s.getColumnRange(1).max)},titleTextStyle:{color:"#FFF",italic:!1,opacity:.6},textStyle:{color:"#FFF",opacity:.6},scaleType:"log",baselineColor:{color:"#333"},lineColor:{color:"#333"},gridlines:{color:"#333"},minorGridlines:{color:"#333"}}},o=new google.visualization.LineChart(a),o.draw(s,l)}function C(){Qt.ajax({url:`${window.location.origin}/dashboard/tasks.json`,type:"GET",success:Q=>{x(Q),document.querySelector("[data-js-tasks-count]").innerHTML=parseInt(Q[Q.length-1][1],10)}})}function I(Q,T){b(s,12);let O=Q===0?.1:Q,J=T===0?.1:T;O>=1&&s.getValue(s.getNumberOfRows()-1,1)===.1&&s.addRow([new Date,.1,s.getValue(s.getNumberOfRows()-1,2)]),s.addRow([new Date,O,J]),l.vAxis.viewWindow.max=Math.max(10,s.getColumnRange(1).max),o.draw(s,l)}function Z(Q){s.getNumberOfRows()>1e3&&C();let{tasksCount:T}=Q.detail;document.querySelector("[data-js-tasks-count]").innerHTML=T;let O=parseInt(document.querySelector("[data-js-servers-count]").innerHTML,10);I(T,O)}Jl.updateTasksData=Z;function F(Q){let T=new google.visualization.DataTable;T.addColumn("date","Time"),T.addColumn("number","Throughput"),T.addColumn("number","Waiting time"),T.addRows(p(m(Q))),g=T,d={backgroundColor:"transparent",chartArea:{width:"80%"},colors:["#FFC100","#DD2C3B"],legend:{position:"none"},series:{0:{targetAxisIndex:0},1:{targetAxisIndex:1}},hAxis:{format:"HH:mm",textStyle:{color:"#FFF",opacity:.6},baselineColor:{color:"#333"},lineColor:{color:"#333"},gridlines:{color:"#333"},minorGridlines:{color:"#333"}},vAxes:{0:{title:"Throughput (tasks/min)"},1:{title:"Waiting time (s)"}},vAxis:{viewWindow:{min:.1,max:Math.max(10,g.getColumnRange(1).max)},titleTextStyle:{color:"#FFF",italic:!1,opacity:.6},textStyle:{color:"#FFF",opacity:.6},baselineColor:{color:"#333"},lineColor:{color:"#333"},gridlines:{color:"#333"},minorGridlines:{color:"#333"}}},u=new google.visualization.LineChart(c),u.draw(g,d)}function R(){Qt.ajax({url:`${window.location.origin}/dashboard/task_performance.json`,type:"GET",success:Q=>{F(Q),document.querySelector("[data-js-throughput]").innerHTML=parseInt(Q[Q.length-1][1],10)}})}function X(Q){let{throughput:T,waitingTime:O}=Q.detail,{waitingTimeInWords:J}=Q.detail;document.querySelector("[data-js-throughput]").innerHTML=T,document.querySelector("[data-js-waiting-time]").innerHTML=J,b(g,12),T===0&&(T=.1),O===0&&(O=.1),g.addRow([new Date,T,O]),d.vAxis.viewWindow.max=Math.max(10,g.getColumnRange(1).max),u.draw(g,d)}Jl.updateTaskPerformanceData=X;function S(Q){let{serversCount:T}=Q.detail;document.querySelector("[data-js-servers-count]").innerHTML=T;let O=parseInt(document.querySelector("[data-js-tasks-count]").innerHTML,10);I(O,T)}Jl.updateServersCount=S,google.charts.load("current",{packages:["corechart"]}),google.charts.setOnLoadCallback(v),google.charts.setOnLoadCallback(C),google.charts.setOnLoadCallback(R);function w(){t.draw(r,n),o.draw(s,l),u.draw(g,d)}Jl.handleResize=Ke(w,500),window.addEventListener("resize",Jl.handleResize),document.addEventListener("updateOnlineUsersData",Jl.updateOnlineUsersData),document.addEventListener("updateTasksData",Jl.updateTasksData),document.addEventListener("updateTaskPerformanceData",Jl.updateTaskPerformanceData),document.addEventListener("updateServersCount",Jl.updateServersCount),setTimeout(()=>{window.location.reload()},h(1440))},function(){window.removeEventListener("resize",this.handleResize),document.removeEventListener("updateOnlineUsersData",this.updateOnlineUsersData),document.removeEventListener("updateTasksData",this.updateTasksData),document.removeEventListener("updateTaskPerformanceData",this.updateTaskPerformanceData),document.removeEventListener("updateServersCount",this.updateServersCount)})});function sl(){return"window"in globalThis&&"document"in globalThis}function ULt(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function pDe(){try{return window.self!==window.top}catch{return!0}}function YLt(){return typeof navigator.vibrate=="function"}function G0(){var e,t;if(!sl())return"other";let r=(t=(e=navigator.userAgentData)==null?void 0:e.platform)!=null?t:navigator.platform;return/^mac/i.test(r)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(r)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function bDe(){if(!sl())return!0;if(/firefox/i.test(navigator.userAgent)){let e=navigator.userAgent.match(/firefox\/(\d+)/i);return e?parseInt(e[1])>=78:!1}if(/trident/i.test(navigator.userAgent))return!1;if(/edge/i.test(navigator.userAgent)){let e=navigator.userAgent.match(/edg\/(\d+)/i);return e?parseInt(e[1])>=79:!1}return!0}function HVt(){return HTMLElement.prototype.hasOwnProperty("popover")}function OLt(e){let t=e.split("+"),r={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:t.pop()};return t.includes("shift")&&(r.shift=!0),t.includes("alt")&&(r.alt=!0),t.includes("ctrl")&&(r.ctrl=!0),t.includes("cmd")&&(r.cmd=!0),t.includes("win")&&(r.win=!0),t.includes("meta")&&(r.meta=!0),r}function n0(e){let t="";return e.shift&&(t+="shift+"),e.alt&&(t+="alt+"),e.ctrl&&(t+="ctrl+"),e.cmd&&(t+="cmd+"),e.win&&(t+="win+"),e.meta&&(t+="meta+"),t+e.key}function h_(){switch(G0()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function Gs(e){(!e.platform||e.platform===h_())&&v1.push(e)}function XDe(e,t){var r;let n={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!e)return n;for(let[a,o]of Object.entries(t.mapping)){if(o[0]===e)return n.key=`[${a}]`,n;if(o[1]===e)return n.shift=!0,n.key=`[${a}]`,n;if(o[2]===e)return n.alt=!0,n.key=`[${a}]`,n;if(o[3]===e)return n.shift=!0,n.alt=!0,n.key=`[${a}]`,n}return n.key=(r=BDe[e])!=null?r:"",n}function WDe(e){if(e.code)return e;let t=Object.entries(y1().mapping),r=!1,n=!1,a="";for(let o=0;o<4;o++){for(let[s,l]of t)if(l[o]===e.key){a=s,o===3?(r=!0,n=!0):o===2?r=!0:o===1&&(n=!0);break}if(a)break}return new KeyboardEvent(e.type,zt(Xt({},e),{altKey:r,shiftKey:n,code:a}))}function FDe(e){var t,r;if(!e||e.key==="Unidentified"||e.key==="Dead")return;let n=e.shiftKey&&e.altKey?3:e.altKey?2:e.shiftKey?1:0;for(let a of v1)((t=a.mapping[e.code])==null?void 0:t[n])===e.key?a.score+=1:(r=a.mapping[e.code])!=null&&r[n]&&(a.score=0);v1.sort((a,o)=>o.score-a.score)}function VDe(e){G1=v1.find(t=>e.startsWith(t.locale))}function y1(){return G1??v1[0]}function kDe(){switch(h_()){case"apple":return S9;case"windows":return ELt;case"linux":return NLt}return S9}function $n(e){return Array.isArray(e)}function vi(e,...t){if(e===void 0)return;let r="",n=Fi.locale;Fi.strings[n]&&(r=Fi.strings[n][e]);let a=n.slice(0,2);if(!r&&Fi.strings[a]&&(r=Fi.strings[a][e]),r||(r=Fi.strings.en[e]),!r)return;let o=/(%@|%([0-9]+)\$@)/g,s=o.exec(r),l=0;for(;s;){if(t[l++]){let c=s[2]?parseInt(s[2],10)-1:l-1,u=t[c];typeof u=="number"&&(u=Fi.numberFormatter.format(u)),r=r.replace(s[1],u)}s=o.exec(r)}return r=r.replace(/%%/g,"%"),r}function vV(e){var t,r,n,a,o,s;let l=e.split("!"),c,u,g,d=255,h=255,m=255,p=-1,b=l.length>0&&l[0].startsWith("-");b&&(l[0]=l[0].slice(1));for(let f=0;f=0&&(d=(1-p)*d+p*c,h=(1-p)*h+p*u,m=(1-p)*m+p*g,p=-1),f+1=0&&(d=p*d+(1-p)*c,h=p*h+(1-p)*u,m=p*m+(1-p)*g),b&&(d=255-d,h=255-h,m=255-m),"#"+("00"+Math.round(d).toString(16)).slice(-2)+("00"+Math.round(h).toString(16)).slice(-2)+("00"+Math.round(m).toString(16)).slice(-2)}function m_(e){var t,r;return e=e.trim(),(r=(t=$m[e.toLowerCase()])!=null?t:$m[QLt[e]])!=null?r:vV(e)}function YDe(e){if(!e||e[0]!=="#")return;e=e.slice(1);let t;return e.length<=4?(t={r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)},e.length===4&&(t.a=parseInt(e[3]+e[3],16)/255)):(t={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16)},e.length===8&&(t.a=parseInt(e[6]+e[7],16)/255)),t&&t.a===void 0&&(t.a=1),t}function V3(e,t,r){return r<0&&(r+=6),r>=6&&(r-=6),r<1?(t-e)*r+e:r<3?t:r<4?(t-e)*(4-r)+e:e}function EDe(e){let[t,r,n]=[e.h,e.s,e.l];t=(t+360)%360/60,n=Math.max(0,Math.min(n,1)),r=Math.max(0,Math.min(r,1));let a=n<=.5?n*(r+1):n+r-n*r,o=n*2-a;return{r:Math.round(255*V3(o,a,t+2)),g:Math.round(255*V3(o,a,t)),b:Math.round(255*V3(o,a,t-2))}}function k3(e){return e<0?0:e>255?255:Math.round(e)}function NDe(e){let{r:t,g:r,b:n}=e,a=((1<<24)+(k3(t)<<16)+(k3(r)<<8)+k3(n)).toString(16).slice(1);return a[0]===a[1]&&a[2]===a[3]&&a[4]===a[5]&&a[6]===a[7]&&(a=a[0]+a[2]+a[4]),"#"+a}function ODe(e){let{r:t,g:r,b:n}=e;t=t/255,r=r/255,n=n/255;let a=Math.min(t,r,n),o=Math.max(t,r,n),s=o-a,l,c;o===a?l=0:t===o?l=(r-n)/s:r===o?l=2+(n-t)/s:n===o&&(l=4+(t-r)/s),l=Math.min(l*60,360),l<0&&(l+=360);let u=(a+o)/2;return o===a?c=0:u<=.5?c=s/(o+a):c=s/(2-o-a),{h:l,s:c,l:u}}function QDe(e){let t=YDe(e);if(!t)return e;let{h:r,s:n,l:a}=ODe(t);return n+=.1,a-=.1,NDe(EDe({h:r,s:n,l:a}))}function w9(e,t,r){if(!/[A-Za-z\d]/.test(e)||(r==="up"&&(r=void 0),!t&&!r))return;let n=e.codePointAt(0);if(n===void 0)return e;for(let a of JLt)if((!t||a.variant===t)&&(!r||a.style===r)&&n>=a.offset&&n120831)&&(e<8448||e>8527))return{char:String.fromCodePoint(e)};for(let r in L9)if(L9[r]===e){e=(t=r.codePointAt(0))!=null?t:0;break}for(let r of JLt)if(e>=r.start&&e[]$&*#^_%:'\u02DC".includes(e)||e.length>1)return;let r=(t=e.codePointAt(0))!=null?t:0,n=TLt[r];if(n)return n;let{char:a,variant:o,style:s}=TDe(r);if(!(!o&&!s)){switch(n=a,o){case"double-struck":n=`\\mathbb{${n}}`;break;case"fraktur":n=`\\mathfrak{${n}}`;break;case"script":n=`\\mathscr{${n}}`;break;case"sans-serif":n=`\\mathsf{${n}}`;break;case"monospace":n=`\\mathtt{${n}}`;break;case"calligraphic":n=`\\mathcal{${n}}`;break}switch(s){case"bold":n=`\\mathbf{${n}}`;break;case"italic":n=`\\mathit{${n}}`;break;case"bolditalic":n=`\\mathbfit{${n}}`;break}return n}}function Me(e){return e?Array.isArray(e)?e:typeof e=="object"&&"group"in e?e.group:[]:[]}function Y9(e,t,r="mord",n){t!==void 0&&(C1[e]={definitionType:"symbol",type:r,variant:n,codepoint:t},iV[t]||(iV[t]=e))}function ta(e,t,r){if(typeof e=="string"){for(let n=0;n{var c,u;return s.frequency===l.frequency?s.match.length===l.match.length?s.matchs.match)}function _Vt(e){let t="auto",r=e.match(/:([^=]+)/);return r&&(t=r[1].trim()),t}function rV(e){if(!e)return[];let t=[],r=e.split("]");if(r[0].startsWith("[")){t.push({isOptional:!0,type:_Vt(r[0].slice(1))});for(let n=1;n<=r.length;n++)t.push(...rV(r[n]))}else if(r=e.split("}"),r[0].startsWith("{")){t.push({isOptional:!1,type:_Vt(r[0].slice(1))});for(let n=1;n<=r.length;n++)t.push(...rV(r[n]))}return t}function _Lt(e){if(!e)return"";let t="",r=!0;for(let n of e)typeof n.value=="string"?t+=n.value:r=!1;return r?t:""}function ru(e,t,r){typeof e=="string"&&(e=[e]);let n={tabular:!0,rootOnly:!1,params:rV(t),createAtom:r};for(let a of e)p_[a]=n}function b_(e,t,r){var n;typeof e=="string"&&(e=[e]);let a={tabular:(n=r?.tabular)!=null?n:!1,rootOnly:!0,params:[],createAtom:t};for(let o of e)p_[o]=a}function Ge(e,t,r){var n,a;r||(r={});let o={definitionType:"function",params:rV(t),ifMode:r.ifMode,isFunction:(n=r.isFunction)!=null?n:!1,applyMode:r.applyMode,infix:(a=r.infix)!=null?a:!1,parse:r.parse,createAtom:r.createAtom,applyStyle:r.applyStyle,serialize:r.serialize,render:r.render};if(typeof e=="string")u0["\\"+e]=o;else for(let s of e)u0["\\"+s]=o}function f_(e){return kW||(kW=nV(zDe)),e?nV(Xt(Xt({},kW),e)):kW}function jVt(e,t){var r,n,a,o;if(typeof e=="string"){let s=0,l=e;return/(^|[^\\])#1/.test(l)&&(s=1),/(^|[^\\])#2/.test(l)&&(s=2),/(^|[^\\])#3/.test(l)&&(s=3),/(^|[^\\])#4/.test(l)&&(s=4),/(^|[^\\])#5/.test(l)&&(s=5),/(^|[^\\])#6/.test(l)&&(s=6),/(^|[^\\])#7/.test(l)&&(s=7),/(^|[^\\])#8/.test(l)&&(s=8),/(^|[^\\])#9/.test(l)&&(s=9),{expand:(r=t?.expand)!=null?r:!0,captureSelection:(n=t?.captureSelection)!=null?n:!0,args:s,def:l}}return Xt({expand:(a=t?.expand)!=null?a:!0,captureSelection:(o=t?.captureSelection)!=null?o:!0,args:0},e)}function nV(e){if(!e)return{};let t={};for(let r of Object.keys(e)){let n=e[r];if(n==null)delete t[r];else if(typeof n=="object"&&"package"in n)for(let a of Object.keys(n.package))t[a]=jVt(n.package[a],{expand:!n.primitive,captureSelection:n.captureSelection});else t[r]=jVt(n)}return t}function qn(e,t="math"){if(!e||e.length===0)return null;let r=null;if(e.startsWith("\\")){if(r=u0[e],r)return!r.ifMode||r.ifMode===t?r:null;t==="math"?r=C1[e]:a0[e]&&(r={definitionType:"symbol",type:"mord",codepoint:a0[e]})}else if(t==="math"){if(r=C1[e],!r&&e.length===1){let n=jLt("math",e.codePointAt(0));return n.startsWith("\\")?zt(Xt({},qn(n,"math")),{command:n}):null}}else a0[e]?r={definitionType:"symbol",type:"mord",codepoint:a0[e]}:t==="text"&&(r={definitionType:"symbol",type:"mord",codepoint:e.codePointAt(0)});return r??null}function I_(e,t){if(!e.startsWith("\\"))return null;let r=e.slice(1);return t[r]}function jLt(e,t){return t===void 0?"":e==="math"&&iV[t]?iV[t]:e==="text"&&Object.keys(a0).find(n=>a0[n]===t)||String.fromCodePoint(t)}function o0(e,t){e===void 0&&(e=77);let r=KDe[t][e];if(r)return{defaultMetrics:!1,depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]};if(e===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0,width:.8};let n=String.fromCodePoint(e);if(n in YSt)e=YSt[n].codePointAt(0);else if(qDe.test(n))return e=77,{defaultMetrics:!0,depth:.2,height:.9,italic:0,skew:0,width:1};return{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0,width:.8}}function tMe(e){if(O9[e]){let[u,g,d]=O9[e],h=``;return`${h}`}let[t,r,n,a]=N9[e],o,s,l=n/1e3;t.length===3?(o=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],s=["xMinYMin","xMidYMin","xMaxYMin"]):t.length===2?(o=["slice-1-of-2","slice-2-of-2"],s=["xMinYMin","xMaxYMin"]):(o=["slice-1-of-1"],s=[a]);let c=t.map((u,g)=>``).join("");return`${c}`}function eMe(e){return N9[e]?N9[e][2]/1e3:O9[e][2]}function iMe(e){let t=[];for(let r=0;r=55296&&n<=56319){let a=e.charCodeAt(r+1);if(a>=56320&&a<=57343){let o=n-55296,s=a-56320;n=2**16+o*2**10+s,r++}}t.push(n)}return t}function OSt(e){var t;if(GF===void 0){GF={};for(let r of rMe)for(let n=r[0];n<=r[0]+r[1]-1;n++)GF[n]=!0}return(t=GF[e])!=null?t:!1}function nMe(e){return e>=NSt[0]&&e<=NSt[1]}function zLt(e){if(/^[\u0020-\u00FF]*$/.test(e))return e;let t=[],r=iMe(e),n=0;for(;n");else if(l==="\\egroup")s.push("<}>");else if(l==="\\string"){if(l=e.next(),l)if(l.startsWith("\\"))for(let c of l)s.push(c==="\\"?"\\backslash":c);else l==="<{>"?s.push("\\{"):l===""?s.push("~"):l==="<}>"&&s.push("\\}")}else if(l==="\\csname"){for(;e.peek()==="";)e.next();let c="",u=!1,g=[];do{if(g.length===0)if(/^#[\d?@]$/.test(e.peek())){let d=e.get().slice(1);g=Z1((n=(r=t?.(d))!=null?r:t?.("?"))!=null?n:"\\placeholder{}",t),l=g[0]}else l=e.next(),g=l?[l]:[];u=g.length===0,!u&&l==="\\endcsname"&&(u=!0,g.shift()),u||(u=l==="<$>"||l==="<$$>"||l==="<{>"||l==="<}>"||typeof l=="string"&&l.length>1&&l.startsWith("\\")),u||(c+=g.shift())}while(!u);c&&s.push("\\"+c),s.push(...g)}else if(l!=="\\endcsname")if(l.length>1&&l.startsWith("#")){let c=l.slice(1);s.push(...Z1((o=(a=t?.(c))!=null?a:t?.("?"))!=null?o:"\\placeholder{}",t))}else s.push(l)}return s}function Z1(e,t=null){if(!e)return[];let r=[],n="";for(let s of e.toString().split(/\r?\n/)){n&&r.push(n),n=" ";let l=s.match(/((?:\\%)|[^%])*/);l!==null&&r.push(l[0])}let a=new aMe(r.join("")),o=[];do o.push(...oMe(a,t));while(!a.end());return o}function ki(e){let t="",r=[];for(let n of e)n&&(t&&/^[a-zA-Z\*]/.test(n)&&r.push(t),r.push(n),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(n)&&r.push(" "),t=/\\[a-zA-Z]+\*?$/.test(n)?" ":"");return r.join("")}function Zr(e,...t){return e.startsWith("\\"),t.length===0?e:ki([e,...t.map(r=>`{${r}}`)])}function Em(e){return ki(e.map(t=>{var r;return(r={"":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[t])!=null?r:t}))}function MLt(e){let t=[],r=[],n="NONE";for(let a of e)a.type!=="first"&&(a.mode!==n?(r.length>0&&t.push(r),r=[a],n=a.mode):r.push(a));return r.length>0&&t.push(r),t}function Q9(e){if(e?.mode!=="math")return"";let{style:t}=e;return!t||!t.variantStyle?"":t.variantStyle==="bold"||t.variantStyle==="bolditalic"?"bold":""}function T9(e){if(!e)return"";let{style:t}=e;if(!t)return"";let r=t.variant;return r===void 0?"normal":(!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(r)&&t.variantStyle&&(r+="-"+t.variantStyle),r)}function nu(e,t){let r=[],n=[],a;for(let o of e){if(o.type==="first")continue;let s;t==="variant"?s=T9(o):t==="bold"?s=Q9(o):s=o.style[t],s===a?n.push(o):(n.length>0&&r.push(n),n=[o],a=s)}return n.length>0&&r.push(n),r}function QSt(e,t){var r;let{parent:n}=e[0],a=n?.style.color,o=[];for(let s of MLt(e)){let l=t.defaultMode;for(let c of nu(s,"color")){let u=c[0].style,g=xs._registry[c[0].mode].serialize(c,zt(Xt({},t),{defaultMode:l==="text"?"text":"math"}));!t.skipStyles&&u.color&&u.color!=="none"&&(!n||a!==u.color)?o.push(Zr("\\textcolor",(r=u.verbatimColor)!=null?r:u.color,ki(g))):o.push(ki(g))}}return o}function sMe(e,t){let{parent:r}=e[0],n=r?.style.backgroundColor;return nu(e,"backgroundColor").map(a=>{var o;if(a.length>0||a[0].type!=="box"){let s=a[0].style;if(s.backgroundColor&&s.backgroundColor!=="none"&&(!r||n!==s.backgroundColor))return Zr("\\colorbox",(o=s.verbatimBackgroundColor)!=null?o:s.backgroundColor,ki(QSt(a,zt(Xt({},t),{defaultMode:"text"}))))}return ki(QSt(a,t))})}function lMe(e,t){if(e.length===0)return[];let{parent:r}=e[0],n=r?.style.fontSize,a=[];for(let o of nu(e,"fontSize")){let s=o[0].style.fontSize,l=sMe(o,t);l&&(s&&s!=="auto"&&(!r||n!==s)?a.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][s],...l):a.push(...l))}return a}function J9(e){return e?{mord:"ord",mbin:"bin",mop:"op",mrel:"rel",mopen:"open",mclose:"close",mpunct:"punct",minner:"inner",spacing:"ignore",latex:"latex",composition:"inner",error:"inner",placeholder:"ord",supsub:"ignore"}[e]:void 0}function k1(e){if(e.length===0)return"ord";let t=J9(e[0].type),r=J9(e[e.length-1].type);return t&&t===r?t:"ord"}function $y(e,t){if(typeof e=="string")return e;if(typeof e=="number"){Number.isFinite(e);let r=Math.ceil(100*e)/100;return r===0?"0":r.toString()+(t??"")}return""}function H9(e){if(!e||e.length===0)return[];e[0].children=H9(e[0].children);let t=[e[0]];for(let r=1;r0){let n=-1/0,a=-1/0,o=0;for(let s of e.children)s.height>n&&(n=s.height),s.depth>a&&(a=s.depth),o=Math.max(o,(r=s.maxFontSize)!=null?r:0);e.height=n,e.depth=a,e._width=e.children.reduce((s,l)=>s+l.width,0),e.maxFontSize=o}}function h9(e){if(e=e.trim().replace(/ /g,"-"),e.length===0)throw new Error("Invalid empty attribute name");if(/[\x20\x09\x0a\x0c\x0d"'>/=\x00-\x1f]/.test(e))throw new Error(`Invalid attribute name "${e}"`);return e}function Pf(e){if(e=e.trim(),e.startsWith('"')&&e.endsWith('"')){if(/"/.test(e.slice(1,-1)))throw new Error(`Invalid attribute value: ${e}`);return e}if(e.startsWith("'")&&e.endsWith("'")){if(/'/.test(e.slice(1,-1)))throw new Error(`Invalid attribute value: ${e}`);return e}if(e.length===0)throw new Error("Invalid empty attribute value");return`"${e.replace(/"/g,""")}"`}function dMe(e){if("individualShift"in e){let t=e.individualShift,r=t[0];if(r==null)return[null,0];let n=[r],a=-r.shift-r.box.depth,o=a;for(let s=1;s{p.softWidth=g});let d=new Ue(s,{classes:"ML__vlist"});if(d.softWidth=g,d.height=c,d.setStyle("height",c,"em"),l>=0)return[[new Ue(d,{classes:"ML__vlist-r"})],c,-l];let h=new Ue(new Ue(null),{classes:"ML__vlist"});h.height=-l,h.setStyle("height",-l,"em");let m=new Ue(8203,{classes:"ML__vlist-s",maxFontSize:0});return m.softWidth=0,m.height=0,m.depth=0,[[new Ue([d,m],{classes:"ML__vlist-r"}),new Ue(h,{classes:"ML__vlist-r"})],c,-l]}function gMe(e,t){var r,n,a,o,s;let l=e.metrics,c=new Ue(t.base),u=(r=t.baseShift)!=null?r:0,g=(n=t.slant)!=null?n:0,d=0,h=0;t.above&&(d=(a=t.aboveShift)!=null?a:Math.max(l.bigOpSpacing1,l.bigOpSpacing3-t.above.depth)),t.below&&(h=(o=t.belowShift)!=null?o:Math.max(l.bigOpSpacing2,l.bigOpSpacing4-t.below.height));let m=null;if(t.below&&t.above){let p=l.bigOpSpacing5+t.below.height+t.below.depth+h+c.depth+u;m=new Bn({bottom:p,children:[l.bigOpSpacing5,{box:t.below,marginLeft:-g,classes:["ML__center"]},h,{box:c,classes:["ML__center"]},d,{box:t.above,marginLeft:g,classes:["ML__center"]},l.bigOpSpacing5]}).wrap(e)}else if(t.below&&!t.above)m=new Bn({top:c.height-u,children:[l.bigOpSpacing5,{box:t.below,marginLeft:-g,classes:["ML__center"]},h,{box:c,classes:["ML__center"]}]}).wrap(e);else if(!t.below&&t.above){let p=c.depth+u;m=new Bn({bottom:p,children:[{box:c,classes:["ML__center"]},d,{box:t.above,marginLeft:g,classes:["ML__center"]},l.bigOpSpacing5]}).wrap(e)}else{let p=c.depth+u;m=new Bn({bottom:p,children:[{box:c},l.bigOpSpacing5]}).wrap(e)}return new Ue(m,{type:(s=t.type)!=null?s:"op"})}function KLt(e,t){var r;if(!e)return 0;let n={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:f0,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(r=e.unit)!=null?r:"pt"];if(Number.isFinite(t)){let a=10**t;return Math.round(e.dimension/f0*n*a)/a}return e.dimension*n}function qLt(e,t){if(e===null)return 0;let r=KLt(e)/f0;if(Number.isFinite(t)){let n=10**t;return Math.round(r*n)/n}return r}function m9(e){var t;return`${e.dimension}${(t=e.unit)!=null?t:"pt"}`}function hMe(e){let t=m9(e.glue);return e.grow&&e.grow.dimension!==0&&(t+=` plus ${m9(e.grow)}`),e.shrink&&e.shrink.dimension!==0&&(t+=` minus ${m9(e.shrink)}`),t}function fa(e){var t,r;if(e==null)return null;let n="";if("dimension"in e&&(n=`${e.dimension}${(t=e.unit)!=null?t:"pt"}`),"glue"in e&&(n=hMe(e)),"number"in e)if(!("base"in e)||e.base==="decimal")n=Number(e.number).toString();else if(e.base==="alpha")n=`\`${String.fromCodePoint(e.number)}`;else{let a=Math.round(e.number)>>>0;e.base==="hexadecimal"?(n=Number(a).toString(16).toUpperCase(),a<=255?n=n.padStart(2,"0"):a<=65535?n=n.padStart(4,"0"):a<=16777215?n=n.padStart(6,"0"):n=n.padStart(8,"0"),n=`"${n}`):e.base==="octal"&&(n=Number(a).toString(8),a<=63?n=n.padStart(2,"0"):a<=30583?n=n.padStart(4,"0"):n=n.padStart(8,"0"),n=`'${n}`)}return"register"in e&&("factor"in e&&(e.factor===-1?n="-":e.factor!==1&&(n=Number(e.factor).toString())),"global"in e&&e.global&&(n+="\\global"),n+=`\\${e.register}`),"string"in e&&(n=e.string),(r=e.relax)!=null&&r&&(n+="\\relax"),n}function Hc(e,t){return e==null?null:"number"in e?zt(Xt({},e),{number:e.number*t}):"register"in e?"factor"in e&&e.factor?zt(Xt({},e),{factor:e.factor*t}):zt(Xt({},e),{factor:t}):"dimension"in e?zt(Xt({},e),{dimension:e.dimension*t}):"glue"in e?e.shrink&&e.grow?{glue:Hc(e.glue,t),shrink:Hc(e.shrink,t),grow:Hc(e.grow,t)}:e.shrink?{glue:Hc(e.glue,t),shrink:Hc(e.shrink,t)}:e.grow?{glue:Hc(e.glue,t),grow:Hc(e.grow,t)}:{glue:Hc(e.glue,t)}:null}function $Lt(){return Xt({},mMe)}function twt(){return{registers:$Lt(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:Fi.locale.startsWith("fr")?"french":"tex",minFontScale:0,maxMatrixCols:10,colorMap:vV,backgroundColorMap:m_,getMacro:e=>I_(e,f_())}}function _m(e){return typeof e=="string"&&I0.includes(e)}function eu(e){return e!==void 0&&Array.isArray(e)&&e.length===2}function pMe(e){let t,r=[],n=[];for(let a of e)if(a.type==="first"&&n.push(a),!t&&!a.style)n.push(a);else{let o=a.style;t&&o.color===t.color&&o.backgroundColor===t.backgroundColor&&o.fontSize===t.fontSize?n.push(a):(n.length>0&&r.push(n),n=[a],t=o)}return n.length>0&&r.push(n),r}function bMe(e,t,r){var n,a,o,s,l;if(!t||t.length===0)return null;let c=new $i({parent:e},r.style),u=!((n=c.atomIdsSettings)!=null&&n.groupNumbers),g=[];if(t.length===1){let h=t[0],m=h.render(c);m&&(u&&h.isSelected&&m.selected(!0),g=[m])}else{let h="",m=!0;for(let p of t){(a=c.atomIdsSettings)!=null&&a.groupNumbers&&h&&(m&&p.isDigit()||!m&&p9(p))&&(c.atomIdsSettings.overrideID=h);let b=p.render(c);c.atomIdsSettings&&(c.atomIdsSettings.overrideID=void 0),b&&((o=c.atomIdsSettings)!=null&&o.groupNumbers&&((p.isDigit()||p9(p))&&(!h||m!==p.isDigit())&&(m=p.isDigit(),h=(s=p.id)!=null?s:""),h&&(!(p.isDigit()||p9(p))||!p.hasEmptyBranch("superscript")||!p.hasEmptyBranch("subscript"))&&(h="")),u&&p.isSelected&&b.selected(!0),g.push(b))}}if(g.length===0)return null;let d=new Ue(g,zt(Xt({isTight:c.isTight},r),{type:(l=r.type)!=null?l:"lift"}));return d.isSelected=g.every(h=>h.isSelected),d.wrap(c)}function p9(e){return e.mode==="text"}function fMe(e){return e.map(t=>t===null?"":Array.isArray(t)&&t[0]instanceof be?{atoms:t.map(r=>r.toJson())}:typeof t=="object"&&"group"in t?{group:t.group.map(r=>r.toJson())}:t)}function IMe(e,t){if(e.direction===t.direction){let r=e.ranges.length;if(t.ranges.length===r){let n=0;for(;n0;)e[u]===s&&c++,e[u]===l&&c--,u++;if(c===0){let g=Do(e.substring(1,u-1),t);t.noWrap&&s==="("?a=g:a=`\\left${(r=TSt[s])!=null?r:s}${g}\\right${(n=TSt[l])!=null?n:l}`,o=e.slice(Math.max(0,u))}else a=e.substring(1,u),o=""}else{let c=e.match(/^([a-zA-Z]+)/);if(c){let u=y_(null,e,t.inlineShortcuts);if(u)return u=u.replace("_{#?}",""),u=u.replace("^{#?}",""),{match:u,rest:e.slice(u.length)}}if(c=e.match(/^([a-zA-Z])/),c)return{match:c[1],rest:e.slice(1)};if(c=e.match(/^(-)?\d+(\.\d*)?/),c)return{match:c[0],rest:e.slice(c[0].length)};/^\\(left|right)/.test(e)||(c=e.match(/^(\\[a-zA-Z]+)/),c&&(o=e.slice(c[1].length),a=c[1]))}return{match:a,rest:o}}function JSt(e,t){let r=y_(null,e,t);return r?(r=r.replace("_{#?}",""),r=r.replace("^{#?}",""),r+=" "):r=e,r}function C_(e){let t=e.trim();for(let r of nwt)if(t.startsWith(r[0])&&t.endsWith(r[1]))return[!0,t.substring(r[0].length,t.length-r[1].length)];return[!1,e]}function CMe(e){if(e=e.trim(),e.length<=1)return["latex",e];let t;return[t,e]=C_(e),t?["latex",e]:e.startsWith("`")&&e.endsWith("`")?(e=e.substring(1,e.length-1),["ascii-math",e]):e.includes("\\")?["latex",e]:/\$.+\$/.test(e)?["latex",`\\text{${e}}`]:[void 0,e]}function Pd(e){var t;return((t=e.element)==null?void 0:t.mathfield)===e}function XMe(e){var t,r;return(r=(t=e.querySelector(".ML__caret"))!=null?t:e.querySelector(".ML__text-caret"))!=null?r:e.querySelector(".ML__latex-caret")}function _F(e){let t=XMe(e);if(!t)return null;let r=t.getBoundingClientRect();return{x:r.right,y:r.bottom,height:r.height}}function WMe(e){var t;if(!e.parent)return"root";let r=(t=e.parent.id)!=null?t:"";return r+=typeof e.parentBranch=="string"?"-"+e.parentBranch:`-${e.parentBranch[0]}/${e.parentBranch[0]}`,r}function owt(e,t,r){if(!t)return null;let n=e.field.getBoundingClientRect(),a=t.right-t.left,o=t.bottom-t.top,s=Math.ceil(t.left-n.left+e.field.scrollLeft*r),l=Math.ceil(t.top-n.top);return{left:s,right:s+a,top:l,bottom:l+o}}function _9(e){let t=e,r=t.getBoundingClientRect();for(;r.bottom===r.top&&t.parentElement instanceof Element&&(t=t.parentElement,r=t.getBoundingClientRect(),r.bottom===r.top););let n=getComputedStyle(t),a=parseInt(n.marginRight),o=r.right-r.left,s=r.bottom-r.top;if(o===0||!Number.isFinite(o)){let c=parseFloat(n.width);Number.isFinite(c)&&c>0?o=c:t instanceof HTMLElement&&t.offsetWidth>0&&(o=t.offsetWidth)}if(s===0||!Number.isFinite(s)){let c=parseFloat(n.height);Number.isFinite(c)&&c>0?s=c:t instanceof HTMLElement&&t.offsetHeight>0&&(s=t.offsetHeight)}let l={top:r.top-1,bottom:r.top-1+s,left:r.left,right:r.left+o-1+a};if(e.children.length===0||e.tagName.toUpperCase()==="SVG")return l;for(let c of e.children)if(c.nodeType===1&&"atomId"in c.dataset&&!c.classList.contains("ML__pstrut")){let u=_9(c);l.left=Math.min(l.left,u.left),l.right=Math.max(l.right,u.right),l.top=Math.min(l.top,u.top),l.bottom=Math.max(l.bottom,u.bottom)}return l}function ap(e,t){var r,n;if(!t.id)return null;let a=(n=(r=e.atomBoundsCache)==null?void 0:r.get(t.id))!=null?n:null;if(a!==null)return a;let o=e.field.querySelectorAll(`[data-atom-id="${t.id}"]`),s=Array.from(o);if(t.type==="prompt"){for(let l of s)if(l.classList.contains("ML__prompt-atom")){let c=l.querySelector(".ML__prompt");if(c){let u=_9(c);a?(a.left=Math.min(a.left,u.left),a.right=Math.max(a.right,u.right),a.top=Math.min(a.top,u.top),a.bottom=Math.max(a.bottom,u.bottom)):a=u}}}for(let l of s){let c=_9(l);a?(a.left=Math.min(a.left,c.left),a.right=Math.max(a.right,c.right),a.top=Math.min(a.top,c.top),a.bottom=Math.max(a.bottom,c.bottom)):a=c}return e.atomBoundsCache&&(a?e.atomBoundsCache.set(t.id,a):e.atomBoundsCache.delete(t.id)),a??null}function FMe(e,t){let[r,n]=t,a=null;for(let o=r;o<=n;o++){let s=ap(e,e.model.at(o));s&&(a?(a.top=Math.min(a.top,s.top),a.bottom=Math.max(a.bottom,s.bottom),a.left=Math.min(a.left,s.left),a.right=Math.max(a.right,s.right)):a=s)}return a??{top:0,bottom:0,left:0,right:0}}function VMe(e,t,r){let n=new Map,a=e.field,o=a.offsetWidth,s=Math.floor(a.getBoundingClientRect().width)/o;s=isNaN(s)?1:s;for(let l of e.model.getAtoms(t,{includeChildren:!0})){if(r!=null&&r.excludeAtomsWithBackground&&l.style.backgroundColor)continue;let c=owt(e,ap(e,l),s);if(c){let u=WMe(l);if(n.has(u)){let g=n.get(u);n.set(u,{left:Math.min(g.left,c.left),right:Math.max(g.right,c.right),top:Math.min(g.top,c.top),bottom:Math.max(g.bottom,c.bottom)})}else n.set(u,c)}}return[...n.values()]}function swt(e,t){return e.model.selection.ranges.reduce((r,n)=>r.concat(...VMe(e,n,t)),[])}function x_(e,t){return e==="*"||t==="none"?!0:t==="same-origin"?!window.origin||e===window.origin:typeof t=="function"?t(e):!1}function lwt(e){let t=0,r=0,n=e.offsetWidth,a=e.offsetHeight;for(;e instanceof HTMLElement;)t+=e.offsetTop,r+=e.offsetLeft,e=e.offsetParent;return new DOMRect(r,t,n,a)}function cwt(e,t){if(!e)return;let r=e.model.at(t);if(!r)return;let n={},a=ap(e,r);a&&(n.bounds=new DOMRect(a.left,a.top,a.right-a.left,a.bottom-a.top)),n.depth=r.treeDepth-2,n.style=r.style;let o=r;for(;o;){if(o.command==="\\htmlData"&&o.args&&typeof o.args[0]=="string"){let s=o.args[0].split(",");for(let l of s){let c=l.match(/([^=]+)=(.+$)/);if(c){let u=c[1].trim().replace(/ /g,"-");u&&(n.data||(n.data={}),n.data[u]=c[2])}else{let u=l.trim().replace(/ /g,"-");u&&(n.data||(n.data={}),n.data[u]=void 0)}}}(o.command==="\\htmlId"||o.command==="\\cssId")&&!n.id&&o.args&&typeof o.args[0]=="string"&&(n.id=o.args[0]),o=o.parent}return(r.mode==="math"||r.mode==="text")&&(n.latex=be.serialize([r],{defaultMode:"math"})),n}function kMe(e,t){let r=e.model.at(t);for(;r;){if(r.command==="\\href"){let n=r.args[0];if(typeof n=="string")return n}r=r.parent}return""}function Qg(e){let t="";switch(e){case"mathfield-element":t=` :host { display: inline-block; background-color: field; color: fieldtext; border-width: 1px; border-style: solid; border-color: #acacac; border-radius: 2px;} :host([hidden]) { display: none; } :host([disabled]), :host([disabled]:focus), :host([disabled]:focus-within) { outline: none; opacity: .5; } :host(:focus), :host(:focus-within) { outline: Highlight auto 1px; /* For Firefox */ outline: -webkit-focus-ring-color auto 1px; } :host([readonly]:focus), :host([readonly]:focus-within), :host([read-only]:focus), :host([read-only]:focus-within) { outline: none; }`;break;case"core":t=LMe;break;case"mathfield":t=SMe;break;case"environment-popover":t=wMe;break;case"suggestion-popover":t=UMe;break;case"keystroke-caption":t=YMe;break;case"virtual-keyboard":t=EMe;break;case"ui":t=NMe;break;case"menu":t=OMe;break;default:}return t}function Mm(e){return jm||(jm={}),jm[e]||(jm[e]=new CSSStyleSheet,jm[e].replaceSync(Qg(e))),jm[e]}function iu(e){var t;try{if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${e}`))return;let r=window.document.createElement("style");r.id=`mathlive-style-${e}`,r.append(window.document.createTextNode(Qg(e))),window.document.head.appendChild(r);return}if(qd||(qd={}),((t=qd[e])!=null?t:0)!==0)qd[e]+=1;else{let r=Mm(e);document.adoptedStyleSheets=[...document.adoptedStyleSheets,r],qd[e]=1}}catch(r){console.error("Error injecting stylesheet",e,r)}}function jg(e){if("adoptedStyleSheets"in document&&qd!=null&&qd[e]&&(qd[e]-=1,qd[e]<=0)){let t=jm[e];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(r=>r!==t)}}function RV(e){var t;return(t={"[":91,"]":93,"(":40,")":41,"\\mid":8739,"|":8739,"\u2223":8739,"\u2225":8741,"\\|":8739,"\\{":123,"\\}":125,"\\lbrace":123,"\\rbrace":125,"\\lparen":40,"\\rparen":41,"\\lbrack":91,"\\rbrack":93,"\\vert":8739,"\\lvert":8739,"\\mvert":8739,"\\rvert":8739,"\\Vert":8741,"\\lVert":8741,"\\mVert":8741,"\\rVert":8741,"\\parallel":8741,"\\shortparallel":8741,"\\langle":10216,"\\rangle":10217,"\\lfloor":8970,"\\rfloor":8971,"\\lceil":8968,"\\rceil":8969,"\\ulcorner":9484,"\\urcorner":9488,"\\llcorner":9492,"\\lrcorner":9496,"\\lgroup":10222,"\\rgroup":10223,"\\lmoustache":9136,"\\rmoustache":9137,"\\surd":8730}[e])!=null?t:e.codePointAt(0)}function QMe(e,t,r,n){var a;let o=new Ue(RV(e),{fontFamily:"Main-Regular",isSelected:n.isSelected,classes:"ML__small-delim "+((a=n.classes)!=null?a:"")}).wrap(t);return r&&o.setTop((1-t.scalingFactor)*Pl),o}function uwt(e,t,r,n,a){var o,s;let l=new $i({parent:n,mathstyle:"textstyle"},a?.style),c=new Ue(RV(e),{fontFamily:`Size${t}-Regular`,isSelected:a.isSelected,classes:((o=a.classes)!=null?o:"")+` ML__delim-size${t}`,type:(s=a.type)!=null?s:"ignore"}).wrap(l);return r&&c.setTop((1-l.scalingFactor)*Pl),c}function gwt(e,t,r,n,a){var o;let s,l,c,u;s=c=u=RV(e),l=null;let g="Size1-Regular";e==="\\vert"||e==="\\lvert"||e==="\\rvert"||e==="\\mvert"||e==="\\mid"?c=s=u=8739:e==="\\Vert"||e==="\\lVert"||e==="\\rVert"||e==="\\mVert"||e==="\\|"?c=s=u=8741:e==="\\uparrow"?c=u=9168:e==="\\Uparrow"?c=u=8214:e==="\\downarrow"?s=c=9168:e==="\\Downarrow"?s=c=8214:e==="\\updownarrow"?(s=8593,c=9168,u=8595):e==="\\Updownarrow"?(s=8657,c=8214,u=8659):e==="["||e==="\\lbrack"?(s=9121,c=9122,u=9123,g="Size4-Regular"):e==="]"||e==="\\rbrack"?(s=9124,c=9125,u=9126,g="Size4-Regular"):e==="\\lfloor"||e==="\u230A"?(c=s=9122,u=9123,g="Size4-Regular"):e==="\\lceil"||e==="\u2308"?(s=9121,c=u=9122,g="Size4-Regular"):e==="\\rfloor"||e==="\u230B"?(c=s=9125,u=9126,g="Size4-Regular"):e==="\\rceil"||e==="\u2309"?(s=9124,c=u=9125,g="Size4-Regular"):e==="("||e==="\\lparen"?(s=9115,c=9116,u=9117,g="Size4-Regular"):e===")"||e==="\\rparen"?(s=9118,c=9119,u=9120,g="Size4-Regular"):e==="\\{"||e==="\\lbrace"?(s=9127,l=9128,u=9129,c=9130,g="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(s=9131,l=9132,u=9133,c=9130,g="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(s=9127,u=9129,c=9130,g="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(s=9131,u=9133,c=9130,g="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(s=9127,u=9133,c=9130,g="Size4-Regular"):e==="\\rmoustache"||e==="\u23B1"?(s=9131,u=9129,c=9130,g="Size4-Regular"):e==="\\surd"?(s=57345,u=9143,c=57344,g="Size4-Regular"):e==="\\ulcorner"?(s=9484,c=u=32):e==="\\urcorner"?(s=9488,c=u=32):e==="\\llcorner"?(u=9492,c=s=32):e==="\\lrcorner"&&(s=9496,c=s=32);let d=o0(s,g),h=d.height+d.depth,m=o0(c,g),p=m.height+m.depth,b=o0(u,g),f=b.height+b.depth,v=0,y=1;if(l!==null){let T=o0(l,g);v=T.height+T.depth,y=2}let x=h+f+v,C=Math.max(0,Math.ceil((t-x)/(y*p))),I=x+C*y*p,Z=Pl;r&&(Z=Z*n.scalingFactor);let F=I/2-Z,R=.008,X=[];X.push({box:new Ue(u,{fontFamily:g})}),X.push(-R);let S=new Ue(c,{fontFamily:g});if(l===null)for(let T=0;T"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),hwt.has(e)||mwt.has(e)?uwt(e,t,!1,r,n):TMe.has(e)?gwt(e,JMe[t],!1,r,n):(""+e,null))}function DMe(e){return e.type==="small"?"Main-Regular":e.type==="large"?"Size"+e.size+"-Regular":(e.type,"Size4-Regular")}function MMe(e,t,r,n){let a={"-4":0,"-3":1,0:2}[n.mathstyle.sizeDelta];for(let o=a;ot)return r[o]}return r[r.length-1]}function lV(e,t,r,n,a,o){if(!t||t.length===0||t===".")return op(a);t==="<"||t==="\\lt"?t="\\langle":(t===">"||t==="\\gt")&&(t="\\rangle");let s;mwt.has(t)?s=_Me:hwt.has(t)?s=zMe:s=jMe;let l=MMe(RV(t),r,s,a),c=new $i({parent:a,mathstyle:l.mathstyle},o?.style);return l.type==="small"?QMe(t,c,n,zt(Xt({},o),{type:e})):l.type==="large"?uwt(t,l.size,n,c,zt(Xt({},o),{type:e})):(l.type,gwt(t,r,n,c,zt(Xt({},o),{type:e})))}function A1(e,t,r,n,a,o){if(t===".")return op(a,o?.classes);let s=Pl*a.scalingFactor,l=901,c=5/f0,u=Math.max(r-s,n+s),g=Math.max(u/500*l,2*u-c);return lV(e,t,g,!0,a,o)}function op(e,t){let r=new Ue(null,{classes:" ML__nulldelimiter "+(t??""),type:"ignore"});return r.width=e.getRegisterAsEm("nulldelimiterspace"),r.wrap(new $i({parent:e,mathstyle:"textstyle"}))}function KMe(e){return fwt.includes(e)||j9.includes(e)||j9.includes(e)||bwt.includes(e)||PMe.includes(e)}function Iwt(e){return bwt.includes(e)}function qMe(e){return j9.includes(e)}function $Me(e){return fwt.includes(e)}function t6e(e,t,r){let n=0;for(let u of r.columns)"align"in u&&(n+=1);n=Math.max(n,r.minColumns);let a=0,o=[];for(let u of t){a=Math.max(a,Math.min(u.length,n));let g=0;for(;g0&&o[o.length-1].length===1&&n6e(o[o.length-1][0])&&o.pop();let s=[];for(let u of o){if(u.length!==a)for(let g=u.length;g0&&e.every(t=>t.type==="first")}function i6e(e,t,r){let n=new Ue(null,{classes:"ML__empty-line-anchor"}),a=e[0];a&&(a.id||(a.id=t.makeID()),n.atomID=a.id),n.setStyle("display","inline-block"),n.setStyle("width",0),n.setStyle("position","relative"),n.setStyle("height",Math.max(0,r.height+r.depth),"em"),n.setStyle("vertical-align",-r.depth,"em"),n.height=r.height,n.depth=r.depth;let o=e.find(s=>s.caret);return o!=null&&o.caret&&(n.caret=o.caret),e.some(s=>s.isSelected)&&n.selected(!0),n}function r6e(e,t){return e.length===0?[new be({type:"first",mode:t})]:e[0].type!=="first"?[new be({type:"first",mode:t}),...e]:(e.slice(1).some(r=>r.type==="first"),e)}function n6e(e){return e.length===1&&e[0].type==="first"}function yF(e,t=!1){let r=new be({type:"first",mode:e.mode});r.parent=e;let n=[r];if(t){let a=new Kl;a.parent=e,n.push(a)}return n}function Om(e){for(let t=0;t|<$>||<{>|<}>|#[0-9\?]|\\.+)$/.test(e):!1}function xo(e,t){var r,n,a,o;let s=(r=t?.args)!=null?r:void 0,l=new Lwt(Z1(e,s),t?.context,{args:s,mathstyle:(n=t?.mathstyle)!=null?n:"displaystyle",parseMode:(a=t?.parseMode)!=null?a:"math",style:(o=t?.style)!=null?o:{}}),c=[];for(;!l.end();)c.push(...l.scan(()=>!1));return c}function s6e(e,t){var r;let n=new Lwt(Z1(e,null),t?.context,{mathstyle:"displaystyle",parseMode:(r=t?.parseMode)!=null?r:"math"});for(;!n.end();)n.scan();return n.errors}function qf(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}function xF(e){return typeof e=="number"?`${Math.floor(100*e)/100}%`:e}function l6e(e){if(!e)return"1px";let t=e.match(/([0-9][a-zA-Z\%]+)/);return t===null?"1px":t[1]}function c6e(e){return(Math.floor(100*e.metrics.sqrtRuleThickness/e.scalingFactor)/100/10).toString()+"em"}function HSt(e){let t=e.isDisplayStyle?$d:e.metrics.defaultRuleThickness;return e.metrics.defaultRuleThickness+e.scalingFactor*t/4}function ZF(e){var t;return(t={left:"ML__left",right:"ML__right",center:"ML__center"}[e])!=null?t:"ML__center"}function d6e(e,t){if(!t.base)return null;if(!t.above&&!t.below){let l=new Ue(t.base,{type:t.type});return l.setStyle("position","relative"),l}let r=0;t.above&&(r=e.metrics.bigOpSpacing5);let n=null,a=t.base,o=0,s=["ML__center"];if(t.paddedAboveBelow&&s.push("ML__label_padding"),t.below&&t.above){let l=e.metrics.bigOpSpacing5+t.below.height+t.below.depth+a.depth+o;n=new Bn({bottom:l,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:s},{box:a,classes:["ML__center"]},r,{box:t.above,classes:s},e.metrics.bigOpSpacing5]})}else t.below?n=new Bn({top:a.height-o,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:s},{box:a,classes:["ML__center"]}]}):t.above&&(n=new Bn({bottom:a.depth+o,children:[{box:a,classes:["ML__center"]},r,{box:t.above,classes:s},e.metrics.bigOpSpacing5]}));return new Ue(n,{type:t.type})}function zF(e,t){if(!e.parent)return;let r=e.parent.children,n=r.indexOf(e),a=n-1;for(;a>=0&&r[a].type==="ignore";)a-=1;if(a<0&&e.parent.parent&&e.parent.type==="lift"){zF(e.parent,t);return}n>0&&r[n-1].type==="skip"?r[n-1].width+=t:r.splice(n,0,new u6e(t))}function m6e(e){m1(e,(t,r)=>{r.type==="bin"&&(!t||/^(middle|bin|op|rel|open|punct)$/.test(t.type))&&(r.type="ord"),t?.type==="bin"&&/^(rel|close|punct)$/.test(r.type)&&(t.type="ord"),r.type!=="ignore"&&(t=r)})}function w1(e,t){if(!e.children)return e;let r=e.children;m6e(r);let n=t.getRegisterAsEm("thinmuskip"),a=t.getRegisterAsEm("medmuskip"),o=t.getRegisterAsEm("thickmuskip");return m1(r,(s,l)=>{var c,u,g;if(!s)return;let d=s.type,h=l.isTight?(c=h6e[d])!=null?c:null:(u=g6e[d])!=null?u:null,m=(g=h?.[l.type])!=null?g:null;m===3&&zF(l,n),m===4&&zF(l,a),m===5&&zF(l,o)}),e}function m1(e,t,r=void 0){if(!e)return r;e=[...e];for(let n of e)n.type==="lift"?r=m1(n.children,t,r):n.type==="ignore"?m1(n.children,t):(t(r,n),m1(n.children,t),r=n);return r}function _g(e){if($n(e))return e.map(n=>_g(n));if(typeof e=="string")return be.fromJson(e);e=Xt({},e);for(let n of I0)e[n]&&(e[n]=_g(e[n]));e.args&&(e.args=p6e(e.args)),e.array&&(e.array=_g(e.array));let t=e.type,r;t==="accent"&&(r=xV.fromJson(e)),t==="array"&&(r=Ui.fromJson(e)),t==="box"&&(r=zg.fromJson(e)),t==="chem"&&(r=wwt.fromJson(e)),t==="composition"&&(r=ywt.fromJson(e)),t==="delim"&&(r=Ywt.fromJson(e)),t==="enclose"&&(r=S1.fromJson(e)),t==="error"&&(r=zm.fromJson(e)),t==="extensible-symbol"&&(r=Z_.fromJson(e)),t==="genfrac"&&(r=lp.fromJson(e)),t==="group"&&(r=Zwt.fromJson(e)),t==="latex"&&(r=Kn.fromJson(e)),t==="latexgroup"&&(r=h1.fromJson(e)),t==="leftright"&&(r=qr.fromJson(e)),t==="macro"&&(r=Xwt.fromJson(e)),t==="macro-argument"&&(r=o6e.fromJson(e)),t==="operator"&&(r=dp.fromJson(e)),t==="overlap"&&(r=cp.fromJson(e)),t==="overunder"&&(r=ll.fromJson(e)),t==="placeholder"&&(r=Kl.fromJson(e)),t==="prompt"&&(r=Vwt.fromJson(e)),t==="phantom"&&(r=C0.fromJson(e)),t==="sizeddelim"&&(r=Nwt.fromJson(e)),t==="spacing"&&(r=L1.fromJson(e)),t==="subsup"&&(r=AV.fromJson(e)),t==="surd"&&(r=Pwt.fromJson(e)),t==="text"&&(r=y0.fromJson(e)),t==="tooltip"&&(r=R_.fromJson(e)),r||(!t||["first","mbin","mrel","mclose","minner","mop","mopen","mord","mpunct","root","space"].includes(t),`${t}`,r=be.fromJson(e));for(let n of I0)e[n]&&r.setChildren(e[n],n);return e.verbatimLatex!==void 0&&(r.verbatimLatex=e.verbatimLatex),e.subsupPlacement&&(r.subsupPlacement=e.subsupPlacement),e.explicitSubsupPlacement&&(r.explicitSubsupPlacement=!0),e.isFunction&&(r.isFunction=!0),e.skipBoundary&&(r.skipBoundary=!0),e.captureSelection&&(r.captureSelection=!0),r}function p6e(e){if(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>t===""?null:typeof t=="object"&&"group"in t?{group:t.group.map(r=>_g(r))}:typeof t=="object"&&"atoms"in t?t.atoms.map(r=>_g(r)):t)}}function A_(e,t){!e||!t||($n(e)?e.forEach(r=>A_(r,t)):typeof e=="object"&&e.applyStyle(t,{unstyledOnly:!0}))}function z9(e,t,r,n){function a(s,l){for(let c of o)if(c.style[s]!==l)return!1;return!0}if(t=e.normalizeRange(t),t[0]===t[1])return!1;let o=e.getAtoms(t,{includeChildren:!0});n.operation==="toggle"&&(r.color&&a("color",r.color)&&(r.color="none",delete r.verbatimColor),r.backgroundColor&&a("backgroundColor",r.backgroundColor)&&(r.backgroundColor="none",delete r.verbatimBackgroundColor),r.fontFamily&&a("fontFamily",r.fontFamily)&&(r.fontFamily="none"),r.fontSeries&&a("fontSeries",r.fontSeries)&&(r.fontSeries="auto"),r.fontShape&&a("fontShape",r.fontShape)&&(r.fontShape="auto"),r.fontSize&&a("fontSize",r.fontSize)&&(r.fontSize=v_),r.variant&&a("variant",r.variant)&&(r.variant="normal"),r.variantStyle&&a("variantStyle",r.variantStyle)&&(r.variantStyle=""));for(let s of o)s.applyStyle(r);return!0}function b6e(e){return{up:"italic",bold:"bolditalic",italic:"italic",bolditalic:"bolditalic","":"italic"}[e??""]}function BV(e){return{up:"up",bold:"bold",italic:void 0,bolditalic:"bold","":void 0}[e??""]}function Mo(e,t=[[[]]],r=[],n=[],a){switch(e){case"math":return new Ui(e,t,r,{mathstyleName:"textstyle",isRoot:!0,minColumns:1,maxColumns:1,minRows:1,maxRows:1});case"displaymath":return new Ui(e,t,r,{mathstyleName:"textstyle",isRoot:!0,minColumns:1,maxColumns:1,minRows:1,maxRows:1});case"center":return new Ui(e,t,r,{columns:[{align:"c"}],classes:["ML__center_environment"],isRoot:!0,minColumns:1,maxColumns:1,minRows:1,maxRows:1});case"multline":case"multline*":return new Ui(e,t,r,{columns:[{align:"m"}],leftDelim:".",rightDelim:".",isRoot:!0,minColumns:1,maxColumns:1,minRows:1});case"split":return new Ui(e,t,r,{columns:[{align:"r"},{align:"l"}],minColumns:2,minRows:1,isRoot:!1});case"gather":case"gather*":return new Ui(e,t,r,{columns:[{gap:.25},{align:"c"},{gap:0}],minColumns:1,maxColumns:1,minRows:1,isRoot:!0,classes:["ML__gather_environment"]});case"gathered":return new Ui(e,t,r,{columns:[{gap:.25},{align:"c"},{gap:0}],minColumns:1,maxColumns:1,minRows:1});case"equation":case"equation*":case"subequations":return new Ui(e,t,r,{columns:[{align:"c"}],isRoot:!0,minColumns:1,maxColumns:1,minRows:1});case"aligned":{let o=0;for(let c of t)o=Math.max(o,c.length);let s=[{gap:0},{align:"r"},{gap:.25},{align:"l"}],l=2;for(;l0&&t.push({gap:1}),t.push({align:"l"});return t}function y6e(e,t){return nu(e,"bold").map(r=>{if(Q9(r[0])!=="bold"||Q9(r[0].parent)==="bold")return ki(AF(r,t));let n=ki(r.map(a=>{var o;return(o=a.value)!=null?o:""}));return/^[a-zA-Z0-9]+$/.test(n)?Zr("\\mathbf",ki(AF(r,t))):Zr("\\bm",ki(AF(r,t)))})}function AF(e,t){let{parent:r}=e[0],n=T9(r);return nu(e,"variant").map(a=>{let o=T9(a[0]),s="";o&&o!==n&&(s={calligraphic:"\\mathcal","calligraphic-uo":"\\mathcal",fraktur:"\\mathfrak","fraktur-uo":"\\mathfrak","double-struck":"\\mathbb","double-struck-uo":"\\mathbb",script:"\\mathscr","script-uo":"\\mathscr",monospace:"\\mathtt","monospace-uo":"\\mathtt","sans-serif":"\\mathsf","sans-serif-uo":"\\mathsf",normal:"","normal-up":"\\mathrm","normal-italic":"\\mathnormal","normal-bold":"","normal-bolditalic":"\\mathbfit",ams:"","ams-up":"\\mathrm","ams-italic":"\\mathit","ams-bold":"","ams-bolditalic":"\\mathbfit",main:"","main-up":"\\mathrm","main-italic":"\\mathit","main-bold":"","main-bolditalic":"\\mathbfit"}[o]);let l="",c=a[a.length-1],u=s&&a.length>0&&(c.branch("subscript")!==void 0||c.branch("superscript")!==void 0);u&&(l=c.supsubToLatex(t));let g=ki(a.map((d,h)=>{if(u&&h===a.length-1){let m=qn(d.command,d.mode);return m!=null&&m.serialize?m.serialize(d,t):d.body&&d.command?Zr(d.command,d.bodyToLatex(t)):d.body?d.bodyToLatex(t):!d.value||d.value==="\u200B"?"":d.command||d.value}return d._serialize(t)}));return s?Zr(s,g)+l:g})}function C6e(e,t){return e.map(r=>r._serialize(t))}function x6e(e,t){return nu(e,"fontShape").map(r=>{let n=C6e(r,t),{fontShape:a}=r[0].style,o="";return a==="it"&&(o="\\textit"),a==="sl"&&(o="\\textsl"),a==="sc"&&(o="\\textsc"),a==="n"&&(o="\\textup"),!o&&a?`{${Zr("\\fontshape",a)}${ki(n)}}`:o?Zr(o,ki(n)):ki(n)})}function Z6e(e,t){return nu(e,"fontSeries").map(r=>{let n=x6e(r,t),{fontSeries:a}=r[0].style,o="";return a==="b"&&(o="\\textbf"),a==="l"&&(o="\\textlf"),a==="m"&&(o="\\textmd"),a&&!o?`{${Zr("\\fontseries",a)}${ki(n)}}`:o?Zr(o,ki(n)):ki(n)})}function R6e(e,t){return nu(e,"fontSize").map(r=>{var n,a;let o=Z6e(r,t),s=(a=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(n=r[0].style.fontSize)!=null?n:""])!=null?a:"";return s?`${s} ${ki(o)}`:ki(o)})}function A6e(e,t,r){return nu(e,"fontFamily").map(n=>{var a;r=r&&!n.every(c=>c.style.fontFamily||c.style.fontShape||c.style.fontSeries||c.style.fontSize);let o=R6e(n,t),{fontFamily:s}=n[0].style,l=(a={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[s??""])!=null?a:"";return l?`\\${l}{${ki(o)}}`:s?`{\\fontfamily{${n[0].style.fontFamily}} ${ki(o)}}`:r?`\\text{${ki(o)}}`:ki(o)})}function B_(e){var t;let r=/macos|ios/.test(G0()),n=e.split("+"),a="";for(let o of n)a&&(a+=r?"\u2009":'+'),o.startsWith("[Key")?a+=o.slice(4,5):o.startsWith("Key")?a+=o.slice(3,4):o.startsWith("[Digit")?a+=o.slice(6,7):o.startsWith("Digit")?a+=o.slice(5,6):a+=(t={cmd:"\u2318",meta:r?"\u2318":"Ctrl",shift:r?"\u21E7":"Shift",alt:r?"\u2325":"Alt",ctrl:r?"\u2303":"Ctrl","\n":r?"\u23CE":"Return","[return]":r?"\u23CE":"Return","[enter]":r?"\u2324":"Enter","[tab]":r?"\u21E5":"Tab","[escape]":"Esc","[backspace]":r?"\u232B":"Backspace","[delete]":r?"\u2326":"Del","[pageup]":r?"\u21DE":"Page Up","[pagedown]":r?"\u21DF":"Page Down","[home]":r?"\u2912":"Home","[end]":r?"\u2913":"End","[space]":"Space","[equal]":"=","[minus]":"-","[comma]":",","[slash]":"/","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",help:"help",left:"\u21E0",up:"\u21E1",right:"\u21E2",down:"\u21E3","[arrowleft]":"\u21E0","[arrowup]":"\u21E1","[arrowright]":"\u21E2","[arrowdown]":"\u21E3"}[o.toLowerCase()])!=null?t:o.toUpperCase();return a}function cV(e){if(e instanceof MouseEvent||e instanceof PointerEvent)return{x:e.clientX,y:e.clientY};if(typeof TouchEvent<"u"&&e instanceof TouchEvent){let t=[...e.touches].reduce((n,a)=>({x:n.x+a.clientX,y:n.y+a.clientY}),{x:0,y:0}),r=e.touches.length;return{x:t.x/r,y:t.y/r}}}function qm(e){let t={alt:!1,control:!1,shift:!1,meta:!1};return(e instanceof MouseEvent||e instanceof PointerEvent||typeof TouchEvent<"u"&&e instanceof TouchEvent||e instanceof KeyboardEvent)&&(e.altKey&&(t.alt=!0),e.ctrlKey&&(t.control=!0),e.metaKey&&(t.meta=!0),e.shiftKey&&(t.shift=!0)),t}function W6e(e,t){return!e&&t||e&&!t?!1:!e||!t?!0:e.alt===t.alt&&e.control===t.control&&e.shift===t.shift&&e.meta===t.meta}function B1(e){return e.ctrlKey||e.metaKey||["Dead","Process"].includes(e.key)?!1:e.code===""?!0:F6e.has(e.code)}function dV(){var e;let t=document.activeElement;for(;(e=t?.shadowRoot)!=null&&e.activeElement;)t=t.shadowRoot.activeElement;return t}function V6e(e,t,r){let n=null,a=null,o=!1,s=!1,l=!1,c=new AbortController,u=c.signal;return e.addEventListener("keydown",g=>{if(o||g.key==="Process"||g.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(g.code)){n=null;return}n=g,a=null,r.onKeystroke(g)?e.textContent="":n=null},{capture:!0,signal:u}),e.addEventListener("keypress",g=>{o||(n&&a&&r.onKeystroke(n),a=g)},{capture:!0,signal:u}),e.addEventListener("compositionstart",g=>{e.textContent="",o=!0,r.onCompositionStart(g.data)},{capture:!0,signal:u}),e.addEventListener("compositionupdate",g=>{o&&r.onCompositionUpdate(g.data)},{capture:!0,signal:u}),e.addEventListener("compositionend",g=>{e.textContent="",o&&(o=!1,r.onCompositionEnd(g.data))},{capture:!0,signal:u}),e.addEventListener("beforeinput",g=>g.stopImmediatePropagation(),{signal:u}),e.addEventListener("input",g=>{var d;if(!o&&(e.textContent="",g.inputType!=="insertCompositionText")){if(g.inputType==="insertFromPaste"){g.preventDefault(),g.stopPropagation();return}r.onInput((d=g.data)!=null?d:""),g.preventDefault(),g.stopPropagation()}},{signal:u}),e.addEventListener("paste",g=>{e.focus({preventScroll:!0}),e.textContent="",r.onPaste(g)||g.preventDefault(),g.stopImmediatePropagation()},{signal:u}),e.addEventListener("cut",g=>r.onCut(g),{capture:!0,signal:u}),e.addEventListener("copy",g=>r.onCopy(g),{capture:!0,signal:u}),e.addEventListener("blur",g=>{var d,h;if(((h=(d=g.relatedTarget)==null?void 0:d._mathfield)==null?void 0:h.element)===t){e.focus({preventScroll:!0}),g.preventDefault(),g.stopPropagation();return}let m=!1,p=g.relatedTarget;for(;p;){if(p.classList.contains("ML__keyboard")){m=!0;break}p=p.parentElement}if(m){e.focus({preventScroll:!0}),g.preventDefault(),g.stopPropagation();return}let b=Ml.state;if(b==="open"||b==="opening"){g.preventDefault(),g.stopPropagation();return}if(g.relatedTarget===g.target.getRootNode().host){g.preventDefault(),g.stopPropagation();return}l||s||(l=!0,n=null,a=null,r.onBlur(),l=!1)},{capture:!0,signal:u}),e.addEventListener("focus",g=>{l||s||(s=!0,r.onFocus(),s=!1)},{capture:!0,signal:u}),{dispose:()=>c.abort(),cancelComposition:()=>{o&&(typeof e.blur=="function"&&e.blur(),requestAnimationFrame(()=>e.focus({preventScroll:!0})))},blur:()=>{typeof e.blur=="function"&&(l=!0,e.blur(),l=!1)},focus:()=>{!s&&typeof e.focus=="function"&&(s=!0,e.focus({preventScroll:!0}),s=!1)},hasFocus:()=>dV()===e,setAriaLabel:g=>e.setAttribute("aria-label",g),setValue:g=>{var d;e.textContent!==g&&(e.textContent=g,e.style.left="-1000px",(d=window.getSelection())==null||d.selectAllChildren(e))},moveTo:(g,d)=>{e.style.top=`${d}px`,e.style.left=`${g}px`}}}function r0(e){var t;if(!e||!B1(e))return"";let r;return e.key==="Unidentified"&&e.target&&(r=e.target.value),r=(t=r??e.key)!=null?t:e.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(r)&&(r=""),r}function eUt(e){e=WDe(e);let t=[];return e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),t.length===0?`[${e.code}]`:(t.push(`[${e.code}]`),t.join("+"))}function k6e(e){if(sl()){let t=G0(),r=e.startsWith("!"),n=e.endsWith(t);if(r&&!n||!r&&n)return!0}return e==="!other"?!1:e==="other"}function S6e(e,t,r){if(e.length===0)return"";let n=n0(OLt(eUt(r))),a=n0({key:r.key,shift:r.shiftKey,alt:r.altKey,ctrl:r.ctrlKey,meta:r.metaKey||r.ctrlKey&&/macos|ios/.test(G0()),cmd:!1,win:!1});for(let o=e.length-1;o>=0;o--)if((e[o].key===n||e[o].key===a)&&(!e[o].ifMode||e[o].ifMode===t))return e[o].command;return""}function PSt(e){let t=e;return $n(t)&&(t=t.length>0?t[0]+"("+t.slice(1).join("")+")":""),t}function L6e(e,t){let r=[];if(typeof t=="string"){let o=BMe[t];$n(o)?r=o.slice():o&&r.push(o)}let n=PSt(t),a=new RegExp("^"+n.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(let o of e)a.test(PSt(o.command))&&r.push(o.key);return r.map(B_)}function w6e(e,t){if(e.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(e.ifPlatform))throw new Error(`Unexpected platform "${e.ifPlatform}" for keybinding ${e.key}`);if(e.ifLayout!==void 0&&(t.score===0||!e.ifLayout.includes(t.id)))return;let r=OLt(e.key),n=e.ifPlatform;if(r.cmd){if(n&&n!=="macos"&&n!=="ios")throw new Error('Unexpected "cmd" modifier with platform "'+n+`" "cmd" modifier can only be used with macOS or iOS platform.`);n||(n=G0()==="ios"?"ios":"macos"),r.win=!1,r.cmd=!1,r.meta=!0}if(r.win){if(n&&n!=="windows")throw new Error('Unexpected "win" modifier with platform "'+n+`" "win" modifier can only be used with Windows platform.`);n="windows",r.win=!1,r.cmd=!1,r.meta=!0}if(n&&!k6e(n))return;if(/^\[.+\]$/.test(r.key))return zt(Xt({},e),{key:n0(r)});let a=XDe(r.key,t);if(!a)return zt(Xt({},e),{key:n0(r)});if(a.shift&&r.shift||a.alt&&r.alt)throw new Error(`The keybinding ${e.key} (${M9(e.command)}) is conflicting with the key combination ${n0(a)} using the ${t.displayName} keyboard layout`);return a.shift=a.shift||r.shift,a.alt=a.alt||r.alt,a.meta=r.meta,a.ctrl=r.ctrl,zt(Xt({},e),{key:n0(a)})}function M9(e){if(Array.isArray(e)){let t=[...e];return t.shift()+"("+t.map(r=>typeof r=="string"?`"${r}"`:r.toString()).join(", ")+")"}return e}function U6e(e,t){let r=[],n=[];for(let a of e)try{let o=w6e(a,t);if(!o)continue;let s=n.find(l=>l.key===o.key&&l.ifMode===o.ifMode);if(s)throw new Error(`Ambiguous key binding ${a.key} (${M9(a.command)}) matches ${s.key} (${M9(s.command)}) with the ${t.displayName} keyboard layout`);n.push(o)}catch(o){o instanceof Error&&r.push(o.message)}return[n,r]}function X_(e){return e.atoms.find(t=>t.type==="latexgroup")}function X1(e){var t,r;let n=X_(e);return(r=(t=n?.body)==null?void 0:t.filter(a=>a.type==="latex"))!=null?r:[]}function iUt(e,t){var r;let n=0,a=!1,o=Number.isFinite(t?.before)?(r=t?.before)!=null?r:0:e.lastOffset;for(;n<=o&&!a;){let c=e.at(n);a=c instanceof Kn&&c.isSuggestion,a||n++}if(!a)return[void 0,void 0];let s=n,l=!1;for(;s<=o&&!l;){let c=e.at(s);l=!(c instanceof Kn&&c.isSuggestion),l||s++}return[n-1,s-1]}function E6e(e,t){e.flushInlineShortcutBuffer(),e.stopCoalescingUndo();let r=P9(e,t),{model:n}=e;return n.selectionIsCollapsed?(e.defaultStyle.fontSeries&&r.fontSeries===e.defaultStyle.fontSeries&&(r.fontSeries="auto"),r.fontShape&&r.fontShape===e.defaultStyle.fontShape&&(r.fontShape="auto"),r.color&&r.color===e.defaultStyle.color&&(r.color="none"),r.backgroundColor&&r.backgroundColor===e.defaultStyle.backgroundColor&&(r.backgroundColor="none"),r.fontSize&&r.fontSize===e.defaultStyle.fontSize&&(r.fontSize="auto"),e.defaultStyle=Xt(Xt({},e.defaultStyle),r)):e.model.deferNotifications({content:!0,type:"insertText"},()=>{n.selection.ranges.forEach(a=>z9(n,a,r,{operation:"toggle"})),e.snapshot("style-change")}),!0}function P9(e,t){var r,n,a,o,s,l,c,u,g,d;let h={};if(typeof t.color=="string"){let p=(n=e.colorMap((r=t.color)!=null?r:t.verbatimColor))!=null?n:"none";p!==t.color&&(h.verbatimColor=(a=t.verbatimColor)!=null?a:t.color),h.color=p}if(typeof t.backgroundColor=="string"){let p=(s=e.backgroundColorMap((o=t.backgroundColor)!=null?o:t.verbatimBackgroundColor))!=null?s:"none";p!==t.backgroundColor&&(h.verbatimBackgroundColor=(l=t.verbatimBackgroundColor)!=null?l:t.backgroundColor),h.backgroundColor=p}typeof t.fontFamily=="string"&&(h.fontFamily=t.fontFamily),typeof t.series=="string"&&(h.fontSeries=t.series),typeof t.fontSeries=="string"&&(h.fontSeries=t.fontSeries.toLowerCase()),h.fontSeries&&(h.fontSeries=(c={bold:"b",medium:"m",normal:"m"}[h.fontSeries])!=null?c:h.fontSeries),typeof t.shape=="string"&&(h.fontShape=t.shape),typeof t.fontShape=="string"&&(h.fontShape=t.fontShape.toLowerCase()),h.fontShape&&(h.fontShape=(u={italic:"it",up:"n",upright:"n",normal:"n"}[h.fontShape])!=null?u:h.fontShape),t.variant&&(h.variant=t.variant.toLowerCase()),t.variantStyle!==void 0&&(h.variantStyle=typeof t.variantStyle=="string"&&t.variantStyle!==""?t.variantStyle.toLowerCase():t.variantStyle);let m=(g=t.size)!=null?g:t.fontSize;return typeof m=="number"?h.fontSize=Math.max(1,Math.min(10,m)):typeof m=="string"&&(h.fontSize=(d={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[m.toLowerCase()])!=null?d:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[m]),h}function W_(e,t,r){var n,a;let o=e.model;if(o.mode==="latex")return{};let s=e.styleBias;if(s==="none")return e.defaultStyle;if(o.mode==="text")return(a=(n=o.at(s==="right"?r.after:r.before))==null?void 0:n.style)!=null?a:e.defaultStyle;if(o.mode==="math"){let l=o.at(s==="right"?r.after:r.before);return l?Xt(zt(Xt({},l.style),{variant:"normal"}),e.defaultStyle):e.defaultStyle}return{}}function ep(e){let t=e.options.onInsertStyle;if(t===null)return{};t===void 0&&(t=W_);let r=e.model,n=e.styleBias,a=r.at(r.position),o=KSt(r,a,n),s=KSt(r,a.rightSibling,n);return t(e,r.position,{before:o,after:s})}function KSt(e,t,r){var n;return!t||t.type==="first"&&r!=="right"?-1:t.type!=="group"?e.offsetOf(t):!t.body||t.body.length<2?-1:((n=t.body)==null?void 0:n.length)===1||r!=="right"?e.offsetOf(t.body[0]):e.offsetOf(t.body[t.body.length-1])}function XV(e){let t=X1(e.model).filter(r=>r.isSuggestion);if(t.length!==0){e.model.position=e.model.offsetOf(t[0].leftSibling);for(let r of t)r.parent.removeChild(r)}}function U1(e,t){var r;let{model:n}=e;XV(e);for(let g of X1(n))g.isError=!1;if(!n.selectionIsCollapsed||e.options.popoverPolicy==="off"){v0(e);return}let a=[],o=n.at(n.position);for(;o&&o instanceof Kn&&/^[a-zA-Z\*]$/.test(o.value);)o=o.leftSibling;if(o&&o instanceof Kn&&o.value==="\\")for(a.push(o),o=o.rightSibling;o&&o instanceof Kn&&/^[a-zA-Z\*]$/.test(o.value);)a.push(o),o=o.rightSibling;let s=a.map(g=>g.value).join(""),l=PDe(e,s);if(l.length===0){if(/^\\[a-zA-Z\*]+$/.test(s))for(let g of a)g.isError=!0;v0(e);return}let c=(r=t?.atIndex)!=null?r:0;e.suggestionIndex=c<0?l.length-1:c%l.length;let u=l[e.suggestionIndex];if(u!==s){let g=a[a.length-1];g.parent.addChildrenAfter([...u.slice(s.length-u.length)].map(d=>new Kn(d,{isSuggestion:!0})),g),ip(e,{interactive:!0})}O6e(e,l)}function b9(e){let[t,r]=iUt(e,{before:e.position});if(t===void 0||r===void 0)return!1;let n=!1;return e.getAtoms([t,r]).forEach(a=>{a.isSuggestion&&(a.isSuggestion=!1,n=!0)}),n}function Dg(e,t="accept",r){var n,a;v0(e);let o=X_(e.model);if(!o)return!1;if(t==="accept-suggestion"||t==="accept-all"){let u=X1(e.model).filter(g=>g.isSuggestion);if(u.length!==0){for(let g of u)g.isSuggestion=!1;e.model.position=e.model.offsetOf(u[u.length-1])}if(t==="accept-suggestion")return u.length!==0}let s=X1(e.model).filter(u=>!u.isSuggestion).map(u=>u.value).join(""),l=o.leftSibling;if(o.parent.removeChild(o),e.model.position=e.model.offsetOf(l),e.switchMode((n=r?.mode)!=null?n:"math"),t==="reject")return!0;let c=Xt({},ep(e));return!/^[a-zA-Z0-9]$/.test(s)&&e.styleBias!=="none"&&(c.variant="normal",c.variantStyle=void 0),yr.insert(e.model,s,{selectionMode:(a=r?.selectItem)!=null&&a?"item":"placeholder",format:"latex",mode:"math",style:c}),e.snapshot(),e.model.announce("replacement"),e.switchMode("math"),!0}function WV(e){var t;let r=document.getElementById(e);return r?r.dataset.refcount=Number(Number.parseInt((t=r.dataset.refcount)!=null?t:"0")+1).toString():(r=document.createElement("div"),r.setAttribute("aria-hidden","true"),r.dataset.refcount="1",r.id=e,document.body.append(r)),r}function Y1(e){var t;let r=document.getElementById(e);if(!r)return;let n=Number.parseInt((t=r.getAttribute("data-refcount"))!=null?t:"0");n<=1?r.remove():r.dataset.refcount=Number(n-1).toString()}function qSt(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}function N6e(e,t){let r=new $i({from:e.context}),n=new be({mode:"math",type:"root",body:xo(t,{context:r})}),a=GV(w1(new Ue(n.render(r),{classes:"ML__base"}),r));return yV(a,{classes:"ML__latex"}).toMarkup()}function O6e(e,t){var r;if(t.length===0){v0(e);return}let n="";for(let[o,s]of t.entries()){let l=s,c=N6e(e,s),u=L6e(e.keybindings,l).join("
");n+=`
  • ${qSt(l)}${c}`,u&&(n+=`${u}`),n+="
  • "}let a=Q6e(e,`
      ${n}
    `);K9()&&((r=a.querySelector(".ML__popover__current"))==null||r.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var o;a&&!K9()&&(a.classList.add("is-visible"),FV(e),(o=a.querySelector(".ML__popover__current"))==null||o.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function K9(){let e=document.getElementById("mathlive-suggestion-popover");return e?e.classList.contains("is-visible"):!1}function FV(e,t){var r,n,a;if(!e.element||e.element.mathfield!==e||!K9())return;if(((r=e.model.at(e.model.position))==null?void 0:r.type)!=="latex"){v0(e);return}if(t!=null&&t.deferred){setTimeout(()=>FV(e),32);return}let o=_F(e.field);if(!o)return;let s=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,c=window.innerWidth-document.documentElement.clientWidth,u=window.innerHeight-document.documentElement.clientHeight,g=(a=(n=window.mathVirtualKeyboard)==null?void 0:n.boundingRect.height)!=null?a:0,d=document.getElementById("mathlive-suggestion-popover");o.x+d.offsetWidth/2>l-c?d.style.left=`${l-d.offsetWidth-c}px`:o.x-d.offsetWidth/2<0?d.style.left="0":d.style.left=`${o.x-d.offsetWidth/2}px`;let h=o.y-o.height;s-u-g-o.yn.preventDefault()),r.addEventListener("click",n=>{let a=n.target;for(;a&&!a.dataset.command;)a=a.parentElement;a&&(Dg(e,"reject"),yr.insert(e.model,a.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),e.dirty=!0,e.focus())}),r.innerHTML=globalThis.MathfieldElement.createHTML(t),r}function T6e(){document.getElementById("mathlive-suggestion-popover")&&(Y1("mathlive-suggestion-popover"),jg("suggestion-popover"),jg("core"))}function J6e(){let e=String(new Error().stack).replace(/^Error.*\n/,"").split(` `);if(e.length===0)return console.error(`Can't use relative paths to specify assets location because the sourcefile location could not be determined (unexpected stack trace format "${new Error().stack}").`),"";let t=e[1],r=t.match(/http.*\.ts[\?:]/);return r&&(t=e[2]),r=t.match(/(https?:.*):[0-9]+:[0-9]+/),r||(r=t.match(/at (.*(\.ts))[\?:]/),r||(r=t.match(/at (.*(\.mjs|\.js))[\?:]/))),r?r[1]:(console.error(e),console.error(`Can't use relative paths to specify assets location because the source file location could not be determined (unexpected location "${t}").`),"")}async function rUt(e){if(/^(?:[a-z+]+:)?\/\//i.test(e)){try{return new URL(e).href}catch{}if(e.startsWith("//"))try{return new URL(`${window.location.protocol}${e}`).href}catch{}return e}if(Lg===null)try{let t=await fetch(f9,{method:"HEAD"});t.status===200&&(Lg=t.url,Lg=Lg.replace(/\/\+esm$/,"/"),Lg.includes("jsdelivr.net/")&&(Lg+="/"))}catch{console.error(`Invalid URL "${e}" (relative to "${f9}")`)}return new URL(e,Lg??f9).href}function H6e(e,t,r={}){return new FontFace(e,`url(${t}.woff2) format('woff2')`,r)}async function _6e(){return Cs="not-loaded",E1()}async function E1(){var e;if(Cs==="not-loaded"){if(Cs="loading",(e=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?e:!1){Cs="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){let t=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],r=Array.from(document.fonts).map(o=>o.family);if(t.every(o=>r.includes(o))){Cs="ready";return}if(!globalThis.MathfieldElement.fontsDirectory){Cs="not-loaded";return}let n=await rUt(globalThis.MathfieldElement.fontsDirectory);if(!n){document.body.classList.add("ML__fonts-did-not-load"),Cs="error";return}n.endsWith("/")&&(n=n.slice(0,-1));let a=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular"],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(o=>H6e(o[0].replace(/-[a-zA-Z]+$/,""),`${n}/${o[0]}`,o[1]));try{(await Promise.all(a.map(o=>{try{return o.load()}catch{}}))).forEach(o=>document.fonts.add(o)),Cs="ready";return}catch(o){console.error(`MathLive 0.108.3: The math fonts could not be loaded from "${n}"`,{cause:o}),document.body.classList.add("ML__fonts-did-not-load")}Cs="error"}}}function j6e(e,t=0){let r=3735928559^t,n=1103547991^t;for(let a=0;a>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)}function Hr(e,t){!e||e.dirty||!e.field||(e.resizeObserver.unobserve(e.field),e.dirty=!0,requestAnimationFrame(()=>{Pd(e)&&e.dirty&&(e.atomBoundsCache=new Map,ip(e,t),e.resizeObserver.observe(e.field),e.resizeObserverStarted=!0)}))}function z6e(e,t){var r;t=t??{};let n=new $i({from:zt(Xt({},e.context),{atomIdsSettings:{seed:t.forHighlighting?j6e(be.serialize([e.model.root],{expandMacro:!1,defaultMode:e.options.defaultMode})):"random",groupNumbers:(r=t.forHighlighting)!=null?r:!1},letterShapeStyle:e.options.letterShapeStyle}),mathstyle:e.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),a=e.model.root.render(n);return yV(w1(a,n),{classes:e.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function nUt(e,t){try{let{model:r}=e;r.root.caret=void 0,r.root.isSelected=!1,r.root.containsCaret=!0;for(let n of r.atoms)n.caret=void 0,n.isSelected=!1,n.containsCaret=!1;if(r.selectionIsCollapsed){let n=r.at(r.position);n.caret=e.model.mode;let a=n.parent;for(;a;)a.containsCaret=!0,a=a.parent}else{let n=r.getAtoms(r.selection,{includeChildren:!0,includeFirstAtoms:!0});for(let a of n)a.isSelected=!0}return z6e(e,t).toMarkup()}catch(r){return console.error(r),''}}function ip(e,t){if(!Pd(e))return;t!=null||(t={});let r=e.element.querySelector("[part=virtual-keyboard-toggle]");r&&(r.style.display=e.hasEditableContent?"":"none");let n=e.field;if(!n)return;let a=e.isSelectionEditable&&e.hasFocus(),o=n.classList.contains("ML__focused");o&&!a?n.classList.remove("ML__focused"):!o&&a&&n.classList.add("ML__focused");let s=nUt(e,t),l=e.element.querySelector("[part=menu-toggle]");if(l){let c=!1;(e.disabled||e.readOnly&&!e.hasEditableContent||e.userSelect==="none")&&(c=!0),!c&&e.element.offsetWidth<50&&(c=!0),l.style.display=c?"none":""}if(e.model.atoms.length<=1){let c=e.options.contentPlaceholder;c&&(s+=`${Nr(c)}`)}n.innerHTML=globalThis.MathfieldElement.createHTML(s),uV(e,t.interactive),e.updateToggleLayout(),e.dirty=!1}function uV(e,t){var r;let n=e.field;if(!n)return;for(let u of n.querySelectorAll(".ML__selection, .ML__contains-highlight"))u.remove();if(!(t!=null&&t)&&Cs!=="error"&&Cs!=="ready"){setTimeout(()=>{Cs==="ready"?uV(e):setTimeout(()=>uV(e),128)},32);return}let a=e.model;(r=e.atomBoundsCache)==null||r.clear();let o,s=()=>{if(o!==void 0)return o;let u=n.offsetWidth,g=n.getBoundingClientRect().width;return o=Math.floor(g)/u,isNaN(o)&&(o=1),o};if(a.selectionIsCollapsed){FV(e,{deferred:!0});let u=a.at(a.position);for(;u&&u.type!=="prompt"&&!(u.containsCaret&&u.displayContainsHighlight);)u=u.parent;if(u!=null&&u.containsCaret&&u.displayContainsHighlight){let g=s(),d=owt(e,ap(e,u),g);if(d){d.left/=g,d.right/=g,d.top/=g,d.bottom/=g;let h=document.createElement("div");h.classList.add("ML__contains-highlight"),h.style.position="absolute",h.style.left=`${d.left+1}px`,h.style.top=`${Math.ceil(d.top)}px`,h.style.width=`${Math.ceil(d.right-d.left)}px`,h.style.height=`${Math.ceil(d.bottom-d.top)}px`,n.insertBefore(h,n.childNodes[0])}}return}let l=s(),c=D6e(swt(e,{excludeAtomsWithBackground:!0}));for(let u of c){u.left/=l,u.right/=l,u.top/=l,u.bottom/=l;let g=document.createElement("div");g.classList.add("ML__selection"),g.style.position="absolute",g.style.left=`${u.left}px`,g.style.top=`${u.top}px`,g.style.width=`${Math.ceil(u.right-u.left)}px`,g.style.height=`${Math.max(1,Math.ceil(u.bottom-u.top-1))}px`,n.insertBefore(g,n.childNodes[0])}}function D6e(e){let t=[];for(let r of e){let n=!1;for(let a of t)if(r.left===a.left&&r.right===a.right&&r.top===a.top&&r.bottom===a.bottom){n=!0;break}n||t.push(r)}e=t,t=[];for(let r of e){let n=0;for(let a of e)if(r.left>=a.left&&r.right<=a.right&&r.top>=a.top&&r.bottom<=a.bottom&&(n+=1,n>1))break;n===1&&t.push(r)}return t}function aUt(e){if(!e)return;let t=e.model,r=t.selection,n=be.serialize([t.root],{expandMacro:!1,defaultMode:e.options.defaultMode});yr.insert(t,n,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",silenceNotifications:!0,mode:"math"});let a=t.silenceNotifications;t.silenceNotifications=!0,t.selection=r,t.silenceNotifications=a,Hr(e)}function eLt(){for(let e of document.querySelectorAll(".ML__mathfield"))"_mathfield"in e&&aUt(e._mathfield)}function Ua(e,t){t=Xt({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},t??{}),jc||(jc={});for(let r of Object.keys(e))jc[r],jc[r]=zt(Xt({},t),{fn:e[r]})}function F_(e){let t;if(Array.isArray(e)){if(e[0]==="performWithFeedback")return F_(e[1]);t=e[0]}else t=e;return jc[t]}function h0(e){var t;return(t=F_(e))==null?void 0:t.target}function M6e(e,t){var r,n;if(t=W1(t),!t)return!1;let a,o=[],s=!1,l=!1;$n(t)?(a=t[0],o=t.slice(1)):a=t;let c=jc[a],u=c?.target;if(u==="model"){if(!e.isSelectionEditable&&c!=null&&c.changeContent)return e.model.announce("plonk"),!1;/^(delete|add)/.test(a)&&(a!=="deleteBackward"&&e.flushInlineShortcutBuffer(),e.snapshot(a)),/^complete/.test(a)||XV(e),jc[a].fn(e.model,...o),U1(e),l=!0,s=!0}else if(u==="virtual-keyboard")l=(n=(r=window.mathVirtualKeyboard)==null?void 0:r.executeCommand(t))!=null?n:!1,s=!0;else if(jc[a]){if(!e.isSelectionEditable&&c!=null&&c.changeContent)return e.model.announce("plonk"),!1;/^(undo|redo)/.test(a)&&e.flushInlineShortcutBuffer(),l=jc[a].fn(e,...o),s=!0}else throw new Error(`Unknown command "${a}"`);return u!=="virtual-keyboard"&&(!e.model.selectionIsCollapsed||c!=null&&c.changeSelection&&a!=="deleteBackward")&&(e.flushInlineShortcutBuffer(),c!=null&&c.changeContent||e.stopCoalescingUndo(),e.defaultStyle={}),l&&(c!=null&&c.changeSelection&&s?(e.dirty=!0,e.scrollIntoView()):Hr(e)),s}function P6e(e,t){var r;if(!e)return!1;e.focus(),L_.keypressVibration&&YLt()&&navigator.vibrate(oUt);let n=F_(t);globalThis.MathfieldElement.playSound((r=n?.audioFeedback)!=null?r:"keypress");let a=e.executeCommand(t);return e.scrollIntoView(),a}function K6e(e){return U1(e,{atIndex:e.suggestionIndex+1}),!1}function q6e(e){return U1(e,{atIndex:e.suggestionIndex-1}),!1}function W1(e){if(!e)return;if($n(e)&&e.length>0){let r=e[0];return r=r.replace(/-\w/g,n=>n[1].toUpperCase()),r==="performWithFeedback"&&e.length===2?[r,W1(e[1])]:[r,...e.slice(1)]}if(typeof e!="string")return;let t=e.trim().match(/^([a-zA-Z0-9-]+)\((.*)\)$/);if(t){let r=t[1].replace(/-\w/g,a=>a[1].toUpperCase()),n=t[2].split(",").map(a=>a.trim());return[r,...n.map(a=>{if(/"[^"]*"/.test(a)||/'[^']*'/.test(a))return a.slice(1,-1);if(/^true$/.test(a))return!0;if(/^false$/.test(a))return!1;if(/^[-]?\d+$/.test(a))return parseInt(a,10);if(/^\{.*\}$/.test(a))try{return JSON.parse(a)}catch{return console.error("Invalid argument:",a),a}return W1(a)})]}return e.replace(/-\w/g,r=>r[1].toUpperCase())}function V_(e){var t;return e.type!=="message"?!1:((t=e.data)==null?void 0:t.type)===gV}function lUt(e,t){var r,n,a,o,s;let l=Mg.singleton;if(!l)return;let c=l0(e),u="";if(window.mathVirtualKeyboard.isShifted){let v=(r=l.getKeycap(c?.id))==null?void 0:r.shift;typeof v=="object"&&"variants"in v&&(u=(n=v.variants)!=null?n:"")}else u=(o=(a=l.getKeycap(c?.id))==null?void 0:a.variants)!=null?o:"";if(typeof u=="string"&&!q9(u)||Array.isArray(u)&&u.length===0){t?.();return}let g={},d="";for(let v of e8e(u)){let y=k_(v),x=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);g[x]=y;let[C,I]=VV(y);d+=`
    ${C}
    `}let h=document.createElement("div");h.setAttribute("aria-hidden","true"),h.className="MLK__variant-panel",h.style.height="auto";let m=Object.keys(g).length,p=5;m===1?p=1:m===2||m===4?p=2:m===3||m===5||m===6?p=3:m>=7&&m<14&&(p=4),h.style.width=`calc(var(--variant-keycap-length) * ${p} + 12px)`,h.innerHTML=L_.createHTML(d),Ml.open({root:(s=l?.container)==null?void 0:s.querySelector(".ML__keyboard"),child:h}),p1=new AbortController;let{signal:b}=p1,f=e?.getBoundingClientRect();if(f){f.top-h.clientHeight<0&&(h.style.width="auto",m<=6?h.style.height="56px":m<=12?h.style.height="108px":m<=18?h.style.height="205px":h.classList.add("compact"));let v=Math.max(0,Math.min(window.innerWidth-h.offsetWidth,(f.left+f.right-h.offsetWidth)/2)),y=f.top-h.clientHeight+5;h.style.left=`${v}px`,h.style.top=`${y}px`,h.classList.add("is-visible"),requestAnimationFrame(()=>{var x;h.addEventListener("pointerup",C=>{let I=l0(C.target);!(I!=null&&I.id)||!g[I.id]||($9(g[I.id]),s0(),t?.(),C.preventDefault())},{capture:!0,passive:!1,signal:b}),h.addEventListener("pointerenter",C=>{let I=l0(C.target);!(I!=null&&I.id)||!g[I.id]||I.classList.add("is-active")},{capture:!0,signal:b}),h.addEventListener("pointerleave",C=>{let I=l0(C.target);C.target&&"tagName"in C.target&&typeof C.target.tagName=="string"&&C.target.tagName.toUpperCase()==="ASIDE"||!(I!=null&&I.id)||!g[I.id]||I.classList.remove("is-active")},{capture:!0,signal:b}),(x=l.getKeycap(c?.id))!=null&&x.stickyVariantPanel?window.addEventListener("pointerdown",C=>{if(!(C.target instanceof Node))return;let I=h.contains(C.target);C.target===h||I||(s0(),t?.())},{signal:b}):(window.addEventListener("pointercancel",()=>{s0(),t?.()},{signal:b}),window.addEventListener("pointerup",()=>{s0(),t?.()},{signal:b}))})}}function s0(){p1?.abort(),p1=null,Ml.state==="open"&&Ml.close()}function t8e(e){if(e==="foreground-color"){let t=[];for(let r of Object.keys(tp))t.push({class:"swatch-button",label:'',command:["applyStyle",{color:r}]});return t}if(e==="background-color"){let t=[];for(let r of Object.keys($m))t.push({class:"swatch-button",label:'',command:["applyStyle",{backgroundColor:r}]});return t}}function q9(e){return DF[e]!==void 0}function e8e(e){var t;return typeof e!="string"?e:(DF[e]||(DF[e]=(t=t8e(e))!=null?t:[]),DF[e])}function i8e(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r} !important`).join(";")}function r8e(e){return Object.keys(e).map(t=>`${t} {${i8e(e[t])}}`).join("")}function e1(e){if(!e)return"";let t=new $i,r=new be({mode:"math",type:"root",body:xo(e,{context:t,args:a=>a==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),n=GV(w1(new Ue(r.render(t),{classes:"ML__base"}),t));return yV(n,{classes:"ML__latex"}).toMarkup()}function BF(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}function n8e(e){return e.replace(/<\/?[^>]+(>|$)/g," ")}function a8e(e){var t,r,n,a;let o=(a=(n=(r=(t=e.tooltip)!=null?t:typeof e.label=="string"?n8e(e.label):void 0)!=null?r:e.insert)!=null?n:e.latex)!=null?a:e.key;return o&&o.replace(/\s+/g," ").trim()||null}function o8e(e){if(typeof e>"u"||e===null)return null;try{return JSON.stringify(e)}catch{return null}}function s8e(e){var t,r;let n=(r=(t=e.insert)!=null?t:e.latex)!=null?r:e.key;return n??null}function b1(e){var t;if(Array.isArray(e))return e.map(n=>b1(n)).flat();let r=typeof e=="string"?{markup:e}:e;return"rows"in r&&Array.isArray(r.rows)&&(r.rows=r.rows.map(n=>n.map(a=>k_(a)))),(t=r.id)!=null||(r.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[r]}function l8e(){var e,t;let r=window.mathVirtualKeyboard.alphabeticLayout;if(r==="auto"){let s=y1();s&&(r=s.virtualLayout),(!r||r==="auto")&&(r=(e={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[Fi.locale.slice(0,2)])!=null?e:"qwerty")}let n={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^ pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},a=(t=n[r])!=null?t:n.qwerty,o=r==="azerty"?[[{label:"1",variants:"1"},{label:"2",shift:{latex:"\xE9"},variants:"2"},{label:"3",shift:{latex:"\xF9"},variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{label:"(",latex:"("},variants:"5"},{label:"6",shift:{label:")",latex:")"},variants:"6"},{label:"7",shift:{latex:"\xE8"},variants:"7"},{label:"8",shift:{latex:"\xEA"},variants:"8"},{label:"9",shift:{latex:"\xE7"},variants:"9"},{label:"0",shift:{latex:"\xE0"},variants:"0"}]]:[[{label:"1",variants:"1"},{label:"2",variants:"2"},{label:"3",variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{latex:"\\frac{#@}{#?}"},variants:"5"},{label:"6",shift:{latex:"#@^#?"},variants:"6"},{label:"7",variants:"7"},{label:"8",shift:{latex:"\\times"},variants:"8"},{label:"9",shift:{label:"(",latex:"("},variants:"9"},{label:"0",shift:{label:")",latex:")"},variants:"0"}]];for(let s of a){let l=[];for(let c of s)/[a-z]/.test(c)?l.push({label:c,class:"hide-shift",shift:{label:c.toUpperCase(),variants:q9(c.toUpperCase())?c.toUpperCase():void 0},variants:q9(c)?c:void 0}):c==="~"?r!=="dvorak"?l.push("[backspace]"):l.push({label:"[backspace]",width:1}):c==="^"?l.push("[shift]"):c===" "&&l.push("[separator-5]");o.push(l)}return o.push(["[-]","[+]","[=]",{label:" ",width:1.5},{label:",",shift:";",variants:".",class:"hide-shift"},"[.]","[left]","[right]",{label:"[action]",width:1.5}]),{label:"abc",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.alphabetic",layers:b1({rows:o})}}function cUt(e){if(e==="alphabetic")return l8e();if(typeof e=="string")return iLt[e],`${e}`,cUt(iLt[e]);let t;if("rows"in e&&Array.isArray(e.rows)){"layers"in e||"markup"in e;let a=e,{rows:o}=a,s=eV(a,["rows"]);t=zt(Xt({},s),{layers:b1({rows:e.rows})})}else if("markup"in e&&typeof e.markup=="string"){let a=e,{markup:o}=a,s=eV(a,["markup"]);t=zt(Xt({},s),{layers:b1(e.markup)})}else t=Xt({},e),"layers"in e?t.layers=b1(e.layers):console.error('MathLive 0.108.3: provide either a "rows", "markup" or "layers" property');let r=!1,n=!1;for(let a of t.layers)if(a.rows)for(let o of a.rows.flat()){m0(o)&&(r=!0);let s=o.command;typeof s=="string"&&["undo","redo","cut","copy","paste"].includes(s)&&(n=!0)}return(!("displayShiftedKeycaps"in e)||e.displayShiftedKeycaps===void 0)&&(t.displayShiftedKeycaps=r),(!("displayEditToolbar"in e)||e.displayEditToolbar===void 0)&&(t.displayEditToolbar=!n),t}function c8e(e,t){var r,n;let a='
    ';if(e.normalizedLayouts.length>1)for(let[o,s]of e.normalizedLayouts.entries()){let l=s,c=[o===t?"selected":"layer-switch"];l.tooltip&&c.push("MLK__tooltip"),l.labelClass&&c.push(...l.labelClass.split(" ")),a+=`
    ${(n=l.label)!=null?n:"untitled"}
    `}return a+="
    ",a}function d8e(e,t){let r="";if(e.editToolbar==="none")return"";let n=[];t.selectionIsCollapsed?n.push("undo","redo","pasteFromClipboard"):n.push("cutToClipboard","copyToClipboard","pasteFromClipboard");let a={undo:`
    `,redo:`
    `,cutToClipboard:`
    `,copyToClipboard:`
    `,pasteFromClipboard:`
    `};return r+=n.map(o=>a[o]).join(""),r}function u8e(e){for(let t of e)g8e(t)}function g8e(e){let t=Mg.singleton;if(!t)return;let r={};if(!e.id){if(e.hasAttribute("data-label")&&(r.label=e.dataset.label),e.hasAttribute("data-latex")&&(r.latex=e.dataset.latex),e.hasAttribute("data-key")&&(r.key=e.dataset.key),e.hasAttribute("data-insert")&&(r.insert=e.dataset.insert),e.hasAttribute("data-variants")&&(r.variants=e.dataset.variants),e.hasAttribute("data-aside")&&(r.aside=e.dataset.aside),e.className&&(r.class=e.className),!r.label&&!r.latex&&!r.key&&!r.insert&&(r.latex=e.innerText,r.label=e.innerHTML),e.hasAttribute("data-command"))try{r.command=JSON.parse(e.dataset.command)}catch(n){console.warn("Invalid JSON in data-command attribute",n)}e.id=t.registerKeycap(r)}if(!e.innerHTML){let[n,a]=VV(r);e.innerHTML=globalThis.MathfieldElement.createHTML(n)}}function h8e(){iu("virtual-keyboard"),iu("core"),E1()}function m8e(){jg("core"),jg("virtual-keyboard")}function b8e(e){e.resetKeycapRegistry(),h8e();let t=document.createElement("div");t.className="ML__keyboard";let r=document.createElement("div");r.className="MLK__plate",r.innerHTML=globalThis.MathfieldElement.createHTML(p8e+e.normalizedLayouts.map((s,l)=>f8e(e,s,l)).join(""));let n=document.createElement("div");n.className="MLK__backdrop",n.appendChild(r),t.appendChild(n),t.addEventListener("pointerdown",v8e,{passive:!1});let a=t.querySelectorAll(".ML__edit-toolbar");if(a)for(let s of a)s.addEventListener("click",l=>{var c,u;let g=l.target,d="";for(;g&&!d;)d=(c=g?.getAttribute("data-command"))!=null?c:"",g=(u=g?.parentElement)!=null?u:null;d&&e.executeCommand(JSON.parse(d))});u8e(t.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));let o=t.querySelectorAll(".MLK__layer");o.length>0;for(let s of o)s.addEventListener("pointerdown",l=>l.preventDefault());return e.currentLayer=e.latentLayer,t}function f8e(e,t,r){var n;let a=[];if(!("layers"in t))return"";for(let o of t.layers)a.push(`
    `),(e.normalizedLayouts.length>1||t.displayEditToolbar)&&(a.push("")),a.push(I8e(e,o)),a.push("
    ");return a.join("")}function I8e(e,t){if(typeof t=="string")return t;let r="";if(typeof t.style=="string"?r+=``:typeof t.style=="object"&&(r+=``),t.backdrop&&(r+=`
    `),t.container&&(r+=`
    `),t.rows){r+="
    ";for(let n of t.rows){r+='
    ';for(let a of n)if(a){let o=e.registerKeycap(a),[s,l]=VV(a);/(^|\s)separator/.test(l)?r+=`
    ${s}
    `}r+="
    "}r+="
    "}else t.markup&&(r+=t.markup);return t.container&&(r+="
    "),t.backdrop&&(r+="
    "),r}function VV(e,t={shifted:!1}){var r,n,a,o,s,l,c;let u="",g=(r=e.class)!=null?r:"";if(t.shifted&&m0(e)&&(g+=" is-active"),t.shifted&&"shift"in e)typeof e.shift=="string"?u=e1(e.shift):typeof e.shift=="object"&&(u=e.shift.label?e.shift.label:(n=e1(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?n:""),typeof e.shift=="object"&&(g=(o=(a=e.shift.class)!=null?a:e.class)!=null?o:"");else{if(u=e.label?e.label:(s=e1(e.latex||e.insert||"")||e.key)!=null?s:"",e.shift){let d;typeof e.shift=="string"?d=e1(e.shift):e.shift.label?d=e.shift.label:d=(l=e1(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?l:"",u+=`${d}`}e.aside&&(u+=``)}return e.layer&&!/layer-switch/.test(g)&&(g+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(g)||(g+=" MLK__keycap"),!/\bw[0-9]+\b/.test(g)&&e.width&&(g+=(c={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[e.width])!=null?c:""),[u,g||"MLK__keycap"]}function k_(e){var t;if(typeof e=="string"){if(e==="[.]"&&globalThis.MathfieldElement.decimalSeparator===","&&(e="[,]"),!Dd[e])return{latex:e};e={label:e}}let r;return"label"in e&&e.label&&Dd[e.label]&&(r=zt(Xt(Xt({},Dd[e.label]),e),{label:Dd[e.label].label})),"key"in e&&e.key&&Dd[e.key]&&(r=zt(Xt(Xt({},Dd[e.key]),e),{key:Dd[e.key].key})),r?(r.command==="insertDecimalSeparator"&&(r.label=(t=globalThis.MathfieldElement.decimalSeparator)!=null?t:"."),(r.tooltip===void 0||r.tooltip===null||r.tooltip===!1)&&delete r.tooltip,(r.tooltip===void 0||r.tooltip===null||r.tooltip===!1)&&delete r.tooltip,(r.aside===void 0||r.aside===null||r.aside===!1)&&delete r.aside,(r.variants===void 0||r.variants===null||r.variants===!1)&&delete r.variants,(r.shift===void 0||r.shift===null||r.shift===!1)&&delete r.shift,r):e}function v8e(e){var t,r,n,a;if(e.button!==0)return;let o=Mg.singleton;if(!o)return;let s=e.target;for(;s&&!s.getAttribute("data-layer");)s=s.parentElement;if(s){o.currentLayer=(t=s.getAttribute("data-layer"))!=null?t:"",e.preventDefault();return}let l=l0(e.target);if(!(l!=null&&l.id))return;let c=o.getKeycap(l.id);if(!c)return;e.type;let u=o;if(!u.connectedMathfieldWindow){let h=(r=window.focusedMathfield)==null?void 0:r.call(window);if(h){let m=(a=(n=h.element)==null?void 0:n.ownerDocument)==null?void 0:a.defaultView;m&&m!==window&&(u.connectedMathfieldWindow=m)}}let g=new AbortController,d=g.signal;l.classList.add("is-pressed"),l.addEventListener("pointerenter",XF(g),{capture:!0,signal:d}),l.addEventListener("pointerleave",XF(g),{capture:!0,signal:d}),l.addEventListener("pointercancel",XF(g),{signal:d}),l.addEventListener("pointerup",XF(g),{signal:d}),m0(c)&&(l.classList.add("is-active"),o.shiftPressCount++),c.variants&&(f1&&clearTimeout(f1),f1=setTimeout(()=>{l.classList.contains("is-pressed")&&(l.classList.remove("is-pressed"),l.classList.add("is-active"),e.target&&"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId),lUt(l,()=>{g.abort(),l?.classList.remove("is-active")}))},c.stickyVariantPanel?0:300)),e.preventDefault()}function XF(e){return t=>{let r=l0(t.target);if(!(r!=null&&r.id))return;let n=Mg.singleton;if(!n)return;let a=n.getKeycap(r.id);if(a){if(t.type==="pointerenter"&&t.target===r&&t.isPrimary&&r.classList.add("is-pressed"),t.type==="pointercancel"){r.classList.remove("is-pressed"),m0(a)&&(n.shiftPressCount--,r.classList.toggle("is-active",n.isShifted)),e.abort();return}if(t.type==="pointerleave"&&t.target===r){r.classList.remove("is-pressed"),m0(a)&&(n.shiftPressCount--,r.classList.toggle("is-active",n.isShifted));return}if(t.type==="pointerup"){f1&&clearTimeout(f1),m0(a)?r.classList.toggle("is-active",n.isShifted):r.classList.contains("is-pressed")&&(r.classList.remove("is-pressed"),n.isShifted&&a.shift?typeof a.shift=="string"?n.executeCommand(["insert",a.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):$9(a.shift):$9(a),n.shiftPressCount===1&&!t.shiftKey&&(n.shiftPressCount=0)),e.abort(),t.preventDefault();return}}}}function $9(e){let t=e.command;!t&&e.insert&&(t=["insert",e.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),!t&&e.key&&(t=["typedText",e.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!t&&e.latex&&(t=["insert",e.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),t||(t=["typedText",e.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),Mg.singleton&&Mg.singleton.executeCommand(t)}function G8e(e){if(e.nodeType!==1)return!1;let t=e.classList;return t.contains("MLK__keycap")||t.contains("shift")||t.contains("action")||t.contains("fnbutton")||t.contains("bigfnbutton")}function l0(e){if(!e)return;let t=e;for(;t&&!G8e(t);)t=t.parentElement;return t??void 0}function m0(e){return!!e.class&&/(^|\s)shift($|\s)/.test(e.class)}function rLt(){let e=dV(),t=null;for(;e;){if("host"in e&&e.host instanceof sp){t=e.host;break}e=e.parentNode}return t}function uUt(){let e=Mg.singleton;return window.mathVirtualKeyboard!==e&&Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>e}),e}function hV(e){let t={};for(let r of Object.keys(e))switch(r){case"scriptDepth":let n=e.scriptDepth;if($n(n))t.scriptDepth=[n[0],n[1]];else if(typeof n=="number")t.scriptDepth=[n,n];else if(typeof n=="string"){let[o,s]=n.split(",").map(l=>parseInt(l.trim()));t.scriptDepth=[o,s]}else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let a=e.mathVirtualKeyboardPolicy.toLowerCase();if(a==="sandboxed"){let o=uUt();o&&(o.isSandbox=!0),a="manual"}t.mathVirtualKeyboardPolicy=a;break;case"letterShapeStyle":e.letterShapeStyle==="auto"?Fi.locale.startsWith("fr")?t.letterShapeStyle="french":t.letterShapeStyle="tex":t.letterShapeStyle=e.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(e.defaultMode)?t.defaultMode=e.defaultMode:(console.error('MathLive 0.108.3: valid values for defaultMode are "text", "math" or "inline-math"'),t.defaultMode="math");break;case"macros":t.macros=nV(e.macros);break;default:$n(e[r])?t[r]=[...e[r]]:typeof e[r]=="object"&&!(e[r]instanceof Element)&&r!=="computeEngine"?t[r]=Xt({},e[r]):t[r]=e[r]}return t}function Pm(e,t){let r;typeof t=="string"?r=[t]:t===void 0?r=Object.keys(e):r=t;let n={};for(let a of r)e[a]===null?n[a]=null:$n(e[a])?n[a]=[...e[a]]:typeof e[a]=="object"&&!(e[a]instanceof Element)&&a!=="computeEngine"?n[a]=Xt({},e[a]):n[a]=e[a];return typeof t=="string"?n[t]:n}function MF(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:vV,backgroundColorMap:m_,letterShapeStyle:Fi.locale.startsWith("fr")?"french":"tex",minFontScale:0,maxMatrixCols:10,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,isImplicitFunction:e=>["\\sin","\\cos","\\tan","\\arcsin","\\arccos","\\arctan","\\arcsec","\\arccsc","\\arsinh","\\arcosh","\\artanh","\\arcsech","\\arccsch","\\arg","\\ch","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\sec","\\sinh","\\sh","\\tanh","\\tg","\\th","\\lg","\\lb","\\log","\\ln"].includes(e),mathModeSpace:"",placeholderSymbol:"\u25A2",contentPlaceholder:"",popoverPolicy:"auto",environmentPopoverPolicy:"off",keybindings:AMe,inlineShortcuts:rwt,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",originValidator:"none",onInsertStyle:W_,onInlineShortcut:()=>"",onScrollIntoView:null,onExport:RMe,value:""}}function nLt(e){return e.defaultMode==="inline-math"?"math":e.defaultMode}function y8e(e,t){let r=e.at(e.position);if(r.type==="composition")r.value=t;else{let{caret:n}=r;r.caret=void 0;let a=new ywt(t,{mode:r.mode});a.caret=n,r.parent.addChildAfter(a,r),e.position+=1}}function C8e(e){let t=e.at(e.position);t.type==="composition"&&(t.parent.removeChild(t),e.position-=1)}function x8e(e){let t=e.at(e.position);for(;t&&!eu(t.parentBranch);)t=t.parent;return[t.firstSibling,t.lastSibling]}function Z8e(e,t){let r=e.at(e.position);for(;r&&!(r.parent instanceof Ui);)r=r.parent;if(r?.type==="array"&&r.environmentName,!r||!(r.parent instanceof Ui)){let n=e.at(e.position);if(r=n,!r.parent.parent){let a=e.extractAtoms([e.position,e.lastOffset]),o=e.extractAtoms([0,e.position]),s;return t.endsWith("column")?(o.length===0&&(o=FF()),a.length===0&&(a=FF()),s=Mo("split",[[o,a]]),e.root=s,i1(s,0,0)?$f(e,s,0,0):i1(s,0,1)?$f(e,s,0,1):e.position=e.offsetOf(n)):(s=Mo("lines",[[o],[a]]),e.root=s,$f(e,s,1,0)),[void 0,[0,0]]}if(r.parent instanceof qr){let a=r.parent,o=e.extractAtoms([e.position,e.offsetOf(a.lastChild)]),s=e.extractAtoms([e.offsetOf(a.firstChild),e.position]);s.length===0&&(s=FF()),o.length===0&&(o=FF());let l="pmatrix",c=a.leftDelim,u=a.rightDelim;c==="("&&(u===")"||u==="?")?l="pmatrix":(c==="["||c==="\\lbrack")&&(u==="]"||u==="\\rbrack"||u==="?")?l="bmatrix":c==="\\vert"&&u==="\\vert"?l="vmatrix":c==="\\Vert"&&u==="\\Vert"?l="Vmatrix":(c==="{"||c==="\\lbrace")&&(u==="."||u==="?")&&(l="cases");let g=Mo(l,t.endsWith("column")?[[s,o]]:[[s],[o]]);return a.parent.addChildBefore(g,a),a.parent.removeChild(a),i1(g,0,0)?$f(e,g,0,0):t.endsWith("column")?i1(g,0,1)?$f(e,g,0,1):e.position=e.offsetOf(r):i1(g,1,0)?$f(e,g,1,0):e.position=e.offsetOf(r),[void 0,[0,0]]}}return r&&r.parent instanceof Ui?[r.parent,r.parentBranch]:[void 0,[0,0]]}function i1(e,t,r){let n=e.getCell(t,r);return n?.length!==2?!1:n[1].type==="placeholder"}function R8e(e,t,r,n){let a=t.getCell(r,n);return a?[e.offsetOf(a[0]),e.offsetOf(a[a.length-1])]:-1}function $f(e,t,r,n){let a=R8e(e,t,r,n);typeof a!="number"&&e.setSelection(a)}function WF(e,t,r,n,a){let o=t.getCell(r,n);o&&e.setPositionHandlingPlaceholder(e.offsetOf(o[a==="start"?0:o.length-1]))}function F1(e,t){let[r,[n,a]]=Z8e(e,t);if(r)switch(t){case"after row":r.addRowAfter(n),WF(e,r,n+1,0,"end");break;case"after column":if(r.maxColumns<=r.colCount){e.announce("plonk");return}r.addColumnAfter(a),WF(e,r,n,a+1,"end");break;case"before row":r.addRowBefore(n),WF(e,r,n,0,"start");break;case"before column":if(r.maxColumns<=r.colCount){e.announce("plonk");return}r.addColumnBefore(a),WF(e,r,n,a,"start");break}}function gUt(e){var t;let r=e.at(e.position);if(!eu(r.parentBranch)&&r.parent!==e.root&&e.root.type!=="root")return e.announce("plonk"),!1;if(!e.contentWillChange({inputType:"insertText"}))return!1;if((t=e.parentEnvironment)!=null&&t.isMultiline){e.selectionIsCollapsed||e.deleteAtoms(Ia(e.selection));let[n,a]=x8e(e),o=e.extractAtoms([e.position,e.offsetOf(a)]),s=e.extractAtoms([e.offsetOf(n),e.position]),l=n.parent,[c,u]=n.parentBranch;return l.setCell(c,u,s),F1(e,"after row"),l.setCell(c+1,u,o),e.position=e.offsetOf(l.getCell(c+1,u)[0]),e.contentDidChange({inputType:"insertText"}),!0}return F1(e,"after row"),e.contentDidChange({inputType:"insertText"}),!0}function A8e(e){return e.contentWillChange({inputType:"insertText"})?(F1(e,"before row"),e.contentDidChange({inputType:"insertText"}),!0):!1}function hUt(e){return e.contentWillChange({inputType:"insertText"})?(F1(e,"after column"),e.contentDidChange({inputType:"insertText"}),!0):!1}function B8e(e){return e.contentWillChange({inputType:"insertText"})?(F1(e,"before column"),e.contentDidChange({inputType:"insertText"}),!0):!1}function mUt(e,t){if(!e.contentWillChange({}))return!1;e.mathfield.snapshot();let r=".",n=".";switch(t){case"pmatrix":case"pmatrix*":r="(",n=")";break;case"bmatrix":case"bmatrix*":r="[",n="]";break;case"Bmatrix":case"Bmatrix*":r="\\lbrace",n="\\rbrace";break;case"vmatrix":case"vmatrix*":r="\\vert",n="\\vert";break;case"Vmatrix":case"Vmatrix*":r="\\Vert",n="\\Vert";break;case"matrix":case"matrix*":r=".",n=".";break;case"cases":case"dcases":r="\\lbrace";break;case"rcases":n="\\rbrace";break}let a=e.at(e.position),o=a.type==="array"?a:e.parentEnvironment;return o.environmentName=t,o.leftDelim=r,o.rightDelim=n,e.contentDidChange({}),!0}function pUt(e,t){let r=e.at(e.position);for(;r&&!(Array.isArray(r.parentBranch)&&r.parent instanceof Ui);)r=r.parent;if(Array.isArray(r?.parentBranch)&&r?.parent instanceof Ui){let n=r.parent,a=r.parentBranch,o;switch(t){case"row":if(n.rowCount>1){n.removeRow(a[0]);let s=n.getCell(Math.max(0,a[0]-1),a[1]);o=e.offsetOf(s[s.length-1])}break;case"column":if(n.colCount>n.minColumns){n.removeColumn(a[1]);let s=n.getCell(a[0],Math.max(0,a[1]-1));o=e.offsetOf(s[s.length-1])}break}o!==void 0&&e.setPositionHandlingPlaceholder(o)}}function X8e(e){return e.contentWillChange({inputType:"deleteContent"})?(pUt(e,"row"),e.contentDidChange({inputType:"deleteContent"}),!0):!1}function W8e(e){return e.contentWillChange({inputType:"deleteContent"})?(pUt(e,"column"),e.contentDidChange({inputType:"deleteContent"}),!0):!1}function FF(){return[new Kl]}function I1(e,t,r,n){var a,o,s,l,c,u;let g=r.parent;if(eu(n)&&r instanceof Ui&&r.isMultiline&&S8e(e,r,n[0],t))return!0;if(g&&r instanceof qr){let d=!n&&t==="forward"||n==="body"&&t==="backward",h=d?e.offsetOf(r.firstChild):e.offsetOf(r.lastChild);return d?r.rightDelim!=="?"&&r.rightDelim!=="."?(r.leftDelim=".",r.isDirty=!0):(g.addChildrenAfter(r.removeBranch("body"),r),g.removeChild(r),h--):r.leftDelim!=="?"&&r.leftDelim!=="."?(r.rightDelim=".",r.isDirty=!0):(g.addChildrenAfter(r.removeBranch("body"),r),g.removeChild(r),h--),e.position=h,!0}if(g&&r.type==="surd"){if(t==="forward"&&!n||t==="backward"&&n==="body"){let d=r.leftSibling;r.hasChildren&&g.addChildrenAfter(r.removeBranch("body"),r),g.removeChild(r),e.position=e.offsetOf(d)}else t==="forward"&&n==="body"?e.position=e.offsetOf(r):!n&&t==="backward"?r.hasChildren?e.position=e.offsetOf(r.lastChild):(e.position=Math.max(0,e.offsetOf(r)-1),g.removeChild(r)):n==="above"&&(r.hasEmptyBranch("above")&&r.removeBranch("above"),t==="backward"?e.position=e.offsetOf(r.leftSibling):e.position=e.offsetOf(r.body[0]));return!0}if(g&&(r.type==="box"||r.type==="enclose")){let d=n&&t==="backward"||!n&&t==="forward"?r.leftSibling:r.lastChild;return g.addChildrenAfter(r.removeBranch("body"),r),g.removeChild(r),e.position=e.offsetOf(d),!0}if(r.type==="genfrac"||r.type==="overunder"){if(!n)return r.type==="overunder"&&r.hasEmptyBranch("body")||r.type==="genfrac"&&r.hasEmptyBranch("below")&&r.hasEmptyBranch("above")?!1:(e.position=e.offsetOf(t==="forward"?r.firstChild:r.lastChild),!0);let d=sp.fractionNavigationOrder==="numerator-denominator"?"above":"below",h=d==="above"?"below":"above";if(g&&(t==="forward"&&n===d||t==="backward"&&n===h)){let m=r.removeBranch(d),p=r.removeBranch(h);return g.addChildrenAfter([...m,...p],r),g.removeChild(r),e.position=e.offsetOf(m.length>0?m[m.length-1]:p[0]),!0}return t==="backward"?e.position=e.offsetOf(r.leftSibling):e.position=e.offsetOf(r),!0}if(r.type==="extensible-symbol"||r.type==="subsup"||r.type==="operator"){if(!n&&t==="forward")return!1;if(!n){if(r.subscript||r.superscript){let d=t==="forward"?(s=(a=r.superscript)==null?void 0:a[0])!=null?s:(o=r.subscript)==null?void 0:o[0]:(u=(l=r.subscript)==null?void 0:l[0].lastSibling)!=null?u:(c=r.superscript)==null?void 0:c[0].lastSibling;return d&&(e.position=e.offsetOf(d)),!0}return!1}if(!r.hasChildren&&r.type==="subsup"){let d=t==="forward"?e.offsetOf(r):Math.max(0,e.offsetOf(r)-1);return r.parent.removeChild(r),e.position=d,!0}if(n&&r.hasEmptyBranch(n)){if(r.removeBranch(n),r.type==="subsup"&&!r.subscript&&!r.superscript){let d=t==="forward"?e.offsetOf(r):Math.max(0,e.offsetOf(r)-1);return r.parent.removeChild(r),e.position=d,!0}return n==="superscript"&&t==="backward"?e.position=e.offsetOf(r.firstChild)-1:n==="subscript"&&t==="backward"?r.superscript?e.position=e.offsetOf(r.superscript[0].lastSibling):e.position=e.offsetOf(r.firstChild)-1:e.position=e.offsetOf(r),!0}if(n==="superscript")if(t==="backward"){let d=e.offsetOf(r.firstChild)-1;d>=0,e.position=d}else r.subscript?e.position=e.offsetOf(r.subscript[0]):e.position=e.offsetOf(r);else n==="subscript"&&(t==="backward"&&r.superscript?e.position=e.offsetOf(r.superscript[0].lastSibling):t==="backward"?e.position=e.offsetOf(r.firstChild)-1:e.position=e.offsetOf(r));return!0}if(g?.type==="genfrac"&&!n&&r.type!=="first"){let d=e.offsetOf(r.leftSibling);return g.removeChild(r),g.hasEmptyBranch("above")&&g.hasEmptyBranch("below")?(d=e.offsetOf(g.leftSibling),g.parent.removeChild(g),e.announce("delete",void 0,[g]),e.position=d,!0):(e.announce("delete",void 0,[r]),e.position=d,!0)}if(t==="backward"&&(g?.command==="\\ln"||g?.command==="\\log")&&r.parentBranch!=="body"){let d=e.offsetOf(g.leftSibling);return g.parent.removeChild(g),e.announce("delete",void 0,[g]),e.position=d,!0}return!1}function V8e(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentBackward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let t=e.at(e.position);if(!(t&&I1(e,"backward",t))){if(t!=null&&t.isFirstSibling){if(I1(e,"backward",t.parent,t.parentBranch))return;t=null}if(!t){e.announce("plonk");return}e.position=e.offsetOf(t.leftSibling),t.parent.removeChild(t),e.announce("delete",void 0,[t]),e.root.hasEmptyBranch("body")&&e.mathfield.flushInlineShortcutBuffer()}}):tu(e,Ia(e.selection),"deleteContentBackward")}function k8e(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentForward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var t,r;let n=e.at(e.position).rightSibling;if(n&&I1(e,"forward",n))return;if(n){if(e.at(e.position).isLastSibling&&I1(e,"forward",n.parent,n.parentBranch))return}else{if(n=e.at(e.position),n.isLastSibling&&I1(e,"forward",n.parent,n.parentBranch))return;n=void 0}if(e.position===e.lastOffset||!n){e.announce("plonk");return}n.parent.removeChild(n);let a=(t=e.at(e.position))==null?void 0:t.rightSibling;for(;a?.type==="subsup";)a.parent.removeChild(a),a=(r=e.at(e.position))==null?void 0:r.rightSibling;e.announce("delete",void 0,[n]),e.root.hasEmptyBranch("body")&&e.mathfield.flushInlineShortcutBuffer()}):tu(e,Ia(e.selection),"deleteContentForward")}function tu(e,t,r){let n=e.getAtoms(t);if(n.length>0&&n[0].parent){let a=n[0];for(;a&&!(a instanceof Ui);)a=a.parent;let o=n[n.length-1];for(;o&&!(o instanceof Ui);)o=o.parent;if(a&&a instanceof Ui){let g=a;if(g&&o===g&&g.isMultiline){let[d,h]=[Math.min(e.position,e.anchor),Math.max(e.position,e.anchor)],[m,p]=e.at(d).parentBranch,[b,f]=e.at(h).parentBranch;if(b-m+1>=2)return e.deferNotifications({content:!0,selection:!0,type:r},()=>{var v;let y=g.getCell(m,p),x=g.getCell(b,f);if(!y||!x)return;e.extractAtoms([d,h]);let C=g.getCell(m,p),I=g.getCell(b,f);for(let F=b-1;F>m;F--)g.removeRow(F);if(m!==b){let F=g.getCell(m+1,p);if(C&&F){let R=[...C.filter(X=>X.type!=="first"),...F.filter(X=>X.type!=="first")];g.setCell(m,p,R),g.removeRow(m+1)}}let Z=g.getCell(m,p);if(Z){let F=C?C.filter(R=>R.type!=="first").length:0;e.position=e.offsetOf((v=Z[F])!=null?v:Z[0])}else e.position=d;g.isDirty=!0})}}let s=n[0].parent.firstChild;s.type==="first"&&(s=s.rightSibling);let l=n[n.length-1].parent.lastChild,c=n[0];c.type==="first"&&(c=c.rightSibling);let u=n[n.length-1];if(c===s&&u===l){let g=n[0].parent;g.parent&&g.type!=="prompt"&&(t=[e.offsetOf(g.leftSibling),e.offsetOf(g)])}if(n.length===1&&n[0].type==="placeholder"&&n[0].parent.type==="genfrac"){let g=n[0].parent,d=n[0].parentBranch==="below"?"above":"below",h=e.offsetOf(g.leftSibling);return e.deferNotifications({content:!0,selection:!0,type:r},()=>{var m,p;let b=g.removeBranch(d);if(b.length===1&&b[0].type==="placeholder")(p=g.parent)==null||p.removeChild(g),e.position=Math.max(0,h);else{let f=g.parent.addChildrenAfter(b,g);(m=g.parent)==null||m.removeChild(g),e.position=e.offsetOf(f)}})}}return e.deferNotifications({content:!0,selection:!0,type:r},()=>{let a=new Map;if(n.length>0){let s=n[0],l=n[n.length-1],c=new Set,u=s.parent;for(;u;)(u.type==="surd"||u.type==="box"||u.type==="enclose"||u.type==="leftright"||u.type==="genfrac"||u.type==="overunder")&&u.parent&&c.add(u),u=u.parent;let g=new Set;for(u=l.parent;u;)(u.type==="surd"||u.type==="box"||u.type==="enclose"||u.type==="leftright"||u.type==="genfrac"||u.type==="overunder")&&u.parent&&g.add(u),u=u.parent;for(let d of n)for(u=d.parent;u;){if((u.type==="surd"||u.type==="box"||u.type==="enclose"||u.type==="leftright"||u.type==="genfrac"||u.type==="overunder")&&u.parent){a.has(u)||a.set(u,{containsStart:c.has(u),containsEnd:g.has(u)});break}u=u.parent}}let o=Math.min(...t);e.deleteAtoms(t);for(let[s,l]of a){if(!s.parent)continue;let c=l.containsStart!==l.containsEnd;if(s.type==="surd"||s.type==="box"||s.type==="enclose"||s.type==="leftright"){let u=s.branch("body");if(!u||u.length===0||u.length===1&&u[0].type==="placeholder"){let g=e.offsetOf(s.leftSibling);s.parent.removeChild(s),e.position=Math.max(0,g)}else if(c&&!l.containsStart&&l.containsEnd){let g=e.offsetOf(s.leftSibling),d=s.removeBranch("body");d&&d.length>0&&s.parent.addChildrenAfter(d,s),s.parent.removeChild(s),e.position=Math.max(0,g)}}if(s.type==="genfrac"){let u=s.branch("above"),g=s.branch("below"),d=!u||u.length===0||u.length===1&&u[0].type==="placeholder",h=!g||g.length===0||g.length===1&&g[0].type==="placeholder";if(d&&h){let m=e.offsetOf(s.leftSibling);s.parent.removeChild(s),e.position=Math.max(0,m)}else if(d&&!h){let m=e.offsetOf(s.leftSibling),p=s.removeBranch("below");p&&p.length>0&&s.parent.addChildrenAfter(p,s),s.parent.removeChild(s),e.position=Math.max(0,m)}else if(!d&&h){let m=e.offsetOf(s.leftSibling),p=s.removeBranch("above");p&&p.length>0&&s.parent.addChildrenAfter(p,s),s.parent.removeChild(s),e.position=Math.max(0,m)}else if(c&&!l.containsStart&&l.containsEnd&&!d&&!h){let m=e.offsetOf(s.leftSibling),p=s.removeBranch("above");p&&p.length>0&&s.parent.addChildrenAfter(p,s),s.parent.removeChild(s),e.position=Math.max(0,m)}}}a.size===0&&(e.position=o),e.root.hasEmptyBranch("body")&&e.mathfield.flushInlineShortcutBuffer()})}function S8e(e,t,r,n){if(!(t instanceof Ui)||!t.isMultiline||t.rows.length===1||t.rows[r].length>1)return!1;let a=t.getCell(r,0);if(!a)return!1;if(t.removeRow(r),n==="backward"){let o=t.getCell(r-1,0);if(!o)return e.position=e.offsetOf(t),!0;o.length>0?e.position=e.offsetOf(o[o.length-1]):e.position=e.offsetOf(t),t.setCell(r-1,0,[...o,...a])}else{let o=t.getCell(r,0);if(!o)return e.position=e.offsetOf(t),!0;o.length>0?e.position=e.offsetOf(o[0]):e.position=e.offsetOf(t),t.setCell(r,0,[...a,...o])}return!0}function L8e(e,t,r){var n,a;if(e.at(t).mode!=="text")return t;let o=r==="backward"?-1:1,s;if(x1.test(e.at(t).value)){let l=t,c;do c=e.at(l).mode==="text"&&x1.test(e.at(l).value),l+=o;while(e.at(l)&&c);s=e.at(l)?l-2*o:l-o}else if(/\s/.test(e.at(t).value)){let l=t;for(;((n=e.at(l))==null?void 0:n.mode)==="text"&&/\s/.test(e.at(l).value);)l+=o;if(!e.at(l))s=l-o;else{let c=!0;do c=e.at(l).mode==="text"&&!/\s/.test(e.at(l).value),l+=o;while(e.at(l)&&c);s=e.at(l)?l-2*o:l-o}}else{let l=t;for(;((a=e.at(l))==null?void 0:a.mode)==="text"&&!/\s/.test(e.at(l).value);)l+=o;s=e.at(l)?l:l-o;let c=!0;for(;e.at(l)&&c;)c=e.at(l).mode==="text"&&/\s/.test(e.at(l).value),c&&(s=l),l+=o;s=e.at(l)?l-2*o:l-o}return s-(o>0?0:1)}function Tg(e,t,r){var n,a,o,s,l,c,u,g;let d=e.position;(n=r?.extend)!=null&&n||e.collapseSelection(t);let h=e.at(e.position);if(t==="forward"&&(h.type==="subsup"?(h=h.rightSibling,h||(h=e.at(e.position+1))):h=e.at(e.position+1)),!h)return e.announce("plonk"),!1;let m=e.offsetOf(h);if(h instanceof y0)m=L8e(e,m,t);else if(h instanceof Kn)if(h.isSuggestion)for(;h&&h instanceof Kn;)h.isSuggestion=!1,m=e.offsetOf(h),h=h.rightSibling;else if(t==="forward"){if(h=h.rightSibling,!h||!(h instanceof Kn))return e.announce("plonk"),!1;for(;h&&h instanceof Kn&&/[a-zA-Z\*]/.test(h.value);)m=e.offsetOf(h),h=h.rightSibling}else{if(h=h.leftSibling,!h||!(h instanceof Kn))return e.announce("plonk"),!1;for(;h&&h instanceof Kn&&/[a-zA-Z\*]/.test(h.value);)m=e.offsetOf(h),h=h.leftSibling}else if(t==="forward"&&h.type==="mopen"){let p=0;do h.type==="mopen"?p+=1:h.type==="mclose"&&(p-=1),h=h.rightSibling;while(!h.isLastSibling&&p!==0);m=e.offsetOf(h.leftSibling)}else if(t==="backward"&&h.type==="mclose"){let p=0;do h.type==="mopen"?p+=1:h.type==="mclose"&&(p-=1),h=h.leftSibling;while(!h.isFirstSibling&&p!==0);m=e.offsetOf(h)}else if(t==="backward")if(h.type==="first")for(;m>0&&h.type==="first";)m-=1,h=e.at(m);else{let p=h.type;h.type==="subsup"&&(m=e.offsetOf(e.at(m).leftSibling)),m-=1;let b=(a=e.at(m))==null?void 0:a.type;for(;m>=0&&b===p;)((o=e.at(m))==null?void 0:o.type)==="subsup"?m=e.offsetOf(e.at(m).leftSibling):m-=1,b=e.at(m).type}else{let{type:p}=h,b=(s=e.at(m))==null?void 0:s.type,{lastOffset:f}=e;for(;m<=f&&(b===p||b==="subsup");){for(;((l=e.at(m).rightSibling)==null?void 0:l.type)==="subsup";)m=e.offsetOf(e.at(m).rightSibling);m+=1,b=(c=e.at(m))==null?void 0:c.type}m-=1}if((u=r?.extend)!=null&&u){if(!e.setSelection(e.anchor,m))return e.announce("plonk"),!1;e.announce("move",d)}else{if(m===e.position)return e.announce("plonk"),!1;(g=r?.delete)!=null&&g?t==="forward"?tu(e,[d,m],"deleteWordForward"):(tu(e,[d,m],"deleteWordBackward"),e.position=m):(e.position=m,e.announce("move",d))}return e.mathfield.stopCoalescingUndo(),!0}function zc(e,t,r){var n,a;if(r=r??{extend:!1},e.mathfield.styleBias=t==="backward"?"right":"left",t!=="forward"){let[l,c]=iUt(e);l!==void 0&&c!==void 0&&e.deleteAtoms([l,c])}if(t==="upward")return U8e(e,r);if(t==="downward")return Y8e(e,r);if(r.extend){let l=PF(e,e.position,t);l<0&&(l=0),l>e.lastOffset&&(l=e.lastOffset);let c=e.setSelection(e.anchor,l);return e.mathfield.stopCoalescingUndo(),c}if(e.selectionIsPlaceholder){e.collapseSelection(t);let l=zc(e,t);return e.mathfield.stopCoalescingUndo(),l}let o=e.position,s=o;if(e.collapseSelection(t)?(o=e.position,IUt(e,o)||(o=PF(e,o,t))):o=PF(e,o,t),o<0||o>e.lastOffset){let l=!0;return e.silenceNotifications||(l=(a=(n=e.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))!=null?a:!0),l&&e.announce("plonk"),l}return e.setPositionHandlingPlaceholder(o),e.mathfield.stopCoalescingUndo(),e.announce("move",s),!0}function PF(e,t,r){return t=t+(r==="forward"?1:-1),t<0||t>e.lastOffset||IUt(e,t)?t:PF(e,t,r)}function IUt(e,t){var r;let n=e.at(t),a=n.parent;for(;a&&!a.inCaptureSelection;)a=a.parent;return!(a!=null&&a.inCaptureSelection||(r=n.parent)!=null&&r.skipBoundary&&(!n.isFirstSibling&&n.isLastSibling||n.type==="first")||e.mathfield.hasEditablePrompts&&!n.parentPrompt)}function w8e(e,t,r){let n=1/0,a=0;for(;au.type==="prompt"&&!u.captureSelection):r,l=lwt(e.mathfield.getHTMLElement(t)).right,c=e.offsetOf(w8e(e.mathfield,s,l))-(o?1:0);if(n){let[u,g]=e.selection.ranges[0],d;c<(a==="up"?u:g)?d={ranges:[[c,g]],direction:"backward"}:d={ranges:[[u,c]],direction:"forward"},e.setSelection(d)}else e.setPositionHandlingPlaceholder(c);e.announce(`move ${a}`)}function U8e(e,t){var r,n;let a=(r=t?.extend)!=null?r:!1;a||e.collapseSelection("backward");let o=()=>{var c,u;let g=!0;return e.silenceNotifications||(g=(u=(c=e.mathfield.host)==null?void 0:c.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?u:!0),e.announce(g?"line":"plonk"),g},s=e.at(e.position),l=s;for(;l&&l.parentBranch!=="below"&&!(Array.isArray(l.parentBranch)&&l.parent instanceof Ui);)l=l.parent;if(Array.isArray(l?.parentBranch)&&l.parent instanceof Ui){let c=l.parent;if(l.parentBranch[0]<1)return o();let u=l.parentBranch[0]-1,g=c.getCell(u,l.parentBranch[1]);if(!g.some(d=>d.type==="prompt"&&!d.captureSelection)&&e.mathfield.hasEditablePrompts)return o();mV(e,s,g,a,"up")}else if(l){let c=(n=l.parent.branch("above"))!=null?n:l.parent.createBranch("above");if(!c.some(u=>u.type==="prompt"&&u.placeholderId)&&e.mathfield.hasEditablePrompts)return o();mV(e,s,c,a,"up")}else return o();return e.mathfield.stopCoalescingUndo(),!0}function Y8e(e,t){var r,n;let a=(r=t?.extend)!=null?r:!1;a||e.collapseSelection("forward");let o=()=>{var c,u;let g=!0;return e.silenceNotifications||(g=(u=(c=e.mathfield.host)==null?void 0:c.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?u:!0),e.announce(g?"line":"plonk"),g},s=e.at(e.position),l=s;for(;l&&l.parentBranch!=="above"&&!(eu(l.parentBranch)&&l.parent instanceof Ui);)l=l.parent;if(eu(l?.parentBranch)&&l.parent instanceof Ui){let c=l.parent;if(l.parentBranch[0]+1>c.rows.length-1)return o();let u=l.parentBranch[0]+1,g=c.getCell(u,l.parentBranch[1]);if(!g.some(d=>d.type==="prompt"&&!d.captureSelection)&&e.mathfield.hasEditablePrompts)return o();mV(e,s,g,a,"down")}else if(l){let c=(n=l.parent.branch("below"))!=null?n:l.parent.createBranch("below");if(!c.some(u=>u.type==="prompt")&&e.mathfield.hasEditablePrompts)return o();mV(e,s,c,a,"down")}else return o();return!0}function vUt(e){let t=e.position,r=e.at(t).parent;return r!=null&&r.parent?(e.position=e.offsetOf(r),e.mathfield.stopCoalescingUndo(),e.announce("move",t),!0):(e.announce("plonk"),!1)}function E8e(e){let t=0,r=e.at(e.position),n=!1;for(;r;)r.hasEmptyBranch("superscript")?r.hasEmptyBranch("subscript")||(n=!1):(t+=1,n=!0),r=r.parent;return n?t:0}function N8e(e){let t=0,r=e.at(e.position),n=!1;for(;r;)r.hasEmptyBranch("subscript")?r.hasEmptyBranch("superscript")||(n=!1):(t+=1,n=!0),r=r.parent;return n?t:0}function aLt(e){if(e.collapseSelection(),E8e(e)>=e.mathfield.options.scriptDepth[1])return e.announce("plonk"),!1;let t=e.at(e.position);if(t.subsupPlacement===void 0){let r=t.rightSibling;r?.type!=="subsup"&&(r=new AV({style:t.style}),t.parent.addChildAfter(r,t)),t=r}return t.createBranch("superscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(t.superscript[0]))),!0}function oLt(e){if(e.collapseSelection(),N8e(e)>=e.mathfield.options.scriptDepth[0])return e.announce("plonk"),!1;let t=e.at(e.position);if(t.subsupPlacement===void 0){let r=t.rightSibling;r?.type!=="subsup"&&(r=new AV({style:t.style}),t.parent.addChildAfter(r,t)),t=r}return t.createBranch("subscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(t.subscript[0]))),!0}function O8e(){function e(c){let u=[],g=[];return[...c.querySelectorAll(`input, select, textarea, a[href], button, [tabindex], audio[controls], video[controls], [contenteditable]:not([contenteditable="false"]), details>summary`)].filter(t).forEach((d,h)=>{let m=n(d);m===0?u.push(d):g.push({documentOrder:h,tabIndex:m,node:d})}),g.sort((d,h)=>d.tabIndex===h.tabIndex?d.documentOrder-h.documentOrder:d.tabIndex-h.tabIndex).map(d=>d.node).concat(u)}function t(c){return!(!r(c)||a(c)||n(c)<0)}function r(c){return!(c.disabled||c.type==="hidden"&&c.tagName.toUpperCase()==="INPUT"||l(c))}function n(c){var u;let g=Number.parseInt((u=c.getAttribute("tabindex"))!=null?u:"NaN",10);return Number.isNaN(g)?c.contentEditable==="true"||(c.nodeName==="AUDIO"||c.nodeName==="VIDEO")&&c.getAttribute("tabindex")===null?0:c.tabIndex:g}function a(c){return c.tagName.toUpperCase()==="INPUT"&&c.type==="radio"&&!s(c)}function o(c,u){for(let g of c)if(g.checked&&g.form===u)return g;return null}function s(c){var u;if(!c.name)return!0;let g=((u=c.form)!=null?u:c.ownerDocument).querySelectorAll('input[type="radio"][name="'+c.name+'"]'),d=o(g,c.form);return!d||d===c}function l(c){if(!sl()||c===document.activeElement||c.contains(document.activeElement))return!1;if(getComputedStyle(c).visibility==="hidden")return!0;let u=c.getBoundingClientRect();if(u.width===0||u.height===0)return!0;for(;c;){if(getComputedStyle(c).display==="none")return!0;c=c.parentElement}return!1}return sl()?e(document.body):[]}function $a(e,t,r="forward"){let n=e.position;if($n(t)){let a=e.offsetOf(t[0]),o=e.offsetOf(t[t.length-1]);return r==="forward"?e.setSelection(a,o):e.setSelection(o,a),e.announce("move",n),e.mathfield.stopCoalescingUndo(),!0}return r==="forward"?$a(e,[t.leftSibling,t]):$a(e,[t,t.leftSibling])}function Dl(e,t){let r=e.position;if(typeof t=="number"&&(t=e.at(t)),t.type==="prompt")e.setSelection(e.offsetOf(t.firstChild),e.offsetOf(t.lastChild));else{let n=e.offsetOf(t);t.type==="placeholder"?e.setSelection(n-1,n):e.position=n}return e.announce("move",r),e.mathfield.stopCoalescingUndo(),!0}function c0(e,t){var r,n;let a=t==="forward"?1:-1;e.at(e.anchor).type==="placeholder"&&zc(e,t);let o,s=e.at(e.anchor).parentPrompt;s?t==="forward"?o=e.offsetOf(s)+1:o=e.offsetOf(s.leftSibling):o=Math.max(e.position+a,0);let l=t_(e,o,t);if(!l||t==="forward"&&e.offsetOf(l)o){if(!((n=(r=e.mathfield.host)==null?void 0:r.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))==null||n))return e.announce("plonk"),!1;let c=O8e();if(!document.activeElement||c.length<=1)return e.announce("plonk"),!1;let u=c.indexOf(document.activeElement)+a;return u<0&&(u=c.length-1),u>=c.length&&(u=0),c[u].focus(),e.mathfield.stopCoalescingUndo(),!0}return Dl(e,l),!0}function t_(e,t=0,r="forward"){return e.findAtom(n=>n.type==="placeholder"||n.type==="prompt"||!e.mathfield.readOnly&&n.treeDepth>2&&n.isFirstSibling&&n.isLastSibling,t,r)}function sLt(e,t,r,n){if(n==="forward"){let o=t.rightSibling;for(;o&&!r(o);)o=o.rightSibling;return o}let a=t.leftSibling;for(;a&&!r(a);)a=a.leftSibling;return a}function VF(e,t,r){typeof t=="function"&&(r=t,t=1/0),t===void 0&&(t=1/0);let n=e.position,a=!1,o="";for(;!a;){let s=e.at(n);a=t===0||s===void 0||s.type==="first"||s.mode!=="math"||!(s.type&&/mord|mpunct|operator/.test(s.type)||s.type==="mop"&&/[a-zA-Z ]+/.test(s.value))||!s.hasEmptyBranch("superscript")||!s.hasEmptyBranch("subscript")||typeof r=="function"&&!r(s),a||(s.mode="text",s.command=s.value,s.verbatimLatex=void 0,o+=s.value),n-=1,t-=1}e.contentDidChange({data:o,inputType:"insertText"})}function r1(e,t,r){typeof t=="function"&&(r=t,t=1/0),t===void 0&&(t=1/0);let n=e.position,a=!1,o=[];for(;!a;){let s=e.at(n);a=t===0||!s||s.type==="first"||s.isFirstSibling||s.mode!=="text"||s.value===" "||typeof r=="function"&&!r(s),a||(o.push(be.serialize([s],{defaultMode:"math"})),s.mode="math"),n-=1,t-=1}S_(e),e.contentDidChange({data:ki(o),inputType:"insertText"})}function S_(e){var t;let r=e.position-1;for(;r>=0&&((t=e.at(r))==null?void 0:t.mode)==="math";)r-=1;if(!(r<0)&&e.at(r).mode==="text"&&e.at(r).value===" "&&e.at(r-1).mode==="math"){e.at(r-1).parent.removeChild(e.at(r-1));let n=e.silenceNotifications;e.silenceNotifications=!0,e.position-=1,e.silenceNotifications=n,e.contentDidChange({inputType:"deleteContent"})}}function Q8e(e){let t="",r=e.position,n=!1;for(;!n;){let a=e.at(r);n=!(a&&(a.mode==="text"||a.mode==="math"&&a.type&&/mord|mpunct/.test(a.type))),n||(t=a.value+t),r-=1}return t}function T8e(e,t,r){let{model:n}=e;if(n.mode==="latex"||!n.at(n.position).isLastSibling||!r||!B1(r))return!1;let a=r0(r);if(!n.selectionIsCollapsed)return!!(e.model.mode==="text"&&/[/_^]/.test(a));let o=Q8e(n)+a;if(e.model.mode==="text"){if(t==="Esc"||/[/\\]/.test(a))return!0;if(/[\^_]/.test(a))return/(^|\s)[a-zA-Z][^_]$/.test(o)&&r1(n,1),!0;let s={")":"(","}":"{","]":"["}[a],{parent:l}=n.at(n.position);if(s&&l instanceof qr&&l.leftDelim===s)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(o))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(a))return!0;if(/(^|[^a-zA-Z'’])[a-zA-Z] $/.test(o))return r1(n,1),!1;if(/\D\.[^\d\s]$/.test(o)){r1(n,1);let c=n.at(n.position);return c.value="\u22C5",c.style.variant="normal",c.command="\\cdot",c.verbatimLatex=void 0,n.contentDidChange({data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(o)||/\.\d$/.test(o)||/\([\d+\-.]$/.test(o))return r1(n,1),!0;if(/\([a-z][,;]$/.test(o))return r1(n,2),!0;if(/[\d+\-=><*|]$/.test(a))return S_(n),!0}else{if(t==="[Space]")return VF(n,void 0,s=>/[a-z][:,;.]$/.test(s.value)),!0;if(/[a-zA-Z]{3,}$/.test(o)&&!/(dxd|abc|xyz|uvw)$/.test(o))return VF(n,void 0,s=>/[a-zA-Z]/.test(s.value)),!0;if(/(^|\W)(if)$/i.test(o))return VF(n,1),!0;if(/(\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5){3,}$/u.test(o)&&!/(αβγ)$/.test(o))return VF(n,void 0,s=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(s.value)),!0;if(a==="?"||a==="."&&!/[\d-+]\.$/.test(o))return!0}return!1}function J8e(e,t){if(!e.isSelectionEditable||!e.keystrokeCaptionVisible)return;let r=GUt(),n=e.element.getBoundingClientRect();r.style.left=`${n.left}px`,r.style.top=`${n.top-64}px`,r.innerHTML=globalThis.MathfieldElement.createHTML(""+(B_(t)||t)+""+r.innerHTML),r.style.visibility="visible",setTimeout(()=>{r.childNodes.length>0&&r.childNodes[r.childNodes.length-1].remove(),r.childNodes.length===0&&(r.style.visibility="hidden")},3e3)}function H8e(e){if(e.keystrokeCaptionVisible=!e.keystrokeCaptionVisible,e.keystrokeCaptionVisible){let t=GUt();t.innerHTML=""}else{let t=WV("mathlive-keystroke-caption-panel");t.style.visibility="hidden"}return!1}function GUt(){return document.getElementById("mathlive-keystroke-caption-panel")||(iu("keystroke-caption"),iu("core"),WV("mathlive-keystroke-caption-panel"))}function _8e(){document.getElementById("mathlive-keystroke-caption-panel")&&(Y1("mathlive-keystroke-caption-panel"),jg("core"),jg("keystroke-caption"))}function yUt(e,t){var r,n,a,o;let{model:s}=e,l=eUt(t);if(t.isTrusted){FDe(t);let f=y1();e.keyboardLayout!==f.id&&(e.keyboardLayout=f.id,e._keybindings=void 0)}if(clearTimeout(e.inlineShortcutBufferFlushTimer),e.inlineShortcutBufferFlushTimer=0,J8e(e,l),t.isTrusted&&t.defaultPrevented)return e.flushInlineShortcutBuffer(),!1;let c,u=0,g="",d=0,h=e.inlineShortcutBuffer,m=!1;if(e.isSelectionEditable&&s.selectionIsPlaceholder&&B1(t)&&(e.flushInlineShortcutBuffer(),s.deleteAtoms(Ia(s.selection)),e.snapshot("delete"),m=!0),e.isSelectionEditable){if(s.mode==="math"&&(!s.selectionIsPlaceholder||m))if(l==="[Backspace]")e.undoManager.lastOp==="insert-shortcut"?g="undo":h.pop();else if(!B1(t))e.flushInlineShortcutBuffer();else{let f=r0(t),v=[...(n=(r=h[h.length-1])==null?void 0:r.keystrokes)!=null?n:[],f];h.push({state:s.getState(),keystrokes:v,leftSiblings:D8e(e)}),u=0;let y="";for(;!c&&u(yr.insert(s,c,{format:"latex",style:f}),S_(e.model),c.endsWith(" ")&&(e.switchMode("text"),yr.insert(s," ",{style:f,mode:"text"})),e.snapshot(),s.selectionIsCollapsed||e.flushInlineShortcutBuffer(),!0)),e.dirty=!0,s.announce("replacement")}return e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}function j8e(e){var t,r;let{position:n}=e,a=n,o=[];for(;a>0;){let p=e.at(a),b=p.value;if(p.type==="mord"||p.type==="mbin"&&(b==="+"||b==="-"||b==="\u2212"))o.unshift(p),a--;else break}if(o.length===0)return null;let s=o.map(p=>p.value).join(""),l=((r=(t=globalThis.MathfieldElement)==null?void 0:t.decimalSeparator)!=null?r:".")==="."?"\\.":",",c=new RegExp(`^(\\d+(?:${l}\\d*)?)[eE]([+\\-\u2212]?)(\\d+)$`),u=s.match(c);if(!u)return null;let g=u[1],d=u[2],h=u[3],m=d+h;return{startOffset:a,endOffset:n,significand:g,exponent:m}}function z8e(e,t){var r;let n=(r=globalThis.MathfieldElement)==null?void 0:r.scientificNotationTemplate;if(!n||n===""||!n.includes("#1")||!n.includes("#2"))return null;let a=n.replace("#1",e);return a=a.replace("#2",t),a}function lLt(e){let{model:t}=e;if(t.mode!=="math")return!1;let r=j8e(t);if(!r)return!1;let n=z8e(r.significand,r.exponent);return n?(t.deferNotifications({content:!0,selection:!0,type:"insertText"},()=>{t.selection={ranges:[[r.startOffset,r.endOffset]],direction:"forward"},yr.insert(t,n,{insertionMode:"replaceSelection",selectionMode:"after"})}),e.snapshot("format-scientific-notation"),e.dirty=!0,e.scrollIntoView(),!0):!1}function e_(e,t,r){let{model:n}=e;if(!e.isSelectionEditable){n.announce("plonk");return}r!=null||(r={}),r.focus&&e.focus(),r.feedback&&globalThis.MathfieldElement.playSound("keypress"),typeof r.mode=="string"&&(e.switchMode(r.mode),e.snapshot());let a=zLt(t),o=window.mathVirtualKeyboard;if(o!=null&&o.isShifted&&(a=typeof a=="string"?a.toUpperCase():a.map(s=>s.toUpperCase())),r.simulateKeystroke){let s=!0;for(let l of a)yUt(e,new KeyboardEvent("keypress",{key:l}))&&(s=!1);if(s)return}if(n.mode==="latex"){if(n.deferNotifications({content:!0,selection:!0,data:t,type:"insertText"},()=>{XV(e);for(let s of a)yr.insert(n,s,{insertionMode:"replaceSelection"});e.snapshot("insert-latex"),U1(e)}),t==="}"){let s=X1(n).map(c=>c.value).join(""),l=s.match(/^\\([a-zA-Z]+)/);if(l){let c="\\"+l[1],u=qn(c,"math");if(u?.definitionType==="function"){let g=u.params.filter(d=>!d.isOptional).length;if(g>0){let d=0,h=0,m=!0;for(let p=0;p0?e.options.inlineShortcutTimeout:1e3;clearTimeout(e.scientificNotationTimer),e.scientificNotationTimer=setTimeout(()=>{lLt(e)},c)}}function P8e(e){var t,r,n,a;if(e.selectionIsCollapsed)return(r=(t=e.at(e.position))==null?void 0:t.style)!=null?r:{};let o=Ia(e.selection)[0];return(a=(n=e.at(o+1))==null?void 0:n.style)!=null?a:{}}function i_(e,t,r){var n;if(!t||e.mode!=="math")return!1;let a=e.at(e.position),{parent:o}=a,s={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[t];if(!s)return!1;let l=sV[s],c=ZV[s];if(!e.selectionIsCollapsed){e.mathfield.snapshot();let[u,g]=Ia(e.selection),d=e.extractAtoms([u,g]),h=o.addChildrenAfter([new qr("left...right",d,{leftDelim:s,rightDelim:c})],e.at(u));return e.setSelection(e.offsetOf(h.firstChild),e.offsetOf(h.lastChild)),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:s,inputType:"insertText"}),!0}if(s==="|"){let u=o instanceof qr?o.leftDelim+o.rightDelim:"";if(u==="\\lbrace\\rbrace"||u==="\\{\\}"||u==="\\lbrace?")return e.mathfield.snapshot(),yr.insert(e,"\\,\\middle\\vert\\,",{format:"latex",style:r}),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:s,inputType:"insertText"}),!0}if(c){if(o instanceof qr&&o.firstChild===a&&(o.leftDelim==="?"||o.leftDelim==="."))return o.leftDelim=s,o.isDirty=!0,e.mathfield.snapshot(),e.contentDidChange({data:s,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(!(o instanceof qr)){let h=a;for(;h&&!(h.type==="mclose"&&h.value===c);)h=h.rightSibling;if(h){e.mathfield.snapshot();let m=e.extractAtoms([e.offsetOf(a),e.offsetOf(h)]);m.pop();let p=new qr("left...right",m,{leftDelim:s,rightDelim:c});return o.addChildrenAfter([p],a),e.position=e.offsetOf(p.firstChild),e.contentDidChange({data:s,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}}let u=e.offsetOf(a.lastSibling),g;for(g=e.position;g<=u;g++){let h=e.at(g);if(h instanceof qr&&(h.leftDelim==="?"||h.leftDelim===".")&&cLt(s,h.rightDelim))break}let d=e.at(g);if(g<=u&&d instanceof qr){d.leftDelim=s,e.mathfield.snapshot();let h=e.extractAtoms([e.position,g-1]);return h=h.filter(m=>m.type!=="first"),d.addChildren(h,d.parentBranch),e.position+=1,e.contentDidChange({data:s,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(o instanceof qr&&(o.leftDelim==="?"||o.leftDelim===".")&&cLt(s,o.rightDelim)){o.isDirty=!0,o.leftDelim=s,e.mathfield.snapshot();let h=e.extractAtoms([e.offsetOf(a.firstSibling),e.position]);for(let m of h)o.parent.addChildBefore(m,o);return e.contentDidChange({data:s,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(!(o instanceof qr&&o.leftDelim==="|")){if(s==="("){let h=e.position-1,m=!1;for(;h>=0;){let p=e.at(h);if(p.type==="first")break;if(p.type==="mord"&&p.value&&/^[\d]$/.test(p.value)){h-=1;continue}if(p.type==="group"&&((n=p.body)==null?void 0:n.length)===2&&p.body[0].type==="first"&&p.body[1].value===","){m=!0;break}if(p.type==="mord"&&(p.value===","||p.value===".")){m=!0;break}break}if(m)return!1}if(e.mathfield.snapshot(),yr.insert(e,`\\left${s}\\right?`,{format:"latex",style:r}),a.lastSibling.type!=="first"){let h=e.offsetOf(a.lastSibling),m=e.extractAtoms([e.position,h]);e.at(e.position).body=m,e.position-=1}return e.mathfield.snapshot("insert-fence"),!0}}if(l){if(s===")"){let p=e.position-1,b=!1;for(;p>=0;){let f=e.at(p);if(f.type==="first")break;if(f.type==="mord"&&f.value&&/^[\d]$/.test(f.value)){b=!0,p-=1;continue}break}if(b&&e.at(p).type==="mopen"&&e.at(p).value==="(")return!1}let u=a;for(;u;){if(u.type==="mopen"&&u.value===l){e.mathfield.snapshot();let p=u.leftSibling,b=e.extractAtoms([e.offsetOf(u.leftSibling),e.offsetOf(a)]);[,...b]=b;let f=new qr("left...right",b,{leftDelim:l,rightDelim:s});return o.addChildrenAfter([f],p),e.position=e.offsetOf(f),e.contentDidChange({data:s,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}u=u.leftSibling}if(o instanceof qr&&a.isLastSibling&&I9(o.leftDelim,s))return e.mathfield.snapshot(),o.isDirty=!0,o.rightDelim=s,e.position+=1,e.contentDidChange({data:s,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;let g=e.offsetOf(a.firstSibling),d;for(d=e.position;d>=g;d--){let p=e.at(d);if(p instanceof qr&&(p.rightDelim==="?"||p.rightDelim===".")&&I9(p.leftDelim,s))break}let h=e.at(d);if(d>=g&&h instanceof qr)return e.mathfield.snapshot(),h.rightDelim=s,h.addChildren(e.extractAtoms([d,e.position]),h.parentBranch),e.contentDidChange({data:s,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(o instanceof qr&&(o.rightDelim==="?"||o.rightDelim===".")&&I9(o.leftDelim,s))return e.mathfield.snapshot(),o.isDirty=!0,o.rightDelim=s,o.parent.addChildren(e.extractAtoms([e.position,e.offsetOf(a.lastSibling)]),o.parentBranch),e.position=e.offsetOf(o),e.contentDidChange({data:s,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;let m=o.parent;return m instanceof qr&&(m.rightDelim==="?"||m.rightDelim===".")&&e.at(e.position).isLastSibling?(e.position=e.offsetOf(m),i_(e,s,r)):!1}return!1}function I9(e,t){return e?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t):ZV[e]===t:!0}function cLt(e,t){return t?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e):sV[t]===e:!0}function r_(e){let[t,r]=Ia(e.selection);if(t=dLt(e,t,"backward"),r=dLt(e,r,"forward"),t===r){let n=e.at(t);if(n.type==="leftright")return e.setSelection(e.offsetOf(n.firstChild)-1,r);if(n.type==="first"&&(n.parent.type==="leftright"||n.parent.type==="surd"))return e.setSelection(t-1,e.offsetOf(n.parent.lastChild)+1);e.setSelection(t-1,r)}else e.setSelection(t,r);return!0}function dLt(e,t,r){var n;let a=e.at(t);if(!a)return t;let o=r==="forward"?1:-1;if(a.mode==="text"){for(;a&&!(a.mode!=="text"||!x1.test(a.value));)t+=o,a=e.at(t);return r==="backward"?t-1:t}if(a.mode==="latex"){if(/[a-zA-Z\\*]/.test(a.value))if(r==="backward")for(;a?.mode==="latex"&&a.value!=="\\"&&/[a-zA-Z]/.test(a.value);)t+=o,a=e.at(t);else for(;a?.mode==="latex"&&/[a-zA-Z\\*]/.test(a.value);)t+=o,a=e.at(t);else if(a.value==="{"){if(r==="forward"){for(;a?.mode==="latex"&&a.value!=="}";)t+=o,a=e.at(t);return t}return t-1}else if(a.value==="}"){if(r==="backward"){for(;a?.mode==="latex"&&a.value!=="{";)t+=o,a=e.at(t);return t-1}return t}return t-1}if(a.mode==="math"){if(a.isDigit()){for(;(n=e.at(t+o))!=null&&n.isDigit();)t+=o;return r==="backward"?t-1:t}if(a.style.variant||a.style.variantStyle){let s=a.style.variant,l=a.style.variantStyle;for(;;){let c=e.at(t+o);if(!c||c.style.variant!==s||c.style.variantStyle!==l)break;t+=o}return r==="backward"?t-1:t}return t}return t}function n_(e){return e!==null&&globalThis.PointerEvent!==void 0&&e instanceof PointerEvent}function v9(e,t,r){return e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom}function uLt(e,t,r){return er?r:e}function gLt(e,t){var r,n,a,o,s,l;if(t.buttons>1)return;e.atomBoundsCache?e.atomBoundsCache.clear():e.atomBoundsCache=new Map;let c=e,u,g=!1,d=!1,h="none",m=!1,p=!1,b=t.clientX,f=t.clientY,v=Date.now(),y=c.field,x=setInterval(()=>{m?y.scroll({top:0,left:y.scrollLeft-16}):p&&y.scroll({top:0,left:y.scrollLeft+16})},32);function C(){pV.stop(),g=!1,clearInterval(x),e.element.classList.remove("tracking"),t&&t.preventDefault()}function I(O){if(!c.hasFocus()){C();return}let J=O.clientX,E=O.clientY,_=n_(O)&&O.pointerType==="touch"?20:5;if(Date.now()P.right,m=J=0&&bt>=0&&(c.model.extendSelectionTo(it,bt),Hr(e)),d&&r_(c.model)}Tm&&Math.abs(Tm.x-b)<5&&Math.abs(Tm.y-f)<5&&Date.now()=0){if(e.element.classList.add("tracking"),t.shiftKey){let O=e.model.selectionIsCollapsed;e.model.extendSelectionTo(e.model.anchor,u),b9(e.model)||O?h="all":h="selection"}else if(e.model.at(u).type==="placeholder"||e.model.at(u).type==="prompt"){let O=e.model.at(u);O.hasChildren&&O.firstChild?e.model.position=e.model.offsetOf(O.firstChild):e.model.setSelection(u-1,u),h="selection"}else if(((s=e.model.at(u).rightSibling)==null?void 0:s.type)==="placeholder"||((l=e.model.at(u).rightSibling)==null?void 0:l.type)==="prompt"){let O=e.model.at(u).rightSibling;O.hasChildren&&O.firstChild?e.model.position=e.model.offsetOf(O.firstChild):e.model.setSelection(u,u+1),h="selection"}else{let O=e.model.at(u);if(O.captureSelection&&O.hasChildren&&O.body&&O.body.length>0){let J=O.body.find(E=>E.type!=="first");J&&(J.type==="placeholder"||J.type==="prompt")&&J.hasChildren&&J.firstChild?(e.model.position=e.model.offsetOf(J.firstChild),h="selection"):(e.model.position=u,b9(e.model)?h="all":h="selection")}else e.model.position=u,b9(e.model)?h="all":h="selection"}t.detail===3||n1>2?(C(),(t.detail===3||n1===3)&&(e.model.selection={ranges:[[0,e.model.lastOffset]]},h="all")):g||(g=!0,pV.start(y,t,I,C),(t.detail===2||n1===2)&&(d=!0,r_(e.model),h="all"))}e.hasFocus()||(h="none",e.onFocus(),e.model.announce("line"))}else Tm=null;e.stopCoalescingUndo(),h!=="none"&&(e.model.selectionIsCollapsed&&(h="all"),Hr(e)),t.preventDefault()}function K8e(e,t,r){if(e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom)return 0;let n=e-(r.left+r.right)/2,a=t-(r.top+r.bottom)/2;return n*n+a*a}function d1(e,t,r,n,a){if(!r.id)return[1/0,null];if(t.has(r.id))return t.get(r.id);let o=ap(e,r);if(!o)return[1/0,null];let s=[1/0,null],l=e.model;if(r instanceof Ui){let c=-1,u=1/0;for(let d=0;dp?b=a-p:b=0,b=0?[r.rows[c]]:r.rows;for(let d of g)for(let h of d)if(h)for(let m of h){let p=d1(e,t,m,n,a);p[0]<=s[0]&&(s=p)}if(!r.isMultiline)for(let d of r.children){let h=d1(e,t,d,n,a);h[0]<=s[0]&&(s=h)}}else if(r.hasChildren&&!r.captureSelection&&n>=o.left&&n<=o.right){let c=r.children;for(let u of c){let g=d1(e,t,u,n,a);g[0]<=s[0]&&(s=g)}for(let u of r.branches){let g=r.branch(u);if(!g||g.length===0)continue;let d=[l.offsetOf(g[0]),l.offsetOf(g[g.length-1])],h=FMe(e,d);if(a>=h.top&&a<=h.bottom)for(let m of g){let p=d1(e,t,m,n,a);p[0]<=s[0]&&(s=p)}}}return s[1]||(s=[K8e(n,a,o),r]),t.set(r.id,s),s}function q8e(e,t,r){let[,n]=d1(e,new Map,e.model.root,t,r);return n}function KF(e,t,r,n){var a;let o=e.field.querySelector(".ML__latex").getBoundingClientRect();if(!o)return 0;if(t>o.right||r>o.bottom+8)return e.model.lastOffset;if(tbV(l)))):(n.format==="auto"||(a=n.format)!=null&&a.startsWith("latex"))&&(n.format==="auto"&&([o,t]=R1(t,{format:"auto",inlineShortcuts:e.mathfield.options.inlineShortcuts})),n.format==="latex"&&([,t]=C_(t)),s=xo(t,{context:e.mathfield.context,args:r}),n.format!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&(s=s.map(l=>bV(l))));return A_(s,n.style),[o??"latex",s]}function bV(e){var t;if(e instanceof qr&&e.leftDelim!=="("&&e.rightDelim===")"){let r=(t=e.body)==null?void 0:t.filter(n=>n.type!=="first");if(r?.length===1&&r[0].type==="genfrac")return r[0]}for(let r of e.branches)e.hasEmptyBranch(r)||e.setChildren(e.branch(r).map(n=>bV(n)),r);return e instanceof Ui&&e.forEachCell((r,n,a)=>{e.setCell(n,a,r.map(o=>bV(o)))}),e}function tPe(e){let t=e.at(e.position);if(t.mode==="text"){for(;!t.isFirstSibling&&t.mode==="text";)t=t.leftSibling;return e.offsetOf(t)}let r=t,n=!1;if(t.type==="mclose"){let a=sV[t.value];for(;!t.isFirstSibling&&!(t.type==="mopen"&&t.value===a);)t=t.leftSibling;t.isFirstSibling||(t=t.leftSibling),n=!0}else t.type==="leftright"&&(t=t.leftSibling,n=!0);if(n)for(;!t.isFirstSibling&&(t.isFunction||mLt(t));)t=t.leftSibling;else{let a=[];for(;!t.isFirstSibling&&(mLt(t)||a.length>0);)t.type==="mclose"&&a.unshift(t.value),t.type==="mopen"&&a.length>0&&t.value===sV[a[0]]&&a.shift(),t=t.leftSibling}return r===t?-1:e.offsetOf(t)}function ePe(e){if(e.type==="mord"&&e.value==="e"){let t=e.leftSibling;if(t&&t.isDigit())return!0}if(e.type==="mbin"&&(e.value==="+"||e.value==="-"||e.value==="\u2212")){let t=e.leftSibling,r=e.rightSibling;if(t?.type==="mord"&&t.value==="e"&&r&&r.isDigit()){let n=t.leftSibling;if(n&&n.isDigit())return!0}}if(e.type==="subsup"){let t=e.leftSibling;if(t&&t.isDigit()&&t.value==="0"){let r=t.leftSibling;if(r&&r.isDigit()&&r.value==="1"){let n=r.leftSibling;if(n?.type==="mbin"&&(n.value==="\xD7"||n.value==="\\times")){let a=n.leftSibling;if(a&&a.isDigit())return!0}}}}if(e.isDigit()&&e.value==="0"){let t=e.leftSibling,r=e.rightSibling;if(t&&t.isDigit()&&t.value==="1"&&r?.type==="subsup"){let n=t.leftSibling;if(n?.type==="mbin"&&(n.value==="\xD7"||n.value==="\\times")){let a=n.leftSibling;if(a&&a.isDigit())return!0}}}if(e.isDigit()&&e.value==="1"){let t=e.rightSibling;if(t&&t.isDigit()&&t.value==="0"){let r=t.rightSibling;if(r?.type==="subsup"){let n=e.leftSibling;if(n?.type==="mbin"&&(n.value==="\xD7"||n.value==="\\times")){let a=n.leftSibling;if(a&&a.isDigit())return!0}}}}if(e.type==="mbin"&&(e.value==="\xD7"||e.value==="\\times")){let t=e.leftSibling,r=e.rightSibling;if(t&&t.isDigit()&&r&&r.isDigit()&&r.value==="1"){let n=r.rightSibling;if(n&&n.isDigit()&&n.value==="0"){let a=n.rightSibling;if(a?.type==="subsup")return!0}}}return!1}function mLt(e){return e.isDigit()||ePe(e)?!0:e.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(e.type)?e.type!=="extensible-symbol":!1}function rPe(e,t){if(e.includes("$")){let r=[],n=0,a=!1,o="";for(;n{(!a||m.length>a)&&(a=m.length)});let o=document.getElementById("mathlive-environment-popover");o||(o=WV("mathlive-environment-popover"),iu("environment-popover"),iu("core"),o.setAttribute("aria-hidden","true"));let s,l=o.querySelector(".MLEP__environment-controls");l?s=l:(s=document.createElement("div"),o.innerHTML="",o.appendChild(s)),s.className="MLEP__environment-controls",s.style.display="flex",s.style.width="100%",s.style.height="100%",s.style.boxSizing="border-box",s.innerHTML=aPe;let c=[],u="",g=e.model.parentEnvironment.environmentName;if(Iwt(g)){let m=pPe(g);u=G9[m]("active");let p=G9,{[m]:b}=p,f=eV(p,[JVt(m)]);c=Object.values(f).map(v=>v("inactive"))}else if(qMe(g)){let m=bPe(g);u=y9[m]("active");let p=y9,{[m]:b}=p,f=eV(p,[JVt(m)]);c=Object.values(f).map(v=>v("inactive"))}else $Me(g)&&(u=G9.matrix("active"),c=Object.values(y9).map(m=>m("inactive")));let d=document.createElement("div");d.className="MLEP__environment-delimiter-controls",d.style.display="flex",d.style.flexDirection="column",d.innerHTML=`
    ${u} ${c.join("")}
    `,u&&s.appendChild(d),s.querySelectorAll("[data-command]").forEach(m=>{let p=m.dataset.command,b=p;try{b=JSON.parse(p)}catch{}m.addEventListener("mousedown",f=>f.preventDefault()),b&&m.addEventListener("click",()=>e.executeCommand(b))});let h=(r=e.field)==null?void 0:r.getBoundingClientRect();h&&(o.style.top=`${window.scrollY+(h.top-o.clientHeight-15)}px`,o.style.left=`${h.left+20}px`,o.classList.add("is-visible"))}function a_(){let e=document.getElementById("mathlive-environment-popover");e?.classList.remove("is-visible")}function mPe(){document.getElementById("mathlive-environment-popover")&&(Y1("mathlive-environment-popover"),jg("environment-popover"),jg("core"))}function wF(e){if(!e.hasFocus())return;let t=!1;if(e.model.mode==="math"){let r=e.model.parentEnvironment;if(r!=null&&r.rows&&KMe(r.environmentName)){let n=e.options.environmentPopoverPolicy;t=n==="auto"||n==="on"}}t?hPe(e):a_()}function pPe(e){return e.replace("*","")}function bPe(e){return e==="dcases"?"cases":e}function xUt(e){let t=getComputedStyle(e).direction;return t==="ltr"||t==="rtl"?t:"ltr"}function bLt(e,t,r){return t==="left"||t==="leading"&&r==="ltr"||t==="trailing"&&r==="rtl"?e.left:e.right}function C9(e,t,r,n){return r==="middle"?e-t/2:r==="start"&&n==="rtl"||r==="end"&&n==="ltr"||r==="top"||r==="right"?Math.max(0,e-t):e}function fPe(e,t,r,n){return r==="middle"?e-t/2:r==="start"&&n==="ltr"||r==="end"&&n==="rtl"||r==="top"||r==="right"?e:e-t}function IPe(e,t){var r,n,a;let o=(r=xUt(e))!=null?r:"ltr";e.style.position="fixed",e.style.left="",e.style.top="",e.style.right="",e.style.bottom="",e.style.height="",e.style.width="";let s=e.getBoundingClientRect(),l=Number.isFinite(t.maxHeight)?Math.min(t.maxHeight,window.innerHeight):window.innerHeight,c=Math.min(l,(n=t.height)!=null?n:s.height),u=C9(t.location.y,c,t.verticalPos,o);u+c>window.innerHeight-8&&(t.alternateLocation?(u=C9(t.alternateLocation.y,c,t.verticalPos,o),u+c>window.innerHeight-8&&(u=void 0)):u=void 0),Number.isFinite(u)||(u=Math.max(8,window.innerHeight-8-c),8+c>window.innerHeight-8&&(e.style.bottom="8px")),c=Math.min(u+c,window.innerHeight-8)-u;let g=Number.isFinite(t.maxWidth)?Math.min(t.maxWidth,window.innerWidth):window.innerWidth,d=Math.min(g,(a=t.width)!=null?a:s.width),h=C9(t.location.x,d,t.horizontalPos,o);h+d>window.innerWidth-8&&(t.alternateLocation?(h=fPe(t.alternateLocation.x,d,t.verticalPos,o),h+d>window.innerWidth-8&&(h=void 0)):h=void 0),Number.isFinite(h)||(h=Math.max(8,window.innerWidth-8-d),8+d>window.innerWidth-8&&(e.style.right="8px")),d=Math.min(h+d,window.innerWidth-8)-h,o==="rtl"?e.style.right=`${Math.ceil(window.innerWidth-h-d).toString()}px`:e.style.left=`${Math.ceil(h).toString()}px`,e.style.top=`${Math.ceil(u).toString()}px`,c!==s.height&&(e.style.height=`${Math.ceil(c).toString()}px`),d!==s.width&&(e.style.width=`${Math.ceil(d).toString()}px`)}function vPe(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function d0(e){return"submenu"in e}function Md(e){return"type"in e&&e.type==="command"||"onMenuSelect"in e||"id"in e}function o_(e){return"type"in e&&e.type==="divider"}function x9(e){return"type"in e&&e.type==="heading"}function Z9(e){let t=fLt[e];if(!t){let r;switch(e){case"checkmark":r=``;break;case"trailing-chevron":r='';break;case"mixedmark":r=''}if(r){let n=document.createElement("template");n.innerHTML=r,fLt[e]=n,t=n}}if(t){if("content"in t)return t.content.cloneNode(!0);let r=document.createElement("svg");return r.innerHTML=t.innerHTML,r}}function GPe(e,t,r){return Math.hypot(e,t)/r}function Jm(e,t){return e===void 0||typeof e!="function"?e:(t!=null||(t={alt:!1,control:!1,shift:!1,meta:!1}),e(t))}function vLt(){document.addEventListener("focusin",Jg,!0),document.addEventListener("focusout",Jg,!0),document.addEventListener("focus",Jg,!0),document.addEventListener("blur",Jg,!0)}function Jg(e){e.stopImmediatePropagation(),e.preventDefault()}function GLt(){document.removeEventListener("focusin",Jg,!0),document.removeEventListener("focusout",Jg,!0),document.removeEventListener("focus",Jg,!0),document.removeEventListener("blur",Jg,!0)}function XUt(e){return o_(e)?!1:typeof e.label=="function"||typeof e.ariaLabel=="function"||typeof e.tooltip=="function"||(Md(e)||d0(e))&&(typeof e.enabled=="function"||typeof e.visible=="function")||Md(e)&&typeof e.checked=="function"?!0:d0(e)?e.submenu.some(XUt):!1}function yPe(e){return new Promise((t,r)=>{let n=cV(e);n||t(!1);let a=n,o=setTimeout(()=>{s.abort(),t(vPe(a,n){if(u.type==="pointerup"||u.type==="pointercancel")clearTimeout(o),s.abort(),t(!1);else if(u.type==="pointermove"){let g=cV(u);g&&(a=g)}},{passive:!0,signal:l})})}async function CLt(e,t,r){if(e.defaultPrevented)return!1;if(e.type==="contextmenu"){let n=e;if(e.preventDefault(),e.stopPropagation(),r.show({target:t,location:cV(n),modifiers:qm(n)}))return!0}if(e.type==="keydown"){let n=e;if(n.code==="ContextMenu"||n.code==="F10"&&n.shiftKey){let a=t?.getBoundingClientRect();if(xLt(t)&&a&&r.show({target:t,location:{x:Math.ceil(a.left+a.width/2),y:Math.ceil(a.top+a.height/2)},modifiers:qm(n)}))return e.preventDefault(),e.stopPropagation(),!0}}if(e.type==="pointerdown"&&e.pointerType!=="mouse"&&e.button===0){let n=e.target;for(;n&&t!==n;)n=n.parentNode;if(!n||!r.visible)return!1;let a=cV(e);if(await yPe(e))return r.state!=="closed"||!xLt(t)?!1:(r.show({target:t,location:a}),!0)}return!1}function xLt(e){return e.dispatchEvent(new Event("contextmenu",{cancelable:!0}))}function qF(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function Gr(e,t){return!e||!t.generateID?"":` extid="${e}"`}function CPe(e,t,r){var n,a,o,s,l,c,u,g;let d=!1;t=t??e.atoms.length;let h="",m="",p=e.atoms[e.index],b=(n=p.style)==null?void 0:n.variant,f=(a=p.style)==null?void 0:a.variantStyle,v="";if(p.value&&(b||f)){let x=(o=w9(p.value,b,f))!=null?o:p.value;if(x!==p.value)return e.index+=1,h=`${x}`,Dc(h,e,r)||(e.mathML+=h,e.lastType="mi"),!0;v=(s={upnormal:"normal",boldnormal:"bold",italicmain:"italic",bolditalicmain:"bold-italic","updouble-struck":"double-struck","double-struck":"double-struck",boldfraktur:"bold-fraktur",calligraphic:"script",upcalligraphic:"script",script:"script",boldscript:"bold-script",boldcalligraphic:"bold-script",fraktur:"fraktur","upsans-serif":"sans-serif","boldsans-serif":"bold-sans-serif","italicsans-serif":"sans-serif-italic","bolditalicsans-serif":"sans-serif-bold-italic",monospace:"monospace"}[(f??"")+(b??"")])!=null?s:"",v&&(v=` mathvariant="${v}"`)}let y={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(p.command==="!")return e.index+=1,h="!",Dc(h,e,r)||(e.mathML+=h,e.lastType="mo"),!0;if(y[p.command]){e.index+=1;let x=`${y[p.command]}`;return(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mtext"||e.lastType==="fence")&&(x=IV+x),Dc(x,e,r)||(e.mathML+=x,e.lastType="mi"),!0}if(p.command==="\\operatorname")m=p0(p.body),e.index+=1;else if(b||f)for(;e.index0){d=!0,h=`${m}`;let x=e.lastType;h.endsWith(">f")||h.endsWith(">g")?(h+=WUt,e.lastType="applyfunction"):e.lastType=/^(.*)<\/mo>$/.test(h)?"mo":"mi",Dc(h,e,r)||((x==="mi"||x==="mn"||x==="mtext"||x==="fence")&&(h=IV+h),e.mathML+=h)}return d}function FUt(e){return e.index${e}${l}${s}`:s?c=`${e}${s}`:l&&(c=`${e}${l}`),t.mathML+=c,t.lastType="",!0}function xPe(e,t,r){t=t??e.atoms.length;let n=e.index,a="",o=VUt(e);for(o>=0&&o0?(a=`${a}`,o<0&&FUt(e)&&(o=e.index,e.index+=1),Dc(a,e,r)||(e.mathML+=a,e.lastType="mtext"),!0):!1}function ZPe(e,t,r){t=t??e.atoms.length;let n=e.index,a="",o=VUt(e);for(o>=0&&o"+a+"",o<0&&FUt(e)&&(o=e.index,e.index+=1),Dc(a,e,r)||(e.mathML+=a,e.lastType="mn"),!0)}function RPe(e,t,r){let n=!1;t=t??e.atoms.length;let a="",o="";if(e.index",a+=rp(e.atoms[c],r),a+=sr(e.atoms,r,c+1,u),a+=rp(e.atoms[u],r),a+="",e.index=u+1,(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mfrac"||e.lastType==="fence")&&(e.mathML+=IV),Dc(a,e,r)&&(n=!0,e.lastType="",a=""),o="fence")}return a.length>0&&(n=!0,e.mathML+=a,e.lastType=o),n}function APe(e,t,r){let n=!1;t=t??e.atoms.length;let a="",o="",s=e.atoms[e.index];if(!s)return!1;let l={"\\ne":"≠","\\neq":"≠","\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lbrack":"[","\\rbrack":"]","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"};if(l[s.command]){e.index+=1;let c=`${l[s.command]}`;return Dc(c,e,r)||(e.mathML+=c,e.lastType="mo"),!0}if(e.index"):s.superscript?(a+=""+c,a+=sr(s.superscript,r),a+=""):s.subscript&&(a+=""+c,a+=sr(s.subscript,r),a+=""),e.mathML+=a,e.lastType="mo",e.index+=1,!0}{let c=e.atoms[e.index],u=c.value==="\\operatorname",g=u?'"+p0(c.value)+"":rp(c,r);a+=g,!u&&!/^(.*)<\/mo>$/.test(g)?(a+=WUt,o="applyfunction"):o=u?"mi":"mo"}(e.lastType==="mi"||e.lastType==="mn")&&!/^(.*)<\/mo>$/.test(a)&&(a=IV+a),e.index+=1}return a.length>0&&(n=!0,Dc(a,e,r)||(e.mathML+=a,e.lastType=o)),n}function sr(e,t,r,n){t!=null||(t={});let a={atoms:[],index:r??0,mathML:"",lastType:""};if(typeof e=="number"||typeof e=="boolean")a.mathML=e.toString();else if(typeof e=="string")a.mathML=e;else if(e instanceof be)a.mathML=s_(e,t);else if(Array.isArray(e)){a.atoms=e;let o=0;for(n=n||(e?e.length:0);a.index0&&a.atoms[a.index].type==="genfrac"&&(s=""+s),a.atoms[a.index].type==="genfrac"?a.lastType="mfrac":a.lastType="",a.index+=1,Dc(s,a,t)?o+=1:s.length>0&&(a.mathML+=s,o+=1)}o>1&&(a.mathML=""+a.mathML+"")}return a.mathML}function rp(e,t){let r="",n=p0(e.value);return n&&(r=""+n+""),r}function p0(e){if(!e)return"";if(typeof e=="string")return qF(e);if(!Array.isArray(e)&&typeof e.body=="string")return qF(e.body);let t="";for(let r of e)typeof r.value=="string"&&(t+=r.value);return qF(t)}function s_(e,t){var r,n,a,o,s,l,c,u,g,d,h,m,p,b,f,v,y,x,C,I,Z,F,R;if(e.mode==="text")return`${e.value}`;let X={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",longleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",longrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",longrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xleftrightarrows:"\u21C4",xRightleftharpoons:"\u21CC",longRightleftharpoons:"\u21CC",xLeftrightharpoons:"\u21CB",longLeftrightharpoons:"\u21CB"},S={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5},w="",Q="",T,O,J,E,_,P,{command:it}=e;if(e.command==="\\error")return`${sr(e.body,t)}`;let bt={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},Rt={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(e.type){case"first":break;case"error":if(e.command==="\\\\")break;w=`${sr(e.body,t)}`;break;case"group":case"root":w=sr(e.body,t);break;case"array":let $=e;if(($.leftDelim&&$.leftDelim!=="."||$.rightDelim&&$.rightDelim!==".")&&(w+="",$.leftDelim&&$.leftDelim!=="."&&(w+=`${bt[$.leftDelim]||$.leftDelim}`)),w+="",T=0;T<$.rows[O].length;T++)w+=""+sr($.rows[O][T],t)+"";w+=""}w+="",($.leftDelim&&$.leftDelim!=="."||$.rightDelim&&$.rightDelim!==".")&&($.rightDelim&&$.rightDelim!=="."&&(w+=`${bt[$.rightDelim]||$.rightDelim}`),w+="");break;case"genfrac":let Kt=e;(Kt.leftDelim||Kt.rightDelim)&&(w+=""),Kt.leftDelim&&Kt.leftDelim!=="."&&(w+=""+(bt[Kt.leftDelim]||Kt.leftDelim)+""),Kt.hasBarLine?(w+="",w+=sr(e.above,t)||" ",w+=sr(e.below,t)||" ",w+=""):(w+="",w+=""+sr(e.above,t)+"",w+=""+sr(e.below,t)+"",w+=""),Kt.rightDelim&&Kt.rightDelim!=="."&&(w+=""+(bt[Kt.rightDelim]||Kt.rightDelim)+""),(Kt.leftDelim||Kt.rightDelim)&&(w+="");break;case"surd":e.hasEmptyBranch("above")?(w+="",w+=sr(e.body,t),w+=""):(w+="",w+=sr(e.body,t),w+=sr(e.above,t),w+="");break;case"leftright":let st=e,Ft=st.leftDelim;w="",Ft&&Ft!=="."&&(w+=`${(r=bt[Ft])!=null?r:Ft}`),e.body&&(w+=sr(e.body,t));let Gt=st.matchingRightDelim();Gt&&Gt!=="."&&(w+=`${(n=bt[Gt])!=null?n:Gt}`),w+="";break;case"sizeddelim":case"delim":w+=`${bt[e.value]||e.value}`;break;case"accent":let ut=e;w+='",w+=sr(e.body,t),w+=""+(Rt[it]||ut.accent)+"",w+="";break;case"line":case"overlap":break;case"overunder":let Yt=e;_=e.above,E=e.below,(Yt.svgAbove||_)&&(Yt.svgBelow||E)?P=e.body:_&&_.length>0?(P=e.body,(o=(a=e.body)==null?void 0:a[0])!=null&&o.below?(E=e.body[0].below,P=e.body[0].body):((l=(s=e.body)==null?void 0:s[0])==null?void 0:l.type)==="first"&&(u=(c=e.body)==null?void 0:c[1])!=null&&u.below&&(E=e.body[1].below,P=e.body[1].body)):E&&E.length>0&&(P=e.body,(d=(g=e.body)==null?void 0:g[0])!=null&&d.above?(_=e.body[0].above,P=e.body[0].body):((m=(h=e.body)==null?void 0:h[0])==null?void 0:m.type)==="first"&&(b=(p=e.body)==null?void 0:p[1])!=null&&b.above&&(_=e.body[1].above,P=e.body[1].body)),(Yt.svgAbove||_)&&(Yt.svgBelow||E)?(w+=``,w+=(f=X[Yt.svgBody])!=null?f:sr(P,t),w+=(v=X[Yt.svgBelow])!=null?v:sr(E,t),w+=(y=X[Yt.svgAbove])!=null?y:sr(_,t),w+=""):Yt.svgAbove||_?(w+=``+((x=X[Yt.svgBody])!=null?x:sr(P,t)),w+=(C=X[Yt.svgAbove])!=null?C:sr(_,t),w+=""):(Yt.svgBelow||E)&&(w+=``+((I=X[Yt.svgBody])!=null?I:sr(P,t)),w+=(Z=X[Yt.svgBelow])!=null?Z:sr(E,t),w+="");break;case"placeholder":w+="?";break;case"mord":{if(w=typeof e.value=="string"?e.value:it,w.length>0&&w.startsWith("\\"))typeof e.value=="string"&&e.value.charCodeAt(0)>255?w="&#x"+("000000"+e.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof e.value=="string"&&(w=e.value.charAt(0));else if(e.command==="\\char"){let Ye=(F=e.args)==null?void 0:F[0];if(Ye!==void 0&&"number"in Ye){let Ie=Ye.number;typeof Ie=="number"&&(w="&#x"+("000000"+Ie.toString(16)).slice(-4)+";")}}else typeof e.value=="string"?w=e.value:(console.error("Did not expect this"),w="");let se=/\d/.test(w)?"mn":"mi";w=`<${se}${Gr(e.id,t)}>${qF(w)}`;break}case"mbin":case"mrel":case"minner":w=rp(e,t);break;case"mpunct":w='"+it+"";break;case"mop":case"operator":case"extensible-symbol":e.value!=="\u200B"&&(w="",w+=it==="\\operatorname"?e.body:it||e.body,w+="");break;case"box":let ae=e;w='"+sr(e.body,t)+"";break;case"spacing":w+='';break;case"enclose":let xe=e;w=''+sr(e.body,t)+"";break;case"prompt":w=''+sr(e.body,t)+"";break;case"space":w+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":w+=rp(e,t);break;case"mclose":w+=rp(e,t);break;case"macro":{let se=e.command+p0(e.macroArgs);se&&(w+=`${se}`)}break;case"latexgroup":w+=sr(e.body,t);break;case"latex":w+=""+e.value+"";break;case"tooltip":w+=sr(e.body,t);break;case"text":w+=`${e.value}`;break;default:if(e.command==="\\displaystyle")return`${sr(e.body,t)}`;if(e.command==="\\textstyle")return`${sr(e.body,t)}`;console.info("Unexpected element in conversion to MathML:",e)}return w}function BPe(e){let t="";return e.startsWith("\\")&&(t=" "+e.replace("\\","")+" "),t}function a1(e){let t=0;if($n(e))for(let r of e)r.type!=="first"&&(t+=1);return t===1}function XPe(e){if($n(e)){for(let t of e)if(t.type!=="first"&&t.id)return t.id.toString()}return""}function ZLt(e){let t="";if($n(e))for(let r of e)r.type!=="first"&&typeof r.value=="string"&&(t+=r.value);return t}function WPe(e){return e?e.map(t=>t.value).join(""):""}function UF(e){if(e&&!e.some(t=>t.type!=="first"&&t.value===void 0))return e.map(t=>t.value).join("")}function l_(e){return`${e}`}function FPe(e,t){var r;let n="",a=!1,o=!1;for(let s=0;s${v}`:/[A-Z]/.test(v)?`capital ${v.toLowerCase()}`:v:/[a-z]/.test(v)?" '"+v.toUpperCase()+"'":/[A-Z]/.test(v)?" 'capital "+v.toUpperCase()+"'":v}if(!t)return"";if($n(t))return FPe(e,t);let d="";if(t.id&&e==="math"&&(d+=''),t.mode==="text")return d+t.value;let h="",m="",p="",b=!1,{command:f}=t;switch(f){case"\\vec":return"vector "+Vi(e,t.body);case"\\acute":return Vi(e,t.body)+" acute";case"\\grave":return Vi(e,t.body)+" grave";case"\\dot":return"dot over"+Vi(e,t.body);case"\\ddot":return"double dot over"+Vi(e,t.body);case"\\mathring":return"ring over"+Vi(e,t.body);case"\\tilde":case"\\widetilde":return"tilde over"+Vi(e,t.body);case"\\bar":return Vi(e,t.body)+" bar";case"\\breve":return Vi(e,t.body)+" breve";case"\\check":case"\\widecheck":return"check over "+Vi(e,t.body);case"\\hat":case"\\widehat":return"hat over"+Vi(e,t.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+Vi(e,t.body);case"\\underarc":case"\\underparen":return"arc under "+Vi(e,t.body);case"\\mathop":return(r=UF(t.body))!=null?r:Vi(e,t.body);case"\\mathit":return(n=UF(t.body))!=null?n:Vi(e,t.body);case"\\mathrm":return(a=UF(t.body))!=null?a:Vi(e,t.body);case"\\mathbb":return"blackboard"+((o=UF(t.body))!=null?o:Vi(e,t.body))}switch(t.type){case"prompt":let v=t.body.length>1?'start input . '+Vi(e,t.body)+'. end input':"blank";d+=' '+v+'. '+((s=t.correctness)!=null?s:"")+' . ';break;case"array":let y=t.rows,x=t.environmentName;if(Object.keys(R9).includes(x)){d+=` begin ${R9[x]} `;for(let Z=0;Z0&&(d+=","),d+=` row ${Z+1} `;for(let F=0;F0&&(d+=","),d+=` column ${F+1}: `,d+=Vi("math",y[Z][F])}d+=` end ${R9[x]} `}break;case"group":f==="\\ne"?d+=" not equal ":(f==="\\not"&&(d+=" not "),d+=Vi("math",t.body));break;case"root":d+=Vi("math",t.body);break;case"genfrac":if(h=Vi("math",t.above),m=Vi("math",t.below),a1(t.above)&&a1(t.below)){let Z={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[ZLt(t.above)+"/"+ZLt(t.below)];Z?d=Z:d+=h+" over "+m}else d+=' the fraction '+h+' over '+m+'. End fraction.';break;case"surd":if(p=Vi("math",t.body),t.hasEmptyBranch("above"))d+=a1(t.body)?" the square root of "+p+" , ":' the square root of '+p+'. End square root';else{let Z=Vi("math",t.above);Z=Z.trim();let F=Z.replace(//g,"");F==="3"?d+=' the cube root of '+p+'. End cube root':F==="n"?d+=' the nth root of '+p+'. End root':d+=' the root with index: '+Z+', of '+p+'. End root'}break;case"leftright":{let Z=t;d+=(l=Z.leftDelim?t0[Z.leftDelim]:void 0)!=null?l:Z.leftDelim,d+=Vi("math",t.body),d+=(c=Z.rightDelim?t0[Z.rightDelim]:void 0)!=null?c:Z.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":let C=f.replace(/^\\/g,""),I=f_()[C];I!=null&&I.expand?d+=Vi("math",t.body):d+=`${C} `;break;case"placeholder":d+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(f==="\\mathbin"||f==="\\mathrel"||f==="\\mathopen"||f==="\\mathclose"||f==="\\mathpunct"||f==="\\mathord"||f==="\\mathinner"){d=Vi(e,t.body);break}let Z=t.isDigit()?t.asDigit():t.value,F=t.command;if((t.type==="delim"||t.type==="sizeddelim")&&(F=t.value,Z=F),e==="text")d+=Z;else{if(t.type==="mbin"&&(d+=''),Z){let R=t0[Z]||(F?t0[F.trim()]:"");if(R)d+=" "+R;else{let X=F?BPe(F.trim()):"";d+=X||g(Z)}}else d+=Vi("math",t.body);t.type==="mbin"&&(d+='')}break}case"mop":case"operator":case"extensible-symbol":if(t.value!=="\u200B"){let Z=t.command;if(Z==="\\sum")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let F=Vi("math",t.superscript);F=F.trim();let R=Vi("math",t.subscript);R=R.trim(),d+=' the summation from '+R+' to '+F+' of ',b=!0}else if(t.hasEmptyBranch("subscript"))d+=" the summation of";else{let F=Vi("math",t.subscript);F=F.trim(),d+=' the summation from '+F+' of ',b=!0}else if(Z==="\\prod")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let F=Vi("math",t.superscript);F=F.trim();let R=Vi("math",t.subscript);R=R.trim(),d+=' the product from '+R+' to '+F+' of ',b=!0}else if(t.hasEmptyBranch("subscript"))d+=" the product of ";else{let F=Vi("math",t.subscript);F=F.trim(),d+=' the product from '+F+' of ',b=!0}else if(Z==="\\int")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let F=Vi("math",t.superscript);F=F.trim();let R=Vi("math",t.subscript);R=R.trim(),d+=' the integral from '+l_(R)+' to '+l_(F)+' of ',b=!0}else d+=' the integral of ';else if(Z==="\\operatorname"||Z==="\\operatorname*")d+=WPe(t.body)+" ";else if(typeof t.value=="string"){let F=(u=t0[t.value])!=null?u:t.command?t0[t.command]:void 0;d+=F||" "+t.value}else t.command&&(t.command==="\\mathop"?d+=Vi("math",t.body):d+=t.command.startsWith("\\")?" "+t.command.slice(1):" "+t.command)}break;case"enclose":p=Vi("math",t.body),d+=" crossed out "+p+". End crossed out.";break;case"space":case"spacing":break}if(!b&&!t.hasEmptyBranch("superscript")){let v=Vi(e,t.superscript);v=v.trim();let y=v.replace(/<[^>]*>/g,"");if(a1(t.superscript)){if(e==="math"){let x=XPe(t.superscript);x&&(d+='')}y==="\u2032"?d+=" prime ":y==="2"?d+=" squared ":y==="3"?d+=" cubed ":Number.isNaN(Number.parseInt(y))?d+=" to the "+v+"; ":d+=' to the '+y+" power; "}else Number.isNaN(Number.parseInt(y))?d+=" raised to the "+v+"; ":d+=' raised to the '+y+" power; "}if(!b&&!t.hasEmptyBranch("subscript")){let v=Vi("math",t.subscript);v=v.trim(),d+=a1(t.subscript)?" sub "+v:" subscript "+v+". End subscript. "}return d}function np(e){var t,r;let n=globalThis.MathfieldElement;if(n.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){let o=sr(e);if(o){n.textToSpeechMarkup&&(n.textToSpeechRulesOptions=(t=n.textToSpeechRulesOptions)!=null?t:{},n.textToSpeechRulesOptions=zt(Xt({},n.textToSpeechRulesOptions),{markup:n.textToSpeechMarkup}),n.textToSpeechRulesOptions.markup==="ssml"&&(n.textToSpeechRulesOptions=zt(Xt({},n.textToSpeechRulesOptions),{markup:"ssml_step"})),n.textToSpeechRulesOptions=zt(Xt({},n.textToSpeechRulesOptions),{rate:n.speechEngineRate}));let s=(r=window.SRE)!=null?r:globalThis.sre.System.getInstance();n.textToSpeechRulesOptions&&s.setupEngine(n.textToSpeechRulesOptions);let l="";try{l=s.toSpeech(o)}catch(c){console.error("MathLive 0.108.3: `SRE.toSpeech()` runtime error",c)}return l}return""}let a=Vi("math",e);if(n.textToSpeechMarkup==="ssml"){let o="";n.speechEngineRate&&(o=''),a=''+o+"

    "+a+"

    "+(o?"
    ":"")+""}else n.textToSpeechMarkup==="mac"&&G0()==="macos"?a=a.replace(//g,"").replace(//g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(//g,"[[slc $1]]").replace(/]*>/g,"").replace(/<\/say-as>/g,""):a=a.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return a}function VPe(e){let t="";for(let r of e){let n=t[t.length-1];n!==void 0&&(/\d$/.test(n)&&/^\d/.test(r)||/[a-zA-Z]$/.test(n)&&/^[a-zA-Z]/.test(r))&&(t+=" "),t+=r}return t}function Jr(e,t){var r,n,a,o,s,l,c,u,g,d,h,m,p,b,f,v,y,x,C;if(!e)return"";if($n(e)){if(e.length===0)return"";if(e[0].mode==="latex")return e.map(w=>Jr(w)).join("");if(e[0].mode==="text"){let w=0,Q="";for(;((r=e[w])==null?void 0:r.mode)==="text";)Q+=e[w].body?Jr(e[w].body,t):e[w].value,w++;return t!=null&&t.plain?Q+Jr(e.slice(w),t):`"${Q}" ${Jr(e.slice(w))}`}let X=0,S=[];for(;((n=e[X])==null?void 0:n.mode)==="math";){let w="";for(;((a=e[X])==null?void 0:a.type)==="mord"&&/\d/.test(e[X].value);)w+=e[X++].value;w?S.push(w):S.push(Jr(e[X++],t))}return S.push(Jr(e.slice(X),t)),VPe(S)}if(e.mode==="text")return t!=null&&t.plain?e.value:`"${e.value}"`;let I="",{command:Z}=e,F;if(Z==="\\placeholder")return`(${Jr(e.body,t)})`;let R=be.serialize([e],{expandMacro:!1,defaultMode:"math"});switch(e.type){case"accent":let X={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[Z];I=`${X??""} ${Jr(e.body,t)} `;break;case"first":return"";case"latexgroup":return e.body.map(w=>w.value).join("");case"group":case"root":I=(o=Jc[Z])!=null?o:Jr(e.body,t);break;case"genfrac":{let w=e;(w.leftDelim||w.rightDelim)&&(I=w.leftDelim==="."||!w.leftDelim?"{:":w.leftDelim),w.hasBarLine?(I+="(",I+=Jr(w.above,t),I+=")/(",I+=Jr(w.below,t),I+=")"):(I+="((",I+=Jr(w.above,t),I+=") choose (",I+=Jr(w.below,t),I+="))"),(w.leftDelim||w.rightDelim)&&(I+=w.rightDelim==="."||!w.rightDelim?"{:":w.rightDelim)}break;case"surd":e.hasEmptyBranch("above")?I+=`sqrt(${Jr(e.body,t)})`:I+=`root(${Jr(e.above,t)})(${Jr(e.body,t)})`;break;case"latex":I=e.value;break;case"leftright":{let w=e,Q=w.leftDelim;Q&&YF[Q]&&(Q=YF[Q]),I+=Q==="."||!Q?"{:":Q,I+=Jr(w.body,t);let T=w.matchingRightDelim();T&&YF[T]&&(T=YF[T]),I+=T==="."||!T?":}":T}break;case"sizeddelim":case"delim":I=e.value;break;case"overlap":break;case"overunder":break;case"mord":if(Jc[R])return Jc[R];I=(c=(l=(s=Jc[Z])!=null?s:Z)!=null?l:Z)!=null?c:typeof e.value=="string"?e.value:"",I.startsWith("\\")&&(I+=" "),F=Z?Z.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,F?I=String.fromCodePoint(Number.parseInt("0x"+F[1])):I.length>0&&I.startsWith("\\")&&(I=typeof e.value=="string"?e.value.charAt(0):e.command),I=kPe(I,e.style);break;case"mbin":case"mrel":case"minner":I=(d=(g=(u=Jc[R])!=null?u:Jc[Z])!=null?g:o1[Z])!=null?d:e.value;break;case"mopen":case"mclose":I=e.value;break;case"mpunct":I=(h=o1[Z])!=null?h:Z;break;case"mop":case"operator":case"extensible-symbol":e.value!=="\u200B"&&(o1[Z]?I=o1[Z]:I=Z==="\\operatorname"?Jr(e.body,t):(m=e.value)!=null?m:Z,I+=" ");break;case"array":let S=e.environmentName;if(e.isMultiline)I=e.rows.map(w=>w.map(Q=>Jr(Q,t)).join("")).join(` `);else{let w=(p={bmatrix:["[","]"],"bmatrix*":["[","]"]}[S])!=null?p:["(",")"],Q=[],T=e.rows;for(let J of T){let E=[];for(let _ of J)E.push(Jr(_,t));Q.push(w[0]+E.join(",")+w[1])}let O=(b={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[S])!=null?b:["(",")"];I=O[0]+Q.join(",")+O[1]}break;case"box":break;case"spacing":I=(v=(f=Jc[R])!=null?f:Jc[Z])!=null?v:" ";break;case"enclose":I="("+Jr(e.body,t)+")";break;case"space":I=" ";break;case"subsup":I="";break;case"macro":I=(C=(x=(y=Jc[R])!=null?y:Jc[Z])!=null?x:o1[Z])!=null?C:Jr(e.body,t);break}if(!e.hasEmptyBranch("subscript")){I+="_";let X=Jr(e.subscript,t);I+=X.length!==1?`(${X})`:X}if(!e.hasEmptyBranch("superscript")){I+="^";let X=Jr(e.superscript,t);I+=X.length!==1?`(${X})`:X}return I}function kPe(e,t){if(!t)return e;let r=e;return t.variant==="double-struck"&&(r=`bbb "${r}"`),t.variant==="script"&&(r=`cc "${r}"`),t.variant==="fraktur"&&(r=`fr "${r}"`),t.variant==="sans-serif"&&(r=`sf "${r}"`),t.variant==="monospace"&&(r=`tt "${r}"`),t.variantStyle==="bold"&&(r=`bb "${r}"`),t.color?`color({${t.color}})(${r})`:r}function Nr(e,t){var r;let n=zt(Xt({},twt()),{renderPlaceholder:()=>new Ue(160,{maxFontSize:1})});if(t!=null&&t.letterShapeStyle&&t?.letterShapeStyle!=="auto"&&(n.letterShapeStyle=t.letterShapeStyle),t!=null&&t.macros){let u=nV(t?.macros);n.getMacro=g=>I_(g,u)}t!=null&&t.registers&&(n.registers=Xt(Xt({},n.registers),t.registers));let a=(r=t?.defaultMode)!=null?r:"math",o="math",s="displaystyle";a==="inline-math"?s="textstyle":a==="math"?s="displaystyle":a==="text"&&(s="textstyle",o="text");let l=new $i({from:n}),c=new be({type:"root",mode:o,body:xo(e,{context:l,parseMode:o,mathstyle:s})}).render(l);return c?(GV(w1(c,l)),yV(c,{classes:"ML__latex"}).toMarkup()):""}function kUt(e,t={}){return sr(xo(e,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),t)}function SUt(e){let t=xo(e,{parseMode:"math",mathstyle:"displaystyle"});return np(t)}function LUt(e){var t,r;if(!EF){let n=(t=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;n?EF=new n:console.error(`MathLive 0.108.3: The CortexJS Compute Engine library is not available. Load the library, for example with: import "https://esm.run/@cortex-js/compute-engine"`)}return(r=EF?.box(e).latex)!=null?r:""}function SPe(e){return R1(e,{format:"ascii-math"})[1]}function c_(e){if(typeof e=="string"){let t=LPe(e);if(!t)throw new Error(`Invalid color: ${e}`);return t}return"C"in e?UPe(e):"a"in e?wUt(e):e}function b0(e){return e<0?0:e>255?255:Math.round(e)}function LPe(e){if(!e||e[0]!=="#")return;e=e.slice(1);let t;return e.length<=4?(t={r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)},e.length===4&&(t.a=parseInt(e[3]+e[3],16)/255)):(t={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16)},e.length===8&&(t.a=parseInt(e[6]+e[7],16)/255)),typeof t?.a>"u"&&(t.a=1),t}function d_(e){let[t,r,n]=[e.L,e.C,e.H],a=n*Math.PI/180,o={L:t,a:r*Math.cos(a),b:r*Math.sin(a)};return e.alpha!==void 0&&(o.alpha=e.alpha),o}function wPe(e){let[t,r,n]=[e.L,e.a,e.b],a=Math.sqrt(r*r+n*n),o=Math.atan2(n,r)*180/Math.PI,s={L:t,C:a,H:o};return e.alpha!==void 0&&(s.alpha=e.alpha),s}function A9(e){let[t,r,n]=[e.L,e.a,e.b],a=Math.pow(.9999999984505198*t+.39633779217376786*r+.2158037580607588*n,3),o=Math.pow(1.00000000888176*t-.10556134232365635*r-.0638541747717059*n,3),s=Math.pow(t*1.000000054672411-.0894841820949657*r-1.2914855378640917*n,3),l=4.076741661347994*a-3.307711590408193*o+.230969928729428*s,c=-1.2684380040921763*a+2.6097574006633715*o-.3413193963102197*s,u=-.004196086541837188*a-.7034186144594493*o+1.7076147009309444*s,g=d=>{let h=Math.abs(d);return h<=.0031308?d*12.92:(Math.sign(d)||1)*(1.055*Math.pow(h,1/2.4)-.055)};return[g(l),g(c),g(u)]}function B9(e){let[t,r,n]=e;return t>=0&&t<=1&&r>=0&&r<=1&&n>=0&&n<=1}function X9(e,t){let[r,n,a]=e;return r=b0(r*255),n=b0(n*255),a=b0(a*255),t!==void 0?{r,g:n,b:a,alpha:t}:{r,g:n,b:a}}function wUt(e){let[t,r,n]=A9(e);if(B9([t,r,n]))return X9([t,r,n],e.alpha);let a=wPe(e);if(a.C=0,[t,r,n]=A9(d_(a)),!B9([t,r,n]))return X9([t,r,n],e.alpha);let o=0,s=e.L,l=(o+s)/2;a.C=l;let c=.36/Math.pow(2,12);for(;s-o>c;)l=(o+s)/2,a.C=l,[t,r,n]=A9(d_(a)),B9([t,r,n])?o=l:s=l;return X9([t,r,n],e.alpha)}function UPe(e){return wUt(d_(e))}function RLt(e,t){let r=c_(e),n=c_(t),a=.56,o=.57,s=.62,l=.65,c=.022,u=1.414,g=.1,d=5e-4,h=1.14,m=.027,p=1.14,b=.027;function f(F){return F>=c?F:F+(c-F)**u}function v(F){return(F<0?-1:1)*Math.pow(Math.abs(F),2.4)}let y=f(v(n.r/255)*.2126729+v(n.g/255)*.7151522+v(n.b/255)*.072175),x=f(v(r.r/255)*.2126729+v(r.g/255)*.7151522+v(r.b/255)*.072175),C,I,Z;return Math.abs(x-y)y?(C=x**a-y**o,I=C*h):(C=x**l-y**s,I=C*p),Math.abs(I)0?Z=I-b:Z=I+m,Z*100}function UUt(e,t,r){r!=null||(r="#fff"),t!=null||(t="#000");let n=RLt(e,r),a=RLt(e,t);return Math.abs(n)>Math.abs(a)?r:t}function YPe(e){let t=c_(e),r=((1<<24)+(b0(t.r)<<16)+(b0(t.g)<<8)+b0(t.b)).toString(16).slice(1);return t.alpha!==void 0&&t.alpha<1&&(r+=("00"+Math.round(t.alpha*255).toString(16)).slice(-2)),r[0]===r[1]&&r[2]===r[3]&&r[4]===r[5]&&r[6]===r[7]&&(r=r[0]+r[2]+r[4]+(t.alpha!==void 0&&t.alpha<1?r[6]:"")),"#"+r}function Br(e){let t=YUt(e),r="";for(let n of t){if(typeof n.value!="string")return"";r+=n.value}return r}function YUt(e){let t=e.model.selection.ranges;if(t.length!==1)return[];let r=e.model.getAtoms(t[0]);return r.length===1&&r[0].isRoot&&(r=r[0].children),r.filter(n=>n.type!=="first")}function EPe(e,t){let r=YUt(e);if(r.length!==1)return!1;let n=D9[t];return n?!!n.test(r[0].value):!1}function NPe(e){return[F9(e,"double-struck","mathbb","tooltip.blackboard"),F9(e,"fraktur","mathfrak","tooltip.fraktur"),F9(e,"calligraphic","mathcal","tooltip.caligraphic"),V9(e,"up","mathrm","tooltip.roman-upright"),V9(e,"bold","bm","tooltip.bold"),V9(e,"italic","mathit","tooltip.italic")]}function OPe(e){return[{id:"accent-vec",class:"ML__center-menu",label:()=>Nr(`\\vec{${Br(e)}}`),visible:()=>Br(e).length===1,onMenuSelect:()=>e.insert("\\vec{#@}",{selectionMode:"item"})},{id:"accent-overrightarrow",class:"ML__center-menu",label:()=>Nr(`\\overrightarrow{${Br(e)}}`),visible:()=>Br(e).length>0,onMenuSelect:()=>e.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{id:"accent-overleftarrow",class:"ML__center-menu",label:()=>Nr(`\\overleftarrow{${Br(e)}}`),visible:()=>Br(e).length>0,onMenuSelect:()=>e.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{id:"accent-dot",class:"ML__center-menu",label:()=>Nr(`\\dot{${Br(e)}}`),visible:()=>Br(e).length===1,onMenuSelect:()=>e.insert("\\dot{#@}",{selectionMode:"item"})},{id:"accent-ddot",class:"ML__center-menu",label:()=>Nr(`\\ddot{${Br(e)}}`),visible:()=>Br(e).length===1,onMenuSelect:()=>e.insert("\\ddot{#@}",{selectionMode:"item"})},{id:"accent-bar",class:"ML__center-menu",label:()=>Nr(`\\bar{${Br(e)}}`),visible:()=>Br(e).length===1,onMenuSelect:()=>e.insert("\\bar{#@}",{selectionMode:"item"})},{id:"accent-overline",class:"ML__center-menu",label:()=>Nr(`\\overline{${Br(e)}}`),visible:()=>Br(e).length>0,onMenuSelect:()=>e.insert("\\overline{#@}",{selectionMode:"item"})},{id:"accent-overgroup",class:"ML__center-menu",label:()=>Nr(`\\overgroup{${Br(e)}}`),visible:()=>Br(e).length>0,onMenuSelect:()=>e.insert("\\overgroup{#@}",{selectionMode:"item"})},{id:"accent-overbrace",class:"ML__center-menu",label:()=>Nr(`\\overbrace{${Br(e)}}`),visible:()=>Br(e).length>0,onMenuSelect:()=>e.insert("\\overbrace{#@}",{selectionMode:"item"})},{id:"accent-underline",class:"ML__center-menu",label:()=>Nr(`\\underline{${Br(e)}}`),visible:()=>Br(e).length>0,onMenuSelect:()=>e.insert("\\underline{#@}",{selectionMode:"item"})},{id:"accent-undergroup",class:"ML__center-menu",label:()=>Nr(`\\undergroup{${Br(e)}}`),visible:()=>Br(e).length>0,onMenuSelect:()=>e.insert("\\undergroup{#@}",{selectionMode:"item"})},{id:"accent-underbrace",class:"ML__center-menu",label:()=>Nr(`\\underbrace{${Br(e)}}`),visible:()=>Br(e).length>0,onMenuSelect:()=>e.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function QPe(e){return[{id:"decoration-boxed",label:()=>Nr(`\\boxed{${e.getValue(e.model.selection)}}}`),onMenuSelect:()=>e.insert("\\boxed{#@}",{selectionMode:"item"})},{id:"decoration-red-box",label:()=>Nr(`\\bbox[5px, border: 2px solid red]{${e.getValue(e.model.selection)}}`),onMenuSelect:()=>e.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{id:"decoration-dashed-black-box",label:()=>Nr(`\\bbox[5px, border: 2px dashed black]{${e.getValue(e.model.selection)}}`),onMenuSelect:()=>e.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function TPe(e){let t=[];for(let r of Object.keys($m))t.push({id:`background-color-${r}`,class:(YPe(UUt($m[r]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:``,ariaLabel:()=>{var n;return(n=vi(r))!=null?n:r},checked:()=>{var n;return(n={some:"mixed",all:!0}[e.queryStyle({backgroundColor:r})])!=null?n:!1},onMenuSelect:()=>e.applyStyle({backgroundColor:r},{operation:"toggle"})});return t}function JPe(e){let t=[];for(let r of Object.keys(tp))t.push({id:`color-${r}`,class:(UUt(tp[r])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:``,ariaLabel:()=>{var n;return(n=vi(r))!=null?n:r},checked:()=>{var n;return(n={some:"mixed",all:!0}[e.queryStyle({color:r})])!=null?n:!1},onMenuSelect:()=>e.applyStyle({color:r},{operation:"toggle"})});return t}function _Pe(e){let t=[];for(let r=1;r<=5;r++)for(let n=1;n<=5;n++)t.push({id:`insert-matrix-${r}x${n}`,onCreate:(a,o)=>new HPe(a,o,r,n),label:"\u2610",tooltip:()=>vi("tooltip.row-by-col",r,n),data:{row:r,col:n},onMenuSelect:()=>{e.insert(`\\begin{pmatrix}${Array(r).fill(Array(n).fill("#?").join(" & ")).join("\\\\")}\\end{pmatrix}`,{selectionMode:"item"})}});return t}function jPe(e){return[{label:()=>vi("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>e.executeCommand("addRowBefore"),keyboardShortcut:"shift+alt+[Return]",visible:()=>{if(!e.isSelectionEditable||!Hm(e))return!1;let[t,r]=wg(e),[n,a]=e0(e);return t!==n}},{label:()=>vi("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>e.executeCommand("addRowAfter"),keyboardShortcut:"alt+[Return]",visible:()=>{if(!e.isSelectionEditable||!Hm(e))return!1;let[t,r]=wg(e),[n,a]=e0(e);return t!==n}},{label:()=>vi("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>e.executeCommand("addColumnBefore"),visible:()=>{if(!e.isSelectionEditable||!Hm(e))return!1;let[t,r]=wg(e),[n,a]=e0(e);return r!==a},keyboardShortcut:"shift+alt+[Tab]",enabled:()=>{let t=e.model.parentEnvironment;if(!t)return!1;let[r,n]=W9(e);return rvi("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>e.executeCommand("addColumnAfter"),keyboardShortcut:"alt+[Tab]",visible:()=>{if(!e.isSelectionEditable||!Hm(e))return!1;let[t,r]=wg(e),[n,a]=e0(e);return r!==a}},{type:"divider"},{label:()=>vi("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>e.executeCommand("removeRow"),enabled:()=>{let[t,r]=wg(e),[n,a]=W9(e);return n>t},visible:()=>{if(!e.isSelectionEditable||!Hm(e))return!1;let[t,r]=wg(e),[n,a]=e0(e);return t!==n}},{label:()=>vi("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>e.executeCommand("removeColumn"),enabled:()=>{let[t,r]=wg(e),[n,a]=W9(e);return a>r},visible:()=>{if(!e.isSelectionEditable||!Hm(e))return!1;let[t,r]=wg(e),[n,a]=e0(e);return r!==a}},{type:"divider"},{label:()=>vi("menu.borders"),visible:()=>(zPe(e)||Hm(e))&&e.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>s1(e,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>s1(e,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>s1(e,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>s1(e,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>s1(e,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>vi("menu.insert matrix"),id:"insert-matrix",visible:()=>e.isSelectionEditable,submenu:_Pe(e),submenuClass:"insert-matrix-submenu",columnCount:5},{type:"divider"},{label:()=>vi("menu.insert"),id:"insert",submenu:MPe(e)},{type:"divider"},{label:()=>vi("menu.mode"),id:"mode",visible:()=>e.isSelectionEditable&&e.model.selectionIsCollapsed,submenu:[{label:()=>vi("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{Dg(e,"accept-all"),e.executeCommand(["switchMode","math"])},checked:()=>e.model.mode==="math"},{label:()=>vi("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{Dg(e,"accept-all"),e.executeCommand(["switchMode","text"])},checked:()=>e.model.mode==="text"},{label:()=>vi("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>e.executeCommand(["switchMode","latex"]),checked:()=>e.model.mode==="latex"}]},{type:"divider"},{label:()=>vi("menu.font-style"),id:"variant",visible:()=>e.isSelectionEditable,submenu:NPe(e),submenuClass:"variant-submenu"},{label:()=>vi("menu.color"),id:"color",visible:()=>e.isSelectionEditable,submenu:JPe(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>vi("menu.background-color"),id:"background-color",visible:()=>e.isSelectionEditable,submenu:TPe(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>vi("menu.accent"),id:"accent",visible:()=>e.isSelectionEditable,submenu:OPe(e),submenuClass:"variant-submenu"},{label:()=>vi("menu.decoration"),id:"decoration",visible:()=>e.isSelectionEditable&&Br(e).length>0,submenu:QPe(e),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>vi("menu.evaluate"),id:"ce-evaluate",visible:()=>e.isSelectionEditable&&globalThis.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{let t=DPe(e);if(!t){e.model.announce("plonk");return}e.model.selectionIsCollapsed?(e.model.position=e.model.lastOffset,e.insert(`=${t}`,{insertionMode:"insertAfter",selectionMode:"item"})):e.insert(t,{insertionMode:"replaceSelection",selectionMode:"item"})}},{label:()=>vi("menu.simplify"),id:"ce-simplify",visible:()=>e.isSelectionEditable&&globalThis.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{var t,r;if(e.model.selectionIsCollapsed){let n=(t=e.expression)==null?void 0:t.simplify();if(e.model.position=e.model.lastOffset,!n){e.model.announce("plonk");return}e.insert(`=${n.latex}`,{insertionMode:"insertAfter",selectionMode:"item"})}else{let n=(r=globalThis.MathfieldElement.computeEngine)==null?void 0:r.parse(e.getValue(e.model.selection)).simplify();if(!n){e.model.announce("plonk");return}e.insert(n.latex,{insertionMode:"replaceSelection",selectionMode:"item"})}}},{label:()=>{var t;let r=globalThis.MathfieldElement.computeEngine;if(r===null)return"";let n=(t=e.expression)==null?void 0:t.unknowns[0];if(n){let a=r.box(n).latex;return vi("menu.solve-for",Nr(a))}return vi("menu.solve")},id:"ce-solve",visible:()=>{var t;return e.isSelectionEditable&&globalThis.MathfieldElement.computeEngine!==null&&((t=e.expression)==null?void 0:t.unknowns.length)===1&&e.expression.unknowns[0]!=="Nothing"},onMenuSelect:()=>{var t;let r=e.expression,n=r?.unknowns[0],a=(t=r.solve(n))==null?void 0:t.map(o=>{var s;return(s=o.simplify().latex)!=null?s:""});if(!a){e.model.announce("plonk");return}e.insert(`${n}=${a.length===1?a[0]:"\\left\\lbrace"+a?.join(", ")+"\\right\\rbrace"}`,{insertionMode:"replaceAll",selectionMode:"item"})}},{type:"divider"},{label:()=>vi("menu.cut"),id:"cut",onMenuSelect:()=>e.executeCommand("cutToClipboard"),visible:()=>!e.options.readOnly&&e.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>vi("menu.copy"),id:"copy",submenu:[{label:()=>vi("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>yr.copyToClipboard(e,"latex"),keyboardShortcut:"meta+C"},{label:()=>vi("menu.copy-as-typst"),id:"copy-latex",onMenuSelect:()=>yr.copyToClipboard(e,"typst")},{label:()=>vi("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>yr.copyToClipboard(e,"ascii-math")},{label:()=>vi("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>yr.copyToClipboard(e,"math-ml")}]},{label:()=>vi("menu.paste"),id:"paste",onMenuSelect:()=>e.executeCommand("pasteFromClipboard"),visible:()=>e.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>vi("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>e.executeCommand("selectAll")}]}function Hm(e){var t,r;let n=(r=(t=e.model.parentEnvironment)==null?void 0:t.environmentName)!=null?r:"";return["array","matrix","pmatrix","bmatrix","vmatrix","Bmatrix","cases","dcases","rcases"].includes(n)}function zPe(e){let t=e.model.at(e.model.position);if(t.type!=="array")return!1;let r=t.environmentName;return["matrix","pmatrix","bmatrix","vmatrix","Bmatrix"].includes(r)}function W9(e){var t;let r=(t=e.model.parentEnvironment)==null?void 0:t.rows;return r?[r.length,r.reduce((n,a)=>Math.max(n,a.length),0)]:[0,0]}function wg(e){let t=e.model.parentEnvironment;return t?[t.minRows,t.minColumns]:[0,0]}function e0(e){let t=e.model.parentEnvironment;return t?[t.maxRows,t.maxColumns]:[0,0]}function s1(e,t){XV(e),e.flushInlineShortcutBuffer(),mUt(e.model,t),Hr(e)}function DPe(e){var t,r;let n;if(e.model.selectionIsCollapsed?n=(t=globalThis.MathfieldElement.computeEngine)==null?void 0:t.parse(e.getValue(),{canonical:!1}):n=(r=globalThis.MathfieldElement.computeEngine)==null?void 0:r.parse(e.getValue(e.model.selection),{canonical:!1}),!n)return"";let a=n.evaluate();return a.isSame(n)&&(a=n.N()),a.latex}function F9(e,t,r,n){return{id:`variant-${t}`,label:()=>{var a;return Br(e).length<12?Nr(`\\${r}{${Br(e)}}`):(a=vi(n))!=null?a:n},class:"ML__xl",tooltip:()=>{var a;return(a=vi(n))!=null?a:n},visible:()=>EPe(e,t),checked:()=>{var a;return(a={some:"mixed",all:!0}[e.queryStyle({variant:t})])!=null?a:!1},onMenuSelect:()=>e.applyStyle({variant:t},{operation:"toggle"})}}function V9(e,t,r,n){return{id:`variant-style-${t}`,label:()=>{var a;let o=Br(e);return o.length>0&&o.length<12?Nr(`\\${r}{${Br(e)}}`):(a=vi(n))!=null?a:n},class:()=>{let a=Br(e);return a.length>0&&a.length<12?"ML__xl":""},tooltip:()=>{var a;return(a=vi(n))!=null?a:n},visible:!0,checked:()=>{var a;return(a={some:"mixed",all:!0}[e.queryStyle({variantStyle:t})])!=null?a:!1},onMenuSelect:()=>e.applyStyle({variantStyle:t},{operation:"toggle"})}}function MPe(e){return[{label:()=>vs("abs"),id:"insert-abs",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("|#?|")},{label:()=>vs("nth-root"),id:"insert-nth-root",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\sqrt[#?]{#?}")},{label:()=>vs("log-base"),id:"insert-log-base",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\log_{#?}{#?}")},{type:"heading",label:()=>vi("menu.insert.heading-calculus")},{label:()=>vs("derivative"),id:"insert-derivative",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\dfrac{\\mathrm{d}}{\\mathrm{d}x}#?\\bigm|_{x=#?}")},{label:()=>vs("nth-derivative"),id:"insert-nth-derivative",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\dfrac{\\mathrm{d}^#?}{\\mathrm{d}x^#?}#?\\bigm|_{x=#?}")},{label:()=>vs("integral"),id:"insert-integral",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\int_#?^#?#?\\,\\mathrm{d}#?")},{label:()=>vs("sum"),id:"insert-sum",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\sum_#?^#?#?")},{label:()=>vs("product"),id:"insert-product",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\prod_#?^#?#?")},{type:"heading",label:()=>vi("menu.insert.heading-complex-numbers")},{label:()=>vs("modulus"),id:"insert-modulus",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\lvert#?\\rvert")},{label:()=>vs("argument"),id:"insert-argument",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\arg(#?)")},{label:()=>vs("real-part"),id:"insert-real-part",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\Re(#?)")},{label:()=>vs("imaginary-part"),id:"insert-imaginary-part",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\Im(#?)")},{label:()=>vs("conjugate"),id:"insert-conjugate",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\overline{#?}")}]}function vs(e){return` ${Nr(vi(`menu.insert.${e}-template`))}${vi(`menu.insert.${e}`)}`}function qPe(e){let t="";for(let r of e){let n=t[t.length-1];n!==void 0&&(/\d$/.test(n)&&/^\d/.test(r)||/[a-zA-Z]$/.test(n)&&/^[a-zA-Z]/.test(r))&&(t+=" "),t+=r}return t}function Wr(e){var t,r,n,a,o,s,l,c,u,g,d,h,m,p,b,f,v,y,x,C,I,Z,F;if(!e)return"";if($n(e)){if(e.length===0)return"";if(e[0].mode==="latex")return e.map(O=>Wr(O)).join("");if(e[0].mode==="text"){let O=0,J="";for(;((t=e[O])==null?void 0:t.mode)==="text";)J+=e[O].body?Wr(e[O].body):e[O].value,O++;return` "${J}" ${Wr(e.slice(O))}`}let Q=0,T=[];for(;((r=e[Q])==null?void 0:r.mode)==="math";){let O="";for(;((n=e[Q])==null?void 0:n.type)==="mord"&&/\d/.test(e[Q].value);)O+=e[Q++].value;O?T.push(O):T.push(Wr(e[Q++]))}return T.push(Wr(e.slice(Q))),qPe(T)}if(e.mode==="text")return`"${e.value}"`;let R="",{command:X}=e,S;if(X==="\\placeholder")return`"${Wr(e.body)}"`;let w=be.serialize([e],{expandMacro:!0,defaultMode:"math"});switch(e.type){case"accent":let Q={"\\vec":"arrow","\\dot":"dot","\\ddot":"dot.double","\\bar":"overline","\\hat":"hat","\\acute":"acute","\\grave":"grave","\\tilde":"tilde","\\breve":"breve","\\check":"caron"}[X];R=`${Q??""}(${Wr(e.body)}) `;break;case"first":return"";case"latexgroup":return e.body.map(O=>O.value).join("");case"group":case"root":R=(a=yo[X])!=null?a:Wr(e.body);break;case"genfrac":{let O=e;O.hasBarLine?(R+="(",R+=Wr(O.above),R+=")/(",R+=Wr(O.below),R+=")"):R+=`binom(${Wr(O.above)}, ${Wr(O.below)})`}break;case"surd":e.hasEmptyBranch("above")?R+=`sqrt(${Wr(e.body)})`:R+=`root(${Wr(e.above)}, ${Wr(e.body)})`;break;case"latex":R=e.value;break;case"leftright":{let O=e,J=O.leftDelim;J&&yo[J]&&(J=yo[J]);let E=O.matchingRightDelim();E&&yo[E]&&(E=yo[E]),J&&(J=(o=ALt[J])!=null?o:J),E&&(E=(s=ALt[E])!=null?s:E),J&&E?R=`lr(${(l=BLt[J])!=null?l:J}${Wr(O.body)}${(c=BLt[E])!=null?c:E})`:R=`lr(${J}${Wr(O.body)}${E})`}break;case"sizeddelim":case"delim":R=e.value;break;case"overlap":break;case"mord":if(yo[w])return yo[w];R=(d=(g=(u=yo[X])!=null?u:X)!=null?g:X)!=null?d:typeof e.value=="string"?e.value:"",R.startsWith("\\")&&(R+=" "),S=X?X.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,S?R=String.fromCodePoint(Number.parseInt("0x"+S[1])):R.length>0&&R.startsWith("\\")&&(R=typeof e.value=="string"?e.value.charAt(0):e.command),R=$Pe(R,e.style),R=` ${R} `;break;case"mbin":case"mrel":case"minner":R=(p=(m=(h=yo[w])!=null?h:yo[X])!=null?m:l1[X])!=null?p:e.value;break;case"mopen":case"mclose":R=(b=yo[w])!=null?b:e.value;break;case"mpunct":R=(f=l1[X])!=null?f:X;break;case"mop":case"operator":case"extensible-symbol":e.value!=="\u200B"&&(l1[X]?R=l1[X]:R=X==="\\operatorname"?Wr(e.body):(v=e.value)!=null?v:X,R+=" ");break;case"array":let T=e.environmentName;if(e.isMultiline)R=e.rows.map(O=>O.map(J=>Wr(J)).join("")).join(` `);else{let O=e.rows,J=O.map(_=>_.map(Wr).join(", ")),E={pmatrix:'"("',bmatrix:'"["',"bmatrix*":'"["',Bmatrix:'"{"',vmatrix:'"|"',matrix:"#none"}[T];E?R=`mat(delim: ${E}, ${J.join(" ; ")})`:T==="cases"||T==="rcases"?R=`cases(reverse: #${T==="rcases"}, ${J.join(", ")})`:T==="aligned"?R=O.map(_=>_.map(Wr).join(" & ")).join(" \\ "):R=O.map(_=>_.map(Wr).join("")).join("")}break;case"box":break;case"spacing":R=(x=(y=yo[w])!=null?y:yo[X])!=null?x:" ";break;case"space":R=" ";break;case"subsup":R=(C=e.leftSibling)!=null&&C.value?"":'""';break;case"macro":R=(F=(Z=(I=yo[w])!=null?I:yo[X])!=null?Z:l1[X])!=null?F:Wr(e.body);break;case"overunder":break}if(!R){let Q=PPe[e.command.slice(1)];Q&&(R=`${Q}(${Wr(e.body)})`)}if(!R){let Q=KPe[e.command.slice(1)];Q&&(R=Q(e))}if(!e.hasEmptyBranch("subscript")){R+="_";let Q=Wr(e.subscript);R+=Q.length!==1?`(${Q})`:Q}if(!e.hasEmptyBranch("superscript")){R+="^";let Q=Wr(e.superscript);R+=Q.length!==1?`(${Q})`:Q}return R}function $Pe(e,t){if(!t)return e;let r=e;return t.variant==="double-struck"&&(r=`bb(${r})`),t.variant==="script"&&(r=`cal(${r})`),t.variant==="fraktur"&&(r=`frak(${r})`),t.variant==="sans-serif"&&(r=`sans(${r})`),t.variant==="monospace"&&(r=`mono(${r})`),t.variantStyle==="bold"&&(r=`bold(${r})`),r}function Hg(e,t){return typeof e=="string"?e+np(t):np(e)}function u_(e){var t;let r;if(e.parent.type==="prompt")e.parentBranch==="body"&&(r="prompt");else if(e.parentBranch==="body"){if(e.type==="first"&&(e.parent.type==="root"?r="mathfield":e.parent.type==="surd"?r="radicand":e.parent.type==="genfrac"?r="fraction":e.parent.type==="sizeddelim"&&(r="delimiter"),r))return r;e.type==="subsup"?e.superscript&&e.subscript?r="superscript and subscript":e.superscript?r="superscript":e.subscript&&(r="subscript"):e.type&&(r=(t={accent:"accented",array:"array",box:"box",chem:"chemical formula",delim:"delimiter",enclose:"cross out","extensible-symbol":"extensible symbol",error:"error",first:"first",genfrac:"fraction",group:"group",latex:"LaTeX",leftright:"delimiter",line:"line",subsup:"subscript-superscript",operator:"operator",overunder:"over-under",placeholder:"placeholder",rule:"rule",sizeddelim:"delimiter",space:"space",spacing:"spacing",surd:"square root",text:"text",prompt:"prompt",root:"math field",mop:"operator"}[e.type])!=null?t:"parent")}else if(e.parent.type==="genfrac"){if(e.parentBranch==="above")return"numerator";if(e.parentBranch==="below")return"denominator"}else e.parent.type==="surd"?e.parentBranch==="above"&&(r="index"):e.parentBranch==="superscript"?r="superscript":e.parentBranch==="subscript"&&(r="subscript");return r??"parent"}function tKe(e,t,r,n){let a="";if(t==="plonk"){globalThis.MathfieldElement.playSound("plonk"),e.flushInlineShortcutBuffer();return}if(t==="delete")a=Hg("deleted: ",n);else if(t==="focus"||t.includes("move"))a=eKe(e.model,r),a+=iKe(e.model);else if(t==="replacement")a=Hg(e.model.at(e.model.position));else if(t==="line"){let o=Hg(e.model.root);e.keyboardDelegate.setAriaLabel(o)}else a=n?Hg(t+" ",n):t;if(a&&e.ariaLiveText){let o=e.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";e.ariaLiveText.textContent=a+o}}function eKe(e,t){if(Number.isNaN(t))return"";let r=e.at(t);if(!r||r.treeDepth<=e.at(e.position).treeDepth)return"";let n="",a=r.parent,o=e.at(e.position).parent;for(;a!==e.root&&a!==o;)n+=`out of ${u_(a)};`,a=a.parent;return n}function iKe(e){if(!e.selectionIsCollapsed)return`selected: ${Hg(e.getAtoms(e.selection))}`;let t="",r=e.at(e.position);if(r.isFirstSibling&&(t=`start of ${u_(r)}: `),r.isLastSibling){if(!r.isFirstSibling){if(!r.parent.parent)return`${Hg(r)}; end of mathfield`;t=`${Hg(r)}; end of ${u_(r)}`}}else t+=Hg(r);return t}function XLt(e,t,r,n,a){let o=e.offsetOf(t);if(on)return!1;if(!t.hasChildren)return!0;let s=a?t.firstChild:EUt(t);if(!s)return!1;let l=a?t.lastChild:NUt(t);if(!l)return!1;let c=e.offsetOf(s);if(c>=r&&c<=n){let u=e.offsetOf(l);if(u>=r&&u<=n)return!0}return!1}function $F(e,t,r){if(!(t!=null&&t.hasChildren))return!1;let[n,a]=r,o=EUt(t);if(!o)return!1;let s=NUt(t);if(!s)return!1;let l=e.offsetOf(o),c=e.offsetOf(s);return l>=n&&l<=a&&c>=l&&c<=a}function nKe(e,t){let[r,n]=t,a=n+1;if(a>e.lastOffset)return t;let o=e.at(a);return aKe(e,o,r,n)&&(n=e.offsetOf(o)),[r,n]}function aKe(e,t,r,n){if(t?.type!=="subsup"||!$F(e,t,[r,n]))return!1;let a=t.leftSibling;if(!a)return!1;let o=e.offsetOf(a);return o>r&&o<=n}function EUt(e){for(let t of e.children)if(t.type!=="first")return t}function NUt(e){let{children:t}=e;for(let r=t.length-1;r>=0;r--)if(t[r].type!=="first")return t[r]}function cKe(e,t,r){var n;r=r??{withHighlighting:!1};let{model:a}=e;function o(g){let d=null;switch(g){case"all":d=a.root;break;case"selection":d=a.getAtoms(a.selection);break;case"left":{d=a.getAtoms(a.offsetOf(a.at(a.position).leftSibling),a.position);break}case"right":{d=a.getAtoms(a.position,a.offsetOf(a.at(a.position).rightSibling));break}case"group":d=a.getAtoms(a.getSiblingsRange(a.position));break;case"parent":{let{parent:h}=a.at(a.position);h!=null&&h.parent?d=h:d=a.root;break}default:d=a.root}return d}function s(g){let d="";switch(g){case"all":console.error("Internal failure: speak all failed");break;case"selection":d="no selection";break;case"left":d="at start";break;case"right":d="at end";break;case"group":console.error("Internal failure: speak group failed");break;case"parent":d="no parent";break;default:console.error('unknown speak_ param value: "'+g+'"');break}return d}let l=globalThis.MathfieldElement,c=o(t);if(c===null)return(n=l.speakHook)==null||n.call(l,s(t)),!1;(r.withHighlighting||l.speechEngine==="amazon")&&(l.textToSpeechMarkup=globalThis.sre&&l.textToSpeechRules==="sre"?"ssml_step":"ssml");let u=np(c);return sl()&&r.withHighlighting?(Ng().readAloudMathfield=e,ip(e,{forHighlighting:!0}),l.readAloudHook&&l.readAloudHook(e.field,u)):l.speakHook&&l.speakHook(u),!1}function dKe(e){var t,r;if(!sl())return;let n=globalThis.MathfieldElement;if(!n.speechEngine||n.speechEngine==="local"){let a=new SpeechSynthesisUtterance(e);globalThis.speechSynthesis.speak(a)}else if(n.speechEngine==="amazon")if(!("AWS"in window))console.error("MathLive 0.108.3: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");else{let a=new globalThis.AWS.Polly({apiVersion:"2016-06-10"}),o={OutputFormat:"mp3",VoiceId:(t=n.speechEngineVoice)!=null?t:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((r=n.speechEngineVoice)!=null?r:"Joanna")?"neural":"standard",Text:e,TextType:"ssml"};a.synthesizeSpeech(o,(s,l)=>{if(s)console.trace(`MathLive 0.108.3: \`polly.synthesizeSpeech()\` error: ${s}`);else if(l!=null&&l.AudioStream){let c=new Uint8Array(l.AudioStream),u=new Blob([c.buffer],{type:"audio/mpeg"}),g=URL.createObjectURL(u);new Audio(g).play().catch(d=>console.error(d))}})}else n.speechEngine==="google"&&console.error("MathLive 0.108.3: The Google speech engine is not supported yet. Please come again.")}function OUt(e){if(e&&(e.classList.remove("ML__highlight"),e.children))for(let t of e.children)OUt(t)}function g_(e,t){var r;e&&(!t||((r=e.dataset)==null?void 0:r.atomId)===t?(e.classList.add("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(n=>{n instanceof HTMLElement&&g_(n)})):(e.classList.remove("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(n=>{n instanceof HTMLElement&&g_(n,t)})))}function uKe(e,t){var r;if(!sl())return;if(globalThis.MathfieldElement.speechEngine!=="amazon"){console.error("MathLive 0.108.3: Use Amazon TTS Engine for synchronized highlighting"),typeof globalThis.MathfieldElement.speakHook=="function"&&globalThis.MathfieldElement.speakHook(t);return}if(!globalThis.AWS){console.error("MathLive 0.108.3: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");return}let n=new globalThis.AWS.Polly({apiVersion:"2016-06-10"}),a={OutputFormat:"json",VoiceId:(r=globalThis.MathfieldElement.speechEngineVoice)!=null?r:"Joanna",Engine:"standard",Text:t,TextType:"ssml",SpeechMarkTypes:["ssml"]};Ng().readAloudElement=e,n.synthesizeSpeech(a,(o,s)=>{if(o){console.trace(`MathLive 0.108.3: \`polly.synthesizeSpeech()\` error: ${o}`);return}if(!(s!=null&&s.AudioStream))return;let l=new TextDecoder("utf-8").decode(new Uint8Array(s.AudioStream));Ng().readAloudMarks=l.split(` `).map(c=>c?JSON.parse(c):{}),Ng().readAloudTokens=[];for(let c of Ng().readAloudMarks)c.value&&Ng().readAloudTokens.push(c.value);Ng().readAloudCurrentMark="",a.OutputFormat="mp3",a.SpeechMarkTypes=[],n.synthesizeSpeech(a,(c,u)=>{if(c){console.trace(`MathLive 0.108.3: \`polly.synthesizeSpeech("${t}") error:${c}`);return}if(!(u!=null&&u.AudioStream))return;let g=new Uint8Array(u.AudioStream),d=new Blob([g.buffer],{type:"audio/mpeg"}),h=URL.createObjectURL(d),m=Ng();m.readAloudAudio?m.readAloudAudio.pause():(m.readAloudAudio=new Audio,m.readAloudAudio.addEventListener("ended",()=>{let p=m.readAloudMathfield;m.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),p?(ip(p),m.readAloudElement=null,m.readAloudMathfield=null,m.readAloudTokens=[],m.readAloudMarks=[],m.readAloudCurrentMark=""):OUt(m.readAloudElement)}),m.readAloudAudio.addEventListener("timeupdate",()=>{let p="",b=m.readAloudAudio.currentTime*1e3+100;for(let f of m.readAloudMarks)f.timer.toUpperCase())}function NF(e){let t={readOnly:!1},r=sp.optionsAttributes;return Object.keys(r).forEach(n=>{var a;if(e.hasAttribute(n)){let o=e.getAttribute(n);n==="placeholder"?t.contentPlaceholder=o??"":r[n]==="boolean"?t[Kd(n)]=!0:r[n]==="on/off"?(o=(a=o?.toLowerCase())!=null?a:"",o==="on"||o==="true"?t[Kd(n)]=!0:o==="off"||o==="false"?t[Kd(n)]=!1:t[Kd(n)]=void 0):r[n]==="number"?t[Kd(n)]=Number.parseFloat(o??"0"):t[Kd(n)]=o}}),t}function i0(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}function mKe(e,t,r){let n=r,a=0,o=e.length;for(;n0&&o.push({type:"text",data:l.slice(0,u)}),c=!1);let d=!1;for(;!d;){if(c){if(g=l.indexOf(t,u),g===-1){d=!0;break}u!==g&&o.push({type:"text",data:l.slice(u,g)}),u=g}else{if(g=mKe(r,l,u+t.length),g===-1){d=!0;break}let h=l.slice(u+t.length,g);a==="ascii-math"&&([,h]=R1(h,{format:"ascii-math"})),o.push({type:"math",data:h,mathstyle:n}),u=g+r.length}c=!c}u{g=OF(g,d,h,"displaystyle")}),(o=(a=t.TeX)==null?void 0:a.delimiters)!=null&&o.inline&&t.TeX.delimiters.inline.forEach(([d,h])=>{g=OF(g,d,h,"textstyle")}),(l=(s=t.asciiMath)==null?void 0:s.delimiters)!=null&&l.inline&&t.asciiMath.delimiters.inline.forEach(([d,h])=>{g=OF(g,d,h,"textstyle","ascii-math")}),(u=(c=t.asciiMath)==null?void 0:c.delimiters)!=null&&u.display&&t.asciiMath.delimiters.display.forEach(([d,h])=>{g=OF(g,d,h,"displaystyle","ascii-math")}),g}function pKe(e,t){let r=document.createElement("span");r.setAttribute("translate","no");try{let n=""+t.renderToMathML(e)+"";r.innerHTML=globalThis.MathfieldElement.createHTML(n)}catch(n){console.error(`MathLive 0.108.3: Could not convert "${e}"' to MathML with ${n}`),r.textContent=e}return r.className="ML__sr-only",r}function bKe(e,t,r){try{let n=t.renderToMarkup(e,zt(Xt({},t),{defaultMode:r==="displaystyle"?"math":"inline-math"})),a=document.createElement("span");return a.dataset.latex=e,a.style.display=r==="displaystyle"?"flex":"inline-flex",a.setAttribute("aria-hidden","true"),a.setAttribute("translate","no"),a.innerHTML=globalThis.MathfieldElement.createHTML(n),a}catch(n){return console.error("Could not parse'"+e+"' with ",n),document.createTextNode(e)}}function V1(e,t,r){var n;let a=bKe(e,r,t||"textstyle"),o=(n=r.renderAccessibleContent)!=null?n:"";if(/\b(mathml|speakable-text)\b/i.test(o)){let s=document.createElement("span");if(/\bmathml\b/i.test(o)&&r.renderToMathML&&s.append(pKe(e,r)),/\bspeakable-text\b/i.test(o)&&r.renderToSpeakableText){let l=document.createElement("span");l.setAttribute("translate","no");let c=r.renderToSpeakableText(e);l.innerHTML=globalThis.MathfieldElement.createHTML(c),l.className="ML__sr-only",s.append(l)}return s.append(a),s}return a}function fKe(e,t){var r;if(/^\s*$/.test(e))return null;if((r=t.TeX)!=null&&r.processEnvironments&&/^\s*\\begin/.test(e))return[V1(e,"",t)];let n=QUt(e,t);if(n.length===1&&n[0].type==="text")return null;let a=[];for(let o of n)o.type==="text"?a.push(o.data):a.push(V1(o.data,o.mathstyle==="textstyle"?"textstyle":"displaystyle",t));return a}function TUt(e,t){var r,n,a,o,s,l,c,u,g,d,h,m,p,b,f,v,y,x;if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){let I=(r=e.childNodes[0].textContent)!=null?r:"";if((n=t.TeX)!=null&&n.processEnvironments&&/^\s*\\begin/.test(I)){e.textContent="",e.append(V1(I,"",t));return}let Z=QUt(I,t);if(Z.length===1){let F=Z[0];if(F.type==="text")return;e.textContent="",e.append(V1(F.data,F.mathstyle==="textstyle"?"textstyle":"displaystyle",t));return}}let C=[...e.childNodes];for(let I of C)if(I.nodeType===3){let Z=fKe((a=I.textContent)!=null?a:"",t);Z&&I.replaceWith(...Z)}else if(I.nodeType===1){let Z=I.nodeName.toLowerCase();if(Z==="script"){let F=I,R=F.type.toLowerCase();if(R==="module"||R==="javascript")continue;let X;if((o=t.processScriptTypePattern)!=null&&o.test(R))X=(s=F.textContent)!=null?s:"";else if((l=t.processMathJSONScriptTypePattern)!=null&&l.test(R))try{X=(u=t.serializeToLatex)==null?void 0:u.call(t,JSON.parse((c=F.textContent)!=null?c:""))}catch(S){console.error(S)}if(X){let S="textstyle";for(let w of R.split(";")){let[Q,T]=w.split("=");Q.trim()==="mode"&&(S=T.trim()==="display"?"displaystyle":"textstyle")}k9(F,X,S,t)}}else{let F=I;if((g=t.texClassDisplayPattern)!=null&&g.test(F.className)){k9(F,(d=F.textContent)!=null?d:"","displaystyle",t);continue}if((h=t.texClassInlinePattern)!=null&&h.test(F.className)){k9(F,(m=F.textContent)!=null?m:"","textstyle",t);continue}((b=(p=t.processClassPattern)==null?void 0:p.test(F.className))!=null&&b||!((v=(f=t.skipTags)==null?void 0:f.includes(Z))!=null&&v||(x=(y=t.ignoreClassPattern)==null?void 0:y.test(F.className))!=null&&x))&&TUt(F,t)}}}function vKe(e,t){var r,n,a,o,s,l,c,u;try{let g=Xt(Xt({},IKe),t);g.ignoreClassPattern=new RegExp((r=g.ignoreClass)!=null?r:""),g.processClassPattern=new RegExp((n=g.processClass)!=null?n:""),g.processScriptTypePattern=new RegExp((a=g.processScriptType)!=null?a:""),g.processMathJSONScriptTypePattern=new RegExp((o=g.processMathJSONScriptType)!=null?o:""),(l=(s=g.TeX)==null?void 0:s.className)!=null&&l.display&&(g.texClassDisplayPattern=new RegExp(g.TeX.className.display)),(u=(c=g.TeX)==null?void 0:c.className)!=null&&u.inline&&(g.texClassInlinePattern=new RegExp(g.TeX.className.inline)),E1(),iu("core"),TUt(e,g)}catch(g){g instanceof Error?console.error("renderMathInElement(): "+g.message):console.error("renderMathInElement(): Could not render math for element",e)}}function k9(e,t,r,n){e.parentNode.replaceChild(V1(t,r,n),e)}function GKe(e,t){let r=Mg.singleton;return r?(r.show(),s0(),r.currentLayer=t,r.render(),r.focus(),!0):!1}function yKe(){let e=window.mathVirtualKeyboard;return e.visible?e.hide({animate:!0}):e.show({animate:!0}),!1}function CKe(){kLt||SLt||(SLt=E1().then(()=>{kLt=!0}))}function RKe(){var e,t,r,n;typeof window<"u"&&((e=window.customElements)!=null&&e.get("math-span")||(t=window.customElements)==null||t.define("math-span",xKe),(r=window.customElements)!=null&&r.get("math-div")||(n=window.customElements)==null||n.define("math-div",ZKe))}function Ng(){var e,t;return(t=globalThis[e=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[e]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function AKe(e){if(typeof e=="string"){let t=document.getElementById(e);if(t===null)throw new Error(`The element with ID "${e}" could not be found.`);return t}return e}function w_(e,t){var r,n,a,o;if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",()=>w_(e,t));return}let s=AKe(e);if(!s)return;let l=t??{};(r=l.renderToMarkup)!=null||(l.renderToMarkup=Nr),(n=l.renderToMathML)!=null||(l.renderToMathML=kUt),(a=l.renderToSpeakableText)!=null||(l.renderToSpeakableText=SUt),(o=l.serializeToLatex)!=null||(l.serializeToLatex=LUt),vKe(s,l)}var gDe,hDe,mDe,tV,LLt,wLt,TVt,Xt,zt,JVt,eV,fDe,S9,ELt,NLt,IDe,vDe,GDe,yDe,CDe,xDe,ZDe,RDe,ADe,BDe,v1,G1,SDe,Fi,LDe,wDe,$m,tp,QLt,UDe,TLt,L9,JLt,C1,iV,u0,p_,HDe,_De,jDe,zDe,a0,DDe,U9,x1,kW,il,km,S3,SW,zVt,Oy,hr,DVt,MVt,LW,L3,Ka,wW,PVt,KVt,UW,w3,Cg,YW,EW,qVt,$Vt,t2t,xg,Qy,U3,NW,e2t,OW,Nf,Ec,Of,_l,Ty,i2t,Nc,zo,Zg,Qf,r2t,n2t,a2t,Rg,o2t,s2t,QW,l2t,c2t,TW,d2t,u2t,Tf,g2t,h2t,m2t,p2t,b2t,f2t,I2t,v2t,G2t,Y3,Jy,y2t,C2t,E3,JW,rl,Jf,HW,_W,N3,Ag,jW,Sm,Hf,x2t,Z2t,Bg,jl,R2t,A2t,B2t,zW,O3,Q3,X2t,W2t,Oc,F2t,Hy,V2t,k2t,T3,S2t,J3,L2t,Lm,w2t,H3,Xg,U2t,_3,DW,MW,Y2t,E2t,PW,N2t,Wg,O2t,j3,Q2t,T2t,J2t,KW,H2t,z3,_2t,j2t,qW,Fg,z2t,$W,D2t,M2t,P2t,K2t,q2t,$2t,tkt,ekt,Td,_f,nl,wm,Um,_y,ikt,jy,Jd,tF,On,jf,D3,zy,rkt,nkt,al,akt,okt,skt,lkt,ckt,M3,Dy,dkt,My,ukt,P3,K3,gkt,hkt,q3,mkt,Ym,eF,pkt,bkt,Vg,iF,rF,fkt,nF,Ikt,aF,vkt,Gkt,ykt,oF,Py,Ckt,xkt,Zkt,Rkt,Akt,Bkt,Xkt,Ky,Wkt,Fkt,Vkt,kkt,Skt,wa,Hd,kg,Lkt,$3,wkt,Ukt,t9,Ykt,Ekt,Nkt,sF,Okt,Qkt,e9,i9,Qc,r9,n9,Tkt,Jkt,Hkt,_kt,a9,jkt,zkt,Dkt,Mkt,Pkt,Kkt,Tc,o9,_d,qkt,s9,l9,$kt,c9,tSt,eSt,iSt,rSt,nSt,aSt,oSt,sSt,lSt,lF,cSt,dSt,uSt,gSt,hSt,zf,Df,d9,mSt,pSt,bSt,fSt,cF,ISt,vSt,GSt,Mf,dF,ySt,u9,CSt,xSt,ZSt,uF,gF,hF,RSt,ASt,BSt,mF,pF,bF,fF,XSt,g9,IF,WSt,FSt,VSt,kSt,vF,qe,zl,SSt,LSt,Go,qy,wSt,KDe,qDe,f0,Pl,$De,$d,USt,E9,v_,YSt,N9,O9,ESt,QF,rMe,GF,NSt,aMe,DLt,xs,Ue,Bn,G_,aV,CV,Dm,g0,ys,Km,qa,Sg,t1,_c,mMe,$i,I0,be,y0,rwt,TSt,nwt,xMe,ZMe,RMe,awt,yr,AMe,BMe,SMe,LMe,wMe,UMe,YMe,EMe,NMe,OMe,jm,qd,xV,ZV,sV,hwt,TMe,mwt,JMe,_Me,jMe,zMe,Kl,bwt,j9,fwt,PMe,Ui,zg,ywt,zm,Zwt,qr,Xwt,o6e,Vwt,AV,Lwt,wwt,Ve,Er,Ywt,Nwt,S1,jF,lp,Kn,h1,Z_,cp,ll,C0,L1,Pwt,u6e,g6e,h6e,R_,dp,_St,zSt,DSt,RF,D9,tUt,f6e,I6e,v6e,G6e,MSt,B6e,X6e,F6e,Ml,Y6e,Lg,$St,tLt,f9,Cs,oUt,jc,gV,$6e,iLt,DF,p1,p8e,Dd,f1,Mg,bUt,F8e,Tm,n1,pV,$8e,iPe,Fr,Co,Gn,SF,pLt,LF,aPe,oPe,sPe,CUt,lPe,cPe,dPe,uPe,gPe,G9,y9,fLt,ILt,ZUt,RUt,AUt,yLt,fV,WUt,IV,t0,R9,Jc,o1,YF,EF,HPe,yo,ALt,BLt,l1,PPe,KPe,rKe,oKe,sKe,lKe,br,gKe,Ug,yn,sp,L_,WLt,FLt,hKe,VLt,IKe,kLt,SLt,JUt,xKe,ZKe,kV=ce(()=>{gDe=Object.defineProperty,hDe=Object.defineProperties,mDe=Object.getOwnPropertyDescriptors,tV=Object.getOwnPropertySymbols,LLt=Object.prototype.hasOwnProperty,wLt=Object.prototype.propertyIsEnumerable,TVt=(e,t,r)=>t in e?gDe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xt=(e,t)=>{for(var r in t||(t={}))LLt.call(t,r)&&TVt(e,r,t[r]);if(tV)for(var r of tV(t))wLt.call(t,r)&&TVt(e,r,t[r]);return e},zt=(e,t)=>hDe(e,mDe(t)),JVt=e=>typeof e=="symbol"?e:e+"",eV=(e,t)=>{var r={};for(var n in e)LLt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&tV)for(var n of tV(e))t.indexOf(n)<0&&wLt.call(e,n)&&(r[n]=e[n]);return r};fDe={id:"dvorak",locale:"en",displayName:"Dvorak",virtualLayout:"dvorak",platform:"",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["x","X","\u2248","\u02DB"],KeyC:["j","J","\u2206","\xD4"],KeyD:["e","E","\xB4","\xB4"],KeyE:[".",">","\u2265","\u02D8"],KeyF:["u","U","\xA8","\xA8"],KeyG:["i","I","\u02C6","\u02C6"],KeyH:["d","D","\u2202","\xCE"],KeyI:["c","C","\xE7","\xC7"],KeyJ:["h","H","\u02D9","\xD3"],KeyK:["t","T","\u2020","\u02C7"],KeyL:["n","N","\u02DC","\u02DC"],KeyM:["m","M","\xB5","\xC2"],KeyN:["b","B","\u222B","\u0131"],KeyO:["r","R","\xAE","\u2030"],KeyP:["l","L","\xAC","\xD2"],KeyQ:["'",'"',"\xE6","\xC6"],KeyR:["p","P","\u03C0","\u220F"],KeyS:["o","O","\xF8","\xD8"],KeyT:["y","Y","\xA5","\xC1"],KeyU:["g","G","\xA9","\u02DD"],KeyV:["k","K","\u02DA","\uF8FF"],KeyW:[",","<","\u2264","\xAF"],KeyX:["q","Q","\u0153","\u0152"],KeyY:["f","F","\u0192","\xCF"],KeyZ:[";",":","\u2026","\xDA"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["[","{","\u201C","\u201D"],Equal:["]","}","\u2018","\u2019"],BracketLeft:["/","?","\xF7","\xBF"],BracketRight:["=","+","\u2260","\xB1"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:["s","S","\xDF","\xCD"],Quote:["-","_","\u2013","\u2014"],Backquote:["`","~","`","`"],Comma:["w","W","\u2211","\u201E"],Period:["v","V","\u221A","\u25CA"],Slash:["z","Z","\u03A9","\xB8"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},S9={id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u0131"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\xCE"],KeyE:["e","E","\xB4","\xB4"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\u02DD"],KeyH:["h","H","\u02D9","\xD3"],KeyI:["i","I","\u02C6","\u02C6"],KeyJ:["j","J","\u2206","\xD4"],KeyK:["k","K","\u02DA","\uF8FF"],KeyL:["l","L","\xAC","\xD2"],KeyM:["m","M","\xB5","\xC2"],KeyN:["n","N","\u02DC","\u02DC"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE","\u2030"],KeyS:["s","S","\xDF","\xCD"],KeyT:["t","T","\u2020","\u02C7"],KeyU:["u","U","\xA8","\xA8"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\u02DB"],KeyY:["y","Y","\xA5","\xC1"],KeyZ:["z","Z","\u03A9","\xB8"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["-","_","\u2013","\u2014"],Equal:["=","+","\u2260","\xB1"],BracketLeft:["[","{","\u201C","\u201D"],BracketRight:["]","}","\u2018","\u2019"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:[";",":","\u2026","\xDA"],Quote:["'",'"',"\xE6","\xC6"],Backquote:["`","\u02DC","`","`"],Comma:[",","<","\u2264","\xAF"],Period:[".",">","\u2265","\u02D8"],Slash:["/","?","\xF7","\xBF"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},ELt={id:"windows.en-intl",displayName:"English (international)",platform:"windows",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","\xE1","\xC1"],KeyB:["b","B","",""],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\xE9","\xC9"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","\xED","\xCD"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","\xF8","\xD8"],KeyM:["m","M","\xB5",""],KeyN:["n","N","\xF1","\xD1"],KeyO:["o","O","\xF3","\xD3"],KeyP:["p","P","\xF6","\xD6"],KeyQ:["q","Q","\xE4","\xC4"],KeyR:["r","R","\xAE",""],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\xFE","\xDE"],KeyU:["u","U","\xFA","\xDA"],KeyV:["v","V","",""],KeyW:["w","W","\xE5","\xC5"],KeyX:["x","X","",""],KeyY:["y","Y","\xFC","\xDC"],KeyZ:["z","Z","\xE6","\xC6"],Digit1:["1","!","\xA1","\xB9"],Digit2:["2","@","\xB2",""],Digit3:["3","#","\xB3",""],Digit4:["4","$","\xA4","\xA3"],Digit5:["5","%","\u20AC",""],Digit6:["6","^","\xBC",""],Digit7:["7","&","\xBD",""],Digit8:["8","*","\xBE",""],Digit9:["9","(","\u2018",""],Digit0:["0",")","\u2019",""],Space:[" "," ","",""],Minus:["-","_","\xA5",""],Equal:["=","+","\xD7","\xF7"],BracketLeft:["[","{","\xAB",""],BracketRight:["]","}","\xBB",""],Backslash:["\\","|","\xAC","\xA6"],Semicolon:[";",":","\xB6","\xB0"],Quote:["'",'"',"\xB4","\xA8"],Backquote:["`","~","",""],Comma:[",","<","\xE7","\xC7"],Period:[".",">","",""],Slash:["/","?","\xBF",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}},NLt={id:"linux.en",displayName:"English",platform:"linux",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},IDe={id:"apple.french",locale:"fr",displayName:"French",platform:"apple",virtualLayout:"azerty",score:0,mapping:{KeyA:["q","Q","\u2021","\u03A9"],KeyB:["b","B","\xDF","\u222B"],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\xEA","\xCA"],KeyF:["f","F","\u0192","\xB7"],KeyG:["g","G","\uFB01","\uFB02"],KeyH:["h","H","\xCC","\xCE"],KeyI:["i","I","\xEE","\xEF"],KeyJ:["j","J","\xCF","\xCD"],KeyK:["k","K","\xC8","\xCB"],KeyL:["l","L","\xAC","|"],KeyM:[",","?","\u221E","\xBF"],KeyN:["n","N","~","\u0131"],KeyO:["o","O","\u0153","\u0152"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xAE","\u201A"],KeyS:["s","S","\xD2","\u2211"],KeyT:["t","T","\u2020","\u2122"],KeyU:["u","U","\xBA","\xAA"],KeyV:["v","V","\u25CA","\u221A"],KeyW:["z","Z","\xC2","\xC5"],KeyX:["x","X","\u2248","\u2044"],KeyY:["y","Y","\xDA","\u0178"],KeyZ:["w","W","\u2039","\u203A"],Digit1:["&","1","\uF8FF","\xB4"],Digit2:["\xE9","2","\xEB","\u201E"],Digit3:['"',"3","\u201C","\u201D"],Digit4:["'","4","\u2018","\u2019"],Digit5:["(","5","{","["],Digit6:["\xA7","6","\xB6","\xE5"],Digit7:["\xE8","7","\xAB","\xBB"],Digit8:["!","8","\xA1","\xDB"],Digit9:["\xE7","9","\xC7","\xC1"],Digit0:["\xE0","0","\xF8","\xD8"],Space:[" "," "," "," "],Minus:[")","\xB0","}","]"],Equal:["-","_","\u2014","\u2013"],BracketLeft:["^","\xA8","\xF4","\xD4"],BracketRight:["$","*","\u20AC","\xA5"],Backslash:["`","\xA3","@","#"],Semicolon:["m","M","\xB5","\xD3"],Quote:["\xF9","%","\xD9","\u2030"],Backquote:["<",">","\u2264","\u2265"],Comma:[";",".","\u2026","\u2022"],Period:[":","/","\xF7","\\"],Slash:["=","+","\u2260","\xB1"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","\u2022","\u0178"],NumpadEqual:["=","=","=","="]}},vDe={id:"windows.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["\xE9","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["\xE8","7","`",""],Digit8:["_","8","\\",""],Digit9:["\xE7","9","^",""],Digit0:["\xE0","0","@",""],Space:[" "," ","",""],Minus:[")","\xB0","]",""],Equal:["=","+","}",""],BracketLeft:["^","\xA8","",""],BracketRight:["$","\xA3","\xA4",""],Backslash:["*","\xB5","",""],Semicolon:["m","M","",""],Quote:["\xF9","%","",""],Backquote:["\xB2","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","\xA7","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},GDe={id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","\u03A9"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:[",","?","\u0301","\u030B"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["z","Z","\xAB","<"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["w","W","\u0142","\u0141"],Digit1:["&","1","\xB9","\xA1"],Digit2:["\xE9","2","~","\u215B"],Digit3:['"',"3","#","\xA3"],Digit4:["'","4","{","$"],Digit5:["(","5","[","\u215C"],Digit6:["-","6","|","\u215D"],Digit7:["\xE8","7","`","\u215E"],Digit8:["_","8","\\","\u2122"],Digit9:["\xE7","9","^","\xB1"],Digit0:["\xE0","0","@","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:[")","\xB0","]","\xBF"],Equal:["=","+","}","\u0328"],BracketLeft:["\u0302","\u0308","\u0308","\u030A"],BracketRight:["$","\xA3","\xA4","\u0304"],Backslash:["*","\xB5","\u0300","\u0306"],Semicolon:["m","M","\xB5","\xBA"],Quote:["\xF9","%","\u0302","\u030C"],Backquote:["\xB2","~","\xAC","\xAC"],Comma:[";",".","\u2500","\xD7"],Period:[":","/","\xB7","\xF7"],Slash:["!","\xA7","\u0323","\u0307"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"]}},yDe={id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u2039"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\u2122"],KeyE:["e","E","\u20AC","\u2030"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\xCC"],KeyH:["h","H","\xAA","\xD3"],KeyI:["i","I","\u2044","\xDB"],KeyJ:["j","J","\xBA","\u0131"],KeyK:["k","K","\u2206","\u02C6"],KeyL:["l","L","@","\uFB02"],KeyM:["m","M","\xB5","\u02D8"],KeyN:["n","N","~","\u203A"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\xAB","\xBB"],KeyR:["r","R","\xAE","\xB8"],KeyS:["s","S","\u201A","\xCD"],KeyT:["t","T","\u2020","\u02DD"],KeyU:["u","U","\xA8","\xC1"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\xD9"],KeyY:["z","Z","\u03A9","\u02C7"],KeyZ:["y","Y","\xA5","\u2021"],Digit1:["1","!","\xA1","\xAC"],Digit2:["2",'"',"\u201C","\u201D"],Digit3:["3","\xA7","\xB6","#"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","[","\uFB01"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","\u02DC"],Digit9:["9",")","}","\xB7"],Digit0:["0","=","\u2260","\xAF"],Space:[" "," "," "," "],Minus:["\xDF","?","\xBF","\u02D9"],Equal:["\xB4","`","'","\u02DA"],BracketLeft:["\xFC","\xDC","\u2022","\xB0"],BracketRight:["+","*","\xB1","\uF8FF"],Backslash:["#","'","\u2018","\u2019"],Semicolon:["\xF6","\xD6","\u0153","\u0152"],Quote:["\xE4","\xC4","\xE6","\xC6"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u221E","\u02DB"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","\xB0","\u201E","\u201C"],NumpadEqual:["=","=","=","="]}},CDe={id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},xDe={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201C","\u2018"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0323","\u0307"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","\u201D","\u2019"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\u017F","\u1E9E"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201E","\u201A"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xAB","\u2039"],KeyY:["z","Z","\u2190","\xA5"],KeyZ:["y","Y","\xBB","\u203A"],Digit1:["1","!","\xB9","\xA1"],Digit2:["2",'"',"\xB2","\u215B"],Digit3:["3","\xA7","\xB3","\xA3"],Digit4:["4","$","\xBC","\xA4"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["\xDF","?","\\","\xBF"],Equal:["\u0301","\u0300","\u0327","\u0328"],BracketLeft:["\xFC","\xDC","\u0308","\u030A"],BracketRight:["+","*","~","\xAF"],Backslash:["#","'","\u2019","\u0306"],Semicolon:["\xF6","\xD6","\u030B","\u0323"],Quote:["\xE4","\xC4","\u0302","\u030C"],Backquote:["\u0302","\xB0","\u2032","\u2033"],Comma:[",",";","\xB7","\xD7"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],PrintScreen:["","","",""],PageUp:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",",","",","],IntlBackslash:["<",">","|","\u0331"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},ZDe={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2",'"',"@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["\xBA","\xAA","\\","\xB0"]}},RDe={id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},ADe={id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["z","Z","\xAB","<"],Digit1:["1","!","|","\xA1"],Digit2:["2",'"',"@","\u215B"],Digit3:["3","\xB7","#","\xA3"],Digit4:["4","$","~","$"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["'","?","\\","\xBF"],Equal:["\xA1","\xBF","\u0303","~"],BracketLeft:["\u0300","\u0302","[","\u030A"],BracketRight:["+","*","]","\u0304"],Backslash:["\xE7","\xC7","}","\u0306"],Semicolon:["\xF1","\xD1","~","\u030B"],Quote:["\u0301","\u0308","{","{"],Backquote:["\xBA","\xAA","\\","\\"],Comma:[",",";","\u2500","\xD7"],Period:[".",":","\xB7","\xF7"],Slash:["-","_","\u0323","\u0307"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}};BDe={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},v1=[];switch(h_()){case"apple":Gs(S9),Gs(IDe),Gs(ZDe),Gs(yDe);break;case"windows":Gs(ELt),Gs(vDe),Gs(RDe),Gs(CDe);break;case"linux":Gs(NLt),Gs(GDe),Gs(ADe),Gs(xDe);break}Gs(fDe);SDe={en:{"keyboard.tooltip.symbols":"Symbols","keyboard.tooltip.greek":"Greek Letters","keyboard.tooltip.numeric":"Numeric","keyboard.tooltip.alphabetic":"Roman Letters","tooltip.copy to clipboard":"Copy to Clipboard","tooltip.cut to clipboard":"Cut to Clipboard","tooltip.paste from clipboard":"Paste from Clipboard","tooltip.redo":"Redo","tooltip.toggle virtual keyboard":"Toggle Virtual Keyboard","tooltip.menu":"Menu","tooltip.undo":"Undo","menu.borders":"Borders","menu.insert matrix":"Insert Matrix","menu.array.add row above":"Add Row Before","menu.array.add row below":"Add Row After","menu.array.add column after":"Add Column After","menu.array.add column before":"Add Column Before","menu.array.delete row":"Delete Row","menu.array.delete rows":"Delete Selected Rows","menu.array.delete column":"Delete Column","menu.array.delete columns":"Delete Selected Columns","menu.mode":"Mode","menu.mode-math":"Math","menu.mode-text":"Text","menu.mode-latex":"LaTeX","menu.insert":"Insert","menu.insert.abs":"Absolute Value","menu.insert.abs-template":"\\left|x\\right|","menu.insert.nth-root":"nth Root","menu.insert.nth-root-template":"\\sqrt[n]{x}","menu.insert.log-base":"Logarithm base a","menu.insert.log-base-template":"\\log_a(x)","menu.insert.heading-calculus":"Calculus","menu.insert.derivative":"Derivative","menu.insert.derivative-template":"\\dfrac{\\mathrm{d}}{\\mathrm{d}x}f(x)\\bigm|_{x=a}","menu.insert.nth-derivative":"nth derivative","menu.insert.nth-derivative-template":"\\dfrac{\\mathrm{d}^n}{\\mathrm{d}x^n}f(x)\\bigm|_{x=a}","menu.insert.integral":"Integral","menu.insert.integral-template":"$\\int_a^b f(x)\\,\\mathrm{d}x$","menu.insert.sum":"Sum","menu.insert.sum-template":"$\\sum_{i=1}^n x_i$","menu.insert.product":"Product","menu.insert.product-template":"\\prod_{i=1}^n x_i","menu.insert.heading-complex-numbers":"Complex Numbers","menu.insert.modulus":"Modulus","menu.insert.modulus-template":"\\lvert z \\rvert","menu.insert.argument":"Argument","menu.insert.argument-template":"\\arg(z)","menu.insert.real-part":"Real Part","menu.insert.real-part-template":"\\Re(z)","menu.insert.imaginary-part":"Imaginary Part","menu.insert.imaginary-part-template":"\\Im(z)","menu.insert.conjugate":"Conjugate","menu.insert.conjugate-template":"\\overline{z}","tooltip.blackboard":"Blackboard","tooltip.bold":"Bold","tooltip.italic":"Italic","tooltip.fraktur":"Fraktur","tooltip.script":"Script","tooltip.caligraphic":"Caligraphic","tooltip.typewriter":"Typewriter","tooltip.roman-upright":"Roman Upright","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"Font Style","menu.accent":"Accent","menu.decoration":"Decoration","menu.color":"Color","menu.background-color":"Background","menu.evaluate":"Evaluate","menu.simplify":"Simplify","menu.solve":"Solve","menu.solve-for":"Solve for %@","menu.cut":"Cut","menu.copy":"Copy","menu.copy-as-latex":"Copy as LaTeX","menu.copy-as-typst":"Copy as Typst","menu.copy-as-ascii-math":"Copy as ASCII Math","menu.copy-as-mathml":"Copy as MathML","menu.paste":"Paste","menu.select-all":"Select All","color.red":"Red","color.orange":"Orange","color.yellow":"Yellow","color.lime":"Lime","color.green":"Green","color.teal":"Teal","color.cyan":"Cyan","color.blue":"Blue","color.indigo":"Indigo","color.purple":"Purple","color.magenta":"Magenta","color.black":"Black","color.dark-grey":"Dark Grey","color.grey":"Grey","color.light-grey":"Light Grey","color.white":"White"},ar:{"keyboard.tooltip.symbols":"\u062D\u0631\u0641 \u0627\u0648 \u0631\u0645\u0632","keyboard.tooltip.greek":"\u062D\u0631\u0648\u0641 \u064A\u0648\u0646\u0627\u0646\u064A\u0629","keyboard.tooltip.numeric":"\u0627\u0644\u0631\u0642\u0645\u064A\u0629","keyboard.tooltip.alphabetic":"\u0631\u0645\u0648\u0632 \u0627\u0644\u0627\u062D\u0631\u0641 \u0627\u0644\u0631\u0648\u0645\u0627\u0646\u064A\u0629","tooltip.copy to clipboard":"\u0646\u0633\u062E \u0625\u0644\u0649 \u0627\u0644\u062D\u0627\u0641\u0638\u0629","tooltip.cut to clipboard":"\u0642\u0635 \u0625\u0644\u0649 \u0627\u0644\u062D\u0627\u0641\u0638\u0629","tooltip.paste from clipboard":"\u0644\u0635\u0642 \u0645\u0646 \u0627\u0644\u062D\u0627\u0641\u0638\u0629","tooltip.redo":"\u0627\u0644\u0625\u0639\u0627\u062F\u0629","tooltip.toggle virtual keyboard":"\u062A\u0628\u062F\u064A\u0644 \u0644\u0648\u062D\u0629 \u0627\u0644\u0645\u0641\u0627\u062A\u064A\u062D \u0627\u0644\u0625\u0641\u062A\u0631\u0627\u0636\u064A\u0629","tooltip.undo":"\u0625\u0644\u063A\u0627\u0621","menu.insert matrix":"\u0623\u062F\u062E\u0644 \u0627\u0644\u0645\u0635\u0641\u0648\u0641\u0629","menu.borders":"\u0645\u062D\u062F\u062F\u0627\u062A \u0627\u0644\u0645\u0635\u0641\u0648\u0641\u0629","menu.array.add row above":"\u0623\u0636\u0641 \u0635\u0641\u064B\u0627 \u0628\u0639\u062F \u0630\u0644\u0643","menu.array.add row below":"\u0623\u0636\u0641 \u0627\u0644\u0635\u0641 \u0642\u0628\u0644","menu.array.add column after":"\u0623\u0636\u0641 \u0627\u0644\u0639\u0645\u0648\u062F \u0628\u0639\u062F \u0630\u0644\u0643","menu.array.add column before":"\u0623\u0636\u0641 \u0627\u0644\u0639\u0645\u0648\u062F \u0642\u0628\u0644","menu.array.delete row":"\u0627\u062D\u0630\u0641 \u0635\u0641","menu.array.delete rows":"\u062D\u0630\u0641 \u0627\u0644\u0635\u0641\u0648\u0641 \u0627\u0644\u0645\u062D\u062F\u062F\u0629","menu.array.delete column":"\u062D\u0630\u0641 \u0627\u0644\u0639\u0645\u0648\u062F","menu.array.delete columns":"\u062D\u0630\u0641 \u0627\u0644\u0623\u0639\u0645\u062F\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629","menu.mode":"\u0648\u0636\u0639","menu.mode-math":"\u0631\u064A\u0627\u0636\u064A\u0627\u062A","menu.mode-text":"\u0646\u0635","menu.mode-latex":"\u0644\u0627\u062A\u0643\u0633","tooltip.blackboard":"\u0633\u0628\u0648\u0631\u0629","tooltip.bold":"\u0639\u0631\u064A\u0636","tooltip.italic":"\u0645\u0627\u0626\u0644","tooltip.fraktur":"\u0641\u0631\u0627\u0643\u062A\u0648\u0631","tooltip.script":"\u0633\u0643\u0631\u064A\u0628\u062A","tooltip.caligraphic":"\u0643\u0627\u0644\u064A\u062C\u0631\u0627\u0641\u064A\u0643","tooltip.typewriter":"\u0622\u0644\u0629 \u0643\u0627\u062A\u0628\u0629","tooltip.roman-upright":"\u0631\u0648\u0645\u0627\u0646\u064A \u0645\u0633\u062A\u0642\u064A\u0645","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u0646\u0645\u0637 \u0627\u0644\u062E\u0637","menu.accent":"\u062A\u0634\u0643\u064A\u0644","menu.decoration":"\u0632\u062E\u0631\u0641\u0629","menu.color":"\u0644\u0648\u0646","menu.background-color":"\u0627\u0644\u062E\u0644\u0641\u064A\u0629","menu.evaluate":"\u062A\u0642\u064A\u064A\u0645","menu.simplify":"\u062A\u0628\u0633\u064A\u0637","menu.solve":"\u062D\u0644","menu.solve-for":"\u062D\u0644 \u0644\u0640 %@","menu.cut":"\u0642\u0635","menu.copy":"\u0646\u0633\u062E","menu.copy-as-latex":"\u0646\u0633\u062E \u0643\u0640 LaTeX","menu.copy-as-ascii-math":"\u0646\u0633\u062E \u0643\u0640 ASCII Math","menu.copy-as-mathml":"\u0646\u0633\u062E \u0643\u0640 MathML","menu.paste":"\u0644\u0635\u0642","menu.select-all":"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644","color.red":"\u0623\u062D\u0645\u0631","color.orange":"\u0628\u0631\u062A\u0642\u0627\u0644\u064A","color.yellow":"\u0623\u0635\u0641\u0631","color.lime":"\u0644\u064A\u0645\u0648\u0646\u064A","color.green":"\u0623\u062E\u0636\u0631","color.teal":"\u0633\u0645\u0627\u0648\u064A","color.cyan":"\u0633\u0645\u0627\u0648\u064A \u0641\u0627\u062A\u062D","color.blue":"\u0623\u0632\u0631\u0642","color.indigo":"\u0646\u064A\u0644\u064A","color.purple":"\u0628\u0646\u0641\u0633\u062C\u064A","color.magenta":"\u0623\u0631\u062C\u0648\u0627\u0646\u064A","color.black":"\u0623\u0633\u0648\u062F","color.dark-grey":"\u0631\u0645\u0627\u062F\u064A \u063A\u0627\u0645\u0642","color.grey":"\u0631\u0645\u0627\u062F\u064A","color.light-grey":"\u0631\u0645\u0627\u062F\u064A \u0641\u0627\u062A\u062D","color.white":"\u0623\u0628\u064A\u0636"},de:{"keyboard.tooltip.symbols":"Symbole","keyboard.tooltip.greek":"Griechische Buchstaben","keyboard.tooltip.numeric":"Numerisch","keyboard.tooltip.alphabetic":"R\xF6mische Buchstaben","tooltip.copy to clipboard":"In die Zwischenablage kopieren","tooltip.redo":"Wiederholen","tooltip.toggle virtual keyboard":"Virtuelle Tastatur umschalten","tooltip.undo":"Widerrufen","menu.insert matrix":"Matrix einf\xFCgen","menu.borders":"Matrixtrennzeichen","menu.array.add row above":"Zeile hinzuf\xFCgen nach","menu.array.add row below":"Zeile hinzuf\xFCgen vor","menu.array.add column after":"Spalte hinzuf\xFCgen nach","menu.array.add column before":"Spalte hinzuf\xFCgen vor","menu.array.delete row":"Zeile l\xF6schen","menu.array.delete rows":"Ausgew\xE4hlte Zeilen l\xF6schen","menu.array.delete column":"Spalte l\xF6schen","menu.array.delete columns":"Ausgew\xE4hlte Spalten l\xF6schen","menu.mode":"Modus","menu.mode-math":"Mathematik","menu.mode-text":"Text","menu.mode-latex":"LaTeX","tooltip.blackboard":"Tafel","tooltip.bold":"Fett","tooltip.italic":"Kursiv","tooltip.fraktur":"Fraktur","tooltip.script":"Skript","tooltip.caligraphic":"Kalligraphie","tooltip.typewriter":"Schreibmaschine","tooltip.roman-upright":"R\xF6misch aufrecht","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"Schriftstil","menu.accent":"Akzent","menu.decoration":"Dekoration","menu.color":"Farbe","menu.background-color":"Hintergrund","menu.evaluate":"Auswerten","menu.simplify":"Vereinfachen","menu.solve":"L\xF6sen","menu.solve-for":"L\xF6sen f\xFCr %@","menu.cut":"Ausschneiden","menu.copy":"Kopieren","menu.copy-as-latex":"Als LaTeX kopieren","menu.copy-as-ascii-math":"Als ASCII Math kopieren","menu.copy-as-mathml":"Als MathML kopieren","menu.paste":"Einf\xFCgen","menu.select-all":"Alles ausw\xE4hlen","color.red":"Rot","color.orange":"Orange","color.yellow":"Gelb","color.lime":"Limette","color.green":"Gr\xFCn","color.teal":"Blaugr\xFCn","color.cyan":"Cyan","color.blue":"Blau","color.indigo":"Indigo","color.purple":"Lila","color.magenta":"Magenta","color.black":"Schwarz","color.dark-grey":"Dunkelgrau","color.grey":"Grau","color.light-grey":"Hellgrau","color.white":"Wei\xDF"},el:{"keyboard.tooltip.symbols":"\u03C3\u03CD\u03BC\u03B2\u03BF\u03BB\u03B1","keyboard.tooltip.greek":"\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC \u03B3\u03C1\u03AC\u03BC\u03BC\u03B1\u03C4\u03B1","keyboard.tooltip.numeric":"\u0391\u03C1\u03B9\u03B8\u03BC\u03B7\u03C4\u03B9\u03BA\u03CC\u03C2","keyboard.tooltip.alphabetic":"\u03A1\u03C9\u03BC\u03B1\u03CA\u03BA\u03AC \u03B3\u03C1\u03AC\u03BC\u03BC\u03B1\u03C4\u03B1","tooltip.copy to clipboard":"\u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03C3\u03C4\u03BF \u03C0\u03C1\u03CC\u03C7\u03B5\u03B9\u03C1\u03BF","tooltip.redo":"\u039E\u03B1\u03BD\u03B1\u03BA\u03AC\u03BD\u03C9","tooltip.toggle virtual keyboard":"\u0395\u03BD\u03B1\u03BB\u03BB\u03B1\u03B3\u03AE \u03B5\u03B9\u03BA\u03BF\u03BD\u03B9\u03BA\u03BF\u03CD \u03C0\u03BB\u03B7\u03BA\u03C4\u03C1\u03BF\u03BB\u03BF\u03B3\u03AF\u03BF\u03C5","tooltip.undo":"\u039E\u03B5\u03BA\u03AC\u03BD\u03C9","menu.insert matrix":"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03BC\u03AE\u03C4\u03C1\u03B1","menu.borders":"\u039F\u03C1\u03B9\u03BF\u03B8\u03AD\u03C4\u03B5\u03C2 \u03BC\u03AE\u03C4\u03C1\u03B1","menu.array.add row above":"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C3\u03B5\u03B9\u03C1\u03AC\u03C2 \u03BC\u03B5\u03C4\u03AC","menu.array.add row below":"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C3\u03B5\u03B9\u03C1\u03AC\u03C2 \u03C0\u03C1\u03B9\u03BD","menu.array.add column after":"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C3\u03C4\u03AE\u03BB\u03B7\u03C2 \u03BC\u03B5\u03C4\u03AC","menu.array.add column before":"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C3\u03C4\u03AE\u03BB\u03B7\u03C2 \u03C0\u03C1\u03B9\u03BD","menu.array.delete row":"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03C3\u03B5\u03B9\u03C1\u03AC\u03C2","menu.array.delete rows":"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03C9\u03BD \u03C3\u03B5\u03B9\u03C1\u03CE\u03BD","menu.array.delete column":"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03C3\u03C4\u03AE\u03BB\u03B7\u03C2","menu.array.delete columns":"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03C9\u03BD \u03C3\u03C4\u03B7\u03BB\u03CE\u03BD","menu.mode":"\u039B\u03B5\u03B9\u03C4\u03BF\u03C5\u03C1\u03B3\u03AF\u03B1","menu.mode-math":"\u039C\u03B1\u03B8\u03B7\u03BC\u03B1\u03C4\u03B9\u03BA\u03AC","menu.mode-text":"\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u03A0\u03AF\u03BD\u03B1\u03BA\u03B1\u03C2","tooltip.bold":"\u0388\u03BD\u03C4\u03BF\u03BD\u03B7","tooltip.italic":"\u03A0\u03BB\u03AC\u03B3\u03B9\u03B1","tooltip.fraktur":"\u03A6\u03C1\u03AC\u03BA\u03C4\u03BF\u03C5\u03C1","tooltip.script":"\u03A3\u03B5\u03BD\u03AC\u03C1\u03B9\u03BF","tooltip.caligraphic":"\u039A\u03B1\u03BB\u03BB\u03B9\u03B3\u03C1\u03B1\u03C6\u03B9\u03BA\u03AE","tooltip.typewriter":"\u039C\u03B7\u03C7\u03B1\u03BD\u03AE \u03B3\u03C1\u03B1\u03C6\u03AE\u03C2","tooltip.roman-upright":"\u03A1\u03C9\u03BC\u03B1\u03CA\u03BA\u03CC \u039A\u03B1\u03C4\u03B1\u03BA\u03CC\u03C1\u03C5\u03C6\u03BF","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u03A3\u03C4\u03C5\u03BB \u03B3\u03C1\u03B1\u03BC\u03BC\u03B1\u03C4\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC\u03C2","menu.accent":"\u03A4\u03CC\u03BD\u03BF\u03C2","menu.decoration":"\u0394\u03B9\u03B1\u03BA\u03CC\u03C3\u03BC\u03B7\u03C3\u03B7","menu.color":"\u03A7\u03C1\u03CE\u03BC\u03B1","menu.background-color":"\u03A7\u03C1\u03CE\u03BC\u03B1 \u03C6\u03CC\u03BD\u03C4\u03BF\u03C5","menu.evaluate":"\u0391\u03BE\u03B9\u03BF\u03BB\u03CC\u03B3\u03B7\u03C3\u03B7","menu.simplify":"\u0391\u03C0\u03BB\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7","menu.solve":"\u039B\u03CD\u03C3\u03B7","menu.solve-for":"\u039B\u03CD\u03C3\u03B7 \u03B3\u03B9\u03B1 %@","menu.cut":"\u0391\u03C0\u03BF\u03BA\u03BF\u03C0\u03AE","menu.copy":"\u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE","menu.copy-as-latex":"\u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03C9\u03C2 LaTeX","menu.copy-as-ascii-math":"\u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03C9\u03C2 ASCII Math","menu.copy-as-mathml":"\u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03C9\u03C2 MathML","menu.paste":"\u0395\u03C0\u03B9\u03BA\u03CC\u03BB\u03BB\u03B7\u03C3\u03B7","menu.select-all":"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03CC\u03BB\u03C9\u03BD","color.red":"\u039A\u03CC\u03BA\u03BA\u03B9\u03BD\u03BF","color.orange":"\u03A0\u03BF\u03C1\u03C4\u03BF\u03BA\u03B1\u03BB\u03AF","color.yellow":"\u039A\u03AF\u03C4\u03C1\u03B9\u03BD\u03BF","color.lime":"\u039B\u03B1\u03C7\u03B1\u03BD\u03AF","color.green":"\u03A0\u03C1\u03AC\u03C3\u03B9\u03BD\u03BF","color.teal":"\u039A\u03C5\u03B1\u03BD\u03CC","color.cyan":"\u0393\u03B1\u03BB\u03AC\u03B6\u03B9\u03BF","color.blue":"\u039C\u03C0\u03BB\u03B5","color.indigo":"\u0399\u03BD\u03B4\u03B9\u03BA\u03CC","color.purple":"\u039C\u03C9\u03B2","color.magenta":"\u039C\u03B1\u03C4\u03B6\u03AD\u03BD\u03C4\u03B1","color.black":"\u039C\u03B1\u03CD\u03C1\u03BF","color.dark-grey":"\u03A3\u03BA\u03BF\u03CD\u03C1\u03BF \u0393\u03BA\u03C1\u03B9","color.grey":"\u0393\u03BA\u03C1\u03B9","color.light-grey":"\u0391\u03BD\u03BF\u03B9\u03C7\u03C4\u03CC \u0393\u03BA\u03C1\u03B9","color.white":"\u039B\u03B5\u03C5\u03BA\u03CC"},es:{"keyboard.tooltip.symbols":"S\xEDmbolos","keyboard.tooltip.greek":"Letras griegas","keyboard.tooltip.numeric":"Num\xE9rico","keyboard.tooltip.alphabetic":"Letras romanas","tooltip.copy to clipboard":"Copiar al portapapeles","tooltip.redo":"Rehacer","tooltip.toggle virtual keyboard":"Alternar teclado virtual","tooltip.undo":"Deshacer","menu.insert matrix":"A\xF1adir Matriz","menu.borders":"Delimitadores de Matriz","menu.array.add row above":"A\xF1adir L\xEDnea Antes","menu.array.add row below":"A\xF1adir L\xEDnea Despues","menu.array.add column after":"A\xF1adir Columna Despues","menu.array.add column before":"A\xF1adir Columna Antes","menu.array.delete row":"Borrar L\xEDnea","menu.array.delete rows":"Borrar L\xEDneas Seleccionadas","menu.array.delete column":"Borrar Columna","menu.array.delete columns":"Borrar Columnas Seleccionadas","menu.mode":"Modo","menu.mode-math":"Matem\xE1ticas","menu.mode-text":"Texto","menu.mode-latex":"LaTeX","tooltip.blackboard":"Pizarra","tooltip.bold":"Negrita","tooltip.italic":"Cursiva","tooltip.fraktur":"Fraktur","tooltip.script":"Script","tooltip.caligraphic":"Caligr\xE1fico","tooltip.typewriter":"M\xE1quina de escribir","tooltip.roman-upright":"Romano Vertical","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"Estilo de fuente","menu.accent":"Acento","menu.decoration":"Decoraci\xF3n","menu.color":"Color","menu.background-color":"Fondo","menu.evaluate":"Evaluar","menu.simplify":"Simplificar","menu.solve":"Resolver","menu.solve-for":"Resolver para %@","menu.cut":"Cortar","menu.copy":"Copiar","menu.copy-as-latex":"Copiar como LaTeX","menu.copy-as-ascii-math":"Copiar como ASCII Math","menu.copy-as-mathml":"Copiar como MathML","menu.paste":"Pegar","menu.select-all":"Seleccionar todo","color.red":"Rojo","color.orange":"Naranja","color.yellow":"Amarillo","color.lime":"Lima","color.green":"Verde","color.teal":"Verde azulado","color.cyan":"Cian","color.blue":"Azul","color.indigo":"\xCDndigo","color.purple":"Morado","color.magenta":"Magenta","color.black":"Negro","color.dark-grey":"Gris oscuro","color.grey":"Gris","color.light-grey":"Gris claro","color.white":"Blanco"},fr:{"keyboard.tooltip.symbols":"Symboles","keyboard.tooltip.greek":"Lettres grecques","keyboard.tooltip.numeric":"Num\xE9rique","keyboard.tooltip.alphabetic":"Lettres romaines","tooltip.menu":"Menu","tooltip.copy to clipboard":"Copier dans le presse-papiers","tooltip.redo":"R\xE9tablir","tooltip.toggle virtual keyboard":"Afficher/Masquer le clavier virtuel","tooltip.undo":"Annuler","menu.insert matrix":"Ins\xE9rer une Matrice","menu.borders":"Bords","menu.array.add row above":"Ajouter une Ligne Avant","menu.array.add row below":"Ajouter une Ligne Apr\xE8s","menu.array.add column before":"Ajouter une Colonne Avant","menu.array.add column after":"Ajouter une Colonne Apr\xE8s","menu.array.delete row":"Enlever une Ligne","menu.array.delete rows":"Enlever les Lignes S\xE9lection\xE9es","menu.array.delete column":"Enlever une Colone","menu.array.delete columns":"Enlever les Colonnes S\xE9lection\xE9es","menu.mode":"Mode","menu.mode-math":"Math","menu.mode-text":"Text","menu.mode-latex":"LaTeX","tooltip.blackboard":"Tableau noir","tooltip.bold":"Gras","tooltip.italic":"Italique","tooltip.fraktur":"Fraktur","tooltip.script":"Script","tooltip.caligraphic":"Calligraphique","tooltip.typewriter":"Machine \xE0 \xE9crire","tooltip.roman-upright":"Romain droit","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"Style de police","menu.accent":"Accent","menu.decoration":"D\xE9coration","menu.color":"Couleur","menu.background-color":"Arri\xE8re-plan","menu.evaluate":"\xC9valuer","menu.simplify":"Simplifier","menu.solve":"R\xE9soudre","menu.solve-for":"R\xE9soudre pour %@","menu.cut":"Couper","menu.copy":"Copier","menu.copy-as-latex":"Copier en LaTeX","menu.copy-as-ascii-math":"Copier en ASCII Math","menu.copy-as-mathml":"Copier en MathML","menu.paste":"Coller","menu.select-all":"S\xE9lectionner tout","color.red":"Rouge","color.orange":"Orange","color.yellow":"Jaune","color.lime":"Citron vert","color.green":"Vert","color.teal":"Turquoise","color.cyan":"Cyan","color.blue":"Bleu","color.indigo":"Indigo","color.purple":"Violet","color.magenta":"Magenta","color.black":"Noir","color.dark-grey":"Gris fonc\xE9","color.grey":"Gris","color.light-grey":"Gris clair","color.white":"Blanc"},he:{"keyboard.tooltip.symbols":"\u05E1\u05DE\u05DC\u05D9\u05DD","keyboard.tooltip.greek":"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA \u05D9\u05D5\u05D5\u05E0\u05D9\u05D5\u05EA","keyboard.tooltip.numeric":"\u05DE\u05E1\u05E4\u05E8\u05D9","keyboard.tooltip.alphabetic":"\u05DE\u05DB\u05EA\u05D1\u05D9\u05DD \u05E8\u05D5\u05DE\u05D9\u05D9\u05DD","tooltip.copy to clipboard":"\u05D4\u05E2\u05EA\u05E7 \u05DC\u05DC\u05D5\u05D7","tooltip.redo":"\u05DC\u05B7\u05E2\u05B2\u05E9\u05C2\u05D5\u05B9\u05EA \u05E9\u05C1\u05D5\u05BC\u05D1","tooltip.toggle virtual keyboard":"\u05D4\u05D7\u05DC\u05E3 \u05D0\u05EA \u05D4\u05DE\u05E7\u05DC\u05D3\u05EA \u05D4\u05D5\u05D5\u05D9\u05E8\u05D8\u05D5\u05D0\u05DC\u05D9\u05EA","tooltip.undo":"\u05DC\u05D1\u05D8\u05DC","menu.insert matrix":"\u05D4\u05DB\u05E0\u05E1 \u05DE\u05D8\u05E8\u05D9\u05E7\u05E1","menu.borders":"\u05DE\u05E4\u05E8\u05D9\u05D3\u05D9 \u05DE\u05D8\u05E8\u05D9\u05E7\u05E1","menu.array.add row above":"\u05D4\u05D5\u05E1\u05E3 \u05E9\u05D5\u05E8\u05D4 \u05D0\u05D7\u05E8\u05D9","menu.array.add row below":"\u05D4\u05D5\u05E1\u05E3 \u05E9\u05D5\u05E8\u05D4 \u05DC\u05E4\u05E0\u05D9","menu.array.add column after":"\u05D4\u05D5\u05E1\u05E3 \u05E2\u05DE\u05D5\u05D3\u05D4 \u05D0\u05D7\u05E8\u05D9","menu.array.add column before":"\u05D4\u05D5\u05E1\u05E3 \u05E2\u05DE\u05D5\u05D3\u05D4 \u05DC\u05E4\u05E0\u05D9","menu.array.delete row":"\u05DE\u05D7\u05E7 \u05E9\u05D5\u05E8\u05D4","menu.array.delete rows":"\u05DE\u05D7\u05E7 \u05E9\u05D5\u05E8\u05D5\u05EA \u05E9\u05E0\u05D1\u05D7\u05E8\u05D5","menu.array.delete column":"\u05DE\u05D7\u05E7 \u05E2\u05DE\u05D5\u05D3\u05D4","menu.array.delete columns":"\u05DE\u05D7\u05E7 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05E9\u05E0\u05D1\u05D7\u05E8\u05D5","menu.mode":"\u05DE\u05E6\u05D1","menu.mode-math":"\u05DE\u05EA\u05DE\u05D8\u05D9\u05E7\u05D4","menu.mode-text":"\u05D8\u05E7\u05E1\u05D8","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u05DC\u05D5\u05D7 \u05E9\u05D7\u05D5\u05E8","tooltip.bold":"\u05DE\u05D5\u05D3\u05D2\u05E9","tooltip.italic":"\u05E0\u05D8\u05D5\u05D9","tooltip.fraktur":"\u05E4\u05E8\u05E7\u05D8\u05D5\u05E8","tooltip.script":"\u05DB\u05EA\u05D1","tooltip.caligraphic":"\u05E7\u05DC\u05D9\u05D2\u05E8\u05E4\u05D9","tooltip.typewriter":"\u05DE\u05DB\u05D5\u05E0\u05EA \u05DB\u05EA\u05D9\u05D1\u05D4","tooltip.roman-upright":"\u05E8\u05D5\u05DE\u05D9 \u05D9\u05E9\u05E8","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u05E1\u05D2\u05E0\u05D5\u05DF \u05D2\u05D5\u05E4\u05DF","menu.accent":"\u05E6\u05DC\u05D9\u05DC","menu.decoration":"\u05E7\u05D9\u05E9\u05D5\u05D8","menu.color":"\u05E6\u05D1\u05E2","menu.background-color":"\u05E8\u05E7\u05E2","menu.evaluate":"\u05D7\u05E9\u05D1","menu.simplify":"\u05E4\u05E9\u05D8","menu.solve":"\u05E4\u05EA\u05D5\u05E8","menu.solve-for":"\u05E4\u05EA\u05D5\u05E8 \u05E2\u05D1\u05D5\u05E8 %@","menu.cut":"\u05D2\u05D6\u05D5\u05E8","menu.copy":"\u05D4\u05E2\u05EA\u05E7","menu.copy-as-latex":"\u05D4\u05E2\u05EA\u05E7 \u05DB\u05BELaTeX","menu.copy-as-ascii-math":"\u05D4\u05E2\u05EA\u05E7 \u05DB\u05BEASCII Math","menu.copy-as-mathml":"\u05D4\u05E2\u05EA\u05E7 \u05DB\u05BEMathML","menu.paste":"\u05D4\u05D3\u05D1\u05E7","menu.select-all":"\u05D1\u05D7\u05E8 \u05D4\u05DB\u05DC","color.red":"\u05D0\u05D3\u05D5\u05DD","color.orange":"\u05DB\u05EA\u05D5\u05DD","color.yellow":"\u05E6\u05D4\u05D5\u05D1","color.lime":"\u05D9\u05E8\u05D5\u05E7 \u05DC\u05D9\u05D9\u05DD","color.green":"\u05D9\u05E8\u05D5\u05E7","color.teal":"\u05D8\u05D9\u05DC","color.cyan":"\u05E6\u05D9\u05D0\u05DF","color.blue":"\u05DB\u05D7\u05D5\u05DC","color.indigo":"\u05D0\u05D9\u05E0\u05D3\u05D9\u05D2\u05D5","color.purple":"\u05E1\u05D2\u05D5\u05DC","color.magenta":"\u05DE\u05D2\u05E0\u05D8\u05D4","color.black":"\u05E9\u05D7\u05D5\u05E8","color.dark-grey":"\u05D0\u05E4\u05D5\u05E8 \u05DB\u05D4\u05D4","color.grey":"\u05D0\u05E4\u05D5\u05E8","color.light-grey":"\u05D0\u05E4\u05D5\u05E8 \u05D1\u05D4\u05D9\u05E8","color.white":"\u05DC\u05D1\u05DF"},it:{"keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Lettere Greche","keyboard.tooltip.numeric":"Numerico","keyboard.tooltip.alphabetic":"Lettere Romane","tooltip.copy to clipboard":"Copia negli appunti","tooltip.cut to clipboard":"Taglia negli appunti","tooltip.paste from clipboard":"Incolla dagli appunti","tooltip.redo":"Ripeti","tooltip.toggle virtual keyboard":"Attiva/Disattiva Tastiera Virtuale","tooltip.menu":"Menu","tooltip.undo":"Annulla","menu.borders":"Bordi","menu.insert matrix":"Inserisci Matrice","menu.array.add row above":"Aggiungi Riga Prima","menu.array.add row below":"Aggiungi Riga Dopo","menu.array.add column after":"Aggiungi Colonna Dopo","menu.array.add column before":"Aggiungi Colonna Prima","menu.array.delete row":"Elimina Riga","menu.array.delete rows":"Elimina Righe Selezionate","menu.array.delete column":"Elimina Colonna","menu.array.delete columns":"Elimina Colonne Selezionate","menu.mode":"Modalit\xE0","menu.mode-math":"Matematica","menu.mode-text":"Testo","menu.mode-latex":"LaTeX","menu.insert":"Inserisci","menu.insert.abs":"Valore Assoluto","menu.insert.abs-template":"\\left|x\\right|","menu.insert.nth-root":"Radice n-esima","menu.insert.nth-root-template":"\\sqrt[n]{x}","menu.insert.log-base":"Logaritmo in base a","menu.insert.log-base-template":"\\log_a(x)","menu.insert.heading-calculus":"Calcolo","menu.insert.derivative":"Derivata","menu.insert.derivative-template":"\\dfrac{\\mathrm{d}}{\\mathrm{d}x}f(x)\\bigm|_{x=a}","menu.insert.nth-derivative":"Derivata n-esima","menu.insert.nth-derivative-template":"\\dfrac{\\mathrm{d}^n}{\\mathrm{d}x^n}f(x)\\bigm|_{x=a}","menu.insert.integral":"Integrale","menu.insert.integral-template":"$\\int_a^b f(x)\\,\\mathrm{d}x$","menu.insert.sum":"Somma","menu.insert.sum-template":"$\\sum_{i=1}^n x_i$","menu.insert.product":"Prodotto","menu.insert.product-template":"\\prod_{i=1}^n x_i","menu.insert.heading-complex-numbers":"Numeri Complessi","menu.insert.modulus":"Modulo","menu.insert.modulus-template":"\\lvert z \\rvert","menu.insert.argument":"Argomento","menu.insert.argument-template":"\\arg(z)","menu.insert.real-part":"Parte Reale","menu.insert.real-part-template":"\\Re(z)","menu.insert.imaginary-part":"Parte Immaginaria","menu.insert.imaginary-part-template":"\\Im(z)","menu.insert.conjugate":"Coniugato","menu.insert.conjugate-template":"\\overline{z}","tooltip.blackboard":"Lavagna","tooltip.bold":"Grassetto","tooltip.italic":"Corsivo","tooltip.fraktur":"Fraktur","tooltip.script":"Script","tooltip.caligraphic":"Calligrafico","tooltip.typewriter":"Macchina da Scrivere","tooltip.roman-upright":"Romano Dritto","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"Stile del Carattere","menu.accent":"Accento","menu.decoration":"Decorazione","menu.color":"Colore","menu.background-color":"Sfondo","menu.evaluate":"Valuta","menu.simplify":"Semplifica","menu.solve":"Risolvi","menu.solve-for":"Risolvi per %@","menu.cut":"Taglia","menu.copy":"Copia","menu.copy-as-latex":"Copia come LaTeX","menu.copy-as-ascii-math":"Copia come ASCII Math","menu.copy-as-mathml":"Copia come MathML","menu.paste":"Incolla","menu.select-all":"Seleziona Tutto","color.red":"Rosso","color.orange":"Arancione","color.yellow":"Giallo","color.lime":"Lime","color.green":"Verde","color.teal":"Verde Acqua","color.cyan":"Ciano","color.blue":"Blu","color.indigo":"Indaco","color.purple":"Viola","color.magenta":"Magenta","color.black":"Nero","color.dark-grey":"Grigio Scuro","color.grey":"Grigio","color.light-grey":"Grigio Chiaro","color.white":"Bianco"},ja:{"keyboard.tooltip.symbols":"\u30B7\u30F3\u30DC\u30EB","keyboard.tooltip.greek":"\u30AE\u30EA\u30B7\u30E3\u6587\u5B57","keyboard.tooltip.numeric":"\u6570\u5024","keyboard.tooltip.alphabetic":"\u30ED\u30FC\u30DE\u5B57","tooltip.menu":"\u30E1\u30CB\u30E5\u30FC","tooltip.copy to clipboard":"\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u306B\u30B3\u30D4\u30FC","tooltip.redo":"\u3084\u308A\u76F4\u3057","tooltip.toggle virtual keyboard":"\u4EEE\u60F3\u30AD\u30FC\u30DC\u30FC\u30C9\u306E\u5207\u308A\u66FF\u3048","tooltip.undo":"\u5143\u306B\u623B\u3059","menu.insert matrix":"\u30DE\u30C8\u30EA\u30C3\u30AF\u30B9\u3092\u633F\u5165","menu.borders":"\u884C\u5217\u533A\u5207\u308A\u6587\u5B57","menu.array.add row above":"\u5F8C\u306B\u884C\u3092\u8FFD\u52A0","menu.array.add row below":"\u524D\u306B\u884C\u3092\u8FFD\u52A0","menu.array.add column after":"\u5F8C\u306B\u5217\u3092\u8FFD\u52A0","menu.array.add column before":"\u524D\u306B\u5217\u3092\u8FFD\u52A0","menu.array.delete row":"\u884C\u3092\u524A\u9664","menu.array.delete rows":"\u9078\u629E\u3057\u305F\u884C\u3092\u524A\u9664\u3059\u308B","menu.array.delete column":"\u5217\u3092\u524A\u9664","menu.array.delete columns":"\u9078\u629E\u3057\u305F\u5217\u3092\u524A\u9664\u3059\u308B","menu.mode":"\u30E2\u30FC\u30C9","menu.mode-math":"\u6570\u5F0F","menu.mode-text":"\u30C6\u30AD\u30B9\u30C8","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u9ED2\u677F","tooltip.bold":"\u592A\u5B57","tooltip.italic":"\u30A4\u30BF\u30EA\u30C3\u30AF","tooltip.fraktur":"\u30D5\u30E9\u30AF\u30C8\u30A5\u30FC\u30EB","tooltip.script":"\u30B9\u30AF\u30EA\u30D7\u30C8","tooltip.caligraphic":"\u30AB\u30EA\u30B0\u30E9\u30D5\u30A3\u30C3\u30AF","tooltip.typewriter":"\u30BF\u30A4\u30D7\u30E9\u30A4\u30BF\u30FC","tooltip.roman-upright":"\u30ED\u30FC\u30DE\u76F4\u7ACB","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u30D5\u30A9\u30F3\u30C8\u30B9\u30BF\u30A4\u30EB","menu.accent":"\u30A2\u30AF\u30BB\u30F3\u30C8","menu.decoration":"\u88C5\u98FE","menu.color":"\u8272","menu.background-color":"\u80CC\u666F","menu.evaluate":"\u8A55\u4FA1","menu.simplify":"\u7C21\u7565\u5316","menu.solve":"\u89E3\u304F","menu.solve-for":"%@ \u3092\u89E3\u304F","menu.cut":"\u5207\u308A\u53D6\u308A","menu.copy":"\u30B3\u30D4\u30FC","menu.copy-as-latex":"LaTeX\u3068\u3057\u3066\u30B3\u30D4\u30FC","menu.copy-as-ascii-math":"ASCII Math\u3068\u3057\u3066\u30B3\u30D4\u30FC","menu.copy-as-mathml":"MathML\u3068\u3057\u3066\u30B3\u30D4\u30FC","menu.paste":"\u8CBC\u308A\u4ED8\u3051","menu.select-all":"\u3059\u3079\u3066\u9078\u629E","color.red":"\u8D64","color.orange":"\u30AA\u30EC\u30F3\u30B8","color.yellow":"\u9EC4\u8272","color.lime":"\u30E9\u30A4\u30E0","color.green":"\u7DD1","color.teal":"\u30C6\u30A3\u30FC\u30EB","color.cyan":"\u30B7\u30A2\u30F3","color.blue":"\u9752","color.indigo":"\u30A4\u30F3\u30C7\u30A3\u30B4","color.purple":"\u7D2B","color.magenta":"\u30DE\u30BC\u30F3\u30BF","color.black":"\u9ED2","color.dark-grey":"\u6FC3\u3044\u30B0\u30EC\u30FC","color.grey":"\u30B0\u30EC\u30FC","color.light-grey":"\u8584\u3044\u30B0\u30EC\u30FC","color.white":"\u767D"},ko:{"keyboard.tooltip.symbols":"\uAE30\uD638","keyboard.tooltip.greek":"\uADF8\uB9AC\uC2A4 \uBB38\uC790","keyboard.tooltip.numeric":"\uC22B\uC790","keyboard.tooltip.alphabetic":"\uB85C\uB9C8 \uBB38\uC790","tooltip.copy to clipboard":"\uD074\uB9BD \uBCF4\uB4DC\uC5D0 \uBCF5\uC0AC","tooltip.redo":"\uB2E4\uC2DC \uD558\uB2E4","tooltip.toggle virtual keyboard":"\uAC00\uC0C1 \uD0A4\uBCF4\uB4DC \uC804\uD658","tooltip.undo":"\uC2E4\uD589 \uCDE8\uC18C","menu.insert matrix":"\uB9E4\uD2B8\uB9AD\uC2A4 \uC0BD\uC785","menu.borders":"\uD589\uB82C \uAD6C\uBD84 \uAE30\uD638","menu.array.add row above":"\uB4A4\uC5D0 \uD589 \uCD94\uAC00","menu.array.add row below":"\uC55E\uC5D0 \uD589 \uCD94\uAC00","menu.array.add column after":"\uB4A4\uC5D0 \uC5F4 \uCD94\uAC00","menu.array.add column before":"\uC55E\uC5D0 \uC5F4 \uCD94\uAC00","menu.array.delete row":"\uD589 \uC0AD\uC81C","menu.array.delete rows":"\uC120\uD0DD\uD55C \uD589 \uC0AD\uC81C","menu.array.delete column":"\uC5F4 \uC0AD\uC81C","menu.array.delete columns":"\uC120\uD0DD\uD55C \uC5F4 \uC0AD\uC81C","menu.mode":"\u30E2\u30FC\u30C9","menu.mode-math":"\u6570\u5F0F","menu.mode-text":"\u30C6\u30AD\u30B9\u30C8","menu.mode-latex":"LaTeX","tooltip.blackboard":"\uCE60\uD310","tooltip.bold":"\uAD75\uAC8C","tooltip.italic":"\uC774\uD0E4\uB9AD","tooltip.fraktur":"\uD504\uB799\uD22C\uC5B4","tooltip.script":"\uC2A4\uD06C\uB9BD\uD2B8","tooltip.caligraphic":"\uCE98\uB9AC\uADF8\uB798\uD53D","tooltip.typewriter":"\uD0C0\uC790\uAE30","tooltip.roman-upright":"\uB85C\uB9C8 \uC9C1\uB9BD","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\uAE00\uAF34 \uC2A4\uD0C0\uC77C","menu.accent":"\uC545\uC13C\uD2B8","menu.decoration":"\uC7A5\uC2DD","menu.color":"\uC0C9\uC0C1","menu.background-color":"\uBC30\uACBD","menu.evaluate":"\uD3C9\uAC00","menu.simplify":"\uAC04\uC18C\uD654","menu.solve":"\uD574\uACB0","menu.solve-for":"%@\uC5D0 \uB300\uD574 \uD574\uACB0","menu.cut":"\uC798\uB77C\uB0B4\uAE30","menu.copy":"\uBCF5\uC0AC","menu.copy-as-latex":"LaTeX\uB85C \uBCF5\uC0AC","menu.copy-as-ascii-math":"ASCII Math\uB85C \uBCF5\uC0AC","menu.copy-as-mathml":"MathML\uB85C \uBCF5\uC0AC","menu.paste":"\uBD99\uC5EC\uB123\uAE30","menu.select-all":"\uBAA8\uB450 \uC120\uD0DD","color.red":"\uBE68\uAC15","color.orange":"\uC8FC\uD669","color.yellow":"\uB178\uB791","color.lime":"\uB77C\uC784","color.green":"\uCD08\uB85D","color.teal":"\uCCAD\uB85D","color.cyan":"\uCCAD\uC0C9","color.blue":"\uD30C\uB791","color.indigo":"\uB0A8\uC0C9","color.purple":"\uBCF4\uB77C","color.magenta":"\uC790\uD64D","color.black":"\uAC80\uC815","color.dark-grey":"\uC9C4\uD55C \uD68C\uC0C9","color.grey":"\uD68C\uC0C9","color.light-grey":"\uC5F0\uD55C \uD68C\uC0C9","color.white":"\uD770\uC0C9"},pl:{"keyboard.tooltip.symbols":"Symbolika","keyboard.tooltip.greek":"Litery greckie","keyboard.tooltip.numeric":"Numeryczne","keyboard.tooltip.alphabetic":"Litery rzymskie","tooltip.copy to clipboard":"Kopiuj do Schowka","tooltip.cut to clipboard":"Wytnij ze Schowka","tooltip.paste from clipboard":"Wklej ze Schowka","tooltip.redo":"Przywr\xF3\u0107","tooltip.toggle virtual keyboard":"Prze\u0142\u0105cz klawiatur\u0119 wirtualn\u0105","tooltip.menu":"Menu","tooltip.undo":"Cofnij","menu.borders":"Ograniczniki macierzy","menu.insert matrix":"Wstaw macierz","menu.array.add row above":"Dodaj wiersz przed","menu.array.add row below":"Dodaj wiersz po","menu.array.add column after":"Dodaj kolumn\u0119 po","menu.array.add column before":"Dodaj kolumn\u0119 przed","menu.array.delete row":"Usu\u0144 wiersz","menu.array.delete rows":"Usu\u0144 wybrane wiersze","menu.array.delete column":"Usu\u0144 kolumn\u0119","menu.array.delete columns":"Usu\u0144 wybrane kolumny","menu.mode":"Tryb","menu.mode-math":"Formu\u0142a","menu.mode-text":"Tekst","menu.mode-latex":"LaTeX","menu.insert":"Wstaw","menu.insert.abs":"Warto\u015B\u0107 bezwzgl\u0119dna","menu.insert.abs-template":"\\left|x\\right|","menu.insert.nth-root":"Pierwiastek n-tego stopnia","menu.insert.nth-root-template":"\\sqrt[n]{x}","menu.insert.log-base":"Logarytm o podstawie a","menu.insert.log-base-template":"\\log_a(x)","menu.insert.heading-calculus":"Rachunek r\xF3\u017Cniczkowy i ca\u0142kowy","menu.insert.derivative":"Pochodna","menu.insert.derivative-template":"\\dfrac{\\mathrm{d}}{\\mathrm{d}x}f(x)\\bigm|_{x=a}","menu.insert.nth-derivative":"Pochodna n-tego rz\u0119du","menu.insert.nth-derivative-template":"\\dfrac{\\mathrm{d}^n}{\\mathrm{d}x^n}f(x)\\bigm|_{x=a}","menu.insert.integral":"Ca\u0142ka","menu.insert.integral-template":"$\\int_a^b f(x)\\,\\mathrm{d}x$","menu.insert.sum":"Suma","menu.insert.sum-template":"$\\sum_{i=1}^n x_i$","menu.insert.product":"Iloczyn","menu.insert.product-template":"\\prod_{i=1}^n x_i","menu.insert.heading-complex-numbers":"Liczby zespolone","menu.insert.modulus":"Modu\u0142","menu.insert.modulus-template":"\\lvert z \\rvert","menu.insert.argument":"Argument","menu.insert.argument-template":"\\arg(z)","menu.insert.real-part":"Cz\u0119\u015B\u0107 rzeczywista","menu.insert.real-part-template":"\\Re(z)","menu.insert.imaginary-part":"Cz\u0119\u015B\u0107 urojona","menu.insert.imaginary-part-template":"\\Im(z)","menu.insert.conjugate":"Sprz\u0119\u017Cenie","menu.insert.conjugate-template":"\\overline{z}","tooltip.blackboard":"Tablica","tooltip.bold":"Pogrubienie","tooltip.italic":"Kursywa","tooltip.fraktur":"Fraktura","tooltip.script":"Skrypt","tooltip.caligraphic":"Kaligraficzny","tooltip.typewriter":"Maszynowy","tooltip.roman-upright":"Rzymski prosto","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"Styl czcionki","menu.accent":"Akcent","menu.decoration":"Dekoracja","menu.color":"Kolor","menu.background-color":"T\u0142o","menu.evaluate":"Oblicz","menu.simplify":"Upro\u015B\u0107","menu.solve":"Rozwi\u0105\u017C","menu.solve-for":"Rozwi\u0105\u017C dla %@","menu.cut":"Wytnij","menu.copy":"Kopiuj","menu.copy-as-latex":"Kopiuj jako LaTeX","menu.copy-as-ascii-math":"Kopiuj jako ASCII Math","menu.copy-as-mathml":"Kopiuj jako MathML","menu.paste":"Wklej","menu.select-all":"Zaznacz wszystko","color.red":"Czerwony","color.orange":"Pomara\u0144czowy","color.yellow":"\u017B\xF3\u0142ty","color.lime":"Limetkowy","color.green":"Zielony","color.teal":"Turkusowy","color.cyan":"Cyjan","color.blue":"Niebieski","color.indigo":"Indygo","color.purple":"Fioletowy","color.magenta":"Magenta","color.black":"Czarny","color.dark-grey":"Ciemnoszary","color.grey":"Szary","color.light-grey":"Jasnoszary","color.white":"Bia\u0142y"},pt:{"keyboard.tooltip.symbols":"S\xEDmbolos","keyboard.tooltip.greek":"Letras gregas","keyboard.tooltip.numeric":"Num\xE9rico","keyboard.tooltip.alphabetic":"Letras romanas","tooltip.copy to clipboard":"Copiar para \xE1rea de transfer\xEAncia","tooltip.redo":"Refazer","tooltip.toggle virtual keyboard":"Alternar teclado virtual","tooltip.undo":"Desfazer","menu.insert matrix":"Inserir Matriz","menu.borders":"Delimitadores de matriz","menu.array.add row above":"Adicionar linha depois","menu.array.add row below":"Adicionar linha antes","menu.array.add column after":"Adicionar coluna depois","menu.array.add column before":"Adicionar coluna antes","menu.array.delete row":"Excluir linha","menu.array.delete rows":"Excluir linhas selecionadas","menu.array.delete column":"Apagar Coluna","menu.array.delete columns":"Excluir Colunas Selecionadas","menu.mode":"Modo","menu.mode-math":"F\xF3rmula","menu.mode-text":"Texto","menu.mode-latex":"LaTeX","tooltip.blackboard":"Quadro Negro","tooltip.bold":"Negrito","tooltip.italic":"It\xE1lico","tooltip.fraktur":"Fraktur","tooltip.script":"Script","tooltip.caligraphic":"Caligr\xE1fico","tooltip.typewriter":"M\xE1quina de Escrever","tooltip.roman-upright":"Romano Vertical","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"Estilo da Fonte","menu.accent":"Acento","menu.decoration":"Decora\xE7\xE3o","menu.color":"Cor","menu.background-color":"Cor de Fundo","menu.evaluate":"Avaliar","menu.simplify":"Simplificar","menu.solve":"Resolver","menu.solve-for":"Resolver para %@","menu.cut":"Recortar","menu.copy":"Copiar","menu.copy-as-latex":"Copiar como LaTeX","menu.copy-as-ascii-math":"Copiar como ASCII Math","menu.copy-as-mathml":"Copiar como MathML","menu.paste":"Colar","menu.select-all":"Selecionar Tudo","color.red":"Vermelho","color.orange":"Laranja","color.yellow":"Amarelo","color.lime":"Verde Lima","color.green":"Verde","color.teal":"Verde-azulado","color.cyan":"Ciano","color.blue":"Azul","color.indigo":"\xCDndigo","color.purple":"Roxo","color.magenta":"Magenta","color.black":"Preto","color.dark-grey":"Cinza Escuro","color.grey":"Cinza","color.light-grey":"Cinza Claro","color.white":"Branco"},uk:{"keyboard.tooltip.symbols":"\u0421\u0438\u043C\u0432\u043E\u043B\u0438","keyboard.tooltip.greek":"\u0413\u0440\u0435\u0446\u044C\u043A\u0456 \u043B\u0456\u0442\u0435\u0440\u0438","keyboard.tooltip.numeric":"\u0427\u0438\u0441\u043B\u043E\u0432\u0438\u0439","keyboard.tooltip.alphabetic":"\u0420\u0438\u043C\u0441\u044C\u043A\u0456 \u043B\u0456\u0442\u0435\u0440\u0438","tooltip.copy to clipboard":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0456\u043D\u0443","tooltip.cut to clipboard":"\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438 \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0456\u043D\u0443","tooltip.paste from clipboard":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0437 \u0431\u0443\u0444\u0435\u0440\u0430 \u043E\u0431\u043C\u0456\u043D\u0443","tooltip.redo":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438","tooltip.toggle virtual keyboard":"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u0438 \u0432\u0456\u0440\u0442\u0443\u0430\u043B\u044C\u043D\u0443 \u043A\u043B\u0430\u0432\u0456\u0430\u0442\u0443\u0440\u0443","tooltip.menu":"\u041C\u0435\u043D\u044E","tooltip.undo":"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438","menu.borders":"\u041C\u0435\u0436\u0456","menu.insert matrix":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043C\u0430\u0442\u0440\u0438\u0446\u044E","menu.array.add row above":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0440\u044F\u0434\u043E\u043A \u043F\u0435\u0440\u0435\u0434","menu.array.add row below":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0440\u044F\u0434\u043E\u043A \u043F\u0456\u0441\u043B\u044F","menu.array.add column after":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0441\u0442\u043E\u0432\u043F\u0435\u0446\u044C \u043F\u0456\u0441\u043B\u044F","menu.array.add column before":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0441\u0442\u043E\u0432\u043F\u0435\u0446\u044C \u043F\u0435\u0440\u0435\u0434","menu.array.delete row":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0440\u044F\u0434\u043E\u043A","menu.array.delete rows":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043D\u0456 \u0440\u044F\u0434\u043A\u0438","menu.array.delete column":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0441\u0442\u043E\u0432\u043F\u0435\u0446\u044C","menu.array.delete columns":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043D\u0456 \u0441\u0442\u043E\u0432\u043F\u0446\u0456","menu.mode":"\u0420\u0435\u0436\u0438\u043C","menu.mode-math":"\u041C\u0430\u0442\u0435\u043C\u0430\u0442\u0438\u043A\u0430","menu.mode-text":"\u0422\u0435\u043A\u0441\u0442","menu.mode-latex":"LaTeX","menu.insert":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438","menu.insert.abs":"\u0410\u0431\u0441\u043E\u043B\u044E\u0442\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F","menu.insert.abs-template":"\\left|x\\right|","menu.insert.nth-root":"\u041A\u043E\u0440\u0456\u043D\u044C n-\u0433\u043E \u0441\u0442\u0435\u043F\u0435\u043D\u044F","menu.insert.nth-root-template":"\\sqrt[n]{x}","menu.insert.log-base":"\u041B\u043E\u0433\u0430\u0440\u0438\u0444\u043C \u0437\u0430 \u043E\u0441\u043D\u043E\u0432\u043E\u044E a","menu.insert.log-base-template":"\\log_a(x)","menu.insert.heading-calculus":"\u041E\u0431\u0447\u0438\u0441\u043B\u0435\u043D\u043D\u044F","menu.insert.derivative":"\u041F\u043E\u0445\u0456\u0434\u043D\u0430","menu.insert.derivative-template":"\\dfrac{\\mathrm{d}}{\\mathrm{d}x}f(x)\\bigm|_{x=a}","menu.insert.nth-derivative":"\u041F\u043E\u0445\u0456\u0434\u043D\u0430 n-\u0433\u043E \u043F\u043E\u0440\u044F\u0434\u043A\u0443","menu.insert.nth-derivative-template":"\\dfrac{\\mathrm{d}^n}{\\mathrm{d}x^n}f(x)\\bigm|_{x=a}","menu.insert.integral":"\u0406\u043D\u0442\u0435\u0433\u0440\u0430\u043B","menu.insert.integral-template":"$\\int_a^b f(x)\\,\\mathrm{d}x$","menu.insert.sum":"\u0421\u0443\u043C\u0430","menu.insert.sum-template":"$\\sum_{i=1}^n x_i$","menu.insert.product":"\u0414\u043E\u0431\u0443\u0442\u043E\u043A","menu.insert.product-template":"\\prod_{i=1}^n x_i","menu.insert.heading-complex-numbers":"\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0456 \u0447\u0438\u0441\u043B\u0430","menu.insert.modulus":"\u041C\u043E\u0434\u0443\u043B\u044C","menu.insert.modulus-template":"\\lvert z \\rvert","menu.insert.argument":"\u0410\u0440\u0433\u0443\u043C\u0435\u043D\u0442","menu.insert.argument-template":"\\arg(z)","menu.insert.real-part":"\u0414\u0456\u0439\u0441\u043D\u0430 \u0447\u0430\u0441\u0442\u0438\u043D\u0430","menu.insert.real-part-template":"\\Re(z)","menu.insert.imaginary-part":"\u0423\u044F\u0432\u043D\u0430 \u0447\u0430\u0441\u0442\u0438\u043D\u0430","menu.insert.imaginary-part-template":"\\Im(z)","menu.insert.conjugate":"\u0421\u043F\u0440\u044F\u0436\u0435\u043D\u0435 \u0447\u0438\u0441\u043B\u043E","menu.insert.conjugate-template":"\\overline{z}","tooltip.blackboard":"\u0414\u043E\u0448\u043A\u0430","tooltip.bold":"\u0416\u0438\u0440\u043D\u0438\u0439","tooltip.italic":"\u041A\u0443\u0440\u0441\u0438\u0432","tooltip.fraktur":"\u0424\u0440\u0430\u043A\u0442\u0443\u0440\u043D\u0438\u0439","tooltip.script":"\u0420\u0443\u043A\u043E\u043F\u0438\u0441\u043D\u0438\u0439","tooltip.caligraphic":"\u041A\u0430\u043B\u0456\u0433\u0440\u0430\u0444\u0456\u0447\u043D\u0438\u0439","tooltip.typewriter":"\u0414\u0440\u0443\u043A\u0430\u0440\u0441\u044C\u043A\u0438\u0439","tooltip.roman-upright":"\u041F\u0440\u044F\u043C\u0438\u0439 \u0440\u0438\u043C\u0441\u044C\u043A\u0438\u0439","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u0421\u0442\u0438\u043B\u044C \u0448\u0440\u0438\u0444\u0442\u0443","menu.accent":"\u0410\u043A\u0446\u0435\u043D\u0442","menu.decoration":"\u041E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u043D\u044F","menu.color":"\u041A\u043E\u043B\u0456\u0440","menu.background-color":"\u0424\u043E\u043D","menu.evaluate":"\u041E\u0431\u0447\u0438\u0441\u043B\u0438\u0442\u0438","menu.simplify":"\u0421\u043F\u0440\u043E\u0441\u0442\u0438\u0442\u0438","menu.solve":"\u0420\u043E\u0437\u0432\u2019\u044F\u0437\u0430\u0442\u0438","menu.solve-for":"\u0420\u043E\u0437\u0432\u2019\u044F\u0437\u0430\u0442\u0438 \u0434\u043B\u044F %@","menu.cut":"\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438","menu.copy":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438","menu.copy-as-latex":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u044F\u043A LaTeX","menu.copy-as-ascii-math":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u044F\u043A ASCII Math","menu.copy-as-mathml":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u044F\u043A MathML","menu.paste":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438","menu.select-all":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u0432\u0441\u0435","color.red":"\u0427\u0435\u0440\u0432\u043E\u043D\u0438\u0439","color.orange":"\u041F\u043E\u043C\u0430\u0440\u0430\u043D\u0447\u0435\u0432\u0438\u0439","color.yellow":"\u0416\u043E\u0432\u0442\u0438\u0439","color.lime":"\u041B\u0430\u0439\u043C\u043E\u0432\u0438\u0439","color.green":"\u0417\u0435\u043B\u0435\u043D\u0438\u0439","color.teal":"\u0411\u0456\u0440\u044E\u0437\u043E\u0432\u0438\u0439","color.cyan":"\u0421\u0438\u043D\u044C\u043E-\u0437\u0435\u043B\u0435\u043D\u0438\u0439","color.blue":"\u0421\u0438\u043D\u0456\u0439","color.indigo":"\u0406\u043D\u0434\u0438\u0433\u043E","color.purple":"\u0424\u0456\u043E\u043B\u0435\u0442\u043E\u0432\u0438\u0439","color.magenta":"\u041F\u0443\u0440\u043F\u0443\u0440\u043D\u0438\u0439","color.black":"\u0427\u043E\u0440\u043D\u0438\u0439","color.dark-grey":"\u0422\u0435\u043C\u043D\u043E-\u0441\u0456\u0440\u0438\u0439","color.grey":"\u0421\u0456\u0440\u0438\u0439","color.light-grey":"\u0421\u0432\u0456\u0442\u043B\u043E-\u0441\u0456\u0440\u0438\u0439","color.white":"\u0411\u0456\u043B\u0438\u0439"},"zh-cn":{"keyboard.tooltip.symbols":"\u7B26\u53F7","keyboard.tooltip.greek":"\u5E0C\u814A\u5B57\u6BCD","keyboard.tooltip.numeric":"\u6570\u5B57","keyboard.tooltip.alphabetic":"\u7F57\u9A6C\u5B57\u6BCD","tooltip.copy to clipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","tooltip.redo":"\u91CD\u505A","tooltip.toggle virtual keyboard":"\u5207\u6362\u865A\u62DF\u952E\u76D8","tooltip.undo":"\u64A4\u6D88","menu.insert matrix":"\u63D2\u5165\u77E9\u9635","menu.borders":"\u77E9\u9635\u5206\u9694\u7B26","menu.array.add row above":"\u5728\u540E\u9762\u6DFB\u52A0\u884C","menu.array.add row below":"\u5728\u524D\u9762\u6DFB\u52A0\u884C","menu.array.add column after":"\u5728\u540E\u9762\u6DFB\u52A0\u5217r","menu.array.add column before":"\u5728\u524D\u9762\u6DFB\u52A0\u5217","menu.array.delete row":"\u5220\u9664\u884C","menu.array.delete rows":"\u5220\u9664\u9009\u5B9A\u884C","menu.array.delete column":"\u5220\u9664\u5217","menu.array.delete columns":"\u5220\u9664\u9009\u5B9A\u7684\u5217","menu.mode":"\u6A21\u5F0F","menu.mode-math":"\u6570\u5B66","menu.mode-text":"\u6587\u672C","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u9ED1\u677F","tooltip.bold":"\u7C97\u4F53","tooltip.italic":"\u659C\u4F53","tooltip.fraktur":"Fraktur","tooltip.script":"\u811A\u672C","tooltip.caligraphic":"\u8349\u4E66","tooltip.typewriter":"\u6253\u5B57\u673A","tooltip.roman-upright":"\u7F57\u9A6C\u76F4\u7ACB","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u5B57\u4F53\u6837\u5F0F","menu.accent":"\u91CD\u97F3","menu.decoration":"\u88C5\u9970","menu.color":"\u989C\u8272","menu.background-color":"\u80CC\u666F","menu.evaluate":"\u8BA1\u7B97","menu.simplify":"\u7B80\u5316","menu.solve":"\u6C42\u89E3","menu.solve-for":"\u6C42\u89E3 %@","menu.cut":"\u526A\u5207","menu.copy":"\u590D\u5236","menu.copy-as-latex":"\u590D\u5236\u4E3A LaTeX","menu.copy-as-ascii-math":"\u590D\u5236\u4E3A ASCII Math","menu.copy-as-mathml":"\u590D\u5236\u4E3A MathML","menu.paste":"\u7C98\u8D34","menu.select-all":"\u5168\u9009","color.red":"\u7EA2\u8272","color.orange":"\u6A59\u8272","color.yellow":"\u9EC4\u8272","color.lime":"\u7EFF\u9EC4\u8272","color.green":"\u7EFF\u8272","color.teal":"\u9752\u8272","color.cyan":"\u84DD\u7EFF\u8272","color.blue":"\u84DD\u8272","color.indigo":"\u975B\u84DD\u8272","color.purple":"\u7D2B\u8272","color.magenta":"\u6D0B\u7EA2\u8272","color.black":"\u9ED1\u8272","color.dark-grey":"\u6DF1\u7070\u8272","color.grey":"\u7070\u8272","color.light-grey":"\u6D45\u7070\u8272","color.white":"\u767D\u8272"},"zh-tw":{"keyboard.tooltip.symbols":"\u7B26\u865F","keyboard.tooltip.greek":"\u5E0C\u81D8\u5B57\u6BCD","keyboard.tooltip.numeric":"\u6578\u5B57","keyboard.tooltip.alphabetic":"\u7F85\u99AC\u5B57\u6BCD","tooltip.copy to clipboard":"\u8907\u88FD\u5230\u526A\u8CBC\u677F","tooltip.redo":"\u91CD\u505A","tooltip.toggle virtual keyboard":"\u5207\u63DB\u865B\u64EC\u9375\u76E4","tooltip.undo":"\u64A4\u6D88","menu.insert matrix":"\u63D2\u5165\u77E9\u9663","menu.borders":"\u77E9\u9663\u5206\u9694\u7B26","menu.array.add row above":"\u5728\u5F8C\u9762\u6DFB\u52A0\u884C","menu.array.add row below":"\u5728\u524D\u9762\u6DFB\u52A0\u884C","menu.array.add column after":"\u5728\u5F8C\u9762\u6DFB\u52A0\u5217","menu.array.add column before":"\u5728\u524D\u9762\u6DFB\u52A0\u5217","menu.array.delete row":"\u522A\u9664\u884C","menu.array.delete rows":"\u522A\u9664\u9078\u5B9A\u884C","menu.array.delete column":"\u522A\u9664\u5217","menu.array.delete columns":"\u522A\u9664\u9078\u5B9A\u7684\u5217","menu.mode":"\u6A21\u5F0F","menu.mode-math":"\u6578\u5B78","menu.mode-text":"\u6587\u672C","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u9ED1\u677F","tooltip.bold":"\u7C97\u9AD4","tooltip.italic":"\u659C\u9AD4","tooltip.fraktur":"Fraktur","tooltip.script":"\u8173\u672C","tooltip.caligraphic":"\u8349\u66F8","tooltip.typewriter":"\u6253\u5B57\u6A5F","tooltip.roman-upright":"\u7F85\u99AC\u76F4\u7ACB","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u5B57\u9AD4\u6A23\u5F0F","menu.accent":"\u91CD\u97F3","menu.decoration":"\u88DD\u98FE","menu.color":"\u984F\u8272","menu.background-color":"\u80CC\u666F","menu.evaluate":"\u8A08\u7B97","menu.simplify":"\u7C21\u5316","menu.solve":"\u6C42\u89E3","menu.solve-for":"\u6C42\u89E3 %@","menu.cut":"\u526A\u4E0B","menu.copy":"\u8907\u88FD","menu.copy-as-latex":"\u8907\u88FD\u70BA LaTeX","menu.copy-as-ascii-math":"\u8907\u88FD\u70BA ASCII Math","menu.copy-as-mathml":"\u8907\u88FD\u70BA MathML","menu.paste":"\u8CBC\u4E0A","menu.select-all":"\u5168\u9078","color.red":"\u7D05\u8272","color.orange":"\u6A59\u8272","color.yellow":"\u9EC3\u8272","color.lime":"\u7DA0\u9EC3\u8272","color.green":"\u7DA0\u8272","color.teal":"\u9752\u8272","color.cyan":"\u85CD\u7DA0\u8272","color.blue":"\u85CD\u8272","color.indigo":"\u975B\u85CD\u8272","color.purple":"\u7D2B\u8272","color.magenta":"\u6D0B\u7D05\u8272","color.black":"\u9ED1\u8272","color.dark-grey":"\u6DF1\u7070\u8272","color.grey":"\u7070\u8272","color.light-grey":"\u6DFA\u7070\u8272","color.white":"\u767D\u8272"}},Fi={strings:SDe,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return Fi._locale||(Fi._locale=sl()?navigator.language.slice(0,5):"en-US"),Fi._locale},set locale(e){Fi._locale=e,Fi._numberFormatter=void 0,Fi.dirty=!0},get numberFormatter(){if(!Fi._numberFormatter)try{Fi._numberFormatter=new Intl.NumberFormat(Fi.locale)}catch{try{Fi._numberFormatter=new Intl.NumberFormat(Fi.locale.slice(0,2))}catch{Fi._numberFormatter=new Intl.NumberFormat("en-US")}}return Fi._numberFormatter},merge(e,t){if(typeof e=="string"&&t)Fi.strings[e]=Xt(Xt({},Fi.strings[e]),t),Fi.dirty=!0;else for(let r of Object.keys(e))Fi.merge(r,e[r])},get dirty(){return Fi._dirty},set dirty(e){Fi._dirty||Fi._dirty===e||(Fi._dirty=!0,setTimeout(()=>{Fi._dirty=!1,this._subscribers.forEach(t=>t?.())},0))},subscribe(e){return Fi._subscribers.push(e),Fi._subscribers.length-1},unsubscribe(e){e<0||e>=Fi._subscribers.length||(Fi._subscribers[e]=void 0)},update(e){let t=e.querySelectorAll("[data-l10n-tooltip]");for(let r of t){let n=r.getAttribute("data-l10n-tooltip");if(n){let a=vi(n);a&&r.setAttribute("data-tooltip",a)}}t=e.querySelectorAll("[data-l10n-arial-label]");for(let r of t){let n=r.getAttribute("data-l10n-arial-label");if(n){let a=vi(n);a&&r.setAttribute("aria-label",a)}}}};LDe={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},wDe={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},$m={red:"#fbbbb6",orange:"#ffe0c2",yellow:"#fff1c2",lime:"#d0e8b9",green:"#bceac4",teal:"#b9f1f1",cyan:"#b8e5c9",blue:"#b6d9fb",indigo:"#d1c2f0",purple:"#e3baf8",magenta:"#f9c8e0",black:"#353535","dark-grey":"#8C8C8C",grey:"#D0D0D0","light-grey":"#F0F0F0",white:"#ffffff"},tp={red:"#d7170b",orange:"#fe8a2b",yellow:"#ffc02b",lime:"#63b215",green:"#21ba3a",teal:"#17cfcf",cyan:"#13a7ec",blue:"#0d80f2",indigo:"#63c",purple:"#a219e6",magenta:"#eb4799",black:"#000","dark-grey":"#666",grey:"#A6A6A6","light-grey":"#d4d5d2",white:"#ffffff"},QLt={Red:"red",Orange:"orange",Yellow:"yellow",LimeGreen:"lime",Green:"green",TealBlue:"teal",Blue:"blue",Violet:"indigo",Purple:"purple",Magenta:"magenta",Black:"black",Gray:"grey",White:"white"},UDe={Apricot:"#FBB982",Aquamarine:"#00B5BE",Bittersweet:"#C04F17",Black:"#221E1F",Blue:"#2D2F92",BlueGreen:"#00B3B8",BlueViolet:"#473992",BrickRed:"#B6321C",Brown:"#792500",BurntOrange:"#F7921D",CadetBlue:"#74729A",CarnationPink:"#F282B4",Cerulean:"#00A2E3",CornflowerBlue:"#41B0E4",Cyan:"#00AEEF",Dandelion:"#FDBC42",DarkOrchid:"#A4538A",Emerald:"#00A99D",ForestGreen:"#009B55",Fuchsia:"#8C368C",Goldenrod:"#FFDF42",Gray:"#949698",Green:"#00A64F",GreenYellow:"#DFE674",JungleGreen:"#00A99A",Lavender:"#F49EC4",Limegreen:"#8DC73E",Magenta:"#EC008C",Mahogany:"#A9341F",Maroon:"#AF3235",Melon:"#F89E7B",MidnightBlue:"#006795",Mulberry:"#A93C93",NavyBlue:"#006EB8",OliveGreen:"#3C8031",Orange:"#F58137",OrangeRed:"#ED135A",Orchid:"#AF72B0",Peach:"#F7965A",Periwinkle:"#7977B8",PineGreen:"#008B72",Plum:"#92268F",ProcessBlue:"#00B0F0",Purple:"#99479B",RawSienna:"#974006",Red:"#ED1B23",RedOrange:"#F26035",RedViolet:"#A1246B",Rhodamine:"#EF559F",RoyalBlue:"#0071BC",RoyalPurple:"#613F99",RubineRed:"#ED017D",Salmon:"#F69289",SeaGreen:"#3FBC9D",Sepia:"#671800",SkyBlue:"#46C5DD",SpringGreen:"#C6DC67",Tan:"#DA9D76",TealBlue:"#00AEB3",Thistle:"#D883B7",Turquoise:"#00B4CE",Violet:"#58429B",VioletRed:"#EF58A0",White:"#FFFFFF",WildStrawberry:"#EE2967",Yellow:"#FFF200",YellowGreen:"#98CC70",YellowOrange:"#FAA21A"};TLt={60:"\\lt",62:"\\gt",111:"o",38:"\\&",123:"\\lbrace",125:"\\rbrace",91:"\\lbrack",93:"\\rbrack",58:"\\colon",160:"~",172:"\\neg",183:"\\cdot",188:"\\frac{1}{4}",189:"\\frac{1}{2}",190:"\\frac{3}{4}",8304:"^{0}",8305:"^{i}",185:"^{1}",178:"^{2}",179:"^{3}",8224:"\\dagger",8225:"\\ddagger",8230:"\\ldots",8308:"^{4}",8309:"^{5}",8310:"^{6}",8311:"^{7}",8312:"^{8}",8313:"^{9}",8314:"^{+}",8315:"^{-}",8316:"^{=}",8319:"^{n}",8320:"_{0}",8321:"_{1}",8322:"_{2}",8323:"_{3}",8324:"_{4}",8325:"_{5}",8326:"_{6}",8327:"_{7}",8328:"_{8}",8329:"_{9}",8330:"_{+}",8331:"_{-}",8332:"_{=}",8336:"_{a}",8337:"_{e}",8338:"_{o}",8339:"_{x}",8242:"\\prime",39:"\\prime",8592:"\\gets",8594:"\\to",9651:"\\triangle",9661:"\\triangledown",8715:"\\owns",8727:"\\ast",8739:"\\vert",8741:"\\Vert",8743:"\\land",8744:"\\lor",8901:"\\cdot",8904:"\\bowtie",8800:"\\ne",8804:"\\le",8805:"\\ge",8869:"\\bot",10178:"\\perp",10231:"\\biconditional",10232:"\\impliedby",10233:"\\implies",10234:"\\iff",8450:"\\mathbb{C}",8469:"\\mathbb{N}",8473:"\\mathbb{P}",8474:"\\mathbb{Q}",8477:"\\mathbb{R}",8484:"\\mathbb{Z}",8461:"\\mathbb{H}",8476:"\\Re",8465:"\\Im",42:"\\ast",11036:"\\square",9633:"\\square",8720:"\\coprod",8716:"\\not\\ni",9671:"\\diamond",8846:"\\uplus",8851:"\\sqcap",8852:"\\sqcup",8768:"\\wr",8750:"\\oint",8226:"\\textbullet",8722:"-",978:"\\Upsilon"},L9={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},JLt=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120782,len:10,offset:48,variant:"main",style:"bold"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120822,len:10,offset:48,variant:"monospace"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"}];C1={},iV=Xt({},TLt),u0={},p_={},HDe={darr:"\\downarrow",dArr:"\\Downarrow",Darr:"\\Downarrow",lang:"\\langle",rang:"\\rangle",uarr:"\\uparrow",uArr:"\\Uparrow",Uarr:"\\Uparrow",C:"\\mathbb{C}",H:"\\mathbb{H}",N:"\\mathbb{N}",Q:"\\mathbb{Q}",R:"\\mathbb{R}",Z:"\\mathbb{Z}",alef:"\\aleph",alefsym:"\\aleph",Alpha:"\\mathrm{A}",Beta:"\\mathrm{B}",bull:"\\bullet",Chi:"\\mathrm{X}",clubs:"\\clubsuit",cnums:"\\mathbb{C}",Complex:"\\mathbb{C}",Dagger:"\\ddagger",diamonds:"\\diamondsuit",doublecap:"\\Cap",doublecup:"\\Cup",empty:"\\emptyset",Epsilon:"\\mathrm{E}",Eta:"\\mathrm{H}",exist:"\\exists",hArr:"\\Leftrightarrow",harr:"\\leftrightarrow",Harr:"\\Leftrightarrow",hearts:"\\heartsuit",image:"\\Im",infin:"\\infty",Iota:"\\mathrm{I}",isin:"\\in",Kappa:"\\mathrm{K}",larr:"\\leftarrow",Larr:"\\Leftarrow",lArr:"\\Leftarrow",lrarr:"\\leftrightarrow",Lrarr:"\\Leftrightarrow",lrArr:"\\Leftrightarrow",Mu:"\\mathrm{M}",natnums:"\\mathbb{N}",Nu:"\\mathrm{N}",Omicron:"\\mathrm{O}",part:"\\partial",plusmn:"\\pm",rarr:"\\rightarrow",Rarr:"\\Rightarrow",rArr:"\\Rightarrow",real:"\\Re",reals:"\\mathbb{R}",Reals:"\\mathbb{R}",restriction:"\\upharpoonright",Rho:"\\mathrm{P}",sdot:"\\cdot",sect:"\\S",spades:"\\spadesuit",sub:"\\subset",sube:"\\subseteq",supe:"\\supseteq",Tau:"\\mathrm{T}",thetasym:"\\vartheta",varcoppa:"\\coppa",weierp:"\\wp",Zeta:"\\mathrm{Z}"},_De={varGamma:"\\mathit{\\Gamma}",varDelta:"\\mathit{\\Delta}",varTheta:"\\mathit{\\Theta}",varLambda:"\\mathit{\\Lambda}",varXi:"\\mathit{\\Xi}",varPi:"\\mathit{\\Pi}",varSigma:"\\mathit{\\Sigma}",varUpsilon:"\\mathit{\\Upsilon}",varPhi:"\\mathit{\\Phi}",varPsi:"\\mathit{\\Psi}",varOmega:"\\mathit{\\Omega}",pmod:{def:"\\quad(\\operatorname{mod}\\ #1)",args:1,expand:!1,captureSelection:!1},mod:{def:"\\quad\\operatorname{mod}\\,\\,#1",args:1,expand:!1},bmod:{def:"\\;\\mathbin{\\operatorname{mod }}",expand:!1}},jDe={bra:{def:"\\mathinner{\\langle{#1}|}",args:1,captureSelection:!1},ket:{def:"\\mathinner{|{#1}\\rangle}",args:1,captureSelection:!1},braket:{def:"\\mathinner{\\langle{#1}\\rangle}",args:1,captureSelection:!1},set:{def:"\\mathinner{\\lbrace #1 \\rbrace}",args:1,captureSelection:!1},Bra:{def:"\\left\\langle #1\\right|",args:1,captureSelection:!1},Ket:{def:"\\left|#1\\right\\rangle",args:1,captureSelection:!1},Braket:{def:"\\left\\langle{#1}\\right\\rangle",args:1,captureSelection:!1},Set:{def:"\\left\\lbrace #1 \\right\\rbrace",args:1,captureSelection:!1}},zDe={strut:{primitive:!0,def:"\\phantom{\\rule[0.3\\baselineskip]{0}{0.7\\baselineskip}}",args:0,captureSelection:!0},iff:{primitive:!0,captureSelection:!0,def:"\\;\\Longleftrightarrow\\;"},nicefrac:"^{#1}\\!\\!/\\!_{#2}",phase:{def:"\\enclose{phasorangle}{#1}",args:1,captureSelection:!1},rd:"\\mathrm{d}",rD:"\\mathrm{D}",odif:"\\mathrm{d}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}",mathstrut:{def:"\\vphantom{(}",primitive:!0},angl:"\\enclose{actuarial}{#1}",angln:"\\enclose{actuarial}{n}",anglr:"\\enclose{actuarial}{r}",anglk:"\\enclose{actuarial}{k}",mathtools:{primitive:!0,package:{ordinarycolon:":",vcentcolon:"\\mathrel{\\mathop\\ordinarycolon}",dblcolon:'{\\mathop{\\char"2237}}',coloneqq:'{\\mathop{\\char"2254}}',Coloneqq:'{\\mathop{\\char"2A74}}',coloneq:'{\\mathop{\\char"2254}}',Coloneq:'{\\mathop{\\char"2A74}}',eqqcolon:'{\\mathop{\\char"2255}}',Eqqcolon:'{\\mathop{\\char"3D\\char"2237}}',eqcolon:'{\\mathop{\\char"2255}}',Eqcolon:'{\\mathop{\\char"3D\\char"2237}}',colonapprox:'{\\mathop{\\char"003A\\char"2248}}',Colonapprox:'{\\mathop{\\char"2237\\char"2248}}',colonsim:'{\\mathop{\\char"3A\\char"223C}}',Colonsim:'{\\mathop{\\char"2237\\char"223C}}',colondash:"\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",Colondash:"\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}"}},ratio:"\\vcentcolon",coloncolon:"\\dblcolon",colonequals:"\\coloneq",coloncolonequals:"\\Coloneq",equalscolon:"\\eqcolon",equalscoloncolon:"\\Eqcolon",colonminus:"\\colondash",coloncolonminus:"\\Colondash",minuscolon:"\\dashcolon",minuscoloncolon:"\\Dashcolon",coloncolonapprox:"\\Colonapprox",coloncolonsim:"\\Colonsim",simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",simcoloncolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcoloncolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",notni:"\\mathrel{\\char`\u220C}",limsup:"\\operatorname*{lim\\,sup}",liminf:"\\operatorname*{lim\\,inf}",injlim:"\\operatorname*{inj\\,lim}",projlim:"\\operatorname*{proj\\,lim}",varlimsup:"\\operatorname*{\\overline{lim}}",varliminf:"\\operatorname*{\\underline{lim}}",varinjlim:"\\operatorname*{\\underrightarrow{lim}}",varprojlim:"\\operatorname*{\\underleftarrow{lim}}",argmin:"\\operatorname*{arg\\,min}",argmax:"\\operatorname*{arg\\,max}",plim:"\\mathop{\\operatorname{plim}}\\limits",tripledash:{def:"\\vphantom{-}\\raise{4mu}{\\mkern1.5mu\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2mu}}",expand:!0},"braket.sty":{package:jDe},"amsmath.sty":{package:_De,primitive:!0},"texvc.sty":{package:HDe,primitive:!1}},a0={" ":32,"\\!":33,"\\#":35,"\\$":36,"\\%":37,"\\&":38,"\\_":95,"-":45,"\\textunderscore":95,"\\euro":8364,"\\maltese":10016,"\\{":123,"\\}":125,"\\textbraceleft":123,"\\textbraceright":125,"\\lbrace":123,"\\rbrace":125,"\\lbrack":91,"\\rbrack":93,"\\nobreakspace":160,"\\ldots":8230,"\\textellipsis":8230,"\\backslash":92,"`":8216,"'":8217,"``":8220,"''":8221,"\\degree":176,"\\textasciicircum":94,"\\textasciitilde":126,"\\textasteriskcentered":42,"\\textbackslash":92,"\\textbullet":8226,"\\textdollar":36,"\\textsterling":163,"\\textdagger":8224,"\\textdaggerdbl":8225,"\u2013":8211,"\u2014":8212,"\u2018":8216,"\u2019":8217,"\u201C":8220,"\u201D":8221,'"':8221,"\\ss":223,"\\ae":230,"\\oe":339,"\\AE":198,"\\OE":338,"\\O":216,"\\i":305,"\\j":567,"\\aa":229,"\\AA":197},DDe=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/;bDe()?(U9=new RegExp("\\p{Letter}","u"),x1=new RegExp("[0-9\\p{Letter}]","u")):(U9=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,x1=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);il=[0,.68889,0,0,.72222],km=[0,.68889,0,0,.66667],S3=[0,.68889,0,0,.77778],SW=[0,.68889,0,0,.61111],zVt=[.16667,.68889,0,0,.77778],Oy=[0,.68889,0,0,.55556],hr=[0,0,0,0,.25],DVt=[0,.825,0,0,2.33334],MVt=[0,.9,0,0,2.33334],LW=[0,.68889,0,0,.54028],L3=[-.03598,.46402,0,0,.5],Ka=[-.13313,.36687,0,0,1],wW=[.01354,.52239,0,0,1],PVt=[.01354,.52239,0,0,1.11111],KVt=[0,.54986,0,0,1],UW=[0,.69224,0,0,.5],w3=[0,.43056,0,0,1],Cg=[.08198,.58198,0,0,.77778],YW=[.19444,.69224,0,0,.41667],EW=[.1808,.675,0,0,1],qVt=[.19444,.69224,0,0,.83334],$Vt=[.13667,.63667,0,0,1],t2t=[-.064,.437,0,0,1.334],xg=[.08167,.58167,0,0,.77778],Qy=[0,.69224,0,0,.72222],U3=[0,.69224,0,0,.66667],NW=[-.13313,.36687,0,0,.77778],e2t=[.06062,.54986,0,0,.77778],OW=[0,.69224,0,0,.77778],Nf=[.25583,.75583,0,0,.77778],Ec=[.25142,.75726,0,0,.77778],Of=[.20576,.70576,0,0,.77778],_l=[.30274,.79383,0,0,.77778],Ty=[.22958,.72958,0,0,.77778],i2t=[.1808,.675,0,0,.77778],Nc=[.13667,.63667,0,0,.77778],zo=[.13597,.63597,0,0,.77778],Zg=[.03517,.54986,0,0,.77778],Qf=[0,.675,0,0,.77778],r2t=[.19444,.69224,0,0,.61111],n2t=[0,.54986,0,0,.76042],a2t=[0,.54986,0,0,.66667],Rg=[.0391,.5391,0,0,.77778],o2t=[.03517,.54986,0,0,1.33334],s2t=[.38569,.88569,0,0,.77778],QW=[.23222,.74111,0,0,.77778],l2t=[.19444,.69224,0,0,.77778],c2t=[0,.37788,0,0,.5],TW=[0,.54986,0,0,.72222],d2t=[0,.69224,0,0,.83334],u2t=[.11111,.69224,0,0,.66667],Tf=[.26167,.75726,0,0,.77778],g2t=[.48256,.98256,0,0,.77778],h2t=[.28481,.79383,0,0,.77778],m2t=[.08167,.58167,0,0,.22222],p2t=[.08167,.58167,0,0,.38889],b2t=[0,.43056,.04028,0,.66667],f2t=[.41951,.91951,0,0,.77778],I2t=[.24982,.74947,0,0,.38865],v2t=[.08319,.58283,0,0,.75623],G2t=[0,.10803,0,0,.27764],Y3=[0,.47534,0,0,.50181],Jy=[.18906,.47534,0,0,.50181],y2t=[0,.69141,0,0,.50181],C2t=[.24982,.74947,0,0,.27764],E3=[0,.69141,0,0,.21471],JW=[.25,.75,0,0,.44722],rl=[0,.64444,0,0,.575],Jf=[.08556,.58556,0,0,.89444],HW=[0,.69444,0,0,.89444],_W=[0,.68611,0,0,.9],N3=[0,.68611,0,0,.86944],Ag=[.25,.75,0,0,.575],jW=[.25,.75,0,0,.31944],Sm=[0,.69444,0,0,.63889],Hf=[0,.69444,0,0,.31944],x2t=[0,.44444,0,0,.63889],Z2t=[0,.44444,0,0,.51111],Bg=[0,.69444,0,0,.575],jl=[.13333,.63333,0,0,.89444],R2t=[0,.44444,0,0,.31944],A2t=[0,.69444,0,0,.86944],B2t=[0,.68611,0,0,.69166],zW=[0,.68611,0,0,.83055],O3=[0,.68611,0,0,.89444],Q3=[0,.69444,0,0,.60278],X2t=[.19444,.69444,0,0,.51111],W2t=[0,.69444,0,0,.83055],Oc=[-.10889,.39111,0,0,1.14999],F2t=[.19444,.69444,0,0,.575],Hy=[.19444,.69444,0,0,1.14999],V2t=[.19444,.69444,0,0,.70277],k2t=[.05556,.75,0,0,.575],T3=[0,.68611,0,0,.95833],S2t=[.08556,.58556,0,0,.76666],J3=[-.02639,.47361,0,0,.575],L2t=[0,.44444,0,0,.89444],Lm=[0,.55556,0,0,.76666],w2t=[-.10889,.39111,0,0,.89444],H3=[.00222,.50222,0,0,.89444],Xg=[.19667,.69667,0,0,.89444],U2t=[.08556,.58556,0,0,1.14999],_3=[0,.69444,0,0,.70277],DW=[-.02778,.47222,0,0,.575],MW=[.25,.75,0,0,.51111],Y2t=[-.13889,.36111,0,0,1.14999],E2t=[.19444,.69444,0,0,1.02222],PW=[.12963,.69444,0,0,.89444],N2t=[.19444,.69444,0,0,.44722],Wg=[0,.64444,.13167,0,.59111],O2t=[.19444,.64444,.13167,0,.59111],j3=[0,.68611,.17208,0,.8961],Q2t=[.19444,.44444,.105,0,.53222],T2t=[0,.44444,.085,0,.82666],J2t=[0,.69444,.06709,0,.59111],KW=[0,.69444,.12945,0,.35555],H2t=[0,.69444,0,0,.94888],z3=[0,.69444,.11472,0,.59111],_2t=[0,.68611,.10778,0,.88555],j2t=[0,.69444,.07939,0,.62055],qW=[0,.69444,.12417,0,.30667],Fg=[0,.64444,.13556,0,.51111],z2t=[.19444,.64444,.13556,0,.51111],$W=[0,.68333,.16389,0,.74333],D2t=[.19444,.43056,.08847,0,.46],M2t=[0,.43056,.07514,0,.71555],P2t=[0,.69444,.06646,0,.51111],K2t=[0,.69444,0,0,.83129],q2t=[0,.69444,.1225,0,.51111],$2t=[0,.68333,.09403,0,.76666],tkt=[0,.68333,.11111,0,.76666],ekt=[0,.69444,.06961,0,.51444],Td=[0,.69444,0,0,.27778],_f=[.25,.75,0,0,.38889],nl=[0,.64444,0,0,.5],wm=[0,.69444,0,0,.77778],Um=[0,.68333,0,0,.75],_y=[0,.68333,0,0,.77778],ikt=[0,.68333,0,0,.68056],jy=[0,.68333,0,0,.72222],Jd=[.25,.75,0,0,.5],tF=[.25,.75,0,0,.27778],On=[0,.69444,0,0,.5],jf=[0,.69444,0,0,.55556],D3=[0,.43056,0,0,.44445],zy=[0,.43056,0,0,.5],rkt=[.19444,.43056,0,0,.55556],nkt=[0,.43056,0,0,.55556],al=[.08333,.58333,0,0,.77778],akt=[0,.43056,0,0,.27778],okt=[0,.66786,0,0,.27778],skt=[0,.69444,0,0,.75],lkt=[0,.66786,0,0,.5],ckt=[0,.68333,0,0,.625],M3=[.19444,.69444,0,0,.44445],Dy=[0,.69444,0,0,.72222],dkt=[.19444,.69444,0,0,.5],My=[.19444,.69444,0,0,1],ukt=[.011,.511,0,0,1.126],P3=[.19444,.69444,0,0,.61111],K3=[.05556,.75,0,0,.5],gkt=[0,.68333,0,0,.83334],hkt=[.0391,.5391,0,0,.66667],q3=[-.05555,.44445,0,0,.5],mkt=[0,.43056,0,0,.77778],Ym=[0,.55556,0,0,.66667],eF=[-.03625,.46375,0,0,.77778],pkt=[-.01688,.48312,0,0,.77778],bkt=[.0391,.5391,0,0,1],Vg=[0,.69444,0,0,.61111],iF=[-.03472,.46528,0,0,.5],rF=[.25,.75,0,0,.44445],fkt=[-.14236,.35764,0,0,1],nF=[.244,.744,0,0,.412],Ikt=[.19444,.69444,0,0,.88889],aF=[.12963,.69444,0,0,.77778],vkt=[.19444,.69444,0,0,.38889],Gkt=[.011,.511,0,0,1.638],ykt=[.19444,.69444,0,0,0],oF=[0,.44444,0,0,.575],Py=[.19444,.44444,0,0,.575],Ckt=[0,.68611,0,0,.75555],xkt=[0,.69444,0,0,.66759],Zkt=[0,.68611,0,0,.80555],Rkt=[0,.68611,.08229,0,.98229],Akt=[0,.68611,0,0,.76666],Bkt=[0,.44444,0,0,.58472],Xkt=[.19444,.44444,0,0,.6118],Ky=[.19444,.43056,0,0,.5],Wkt=[0,.68333,.02778,.08334,.76278],Fkt=[0,.68333,.08125,.05556,.83125],Vkt=[0,.43056,0,.05556,.48472],kkt=[.19444,.43056,0,.08334,.51702],Skt=[.25,.75,0,0,.42778],wa=[0,.69444,0,0,.55],Hd=[0,.69444,0,0,.73334],kg=[0,.69444,0,0,.79445],Lkt=[0,.69444,0,0,.51945],$3=[0,.69444,0,0,.70278],wkt=[0,.69444,0,0,.76389],Ukt=[.25,.75,0,0,.34306],t9=[0,.69444,0,0,.56111],Ykt=[0,.69444,0,0,.25556],Ekt=[.19444,.45833,0,0,.56111],Nkt=[0,.45833,0,0,.56111],sF=[0,.69444,0,0,.30556],Okt=[0,.69444,0,0,.58056],Qkt=[0,.69444,0,0,.67223],e9=[0,.69444,0,0,.85556],i9=[0,.69444,0,0,.55834],Qc=[0,.65556,.11156,0,.5],r9=[0,.69444,.08094,0,.70834],n9=[.17014,0,0,0,.44445],Tkt=[0,.69444,.0799,0,.5],Jkt=[0,.69444,0,0,.73752],Hkt=[0,.69444,.09205,0,.5],_kt=[0,.69444,.09031,0,.77778],a9=[0,.69444,.07816,0,.27778],jkt=[0,.69444,.00316,0,.5],zkt=[.19444,.69444,0,0,.83334],Dkt=[.05556,.75,0,0,.83334],Mkt=[0,.75,0,0,.5],Pkt=[.125,.08333,0,0,.27778],Kkt=[0,.08333,0,0,.27778],Tc=[0,.65556,0,0,.5],o9=[0,.69444,0,0,.47222],_d=[0,.69444,0,0,.66667],qkt=[0,.69444,0,0,.59722],s9=[0,.69444,0,0,.54167],l9=[0,.69444,0,0,.70834],$kt=[.25,.75,0,0,.28889],c9=[0,.69444,0,0,.51667],tSt=[0,.44444,0,0,.44445],eSt=[.19444,.44444,0,0,.51667],iSt=[0,.44444,0,0,.38333],rSt=[0,.44444,0,0,.51667],nSt=[0,.69444,0,0,.83334],aSt=[.35001,.85,0,0,.45834],oSt=[.35001,.85,0,0,.57778],sSt=[.35001,.85,0,0,.41667],lSt=[.35001,.85,0,0,.58334],lF=[0,.72222,0,0,.55556],cSt=[1e-5,.6,0,0,.66667],dSt=[1e-5,.6,0,0,.77778],uSt=[.25001,.75,0,0,.94445],gSt=[.306,.805,.19445,0,.47222],hSt=[.30612,.805,.19445,0,.47222],zf=[.25001,.75,0,0,.83334],Df=[.35001,.85,0,0,.47222],d9=[.25001,.75,0,0,1.11111],mSt=[.65002,1.15,0,0,.59722],pSt=[.65002,1.15,0,0,.81111],bSt=[.65002,1.15,0,0,.47222],fSt=[.65002,1.15,0,0,.66667],cF=[0,.75,0,0,1],ISt=[.55001,1.05,0,0,1.27778],vSt=[.862,1.36,.44445,0,.55556],GSt=[.86225,1.36,.44445,0,.55556],Mf=[.55001,1.05,0,0,1.11111],dF=[.65002,1.15,0,0,.52778],ySt=[.65002,1.15,0,0,.61111],u9=[.55001,1.05,0,0,1.51112],CSt=[.95003,1.45,0,0,.73611],xSt=[.95003,1.45,0,0,1.04445],ZSt=[.95003,1.45,0,0,.52778],uF=[.95003,1.45,0,0,.75],gF=[0,.75,0,0,1.44445],hF=[.95003,1.45,0,0,.58334],RSt=[1.25003,1.75,0,0,.79167],ASt=[1.25003,1.75,0,0,1.27778],BSt=[1.25003,1.75,0,0,.58334],mF=[1.25003,1.75,0,0,.80556],pF=[0,.825,0,0,1.8889],bF=[1.25003,1.75,0,0,.63889],fF=[.64502,1.155,0,0,.875],XSt=[1e-5,.6,0,0,.875],g9=[-99e-5,.601,0,0,.66667],IF=[.64502,1.155,0,0,.66667],WSt=[1e-5,.9,0,0,.88889],FSt=[.65002,1.15,0,0,.88889],VSt=[.90001,0,0,0,.88889],kSt=[-.00499,.605,0,0,1.05556],vF=[0,.12,0,0,.45],qe=[0,.61111,0,0,.525],zl=[.08333,.69444,0,0,.525],SSt=[-.08056,.53055,0,0,.525],LSt=[-.05556,.55556,0,0,.525],Go=[0,.43056,0,0,.525],qy=[.22222,.43056,0,0,.525],wSt=[0,0,0,0,.525],KDe={"AMS-Regular":{32:hr,65:il,66:km,67:il,68:il,69:km,70:SW,71:S3,72:S3,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:S3,76:km,77:[0,.68889,0,0,.94445],78:il,79:zVt,80:SW,81:zVt,82:il,83:Oy,84:km,85:il,86:il,87:[0,.68889,0,0,1],88:il,89:il,90:km,107:Oy,160:hr,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:Oy,295:LW,710:DVt,732:MVt,770:DVt,771:MVt,989:xg,1008:b2t,8245:[0,.54986,0,0,.275],8463:LW,8487:il,8498:Oy,8502:km,8503:[0,.68889,0,0,.44445],8504:km,8513:[0,.68889,0,0,.63889],8592:L3,8594:L3,8602:Ka,8603:Ka,8606:wW,8608:wW,8610:PVt,8611:PVt,8619:KVt,8620:KVt,8621:[-.13313,.37788,0,0,1.38889],8622:Ka,8624:UW,8625:UW,8630:w3,8631:w3,8634:Cg,8635:Cg,8638:YW,8639:YW,8642:YW,8643:YW,8644:EW,8646:EW,8647:EW,8648:qVt,8649:EW,8650:qVt,8651:wW,8652:wW,8653:Ka,8654:Ka,8655:Ka,8666:$Vt,8667:$Vt,8669:[-.13313,.37788,0,0,1],8672:t2t,8674:t2t,8705:[0,.825,0,0,.5],8708:Oy,8709:xg,8717:[0,.43056,0,0,.42917],8722:L3,8724:[.08198,.69224,0,0,.77778],8726:xg,8733:OW,8736:Qy,8737:Qy,8738:[.03517,.52239,0,0,.72222],8739:m2t,8740:[.25142,.74111,0,0,.27778],8741:p2t,8742:[.25142,.74111,0,0,.5],8756:U3,8757:U3,8764:NW,8765:[-.13313,.37788,0,0,.77778],8769:NW,8770:eF,8774:_l,8776:pkt,8778:xg,8782:e2t,8783:e2t,8785:Cg,8786:Cg,8787:Cg,8790:OW,8791:Ty,8796:[.08198,.91667,0,0,.77778],8806:Nf,8807:Nf,8808:Ec,8809:Ec,8812:[.25583,.75583,0,0,.5],8814:Of,8815:Of,8816:_l,8817:_l,8818:Ty,8819:Ty,8822:i2t,8823:i2t,8828:Nc,8829:Nc,8830:Ty,8831:Ty,8832:Of,8833:Of,8840:_l,8841:_l,8842:zo,8843:zo,8847:Zg,8848:Zg,8858:Cg,8859:Cg,8861:Cg,8862:Qf,8863:Qf,8864:Qf,8865:Qf,8872:[0,.69224,0,0,.61111],8873:Qy,8874:[0,.69224,0,0,.88889],8876:SW,8877:SW,8878:il,8879:il,8882:Zg,8883:Zg,8884:Nc,8885:Nc,8888:[0,.54986,0,0,1.11111],8890:rkt,8891:r2t,8892:r2t,8901:[0,.54986,0,0,.27778],8903:xg,8905:xg,8906:xg,8907:OW,8908:OW,8909:[-.03598,.46402,0,0,.77778],8910:n2t,8911:n2t,8912:Zg,8913:Zg,8914:a2t,8915:a2t,8916:U3,8918:Rg,8919:Rg,8920:o2t,8921:o2t,8922:s2t,8923:s2t,8926:Nc,8927:Nc,8928:_l,8929:_l,8934:QW,8935:QW,8936:QW,8937:QW,8938:Of,8939:Of,8940:_l,8941:_l,8994:l2t,8995:l2t,9416:[.15559,.69224,0,0,.90222],9484:UW,9488:UW,9492:c2t,9496:c2t,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:Qf,9633:Qf,9650:TW,9651:TW,9654:Zg,9660:TW,9661:TW,9664:Zg,9674:u2t,9733:[.19444,.69224,0,0,.94445],10003:d2t,10016:d2t,10731:u2t,10846:[.19444,.75583,0,0,.61111],10877:Nc,10878:Nc,10885:Nf,10886:Nf,10887:zo,10888:zo,10889:Tf,10890:Tf,10891:g2t,10892:g2t,10901:Nc,10902:Nc,10933:Ec,10934:Ec,10935:Tf,10936:Tf,10937:Tf,10938:Tf,10949:Nf,10950:Nf,10955:h2t,10956:h2t,57350:m2t,57351:p2t,57352:xg,57353:b2t,57356:Ec,57357:Ec,57358:f2t,57359:_l,57360:_l,57361:f2t,57366:Ec,57367:Ec,57368:Ec,57369:Ec,57370:zo,57371:zo},"Caligraphic-Regular":{32:hr,65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:hr},"Fraktur-Regular":{32:hr,33:[0,.69141,0,0,.29574],34:E3,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:I2t,41:I2t,42:[0,.62119,0,0,.27764],43:v2t,44:G2t,45:v2t,46:G2t,47:[.24982,.74947,0,0,.50181],48:Y3,49:Y3,50:Y3,51:Jy,52:Jy,53:Jy,54:y2t,55:Jy,56:y2t,57:Jy,58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:C2t,93:C2t,94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:hr,8216:E3,8217:E3,58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:hr,33:[0,.69444,0,0,.35],34:Q3,35:[.19444,.69444,0,0,.95833],36:k2t,37:[.05556,.75,0,0,.95833],38:HW,39:Hf,40:JW,41:JW,42:[0,.75,0,0,.575],43:jl,44:[.19444,.15556,0,0,.31944],45:iSt,46:[0,.15556,0,0,.31944],47:Ag,48:rl,49:rl,50:rl,51:rl,52:rl,53:rl,54:rl,55:rl,56:rl,57:rl,58:R2t,59:[.19444,.44444,0,0,.31944],60:Jf,61:w2t,62:Jf,63:[0,.69444,0,0,.54305],64:HW,65:N3,66:[0,.68611,0,0,.81805],67:zW,68:[0,.68611,0,0,.88194],69:Ckt,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:_W,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:B2t,77:[0,.68611,0,0,1.09166],78:_W,79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:N3,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:jW,92:Ag,93:jW,94:Bg,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:Sm,99:Z2t,100:Sm,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:Sm,105:Hf,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:Hf,109:[0,.44444,0,0,.95833],110:x2t,111:oF,112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:x2t,118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:Z2t,123:Ag,124:jW,125:Ag,126:[.35,.34444,0,0,.575],160:hr,163:[0,.69444,0,0,.86853],168:Bg,172:[0,.44444,0,0,.76666],176:A2t,177:jl,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:jl,216:[.04861,.73472,0,0,.89444],223:qkt,230:[0,.44444,0,0,.83055],247:jl,248:[.09722,.54167,0,0,.575],305:R2t,338:[0,.68611,0,0,1.16944],339:L2t,567:[.19444,.44444,0,0,.35139],710:Bg,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Bg,715:Bg,728:Bg,729:Hf,730:A2t,732:Bg,733:Bg,915:B2t,916:T3,920:O3,923:Zkt,926:Akt,928:_W,931:zW,933:O3,934:zW,936:O3,937:zW,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:Hf,8217:Hf,8220:Q3,8221:Q3,8224:X2t,8225:X2t,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:xkt,8465:W2t,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:W2t,8501:_3,8592:Oc,8593:F2t,8594:Oc,8595:F2t,8596:Oc,8597:Ag,8598:Hy,8599:Hy,8600:Hy,8601:Hy,8636:Oc,8637:Oc,8640:Oc,8641:Oc,8656:Oc,8657:V2t,8658:Oc,8659:V2t,8660:Oc,8661:[.25,.75,0,0,.70277],8704:Sm,8706:[0,.69444,.06389,0,.62847],8707:Sm,8709:k2t,8711:T3,8712:S2t,8715:S2t,8722:jl,8723:jl,8725:Ag,8726:Ag,8727:DW,8728:J3,8729:J3,8730:[.18,.82,0,0,.95833],8733:L2t,8734:[0,.44444,0,0,1.14999],8736:Qy,8739:jW,8741:Ag,8743:Lm,8744:Lm,8745:Lm,8746:Lm,8747:[.19444,.69444,.12778,0,.56875],8764:w2t,8768:[.19444,.69444,0,0,.31944],8771:H3,8776:[.02444,.52444,0,0,.89444],8781:H3,8801:H3,8804:Xg,8805:Xg,8810:U2t,8811:U2t,8826:Jf,8827:Jf,8834:Jf,8835:Jf,8838:Xg,8839:Xg,8846:Lm,8849:Xg,8850:Xg,8851:Lm,8852:Lm,8853:jl,8854:jl,8855:jl,8856:jl,8857:jl,8866:_3,8867:_3,8868:HW,8869:HW,8900:J3,8901:[-.02639,.47361,0,0,.31944],8902:DW,8968:MW,8969:MW,8970:MW,8971:MW,8994:Y2t,8995:Y2t,9651:E2t,9657:DW,9661:E2t,9667:DW,9711:Hy,9824:PW,9825:PW,9826:PW,9827:PW,9837:[0,.75,0,0,.44722],9838:N2t,9839:N2t,10216:JW,10217:JW,10815:_W,10927:Xg,10928:Xg,57376:ykt},"Main-BoldItalic":{32:hr,33:[0,.69444,.11417,0,.38611],34:j2t,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:KW,40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:Wg,49:Wg,50:Wg,51:Wg,52:O2t,53:Wg,54:Wg,55:O2t,56:Wg,57:Wg,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:z3,64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:j3,73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:j3,79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:J2t,95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:Q2t,104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:Q2t,114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:hr,168:[0,.69444,.11473,0,.59111],176:H2t,184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:T2t,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:T2t,567:[.19444,.44444,.04611,0,.385],710:J2t,711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:KW,730:H2t,732:z3,733:z3,915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:j3,931:[0,.68611,.11431,0,.82666],933:_2t,934:[0,.68611,.05632,0,.82666],936:_2t,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:KW,8217:KW,8220:[0,.69444,.16772,0,.62055],8221:j2t},"Main-Italic":{32:hr,33:qW,34:ekt,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:qW,40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:Fg,49:Fg,50:Fg,51:Fg,52:z2t,53:Fg,54:Fg,55:z2t,56:Fg,57:Fg,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:q2t,64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:$W,73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:$W,79:$2t,80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:$W,86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:P2t,95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:D2t,104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:D2t,114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:hr,168:[0,.66786,.10474,0,.51111],176:K2t,184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:M2t,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:M2t,710:P2t,711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:K2t,732:[0,.66786,.11585,0,.51111],733:q2t,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:$2t,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:$W,931:[0,.68333,.12028,0,.71555],933:tkt,934:[0,.68333,.05986,0,.71555],936:tkt,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:qW,8217:qW,8220:[0,.69444,.1685,0,.51444],8221:ekt,8463:LW},"Main-Regular":{32:hr,33:Td,34:On,35:zkt,36:K3,37:Dkt,38:wm,39:Td,40:_f,41:_f,42:Mkt,43:al,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:Jd,48:nl,49:nl,50:nl,51:nl,52:nl,53:nl,54:nl,55:nl,56:nl,57:nl,58:akt,59:[.19444,.43056,0,0,.27778],60:Rg,61:NW,62:Rg,63:o9,64:wm,65:Um,66:[0,.68333,0,0,.70834],67:jy,68:[0,.68333,0,0,.76389],69:ikt,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:Um,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:_y,76:ckt,77:[0,.68333,0,0,.91667],78:Um,79:_y,80:ikt,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:jy,85:Um,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:Um,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:tF,92:Jd,93:tF,94:On,95:[.31,.12056,.02778,0,.5],97:zy,98:jf,99:D3,100:jf,101:D3,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:jf,105:okt,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:Td,109:[0,.43056,0,0,.83334],110:nkt,111:zy,112:rkt,113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:nkt,118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:D3,123:Jd,124:tF,125:Jd,126:[.35,.31786,0,0,.5],160:hr,163:[0,.69444,0,0,.76909],167:M3,168:lkt,172:[0,.43056,0,0,.66667],176:skt,177:al,182:P3,184:n9,198:[0,.68333,0,0,.90278],215:al,216:[.04861,.73194,0,0,.77778],223:On,230:[0,.43056,0,0,.72222],247:al,248:[.09722,.52778,0,0,.5],305:akt,338:[0,.68333,0,0,1.01389],339:mkt,567:[.19444,.43056,0,0,.30556],710:On,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:On,715:On,728:On,729:okt,730:skt,732:lkt,733:On,915:ckt,916:gkt,920:_y,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:Um,931:jy,933:_y,934:jy,936:_y,937:jy,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:Td,8217:Td,8220:On,8221:On,8224:M3,8225:M3,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:LW,8465:Dy,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:Dy,8501:Vg,8592:Ka,8593:dkt,8594:Ka,8595:dkt,8596:Ka,8597:Jd,8598:My,8599:My,8600:My,8601:My,8614:[.011,.511,0,0,1],8617:ukt,8618:ukt,8636:Ka,8637:Ka,8640:Ka,8641:Ka,8652:[.011,.671,0,0,1],8656:Ka,8657:P3,8658:Ka,8659:P3,8660:Ka,8661:[.25,.75,0,0,.61111],8704:jf,8706:[0,.69444,.05556,.08334,.5309],8707:jf,8709:K3,8711:gkt,8712:hkt,8715:hkt,8722:al,8723:al,8725:Jd,8726:Jd,8727:iF,8728:q3,8729:q3,8730:[.2,.8,0,0,.83334],8733:mkt,8734:w3,8736:Qy,8739:tF,8741:Jd,8743:Ym,8744:Ym,8745:Ym,8746:Ym,8747:[.19444,.69444,.11111,0,.41667],8764:NW,8768:[.19444,.69444,0,0,.27778],8771:eF,8773:[-.022,.589,0,0,1],8776:pkt,8781:eF,8784:[-.133,.67,0,0,.778],8801:eF,8804:zo,8805:zo,8810:bkt,8811:bkt,8826:Rg,8827:Rg,8834:Rg,8835:Rg,8838:zo,8839:zo,8846:Ym,8849:zo,8850:zo,8851:Ym,8852:Ym,8853:al,8854:al,8855:al,8856:al,8857:al,8866:Vg,8867:Vg,8868:wm,8869:wm,8872:[.249,.75,0,0,.867],8900:q3,8901:[-.05555,.44445,0,0,.27778],8902:iF,8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:rF,8969:rF,8970:rF,8971:rF,8994:fkt,8995:fkt,9136:nF,9137:nF,9651:Ikt,9657:iF,9661:Ikt,9667:iF,9711:My,9824:aF,9825:aF,9826:aF,9827:aF,9837:[0,.75,0,0,.38889],9838:vkt,9839:vkt,10216:_f,10217:_f,10222:nF,10223:nF,10229:[.011,.511,0,0,1.609],10230:Gkt,10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:Gkt,10815:Um,10927:zo,10928:zo,57376:ykt},"Math-BoldItalic":{32:hr,48:oF,49:oF,50:oF,51:Py,52:Py,53:Py,54:rl,55:Py,56:rl,57:Py,65:N3,66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:Rkt,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:Ckt,77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:xkt,105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:Bkt,112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:hr,915:[0,.68611,.15972,0,.65694],916:T3,920:[0,.68611,.03194,0,.86722],923:Zkt,926:[0,.68611,.07458,0,.84125],928:Rkt,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:Akt,936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:Bkt,960:[0,.44444,.03704,0,.68241],961:Xkt,962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:Xkt,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:hr,48:zy,49:zy,50:zy,51:Ky,52:Ky,53:Ky,54:nl,55:Ky,56:nl,57:Ky,65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:Fkt,73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:Wkt,80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:Vkt,112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:hr,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:Wkt,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:Fkt,931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:Vkt,960:[0,.43056,.03588,0,.57003],961:kkt,962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:kkt,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:hr,33:[0,.69444,0,0,.36667],34:i9,35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:sF,40:Skt,41:Skt,42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:wa,49:wa,50:wa,51:wa,52:wa,53:wa,54:wa,55:wa,56:wa,57:wa,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:Lkt,64:Hd,65:Hd,66:Hd,67:$3,68:kg,69:[0,.69444,0,0,.64167],70:Vg,71:Hd,72:kg,73:[0,.69444,0,0,.33056],74:Lkt,75:wkt,76:Okt,77:[0,.69444,0,0,.97778],78:kg,79:kg,80:$3,81:[.10556,.69444,0,0,.79445],82:$3,83:Vg,84:Hd,85:wkt,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Hd,89:[0,.69444,.0275,0,.73334],90:Qkt,91:Ukt,93:Ukt,94:wa,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:t9,99:[0,.45833,0,0,.48889],100:t9,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:t9,105:Ykt,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Ykt,109:[0,.45833,0,0,.86667],110:Nkt,111:[0,.45833,0,0,.55],112:Ekt,113:Ekt,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:Nkt,118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:hr,168:wa,176:Hd,180:wa,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:wa,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:wa,729:sF,730:Hd,732:wa,733:wa,915:Okt,916:[0,.69444,0,0,.91667],920:e9,923:Qkt,926:Hd,928:kg,931:kg,933:e9,934:kg,936:e9,937:kg,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:sF,8217:sF,8220:i9,8221:i9},"SansSerif-Italic":{32:hr,33:[0,.69444,.05733,0,.31945],34:jkt,35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:a9,40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:Pkt,45:[0,.44444,.01946,0,.33333],46:Kkt,47:[.25,.75,.13164,0,.5],48:Qc,49:Qc,50:Qc,51:Qc,52:Qc,53:Qc,54:Qc,55:Qc,56:Qc,57:Qc,58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:_d,66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:r9,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:s9,77:[0,.69444,.08094,0,.875],78:r9,79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:Tkt,95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:hr,168:[0,.67937,.06385,0,.5],176:Jkt,184:n9,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:Tkt,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:Hkt,715:On,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:Jkt,732:[0,.67659,.08826,0,.5],733:Hkt,915:[0,.69444,.13372,0,.54167],916:nSt,920:[0,.69444,.07555,0,.77778],923:Vg,926:[0,.69444,.12816,0,.66667],928:r9,931:[0,.69444,.11983,0,.72222],933:_kt,934:[0,.69444,.04603,0,.72222],936:_kt,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:a9,8217:a9,8220:[0,.69444,.14205,0,.5],8221:jkt},"SansSerif-Regular":{32:hr,33:[0,.69444,0,0,.31945],34:On,35:zkt,36:K3,37:Dkt,38:[0,.69444,0,0,.75834],39:Td,40:_f,41:_f,42:Mkt,43:al,44:Pkt,45:[0,.44444,0,0,.33333],46:Kkt,47:Jd,48:Tc,49:Tc,50:Tc,51:Tc,52:Tc,53:Tc,54:Tc,55:Tc,56:Tc,57:Tc,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:o9,64:_d,65:_d,66:_d,67:Sm,68:[0,.69444,0,0,.72223],69:qkt,70:[0,.69444,0,0,.56945],71:_d,72:l9,73:Td,74:o9,75:[0,.69444,0,0,.69445],76:s9,77:[0,.69444,0,0,.875],78:l9,79:[0,.69444,0,0,.73611],80:Sm,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:jf,84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:_d,89:[0,.69444,.025,0,.66667],90:Vg,91:$kt,93:$kt,94:On,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:c9,99:tSt,100:c9,101:tSt,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:c9,105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:rSt,111:[0,.44444,0,0,.5],112:eSt,113:eSt,114:[0,.44444,.01389,0,.34167],115:iSt,116:[0,.57143,0,0,.36111],117:rSt,118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:hr,168:[0,.67937,0,0,.5],176:_d,184:n9,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:On,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:On,715:On,728:On,729:[0,.67937,0,0,.27778],730:_d,732:[0,.67659,0,0,.5],733:On,915:s9,916:nSt,920:wm,923:Vg,926:_d,928:l9,931:Dy,933:wm,934:Dy,936:wm,937:Dy,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:Td,8217:Td,8220:On,8221:On},"Script-Regular":{32:hr,65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:hr},"Size1-Regular":{32:hr,40:aSt,41:aSt,47:oSt,91:sSt,92:oSt,93:sSt,123:lSt,125:lSt,160:hr,710:lF,732:lF,770:lF,771:lF,8214:[-99e-5,.601,0,0,.77778],8593:cSt,8595:cSt,8657:dSt,8659:dSt,8719:uSt,8720:uSt,8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:hSt,8748:gSt,8749:gSt,8750:hSt,8896:zf,8897:zf,8898:zf,8899:zf,8968:Df,8969:Df,8970:Df,8971:Df,9168:g9,10216:Df,10217:Df,10752:d9,10753:d9,10754:d9,10756:zf,10758:zf},"Size2-Regular":{32:hr,40:mSt,41:mSt,47:pSt,91:bSt,92:pSt,93:bSt,123:fSt,125:fSt,160:hr,710:cF,732:cF,770:cF,771:cF,8719:ISt,8720:ISt,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:GSt,8748:vSt,8749:vSt,8750:GSt,8896:Mf,8897:Mf,8898:Mf,8899:Mf,8968:dF,8969:dF,8970:dF,8971:dF,10216:ySt,10217:ySt,10752:u9,10753:u9,10754:u9,10756:Mf,10758:Mf},"Size3-Regular":{32:hr,40:CSt,41:CSt,47:xSt,91:ZSt,92:xSt,93:ZSt,123:uF,125:uF,160:hr,710:gF,732:gF,770:gF,771:gF,8730:[.95003,1.45,0,0,1],8968:hF,8969:hF,8970:hF,8971:hF,10216:uF,10217:uF},"Size4-Regular":{32:hr,40:RSt,41:RSt,47:ASt,91:BSt,92:ASt,93:BSt,123:mF,125:mF,160:hr,710:pF,732:pF,770:pF,771:pF,8730:[1.25003,1.75,0,0,1],8968:bF,8969:bF,8970:bF,8971:bF,9115:fF,9116:XSt,9117:fF,9118:fF,9119:XSt,9120:fF,9121:IF,9122:g9,9123:IF,9124:IF,9125:g9,9126:IF,9127:WSt,9128:FSt,9129:VSt,9130:[0,.3,0,0,.88889],9131:WSt,9132:FSt,9133:VSt,9143:[.88502,.915,0,0,1.05556],10216:mF,10217:mF,57344:kSt,57345:kSt,57680:vF,57681:vF,57682:vF,57683:vF},"Typewriter-Regular":{32:wSt,33:qe,34:qe,35:qe,36:zl,37:zl,38:qe,39:qe,40:zl,41:zl,42:[0,.52083,0,0,.525],43:SSt,44:[.13889,.125,0,0,.525],45:SSt,46:[0,.125,0,0,.525],47:zl,48:qe,49:qe,50:qe,51:qe,52:qe,53:qe,54:qe,55:qe,56:qe,57:qe,58:Go,59:[.13889,.43056,0,0,.525],60:LSt,61:[-.19549,.41562,0,0,.525],62:LSt,63:qe,64:qe,65:qe,66:qe,67:qe,68:qe,69:qe,70:qe,71:qe,72:qe,73:qe,74:qe,75:qe,76:qe,77:qe,78:qe,79:qe,80:qe,81:[.13889,.61111,0,0,.525],82:qe,83:qe,84:qe,85:qe,86:qe,87:qe,88:qe,89:qe,90:qe,91:zl,92:zl,93:zl,94:qe,95:[.09514,0,0,0,.525],96:qe,97:Go,98:qe,99:Go,100:qe,101:Go,102:qe,103:qy,104:qe,105:qe,106:[.22222,.61111,0,0,.525],107:qe,108:qe,109:Go,110:Go,111:Go,112:qy,113:qy,114:Go,115:Go,116:[0,.55358,0,0,.525],117:Go,118:Go,119:Go,120:Go,121:qy,122:Go,123:zl,124:zl,125:zl,126:qe,127:qe,160:wSt,176:qe,184:[.19445,0,0,0,.525],305:Go,567:qy,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:qe,715:qe,728:qe,730:qe,770:qe,771:qe,776:qe,915:qe,916:qe,920:qe,923:qe,926:qe,928:qe,931:qe,933:qe,934:qe,936:qe,937:qe,8216:qe,8217:qe,8242:qe,9251:[.11111,.21944,0,0,.525]}},qDe=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,f0=10,Pl=.25,$De=1.2,$d=.431,USt={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[$d,$d,$d],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.5,.732,.925],num2:[.394,.384,.5],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[Pl,Pl,Pl],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04]},E9=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],v_=5,YSt={"\xA0":" ","\u200B":" ",\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};N9={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"],longrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],longleftarrow:[["leftarrow"],1.469,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"],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],longleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],longrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],longleftrightharpoons:[["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],xleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],longleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],longRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716],longLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},O9={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34],overarc:[1061,159,.3],underarc:[1061,159,.3]},ESt={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`,overarc:"M529 0c179 0 524 115 524 115 5 1 9 5 9 10 0 1-1 2-1 3l-4 22c-1 5-5 9-11 9h-2s-338-93-512-92c-174 0-513 92-513 92h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13 0 0 342-115 520-115z",underarc:`m 529 160 c -179 0 -524 -115 -524 -115 c -5 -1 -9 -5 -9 -10 c 0 -1 1 -2 1 -3 l 4 -22 c 1 -5 5 -9 11 -9 h 2 s 338 93 512 92 c 174 0 513 -92 513 -92 h 2 c 5 0 9 4 11 9 l 5 22 c 1 6 -2 12 -8 13 c 0 0 -342 115 -520 115 z `,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`,widetilde1:`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`,widetilde2:`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`,widetilde3:`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`,widetilde4:`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`};QF=8205,rMe=[[QF,1],[65038,2],[127995,5],[129456,4],[917536,96]],NSt=[127462,127487];aMe=class{constructor(e){this.obeyspaces=!1,this.pos=0,this.s=zLt(e)}end(){return this.pos>=this.s.length}get(){return this.pos";let e=this.get();if(e==="\\"){if(!this.end()){let t=this.match(/^[a-zA-Z\*]+/);return t?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):t=this.get(),"\\"+t}}else{if(e==="{")return"<{>";if(e==="}")return"<}>";if(e==="^"){if(this.peek()==="^"){this.get();let t=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(t)return String.fromCodePoint(Number.parseInt(t.slice(t.lastIndexOf("^")+1),16))}return e}else if(e==="#"){if(!this.end()){let t=!1;if(/[\d?@]/.test(this.peek())&&(t=!0,this.pos+1"):"<$>"}return e}};DLt=class c1{constructor(t){c1._registry[t]=this}static createAtom(t,r,n){return c1._registry[t].createAtom(r,qn(r,t),n)}static serialize(t,r){var n;if(!t||t.length===0)return"";if((n=r.skipStyles)!=null&&n){let a=[];for(let o of MLt(t)){let s=c1._registry[o[0].mode];a.push(...s.serialize(o,r))}return ki(a)}return ki(lMe(t,r))}static getFont(t,r,n){return c1._registry[t].getFont(r,n)}};DLt._registry={};xs=DLt;Ue=class PLt{constructor(t,r){var n,a,o,s,l;if(typeof t=="number"?this.value=String.fromCodePoint(t):typeof t=="string"?this.value=t:$n(t)?this.children=t.filter(u=>u!==null):t&&t instanceof PLt&&(this.children=[t]),this.children)for(let u of this.children)u.parent=this;this.type=(n=r?.type)!=null?n:"ignore",this.isSelected=r?.isSelected===!0,r!=null&&r.caret&&(this.caret=r.caret),this.classes=(a=r?.classes)!=null?a:"",this.isTight=(o=r?.isTight)!=null?o:!1,r!=null&&r.attributes&&(this.attributes=r.attributes);let c=r?.fontFamily;r!=null&&r.style&&this.value&&(c=(l=xs.getFont((s=r.mode)!=null?s:"math",this,zt(Xt({variant:"normal"},r.style),{letterShapeStyle:r.letterShapeStyle})))!=null?l:void 0),c||(c="Main-Regular"),this._height=0,this._depth=0,this._width=0,this.hasExplicitWidth=!1,this.skew=0,this.italic=0,this.maxFontSize=0,this.scale=1,r?.maxFontSize!==void 0&&(this.maxFontSize=r.maxFontSize),cMe(this,c)}set atomID(t){t===void 0||t.length===0||(this.id=t)}selected(t){if(this.isSelected!==t&&(this.isSelected=t,this.children))for(let r of this.children)r.selected(t)}setStyle(t,r,n){if(r===void 0)return;let a=$y(r,n);a.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[t]=a)}setTop(t){Number.isFinite(t)&&Math.abs(t)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=$y(t,"em"),this.height-=t,this.depth+=t)}get left(){var t;return(t=this.cssProperties)!=null&&t["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=$y(t,"em")))}set right(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=$y(t,"em")))}set bottom(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=$y(t,"em")))}get width(){return this._width*this.scale}set width(t){this._width=t,this.hasExplicitWidth=!0}set softWidth(t){}get height(){return this._height*this.scale}set height(t){this._height=t}get depth(){return this._depth*this.scale}set depth(t){this._depth=t}wrap(t){let r=t.parent;if(!r)return this;t.isPhantom&&this.setStyle("opacity",0);let n=t.color;n&&n!==r.color&&this.setStyle("color",n);let a=t.backgroundColor;this.isSelected&&(a=QDe(a)),a&&a!==r.backgroundColor&&(this.setStyle("background-color",a),this.setStyle("--bg-color",a),this.setStyle("display","inline-block"),this.setStyle("position","relative"),this.classes=this.classes?`${this.classes} ML__bg`:"ML__bg");let o=t.scalingFactor;return this.scale=o,this.skew*=o,this.italic*=o,this}toMarkup(){var t,r,n,a;let o=(t=this.value)!=null?t:"";if(this.children)for(let m of this.children)o+=m.toMarkup();let s="";if(this.svgBody)s=tMe(this.svgBody);else if(this.svgOverlay){s='',s+=o,s+="",s+='${this.svgOverlay}`}let l=[],c=this.classes.split(" ");c.push((n={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?n:""),this.caret==="latex"&&c.push("ML__latex-caret"),this.isSelected&&c.push("ML__selected");let u=c.length===1?c[0]:c.filter((m,p,b)=>m.length>0&&b.indexOf(m)===p).join(" ");if(u.length>0&&l.push(`class=${Pf(`"${u}"`)}`),this.id&&l.push(` data-atom-id=${Pf(this.id)}`),this.cssId&&l.push(` id=${Pf(`"${this.cssId.replace(/ /g,"-")}"`)}`),this.attributes&&l.push(...Object.keys(this.attributes).map(m=>`${h9(m)}=${Pf(this.attributes[m])}`)),this.htmlData){let m=this.htmlData.split(",");for(let p of m){let b=p.match(/([^=]+)=(.+$)/);if(b){let f=h9(b[1]);if(f)if(f==="href"){let v=new URL(b[2]);if(v.protocol!=="http:"&&v.protocol!=="https:")throw new Error(`Invalid URL: ${b[2]}`);l.push(`href="proxy.php?url=https%3A%2F%2Fassets.ans.app%2F%24%7Bb%5B2%5D.replace%28%2F"/g,""")}"`)}else l.push(`data-${f}=${Pf(b[2])}`)}else{let f=h9(p);f&&l.push(`data-${f} `)}}}let g=(a=this.cssProperties)!=null?a:{};this.hasExplicitWidth&&g.width===void 0&&(g.width=`${Math.ceil(this._width*100)/100}em`);let d=Object.keys(g).map(m=>`${m}:${g[m]}`);if(this.scale!==void 0&&this.scale!==1&&(o.length>0||s.length>0)&&d.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle)for(let m of this.htmlStyle.split(";")){let p=m.match(/([^:]+):(.+$)/);if(p){let b=p[1].trim().replace(/ /g,"-");b&&d.push(`${b}:${p[2]}`)}}d.length>0&&l.push(`style=${Pf(d.join(";"))}`);let h="";return l.length>0||s.length>0?h=`${o}${s}`:h=o,this.caret==="text"?h+='':this.caret==="math"&&(h+=''),h}tryCoalesceWith(t){if(this.svgBody||!this.value||t.svgBody||!t.value)return!1;let r=this.children&&this.children.length>0,n=t.children&&t.children.length>0;if(r||n)return!1;if(t.cssProperties||this.cssProperties){for(let c of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(t.cssProperties&&c in t.cssProperties||this.cssProperties&&c in this.cssProperties)return!1}let a=this.cssProperties?Object.keys(this.cssProperties).length:0,o=t.cssProperties?Object.keys(t.cssProperties).length:0;if(a!==o)return!1;if(a>0){for(let c of Object.keys(this.cssProperties))if(this.cssProperties[c]!==t.cssProperties[c])return!1}let s=this.classes.trim().replace(/\s+/g," ").split(" "),l=t.classes.trim().replace(/\s+/g," ").split(" ");if(s.length!==l.length)return!1;s.sort(),l.sort();for(let[c,u]of s.entries())if(u==="ML__vertical-separator"||u!==l[c])return!1;return this.value+=t.value,this.height=Math.max(this.height,t.height),this.depth=Math.max(this.depth,t.depth),this._width=this._width+t._width,this.maxFontSize=Math.max(this.maxFontSize,t.maxFontSize),this.italic=t.italic,!0}};Bn=class extends Ue{constructor(e,t){var r;let[n,a,o]=uMe(e);super(n.length===1?n[0]:n,{type:t?.type,classes:((r=t?.classes)!=null?r:"")+" ML__vlist-t"+(n.length===2?" ML__vlist-t2":"")}),this.height=a,this.depth=o,this.softWidth=n.reduce((s,l)=>Math.max(s,l.width),0)}};G_=7,aV=6,CV=5,Dm=4,g0=3,ys=2,Km=1,qa=0,Sg=class{constructor(e,t,r){this.id=e,this.sizeDelta=t,this.cramped=r;let n={"-4":2,"-3":1,0:0}[t];this.metrics=Object.keys(USt).reduce((a,o)=>zt(Xt({},a),{[o]:USt[o][n]}),{})}getFontSize(e){return Math.max(1,e+this.sizeDelta)}get sup(){return _c[[qa,Km,qa,Km,ys,g0,ys,g0][this.id]]}get sub(){return _c[[qa,qa,qa,qa,ys,ys,ys,ys][this.id]]}get fracNum(){return _c[[qa,Km,qa,Km,ys,g0,Dm,CV][this.id]]}get fracDen(){return _c[[qa,qa,qa,qa,ys,ys,Dm,Dm][this.id]]}get cramp(){return _c[[qa,qa,ys,ys,Dm,Dm,aV,aV][this.id]]}get isTight(){return this.sizeDelta<0}},t1={7:new Sg(G_,0,!1),6:new Sg(aV,0,!0),5:new Sg(CV,0,!1),4:new Sg(Dm,0,!0),3:new Sg(g0,-3,!1),2:new Sg(ys,-3,!0),1:new Sg(Km,-4,!1),0:new Sg(qa,-4,!0)},_c=zt(Xt({},t1),{displaystyle:t1[G_],textstyle:t1[CV],scriptstyle:t1[g0],scriptscriptstyle:t1[Km]});mMe={"p@":{dimension:1},"z@":{dimension:0},maxdimen:{dimension:16383.99999},hfuzz:{dimension:.1},vfuzz:{dimension:.1},overfullrule:{dimension:5},hsize:{dimension:6.5,unit:"in"},vsize:{dimension:8.9,unit:"in"},parindent:{dimension:20},maxdepth:{dimension:4},splitmaxdepth:{register:"maxdimen"},boxmaxdepth:{register:"maxdimen"},delimitershortfall:{dimension:5},nulldelimiterspace:{dimension:1.2,unit:"pt"},scriptspace:{dimension:.5},topskip:{dimension:10},splittopskip:{dimension:10},normalbaselineskip:{dimension:12},normallineskip:{dimension:1},normallineskiplimit:{dimension:0},jot:{dimension:3},doublerulesep:{dimension:2},arrayrulewidth:{dimension:.4},arraycolsep:{dimension:5},fboxsep:{dimension:3},fboxrule:{dimension:.4},"z@skip":{glue:{dimension:0},shrink:{dimension:0},grow:{dimension:0}},hideskip:{glue:{dimension:-1e3},grow:{dimension:1,unit:"fill"}},"@flushglue":{glue:{dimension:0},grow:{dimension:1,unit:"fill"}},parskip:{glue:{dimension:0},grow:{dimension:1}},abovedisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},abovedisplayshortskip:{glue:{dimension:0},grow:{dimension:3}},belowdisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},belowdisplayshortskip:{glue:{dimension:7},grow:{dimension:3},shrink:{dimension:4}},parfillskip:{glue:{dimension:0},grow:{dimension:1,unit:"fil"}},thinmuskip:{glue:{dimension:3,unit:"mu"}},medmuskip:{glue:{dimension:4,unit:"mu"},grow:{dimension:2,unit:"mu"},shrink:{dimension:4,unit:"mu"}},thickmuskip:{glue:{dimension:5,unit:"mu"},grow:{dimension:5,unit:"mu"}},smallskipamount:{glue:{dimension:3},grow:{dimension:1},shrink:{dimension:1}},medskipamount:{glue:{dimension:6},grow:{dimension:2},shrink:{dimension:3}},bigskipamount:{glue:{dimension:12},grow:{dimension:2},shrink:{dimension:4}},pretolerance:100,tolerance:200,hbadness:1e3,vbadness:1e3,linepenalty:10,hyphenpenalty:50,exhyphenpenalty:50,binoppenalty:700,relpenalty:500,clubpenalty:150,widowpenalty:150,displaywidowpenalty:50,brokenpenalty:100,predisplaypenalty:1e4,doublehyphendemerits:1e4,finalhyphendemerits:5e3,adjdemerits:1e4,tracinglostchars:1,uchyph:1,delimiterfactor:901,defaulthyphenchar:"\\-",defaultskewchar:-1,newlinechar:-1,showboxbreadth:5,showboxdepth:3,errorcontextlines:5,interdisplaylinepenalty:100,interfootnotelinepenalty:100,baselineSkip:1.2,arraystretch:1,month:new Date().getMonth()+1,day:new Date().getDate(),year:new Date().getFullYear()};$i=class ewt{constructor(t,r){var n,a,o,s,l,c,u,g,d,h,m,p,b,f,v;let y;t!=null&&t.parent?(this.parent=t.parent,y=t.parent,this.registers={}):(y=Xt(Xt({},twt()),(n=t?.from)!=null?n:{}),this.registers=y.registers),y.atomIdsSettings&&(this.atomIdsSettings=Xt({},y.atomIdsSettings)),this.renderPlaceholder=y.renderPlaceholder,this.isPhantom=(s=(o=t?.isPhantom)!=null?o:(a=this.parent)==null?void 0:a.isPhantom)!=null?s:!1,this.letterShapeStyle=y.letterShapeStyle,this.minFontScale=y.minFontScale,this.maxMatrixCols=y.maxMatrixCols,r!=null&&r.color&&r.color!=="none"?this.color=r.color:this.color=(c=(l=this.parent)==null?void 0:l.color)!=null?c:"",r!=null&&r.backgroundColor&&r.backgroundColor!=="none"?this.backgroundColor=r.backgroundColor:this.backgroundColor=(g=(u=this.parent)==null?void 0:u.backgroundColor)!=null?g:"",r!=null&&r.fontSize&&r.fontSize!=="auto"&&r.fontSize!==((d=this.parent)==null?void 0:d.size)?this.size=r.fontSize:this.size=(m=(h=this.parent)==null?void 0:h.size)!=null?m:v_;let x=(b=(p=this.parent)==null?void 0:p.mathstyle)!=null?b:_c.displaystyle;if(typeof t?.mathstyle=="string"){if(y instanceof ewt)switch(t.mathstyle){case"cramp":x=x.cramp;break;case"superscript":x=x.sup;break;case"subscript":x=x.sub;break;case"numerator":x=x.fracNum;break;case"denominator":x=x.fracDen;break}switch(t.mathstyle){case"textstyle":x=_c.textstyle;break;case"displaystyle":x=_c.displaystyle;break;case"scriptstyle":x=_c.scriptstyle;break;case"scriptscriptstyle":x=_c.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=x,this.smartFence=y.smartFence,this.placeholderSymbol=y.placeholderSymbol,this.colorMap=(f=y.colorMap)!=null?f:(C=>C),this.backgroundColorMap=(v=y.backgroundColorMap)!=null?v:(C=>C),this.getMacro=y.getMacro,this.parent!==void 0||this.registers}makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if(typeof this.atomIdsSettings.seed!="number")return`${Date.now().toString(36).slice(-2)}${Math.floor(Math.random()*1e5).toString(36)}`;let t=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,t}scale(t){return t*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===G_||this.mathstyle.id===aV}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(E9[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(t){if(this.registers&&t in this.registers)return this.registers[t];if(this.parent)return this.parent.getRegister(t)}getRegisterAsNumber(t){let r=this.getRegister(t);if(typeof r=="number")return r;if(typeof r=="string")return Number(r)}getRegisterAsGlue(t){if(this.registers&&t in this.registers){let r=this.registers[t];return typeof r=="object"&&"glue"in r?r:typeof r=="object"&&"dimension"in r?{glue:{dimension:r.dimension}}:typeof r=="number"?{glue:{dimension:r}}:void 0}if(this.parent)return this.parent.getRegisterAsGlue(t)}getRegisterAsEm(t,r){return qLt(this.getRegisterAsDimension(t),r)}getRegisterAsDimension(t){if(this.registers&&t in this.registers){let r=this.registers[t];return typeof r=="object"&&"glue"in r?r.glue:typeof r=="object"&&"dimension"in r?r:typeof r=="number"?{dimension:r}:void 0}if(this.parent)return this.parent.getRegisterAsDimension(t)}setRegister(t,r){if(r===void 0){delete this.registers[t];return}this.registers[t]=r}evaluate(t){if(!t||!("register"in t))return t;let r=this;if("global"in t&&t.global)for(;r.parent;)r=r.parent;let n=1;"factor"in t&&t.factor!==1&&t.factor!==void 0&&(n=t.factor);let a=r.getRegister(t.register);if(a===void 0)return;if(typeof a=="string")return{string:Number(a).toString()+a};if(typeof a=="number")return{number:n*a};let o=r.evaluate(a);if(o!==void 0)return"string"in o?{string:Number(a).toString()+o.string}:"number"in o?{number:n*o.number}:"dimension"in o?zt(Xt({},o),{dimension:n*o.dimension}):"glue"in o?zt(Xt({},o),{glue:zt(Xt({},o.glue),{dimension:n*o.glue.dimension}),shrink:o.shrink?zt(Xt({},o.shrink),{dimension:n*o.shrink.dimension}):void 0,grow:o.grow?zt(Xt({},o.grow),{dimension:n*o.grow.dimension}):void 0}):t}toDimension(t){let r=this.evaluate(t);if(r===void 0)return null;if("dimension"in r)return r;if("glue"in r)return r.glue;if("number"in r)return{dimension:r.number};if("string"in r){let n=parseFloat(r.string),a=r.string.match(/(mm|cm|ex|px|em|bp|dd|pc|in|mu)$/);return a?{dimension:n,unit:a[0]}:{dimension:n}}return null}toEm(t,r){if(t===null)return 0;let n=this.toDimension(t);return n===null?0:KLt(n,r)/f0}toNumber(t){if(t===null)return null;let r=this.evaluate(t);return r===void 0?null:"number"in r?r.number:"dimension"in r?r.dimension:"glue"in r?r.glue.dimension:"string"in r?Number(r.string):null}toColor(t){var r,n;if(t===null)return null;let a=this.evaluate(t);return a===void 0?null:"string"in a?(n=(r=this.colorMap)==null?void 0:r.call(this,a.string))!=null?n:a.string:null}toBackgroundColor(t){var r,n;if(t===null)return null;let a=this.evaluate(t);return a===void 0?null:"string"in a?(n=(r=this.backgroundColorMap)==null?void 0:r.call(this,a.string))!=null?n:a.string:null}},I0=["body","above","below","superscript","subscript"];be=class jd{constructor(t){this.isRoot=!1;var r,n,a,o,s,l,c;this.type=t.type,typeof t.value=="string"&&(this.value=t.value),this.command=(n=(r=t.command)!=null?r:this.value)!=null?n:"",this.mode=(a=t.mode)!=null?a:"math",t.isFunction&&(this.isFunction=!0),(t.isRoot||this.type==="root")&&(this.isRoot=!0),t.limits&&(this.subsupPlacement=t.limits),this.style=Xt({},(o=t.style)!=null?o:{}),this.displayContainsHighlight=(s=t.displayContainsHighlight)!=null?s:!1,this.captureSelection=(l=t.captureSelection)!=null?l:!1,this.skipBoundary=(c=t.skipBoundary)!=null?c:!1,t.verbatimLatex!==void 0&&t.verbatimLatex!==null&&(this.verbatimLatex=t.verbatimLatex),t.args&&(this.args=t.args),t.body&&(this.body=t.body),this._changeCounter=0}static createBox(t,r,n){var a;if(!r)return null;let o=pMe(r),s=[];for(let c of o){let u=c[0].style,g=bMe(t,c,{style:{color:u.color,backgroundColor:u.backgroundColor,fontSize:u.fontSize}});g&&s.push(g)}if(s.length===0)return null;let l=((a=n?.classes)!=null?a:"").trim();return s.length===1&&!l&&!(n!=null&&n.type)?s[0].wrap(t):new Ue(s,{classes:l,type:n?.type}).wrap(t)}static serialize(t,r){return xs.serialize(t,r)}static commonAncestor(t,r){if(t===r||t.parent===r.parent)return t.parent;let n=new WeakSet,{parent:a}=t;for(;a;)n.add(a),a=a.parent;for(a=r.parent;a;){if(n.has(a))return a;a=a.parent}}static fromJson(t){return typeof t=="string"?new jd({type:"mord",value:t,mode:"math"}):new jd(t)}toJson(){if(this._json)return this._json;let t={};if(this.type&&(t.type=this.type),this.mode!=="math"&&(t.mode=this.mode),this.command&&this.command!==this.value&&(t.command=this.command),this.value!==void 0&&(t.value=this.value),this.style&&Object.keys(this.style).length>0&&(t.style=Xt({},this.style)),this.verbatimLatex!==void 0&&(t.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(t.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(t.explicitSubsupPlacement=!0),this.isFunction&&(t.isFunction=!0),this.displayContainsHighlight&&(t.displayContainsHighlight=!0),this.skipBoundary&&(t.skipBoundary=!0),this.captureSelection&&(t.captureSelection=!0),this.args&&(t.args=fMe(this.args)),this._branches)for(let r of Object.keys(this._branches))this._branches[r]&&(t[r]=this._branches[r].filter(n=>n.type!=="first").map(n=>n.toJson()));return t.type==="mord"&&Object.keys(t).length===2&&"value"in t?t.value:(this._json=t,t)}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(t){t&&(this._json=void 0,this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0,this.parent&&(this.parent.isDirty=!0))}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let r=qn(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):this.body&&this.command?ki([Zr(this.command,this.bodyToLatex(t)),this.supsubToLatex(t)]):this.body?ki([this.bodyToLatex(t),this.supsubToLatex(t)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(t){var r;let n=(r=t.defaultMode)!=null?r:this.mode==="math"?"math":"text";return xs.serialize(this.body,zt(Xt({},t),{defaultMode:n}))}aboveToLatex(t){return xs.serialize(this.above,t)}belowToLatex(t){return xs.serialize(this.below,t)}supsubToLatex(t){let r="";if(t=zt(Xt({},t),{defaultMode:"math"}),this.branch("subscript")!==void 0){let n=xs.serialize(this.subscript,t);n.length===0?r+="_{}":n.length===1?/^[0-9]$/.test(n)?r+=`_${n}`:r+=`_{${n}}`:r+=`_{${n}}`}if(this.branch("superscript")!==void 0){let n=xs.serialize(this.superscript,t);n.length===0?r+="^{}":n.length===1?n==="\u2032"?r+="^\\prime ":n==="\u2033"?r+="^\\doubleprime ":/^[0-9]$/.test(n)?r+=`^${n}`:r+=`^{${n}}`:r+=`^{${n}}`}return r}get treeDepth(){let t=1,r=this.parent;for(;r;)r=r.parent,t+=1;return t}get inCaptureSelection(){let t=this;for(;t;){if(t.captureSelection)return!0;t=t.parent}return!1}get parentPrompt(){let t=this.parent;for(;t;){if(t.type==="prompt"&&!t.captureSelection)return t;t=t.parent}return null}branch(t){if(_m(t)&&this._branches)return this._branches[t]}get branches(){if(!this._branches)return[];let t=[];for(let r of I0)this._branches[r]&&t.push(r);return t}createBranch(t){return _m(t),_m(t)?(this._branches?this._branches[t]||(this._branches[t]=[this.makeFirstAtom(t)]):this._branches={[t]:[this.makeFirstAtom(t)]},this.isDirty=!0,this._branches[t]):[]}get row(){return eu(this.parentBranch)?this.parentBranch[0]:-1}get col(){return eu(this.parentBranch)?this.parentBranch[1]:-1}get body(){var t;return(t=this._branches)==null?void 0:t.body}set body(t){this.setChildren(t,"body")}get superscript(){var t;return(t=this._branches)==null?void 0:t.superscript}set superscript(t){this.setChildren(t,"superscript")}get subscript(){var t;return(t=this._branches)==null?void 0:t.subscript}set subscript(t){this.setChildren(t,"subscript")}get above(){var t;return(t=this._branches)==null?void 0:t.above}set above(t){this.setChildren(t,"above")}get below(){var t;return(t=this._branches)==null?void 0:t.below}set below(t){this.setChildren(t,"below")}applyStyle(t,r){this.isDirty=!0,r!=null&&r.unstyledOnly?(t.color&&!this.style.color&&(this.style.color=t.color),t.backgroundColor&&!this.style.backgroundColor&&(this.style.backgroundColor=t.backgroundColor),t.fontFamily&&!this.style.fontFamily&&(this.style.fontFamily=t.fontFamily),t.fontShape&&!this.style.fontShape&&(this.style.fontShape=t.fontShape),t.fontSeries&&!this.style.fontSeries&&(this.style.fontSeries=t.fontSeries),t.fontSize&&!this.style.fontSize&&(this.style.fontSize=t.fontSize),t.variant&&!this.style.variant&&(this.style.variant=t.variant),t.variantStyle&&!this.style.variantStyle&&(this.style.variantStyle=t.variantStyle)):this.style=Xt(Xt({},this.style),t),this.style.fontFamily==="none"&&delete this.style.fontFamily,this.style.fontShape==="auto"&&delete this.style.fontShape,this.style.fontSeries==="auto"&&delete this.style.fontSeries,this.style.color==="none"&&(delete this.style.color,delete this.style.verbatimColor),this.style.backgroundColor==="none"&&(delete this.style.backgroundColor,delete this.style.verbatimBackgroundColor),this.style.fontSize==="auto"&&delete this.style.fontSize;for(let n of this.children)n.applyStyle(t,r)}getInitialBaseElement(){var t,r,n;return this.hasEmptyBranch("body")?this:((t=this.body)==null||t[0].type,(n=(r=this.body[1])==null?void 0:r.getInitialBaseElement())!=null?n:this)}getFinalBaseElement(){return this.hasEmptyBranch("body")?this:this.body[this.body.length-1].getFinalBaseElement()}isCharacterBox(){return this.type==="leftright"||this.type==="genfrac"||this.type==="subsup"||this.type==="delim"||this.type==="array"||this.type==="surd"?!1:this.getFinalBaseElement().type==="mord"}hasEmptyBranch(t){let r=this.branch(t);return r?(r.length>0,r[0].type,r.length===1):!0}setChildren(t,r){var n;if(!t||(_m(r),!_m(r)))return;let a=((n=t[0])==null?void 0:n.type)==="first"?[...t]:[this.makeFirstAtom(r),...t];this._branches?this._branches[r]=a:this._branches={[r]:a};for(let o of t)o.parent=this,o.parentBranch=r;this.isDirty=!0}makeFirstAtom(t){let r=new jd({type:"first",mode:this.mode});return r.parent=this,r.parentBranch=t,r}addChild(t,r){t.type,this.createBranch(r).push(t),this.isDirty=!0,t.parent=this,t.parentBranch=r}addChildBefore(t,r){r.parentBranch;let n=this.createBranch(r.parentBranch);n.splice(n.indexOf(r),0,t),this.isDirty=!0,t.parent=this,t.parentBranch=r.parentBranch}addChildAfter(t,r){r.parentBranch;let n=this.createBranch(r.parentBranch);n.splice(n.indexOf(r)+1,0,t),this.isDirty=!0,t.parent=this,t.parentBranch=r.parentBranch}addChildren(t,r){let n=this.createBranch(r);for(let a of t)a.parent=this,a.parentBranch=r,n.push(a);this.isDirty=!0}addChildrenAfter(t,r){t.length===0||t[0].type,r.parentBranch;let n=this.createBranch(r.parentBranch);n.splice(n.indexOf(r)+1,0,...t),this.isDirty=!0;for(let a of t)a.parent=this,a.parentBranch=r.parentBranch;return t[t.length-1]}removeBranch(t){let r=this.branch(t);if(_m(t)&&(this._branches[t]=void 0),!r)return[];for(let o of r)o.parent=void 0,o.parentBranch=void 0;r[0].type;let[n,...a]=r;return this.isDirty=!0,a}removeChild(t){if(t.parent,t.type==="first")return;let r=this.branch(t.parentBranch),n=r.indexOf(t);n>=0,r.splice(n,1),this.isDirty=!0,t.parent=void 0,t.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){let{siblings:t}=this;return t[t.length-1]}get isFirstSibling(){return this===this.firstSibling}get isLastSibling(){return this===this.lastSibling}get hasNoSiblings(){return this.siblings.length===1}get leftSibling(){this.parent;let t=this.parent.branch(this.parentBranch);return t[t.indexOf(this)-1]}get rightSibling(){this.parent;let t=this.parent.branch(this.parentBranch);return t[t.indexOf(this)+1]}get hasChildren(){return!!(this._branches&&this.children.length>0)}get firstChild(){return this.hasChildren,this.children[0]}get lastChild(){this.hasChildren;let{children:t}=this;return t[t.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];let t=[];for(let r of I0)if(this._branches[r])for(let n of this._branches[r])t.push(...n.children),t.push(n);return this._children=t,t}render(t){if(this.type==="first"&&!t.atomIdsSettings)return null;let r=qn(this.command,this.mode);if(r!=null&&r.render)return r.render(this,t);let n=new $i({parent:t},this.style),a=this.createBox(n,{classes:this.parent?"":"ML__base"});return a?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(a=this.attachSupsub(n,{base:a})),a.wrap(n)):null}attachSupsub(t,r){var n;let a=r.base,o=this.superscript,s=this.subscript;if(!o&&!s)return a;let l=null,c=null,u=(n=r.isCharacterBox)!=null?n:this.isCharacterBox(),g=0;if(o){let b=new $i({parent:t,mathstyle:"superscript"});l=jd.createBox(b,o),u||(g=a.height-t.metrics.supDrop*b.scalingFactor)}let d=0;if(s){let b=new $i({parent:t,mathstyle:"subscript"});c=jd.createBox(b,s),u||(d=a.depth+t.metrics.subDrop*b.scalingFactor)}let h;t.isDisplayStyle?h=t.metrics.sup1:t.isCramped?h=t.metrics.sup3:h=t.metrics.sup2;let m=.5/f0/t.scalingFactor,p=null;if(c&&l){g=Math.max(g,h,l.depth+.25*t.metrics.xHeight),d=Math.max(d,t.metrics.sub2);let b=t.metrics.defaultRuleThickness;if(g-l.depth-(c.height-d)<4*b){d=4*b-(g-l.depth)+c.height;let v=.8*t.metrics.xHeight-(g-l.depth);v>0&&(g+=v,d-=v)}let f=this.type==="extensible-symbol"&&a.italic?-a.italic:0;p=new Bn({individualShift:[{box:c,shift:d,marginLeft:f},{box:l,shift:-g}]})}else c&&!l?(d=Math.max(d,t.metrics.sub1,c.height-.8*$d),p=new Bn({shift:d,children:[{box:c,marginRight:m,marginLeft:this.isCharacterBox()?-a.italic:0}]})):!c&&l&&(g=Math.max(g,h,l.depth+.25*$d),p=new Bn({shift:-g,children:[{box:l,marginRight:m}]}));return new Ue([a,new Ue(p,{caret:this.caret,isSelected:this.isSelected,classes:"ML__msubsup"})],{type:r.type})}attachLimits(t,r){let n=this.superscript?jd.createBox(new $i({parent:t,mathstyle:"superscript"},this.style),this.superscript):null,a=this.subscript?jd.createBox(new $i({parent:t,mathstyle:"subscript"},this.style),this.subscript):null;return!n&&!a?r.base.wrap(t):gMe(t,zt(Xt({},r),{above:n,below:a}))}bind(t,r){if(!r||t.isPhantom||this.value==="\u200B")return r;let n=this.parent;for(;n&&!n.captureSelection;)n=n.parent;return n!=null&&n.captureSelection||(this.id||(this.id=t.makeID()),r.atomID=this.id),r}createBox(t,r){var n,a,o,s;let l=(n=this.value)!=null?n:this.body,c=(a=r?.boxType)!=null?a:J9(this.type),u=(o=r?.classes)!=null?o:"";this.mode==="text"&&(u+=" ML__text");let g=typeof l=="string"||l===void 0?new Ue(l??null,{type:c,isSelected:this.isSelected,mode:this.mode,maxFontSize:t.scalingFactor,style:zt(Xt({variant:"normal"},this.style),{fontSize:Math.max(1,t.size+t.mathstyle.sizeDelta)}),letterShapeStyle:t.letterShapeStyle,classes:u}):(s=jd.createBox(t,l,{type:c,classes:u}))!=null?s:new Ue(null);return t.isTight&&(g.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(g.italic=0),g.right=g.italic,this.bind(t,g),this.caret&&!this.superscript&&!this.subscript&&(g.caret=this.caret),g}isDigit(){var t;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((t=this.body)==null?void 0:t.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var t;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((t=this.body)==null?void 0:t.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};y0=class iwt extends be{constructor(t,r,n){super({type:"text",command:t,mode:"text",displayContainsHighlight:!0}),this.value=r,this.verbatimLatex=r,this.applyStyle(n)}static fromJson(t){return new iwt(t.command,t.value,t.style)}render(t){let r=this.createBox(t);return this.caret&&(r.caret=this.caret),r}_serialize(t){var r;return(r=this.verbatimLatex)!=null?r:jLt("text",this.value.codePointAt(0))}};rwt={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\doubleprime}","'''":"^{\\prime\\prime\\prime}","''''":"^{\\prime\\prime\\prime\\prime}",alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:"\\pi",Pi:"\\Pi",theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:"\\nabla",grad:"\\nabla",del:"\\partial",deg:{after:"digit+space",value:"\\degree"},infty:"\\infty","\u221E":"\\infty",oo:{after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"\u2211":"\\sum",sum:"\\sum_{#?}^{#?}",int:"\\int_{#?}^{#?}",prod:"\\prod_{#?}^{#?}",sqrt:"\\sqrt{#?}","\u2206":"\\differentialD","\u2202":"\\differentialD",sin:"\\sin",cos:"\\cos",tan:"\\tan",arccos:"\\arccos",arcsin:"\\arcsin",arctan:"\\arctan",arctg:"\\operatorname{arctg}",arcsec:"\\operatorname{arcsec}",arccsc:"\\operatorname{arccsc}",arsinh:"\\operatorname{arsinh}",arccosh:"\\operatorname{arccosh}",arcosh:"\\operatorname{arcosh}",artanh:"\\operatorname{artanh}",arctanh:"\\operatorname{arctanh}",arcsech:"\\operatorname{arcsech}",arccsch:"\\operatorname{arccsch}",ch:"\\operatorname{ch}",cosec:"\\operatorname{cosec}",cosh:"\\cosh",cot:"\\cot",cotg:"\\operatorname{cotg}",coth:"\\coth",csc:"\\csc",ctg:"\\operatorname{ctg}",cth:"\\operatorname{cth}",sec:"\\sec",sech:"\\operatorname{sech}",sinh:"\\sinh",sh:"\\operatorname{sh}",tanh:"\\tanh",tg:"\\operatorname{tg}",th:"\\operatorname{th}",arg:"\\arg",lg:"\\lg",lb:"\\operatorname{lb}",log:"\\log_{#?}",ln:"\\ln",exp:"\\exp",lim:"\\lim_{#?\\to#?}",dx:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:"\\forall",EE:"\\exists","!EE":"\\nexists","&&":"\\land",xin:{after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},sint:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\sin t"},in:{after:"nothing+letter+closefence",value:"\\in"},"!in":"\\notin",NN:"\\mathbb{N}",ZZ:"\\mathbb{Z}",QQ:"\\mathbb{Q}",RR:"\\mathbb{R}",CC:"\\mathbb{C}",xx:"\\times","+-":"\\pm","\u2260":"\\ne","!=":"\\ne","\u2265":"\\ge",">=":"\\ge","\u2264":"\\le","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","\u2248":"\\approx","?=":"\\questeq","\xF7":"\\div","\xAC":"\\neg",":=":"\\coloneq","::":"\\Colon","(:":"\\langle",":)":"\\rangle",beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},nu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},\u00B5:"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega",\u03A9:"\\omega",forall:"\\forall",exists:"\\exists","!exists":"\\nexists",":.":"\\therefore",liminf:"\\liminf_{#?}",limsup:"\\limsup_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:"\\bmod{#?}","(mod":"\\pmod{#?}",max:"\\max",min:"\\min",erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:"\\operatorname{bessel}",mean:"\\operatorname{mean}",median:"\\operatorname{median}",fft:"\\operatorname{fft}",lcm:"\\operatorname{lcm}",gcd:"\\gcd",randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:"\\operatorname{Re}",Im:"\\operatorname{Im}",mm:{after:"nothing+digit+operator",value:"\\operatorname{mm}"},cm:{after:"nothing+digit+operator",value:"\\operatorname{cm}"},km:{after:"nothing+digit+operator",value:"\\operatorname{km}"},kg:{after:"nothing+digit+operator",value:"\\operatorname{kg}"},ft:{after:"nothing+digit+operator",value:"\\operatorname{ft}"},inch:{after:"nothing+digit+operator",value:"\\operatorname{inch}"},mi:{after:"nothing+digit+operator",value:"\\operatorname{mi}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","-->...":"\\longrightarrow\\cdots","->":"\\to","|->":"\\mapsto","-->":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\iff","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","*":"\\cdot","**":"\\star","***":"\\ast","//":"\\slash","\\\\":"\\backslash",setminus:"\\backslash","|><":"\\ltimes","><|":"\\rtimes","|><|":"\\bowtie","-:":"\\div",divide:"\\div","@":"\\circ","^^":"\\wedge","^^^":"\\bigwedge",vv:"\\vee",vvv:"\\bigvee",nn:"\\cap",nnn:"\\bigcap",uu:"\\cup",uuu:"\\bigcup","-=":"\\equiv","~=":"\\cong",lt:"<","lt=":"\\leq",gt:">","gt=":"\\geq","-<":"\\prec","-lt":"\\prec","-<=":"\\preceq",">-=":"\\succeq",prop:"\\propto",diamond:"\\diamond",square:"\\square",iff:"\\iff",sub:"\\subset",sup:"\\supset",sube:"\\subseteq",supe:"\\supseteq",uarr:"\\uparrow",darr:"\\downarrow",rarr:"\\rightarrow",rArr:"\\Rightarrow",larr:"\\leftarrow",lArr:"\\Leftarrow",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",aleph:"\\aleph",and:"\\land",or:"\\lor",not:"\\neg","_|_":"\\bot",TT:"\\top","|--":"\\vdash","|==":"\\models","|__":"\\lfloor","__|":"\\rfloor","|~":"\\lceil","~|":"\\rceil",">->":"\\rightarrowtail","->>":"\\twoheadrightarrow",">->>":"\\twoheadrightarrowtail",times:"\\times",of:"\\circ",infinity:"\\infty",defint:"\\int_{#?}^{#?}",approaches:"\\to",ceil:"\\left\\lceil#?\\right\\rceil",floor:"\\left\\lfloor#?\\right\\rfloor",union:"\\cup",asterisk:"\\ast",frac:"\\frac{#?}{#?}",cbrt:"\\sqrt[3]{#?}",nthroot:"\\sqrt[#?]{#?}"};TSt={"[":"\\lbrack","]":"\\rbrack","{":"\\lbrace","}":"\\rbrace"};nwt=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];xMe="$$",ZMe="$$",RMe=(e,t,r)=>(nwt.some(n=>t.startsWith(n[0])&&t.endsWith(n[1]))||(t=`${xMe} ${t} ${ZMe}`),t),awt=class HF{constructor(t){HF._modes[t]=this}static onPaste(t,r,n){var a;if(!r.contentEditable&&r.userSelect==="none")return r.model.announce("plonk"),!1;if(typeof n=="string"){let s=new DataTransfer;s.setData("text/plain",n),n=s}let o=new ClipboardEvent("paste",{clipboardData:n,cancelable:!0});return(a=r.host)!=null&&a.dispatchEvent(o)?HF._modes[t].onPaste(r,n):!1}static copyToClipboard(t,r){if(!t.contentEditable&&t.userSelect==="none"){t.model.announce("plonk");return}let n=t.model,a=n.selectionIsCollapsed?[0,n.lastOffset]:Ia(n.selection),o=n.getValue(a,r);navigator.clipboard.writeText(o).then(()=>{},()=>t.model.announce("plonk"))}static onCopy(t,r){var n;if(!r.clipboardData)return;if(!t.contentEditable&&t.userSelect==="none"){t.model.announce("plonk");return}let a=t.model,o=a.selectionIsCollapsed?[0,a.lastOffset]:Ia(a.selection),s=a.getAtoms(o);if(s.every(l=>l.mode==="text"||!l.mode))r.clipboardData.setData("text/plain",s.filter(l=>l instanceof y0).map(l=>l.value).join(""));else if(s.every(l=>l.mode==="latex"))r.clipboardData.setData("text/plain",a.getAtoms(o,{includeChildren:!0}).map(l=>{var c;return(c=l.value)!=null?c:""}).join(""));else{let l;s.length===1&&s[0].verbatimLatex!==void 0?l=s[0].verbatimLatex:l=a.getValue(o,"latex-expanded"),r.clipboardData.setData("application/x-latex",l);try{r.clipboardData.setData("text/plain",t.options.onExport(t,l,o))}catch{}if(s.length===1){let c=s[0];(c.type==="root"||c.type==="group")&&(s=c.body.filter(u=>u.type!=="first"))}try{r.clipboardData.setData("application/json+mathlive",JSON.stringify(s.map(c=>c.toJson())))}catch{}if((n=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&n.ComputeEngine){let c=globalThis.MathfieldElement.computeEngine;if(c)try{let u=c.jsonSerializationOptions;c.jsonSerializationOptions={metadata:["latex"]};let g=c.parse(a.getValue(o,"latex-unstyled"));c.jsonSerializationOptions=u;let d=JSON.stringify(g.json);d&&r.clipboardData.setData("application/json",d)}catch{}}}r.preventDefault()}static insert(t,r,n={}){var a;let o=n.mode==="auto"?t.mode:(a=n.mode)!=null?a:t.mode;return HF._modes[o].insert(t,r,n)}onPaste(t,r){return!1}insert(t,r,n){return!1}};awt._modes={};yr=awt,AMe=[{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendSelectionBackward"},{key:"shift+[ArrowRight]",command:"extendSelectionForward"},{key:"shift+[ArrowUp]",command:"extendSelectionUpward"},{key:"shift+[ArrowDown]",command:"extendSelectionDownward"},{key:"[Backspace]",command:"deleteBackward"},{key:"[Delete]",command:"deleteForward"},{key:"shift+[Backspace]",command:"deleteForward"},{key:"alt+[Backspace]",command:"deletePreviousWord"},{key:"alt+[Delete]",command:"deleteNextWord"},{key:"ctrl+[Backspace]",command:"deleteToGroupStart"},{key:"ctrl+[Delete]",command:"deleteToGroupEnd"},{key:"ctrl+shift+[Backspace]",command:"deleteToGroupEnd"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"shift+alt+[ArrowLeft]",command:"extendToPreviousWord"},{key:"shift+alt+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"shift+ctrl+[ArrowLeft]",command:"extendToGroupStart"},{key:"shift+ctrl+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Home]",command:"moveToMathfieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathfieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"shift+cmd+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathfieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathfieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"shift+cmd+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",command:"moveToNextGroup"},{key:"shift+[Tab]",command:"moveToPreviousGroup"},{key:"[Escape]",ifMode:"math",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"text",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"latex",command:["complete","complete",{selectItem:"true"}]},{key:"\\",ifMode:"math",command:["switchMode","latex","","\\"]},{key:"[IntlBackslash]",ifMode:"math",command:["switchMode","latex","","\\"]},{key:"[Tab]",ifMode:"latex",command:["complete","accept-suggestion"]},{key:"[Return]",ifMode:"latex",command:["complete","accept-all"]},{key:"[Enter]",ifMode:"latex",command:["complete","accept-all"]},{key:"shift+[Escape]",ifMode:"latex",command:["complete","reject"]},{key:"[ArrowDown]",ifMode:"latex",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"latex",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deleteBackward"},{key:"[Undo]",command:"undo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"cmd+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"ctrl+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"cmd+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"ctrl+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"cmd+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+y",command:"redo"},{key:"shift+ctrl+z",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+z",command:"redo"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathfieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathfieldEnd"},{key:"shift+ctrl+b",ifPlatform:"macos",command:"extendSelectionBackward"},{key:"shift+ctrl+f",ifPlatform:"macos",command:"extendSelectionForward"},{key:"shift+ctrl+p",ifPlatform:"macos",command:"extendSelectionUpward"},{key:"shift+ctrl+n",ifPlatform:"macos",command:"extendSelectionDownward"},{key:"shift+ctrl+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"shift+ctrl+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"alt+ctrl+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"alt+ctrl+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"shift+alt+ctrl+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"shift+alt+ctrl+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deleteBackward"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteForward"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Return]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Return]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"alt+p",ifMode:"math",command:["insert","\\pi"]},{key:"alt+v",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"alt+shift+v",ifMode:"math",command:["insert","\\sqrt[#0]{#1}"]},{key:"alt+o",ifMode:"math",command:["insert","\\emptyset"]},{key:"alt+d",ifMode:"math",command:["insert","\\differentialD"]},{key:"shift+alt+o",ifMode:"math",command:["insert","\\varnothing"]},{key:"shift+alt+d",ifMode:"math",command:["insert","\\partial"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","\\backslash"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+alt+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleContextMenu"},{key:"alt+shift+[Space]",command:"toggleVirtualKeyboard"},{key:"alt+ctrl+[ArrowUp]",command:["speak","all",{withHighlighting:!1}]},{key:"alt+ctrl+[ArrowDown]",command:["speak","selection",{withHighlighting:!1}]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["switchMode","text","",""]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["switchMode","math","",""]},{key:"shift+alt+[KeyT]",ifMode:"math",command:["switchMode","text"]},{key:"shift+alt+[KeyT]",ifMode:"text",command:["switchMode","math"]},{key:"/",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+shift+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrack #0 \\right\\rbrack"]},{key:"ctrl+[Minus]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"moveToSubscript"},{key:"shift+alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrace #0 \\right\\rbrace"]},{key:"ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"shift+ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"shift+cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"alt+[Tab]",ifMode:"math",command:"addColumnAfter"},{key:"shift+alt+[Tab]",ifMode:"math",command:"addColumnBefore"},{key:"alt+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Enter]",ifMode:"math",command:"addRowBefore"},{key:"alt+[Return]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Return]",ifMode:"math",command:"addRowBefore"},{key:"shift+[Backspace]",ifMode:"math",command:"removeColumn"},{key:"shift+[Delete]",ifMode:"math",command:"removeRow"},{key:"shift+alt+[Backspace]",ifMode:"math",command:"removeRow"},{key:"alt+[Digit5]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","$\\infty"]},{key:"alt+[Digit9]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert",")"]},{key:"alt+|",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","|"]},{key:"shift+[Backquote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\~"]},{key:"[Backquote]",ifLayout:["windows.french","linux.french"],ifMode:"math",command:["insert","^2"]},{key:"[Backquote]",ifLayout:["windows.german","linux.german"],ifMode:"math",command:["insert","^"]},{key:"[IntlBackslash]",ifLayout:["apple.german"],ifMode:"math",command:["insert","^"]}],BMe={"\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\infty":"alt+[Digit5]","\\differentialD":"alt+d","\\partial":"shift+alt+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"shift+alt+o","\\~":"~"};SMe=`@keyframes ML__caret-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } :host { display: block; } .ML__container { display: inline-flex; flex-flow: row; justify-content: space-between; align-items: flex-end; min-height: 39px; /* Need some room for the virtual keyboard toggle */ width: 100%; padding: 4px; box-sizing: border-box; /* This attribute is necessary to work around a Firefox issue where where clicking multiple times on the border leads to a focused mathfield that cannot be edited until focus is lost and regained (also fixes the multiple cursor issue on firefox that can occur with the same sequence of events). */ pointer-events: auto; /* Prevent the browser from trying to interpret touch gestures in the field */ /* "Disabling double-tap to zoom removes the need for browsers to delay the generation of click events when the user taps the screen." */ touch-action: none; --_caret-color: var(--caret-color, hsl(var(--_hue), 40%, 49%)); --_selection-color: var(--selection-color, #000); --_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 70%, 85%)); --_text-highlight-background-color: var(--highlight-text, hsla(var(--_hue), 40%, 50%, 0.1)); --_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 40%, 95%)); --_smart-fence-color: var(--smart-fence-color, currentColor); --_smart-fence-opacity: var(--smart-fence-opacity, 0.5); --_contains-highlight-color: var(--contains-highlight-color, var(--_caret-color)); --_latex-color: var(--latex-color, hsl(var(--_hue), 80%, 40%)); --_correct-color: var(--correct-color, #10a000); --_incorrect-color: var(--incorrect-color, #a01b00); --_composition-background-color: var(--composition-background-color, #fff1c2); --_composition-text-color: var(--composition-text-color, black); --_composition-underline-color: var(--composition-underline-color, transparent); --_tooltip-border: var(--tooltip-border, 1px solid transparent); --_tooltip-border-radius: var(--tooltip-border-radius, 8px); --_tooltip-background-color: var(--tooltip-background-color, #616161); --_tooltip-color: var(--tooltip-color, #fff); --_tooltip-box-shadow: var(--tooltip-box-shadow, 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2)); } @media (prefers-color-scheme: dark) { .ML__container { --_contains-highlight-color: var(--contains-highlight-color, hsl(var(--_hue), 85%, 75%)); --_caret-color: var(--caret-color, hsl(var(--_hue), 65%, 55%)); --_selection-color: var(--selection-color, #fff); --_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 65%, 55%)); --_text-highlight-background-color: var(--text-highlight-background-color, hsla(var(--_hue), 40%, 50%, 0.6)); --_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 5%, 34%)); --_latex-color: var(--primary, hsl(var(--_hue), 40%, 50%)); --_composition-background-color: #69571c; --_composition-text-color: white; --_placeholder-color: hsl(var(--_hue), 60%, 69%); --_smart-fence-color: var(--smart-fence-color, #fff); --_smart-fence-opacity: var(--smart-fence-opacity, 0.7); } } @media (forced-colors: active) { .ML__container { --_caret-color: white; --_selection-color: white; --_smart-fence-color: white; --_latex-color: white; --_correct-color: white; --_incorrect-color: white; --_composition-text-color: white; } } @media (hover: none) and (pointer: coarse) { :host(:not(:focus)) .ML__container { pointer-events: none; } } /* This is the actual field content (formula) */ .ML__content { display: flex; align-items: center; align-self: center; position: relative; overflow: hidden; padding: 2px 3px 2px 1px; width: 100%; /* Encourage the browser to use the GPU to render the field. Weirdly, this is required for prompts to be rendered correctly. */ isolation: isolate; text-shadow: var(--text-shadow); } .ML__content .ML__latex { text-shadow: var(--text-shadow); } .ML__content .ML__sqrt-line { box-shadow: var(--text-shadow); } .ML__content .ML__frac-line { box-shadow: var(--text-shadow); } /* Container for the virtual keyboard toggle and menu toggle buttons */ .ML__toggles { display: flex; flex-direction: row; align-items: flex-start; gap: 0; align-self: flex-start; } /* Vertical layout modifier */ .ML__toggles--vertical { flex-direction: column; align-items: center; gap: 4px; } .ML__toggles--vertical .ML__virtual-keyboard-toggle, .ML__toggles--vertical .ML__menu-toggle { margin-right: 0; } .ML__virtual-keyboard-toggle, .ML__menu-toggle { box-sizing: border-box; display: flex; align-self: center; align-items: center; flex-shrink: 0; flex-direction: column; justify-content: center; width: 34px; height: 34px; padding: 0; margin-right: 4px; cursor: pointer; /* Avoid some weird blinking with :hover */ border-radius: 8px; border: 1px solid transparent; transition: background 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); color: hsl(var(--_hue), 40%, 50%); fill: currentColor; background: transparent; } .ML__virtual-keyboard-toggle:hover, .ML__menu-toggle:hover { background: hsla(0, 0%, 70%, 0.3); color: #333; fill: currentColor; } .ML__virtual-keyboard-toggle > span, .ML__menu-toggle > span { display: flex; align-self: center; align-items: center; } @media (pointer: coarse) { .ML__virtual-keyboard-toggle, .ML__menu-toggle { min-width: 60px; min-height: 60px; } } /* The invisible element used to capture keyboard events. We're just trying really hard to make sure it doesn't show. */ .ML__keyboard-sink { display: inline-block; resize: none; outline: none; border: none; pointer-events: none; /* Need these for Microsoft Edge */ position: fixed; clip: rect(0 0 0 0); /* Need this to prevent iOS Safari from auto-zooming */ font-size: 1em; font-family: KaTeX_Main; line-height: 0.5; /* On Chromium, if this is 0, no keyboard events are received */ /* Preferred over clip */ clip-path: inset(50%); } [part='placeholder'] { color: var(--neutral-400); } .ML__composition { background: var(--_composition-background-color); color: var(--_composition-text-color); text-decoration: underline var(--_composition-underline-color); } .ML__caret { display: inline-block; } .ML__caret::after { content: ''; visibility: hidden; width: 0; display: inline-block; height: 0.76em; --_caret-width: clamp(2px, 0.08em, 10px); border: none; border-radius: calc(var(--_caret-width) / 2); border-right: var(--_caret-width) solid var(--_caret-color); margin-right: calc(-1 * var(--_caret-width)); position: relative; left: -0.045em; bottom: -0.05em; animation: ML__caret-blink 1.05s step-end forwards infinite; } .ML__text-caret::after { content: ''; visibility: hidden; width: 0; display: inline-block; height: 0.76em; --_caret-width: clamp(2px, 0.08em, 10px); border: none; border-radius: calc(var(--_caret-width) / 2); border-right: var(--_caret-width) solid var(--_caret-color); margin-right: calc(-1 * var(--_caret-width)); position: relative; left: -0.045em; bottom: -0.05em; animation: ML__caret-blink 1.05s step-end forwards infinite; } .ML__latex-caret::after { content: ''; visibility: hidden; --_caret-width: clamp(2px, 0.08em, 10px); border: none; border-radius: calc(var(--_caret-width) / 2); border-right: var(--_caret-width) solid var(--_latex-color); margin-right: calc(-1 * var(--_caret-width)); position: relative; left: -0.019em; animation: ML__caret-blink 1.05s step-end forwards infinite; } .ML__focused .ML__latex-caret::after, .ML__focused .ML__text-caret::after, .ML__focused .ML__caret::after { visibility: visible; } .ML__focused .ML__text { background: var(--_text-highlight-background-color); } /* When using smartFence, the anticipated closing fence is displayed with this style */ .ML__smart-fence__close { opacity: var(--_smart-fence-opacity); color: var(--_smart-fence-color); } .ML__focused .ML__selected, .ML__focused .ML__selected .ML__contains-caret, .ML__focused .ML__selected .ML__smart-fence__close, .ML__focused .ML__selected .ML__placeholder { color: var(--_selection-color); opacity: 1; } .ML__empty-line-anchor::after { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 8px; height: 20px; border-radius: 2px; background: transparent; opacity: 0; pointer-events: none; } .ML__focused .ML__empty-line-anchor.ML__selected::after { background: var(--_selection-background-color); opacity: 1; } .ML__selection { box-sizing: border-box; background: transparent; } :host(:focus) .ML__selection { background: var(--_selection-background-color) !important; } .ML__contains-caret.ML__close, .ML__contains-caret.ML__open, .ML__contains-caret > .ML__close, .ML__contains-caret > .ML__open, .ML__contains-caret .ML__sqrt-sign, .ML__contains-caret .ML__sqrt-line { color: var(--_contains-highlight-color); } .ML__contains-highlight { box-sizing: border-box; background: transparent; } .ML__focused .ML__contains-highlight { background: var(--_contains-highlight-background-color); } .ML__raw-latex { font-family: 'Berkeley Mono', 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace; font-weight: 400; font-size: 0.8em; letter-spacing: -0.05em; color: var(--_latex-color); } .ML__suggestion { color: var(--neutral-500); } .ML__virtual-keyboard-toggle.is-visible.is-pressed:hover { background: hsl(var(--_hue), 25%, 35%); color: #fafafa; fill: currentColor; } .ML__virtual-keyboard-toggle.is-pressed, .ML__virtual-keyboard-toggle.is-active:hover, .ML__virtual-keyboard-toggle.is-active { background: hsl(var(--_hue), 25%, 35%); color: #fafafa; fill: currentColor; } /* Add an attribute 'data-tooltip' to automatically show a tooltip over a element on hover. */ [data-tooltip] { position: relative; } [data-tooltip]::after { content: attr(data-tooltip); position: absolute; display: block; z-index: 2; pointer-events: none; right: auto; top: calc(-100% - 4px); width: max-content; max-width: 200px; padding: 8px 8px; border-radius: 4px; background: #616161; color: #fff; box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2); text-align: center; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-style: normal; font-weight: 400; font-size: 13px; /* Phone */ opacity: 0; transform: scale(0.5); } @media only screen and (max-width: 767px) { [data-tooltip]::after { padding: 8px 16px; font-size: 16px; } } menu [data-tooltip]::after { left: 100%; top: 0%; } menu .ML__base { cursor: default; } /** Don't display if we're tracking, i.e. have the pointer down */ .tracking [data-tooltip]:hover::after { /* Use visibility, not display. Display will remove the after from the DOM, and the override below will not work */ visibility: hidden; } /** But do display if tracking and inside a menu */ .tracking menu li[data-tooltip]:hover::after, [data-tooltip]:hover::after { visibility: visible; opacity: 1; transform: scale(1); transition-property: opacity, scale; transition-duration: 0.15s; transition-delay: 1s; transition-timing-function: cubic-bezier(0.4, 0, 1, 1); } .ML__prompt { border-radius: 2px; } .ML__editablePromptBox { outline: 1px solid #acacac; border-radius: 2px; z-index: -1; } .ML__focused .ML__focusedPromptBox { outline: highlight auto 1px; } .ML__lockedPromptBox { background-color: rgba(142, 142, 141, 0.4); z-index: -1; } .ML__correctPromptBox { outline: 1px solid var(--_correct-color); box-shadow: 0 0 5px var(--_correct-color); } .ML__incorrectPromptBox { outline: 1px solid var(--_incorrect-color); box-shadow: 0 0 5px var(--_incorrect-color); } .variant-submenu { display: flex; flex-direction: column; padding: 8px; } .variant-submenu [part='menu-item'].ML__xl { font-size: 2rem; text-align: center; margin: 0; } .ML__center-menu .label { text-align: center; } .insert-matrix-submenu { /* Grid doesn't work on Safari */ --_menu-item-size: 25px; width: calc(5 * var(--_menu-item-size)); display: flex; flex-wrap: wrap; padding: 8px; align-content: center; justify-content: center; } .insert-matrix-submenu [part='menu-item'] { width: var(--_menu-item-size); height: var(--_menu-item-size); font-size: 21px; border: none; border-radius: 0; line-height: 21px; text-align: center; padding: 0; margin: 0; } .border-submenu [part='menu-item'] { font-size: 2rem; line-height: 1.2; text-align: center; } .swatches-submenu { --_swatch-size: 2rem; --_columns: 4; display: flex; flex-flow: wrap; padding: 8px; max-width: calc(var(--_columns) * (var(--_swatch-size) + 18px) + 16px); box-sizing: border-box; } .menu-swatch { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: fit-content; height: fit-content; margin: 2px; padding: 0; background: var(--neutral-200); } .menu-swatch > .label { padding: 0; margin: 0; line-height: 0; } .menu-swatch > .label > span { display: inline-block; margin: 6px; min-width: var(--_swatch-size); min-height: var(--_swatch-size); border-radius: 50%; } .menu-swatch.active { background: var(--neutral-100); scale: 1.4; } .menu-swatch.active > .label > span { border-radius: 2px; } .menu-swatch .ui-checkmark, .menu-swatch .ui-mixedmark { position: absolute; margin: 0; padding: 0; color: white; } .menu-swatch.dark-contrast .ui-checkmark, .menu-swatch.dark-contrast .ui-mixedmark { color: #000; } .ML__insert-template { font-size: 1em; } .ML__insert-label { opacity: 0.5; margin-left: 2ex; } `,LMe=`.ML__container { min-height: auto !important; --_hue: var(--hue, 212); --_placeholder-color: var(--placeholder-color, hsl(var(--_hue), 40%, 49%)); --_placeholder-opacity: var(--placeholder-opacity, 0.4); --_text-font-family: var(--text-font-family, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif); } .ML__sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; } .ML__is-inline { display: inline-block; } .ML__base { visibility: inherit; display: inline-block; position: relative; cursor: text; padding: 0; margin: 0; box-sizing: content-box; border: 0; outline: 0; vertical-align: baseline; font-weight: inherit; font-family: inherit; font-style: inherit; text-decoration: none; width: min-content; } .ML__strut, .ML__strut--bottom { display: inline-block; min-height: 0.5em; } .ML__small-delim { font-family: KaTeX_Main; } /* Text mode */ .ML__text { font-family: var(--_text-font-family); white-space: pre; } /* Use cmr for 'math upright' */ .ML__cmr { font-family: KaTeX_Main; font-style: normal; } .ML__mathit { font-family: KaTeX_Math; /* The KaTeX_Math font is italic by default, so the font-style below is only useful when a fallback font is used */ font-style: italic; } .ML__mathbf { font-family: KaTeX_Main; font-weight: bold; } /* Lowercase greek symbols should stick to math font when \\mathbf is applied to match TeX idiosyncratic behavior */ .lcGreek.ML__mathbf { font-family: KaTeX_Math; } .ML__mathbfit { font-family: KaTeX_Math; font-weight: bold; font-style: italic; } .ML__ams { font-family: KaTeX_AMS; } /* Blackboard */ .ML__bb { font-family: KaTeX_AMS; } .ML__cal { font-family: KaTeX_Caligraphic; } .ML__frak { font-family: KaTeX_Fraktur; } .ML__tt { font-family: KaTeX_Typewriter; } .ML__script { font-family: KaTeX_Script; } .ML__sans { font-family: KaTeX_SansSerif; } .ML__series_ul { font-weight: 100; } .ML__series_el { font-weight: 100; } .ML__series_l { font-weight: 200; } .ML__series_sl { font-weight: 300; } .ML__series_sb { font-weight: 500; } .ML__bold { font-weight: 700; } .ML__series_eb { font-weight: 800; } .ML__series_ub { font-weight: 900; } .ML__series_uc { font-stretch: ultra-condensed; } .ML__series_ec { font-stretch: extra-condensed; } .ML__series_c { font-stretch: condensed; } .ML__series_sc { font-stretch: semi-condensed; } .ML__series_sx { font-stretch: semi-expanded; } .ML__series_x { font-stretch: expanded; } .ML__series_ex { font-stretch: extra-expanded; } .ML__series_ux { font-stretch: ultra-expanded; } .ML__it { font-style: italic; } .ML__shape_ol { -webkit-text-stroke: 1px black; text-stroke: 1px black; color: transparent; } .ML__shape_sc { font-variant: small-caps; } .ML__shape_sl { font-style: oblique; } /* First level emphasis */ .ML__emph { color: #bc2612; } /* Second level emphasis */ .ML__emph .ML__emph { color: #0c7f99; } .ML__highlight { color: #007cb2; background: #edd1b0; } .ML__center { text-align: center; } .ML__left { text-align: left; } .ML__right { text-align: right; } .ML__label_padding { padding: 0 0.5em; } .ML__frac-line { width: 100%; min-height: 1px; } .ML__frac-line:after { content: ''; display: block; margin-top: max(-1px, -0.04em); min-height: max(1px, 0.04em); /* Ensure the line is visible when printing even if "turn off background images" is on*/ -webkit-print-color-adjust: exact; print-color-adjust: exact; /* There's a bug since Chrome 62 where sub-pixel border lines don't draw at some zoom levels (110%, 90%). Setting the min-height used to work around it, but that workaround broke in Chrome 84 or so. Setting the background (and the min-height) seems to work for now. */ background: currentColor; box-sizing: content-box; /* Vuetify sets the box-sizing to inherit causes the fraction line to not draw at all sizes (see #26) */ /* On some versions of Firefox on Windows, the line fails to draw at some zoom levels, but setting the transform triggers the hardware accelerated path, which works */ transform: translate(0, 0); forced-color-adjust: preserve-parent-color; } @media (forced-colors: active) { .ML__frac-line { min-height: 0px; } } .ML__sqrt { display: inline-block; } .ML__sqrt-sign { display: inline-block; position: relative; } .ML__sqrt-line { display: inline-block; height: max(1px, 0.04em); width: 100%; } .ML__sqrt-line:before { content: ''; display: block; margin-top: min(-1px, -0.04em); min-height: max(1px, 0.04em); /* Ensure the line is visible when printing even if "turn off background images" is on*/ -webkit-print-color-adjust: exact; print-color-adjust: exact; background: currentColor; /* On some versions of Firefox on Windows, the line fails to draw at some zoom levels, but setting the transform triggers the hardware accelerated path, which works */ transform: translate(0, 0); forced-color-adjust: preserve-parent-color; } @media (forced-colors: active) { .ML__sqrt-line:after { background: white !important; } } .ML__sqrt-line:after { border-bottom-width: 1px; content: ' '; display: block; margin-top: -0.1em; } .ML__sqrt-index { margin-left: 0.27777778em; margin-right: -0.55555556em; } .ML__delim-size1 { font-family: KaTeX_Size1; } .ML__delim-size2 { font-family: KaTeX_Size2; } .ML__delim-size3 { font-family: KaTeX_Size3; } .ML__delim-size4 { font-family: KaTeX_Size4; } .ML__delim-mult .delim-size1 > span { font-family: KaTeX_Size1; } .ML__delim-mult .delim-size4 > span { font-family: KaTeX_Size4; } .ML__accent-body { font-family: KaTeX_Main; } .ML__accent-combining-char { position: relative; left: 0.24em; } /** The markup for a LaTeX formula, either in an editable mathfield or in a static display. */ .ML__latex { display: inline-block; direction: ltr; text-align: left; text-indent: 0; text-rendering: auto; font-family: inherit; font-style: normal; font-size-adjust: none; font-stretch: normal; font-variant-caps: normal; letter-spacing: normal; line-height: 1.2; word-wrap: normal; word-spacing: normal; white-space: nowrap; text-shadow: none; -webkit-user-select: none; user-select: none; width: min-content; forced-color-adjust: preserve-parent-color; } .ML__latex .style-wrap { position: relative; } .ML__latex .ML__mfrac { display: inline-block; } .ML__latex .ML__left-right { display: inline-block; } .ML__latex .ML__vlist-t { display: inline-table; table-layout: fixed; border-collapse: collapse; } .ML__latex .ML__vlist-r { display: table-row; } .ML__latex .ML__vlist { display: table-cell; vertical-align: bottom; position: relative; } .ML__latex .ML__vlist > span { display: block; height: 0; position: relative; } .ML__latex .ML__vlist > span > span { display: inline-block; } .ML__latex .ML__vlist > span > .ML__pstrut { overflow: hidden; width: 0; } .ML__latex .ML__vlist-t2 { margin-right: -2px; } .ML__latex .ML__vlist-s { display: table-cell; vertical-align: bottom; font-size: 1px; width: 2px; min-width: 2px; } .ML__latex .ML__msubsup { text-align: left; } .ML__latex .ML__negativethinspace { display: inline-block; margin-left: -0.16667em; height: 0.71em; } .ML__latex .ML__thinspace { display: inline-block; width: 0.16667em; height: 0.71em; } .ML__latex .ML__mediumspace { display: inline-block; width: 0.22222em; height: 0.71em; } .ML__latex .ML__thickspace { display: inline-block; width: 0.27778em; height: 0.71em; } .ML__latex .ML__enspace { display: inline-block; width: 0.5em; height: 0.71em; } .ML__latex .ML__quad { display: inline-block; width: 1em; height: 0.71em; } .ML__latex .ML__qquad { display: inline-block; width: 2em; height: 0.71em; } .ML__latex .ML__llap, .ML__latex .ML__rlap { width: 0; position: relative; display: inline-block; } .ML__latex .ML__llap > .ML__inner, .ML__latex .ML__rlap > .ML__inner { position: absolute; } .ML__latex .ML__llap > .ML__fix, .ML__latex .ML__rlap > .ML__fix { display: inline-block; } .ML__latex .ML__llap > .ML__inner { right: 0; } .ML__latex .ML__rlap > .ML__inner { left: 0; } .ML__latex .ML__rule { display: inline-block; border: solid 0; position: relative; box-sizing: border-box; } .ML__latex .overline .overline-line, .ML__latex .underline .underline-line { width: 100%; } .ML__latex .overline .overline-line:before, .ML__latex .underline .underline-line:before { content: ''; border-bottom-style: solid; border-bottom-width: max(1px, 0.04em); -webkit-print-color-adjust: exact; print-color-adjust: exact; display: block; } .ML__latex .overline .overline-line:after, .ML__latex .underline .underline-line:after { border-bottom-style: solid; border-bottom-width: max(1px, 0.04em); -webkit-print-color-adjust: exact; print-color-adjust: exact; content: ''; display: block; margin-top: -1px; } .ML__latex .ML__stretchy { display: block; position: absolute; width: 100%; left: 0; overflow: hidden; } .ML__latex .ML__stretchy:before, .ML__latex .ML__stretchy:after { content: ''; } .ML__latex .ML__stretchy svg { display: block; position: absolute; width: 100%; height: inherit; fill: currentColor; stroke: currentColor; fill-rule: nonzero; fill-opacity: 1; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0; stroke-opacity: 1; } .ML__latex .slice-1-of-2 { display: inline-flex; position: absolute; left: 0; width: 50.2%; overflow: hidden; } .ML__latex .slice-2-of-2 { display: inline-flex; position: absolute; right: 0; width: 50.2%; overflow: hidden; } .ML__latex .slice-1-of-3 { display: inline-flex; position: absolute; left: 0; width: 25.1%; overflow: hidden; } .ML__latex .slice-2-of-3 { display: inline-flex; position: absolute; left: 25%; width: 50%; overflow: hidden; } .ML__latex .slice-3-of-3 { display: inline-flex; position: absolute; right: 0; width: 25.1%; overflow: hidden; } .ML__latex .slice-1-of-1 { display: inline-flex; position: absolute; width: 100%; left: 0; overflow: hidden; } .ML__latex .ML__nulldelimiter { display: inline-block; } .ML__latex .ML__op-group { display: inline-block; } .ML__latex .ML__op-symbol { position: relative; } .ML__latex .ML__op-symbol.ML__small-op { font-family: KaTeX_Size1; } .ML__latex .ML__op-symbol.ML__large-op { font-family: KaTeX_Size2; } .ML__latex:has(.ML__center_environment), .ML__latex:has(.ML__multiline_environment), .ML__latex:has(.ML__align_environment), .ML__latex:has(.ML__eqnarray_environment), .ML__latex:has(.ML__gather_environment) { width: 100%; } .ML__latex .ML__multiline_environment { display: inline-flex; width: 100%; } .ML__latex .ML__center_environment { display: inline-flex; width: 100%; justify-content: center; } .ML__latex .ML__align_environment, .ML__latex .ML__eqnarray_environment, .ML__latex .ML__gather_environment { display: inline-block; } .ML__latex .ML__mtable .ML__vertical-separator { display: inline-block; min-width: 1px; box-sizing: border-box; } .ML__latex .ML__mtable .ML__arraycolsep { display: inline-block; } .ML__latex .ML__mtable .col-align-m > .ML__vlist-t { text-align: center; } .ML__latex .ML__mtable .col-align-c > .ML__vlist-t { text-align: center; } .ML__latex .ML__mtable .col-align-l > .ML__vlist-t { text-align: left; } .ML__latex .ML__mtable .col-align-r > .ML__vlist-t { text-align: right; } [data-href] { cursor: pointer; } .ML__error { display: inline-block; background-image: radial-gradient(ellipse at center, hsl(341, 100%, 40%), rgba(0, 0, 0, 0) 70%); background-color: hsla(341, 100%, 40%, 0.1); background-repeat: repeat-x; background-size: 3px 3px; padding-bottom: 3px; background-position: 0 100%; } .ML__error > .ML__error { background: transparent; padding: 0; } .ML__placeholder { color: var(--_placeholder-color); opacity: var(--_placeholder-opacity); padding-left: 0.4ex; padding-right: 0.4ex; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; } .ML__notation { position: absolute; box-sizing: border-box; line-height: 0; } /* This class is used to implement the \`\\mathtip\` and \`\\texttip\` commands For UI elements, see \`[data-ML__tooltip]\` */ .ML__tooltip-container { position: relative; transform: scale(0); } .ML__tooltip-container .ML__tooltip-content { position: fixed; display: inline-table; visibility: hidden; z-index: 2; width: max-content; max-width: 400px; padding: 12px 12px; border: var(--_tooltip-border); border-radius: var(--_tooltip-border-radius); background: var(--_tooltip-background-color); --_selection-color: var(--_tooltip-color); color: var(--_tooltip-color); box-shadow: var(--_tooltip-box-shadow); opacity: 0; transition: opacity 0.15s cubic-bezier(0.4, 0, 1, 1); } .ML__tooltip-container .ML__tooltip-content .ML__text { white-space: normal; } .ML__tooltip-container .ML__tooltip-content .ML__base { display: contents; } .ML__tooltip-container:hover .ML__tooltip-content { visibility: visible; opacity: 1; font-size: 0.75em; transform: scale(1) translate(0, 3em); } .ML__bg { background-color: transparent !important; } .ML__bg::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--bg-color); z-index: -1; box-sizing: border-box; } `,wMe=`#mathlive-environment-popover.is-visible { visibility: visible; } #mathlive-environment-popover { --_environment-panel-height: var(--environment-panel-height, 70px); --_accent-color: var(--accent-color, #aaa); --_background: var(--environment-panel-background, #fff); --_button-background: var(--environment-panel-button-background, white); --_button-background-hover: var(--environment-panel-button-background-hover, #f5f5f7); --_button-background-active: var(--environment-panel-button-background-active, #f5f5f7); --_button-text: var(--environment-panel-button-text, #e3e4e8); position: absolute; width: calc(var(--_environment-panel-height) * 2); height: var(--_environment-panel-height); border-radius: 4px; border: 1.5px solid var(--_accent-color); background-color: var(--_background); box-shadow: 0 0 30px 0 var(--environment-shadow, rgba(0, 0, 0, 0.4)); pointer-events: all; visibility: hidden; } #mathlive-environment-popover .MLEP__array-buttons { height: calc(var(--_environment-panel-height) * 5/4); width: calc(var(--_environment-panel-height) * 5/4); margin-left: calc(0px - var(--_environment-panel-height) * 0.16); margin-top: calc(0px - var(--_environment-panel-height) * 0.19); } #mathlive-environment-popover .MLEP__array-buttons .font { fill: white; } #mathlive-environment-popover .MLEP__array-buttons circle { fill: #7f7f7f; transition: fill 300ms; } #mathlive-environment-popover .MLEP__array-buttons .MLEP__array-insert-background { fill-opacity: 1; fill: var(--_background); stroke: var(--_accent-color); stroke-width: 3px; } #mathlive-environment-popover .MLEP__array-buttons line { stroke: var(--_accent-color); stroke-opacity: 0; stroke-width: 40; pointer-events: none; transition: stroke-opacity 300ms; stroke-linecap: round; } #mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover circle { fill: var(--_accent-color); } #mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover line { stroke-opacity: 1; } #mathlive-environment-popover .MLEP__environment-delimiter-controls { height: 100%; width: 50%; } #mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options { width: var(--_environment-panel-height); height: var(--_environment-panel-height); display: flex; flex-wrap: wrap; flex-direction: row; justify-content: space-around; } #mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg { pointer-events: all; margin-top: 2px; width: calc(var(--_environment-panel-height) / 3 * 28 / 24); height: calc(var(--_environment-panel-height) / 3 - 2px); border-radius: calc(var(--_environment-panel-height) / 25); background-color: var(--_button-background); } #mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg:hover { background-color: var(--_button-background-hover); } #mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path, #mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg line { stroke: var(--_button-text); stroke-width: 2; stroke-linecap: round; } #mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg rect, #mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path { fill-opacity: 0; } #mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active { pointer-events: none; background-color: var(--_button-background-active); } #mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active path, #mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active line { stroke: var(--_accent-color); } #mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active circle { fill: var(--_accent-color); } `,UMe=`/* The element that display info while in latex mode */ #mathlive-suggestion-popover { --_suggestion-zindex: var(--suggestion-zindex, 100); background-color: rgba(97, 97, 97); color: #fff; text-align: center; border-radius: 8px; position: fixed; z-index: var(--_suggestion-zindex); display: none; flex-direction: column; justify-content: center; box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); } #mathlive-suggestion-popover.top-tip::after { content: ''; position: absolute; top: -15px; left: calc(50% - 15px); width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-bottom: 15px solid rgba(97, 97, 97); font-size: 1rem; } #mathlive-suggestion-popover.bottom-tip::after { content: ''; position: absolute; bottom: -15px; left: calc(50% - 15px); width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 15px solid rgba(97, 97, 97); font-size: 1rem; } #mathlive-suggestion-popover.is-animated { transition: all 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); animation: ML__fade-in cubic-bezier(0, 0, 0.2, 1) 0.15s; } #mathlive-suggestion-popover.is-visible { display: flex; } @keyframes ML__fade-in { from { opacity: 0; } to { opacity: 1; } } /* The wrapper class for the entire content of the popover panel */ #mathlive-suggestion-popover ul { display: flex; flex-flow: column; list-style: none; margin: 0; padding: 0; align-items: flex-start; max-height: 400px; overflow-y: auto; } #mathlive-suggestion-popover li { display: flex; flex-direction: row; justify-content: space-between; margin: 8px; padding: 8px; width: calc(100% - 16px - 16px); column-gap: 1em; border-radius: 8px; cursor: pointer; /* Since the content can be clicked on, provide feedback on hover */ } #mathlive-suggestion-popover li a { color: #5ea6fd; padding-top: 0.3em; margin-top: 0.4em; display: block; } #mathlive-suggestion-popover li a:hover { color: #5ea6fd; text-decoration: underline; } #mathlive-suggestion-popover li:hover, #mathlive-suggestion-popover li.is-pressed, #mathlive-suggestion-popover li.is-active { background: rgba(255, 255, 255, 0.1); } /* The command inside a popover (inside a #mathlive-suggestion-popover) */ .ML__popover__command { font-size: 1.6rem; font-family: KaTeX_Main; } .ML__popover__current { background: #5ea6fd; color: #fff; } .ML__popover__latex { font-family: 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace; align-self: center; } /* The keyboard shortcuts for a symbol as displayed in the popover */ .ML__popover__keybinding { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 0.8em; opacity: 0.7; } /* Style for the character that joins the modifiers of a keyboard shortcut (usually a "+" sign)*/ .ML__shortcut-join { opacity: 0.5; } `,YMe=`/* The element that displays the keys as the user type them */ #mathlive-keystroke-caption-panel { visibility: hidden; /*min-width: 160px;*/ /*background-color: rgba(97, 97, 200, .95);*/ background: var(--secondary, hsl(var(--_hue), 19%, 26%)); border-color: var(--secondary-border, hsl(0, 0%, 91%)); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); text-align: center; border-radius: 6px; padding: 16px; position: absolute; z-index: 1; display: flex; flex-direction: row-reverse; justify-content: center; --keystroke: white; --on-keystroke: #555; --keystroke-border: #f7f7f7; } @media (prefers-color-scheme: dark) { body:not([theme='light']) #mathlive-keystroke-caption-panel { --keystroke: hsl(var(--_hue), 50%, 30%); --on-keystroke: hsl(0, 0%, 98%); --keystroke-border: hsl(var(--_hue), 50%, 25%); } } body[theme='dark'] #mathlive-keystroke-caption-panel { --keystroke: hsl(var(--_hue), 50%, 30%); --on-keystroke: hsl(0, 0%, 98%); --keystroke-border: hsl(var(--_hue), 50%, 25%); } #mathlive-keystroke-caption-panel > span { min-width: 14px; /*height: 8px;*/ margin: 0 8px 0 0; padding: 4px; background-color: var(--keystroke); color: var(--on-keystroke); fill: currentColor; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 1em; border-radius: 6px; border: 2px solid var(--keystroke-border); /*box-shadow: 0 7px 14px rgba(0,0,0,0.25), 0 5px 5px rgba(0,0,0,0.22);*/ } `,EMe=`.ML__keyboard { --_keyboard-height: 0; --_keyboard-zindex: var(--keyboard-zindex, 105); --_accent-color: var(--keyboard-accent-color, #0c75d8); --_background: var(--keyboard-background, #cacfd7); --_border: var(--keyboard-border, #ddd); --_padding-horizontal: var(--keyboard-padding-horizontal, 0px); --_padding-top: var(--keyboard-padding-top, 5px); --_padding-bottom: var(--keyboard-padding-bottom, 0px); --_row-padding-left: var(--keyboard-row-padding-left, 0px); --_row-padding-right: var(--keyboard-row-padding-right, 0px); --_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f); --_toolbar-text-active: var(--keyboard-toolbar-text-active, var(--_accent-color)); --_toolbar-background: var(--keyboard-toolbar-background, transparent); --_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee); --_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent); --_toolbar-font-size: var(--keyboard-toolbar-font-size, '135%'); --_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff); --_keycap-background: var(--keycap-background, #f0f0f0); --_keycap-background-hover: var(--keycap-background-hover, #f5f5f7); --_keycap-background-active: var(--keycap-background-active, var(--_accent-color)); --_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color)); --_keycap-border: var(--keycap-border, #e5e6e9); --_keycap-border-bottom: var(--keycap-border-bottom, #8d8f92); --_keycap-text: var(--keycap-text, #000); --_keycap-text-active: var(--keycap-text-active, #fff); --_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text)); --_keycap-text-pressed: var(--keycap-text-pressed, #fff); --_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color)); --_keycap-primary-background: var(--keycap-primary-background, var(--_accent-color)); --_keycap-primary-text: var(--keycap-primary-text, #ddd); --_keycap-primary-background-hover: var(--keycap-primary-background-hover, #0d80f2); --_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8); --_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795); --_keycap-secondary-text: var(--keycap-secondary-text, #060707); --_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0); --_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6); --_keycap-height: var(--keycap-height, 60px); /* Keycap width (incl. margin) */ --_keycap-max-width: var(--keycap-max-width, 100px); --_keycap-gap: var(--keycap-gap, 8px); --_keycap-font-size: var(--keycap-font-size, clamp(16px, 4cqw, 24px)); --_keycap-small-font-size: var(--keycap-small-font-size, calc(var(--keycap-font-size) * 0.8)); --_keycap-extra-small-font-size: var(--keycap-extra-small-font-size, calc(var(--keycap-font-size) / 1.42)); --_variant-panel-background: var(--variant-panel-background, #f0f0f0); --_variant-keycap-text: var(--variant-keycap-text, var(--_keycap-text)); --_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active)); --_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color)); --_variant-keycap-length: var(--variant-keycap-length, 70px); --_variant-keycap-font-size: var(--variant-keycap-font-size, 30px); --_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 12px); --_keycap-shift-font-size: var(--keycap-shift-font-size, 16px); --_keycap-shift-color: var(--keycap-shift-color, var(--_accent-color)); --_box-placeholder-color: var(--box-placeholder-color, var(--_accent-color)); --_box-placeholder-pressed-color: var(--box-placeholder-pressed-color, var(--keycap-text-pressed)); --_keycap-glyph-size: var(--keycap-glyph-size, 20px); --_keycap-glyph-size-lg: var(--keycap-glyph-size-lg, 24px); --_keycap-glyph-size-xl: var(--keycap-glyph-size-xl, 50px); } .is-math-mode .MLK__rows .if-text-mode, .is-text-mode .MLK__rows .if-math-mode { display: none; } .if-can-undo, .if-can-redo, .if-can-copy, .if-can-cut, .if-can-paste { opacity: 0.4; pointer-events: none; } .can-undo .if-can-undo, .can-redo .if-can-redo, .can-copy .if-can-copy, .can-cut .if-can-cut, .can-paste .if-can-paste { opacity: 1; pointer-events: all; } body > .ML__keyboard { position: fixed; --_padding-bottom: calc(var(--keyboard-padding-bottom, 0px) + env(safe-area-inset-bottom, 0)); } body > .ML__keyboard.is-visible > .MLK__backdrop { box-shadow: 0 -5px 6px rgba(0, 0, 0, 0.08); border-top: 1px solid var(--_border); } body > .ML__keyboard.backdrop-is-transparent.is-visible > .MLK__backdrop { box-shadow: none; border: none; } body > .ML__keyboard.is-visible.animate > .MLK__backdrop { transition: 0.28s cubic-bezier(0, 0, 0.2, 1); transition-property: transform, opacity; transition-timing-function: cubic-bezier(0.4, 0, 1, 1); } .ML__keyboard { position: relative; overflow: hidden; top: 0; left: 0; height: 100%; width: 100%; z-index: var(--_keyboard-zindex); box-sizing: border-box; outline: none; border: none; margin: 0; padding: 0; line-height: 1; overflow-wrap: unset; text-align: left; vertical-align: baseline; cursor: auto; white-space: pre; box-shadow: none; opacity: 1; transform: none; pointer-events: none; } .ML__keyboard :where(div) { box-sizing: border-box; outline: none; border: none; margin: 0; padding: 0; line-height: 1; overflow-wrap: unset; text-align: left; vertical-align: baseline; cursor: auto; white-space: pre; box-shadow: none; transform: none; } .MLK__backdrop { position: absolute; bottom: calc(-1 * var(--_keyboard-height)); width: 100%; height: var(--_keyboard-height); box-sizing: border-box; padding-top: var(--_padding-top); padding-bottom: var(--_padding-bottom); padding-left: var(--_padding-horizontal); padding-right: var(--_padding-horizontal); opacity: 0; visibility: hidden; transform: translate(0, 0); background: var(--_background); } .backdrop-is-transparent .MLK__backdrop { background: transparent; } /* If a custom layout has a custom container/backdrop (backdrop-is-transparent), make sure to let pointer event go through. */ .backdrop-is-transparent .MLK__plate { background: transparent; pointer-events: none; } /* If a custom layout has a custom container/backdrop, make sure to allow pointer events on it. */ .backdrop-is-transparent .MLK__layer > div > div { pointer-events: all; } .ML__keyboard.is-visible > .MLK__backdrop { transform: translate(0, calc(-1 * var(--_keyboard-height))); opacity: 1; visibility: visible; } .caps-lock-indicator { display: none; width: 8px; height: 8px; background: #0cbc0c; box-shadow: inset 0 0 4px 0 #13ca13, 0 0 4px 0 #a9ef48; border-radius: 8px; right: 8px; top: 8px; position: absolute; } .ML__keyboard.is-caps-lock .caps-lock-indicator { display: block; } .ML__keyboard.is-caps-lock .shift { background: var(--_keycap-background-active); color: var(--_keycap-text-active); } .MLK__plate { position: absolute; top: var(--_padding-top); left: var(--_padding-horizontal); width: calc(100% - 2 * var(--_padding-horizontal)); margin: 0; padding: 0; box-sizing: border-box; container-type: inline-size; touch-action: none; -webkit-user-select: none; user-select: none; pointer-events: all; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 16px; /* Size of toolbar labels */ font-weight: 400; text-shadow: none; } .ML__box-placeholder { color: var(--_box-placeholder-color); } .MLK__tex { font-family: KaTeX_Main, KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important; } .MLK__tex-math { font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important; font-style: italic; } .MLK__layer { display: none; outline: none; } .MLK__layer.is-visible { display: flex; flex-flow: column; } /* Keyboard layouts are made or rows of keys... */ .MLK__rows { --_keycap-width: var(--keycap-width, min(var(--_keycap-max-width), 10cqw)); display: flex; flex-flow: column; align-items: center; border-collapse: separate; clear: both; border: 0; margin: 0; margin-bottom: var(--_keycap-gap); gap: var(--_keycap-gap); /* If the styling include, e.g., some shadows, they will be cut off by the overflow. In that case, set the padding to compensate. */ padding-left: var(--_row-padding-left); padding-right: var(--_row-padding-right); overflow: visible; touch-action: none; } .MLK__rows > .MLK__row { display: flex; flex-flow: row; justify-content: center; width: 100%; gap: var(--_keycap-gap); margin: 0; padding: 0; /* For the alignment of the text on some modifiers (e.g. shift) */ /* Extra spacing between two adjacent keys */ } .MLK__rows > .MLK__row .tex { font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important; } .MLK__rows > .MLK__row .tex-math { font-family: KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important; } .MLK__rows > .MLK__row .big-op { font-size: calc(1.25 * var(--_keycap-font-size)); } .MLK__rows > .MLK__row .small { font-size: var(--_keycap-small-font-size); } .MLK__rows > .MLK__row .bottom { justify-content: flex-end; } .MLK__rows > .MLK__row .left { align-items: flex-start; padding-left: 12px; } .MLK__rows > .MLK__row .right { align-items: flex-end; padding-right: 12px; } .MLK__rows > .MLK__row .w0 { width: 0; } .MLK__rows > .MLK__row .w5 { width: calc(0.5 * var(--_keycap-width) - var(--_keycap-gap)); } .MLK__rows > .MLK__row .w15 { width: calc(1.5 * var(--_keycap-width) - var(--_keycap-gap)); } .MLK__rows > .MLK__row .w20 { width: calc(2 * var(--_keycap-width) - var(--_keycap-gap)); } .MLK__rows > .MLK__row .w40 { width: calc(4 * var(--_keycap-width) - var(--_keycap-gap)); } .MLK__rows > .MLK__row .w50 { width: calc(5 * var(--_keycap-width) - var(--_keycap-gap)); } .MLK__rows > .MLK__row .MLK__keycap.w50 { font-size: 80%; padding-top: 10px; font-weight: 100; } .MLK__rows > .MLK__row .separator { background: transparent; border: none; pointer-events: none; } .MLK__rows > .MLK__row .horizontal-rule { height: 6px; margin-top: 3px; margin-bottom: 0; width: 100%; border-radius: 0; border-top: var(--_horizontal-rule); } .MLK__rows > .MLK__row .ghost { background: var(--_toolbar-background); border: none; color: var(--_toolbar-text); } .MLK__rows > .MLK__row .ghost:hover { background: var(--_toolbar-background-hover); } .MLK__rows > .MLK__row .bigfnbutton { font-size: var(--_keycap-extra-small-font-size); } .MLK__rows > .MLK__row .shift, .MLK__rows > .MLK__row .action { color: var(--_keycap-secondary-text); background: var(--_keycap-secondary-background); border-color: var(--_keycap-secondary-border); border-bottom-color: var(--_keycap-secondary-border-bottom); line-height: 0.8; font-size: min(1rem, var(--_keycap-small-font-size)); font-weight: 600; padding: 8px 12px 8px 12px; } .MLK__rows > .MLK__row .shift:hover, .MLK__rows > .MLK__row .action:hover { background: var(--_keycap-secondary-background-hover); } .MLK__rows > .MLK__row .action.primary { background: var(--_keycap-primary-background); color: var(--_keycap-primary-text); } .MLK__rows > .MLK__row .action.primary:hover { background: var(--_keycap-primary-background-hover); color: var(--_keycap-primary-text); } .MLK__rows > .MLK__row .shift.selected, .MLK__rows > .MLK__row .action.selected { color: var(--_toolbar-text-active); } .MLK__rows > .MLK__row .shift.selected.is-pressed, .MLK__rows > .MLK__row .action.selected.is-pressed, .MLK__rows > .MLK__row .shift.selected.is-active, .MLK__rows > .MLK__row .action.selected.is-active { color: white; } .MLK__rows > .MLK__row .warning { background: #cd0030; color: white; } .MLK__rows > .MLK__row .warning svg.svg-glyph { width: var(--_keycap-glyph-size-lg); height: var(--_keycap-glyph-size-lg); min-height: var(--_keycap-glyph-size-lg); } /** A regular keycap * Use the :where() pseudo-class to give it a very low specifity, * so that it can be overriden by custom style. */ :where(.MLK__rows > .MLK__row div) { display: flex; flex-flow: column; align-items: center; justify-content: space-evenly; width: calc(var(--_keycap-width) - var(--_keycap-gap)); height: var(--_keycap-height); box-sizing: border-box; padding: 0; vertical-align: top; text-align: center; float: left; color: var(--_keycap-text); fill: currentColor; font-size: var(--_keycap-font-size); background: var(--_keycap-background); border: 1px solid var(--_keycap-border); border-bottom-color: var(--_keycap-border-bottom); border-radius: 6px; cursor: pointer; touch-action: none; /* Keys with a variants panel */ position: relative; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; } :where(.MLK__rows > .MLK__row div):hover { overflow: visible; background: var(--_keycap-background-hover); color: var(--_keycap-text-hover); } :where(.MLK__rows > .MLK__row div) .ML__latex { pointer-events: none; touch-action: none; } :where(.MLK__rows > .MLK__row div) svg.svg-glyph { margin: 8px 0; width: var(--_keycap-glyph-size); height: var(--_keycap-glyph-size); min-height: var(--_keycap-glyph-size); } :where(.MLK__rows > .MLK__row div) svg.svg-glyph-lg { margin: 8px 0; width: var(--_keycap-glyph-size-lg); height: var(--_keycap-glyph-size-lg); min-height: var(--_keycap-glyph-size-lg); } :where(.MLK__rows > .MLK__row div).MLK__tex-math { font-size: 25px; } :where(.MLK__rows > .MLK__row div).is-pressed { background: var(--_keycap-background-pressed); color: var(--_keycap-text-pressed); --_box-placeholder-color: var(--_box-placeholder-pressed-color); } :where(.MLK__rows > .MLK__row div).MLK__keycap.is-active, :where(.MLK__rows > .MLK__row div).action.is-active, :where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed, :where(.MLK__rows > .MLK__row div).action.is-pressed { z-index: calc(var(--_keyboard-zindex) - 5); } :where(.MLK__rows > .MLK__row div).MLK__keycap.is-active aside, :where(.MLK__rows > .MLK__row div).action.is-active aside, :where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed aside, :where(.MLK__rows > .MLK__row div).action.is-pressed aside { display: none; } :where(.MLK__rows > .MLK__row div).MLK__keycap.is-active .MLK__shift, :where(.MLK__rows > .MLK__row div).action.is-active .MLK__shift, :where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed .MLK__shift, :where(.MLK__rows > .MLK__row div).action.is-pressed .MLK__shift { display: none; } :where(.MLK__rows > .MLK__row div).shift.is-pressed, :where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed, :where(.MLK__rows > .MLK__row div).action.is-pressed { background: var(--_keycap-background-pressed); color: var(--_keycap-text-pressed); } :where(.MLK__rows > .MLK__row div).shift.is-active, :where(.MLK__rows > .MLK__row div).MLK__keycap.is-active, :where(.MLK__rows > .MLK__row div).action.is-active { background: var(--_keycap-background-active); color: var(--_keycap-text-active); --_box-placeholder-color: var(--_box-placeholder-pressed-color); } :where(.MLK__rows > .MLK__row div) small { color: var(--_keycap-secondary-text); } :where(.MLK__rows > .MLK__row div) aside { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 10px; line-height: 10px; color: var(--_keycap-secondary-text); } /* Add an attribute 'data-tooltip' to display a tooltip on hover. Note there are a different set of tooltip rules for the keyboard toggle (it's in a different CSS tree) */ .ML__keyboard [data-tooltip] { position: relative; } .ML__keyboard [data-tooltip]::after { position: absolute; display: inline-table; content: attr(data-tooltip); top: inherit; bottom: 100%; width: max-content; max-width: 200px; padding: 8px 8px; background: #616161; color: #fff; text-align: center; z-index: 2; box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2); border-radius: 2px; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-weight: 400; font-size: 12px; transition: all 0.15s cubic-bezier(0.4, 0, 1, 1) 1s; opacity: 0; transform: scale(0.5); } .ML__keyboard [data-tooltip]:hover { position: relative; } .ML__keyboard [data-tooltip]:hover::after { opacity: 1; transform: scale(1); } .MLK__toolbar { align-self: center; display: flex; flex-flow: row; justify-content: space-between; width: 100%; max-width: 996px; min-height: 32px; /* Icons for undo/redo, etc. */ } .MLK__toolbar svg { height: 20px; width: 20px; } .MLK__toolbar > .left { position: relative; display: flex; justify-content: flex-start; flex-flow: row; } .MLK__toolbar > .right { display: flex; justify-content: flex-end; flex-flow: row; } .MLK__toolbar > div > div { /* "button" in the toolbar */ display: flex; align-items: center; justify-content: center; color: var(--_toolbar-text); fill: currentColor; background: var(--_toolbar-background); font-size: var(--_toolbar-font-size); padding: 4px 15px; cursor: pointer; width: max-content; min-width: 42px; min-height: 34px; border: none; padding-left: 10px; padding-right: 10px; padding-bottom: 8px; padding-top: 8px; margin-top: 0; margin-bottom: 4px; margin-left: 4px; margin-right: 4px; border-radius: 8px; box-shadow: none; border-bottom: 2px solid transparent; } .MLK__toolbar > div > div:not(.disabled):not(.selected):hover { background: var(--_toolbar-background-hover); } .MLK__toolbar > div > div.disabled svg, .MLK__toolbar > div > div.disabled:hover svg, .MLK__toolbar > div > div.disabled.is-pressed svg { color: var(--_toolbar-text); opacity: 0.2; } .MLK__toolbar > div > div:hover, .MLK__toolbar > div > div:active, .MLK__toolbar > div > div.is-pressed, .MLK__toolbar > div > div.is-active { color: var(--_toolbar-text-active); } .MLK__toolbar > div > div.selected { color: var(--_toolbar-text-active); background: var(--_toolbar-background-selected); border-radius: 0; border-bottom-color: var(--_toolbar-text-active); padding-bottom: 4px; margin-bottom: 8px; } /* This is the element that displays variants on press+hold */ .MLK__variant-panel { visibility: hidden; position: fixed; display: flex; flex-flow: row wrap-reverse; justify-content: center; align-content: center; margin: 0; padding: 0; bottom: auto; top: 0; box-sizing: content-box; transform: none; z-index: calc(var(--_keyboard-zindex) + 1); touch-action: none; max-width: 350px; background: var(--_variant-panel-background); text-align: center; border-radius: 6px; padding: 6px; box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); transition: none; } .MLK__variant-panel.is-visible { visibility: visible; } .MLK__variant-panel.compact { --_variant-keycap-length: var(--variant-keycap-length, 50px); --_variant-keycap-font-size: var(--variant-keycap-font-size, 24px); --_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 10px); } .MLK__variant-panel .item { display: flex; flex-flow: column; align-items: center; justify-content: center; font-size: var(--_variant-keycap-font-size); height: var(--_variant-keycap-length); width: var(--_variant-keycap-length); margin: 0; box-sizing: border-box; border-radius: 5px; border: 1px solid transparent; background: transparent; pointer-events: all; cursor: pointer; color: var(--_variant-keycap-text); fill: currentColor; } @media (max-height: 412px) { .MLK__variant-panel .item { --_variant-keycap-font-size: var(--variant-keycap-font-size, 24px); --_variant-keycap-length: var(--variant-keycap-length, 50px); } } .MLK__variant-panel .item .ML__latex { pointer-events: none; } .MLK__variant-panel .item:hover { color: var(--_keycap-text-hover); } .MLK__variant-panel .item.is-active { background: var(--_variant-keycap-background-active); color: var(--_variant-keycap-text-active); --_box-placeholder-color: var(--_box-placeholder-pressed-color); } .MLK__variant-panel .item.is-pressed { background: var(--_variant-keycap-background-pressed); color: var(--_variant-keycap-text-pressed); --_box-placeholder-color: var(--_box-placeholder-pressed-color); } .MLK__variant-panel .item.small { font-size: var(--_keycap-small-font-size); } .MLK__variant-panel .item.swatch-button { box-sizing: border-box; background: #fbfbfb; } .MLK__variant-panel .item.swatch-button > span { display: inline-block; margin: 6px; width: calc(100% - 12px); height: calc(100% - 12px); border-radius: 50%; } .MLK__variant-panel .item.swatch-button:hover { background: #f0f0f0; } .MLK__variant-panel .item.swatch-button:hover > span { border-radius: 2px; } .MLK__variant-panel .item.box > div, .MLK__variant-panel .item.box > span { border: 1px dashed rgba(0, 0, 0, 0.24); } .MLK__variant-panel .item .warning { min-height: 60px; min-width: 60px; background: #cd0030; color: white; padding: 5px; display: flex; align-items: center; justify-content: center; border-radius: 5px; } .MLK__variant-panel .item .warning.is-pressed, .MLK__variant-panel .item .warning.is-active { background: red; } .MLK__variant-panel .item .warning svg.svg-glyph { width: var(--_keycap-glyph-size-xl); height: var(--_keycap-glyph-size-xl); } .MLK__variant-panel .item aside { font-size: var(--_variant-keycap-aside-font-size); line-height: 12px; opacity: 0.78; padding-top: 2px; width: 100%; text-align: center; text-wrap: wrap; } .MLK__keycap { position: relative; } .MLK__shift { display: block; position: absolute; right: 4px; top: 4px; font-size: var(--_keycap-shift-font-size); color: var(--_keycap-shift-color); } .hide-shift .MLK__shift { display: none; } @media (max-width: 414px) { .MLK__variant-panel { max-width: 350px; --_variant-keycap-font-size: var(--variant-keycap-font-size, 24px); --_variant-keycap-length: var(--variant-keycap-length, 50px); } } /* @xs breakpoint: iPhone 5 */ @container (max-width: 414px) { .MLK__rows { --_keycap-gap: max(var(--_keycap-gap, 2px), 2px); --_keycap-height: var(--keycap-height, 42px); --_keycap-width: var(--keycap-width, min(min(var(--_keycap-max-width)), 10cqw), 62px)); } .MLK__toolbar > div > div { font-size: 100%; margin-left: 2px; margin-right: 2px; } .MLK__rows .shift, .MLK__rows .action { font-size: 65%; } .MLK__rows .warning svg.svg-glyph { width: 14px; height: 14px; min-height: 14px; } } @container (max-width: 744px) { .MLK__rows { --_keycap-gap: max(var(--keycap-gap, 2px), 2px); --_keycap-height: var(--keycap-height, 52px); --_keycap-width: var(--keycap-width, min(min(var(--_keycap-max-width), 10cqw), 62px)); } .MLK__toolbar > div > div { padding-left: 0; padding-right: 0; } .MLK__tooltip::after { padding: 8px 16px; font-size: 16px; } .MLK__rows > .MLK__row > div.fnbutton { font-size: 16px; } .MLK__rows > .MLK__row > div.bigfnbutton { font-size: calc(var(--_keycap-extra-small-font-size) / 1.55); } .MLK__rows > .MLK__row > div.small { font-size: 13px; } .MLK__rows > .MLK__row > div > aside { display: none; } .MLK__shift { display: none; } } /* Medium breakpoint: larger phones */ @container (max-width: 768px) { .MLK__rows { --_keycap-height: var(--keycap-height, 42px); } .MLK__rows > .MLK__row > div > small { font-size: 14px; } } @media (max-height: 768px) { .MLK__rows { --_keycap-height: var(--keycap-height, 42px); } .MLK__rows > .MLK__row > div > small { font-size: 14px; } } @container (max-width: 1444px) { .MLK__rows .if-wide { display: none; } } @media (prefers-color-scheme: dark) { .ML__keyboard { --_accent-color: var(--keyboard-accent-color, #0b5c9c); --_background: var(--keyboard-background, #151515); --_border: var(--keyboard-border, transparent); --_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8); --_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030); --keyboard-toolbar-background-hover: #303030; --_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030); --_keycap-background: var(--keycap-background, #1f2022); --_keycap-background-hover: var(--keycap-background-hover, #2f3032); --_keycap-border: var(--_keycap-border, transparent); --_keycap-border-bottom: var(--_keycap-border-bottom, transparent); --_keycap-text: var(--keycap-text, #e3e4e8); --_keycap-secondary-background: var(--keycap-secondary-background, #3d4144); --_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154); --_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee); --keycap-secondary-border: transparent; --keycap-secondary-border-bottom: transparent; --_keycap-secondary-border: var(--keycap-secondary-border, transparent); --_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent); --_variant-panel-background: var(--variant-panel-background, #303030); --_variant-keycap-text-active: var(--variant-keycap-text-active, #fff); } } /* Same as the media query, but with a class */ [theme='dark'] .ML__keyboard { --_accent-color: var(--keyboard-accent-color, #0b5c9c); --_background: var(--keyboard-background, #151515); --_border: var(--keyboard-border, transparent); --_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8); --_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030); --keyboard-toolbar-background-hover: #303030; --_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030); --_keycap-background: var(--keycap-background, #1f2022); --_keycap-background-hover: var(--keycap-background-hover, #2f3032); --_keycap-border: var(--_keycap-border, transparent); --_keycap-border-bottom: var(--_keycap-border-bottom, transparent); --_keycap-text: var(--keycap-text, #e3e4e8); --_keycap-secondary-background: var(--keycap-secondary-background, #3d4144); --_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154); --_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee); --keycap-secondary-border: transparent; --keycap-secondary-border-bottom: transparent; --_keycap-secondary-border: var(--keycap-secondary-border, transparent); --_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent); --_variant-panel-background: var(--variant-panel-background, #303030); --_variant-keycap-text-active: var(--variant-keycap-text-active, #fff); } [theme='light'] .ML__keyboard { --_accent-color: var(--keyboard-accent-color, #0c75d8); --_background: var(--keyboard-background, #cacfd7); --_border: var(--keyboard-border, #ddd); --_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f); --_toolbar-background: var(--keyboard-toolbar-background, transparent); --_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee); --_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent); --_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff); --_keycap-background: var(--keycap-background, white); --_keycap-background-hover: var(--keycap-background-hover, #f5f5f7); --_keycap-background-active: var(--keycap-background-active, var(--_accent-color)); --_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color)); --_keycap-border: var(--_keycap-border, #e5e6e9); --_keycap-border-bottom: var(--_keycap-border-bottom, #8d8f92); --_keycap-text: var(--keycap-text, #000); --_keycap-text-active: var(--keycap-text-active, #fff); --_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text)); --_keycap-text-pressed: var(--keycap-text-pressed, #fff); --_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color)); --_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8); --_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795); --_keycap-secondary-text: var(--keycap-secondary-text, #060707); --_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0); --_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6); --_variant-panel-background: var(--variant-panel-background, #f0f0f0); --_variant-keycap-text: var(--variant-keycap-textvar, var(--_keycap-text)); --_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active)); --_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color)); } `,NMe=`:host { --primary-color: #5898ff; --primary-color-dimmed: #c0c0f0; --primary-color-dark: var(--blue-500); --primary-color-light: var(--blue-100); --primary-color-reverse: #ffffff; --secondary-color: #ff8a65; --secondary-color-dimmed: #f0d5c5; --secondary-color-dark: var(--orange-500); --secondary-color-light: var(--orange-100); --secondary-color-reverse: #ffffff; --link-color: #5898ff; --link-color-dimmed: #c5c5c5; --link-color-dark: #121212; --link-color-light: #e2e2e2; --link-color-reverse: #ffffff; --semantic-blue: var(--blue-700); --semantic-red: var(--red-400); --semantic-orange: var(--orange-400); --semantic-green: var(--green-700); --neutral-100: #f5f5f5; --neutral-200: #eeeeee; --neutral-300: #e0e0e0; --neutral-400: #bdbdbd; --neutral-500: #9e9e9e; --neutral-600: #757575; --neutral-700: #616161; --neutral-800: #424242; --neutral-900: #212121; --red-25: #fff8f7; --red-50: #fff1ef; --red-100: #ffeae6; --red-200: #ffcac1; --red-300: #ffa495; --red-400: #ff7865; --red-500: #f21c0d; --red-600: #e50018; --red-700: #d30024; --red-800: #bd002c; --red-900: #a1002f; --orange-25: #fffbf8; --orange-50: #fff7f1; --orange-100: #fff3ea; --orange-200: #ffe1c9; --orange-300: #ffcca2; --orange-400: #ffb677; --orange-500: #fe9310; --orange-600: #f58700; --orange-700: #ea7c00; --orange-800: #dc6d00; --orange-900: #ca5b00; --brown-25: #fff8ef; --brown-50: #fff1df; --brown-100: #ffe9ce; --brown-200: #ebcca6; --brown-300: #cdaf8a; --brown-400: #af936f; --brown-500: #856a47; --brown-600: #7f5e34; --brown-700: #78511f; --brown-800: #6e4200; --brown-900: #593200; --yellow-25: #fffdf9; --yellow-50: #fffcf2; --yellow-100: #fffaec; --yellow-200: #fff2ce; --yellow-300: #ffe8ab; --yellow-400: #ffdf85; --yellow-500: #ffcf33; --yellow-600: #f1c000; --yellow-700: #dfb200; --yellow-800: #c9a000; --yellow-900: #ad8a00; --lime-25: #f4ffee; --lime-50: #e9ffdd; --lime-100: #ddffca; --lime-200: #a8fb6f; --lime-300: #94e659; --lime-400: #80d142; --lime-500: #63b215; --lime-600: #45a000; --lime-700: #268e00; --lime-800: #007417; --lime-900: #005321; --green-25: #f5fff5; --green-50: #ebffea; --green-100: #e0ffdf; --green-200: #a7ffa7; --green-300: #5afa65; --green-400: #45e953; --green-500: #17cf36; --green-600: #00b944; --green-700: #00a34a; --green-800: #008749; --green-900: #00653e; --teal-25: #f3ffff; --teal-50: #e6fffe; --teal-100: #d9fffe; --teal-200: #8dfffe; --teal-300: #57f4f4; --teal-400: #43e5e5; --teal-500: #17cfcf; --teal-600: #00c2c0; --teal-700: #00b5b1; --teal-800: #00a49e; --teal-900: #009087; --cyan-25: #f7fcff; --cyan-50: #eff8ff; --cyan-100: #e7f5ff; --cyan-200: #c2e6ff; --cyan-300: #95d5ff; --cyan-400: #61c4ff; --cyan-500: #13a7ec; --cyan-600: #069eda; --cyan-700: #0095c9; --cyan-800: #0088b2; --cyan-900: #0a7897; --blue-25: #f7faff; --blue-50: #eef5ff; --blue-100: #e5f1ff; --blue-200: #bfdbff; --blue-300: #92c2ff; --blue-400: #63a8ff; --blue-500: #0d80f2; --blue-600: #0077db; --blue-700: #006dc4; --blue-800: #0060a7; --blue-900: #005086; --indigo-25: #f8f7ff; --indigo-50: #f1efff; --indigo-100: #eae7ff; --indigo-200: #ccc3ff; --indigo-300: #ac99ff; --indigo-400: #916aff; --indigo-500: #63c; --indigo-600: #5a21b2; --indigo-700: #4e0b99; --indigo-800: #3b0071; --indigo-900: #220040; --purple-25: #fbf7ff; --purple-50: #f8f0ff; --purple-100: #f4e8ff; --purple-200: #e4c4ff; --purple-300: #d49aff; --purple-400: #c36aff; --purple-500: #a219e6; --purple-600: #9000c4; --purple-700: #7c009f; --purple-800: #600073; --purple-900: #3d0043; --magenta-25: #fff8fb; --magenta-50: #fff2f6; --magenta-100: #ffebf2; --magenta-200: #ffcddf; --magenta-300: #ffa8cb; --magenta-400: #ff7fb7; --magenta-500: #eb4799; --magenta-600: #da3689; --magenta-700: #c82179; --magenta-800: #b00065; --magenta-900: #8a004c; } @media (prefers-color-scheme: dark) { :host { --semantic-blue: var(--blue-700); --semantic-red: var(--red-400); --semantic-orange: var(--orange-400); --semantic-green: var(--green-700); --semantic-bg-blue: var(--blue-25); --semantic-bg-red: var(--red-25); --semantic-bg-orange: var(--orange-25); --semantic-bg-green: var(--green-25); --neutral-100: #121212; --neutral-200: #424242; --neutral-300: #616161; --neutral-400: #757575; --neutral-500: #9e9e9e; --neutral-600: #bdbdbd; --neutral-700: #e0e0e0; --neutral-800: #eeeeee; --neutral-900: #f5f5f5; } } :host([theme='dark']) { --semantic-blue: var(--blue-700); --semantic-red: var(--red-400); --semantic-orange: var(--orange-400); --semantic-green: var(--green-700); --semantic-bg-blue: var(--blue-25); --semantic-bg-red: var(--red-25); --semantic-bg-orange: var(--orange-25); --semantic-bg-green: var(--green-25); --neutral-100: #121212; --neutral-200: #424242; --neutral-300: #616161; --neutral-400: #757575; --neutral-500: #9e9e9e; --neutral-600: #bdbdbd; --neutral-700: #e0e0e0; --neutral-800: #eeeeee; --neutral-900: #f5f5f5; } /* @media (prefers-color-scheme: dark) { :host { --label-color: #fff; --active-label-color: #000; --menu-bg: #525252; --active-bg: #5898ff; --active-bg-dimmed: #5c5c5c; } } */ :host { --ui-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; --ui-font-size: 14px; --ui-line-height: 1.5; --ui-letter-spacing: 0.007em; --mono-font-family: 'Berkeley Mono', 'JetBrains Mono', 'IBM Plex Mono', 'Source Code Pro', Menlo, Monaco, 'Courier New', monospace; --ui-layer-1: var(--neutral-100); --ui-layer-2: var(--neutral-200); --ui-layer-3: var(--neutral-300); --ui-layer-4: var(--neutral-400); --ui-layer-5: var(--neutral-500); --ui-layer-6: var(--neutral-600); --ui-border-color: var(--primary-color); --ui-border-radius: 4px; --ui-text: var(--neutral-900); --ui-text-secondary: var(--neutral-700); --ui-text-placeholder: var(--neutral-500); --ui-text-muted: var(--neutral-300); /** A field is a UI element in which a user can type data, for * example an input or textarea element. */ --ui-field-bg: var(--neutral-100); --ui-field-bg-hover: var(--neutral-100); --ui-field-bg-disabled: var(--neutral-300); --ui-field-bg-invalid: var(--red-100); --ui-field-bg-focus: var(--neutral-100); --ui-field-border: 0.5px solid var(--border-color); --ui-field-border-hover: 0.5px solid var(--border-color); --ui-field-border-disabled: 0.5px solid var(--border-color); --ui-field-border-invalid: 0.5px solid var(--border-color); --ui-field-border-focus: 0.5px solid var(--border-color); --ui-menu-bg: var(--neutral-100); --ui-menu-text: var(--neutral-900); --ui-menu-bg-hover: var(--neutral-200); --ui-menu-text-hover: var(--neutral-900); /** The \`active\` state is used for the state of menu items * when they are selected. */ --ui-menu-bg-active: var(--primary-color); --ui-menu-text-active: var(--primary-color-reverse); /** The \`active-muted\` set is used for the state of * submenus when they are open. */ --ui-menu-bg-active-muted: var(--neutral-300); --ui-menu-text-active-muted: var(--neutral-900); /* --ui-menu-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302), 0 2px 6px 2px rgba(60, 64, 67, 0.149); */ --ui-menu-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2); --ui-menu-divider: 0.5px solid #c7c7c7; /* var(--neutral-300); */ --ui-menu-z-index: 10000; --page-bg: var(--neutral-100); --content-bg: var(--neutral-200); } @media (prefers-color-scheme: dark) { :host { --ui-menu-bg: var(--neutral-200); } } :host([theme='dark']) { --ui-menu-bg: var(--neutral-200); } /* PingFang SC is a macOS font. Microsoft Yahei is a Windows font. Noto is a Linux/Android font. */ :lang(zh-cn), :lang(zh-sg), :lang(zh-my), :lang(zh) { --ui-font-family: -apple-system, system-ui, 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Noto Sans SC', 'Noto Sans', 'Microsoft Yahei UI', 'Microsoft YaHei New', 'Microsoft Yahei', '\u5FAE\u8F6F\u96C5\u9ED1', SimSun, '\u5B8B\u4F53', STXihei, '\u534E\u6587\u7EC6\u9ED1', sans-serif; } :lang(zh-tw), :lang(zh-hk), :lang(zh-mo) { --ui-font-family: -apple-system, system-ui, 'Noto Sans', 'Microsoft JhengHei UI', 'Microsoft JhengHei', '\u5FAE\u8EDF\u6B63\u9ED1\u9AD4', '\u65B0\u7D30\u660E\u9AD4', 'PMingLiU', '\u7D30\u660E\u9AD4', 'MingLiU', sans-serif; } :lang(ja), :lang(ja-jp), :lang(ja-jp-mac) { --ui-font-family: -apple-system, system-ui, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP', 'Noto Sans', '\u6E38\u30B4\u30B7\u30C3\u30AF', '\u6E38\u30B4\u30B7\u30C3\u30AF\u4F53', YuGothic, 'Yu Gothic', '\u30E1\u30A4\u30EA\u30AA', Meiryo, '\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF', 'MS PGothic', sans-serif; } :lang(ko), :lang(ko-kr), :lang(ko-kr-std) { --ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR', 'Noto Sans', 'Malgun Gothic', '\uB9D1\uC740 \uACE0\uB515', 'Apple SD Gothic Neo', '\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo', 'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif; } :lang(ko-kr-apple) { --ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR', 'Noto Sans', 'Apple SD Gothic Neo', '\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo', 'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif; } :lang(zh-cn), :lang(zh-sg), :lang(zh-my), :lang(zh), :lang(zh-tw), :lang(zh-hk), :lang(zh-mo), :lang(ja), :lang(ja-jp), :lang(ja-jp-mac), :lang(ko), :lang(ko-kr), :lang(ko-kr-std), :lang(ko-kr-apple) { --ui-font-size: 1rem; --ui-line-height: 1.7; --ui-letter-spacing: 0; } :dir(rtl) { --ui-line-height: auto; --ui-letter-spacing: 0; } `,OMe=`.ui-menu *, .ui-menu ::before, .ui-menu ::after { box-sizing: border-box; } .ui-menu { display: none; color-scheme: light dark; -webkit-user-select: none; /* Important: Safari iOS doesn't respect user-select */ user-select: none; cursor: default; -webkit-touch-callout: none; -webkit-tap-highlight-color: rgba(0 0 0 0); --active-label-color: #fff; /* ui-menu-text-active */ --label-color: #121212; /* ui-menu-text */ --menu-bg: #e2e2e2; /* ui-menu-background */ --active-bg: #5898ff; /* ui-menu-background-active */ --active-bg-dimmed: #c5c5c5; /* ui-menu-background-active-muted */ } /** Use the :where pseudo selector to make the specificity of the * selector 0, so that it can be overridden by the user. */ :where(.ui-menu-container) { position: absolute; overflow: visible; width: auto; height: auto; z-index: 10000; border-radius: 8px; background: var(--ui-menu-bg); box-shadow: var(--ui-menu-shadow); list-style: none; padding: 6px 0 6px 0; margin: 0; user-select: none; cursor: default; color: var(--ui-menu-text); font-weight: normal; font-style: normal; text-shadow: none; text-transform: none; letter-spacing: 0; outline: none; opacity: 1; /* The [popover] elements have a 1px solid black border. Ugh. */ border: none; width: fit-content; height: fit-content; } :where(.ui-menu-container > li) { display: flex; flex-flow: row; align-items: center; padding: 1px 7px 1px 7px; margin-top: 0; margin-left: 6px; margin-right: 6px; border-radius: 4px; white-space: nowrap; position: relative; outline: none; fill: currentColor; user-select: none; cursor: default; text-align: left; color: inherit; font-family: var(--ui-font-family); font-size: var(--ui-font-size); line-height: var(--ui-line-height); letter-spacing: var(--ui-letter-spacing); } :where(.ui-menu-container > li > .label) { display: flex; align-items: center; justify-content: space-between; appearance: none; background: none; outline: none; width: 100%; margin: 0; padding: 1px 2px 1px 1px; overflow: visible; border: 1px solid transparent; white-space: nowrap; text-align: start; align-content: center; } :where(.ui-menu-container > li:has(.heading)) { margin-top: 0.5em; } :where(.ui-menu-container > li > .label.heading) { font-weight: bold; opacity: 0.4; } :where(.ui-menu-container > li.indent > .label) { margin-inline-start: 12px; } :where(.ui-menu-container > li > .label.indent) { margin-inline-start: 12px; } :where(.ui-menu-container > li[role='divider']) { border-bottom: 1px solid var(--ui-menu-divider); border-radius: 0; padding: 0; margin-left: 15px; margin-right: 15px; padding-top: 5px; margin-bottom: 5px; width: calc(100% - 30px); /** 100% - (margin-left + margin-right) */ } :where(.ui-menu-container > li[aria-disabled='true']) { opacity: 0.5; } :where(.ui-menu-container > li.active) { background: var(--ui-menu-bg-active); background: -apple-system-control-accent; color: var(--ui-menu-text-active); } :where(.ui-menu-container > li.active.is-submenu-open) { background: var(--ui-menu-bg-active-muted); color: inherit; } :where(.ui-menu-container > li[aria-haspopup='true'] > .label) { padding-inline-end: 0; } :where(.ui-menu-container > li[aria-haspopup='true'].active::after) { color: var(--ui-menu-text-active); } /** Keyboard shortcut */ :where(.ui-menu-container > li > kbd) { font-family: var(--ui-font-family); margin-inline-start: 12px; opacity: 0.4; } :where(.ui-menu-container > li.active > kbd) { opacity: 0.85; } .ui-trailing-chevron { display: flex; margin-inline-start: 24px; width: 10px; height: 10px; margin-bottom: 4px; } .ui-trailing-chevron:dir(rtl) { transform: scaleX(-1); } .ui-checkmark { display: flex; margin-inline-end: -11px; margin-inline-start: -4px; margin-top: 2px; width: 16px; height: 16px; } .ui-mixedmark { display: flex; margin-inline-end: -11px; margin-inline-start: -4px; margin-top: 2px; width: 16px; height: 16px; } `;xV=class dwt extends be{constructor(t){var r;super(zt(Xt({},t),{type:"accent",body:(r=t.body)!=null?r:void 0})),t.accentChar?this.accent=t.accentChar:this.svgAccent=t?.svgAccent,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(t){return new dwt(t)}toJson(){return zt(Xt({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(t){var r;let n=new $i({parent:t,mathstyle:"cramp"},this.style),a=(r=be.createBox(n,this.body))!=null?r:new Ue("\u25A1",{style:this.style}),o=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(o=a.skew);let s=Math.min(a.height,$d),l;if(this.svgAccent)l=TF(this.svgAccent),s=n.metrics.bigOpSpacing1-s;else if(this.accent){let g=new Ue(this.accent,{fontFamily:"Main-Regular"});g.italic=0;let d=this.accent===8407||this.accent===8411||this.accent===8412?" ML__accent-combining-char":"";l=new Ue(g,{classes:"ML__accent-body"+d})}let c=(a.width-l.width)/2+a.left+2*o;l=new Bn({shift:0,children:[{box:new Ue(a)},-s,{box:l,marginLeft:c,classes:["ML__center"]}]});let u=new Ue(l,{type:"lift"});return this.caret&&(u.caret=this.caret),this.bind(n,u.wrap(n)),this.attachSupsub(n,{base:u})}},ZV={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\lparen":"\\rparen","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},sV=Object.fromEntries(Object.entries(ZV).map(([e,t])=>[t,e]));hwt=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),TMe=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),mwt=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),JMe=[0,1.2,1.8,2.4,3];_Me=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],jMe=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],zMe=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];Kl=class pwt extends be{constructor(t){var r;super({type:"placeholder",command:"\\placeholder",mode:(r=t?.mode)!=null?r:"math",style:t?.style}),this.captureSelection=!0}static fromJson(t){return new pwt(t)}toJson(){return super.toJson()}render(t){let r;return this.value=t.placeholderSymbol,typeof t.renderPlaceholder=="function"?r=t.renderPlaceholder(t):r=this.createBox(t),this.caret&&(r.classes+=" ML__placeholder-selected"),r}_serialize(t){return t.skipPlaceholders?"":"\\placeholder{}"}},bwt=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],j9=["cases","dcases","rcases"],fwt=["align","align*","aligned","gather","gather*","gathered","split"],PMe=["array","subequations","eqnarray"];Ui=class vwt extends be{get isMultiline(){let t=this.environmentName;return["lines","multline","multline*","align","split","gather","gathered"].includes(t)}constructor(t,r,n,a={}){var o,s,l,c;if(super({type:"array",isRoot:a.isRoot}),this.environmentName=t,a.columns)a.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=[...a.columns];else if(a.minColumns){let u=[];for(let g=0;gr.map(n=>n.map(a=>a.toJson()))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType,minColumns:this.minColumns,minRows:this.minRows,maxRows:this.maxRows});return this.arraystretch!==void 0&&(t.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(t.arraycolsep=this.arraycolsep),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),this.isRoot&&(t.isRoot=!0),t.minColumns=this.minColumns,t.minRows=this.minRows,t.maxRows=this.maxRows,this.mathstyleName&&(t.mathstyleName=this.mathstyleName),this.classes.length>0&&(t.classes=this.classes),t}branch(t){var r;if(eu(t))return(r=this._rows[t[0]][t[1]])!=null?r:void 0}createBranch(t){var r;return eu(t)?(this.isDirty=!0,(r=this.branch(t))!=null?r:[]):[]}get rowCount(){return this._rows.length}get colCount(){return this._rows[0].length}get maxColumns(){return this.colFormat.filter(t=>!!t.align).length}removeBranch(t){if(_m(t))return super.removeBranch(t);let[r,...n]=this.branch(t);return r.type,this._rows[t[0]][t[1]]=void 0,n.forEach(a=>{a.parent=void 0,a.parentBranch=void 0}),this.isDirty=!0,n}get hasChildren(){return this.children.length>0}get children(){let t=[];for(let r of this._rows)for(let n of r)if(n)for(let a of n)t.push(...a.children),t.push(a);return[...t,...super.children]}render(t){var r,n,a,o,s,l;let c=new $i({parent:t,mathstyle:this.mathstyleName},this.style),u=c.getRegisterAsEm("arrayrulewidth"),g=c.getRegisterAsEm("arraycolsep"),d=c.getRegisterAsEm("doublerulesep"),h=(n=(r=this.arraystretch)!=null?r:c.getRegisterAsNumber("arraystretch"))!=null?n:1,m=typeof this.arraycolsep=="number"?this.arraycolsep:g;this.colSeparationType==="small"&&(m=.2778*(new $i({parent:t,mathstyle:"scriptstyle"}).scalingFactor/t.scalingFactor));let p=h*$De,b=.7*p,f=.3*p,v=0,y=[],x=0,C=this._rows.length;for(let _=0;_0&&(Kt+=f,Rt=Math.max(Rt,Kt),Kt=0),_0&&Z.push(new Bn({individualShift:P}))}let F=[],R=!1,X=!1,S=0,w=!this.leftDelim,{colFormat:Q}=this;for(let _ of Q){if("align"in _&&S>=Z.length)break;if("align"in _)R?F.push(CF(2*m)):(X||w)&&F.push(CF(m)),F.push(new Ue(Z[S],{classes:"col-align-"+_.align})),S++,R=!0,X=!1,w=!1;else if("gap"in _){if(typeof _.gap=="number")F.push(CF(_.gap));else{let P=a6e(t,y,I,_.gap);P&&F.push(P)}R=!1,X=!1,w=!1}else if("separator"in _){let P=new Ue(null,{classes:"ML__vertical-separator"});P.height=v,P.setStyle("height",v,"em"),P.setStyle("border-right",`${u}em ${_.separator} currentColor`),P.setStyle("vertical-align",-(v-I),"em");let it=0;X?it=d-u:R&&(it=m-u),P.left=it,F.push(P),R=!1,X=!0,w=!1}}R&&!this.rightDelim&&F.push(CF(m));let T=new Ue(F,{classes:["ML__mtable",...this.classes].join(" ")});if(this.environmentName==="array"&&!this.isMultiline&&(T.height=y[0].height,T.depth=v-y[0].height),(!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(T.caret=this.caret),this.bind(t,T);let O=T.height,J=T.depth,E=this.bind(t,new Ue([this.bind(t,A1("open",(s=this.leftDelim)!=null?s:".",O,J,c,{isSelected:this.isSelected})),T,this.bind(t,A1("close",(l=this.rightDelim)!=null?l:".",O,J,c,{isSelected:this.isSelected}))],{type:"ord"}));return E?(E.setStyle("display","inline-block"),this.caret&&(E.caret=this.caret),this.bind(t,this.attachSupsub(t,{base:E}))):null}_serialize(t){var r;let n=[];if(this.environmentName==="lines"&&this._rows.length>1?n.push("\\displaylines{"):this.environmentName!=="lines"&&n.push(`\\begin{${this.environmentName}}`),this.environmentName==="array"){if(n.push("{"),this.colFormat!==void 0)for(let a of this.colFormat)"align"in a&&typeof a.align=="string"?n.push(a.align):"separator"in a&&a.separator==="solid"?n.push("|"):"separator"in a&&a.separator==="dashed"&&n.push(":");n.push("}")}for(let a=0;a0&&n.push(" & "),n.push(be.serialize(this._rows[a][o],t));if(a1?n.push("}"):this.environmentName!=="lines"&&n.push(`\\end{${this.environmentName}}`),ki(n)}forEachCell(t){for(let r=0;ro.type!=="first")];this._rows[t][r]=a,Om(this),this.isDirty=!0}addRowBefore(t){this.type==="array"&&Array.isArray(this._rows),this._rows.splice(t,0,Array.from({length:this.colCount},()=>yF(this,!this.isMultiline))),Om(this),this.isDirty=!0}addRowAfter(t){this.type==="array"&&Array.isArray(this._rows),this._rows.splice(t+1,0,Array.from({length:this.colCount},()=>yF(this,!this.isMultiline))),Om(this),this.isDirty=!0}removeRow(t){this.type==="array"&&Array.isArray(this._rows)&&this.rowCount>t;let r=this._rows.splice(t,1);for(let n of r)for(let a of n)if(a)for(let o of a)o.parent=void 0,o.parentBranch=void 0;Om(this),this.isDirty=!0}addColumnBefore(t){this.type==="array"&&Array.isArray(this._rows);for(let r of this._rows)r.splice(t,0,yF(this));Om(this),this.isDirty=!0}addColumnAfter(t){this.type==="array"&&Array.isArray(this._rows);for(let r of this._rows)r.splice(t+1,0,yF(this));Om(this),this.isDirty=!0}addColumn(){this.addColumnAfter(this.colCount-1)}removeColumn(t){this.type==="array"&&Array.isArray(this._rows)&&this.colCount>t;for(let r of this._rows){let n=r.splice(t,1);for(let a of n)if(a)for(let o of a)o.parent=void 0,o.parentBranch=void 0}Om(this),this.isDirty=!0}get cells(){let t=[];for(let r of this._rows)for(let n of r)n&&t.push(n.filter(a=>a.type!=="first"));return t}get rows(){return this._rows}};zg=class Gwt extends be{constructor(t){super({mode:t.mode,command:t.command,style:t.style,body:t.body,type:"box"}),this.framecolor=t.framecolor,this.backgroundcolor=t.backgroundcolor,this.padding=t.padding,this.offset=t.offset,this.border=t.border}static fromJson(t){return new Gwt(t)}toJson(){return zt(Xt({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(t){var r,n,a,o;let s=be.createBox(t,this.body,{type:"lift"});if(!s)return null;let l=t.toEm((r=this.offset)!=null?r:{dimension:0});s.depth+=l,s.setStyle("display","inline-block"),s.setStyle("position","relative"),s.setStyle("height",Math.floor(100*s.height+s.depth)/100,"em"),s.setStyle("vertical-align",-Math.floor(100*s.height)/100,"em");let c=new $i({parent:t},this.style),u=c.toEm((n=this.padding)!=null?n:{register:"fboxsep"}),g=new Ue(null,{classes:"ML__box"});g.height=s.height+u,g.depth=s.depth+u,g.setStyle("box-sizing","border-box"),g.setStyle("position","absolute"),g.setStyle("top",-u+.3,"em"),g.setStyle("left",0),g.setStyle("height",g.height+g.depth,"em"),g.setStyle("width","100%"),this.backgroundcolor&&g.setStyle("background-color",(a=c.toBackgroundColor(this.backgroundcolor))!=null?a:"transparent"),this.framecolor&&g.setStyle("border",`${c.getRegisterAsEm("fboxrule",2)}em solid ${(o=c.toColor(this.framecolor))!=null?o:"black"}`),this.border&&g.setStyle("border",this.border);let d=new Ue([g,s],{type:"lift"});return d.setStyle("display","inline-block"),d.setStyle("position","relative"),d.setStyle("line-height",0),d.height=s.height+u+(l>0?l:0),d.depth=s.depth+u+(l<0?-l:0),d.setStyle("padding-left",u,"em"),d.setStyle("padding-right",u,"em"),d.setStyle("height",Math.floor(100*(s.height+s.depth+2*u+Math.abs(l)))/100,"em"),d.setStyle("margin-top",-u,"em"),d.setStyle("top",Math.floor(100*(s.depth-s.height+2*u-l))/100,"em"),d.setStyle("vertical-align",Math.floor(100*(s.depth+2*u))/100,"em"),this.caret&&(d.caret=this.caret),this.attachSupsub(t,{base:d})}_serialize(t){return t.skipStyles?ki([this.bodyToLatex(t),this.supsubToLatex(t)]):super._serialize(t)}},ywt=class Cwt extends be{constructor(t,r){var n;super({type:"composition",mode:(n=r?.mode)!=null?n:"math",value:t})}static fromJson(t){return new Cwt(t.value,t)}toJson(){return super.toJson()}render(t){let r=new Ue(this.value,{classes:"ML__composition",type:"composition"});return this.bind(t,r),this.caret&&(r.caret=this.caret),r}_serialize(t){return""}},zm=class xwt extends be{constructor(t){super({type:"error",value:t,command:t,mode:"math"}),this.verbatimLatex=t}static fromJson(t){return new xwt(t.command)}toJson(){return super.toJson()}render(t){let r=this.createBox(t,{classes:"ML__error"});return this.caret&&(r.caret=this.caret),r}},Zwt=class Rwt extends be{constructor(t,r){super({type:"group",mode:r}),this.body=t,this.boxType=t.length>1?"ord":"ignore",this.skipBoundary=!0,this.displayContainsHighlight=!1,t?.length===1&&t[0].command===","&&(this.captureSelection=!0)}static fromJson(t){return new Rwt(t.body,t.mode)}render(t){let r=be.createBox(t,this.body,{type:this.boxType});return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let r=qn(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):`{${this.bodyToLatex(t)}}`}},qr=class Awt extends be{constructor(t,r,n){super({type:"leftright",style:n.style,displayContainsHighlight:!0}),this.variant=t,this.body=r,this.leftDelim=n.leftDelim,this.rightDelim=n.rightDelim}static fromJson(t){var r;return new Awt((r=t.variant)!=null?r:"",t.body,t)}toJson(){let t=super.toJson();return this.variant&&(t.variant=this.variant),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),t}_serialize(t){var r,n;let a=this.matchingRightDelim();return this.variant==="left...right"?ki(["\\left",(r=this.leftDelim)!=null?r:".",this.bodyToLatex(t),"\\right",a]):this.variant==="mleft...mright"?ki(["\\mleft",(n=this.leftDelim)!=null?n:".",this.bodyToLatex(t),"\\mright",a]):ki([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(t),a])}matchingRightDelim(){var t,r;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;let n=(t=this.leftDelim)!=null?t:".";return(r=ZV[n])!=null?r:n}render(t){var r,n;let a=new $i({parent:t},this.style);this.body;let o=new $i({parent:t,mathstyle:"textstyle"},this.style),s=(r=be.createBox(a,this.body,{type:"inner"}))!=null?r:new Ue(null,{type:"inner"}),l=s.height/o.scalingFactor,c=s.depth/o.scalingFactor,u=[];if(this.leftDelim&&u.push(this.bind(o,A1("open",this.leftDelim,l,c,o,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),s&&(Bwt(s.children,this,a,l,c),u.push(s)),this.rightDelim){let m=this.containsCaret?" ML__contains-caret":"",p=this.rightDelim;p==="?"&&(a.smartFence?(p=this.matchingRightDelim(),m+=" ML__smart-fence__close"):p="."),u.push(this.bind(o,A1("close",p,l,c,o,{isSelected:this.isSelected,classes:m+" ML__close",mode:this.mode,style:this.style})))}let g=this.variant==="mleft...mright",d=this.leftSibling;d&&(!g&&d.isFunction&&(g=!0),!g&&d.type==="subsup"&&(n=d.leftSibling)!=null&&n.isFunction&&(g=!0));let h=new Ue(u,{type:g?"close":"inner",classes:"ML__left-right"});return h.setStyle("margin-top",`${-s.depth}em`),h.setStyle("height",`${s.height+s.depth}em`),this.caret&&(h.caret=this.caret),this.bind(a,h.wrap(a))}};Xwt=class Wwt extends be{constructor(t,r){var n;super({type:"macro",command:t,style:r.style}),this.body=r.body,r.captureSelection===void 0?r.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=r.captureSelection,this.macroArgs=r.args,this.expand=(n=r.expand)!=null?n:!1}static fromJson(t){return new Wwt(t.command,t)}toJson(){let t=super.toJson();return this.expand&&(t.expand=!0),this.captureSelection!==void 0&&(t.captureSelection=this.captureSelection),this.macroArgs&&(t.args=this.macroArgs),t}_serialize(t){var r;return t.expandMacro&&this.expand?this.bodyToLatex(t):this.command+((r=this.macroArgs)!=null?r:"")}applyStyle(t,r){let n={};t.color&&(n.color=t.color),t.backgroundColor&&(n.backgroundColor=t.backgroundColor),super.applyStyle(n,r)}render(t){let r=be.createBox(t,this.body,{type:"lift"});return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}},o6e=class Fwt extends be{constructor(){super({type:"macro-argument"})}static fromJson(t){return new Fwt}toJson(){return super.toJson()}_serialize(t){return""}render(t){return null}},Vwt=class kwt extends be{constructor(t,r,n=!1,a,o){var s;super({type:"prompt",mode:(s=o?.mode)!=null?s:"math",style:o?.style,command:"\\placeholder"}),this.body=a,this.correctness=r,this.placeholderId=t,this.locked=n,this.captureSelection=this.locked}static fromJson(t){return new kwt(t.placeholderId,t.correctness,t.locked,t.body,t)}toJson(){let t=super.toJson();return this.placeholderId&&(t.placeholderId=this.placeholderId),this.body||delete t.body,this.body&&(t.body=this.body.filter(r=>r.type!=="first").map(r=>r.toJson())),this.correctness&&(t.correctness=this.correctness),t.locked=this.locked,t}render(t){var r,n;let a=new $i({parent:t}),o=a.getRegisterAsEm("fboxsep"),s=o,l=o,c=be.createBox(t,this.body);if(!c)return null;let u=!this.body||this.body.length===0||this.body.every(F=>F.type==="first"),g=u?new Kl({mode:this.mode,style:this.style}).render(new $i({parent:t,isPhantom:!0})):null,d=(r=g?.height)!=null?r:a.metrics.xHeight,h=(n=g?.depth)!=null?n:d/2;c.height||(c.height=u?d:a.metrics.xHeight),c.depth||(c.depth=u?h:a.metrics.defaultRuleThickness);let m=u?h-d:c.depth-c.height;c.setStyle("vertical-align",m,"em"),this.correctness==="correct"?c.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&c.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");let p=new Ue(c,{type:"ord"});p.height=c.height,p.depth=c.depth,p.setStyle("display","inline-block"),p.setStyle("height",c.height+c.depth,"em"),p.setStyle("vertical-align",-l,"em"),p.setStyle("position","relative"),p.setStyle("z-index",1);let b="ML__prompt ";this.locked?b+=" ML__lockedPromptBox ":b+=" ML__editablePromptBox ",this.correctness==="correct"?b+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(b+=" ML__incorrectPromptBox "),this.containsCaret&&(b+=" ML__focusedPromptBox ");let f=new Ue(null,{classes:b,attributes:{part:"prompt"}});f.height=p.height+l,f.depth=p.depth+l,f.width=p.width+2*s,f.setStyle("position","absolute"),f.setStyle("z-index",0),f.setStyle("display","block"),f.setStyle("pointer-events","auto");let v=p.height+p.depth+2*l;f.setStyle("height",Math.max(v,.6),"em");let y=p.width+2*s;u&&(y=Math.max(y,3*s||.8)),f.setStyle("width",Math.max(y,.6),"em"),f.setStyle("top",o+l,"em"),u?f.setStyle("left",-1.5*s,"em"):s!==0&&f.setStyle("left",-s,"em");let x="";this.correctness==="incorrect"&&(x+=''),x&&(f.svgOverlay=x);let C=new Ue([f,p],{classes:"ML__prompt-atom"});p.setStyle("line-height",1),C.setStyle("position","relative"),C.setStyle("display","inline-block"),C.setStyle("line-height",0),C.height=p.height+l+.2,C.depth=p.depth+l,C.left=s,C.right=s,C.setStyle("height",p.height+2*l,"em"),C.setStyle("top",p.depth-p.height-l/2,"em"),C.setStyle("vertical-align",p.depth+l/2,"em"),C.setStyle("margin-left",.5,"em"),C.setStyle("margin-right",.5,"em"),this.caret&&(C.caret=this.caret);let I=this.attachSupsub(t,{base:C}),Z=this.bind(a,I);return Z&&this.id&&(f.atomID=this.id,p.atomID=this.id,C.atomID=this.id),Z}_serialize(t){var r;let n=(r=this.bodyToLatex(t))!=null?r:"";if(t.skipPlaceholders)return n;let a="\\placeholder";return this.placeholderId&&(a+=`[${this.placeholderId}]`),this.correctness==="correct"?a+="[correct]":this.correctness==="incorrect"&&(a+="[incorrect]"),this.locked&&(a+="[locked]"),Zr(a,n)}},AV=class Swt extends be{constructor(t){super({type:"subsup",style:t?.style}),this.subsupPlacement="auto"}get children(){if(!this._children){let t=[],r=this.branch("subscript");if(r)for(let a of r)t.push(...a.children),t.push(a);let n=this.branch("superscript");if(n)for(let a of n)t.push(...a.children),t.push(a);this._children=t}return this._children}static fromJson(t){let r=new Swt(t);for(let n of I0)t[n]&&r.setChildren(t[n],n);return r}render(t){var r;let n=new $i({parent:t,isPhantom:!0}),a=this.leftSibling,o=(r=a.render(n))!=null?r:new Ue(null),s=new Ue(null);return s.height=o.height,s.depth=o.depth,this.attachSupsub(t,{base:s,isCharacterBox:a.isCharacterBox(),type:"ignore"})}_serialize(t){return this.supsubToLatex(t)}};Lwt=class{constructor(e,t,r){this.errors=[],this.index=0,this.endCount=0;var n,a,o,s;r!=null||(r={}),this.tokens=e,this.context=t instanceof $i&&!(r!=null&&r.parseMode)&&!r.mathstyle?t:new $i({from:t,mathstyle:r.mathstyle},r.style),this.args=(n=r.args)!=null?n:void 0,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(a=r.style)!=null?a:{},parseMode:(o=r.parseMode)!=null?o:"math",mathstyle:(s=r.mathstyle)!=null?s:"displaystyle",tabular:!1}}beginContext(e){var t,r,n,a,o,s;if(e!=null&&e.root){this.parsingContext={parent:this.parsingContext.parent,mathlist:[],style:{},parseMode:(t=e?.mode)!=null?t:"math",mathstyle:(r=e?.mathstyle)!=null?r:"displaystyle",tabular:(n=e?.tabular)!=null?n:!1};return}let l=this.parsingContext,c={parent:l,mathlist:[],style:Xt({},l.style),parseMode:(a=e?.mode)!=null?a:l.parseMode,mathstyle:(o=e?.mathstyle)!=null?o:l.mathstyle,tabular:(s=e?.tabular)!=null?s:!1};this.parsingContext=c}endContext(){this.parsingContext=this.parsingContext.parent}onError(e){this.errors.push(Xt({before:Em(this.tokens.slice(this.index,this.index+10)),after:Em(this.tokens.slice(Math.max(0,this.index-10),this.index))},e))}get mathlist(){return this.parsingContext.mathlist}set mathlist(e){this.parsingContext.mathlist=e}get parseMode(){return this.parsingContext.parseMode}set parseMode(e){this.parsingContext.parseMode=e}get tabularMode(){return this.parsingContext.tabular}get style(){let e=this.parsingContext;for(;e;){if(e.style)return Xt({},e.style);e=e.parent}return{}}set style(e){this.parsingContext.style=e}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}next(){this.index+=1}get(){return this.endCount=0,this.index0&&(e=this.mathlist[this.mathlist.length-1],e.type==="subsup"||e.subsupPlacement!==void 0)||(e=new AV({style:this.style}),this.mathlist.push(e)),e}hasPattern(e){return e.test(this.tokens[this.index])}hasInfixCommand(){var e;let{index:t}=this;if(t"););}skipUntilToken(e){let t=this.tokens[this.index];for(;t&&t!==e;)t=this.tokens[++this.index];t===e&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match(""););}matchKeyword(e){let t=this.index,r=this.end(),n="";for(;!r;){let o=this.get();Kf(o)?(n+=o,r=this.end()||n.length>=e.length):r=!0}let a=e.toUpperCase()===n.toUpperCase();return a||(this.index=t),a}scanString(){let e="";for(;!this.end();){let t=this.peek();if(t==="]")return e;if(t==="")e+=" ";else if(t.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),e+=t.substring(1);else if(Kf(t))e+=t;else return e;this.next()}return e}scanBalancedString(){let e="",t=this.end(),r=1;for(;!t;){let n=this.get();n===""?e+=" ":n==="<{>"?(e+="{",r+=1):n==="<}>"?(r-=1,r>0?e+="}":this.index-=1):n==="<$>"?e+="$":n==="<$$>"?e+="$$":e+=n,t=r===0||this.end()}return e}scanLiteralGroup(){var e;if(!this.match("<{>"))return"";let t="",r=1;for(;r>0&&!this.end();){let n=this.get();n==="<}>"?(r-=1,r>0&&(t+="}")):n==="<{>"?(r+=1,t+="{"):(/\\[a-zA-Z]+$/.test(t)&&/^[a-zA-Z]/.test(n)&&(t+=" "),t+=(e={"":" ","<$$>":"$$","<$>":"$"}[n])!=null?e:n)}return t}scanNumber(e=!0){var t,r;let n=!1,a=this.peek();for(;a===""||a==="+"||a==="-";)this.get(),a==="-"&&(n=!n),a=this.peek();e=!!e;let o=10,s=/\d/;if(this.match("'"))o=8,s=/[0-7]/,e=!0;else if(this.match('"'))o=16,s=/[\dA-F]/,e=!0;else if(this.match("x"))o=16,s=/[\dA-Fa-f]/,e=!0;else if(this.match("`"))return a=this.get(),a?a.length===2&&a.startsWith("\\")?{number:(n?-1:1)*((t=a.codePointAt(1))!=null?t:0),base:"alpha"}:{number:(n?-1:1)*((r=a.codePointAt(0))!=null?r:0),base:"alpha"}:null;let l="";for(;this.hasPattern(s);)l+=this.get();if(!e&&(this.match(".")||this.match(",")))for(l+=".";this.hasPattern(s);)l+=this.get();let c=e?Number.parseInt(l,o):Number.parseFloat(l);return Number.isNaN(c)?null:{number:n?-c:c,base:o===16?"hexadecimal":o===8?"octal":"decimal"}}scanRegister(){var e;let t=this.index,r=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return r;let n=!1;if(r===null)for(;;){let o=this.peek();if(o==="-")n=!n;else if(o!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();let o=this.get();return o.startsWith("\\")?r?{register:o,global:!0,factor:(n?-1:1)*r.number}:n?{register:o,global:!0,factor:-1}:{register:o,global:!0}:(this.index=t,null)}let a=this.get();return a!=null&&a.startsWith("\\")?(a=a.substring(1),this.context.registers[a]?!n||r!==null?{register:a,factor:(n?-1:1)*((e=r?.number)!=null?e:1)}:{register:a}:(this.index=t,null)):(this.index=t,null)}scanValue(){let e=this.scanRegister();if(e)return e;let t=this.index,r=this.scanGlueOrDimen();if(r&&("unit"in r||"glue"in r&&"unit"in r.glue))return r;this.index=t;let n=this.scanNumber();if(n)return n;if(this.end()||!Kf(this.peek()))return null;let a=this.scanString();return a.length>0?{string:a}:null}scanDimen(){let e=this.scanNumber(!1);if(e===null)return null;let t=e.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let r;return this.matchKeyword("pt")?r="pt":this.matchKeyword("mm")?r="mm":this.matchKeyword("cm")?r="cm":this.matchKeyword("ex")?r="ex":this.matchKeyword("px")?r="px":this.matchKeyword("em")?r="em":this.matchKeyword("bp")?r="bp":this.matchKeyword("dd")?r="dd":this.matchKeyword("pc")?r="pc":this.matchKeyword("in")?r="in":this.matchKeyword("mu")&&(r="mu"),r?{dimension:t,unit:r}:{dimension:t}}scanGlueOrDimen(){let e=this.scanDimen();if(e===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return e;let t={glue:e};if(this.matchKeyword("plus")){let r=this.scanDimen();if(r)t.grow=r;else return t}if(this.skipWhitespace(),this.match("\\relax"))return t;if(this.skipWhitespace(),this.matchKeyword("minus")){let r=this.scanDimen();if(r)t.shrink=r;else return t}return!t.grow&&!t.shrink?e:t}scanColspec(){this.skipWhitespace();let e=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){let t=this.get();t==="c"||t==="r"||t==="l"?e.push({align:t}):t==="|"?e.push({separator:"solid"}):t===":"?e.push({separator:"dashed"}):t==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),e.push({gap:this.scan(r=>r==="<}>")}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return e}scanModeSet(){let e;if(this.match("\\(")&&(e="textstyle"),!e&&this.match("\\[")&&(e="displaystyle"),!e)return null;this.beginContext({mode:"math",mathstyle:e});let t=this.scan(r=>r===(e==="displaystyle"?"\\]":"\\)"));return this.match(e==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t}scanModeShift(){let e="";if(this.match("<$>")&&(e="<$>"),!e&&this.match("<$$>")&&(e="<$$>"),!e)return null;this.beginContext({mode:"math",mathstyle:e==="<$>"?"textstyle":"displaystyle"});let t=this.scan(r=>r===e);return this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t}scanEnvironment(){if(!this.match("\\begin"))return null;let e=this.scanArgument("string");if(!e)return null;let t=MDe(e);if(!t)return this.onError({code:"unknown-environment",arg:e}),null;let r=[];if(t.params)for(let l of t.params)if(l.isOptional)r.push(this.scanOptionalArgument(l.type));else{let c=this.scanArgument(l.type);c||this.onError({code:"missing-argument",arg:e}),r.push(c)}this.beginContext({tabular:t.tabular,root:t.rootOnly});let n=[],a=[],o=[],s=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:e}),s=!0),!s&&this.match("\\end")&&(this.scanArgument("string")!==e&&this.onError({code:"unbalanced-environment",arg:e}),s=!0),!s)if(this.matchColumnSeparator())o.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){o.push(this.mathlist),this.mathlist=[];let l=null;this.skipWhitespace(),this.match("[")&&(l=this.scanDimen(),this.skipWhitespace(),this.match("]")),a.push(l??{dimension:0}),n.push(o),o=[]}else this.mathlist.push(...this.scan(l=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(l)));while(!s);return o.push(this.mathlist),o.length>0&&n.push(o),this.endContext(),t.rootOnly&&(this.index=this.tokens.length),t.createAtom(e,n,a,r,this.context.maxMatrixCols)}scanExpression(){let e=this.mathlist;if(this.mathlist=[],this.parseExpression()){let t=this.mathlist;return this.mathlist=e,t}return this.mathlist=e,null}scan(e){this.beginContext(),e||(e=s=>s==="<}>");let t="",r=null,n=[],a=null;for(;!this.end()&&!e(this.peek());)this.hasInfixCommand()&&!t?(t=this.get(),r=qn(t,"math"),r&&(n=this.scanArguments(r)[1]),a=this.mathlist,this.mathlist=[]):this.parseExpression();let o;return t?(n.unshift(this.mathlist),a&&n.unshift(a),o=[r.createAtom({command:t,args:n,style:this.style,mode:this.parseMode})]):o=this.mathlist,this.endContext(),o}scanGroup(){let e=this.index;if(!this.match("<{>"))return null;let t=this.scan(n=>n==="<}>");if(this.match("<}>")||this.onError({code:"unbalanced-braces"}),t.length===1&&t[0].type==="placeholder")return t[0];let r=new Zwt(t,this.parseMode);return r.verbatimLatex=Em(this.tokens.slice(e,this.index)),r}scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();let e=1;for(;!this.end()&&e!==0;)this.match("(")&&(e+=1),this.match(")")&&(e-=1),e!==0&&this.parseExpression();let t=new qr("",this.mathlist,{leftDelim:"(",rightDelim:e===0?")":"?"});return this.endContext(),t}scanDelim(){this.skipWhitespace();let e=this.peek();if(!e)return this.onError({code:"unexpected-end-of-string"}),null;if(!Kf(e)&&!e.startsWith("\\"))return null;this.next();let t=qn(e,"math");return t?t.definitionType==="function"&&t.ifMode&&!t.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:e}),null):t.definitionType==="symbol"&&(t.type==="mopen"||t.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(e)?e:(this.onError({code:"unexpected-delimiter",arg:e}),null):(this.onError({code:"unknown-command",arg:e}),null)}scanLeftRight(){var e;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new zm("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new zm("\\mright");let t="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;t="\\mright"}let r=this.scanDelim();if(!r)return this.onError({code:"unexpected-delimiter"}),new zm(t==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(t);)this.parseExpression();let n=this.mathlist;this.endContext();let a=(e=this.scanDelim())!=null?e:".";return new qr(t==="\\right"?"left...right":"mleft...mright",n,{leftDelim:r,rightDelim:a,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let e=this.peek();if(e!=="^"&&e!=="_"&&e!=="'")return!1;let t=this.lastSubsupAtom();for(;e==="^"||e==="_"||e==="'";)this.match("'")?this.match("'")?t.addChild(new be({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):t.addChild(new be({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&t.addChildren(Me(this.scanArgument("expression")),e==="_"?"subscript":"superscript"),e=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;let e=this.match("\\limits"),t=!e&&this.match("\\nolimits"),r=!t&&!e&&this.match("\\displaylimits");if(!e&&!t&&!r)return!1;let n=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return n===null?!1:(n.explicitSubsupPlacement=!0,e&&(n.subsupPlacement="over-under"),t&&(n.subsupPlacement="adjacent"),r&&(n.subsupPlacement="auto"),!0)}scanArguments(e){if(!(e!=null&&e.params))return[void 0,[]];let t,r=[],n=e.infix?2:0;for(;n["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(o))):a.isOptional?r.push(this.scanOptionalArgument(a.type)):a.type.endsWith("*")?t=a.type.slice(0,-1):r.push(this.scanArgument(a.type)),n+=1}return[t,r]}scanSymbolOrLiteral(){let e=this.peek();if(!e)return null;this.next();let t;if(Kf(e)){let r=xs.createAtom(this.parseMode,e,Xt({},this.style));return r?[r]:null}if(t=this.scanMacro(e),t)return[t];if(e.startsWith("\\")){let r=qn(e,this.parseMode);if(!r)return this.onError({code:"unknown-command",arg:e}),[new zm(e)];if(r.definitionType==="symbol"){let n=Xt({},this.style);r.variant&&(n.variant=r.variant),t=new be({type:r.type,command:e,style:n,value:String.fromCodePoint(r.codepoint),mode:this.parseMode,verbatimLatex:e})}else{if(r.applyMode||r.applyStyle||r.infix)return this.onError({code:"invalid-command",arg:e}),[new zm(e)];r.createAtom&&(t=r.createAtom({command:e,args:[],style:this.style,mode:this.parseMode}))}}return t?[t]:null}scanArgument(e){var t;this.skipFiller();let r=this.parseMode;if(e==="auto"&&(e=r),!this.match("<{>")){if(e==="string")return this.scanString();if(e==="value")return this.scanValue();if(e==="delim")return(t=this.scanDelim())!=null?t:".";if(e==="expression")return this.scanExpression();if(e==="math"){e!==r&&this.beginContext({mode:"math"});let a=this.scanSymbolOrLiteral();return e!==r&&this.endContext(),a}if(e==="text"){e!==r&&this.beginContext({mode:"text"});let a=this.scanSymbolOrLiteral();return e!==r&&this.endContext(),a}return e==="balanced-string"?null:e==="rest"?this.scan(a=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(a)):null}if(e==="text"){this.beginContext({mode:"text"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());let a=this.mathlist;return this.endContext(),{group:a}}if(e==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());let a=this.mathlist;return this.endContext(),{group:a}}if(e==="rest"){let a=this.scan();return this.match("<}>")||this.onError({code:"unbalanced-braces"}),{group:a}}let n=null;if(e==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());let a=this.mathlist;return this.endContext(),{group:a}}return e==="string"?n=this.scanString():e==="balanced-string"?n=this.scanBalancedString():e==="colspec"?n=this.scanColspec():e==="value"&&(n=this.scanValue()),this.skipUntilToken("<}>"),n}scanOptionalArgument(e){if(e=e==="auto"?this.parseMode:e,this.skipFiller(),!this.match("["))return null;let t=null;for(;!this.end()&&!this.match("]");)if(e==="string")t=this.scanString();else if(e==="value")t=this.scanValue();else if(e==="colspec")t=this.scanColspec();else if(e==="bbox"){let r={},n=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(let a of n){let o=a.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(o)r.padding={dimension:Number.parseFloat(o[1]),unit:o[2]};else{let s=a.match(/^\s*border\s*:\s*(.*)/);s?r.border=s[1]:r.backgroundcolor={string:a}}}t=r}else e==="math"&&(this.beginContext({mode:"math"}),t=this.mathlist.concat(this.scan(r=>r==="]")),this.endContext());return t}scanSymbolOrCommand(e){var t,r,n;if(e==="\\placeholder"){let l=this.scanOptionalArgument("string"),c=this.scanOptionalArgument("math"),u=be.serialize(c,{defaultMode:"math"}),g=[],d;!d&&u==="correct"?d="correct":!d&&u==="incorrect"?d="incorrect":u!==""&&(g=c);let h=this.scanOptionalArgument("string")==="locked",m=this.scanArgument("auto"),p;return m&&Array.isArray(m)&&m.length>0?p=m:m&&typeof m=="object"&&"group"in m?p=m.group:p=g,l?[new Vwt(l,d,h,p??g,{mode:this.parseMode,style:this.style})]:[new Kl({mode:this.parseMode,style:this.style})]}if(e==="\\renewcommand"||e==="\\newcommand"||e==="\\providecommand"||e==="\\def"){let l=this.index,c=this.scanLiteralGroup()||this.next();if(!c)return null;if(this.context.registers[c.substring(1)]){let u=this.scanArgument("string");u!==null&&(this.context.registers[c.substring(1)]=u);let g=ki([e,Em(this.tokens.slice(l,this.index))]);return[new be({type:"text",value:"",verbatimLatex:g})]}}let a=this.scanMacro(e);if(a)return[a];let o=qn(e,this.parseMode);if(!o)return this.parseMode==="text"?(/[a-zA-Z]/.test((t=this.peek())!=null?t:"")&&(e+=" "),[...e].map(l=>new be({type:"text",value:l,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:e}),[new zm(e)]);let s=this.index;if(o.definitionType==="symbol"){let l=Xt({},this.style);o.variant&&(l.variant=o.variant),a=new be({type:o.type,command:e,style:l,value:String.fromCodePoint(o.codepoint),mode:this.parseMode})}else{if(o.ifMode&&!o.ifMode.includes(this.parseMode))return[];let l=this.parseMode;o.applyMode&&(this.parseMode=o.applyMode);let c,u=[];if(o.parse?u=o.parse(this):[c,u]=this.scanArguments(o),this.parseMode=l,o.applyMode&&!o.applyStyle&&!o.createAtom)return Me(u[0]);if(o.infix)return this.onError({code:"too-many-infix-commands",arg:e}),null;if(typeof o.createAtom=="function")a=o.createAtom({command:e,args:u,style:this.style,mode:this.parseMode}),c&&(a.body=Me(this.scanArgument(c)));else if(typeof o.applyStyle=="function"){let g=o.applyStyle(this.style,e,u,this.context),d=this.parseMode;if(o.applyMode&&(this.parseMode=o.applyMode),c){let h=this.style;this.style=g;let m=this.scanArgument(c);return this.style=h,this.parseMode=d,Me(m)}this.style=g}else a=new be({type:"mord",command:(r=o.command)!=null?r:e,style:Xt({},this.style),value:e,mode:(n=o.applyMode)!=null?n:this.parseMode})}if(!a)return null;if(a instanceof be&&a.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(e)){let l=ki([e,Em(this.tokens.slice(s,this.index))]);l&&(a.verbatimLatex=l)}if(a.verbatimLatex===null&&(a.verbatimLatex=void 0),a.isFunction&&this.smartFence){let l=this.scanSmartFence();if(l)return[a,l]}return[a]}scanSymbolCommandOrLiteral(){this.expandUnicode();let e=this.get();if(!e)return null;if(Kf(e)){let t=xs.createAtom(this.parseMode,e,Xt({},this.style));if(!t)return null;if(t.isFunction&&this.smartFence){let r=this.scanSmartFence();if(r)return[t,r]}return[t]}return e.startsWith("\\")?this.scanSymbolOrCommand(e):e===""?this.parseMode==="text"?[new y0(" "," ",this.style)]:null:(e==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:e}),null)}scanMacro(e){var t;let r=this.context.getMacro(e);if(!r)return null;let n=this.index,a=r.args,o={"?":(t=this.args)==null?void 0:t.call(this,"?")};for(let s=1;s<=a;s++){let l=this.scanLiteralGroup();if(!l){let c=this.index;this.scanExpression(),l=Em(this.tokens.slice(c,this.index))}o[s]=l}return new Xwt(e,{expand:r.expand,captureSelection:r.captureSelection,args:n===this.index?null:Em(this.tokens.slice(n,this.index)),style:this.parsingContext.style,body:xo(r.def,{context:this.context,parseMode:this.parseMode,args:s=>o[s],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var e,t,r,n;let a=(n=(r=(t=(e=this.scanEnvironment())!=null?e:this.scanModeShift())!=null?t:this.scanModeSet())!=null?r:this.scanGroup())!=null?n:this.scanLeftRight();if(a===null){if(this.parseSupSub()||this.parseLimits())return!0;a=this.scanSymbolCommandOrLiteral()}return a?($n(a)?this.mathlist.push(...a):this.mathlist.push(a),!0):!1}};wwt=class Uwt extends be{constructor(t,r){super({type:"chem"},{command:t,mode:"math"});let n=Er.go(Ve.go(r,t==="\\pu"?"pu":"ce"),!1);this.body=xo(n),this._verbatimLatex=t+"{"+r+"}",this.arg=r,this.captureSelection=!0}static fromJson(t){return new Uwt(t.command,t.arg)}set verbatimLatex(t){}get verbatimLatex(){return this._verbatimLatex}toJson(){return zt(Xt({},super.toJson()),{arg:this.arg})}render(t){let r=be.createBox(t,this.body,{type:"inner"});return this.caret&&(r.caret=this.caret),this.bind(t,r)}_serialize(t){return this.verbatimLatex,this.verbatimLatex}};Ge(["ce","pu"],"{chemformula:balanced-string}",{createAtom:e=>{var t;return new wwt(e.command,(t=e.args[0])!=null?t:"")}});Ve={go:function(e,t){if(!e)return[];t===void 0&&(t="ce");var r="0",n={};n.parenthesisLevel=0,e=e.replace(/\n/g," "),e=e.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),e=e.replace(/[\u2026]/g,"...");for(var a,o=10,s=[];;){a!==e?(o=10,a=e):o--;var l=Ve.stateMachines[t],c=l.transitions[r]||l.transitions["*"];t:for(var u=0;u0){if(d.revisit||(e=g.remainder),!d.toContinue)break t}else return s}}if(o<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Object.prototype.toString.call(t)==="[object Array]")for(var r=0;r":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return Ve.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return Ve.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return Ve.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return Ve.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return Ve.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return Ve.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return Ve.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return Ve.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return Ve.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return Ve.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return Ve.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return Ve.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t;if(t=e.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/),t)return{match_:t[0],remainder:e.substr(t[0].length)};var r=Ve.patterns.findObserveGroups(e,"","$","$","");return r&&(t=r.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),t)?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,r,n,a,o,s,l,c,u){var g=function(v,y){if(typeof y=="string")return v.indexOf(y)!==0?null:y;var x=v.match(y);return x?x[0]:null},d=function(v,y,x){for(var C=0;y0,null},h=g(e,t);if(h===null||(e=e.substr(h.length),h=g(e,r),h===null))return null;var m=d(e,h.length,n||a);if(m===null)return null;var p=e.substring(0,n?m.endMatchEnd:m.endMatchBegin);if(o||s){var b=this.findObserveGroups(e.substr(m.endMatchEnd),o,s,l,c);if(b===null)return null;var f=[p,b.match_];return{match_:u?f.join(""):f,remainder:b.remainder}}else return{match_:p,remainder:e.substr(m.endMatchEnd)}},match_:function(e,t){var r=Ve.patterns.patterns[e];if(r===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if(typeof r=="function")return Ve.patterns.patterns[e](t);var n=t.match(r);if(n){var a;return n[2]?a=[n[1],n[2]]:n[1]?a=n[1]:a=n[0],{match_:a,remainder:t.substr(n[0].length)}}return null}},actions:{"a=":function(e,t){e.a=(e.a||"")+t},"b=":function(e,t){e.b=(e.b||"")+t},"p=":function(e,t){e.p=(e.p||"")+t},"o=":function(e,t){e.o=(e.o||"")+t},"q=":function(e,t){e.q=(e.q||"")+t},"d=":function(e,t){e.d=(e.d||"")+t},"rm=":function(e,t){e.rm=(e.rm||"")+t},"text=":function(e,t){e.text_=(e.text_||"")+t},insert:function(e,t,r){return{type_:r}},"insert+p1":function(e,t,r){return{type_:r,p1:t}},"insert+p1+p2":function(e,t,r){return{type_:r,p1:t[0],p2:t[1]}},copy:function(e,t){return t},rm:function(e,t){return{type_:"rm",p1:t||""}},text:function(e,t){return Ve.go(t,"text")},"{text}":function(e,t){var r=["{"];return Ve.concatArray(r,Ve.go(t,"text")),r.push("}"),r},"tex-math":function(e,t){return Ve.go(t,"tex-math")},"tex-math tight":function(e,t){return Ve.go(t,"tex-math tight")},bond:function(e,t,r){return{type_:"bond",kind_:r||t}},"color0-output":function(e,t){return{type_:"color0",color:t[0]}},ce:function(e,t){return Ve.go(t)},"1/2":function(e,t){var r=[];t.match(/^[+\-]/)&&(r.push(t.substr(0,1)),t=t.substr(1));var n=t.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return n[1]=n[1].replace(/\$/g,""),r.push({type_:"frac",p1:n[1],p2:n[2]}),n[3]&&(n[3]=n[3].replace(/\$/g,""),r.push({type_:"tex-math",p1:n[3]})),r},"9,9":function(e,t){return Ve.go(t,"9,9")}},createTransitions:function(e){var t,r,n,a,o={};for(t in e)for(r in e[t])for(n=r.split("|"),e[t][r].stateArray=n,a=0;a":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(e,t){var r;if((e.d||"").match(/^[0-9]+$/)){var n=e.d;e.d=void 0,r=this.output(e),e.b=n}else r=this.output(e);return Ve.actions["o="](e,t),r},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var r=[];return Ve.concatArray(r,this.output(e)),Ve.concatArray(r,Ve.actions.bond(e,t,"-")),r}else e.d=t},"- after o/d":function(e,t,r){var n=Ve.patterns.match_("orbital",e.o||""),a=Ve.patterns.match_("one lowercase greek letter $",e.o||""),o=Ve.patterns.match_("one lowercase latin letter $",e.o||""),s=Ve.patterns.match_("$one lowercase latin letter$ $",e.o||""),l=t==="-"&&(n&&n.remainder===""||a||o||s);l&&!e.a&&!e.b&&!e.p&&!e.d&&!e.q&&!n&&o&&(e.o="$"+e.o+"$");var c=[];return l?(Ve.concatArray(c,this.output(e)),c.push({type_:"hyphen"})):(n=Ve.patterns.match_("digits",e.d||""),r&&n&&n.remainder===""?(Ve.concatArray(c,Ve.actions["d="](e,t)),Ve.concatArray(c,this.output(e))):(Ve.concatArray(c,this.output(e)),Ve.concatArray(c,Ve.actions.bond(e,t,"-")))),c},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:Ve.go(t,"o")}},comma:function(e,t){var r=t.replace(/\s*$/,""),n=r!==t;return n&&e.parenthesisLevel===0?{type_:"comma enumeration L",p1:r}:{type_:"comma enumeration M",p1:r}},output:function(e,t,r){var n;if(!e.r)n=[],!e.a&&!e.b&&!e.p&&!e.o&&!e.q&&!e.d&&!r||(e.sb&&n.push({type_:"entitySkip"}),!e.o&&!e.q&&!e.d&&!e.b&&!e.p&&r!==2?(e.o=e.a,e.a=void 0):!e.o&&!e.q&&!e.d&&(e.b||e.p)?(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):e.o&&e.dType==="kv"&&Ve.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&e.dType==="kv"&&!e.q&&(e.dType=void 0),n.push({type_:"chemfive",a:Ve.go(e.a,"a"),b:Ve.go(e.b,"bd"),p:Ve.go(e.p,"pq"),o:Ve.go(e.o,"o"),q:Ve.go(e.q,"pq"),d:Ve.go(e.d,e.dType==="oxidation"?"oxidation":"bd"),dType:e.dType}));else{var a;e.rdt==="M"?a=Ve.go(e.rd,"tex-math"):e.rdt==="T"?a=[{type_:"text",p1:e.rd||""}]:a=Ve.go(e.rd);var o;e.rqt==="M"?o=Ve.go(e.rq,"tex-math"):e.rqt==="T"?o=[{type_:"text",p1:e.rq||""}]:o=Ve.go(e.rq),n={type_:"arrow",r:e.r,rd:a,rq:o}}for(var s in e)s!=="parenthesisLevel"&&s!=="beginsWithBond"&&delete e[s];return n},"oxidation-output":function(e,t){var r=["{"];return Ve.concatArray(r,Ve.go(t,"oxidation")),r.push("}"),r},"frac-output":function(e,t){return{type_:"frac-ce",p1:Ve.go(t[0]),p2:Ve.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:Ve.go(t[0]),p2:Ve.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:Ve.go(t[0]),p2:Ve.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:Ve.go(t[0]),p2:Ve.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Ve.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,r){return{type_:"operator",kind_:r||t}}}},a:{transitions:Ve.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:Ve.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:Ve.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var r in e)delete e[r];return t}}}},pq:{transitions:Ve.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:Ve.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Ve.go(t[1],"pq")}}}},bd:{transitions:Ve.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Ve.go(t[1],"bd")}}}},oxidation:{transitions:Ve.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:Ve.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var r in e)delete e[r];return t}}}},"tex-math tight":{transitions:Ve.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var r in e)delete e[r];return t}}}},"9,9":{transitions:Ve.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:Ve.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(e,t){var r=[];return t[0]==="+-"||t[0]==="+/-"?r.push("\\pm "):t[0]&&r.push(t[0]),t[1]&&(Ve.concatArray(r,Ve.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?Ve.concatArray(r,Ve.go(t[2],"pu-9,9")):r.push(t[2])),(t[3]||t[4])&&(t[3]==="e"||t[4]==="*"?r.push({type_:"cdot"}):r.push({type_:"times"}))),t[5]&&r.push("10^{"+t[5]+"}"),r},"number^":function(e,t){var r=[];return t[0]==="+-"||t[0]==="+/-"?r.push("\\pm "):t[0]&&r.push(t[0]),Ve.concatArray(r,Ve.go(t[1],"pu-9,9")),r.push("^{"+t[2]+"}"),r},operator:function(e,t,r){return{type_:"operator",kind_:r||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,r=Ve.patterns.match_("{(...)}",e.d||"");r&&r.remainder===""&&(e.d=r.match_);var n=Ve.patterns.match_("{(...)}",e.q||"");if(n&&n.remainder===""&&(e.q=n.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var a={d:Ve.go(e.d,"pu"),q:Ve.go(e.q,"pu")};e.o==="//"?t={type_:"pu-frac",p1:a.d,p2:a.q}:(t=a.d,a.d.length>1||a.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),Ve.concatArray(t,a.q))}else t=Ve.go(e.d,"pu-2");for(var o in e)delete e[o];return t}}},"pu-2":{transitions:Ve.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var r=Ve.patterns.match_("{(...)}",e.rm||"");r&&r.remainder===""?t=Ve.go(r.match_,"pu"):t={type_:"rm",p1:e.rm}}for(var n in e)delete e[n];return t}}},"pu-9,9":{transitions:Ve.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var r=e.text_.length%3;r===0&&(r=3);for(var n=e.text_.length-3;n>0;n-=3)t.push(e.text_.substr(n,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,r)),t.reverse()}else t.push(e.text_);for(var a in e)delete e[a];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var r=e.text_.length-3,n=0;n"||e.r==="<=>>"||e.r==="<<=>"||e.r==="<-->"?(s="\\long"+s,o.rd&&(s="\\overset{"+o.rd+"}{"+s+"}"),o.rq&&(e.r==="<-->"?s="\\underset{\\lower2mu{"+o.rq+"}}{"+s+"}":s="\\underset{\\lower6mu{"+o.rq+"}}{"+s+"}"),s=" {}\\mathrel{"+s+"}{} "):(o.rq&&(s+="[{"+o.rq+"}]"),s+="{"+o.rd+"}",s=" {}\\mathrel{\\x"+s+"}{} "):s=" {}\\mathrel{\\long"+s+"}{} ",t=s;break;case"operator":t=Er._getOperator(e.kind_);break;case"1st-level escape":t=e.p1+" ";break;case"space":t=" ";break;case"entitySkip":t="~";break;case"pu-space-1":t="~";break;case"pu-space-2":t="\\mkern3mu ";break;case"1000 separator":t="\\mkern2mu ";break;case"commaDecimal":t="{,}";break;case"comma enumeration L":t="{"+e.p1+"}\\mkern6mu ";break;case"comma enumeration M":t="{"+e.p1+"}\\mkern3mu ";break;case"comma enumeration S":t="{"+e.p1+"}\\mkern1mu ";break;case"hyphen":t="\\text{-}";break;case"addition compound":t="\\,{\\cdot}\\,";break;case"electron dot":t="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":t="{\\times}";break;case"prime":t="\\prime ";break;case"cdot":t="\\cdot ";break;case"tight cdot":t="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":t="\\times ";break;case"circa":t="{\\sim}";break;case"^":t="uparrow";break;case"v":t="downarrow";break;case"ellipsis":t="\\ldots ";break;case"/":t="/";break;case" / ":t="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return t},_getArrow:function(e){switch(e){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"leftrightarrows";case"<=>":return"rightleftharpoons";case"\u21CC":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(e){switch(e){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";case"~=":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"~--":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"-~-":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(e){switch(e){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}},Ywt=class Ewt extends be{constructor(t){super(zt(Xt({},t),{type:"delim"})),this.value=t.delim,this.size=t.size}static fromJson(t){return new Ewt(t)}toJson(){return zt(Xt({},super.toJson()),{delim:this.value,size:this.size})}render(t){return new Ue(this.value,{type:"middle"})}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let r=qn(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):Zr(this.command,this.value)}},Nwt=class Owt extends be{constructor(t){super(zt(Xt({},t),{type:"sizeddelim",value:t.delim})),this.delimType=t.delimType,this.size=t.size}static fromJson(t){return new Owt(t)}toJson(){return zt(Xt({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(t){let r=HMe(this.value,this.size,t,{classes:{open:"ML__open",close:"ML__close"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return r?(r=this.bind(t,r),this.caret&&(r.caret=this.caret),r):null}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let r=qn(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):Zr(this.command,this.value)}};S1=class Qwt extends be{constructor(t,r,n,a){var o,s;super({type:"enclose",command:t,style:a.style}),this.body=r,this.backgroundcolor=a.backgroundcolor,n.updiagonalarrow&&(n.updiagonalstrike=!1),n.box&&(n.left=!1,n.right=!1,n.bottom=!1,n.top=!1),this.notation=n,this.shadow=(o=a.shadow)!=null?o:"none",this.strokeWidth=(s=a.strokeWidth)!=null?s:"0.06em",this.strokeWidth||(this.strokeWidth="0.06em"),this.strokeStyle=a.strokeStyle,this.svgStrokeStyle=a.svgStrokeStyle,this.strokeColor=a.strokeColor,this.borderStyle=a.borderStyle,this.padding=a.padding,this.captureSelection=!1}static fromJson(t){return new Qwt(t.command,t.body,t.notation,t)}toJson(){return zt(Xt({},super.toJson()),{notation:this.notation,shadow:this.shadow,strokeWidth:this.strokeWidth,strokeStyle:this.strokeStyle,svgStrokeStyle:this.svgStrokeStyle,strokeColor:this.strokeColor,borderStyle:this.borderStyle,padding:this.padding})}_serialize(t){var r;if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let n=qn(this.command,this.mode);if(n!=null&&n.serialize)return n.serialize(this,t);let a=(r=this.command)!=null?r:"";if(this.command==="\\enclose"){a+="{"+Object.keys(this.notation).join(" ")+"}";let o="",s="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(o+=s+'mathbackground="'+this.backgroundcolor+'"',s=","),this.shadow&&this.shadow!=="auto"&&(o+=s+'shadow="'+this.shadow+'"',s=","),this.strokeWidth||this.strokeStyle!=="solid"?(o+=s+this.borderStyle,s=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(o+=s+'mathcolor="'+this.strokeColor+'"',s=","),o&&(a+=`[${o}]`)}return Zr(a,this.bodyToLatex(t))}render(t){var r,n,a,o,s;let l=new $i({parent:t},this.style),c=be.createBox(l,this.body);if(!c)return null;let u=l6e(this.borderStyle),g=l.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding});c.setStyle("position","relative"),c.setStyle("display","inline-block"),c.setStyle("height",c.height+c.depth,"em"),c.setStyle("width",c.width,"em");let d=new Ue(null,{classes:"ML__notation"}),h=c.height+c.depth+2*g,m=c.width+2*g,p="",b=Math.min(g*.2,.05);if(this.notation.horizontalstrike){let y=2*g+c.height-$d/2;p+=this.line((g+b).toString(),y.toString(),(g+c.width-b).toString(),y.toString())}if(this.notation.verticalstrike){let y=g+c.width/2;p+=this.line(y.toString(),(g+b).toString(),y.toString(),(h-g-b).toString())}if(this.notation.updiagonalstrike&&(p+=this.line((g+b).toString(),(h-g-b).toString(),(g+c.width-b).toString(),(g+b).toString())),this.notation.downdiagonalstrike&&(p+=this.line((g+b).toString(),(g+b).toString(),(g+c.width-b).toString(),(h-g-b).toString())),this.notation.updiagonalarrow){p+=this.line(g.toString(),(2*g+c.depth+c.height).toString(),(g+c.width).toString(),g.toString());let y=.03*Math.sqrt(m*m+h*h)*1,x=c.width*y,C=(c.depth+c.height)*y,I=g+c.width,Z=g;Z+C-.4*x<0&&(Z=.4*x-C),p+='`}};jF={fractionNavigationOrder:"numerator-denominator"},lp=class Twt extends be{constructor(t,r,n){var a,o,s;super(zt(Xt({},n),{type:"genfrac",displayContainsHighlight:!0})),this.above=t,this.below=r,this.hasBarLine=(a=n?.hasBarLine)!=null?a:!0,this.continuousFraction=(o=n?.continuousFraction)!=null?o:!1,this.align=(s=n?.align)!=null?s:"center",this.numerPrefix=n?.numerPrefix,this.denomPrefix=n?.denomPrefix,this.mathstyleName=n?.mathstyleName,this.leftDelim=n?.leftDelim,this.rightDelim=n?.rightDelim}static fromJson(t){return new Twt(t.above,t.below,t)}toJson(){let t={};return this.continuousFraction&&(t.continuousFraction=!0),this.align!=="center"&&(t.align=this.align),this.numerPrefix&&(t.numerPrefix=this.numerPrefix),this.denomPrefix&&(t.denomPrefix=this.denomPrefix),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),this.hasBarLine||(t.hasBarLine=!1),this.mathstyleName&&(t.mathstyleName=this.mathstyleName),Xt(Xt({},super.toJson()),t)}get children(){if(this._children)return this._children;let t=[];if(jF.fractionNavigationOrder==="denominator-numerator"){for(let r of this.below)t.push(...r.children),t.push(r);for(let r of this.above)t.push(...r.children),t.push(r)}else{for(let r of this.above)t.push(...r.children),t.push(r);for(let r of this.below)t.push(...r.children),t.push(r)}return this._children=t,t}render(t){var r,n;let a=new $i({parent:t,mathstyle:this.mathstyleName},this.style),o=a.metrics,s=new $i({parent:a,mathstyle:this.continuousFraction?"":"numerator"},this.style),l=this.numerPrefix?new Ue([new Ue(this.numerPrefix),be.createBox(s,this.above)],{isTight:s.isTight,type:"ignore"}):(r=be.createBox(s,this.above,{type:"ignore"}))!=null?r:new Ue(null,{type:"ignore"}),c=new $i({parent:a,mathstyle:this.continuousFraction?"":"denominator"},this.style),u=this.denomPrefix?new Ue([new Ue(this.denomPrefix),be.createBox(c,this.below,{type:"ignore"})]):(n=be.createBox(c,this.below,{type:"ignore"}))!=null?n:new Ue(null,{type:"ignore"}),g=this.hasBarLine?o.defaultRuleThickness:0,d,h=0,m;a.isDisplayStyle?(d=s.metrics.num1,h=g>0?3*g:7*g,m=c.metrics.denom1):(g>0?(d=s.metrics.num2,h=g):(d=s.metrics.num3,h=3*o.defaultRuleThickness),m=c.metrics.denom2);let p=[];this.isSelected&&p.push("ML__selected");let b=l.depth,f=u.height,v;if(g<=0){let F=d-b-(f-m);Fnew Kn(r)),this.skipBoundary=!0}static fromJson(t){return new Hwt}toJson(){return super.toJson()}render(t){let r=be.createBox(t,this.body);return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}_serialize(t){var r,n;return(n=(r=this.body)==null?void 0:r.map(a=>a.value).join(""))!=null?n:""}},Z_=class _wt extends be{constructor(t,r){super(zt(Xt({},r),{type:"extensible-symbol",isFunction:r?.isFunction})),this.value=t,this.variant=r?.variant,this.subsupPlacement=r?.limits}static fromJson(t){return new _wt(t.symbol,t)}toJson(){let t=super.toJson();return this.variant&&(t.variant=this.variant),this.subsupPlacement&&(t.limits=this.subsupPlacement),this.value&&(t.symbol=this.value),t}render(t){var r;let n=t.isDisplayStyle&&this.value!=="\\smallint",a=new Ue(this.value,{fontFamily:n?"Size2-Regular":"Size1-Regular",classes:"ML__op-symbol "+(n?"ML__large-op":"ML__small-op"),type:"op",maxFontSize:t.scalingFactor,isSelected:this.isSelected});if(!a)return null;a.right=a.italic;let o=(a.height-a.depth)/2-Pl*t.scalingFactor,s=a.italic;a.setTop(o);let l=a;if(this.superscript||this.subscript){let c=(r=this.subsupPlacement)!=null?r:"auto";c==="auto"&&t.isDisplayStyle&&(c="over-under"),l=c==="over-under"?this.attachLimits(t,{base:a,baseShift:o,slant:s}):this.attachSupsub(t,{base:a})}return new Ue(this.bind(t,l),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"ML__op-group"}).wrap(t)}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let r=qn(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);let n=[];return n.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&n.push("\\limits"),this.subsupPlacement==="adjacent"&&n.push("\\nolimits"),this.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(this.supsubToLatex(t)),ki(n)}},cp=class jwt extends be{constructor(t){let r=t.body;super(zt(Xt({},t),{type:"overlap",body:typeof r=="string"?[new be({value:r})]:r,style:t?.style})),this.skipBoundary=!0,this.align=t?.align,this.boxType=t?.boxType}static fromJson(t){return new jwt(t)}toJson(){let t={};return this.align&&(t.align=this.align),this.boxType&&(t.boxType=this.boxType),Xt(Xt({},super.toJson()),t)}render(t){let r=be.createBox(t,this.body,{classes:"ML__inner"});return r?(this.caret&&(r.caret=this.caret),this.bind(t,new Ue([r,new Ue(null,{classes:"ML__fix"})],{classes:this.align==="right"?"ML__rlap":"ML__llap",type:this.boxType}))):null}},ll=class zwt extends be{constructor(t){var r,n,a,o;super({type:"overunder",command:t.command,style:t.style,mode:t.mode,body:t.body,skipBoundary:(r=t.skipBoundary)!=null?r:!0}),this.subsupPlacement=t.supsubPlacement,this.svgAbove=t.svgAbove,this.svgBelow=t.svgBelow,this.svgBody=t.svgBody,this.above=t.above,this.below=t.below,this.boxType=(n=t.boxType)!=null?n:"ord",this.paddedBody=(a=t.paddedBody)!=null?a:!1,this.paddedLabels=(o=t.paddedLabels)!=null?o:!1}static fromJson(t){return new zwt(t)}toJson(){let t=super.toJson();return this.skipBoundary||(t.skipBoundary=!1),this.subsupPlacement&&(t.subsupPlacement=this.subsupPlacement),this.svgAbove&&(t.svgAbove=this.svgAbove),this.svgBelow&&(t.svgBelow=this.svgBelow),this.svgBody&&(t.svgBody=this.svgBody),this.boxType!=="ord"&&(t.boxType=this.boxType),this.paddedBody&&(t.paddedBody=!0),this.paddedLabels&&(t.paddedLabels=!0),t}render(t){let r=this.svgBody?TF(this.svgBody):be.createBox(t,this.body,{type:"ignore"}),n=new $i({parent:t,mathstyle:"scriptstyle"},this.style),a=null;this.svgAbove?a=TF(this.svgAbove):this.above&&(a=be.createBox(n,this.above,{type:"ignore"}));let o=null;this.svgBelow?o=TF(this.svgBelow):this.below&&(o=be.createBox(n,this.below,{type:"ignore"})),this.paddedBody&&(r=new Ue([op(t,"ML__open"),r,op(t,"ML__close")],{type:"ignore"}));let s=d6e(t,{base:r,above:a,below:o,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return s?(this.subsupPlacement==="over-under"?s=this.attachLimits(t,{base:s,type:s.type}):s=this.attachSupsub(t,{base:s}),this.caret&&(s.caret=this.caret),this.bind(t,s)):null}};C0=class Dwt extends be{constructor(t){var r,n,a,o;super(zt(Xt({},t),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(r=t.isInvisible)!=null?r:!1,this.smashDepth=(n=t.smashDepth)!=null?n:!1,this.smashHeight=(a=t.smashHeight)!=null?a:!1,this.smashWidth=(o=t.smashWidth)!=null?o:!1}static fromJson(t){return new Dwt(t)}toJson(){let t={};return this.isInvisible&&(t.isInvisible=!0),this.smashDepth&&(t.smashDepth=!0),this.smashHeight&&(t.smashHeight=!0),this.smashWidth&&(t.smashWidth=!0),Xt(Xt({},super.toJson()),t)}render(t){let r=new $i({parent:t,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return this.isInvisible,be.createBox(r,this.body,{classes:"ML__inner"});let n=be.createBox(this.isInvisible?r:t,this.body);if(!n)return null;if(this.smashWidth){let a=new Ue(null,{classes:"ML__fix"});return new Ue([n,a],{classes:"ML__rlap"}).wrap(t)}if(!this.smashHeight&&!this.smashDepth)return n;if(this.smashHeight&&(n.height=0),this.smashDepth&&(n.depth=0),n.children)for(let a of n.children)this.smashHeight&&(a.height=0),this.smashDepth&&(a.depth=0);return new Bn({firstBaseline:[{box:n}]},{type:n.type}).wrap(t)}},L1=class Mwt extends be{constructor(t){var r;super(Xt({type:"spacing"},t)),this.width=t?.width,this._braced=(r=t?.braced)!=null?r:!1}static fromJson(t){return new Mwt(t)}toJson(){let t=super.toJson();return this.width!==void 0&&(t.width=this.width),this._braced&&(t.braced=!0),t}render(t){var r;if(this.command==="space")return new Ue(this.mode==="math"?null:" ");let n;if(this.width!==void 0)n=new Ue(null,{classes:"ML__mspace"}),n.left=t.toEm(this.width);else{let a=(r={"\\qquad":"ML__qquad","\\quad":"ML__quad","\\enspace":"ML__enspace","\\;":"ML__thickspace","\\:":"ML__mediumspace","\\>":"ML__mediumspace","\\,":"ML__thinspace","\\!":"ML__negativethinspace"}[this.command])!=null?r:"ML__mediumspace";n=new Ue(null,{classes:a})}return n=this.bind(t,n),this.caret&&(n.caret=this.caret),n}_serialize(t){var r;if(!t.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let n=qn(this.command,this.mode);if(n!=null&&n.serialize)return n.serialize(this,t);let a=(r=this.command)!=null?r:"";return this.width===void 0?a:this._braced&&!("register"in this.width)?`${a}{${fa(this.width)}}`:`${a}${fa(this.width)}`}},Pwt=class Kwt extends be{constructor(t){var r;super(zt(Xt({},t),{type:"surd",mode:(r=t.mode)!=null?r:"math",style:t.style,displayContainsHighlight:!0,body:t.body})),this.above=t.index}static fromJson(t){return new Kwt(zt(Xt({},t),{index:t.above}))}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let r=qn(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);let n=this.command,a=this.bodyToLatex(t);return this.above&&!this.hasEmptyBranch("above")?Zr(`${n}[${this.aboveToLatex(t)}]`,a):/^[0-9]$/.test(a)?`${n}${a}`:Zr(n,a)}get children(){if(this._children)return this._children;let t=[];if(this.above)for(let r of this.above)t.push(...r.children),t.push(r);if(this.body)for(let r of this.body)t.push(...r.children),t.push(r);return this._children=t,t}render(t){var r;let n=new $i({parent:t,mathstyle:"cramp"},this.style),a=(r=be.createBox(n,this.body,{type:"inner"}))!=null?r:new Ue(null),o=n.scalingFactor,s=n.metrics.defaultRuleThickness/o,l=t.isDisplayStyle?$d:s,c=new Ue(null,{classes:"ML__sqrt-line",style:this.style});c.height=s,c.softWidth=a.width;let u=o*(s+l/4),g=Math.max(o*2*l,a.height+a.depth)+u+s,d=new $i({parent:t},this.style),h=this.bind(d,new Ue(lV("inner","\\surd",g,!1,d,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!h)return null;let m=h.height+h.depth-s;m>a.height+a.depth+u&&(u=(u+m-(a.height+a.depth))/2),h.setTop(h.height-a.height-u);let p=this.bind(t,new Bn({firstBaseline:[{box:new Ue(a)},u-2*s,{box:c},s]})),b=be.createBox(new $i({parent:t,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!b){let y=new Ue([h,p],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return y.setStyle("display","inline-block"),y.setStyle("height",y.height+y.depth,"em"),this.caret&&(y.caret=this.caret),this.bind(t,y)}let f=new Bn({shift:-.6*(Math.max(h.height,p.height)-Math.max(h.depth,p.depth)),children:[{box:b}]}),v=new Ue([new Ue(f,{classes:"ML__sqrt-index",type:"ignore"}),h,p],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return v.height=h.height,v.depth=h.depth,this.caret&&(v.caret=this.caret),this.bind(t,v)}},u6e=class extends Ue{constructor(e){super(null,{type:"skip"}),this._width=e}toMarkup(){return``}};g6e={ord:{op:3,bin:4,rel:5,inner:3},op:{ord:3,op:3,rel:5,inner:3},bin:{ord:4,op:4,open:4,inner:4},rel:{ord:5,op:5,open:5,inner:5},close:{op:3,bin:4,rel:5,inner:3},punct:{ord:3,op:3,rel:3,open:3,punct:3,inner:3},inner:{ord:3,op:3,bin:4,rel:5,open:3,punct:3,inner:3}},h6e={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};R_=class qwt extends be{constructor(t){super({type:"tooltip",command:t.command,mode:t.mode,style:t.style,body:t.body,displayContainsHighlight:!0}),this.tooltip=new be({type:"root",mode:t.content,body:t.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(t){return new qwt(zt(Xt({},t),{tooltip:_g(t.tooltip)}))}toJson(){var t;let r=(t=this.tooltip.body)==null?void 0:t.filter(n=>n.type!=="first").map(n=>n.toJson());return zt(Xt({},super.toJson()),{tooltip:r})}render(t){let r=be.createBox(t,this.body);if(!r)return null;let n=new $i({parent:t,mathstyle:"displaystyle"},{fontSize:v_}),a=GV(w1(new Ue(this.tooltip.render(n),{classes:"ML__tooltip-content"}),n)),o=new Ue([a,r],{classes:"ML__tooltip-container"});return this.caret&&(o.caret=this.caret),this.bind(t,o)}},dp=class $wt extends be{constructor(t,r){super(zt(Xt({},r),{type:"operator",isFunction:r?.isFunction})),this.value=t,this.variant=r?.variant,this.variantStyle=r?.variantStyle,this.subsupPlacement=r?.limits}static fromJson(t){return new $wt(t.symbol,t)}toJson(){let t=super.toJson();return this.variant&&(t.variant=this.variant),this.variantStyle&&(t.variantStyle=this.variantStyle),this.subsupPlacement&&(t.limits=this.subsupPlacement),this.value&&(t.symbol=this.value),t}render(t){var r;let n=new Ue(this.value,{type:"op",mode:"math",maxFontSize:t.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:t.letterShapeStyle}),a=n;if(this.superscript||this.subscript){let o=(r=this.subsupPlacement)!=null?r:"auto";a=o==="over-under"||o==="auto"&&t.isDisplayStyle?this.attachLimits(t,{base:n}):this.attachSupsub(t,{base:n})}return new Ue(this.bind(t,a),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"ML__op-group"}).wrap(t)}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let r=qn(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);let n=[this.command];return this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&n.push("\\limits"),this.subsupPlacement==="adjacent"&&n.push("\\nolimits"),this.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(this.supsubToLatex(t)),ki(n)}};_St={acute:714,grave:715,dot:729,ddot:168,dddot:8411,ddddot:8412,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};Ge(Object.keys(_St),"{body:auto}",{createAtom:e=>new xV(zt(Xt({},e),{body:Me(e.args[0]),accentChar:_St[e.command.slice(1)]}))});Ge(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:e=>{let t=_Lt(Me(e.args[0]));return new xV(zt(Xt({},e),{body:Me(e.args[0]),svgAccent:e.command.slice(1)+(t.length>5?"4":["1","1","2","2","3","3"][t.length])}))}});Ge(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:e=>new xV(zt(Xt({},e),{body:Me(e.args[0]),svgAccent:"overarc"}))});Ge(["underarc","underparen"],"{body:auto}",{createAtom:e=>new ll(zt(Xt({},e),{body:Me(e.args[0]),svgBelow:"underarc"}))});Ge("utilde","{body:auto}",{createAtom:e=>{let t=Me(e.args[0]),r=_Lt(t),n="widetilde"+(r.length>5?"4":["1","1","2","2","3","3"][r.length]);return new ll(zt(Xt({},e),{body:t,svgBelow:n,boxType:k1(t)}))}});Ge("^","{:string}",{createAtom:e=>{var t;return new be(zt(Xt({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[e.args[0]])!=null?t:"^"}))}});Ge("`","{:string}",{createAtom:e=>{var t;return new be(zt(Xt({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[e.args[0]])!=null?t:"`"}))}});Ge("'","{:string}",{createAtom:e=>{var t;return new be(zt(Xt({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[e.args[0]])!=null?t:"'"}))}});Ge('"',"{:string}",{createAtom:e=>{var t,r;return new be(zt(Xt({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(r={a:"\xE4",e:"\xEB",i:"\xEF",o:"\xF6",u:"\xFC",A:"\xC4",E:"\xCB",I:"\xCB",O:"\xD6",U:"\xDC"}[e.args[0]])!=null?r:'"'+e.args[0]:'"'}))}});Ge(".","{:string}",{createAtom:e=>{var t,r;return new be(zt(Xt({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(r={a:"\u0227",e:"\u0117",i:"\u0307i",o:"\u022F",u:"\u0307u",A:"\u0226",E:"\u0116",I:"\u0130",O:"\u022E",U:"\u0307U"}[e.args[0]])!=null?r:"."+e.args[0]:"."}))}});Ge("=","{:string}",{createAtom:e=>{var t,r;return new be(zt(Xt({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(r={a:"\u0101",e:"\u0113",i:"\u012B",o:"\u014D",u:"\u016B",A:"\u0100",E:"\u0112",I:"\u012A",O:"\u014C",U:"\u016A"}[e.args[0]])!=null?r:"="+e.args[0]:"="}))}});Ge("~","{:string}",{createAtom:e=>{var t;return new be(zt(Xt({type:"mord"},e),{isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[e.args[0]])!=null?t:"\xB4"}))}});Ge("c","{:string}",{createAtom:e=>{var t;return new be(zt(Xt({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={c:"\xE7",C:"\xC7"}[e.args[0]])!=null?t:""}))}});Ge("enclose","{notation:string}[style:string]{body:auto}",{createAtom:e=>{var t,r;let n=e.args,a={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"none",svgStrokeStyle:void 0,borderStyle:void 0,style:(t=e.style)!=null?t:{}};if(n[1]){let s=n[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(let l of s){let c=l.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(c)a.strokeWidth=c[1],a.strokeStyle=c[2],a.strokeColor=c[3];else{let u=l.match(/\s*([a-z]*)\s*=\s*"(.*)"/);u&&(u[1]==="mathbackground"?a.backgroundcolor=u[2]:u[1]==="mathcolor"?a.strokeColor=u[2]:u[1]==="padding"?a.padding=u[2]:u[1]==="shadow"&&(a.shadow=u[2]))}}a.strokeStyle==="dashed"?a.svgStrokeStyle="5,5":a.strokeStyle==="dotted"&&(a.svgStrokeStyle="1,5")}a.borderStyle=`${a.strokeWidth} ${a.strokeStyle} ${a.strokeColor}`;let o={};return((r=n[0])!=null?r:"").split(/[, ]/).filter(s=>s.length>0).forEach(s=>{o[s.toLowerCase()]=!0}),new S1(e.command,Me(n[2]),o,a)}});Ge("cancel","{body:auto}",{createAtom:e=>{var t;return new S1(e.command,Me(e.args[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}});Ge("bcancel","{body:auto}",{createAtom:e=>{var t;return new S1(e.command,Me(e.args[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}});Ge("xcancel","{body:auto}",{createAtom:e=>{var t;return new S1(e.command,Me(e.args[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}});b_(["math","displaymath"],Mo);b_("center",Mo);ru(["multline","multline*"],"",Mo);Ge("displaylines","",{parse:e=>{if(e.skipWhitespace(),!e.match("<{>"))return[];let t=[],r=[];e.mathlist.length>0&&t.push([e.mathlist]),e.beginContext({tabular:!0,root:!0});do{if(e.end()||e.match("<}>"))break;e.matchColumnSeparator()||e.matchRowSeparator()?(t.push([r]),r=[]):r.push(...e.scan(a=>["<}>","&","\\cr","\\\\","\\tabularnewline"].includes(a)))}while(!0);e.endContext(),t.push([r]);let n=e.scan();return n.length>0&&t.push([n]),t},createAtom:e=>new Ui("lines",e.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}],classes:["ML__multiline_environment"],isRoot:!0,minColumns:1,maxColumns:1,minRows:1})});ru("split","",Mo);ru(["gather","gather*","gathered"],"",Mo);ru(["equation","equation*","subequations"],"",Mo);b_(["align","align*","eqnarray"],Mo,{tabular:!0});ru(["aligned"],"",Mo);ru("array","{columns:colspec}",(e,t,r,n)=>new Ui(e,t,r,{columns:n[0],mathstyleName:"textstyle"}));ru(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",Mo);ru(["smallmatrix","smallmatrix*"],"[columns:colspec]",Mo);ru(["cases","dcases","rcases"],"",Mo);Ge(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:e=>{var t;return new ll(zt(Xt({},e),{body:Me((t=e.args)==null?void 0:t[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:e.command.slice(1)}))}});Ge("overbrace","{:auto}",{createAtom:e=>new ll(zt(Xt({},e),{body:Me(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:e.command.slice(1)}))});Ge(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:e=>new ll(zt(Xt({},e),{body:Me(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:e.command.slice(1)}))});Ge(["underbrace"],"{:auto}",{createAtom:e=>new ll(zt(Xt({},e),{body:Me(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:e.command.slice(1)}))});Ge(["xrightarrow","longrightarrow","xleftarrow","longleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","longleftrightarrow","xLeftrightarrow","xrightleftharpoons","longrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xleftrightarrows","longleftrightarrows","xRightleftharpoons","longRightleftharpoons","xLeftrightharpoons","longLeftrightharpoons"],"[:auto]{:auto}",{createAtom:e=>{var t,r,n,a,o;return new ll(zt(Xt({},e),{svgBody:e.command.slice(1),above:((r=Me((t=e.args)==null?void 0:t[1]))==null?void 0:r.length)===0?void 0:Me((n=e.args)==null?void 0:n[1]),below:(o=Me((a=e.args)==null?void 0:a[0]))!=null?o:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}))},serialize:(e,t)=>e.command+(e.hasEmptyBranch("below")?"":`[${e.belowToLatex(t)}]`)+`{${e.aboveToLatex(t)}}${e.supsubToLatex(t)}`});Ge(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","cotg","coth","ctg","cth","csc","cosec","deg","dim","exp","gcd","hom","inf","ker","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th","arcsec","arccsc","arsinh","arcosh","artanh","arcsech","arccsch"],"",{isFunction:!0,ifMode:"math",createAtom:e=>new dp(e.command.slice(1),zt(Xt({},e),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))});Ge(["liminf","limsup"],"",{ifMode:"math",createAtom:e=>new dp({"\\liminf":"lim inf","\\limsup":"lim sup"}[e.command],zt(Xt({},e),{limits:"over-under",variant:"main"}))});Ge(["lim","mod"],"",{ifMode:"math",createAtom:e=>new dp(e.command.slice(1),zt(Xt({},e),{limits:"over-under",variant:"main"}))});Ge(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:e=>new dp(e.command.slice(1),zt(Xt({},e),{limits:"over-under",isFunction:!0,variant:"main"}))});Ge("ang","{:math}",{ifMode:"math",createAtom:e=>new be(zt(Xt({},e),{body:Me(e.args[0])})),serialize:(e,t)=>`\\ang{${e.bodyToLatex(t)}}`,render:(e,t)=>{let r=e.createBox(t),n=r.caret;r.caret=void 0;let a=new Ue("\xB0",{style:zt(Xt({},e.style),{variant:"normal",variantStyle:"up"})});return new Ue([r,a],{type:"inner",isSelected:e.isSelected,caret:n})}});Ge("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:e=>new Pwt(zt(Xt({},e),{body:Me(e.args[1]),index:e.args[0]?Me(e.args[0]):void 0}))});Ge(["frac","dfrac","tfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:e=>{let t=Xt({},e),r=e.command,n=e.args;switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":t.hasBarLine=!0;break;case"\\atopfrac":t.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":t.hasBarLine=!1,t.leftDelim="(",t.rightDelim=")";break;case"\\cfrac":t.hasBarLine=!0,t.continuousFraction=!0;break;default:}switch(r){case"\\dfrac":case"\\dbinom":t.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":t.mathstyleName="textstyle";break;default:}return new lp(n[0]?Me(n[0]):[new Kl],n[1]?Me(n[1]):[new Kl],t)},serialize:(e,t)=>{let r=e.aboveToLatex(t),n=e.belowToLatex(t);return/^[0-9]$/.test(r)&&/^[0-9]$/.test(n)?`${e.command}${r}${n}`:Zr(e.command,r,n)}});Ge(["cfrac"],"[:string]{:expression}{:expression}",{ifMode:"math",createAtom:e=>{let t=Xt({},e),r=e.args;return t.hasBarLine=!0,t.continuousFraction=!0,r[0]==="r"&&(t.align="right"),r[0]==="l"&&(t.align="left"),new lp(r[1]?Me(r[1]):[new Kl],r[2]?Me(r[2]):[new Kl],t)},serialize:(e,t)=>{let r=e.aboveToLatex(t),n=e.belowToLatex(t);return Zr(e.command,r,n)}});Ge(["brace","brack"],"",{infix:!0,createAtom:e=>new lp(Me(e.args[0]),Me(e.args[1]),zt(Xt({},e),{hasBarLine:!1,leftDelim:e.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:e.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(e,t)=>ki([e.aboveToLatex(t),e.command,e.belowToLatex(t)])});Ge(["over","atop","choose"],"",{infix:!0,createAtom:e=>{let t,r,n=e.args;return e.command==="\\choose"&&(t="(",r=")"),new lp(Me(n[0]),Me(n[1]),zt(Xt({},e),{hasBarLine:e.command==="\\over",leftDelim:t,rightDelim:r}))},serialize:(e,t)=>ki([e.aboveToLatex(t),e.command,e.belowToLatex(t)])});Ge(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:e=>{var t,r;let n=e.args;return new lp(Me(n[0]),Me(n[1]),zt(Xt({},e),{leftDelim:(t=n[2])!=null?t:".",rightDelim:(r=n[3])!=null?r:".",hasBarLine:!1}))},serialize:(e,t)=>`${e.aboveToLatex(t)} ${e.command}${e.leftDelim}${e.rightDelim}${e.belowToLatex(t)}`});Ge("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:e=>new lp(Me(e.args[0]),Me(e.args[1]),zt(Xt({},e),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"})),serialize:(e,t)=>ki([e.aboveToLatex(t),e.command,e.belowToLatex(t)])});Ge(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:e=>new Z_({coprod:"\u2210",bigvee:"\u22C1",bigwedge:"\u22C0",biguplus:"\u2A04",bigcap:"\u22C2",bigcup:"\u22C3",intop:"\u222B",prod:"\u220F",sum:"\u2211",bigotimes:"\u2A02",bigoplus:"\u2A01",bigodot:"\u2A00",bigsqcup:"\u2A06",smallint:"\u222B"}[e.command.slice(1)],zt(Xt({},e),{limits:"auto",variant:"main"}))});Ge("smallint","",{ifMode:"math",createAtom:e=>new dp("\u222B",zt(Xt({},e),{limits:"adjacent",variant:"main"}))});zSt={int:"\u222B",iint:"\u222C",iiint:"\u222D",oint:"\u222E",oiint:"\u222F",oiiint:"\u2230",intclockwise:"\u2231",varointclockwise:"\u2232",ointctrclockwise:"\u2233",intctrclockwise:"\u2A11",sqcup:"\u2294",sqcap:"\u2293",uplus:"\u228E",wr:"\u2240",amalg:"\u2A3F",Cap:"\u22D2",Cup:"\u22D3",doublecap:"\u22D2",doublecup:"\u22D3"};Ge(Object.keys(zSt),"",{ifMode:"math",createAtom:e=>{let t=e.command,r=zSt[t.slice(1)];return new Z_(r,zt(Xt({},e),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[r]}))}});Ge(["Re","Im"],"",{ifMode:"math",createAtom:e=>new dp({"\\Re":"\u211C","\\Im":"\u2111"}[e.command],zt(Xt({},e),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))});Ge("middle","{:delim}",{ifMode:"math",createAtom:e=>{var t;return new Ywt(zt(Xt({},e),{delim:(t=e.args[0])!=null?t:"|",size:1}))}});Ge("the","{:value}",{createAtom:e=>new be(zt(Xt({},e),{captureSelection:!0,verbatimLatex:null})),render:(e,t)=>{var r;let n=new $i({parent:t},e.style),a="";e.isSelected&&(a+=" ML__selected");let o=n.evaluate(e.args[0]);return new Ue(((r=fa(o))!=null?r:"").split("").map(s=>new Ue(s,{type:"ord",classes:a,mode:e.mode,isSelected:e.isSelected,style:Xt({variant:"main"},e.style)})),{type:"lift",style:e.style,caret:e.caret,isSelected:e.isSelected,classes:a}).wrap(n)},serialize:e=>{var t;return`\\the${(t=fa(e.args[0]))!=null?t:"\\relax"}`}});Ge("mathtip","{:auto}{:math}",{createAtom:e=>new R_(zt(Xt({},e),{body:Me(e.args[0]),tooltip:Me(e.args[1]),content:"math"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\mathtip{${e.bodyToLatex(t)}}{${be.serialize([e.tooltip],zt(Xt({},t),{defaultMode:"math"}))}}`});Ge("texttip","{:auto}{:text}",{createAtom:e=>new R_(zt(Xt({},e),{body:Me(e.args[0]),tooltip:Me(e.args[1]),content:"text"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${be.serialize([e.tooltip],zt(Xt({},t),{defaultMode:"text"}))}}`});Ge("error","{:math}",{createAtom:e=>new be(zt(Xt({},e),{body:Me(e.args[0])})),serialize:(e,t)=>`\\error{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__error"})});Ge("ensuremath","{:math}",{createAtom:e=>new be(zt(Xt({},e),{body:Me(e.args[0])})),serialize:(e,t)=>`${e.command}{${e.bodyToLatex(zt(Xt({},t),{defaultMode:"math"}))}}`});Ge("color","{:value}",{applyStyle:(e,t,r,n)=>{var a,o;return zt(Xt({},e),{verbatimColor:(a=fa(r[0]))!=null?a:void 0,color:n.toColor((o=r[0])!=null?o:{string:"red"})})}});Ge("textcolor","{:value}{content:auto*}",{applyStyle:(e,t,r,n)=>{var a,o;return zt(Xt({},e),{verbatimColor:(a=fa(r[0]))!=null?a:void 0,color:n.toColor((o=r[0])!=null?o:{string:"red"})})}});Ge("boxed","{content:math}",{createAtom:e=>new zg(zt(Xt({},e),{body:Me(e.args[0]),framecolor:{string:"black"}}))});Ge("colorbox","{:value}{:text*}",{applyStyle:(e,t,r,n)=>{var a,o;return zt(Xt({},e),{verbatimBackgroundColor:(a=fa(r[0]))!=null?a:void 0,backgroundColor:n.toBackgroundColor((o=r[0])!=null?o:{string:"yellow"})})}});Ge("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:e=>{var t,r;return new zg(zt(Xt({},e),{body:Me(e.args[2]),framecolor:(t=e.args[0])!=null?t:{string:"blue"},backgroundcolor:(r=e.args[1])!=null?r:{string:"yellow"}}))},serialize:(e,t)=>{var r,n;return t.skipStyles?e.bodyToLatex(zt(Xt({},t),{defaultMode:"text"})):Zr(e.command,(r=fa(e.framecolor))!=null?r:"",(n=fa(e.backgroundcolor))!=null?n:"",e.bodyToLatex(zt(Xt({},t),{defaultMode:"text"})))}});Ge("bbox","[:bbox]{body:auto}",{createAtom:e=>{var t;let r=e.args[0],n=Me(e.args[1]);return r?new zg(zt(Xt({},e),{body:n,padding:r.padding,border:r.border,backgroundcolor:(t=r.backgroundcolor)!=null?t:void 0})):new zg(zt(Xt({},e),{body:n}))},serialize:(e,t)=>{var r,n;if(t.skipStyles)return e.bodyToLatex(t);let a=e.command;if(Number.isFinite(e.padding)||e.border!==void 0||e.backgroundcolor!==void 0){let o=[];e.padding&&o.push((r=fa(e.padding))!=null?r:""),e.border&&o.push(`border: ${e.border}`),e.backgroundcolor&&o.push((n=fa(e.backgroundcolor))!=null?n:""),a+=`[${o.join(",")}]`}return Zr(a,e.bodyToLatex(t))}});Ge(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:e=>new be(zt(Xt({},e),{body:Me(e.args[0])})),render:(e,t)=>{let r=new $i({parent:t,mathstyle:e.command.slice(1)},e.style),n=be.createBox(r,e.body,{type:"lift"});return e.caret&&(n.caret=e.caret),e.bind(t,n)},serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{${ki([e.command,e.bodyToLatex(t)])}}`});Ge(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:(e,t)=>zt(Xt({},e),{fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[t]})});Ge("fontseries","{:string}",{ifMode:"text",applyStyle:(e,t,r)=>{var n;return zt(Xt({},e),{fontSeries:(n=r[0])!=null?n:"auto"})}});Ge("fontshape","{:string}",{ifMode:"text",applyStyle:(e,t,r)=>{var n;return zt(Xt({},e),{fontShape:(n=r[0])!=null?n:"auto"})}});Ge("fontfamily","{:string}",{ifMode:"text",applyStyle:(e,t,r)=>{var n;return zt(Xt({},e),{fontFamily:(n=r[0])!=null?n:"roman"})}});Ge("selectfont","",{ifMode:"text",applyStyle:e=>e});Ge("bf","{:rest*}",{applyStyle:e=>zt(Xt({},e),{fontSeries:"b",fontShape:"n",fontFamily:"roman"})});Ge(["boldsymbol","bm","bold"],"{:math*}",{applyMode:"math",applyStyle:e=>zt(Xt({},e),{variantStyle:"bold"})});Ge("bfseries","{:rest*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontSeries:"b"})});Ge("mdseries","{:rest*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontSeries:"m"})});Ge("upshape","{:rest*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontShape:"n"})});Ge("slshape","{:rest*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontShape:"sl"})});Ge("scshape","{:rest*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontShape:"sc"})});Ge("textbf","{:text*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontSeries:"b"})});Ge("textmd","{:text*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontSeries:"m"})});Ge("textup","{:text*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontShape:"n"})});Ge("textnormal","{:text*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontShape:"n",fontSeries:"m"})});Ge("textsl","{:text*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontShape:"sl"})});Ge("textit","{:text*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontShape:"it"})});Ge("textsc","{:text*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontShape:"sc"})});Ge("textrm","{:text*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontFamily:"roman"})});Ge("textsf","{:text*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontFamily:"sans-serif"})});Ge("texttt","{:text*}",{applyMode:"text",applyStyle:e=>zt(Xt({},e),{fontFamily:"monospace"})});Ge("mathbf","{:math*}",{applyMode:"math",applyStyle:e=>zt(Xt({},e),{variant:"normal",variantStyle:"bold"})});Ge("mathit","{:math*}",{applyMode:"math",applyStyle:e=>zt(Xt({},e),{variant:"main",variantStyle:"italic"})});Ge("mathnormal","{:math*}",{applyMode:"math",applyStyle:e=>zt(Xt({},e),{variant:"normal",variantStyle:"italic"})});Ge("mathbfit","{:math*}",{applyMode:"math",applyStyle:e=>zt(Xt({},e),{variant:"main",variantStyle:"bolditalic"})});Ge("mathrm","{:math*}",{applyMode:"math",applyStyle:e=>zt(Xt({},e),{variant:"normal",variantStyle:"up"})});Ge("mathsf","{:math*}",{applyMode:"math",applyStyle:e=>zt(Xt({},e),{variant:"sans-serif",variantStyle:"up"})});Ge("mathtt","{:math*}",{applyMode:"math",applyStyle:e=>zt(Xt({},e),{variant:"monospace",variantStyle:"up"})});Ge("it","{:rest*}",{applyStyle:e=>zt(Xt({},e),{fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})});Ge("rmfamily","{:rest*}",{applyStyle:e=>zt(Xt({},e),{fontFamily:"roman"})});Ge("sffamily","{:rest*}",{applyStyle:e=>zt(Xt({},e),{fontFamily:"sans-serif"})});Ge("ttfamily","{:rest*}",{applyStyle:e=>zt(Xt({},e),{fontFamily:"monospace"})});Ge(["Bbb","mathbb"],"{:math*}",{applyStyle:e=>zt(Xt({},e),{variant:"double-struck",variantStyle:BV(e.variantStyle)})});Ge(["frak","mathfrak"],"{:math*}",{applyStyle:e=>zt(Xt({},e),{variant:"fraktur",variantStyle:BV(e.variantStyle)})});Ge("mathcal","{:math*}",{applyStyle:e=>zt(Xt({},e),{variant:"calligraphic",variantStyle:BV(e.variantStyle)})});Ge("mathscr","{:math*}",{applyStyle:e=>zt(Xt({},e),{variant:"script",variantStyle:BV(e.variantStyle)})});Ge("mbox","{:text}",{ifMode:"math",createAtom:e=>new be(zt(Xt({},e),{type:"mord",body:Me(e.args[0]),mode:"math"})),serialize:(e,t)=>Zr("\\mbox",e.bodyToLatex(zt(Xt({},t),{defaultMode:"text"})))});Ge("text","{:text}",{ifMode:"math",applyMode:"text"});Ge(["class","htmlClass"],"{name:string}{content:auto*}",{createAtom:e=>new be(zt(Xt({},e),{type:"mord",body:Me(e.args[1])})),serialize:(e,t)=>!e.args[0]||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`,render:(e,t)=>{var r;return e.createBox(t,{classes:(r=e.args[0])!=null?r:"",boxType:"lift"})}});Ge(["cssId","htmlId"],"{id:string}{content:auto*}",{createAtom:e=>new be(zt(Xt({},e),{type:"mord",body:Me(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var r;let n=e.createBox(t);return n.cssId=(r=e.args[0])!=null?r:"",n}});Ge("htmlData","{data:string}{content:auto*}",{createAtom:e=>new be(zt(Xt({},e),{type:"mord",body:Me(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`\\htmlData{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var r;let n=e.createBox(t);return n.htmlData=(r=e.args[0])!=null?r:"",n}});Ge(["style","htmlStyle"],"{data:string}{content:auto*}",{createAtom:e=>new be(zt(Xt({},e),{type:"mord",body:Me(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var r;let n=e.createBox(t);return n.htmlStyle=(r=e.args[0])!=null?r:"",n}});Ge("href","{url:string}{content:auto*}",{createAtom:e=>new be(zt(Xt({},e),{type:"mord",body:Me(e.args[1])})),render:(e,t)=>{var r;let n=e.createBox(t),a=(r=e.args[0])!=null?r:"";return a&&(n.htmlData=`href=${a}`),n}});Ge("em","{:rest}",{createAtom:e=>new be(zt(Xt({},e),{body:Me(e.args[0])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{\\em ${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})});Ge("emph","{:auto}",{createAtom:e=>new be(zt(Xt({},e),{body:Me(e.args[1])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\emph{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})});DSt={"\\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}};Ge(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:e=>{var t;return new Nwt(zt(Xt({},e),{delim:(t=e.args[0])!=null?t:".",size:DSt[e.command].size,delimType:DSt[e.command].mclass}))},serialize:(e,t)=>ki([e.command,/^[a-zA-Z]/.test(e.value)?`{${e.value}}`:e.value])});Ge(["hspace","hspace*"],"{width:value}",{createAtom:e=>{var t;return new L1(zt(Xt({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}});Ge(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:e=>{var t;return new L1(zt(Xt({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}});Ge("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:e=>new be(e),render:(e,t)=>{let r=0,n=t.mathstyle.id;(n===CV||n===Dm)&&(r=1),(n===g0||n===ys)&&(r=2),(n===Km||n===qa)&&(r=3);let a=Me(e.args[r]);return be.createBox(t,a)},serialize:(e,t)=>`\\mathchoice{${be.serialize(e.args[0],t)}}{${be.serialize(e.args[1],t)}}{${be.serialize(e.args[2],t)}}{${be.serialize(e.args[3],t)}}`});Ge("mathop","{:auto}",{createAtom:e=>new be(zt(Xt({},e),{type:"mop",body:Me(e.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(e,t)=>{var r;let n=be.createBox(t,e.body);if(e.superscript||e.subscript){let a=(r=e.subsupPlacement)!=null?r:"auto";n=a==="over-under"||a==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:n}):e.attachSupsub(t,{base:n})}return e.caret&&(n.caret=e.caret),new Ue(e.bind(t,n),{type:"op",isSelected:e.isSelected,classes:"ML__op-group"})},serialize:(e,t)=>{let r=[Zr(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&r.push("\\limits"),e.subsupPlacement==="adjacent"&&r.push("\\nolimits"),e.subsupPlacement==="auto"&&r.push("\\displaylimits")),r.push(e.supsubToLatex(t)),ki(r)}});Ge(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:e=>new be(zt(Xt({},e),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e.command],body:Me(e.args[0])}))});Ge(["operatorname","operatorname*"],"{operator:math}",{createAtom:e=>{let t=Me(e.args[0]).map(r=>{var n;return r.type!=="first"&&(r.type="mord",r.value=(n={"\u2217":"*","\u2212":"-"}[r.value])!=null?n:r.value,r.isFunction=!1,!r.style.variant&&!r.style.variantStyle&&(r.style.variant="main",r.style.variantStyle="up")),r});return new be(zt(Xt({},e),{type:"mop",body:t,isFunction:!0,limits:e.command==="\\operatorname"?"adjacent":"over-under"}))},render:(e,t)=>{var r;let n=be.createBox(t,e.body);if(e.superscript||e.subscript){let a=(r=e.subsupPlacement)!=null?r:"auto";n=a==="over-under"||a==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:n}):e.attachSupsub(t,{base:n})}return e.caret&&(n.caret=e.caret),new Ue(e.bind(t,n),{type:"op",isSelected:e.isSelected,classes:"ML__op-group"})},serialize:(e,t)=>{let r=[Zr(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&r.push("\\limits"),e.subsupPlacement==="adjacent"&&r.push("\\nolimits"),e.subsupPlacement==="auto"&&r.push("\\displaylimits")),r.push(e.supsubToLatex(t)),ki(r)}});Ge(["char","unicode"],"{charcode:value}",{createAtom:e=>new be(zt(Xt({},e),{type:e.mode==="text"?"text":"mord"})),serialize:e=>{var t;return`${e.command}${fa((t=e.args[0])!=null?t:{number:10067,base:"hexadecimal"})}`},render:(e,t)=>{let r=t.evaluate(e.args[0]);return(!r||!("number"in r))&&(r={number:10067,base:"hexadecimal"}),e.value=String.fromCodePoint(r.number),e.createBox(t)}});Ge("rule","[raise:value]{width:value}{thickness:value}",{createAtom:e=>new be(e),render:(e,t)=>{var r,n,a;let o=new $i({parent:t,mathstyle:"textstyle"},e.style),s=o.toEm((r=e.args[0])!=null?r:{dimension:0}),l=o.toEm((n=e.args[1])!=null?n:{dimension:10}),c=o.toEm((a=e.args[2])!=null?a:{dimension:10}),u=new Ue(null,{classes:"ML__rule",type:"ord"});return u.width=l,u.height=c+s,u.depth=-s,u.setStyle("border-right-width",l,"em"),u.setStyle("border-top-width",c,"em"),u.setStyle("border-color",e.style.color),u.setStyle("vertical-align",s,"em"),e.isSelected&&u.setStyle("opacity","50%"),e.bind(o,u),e.caret&&(u.caret=e.caret),u.wrap(t)},serialize:e=>`\\rule${e.args[0]?`[${fa(e.args[0])}]`:""}{${fa(e.args[1])}}{${fa(e.args[2])}}`});Ge(["overline","underline"],"{:auto}",{createAtom:e=>new be(zt(Xt({},e),{body:Me(e.args[0])})),render:(e,t)=>{let r=e.command.substring(1),n=new $i({parent:t,mathstyle:"cramp"},e.style),a=be.createBox(n,e.body);if(!a)return null;let o=n.metrics.defaultRuleThickness/n.scalingFactor,s=new Ue(null,{classes:r+"-line"});s.height=o,s.maxFontSize=o*1.125*n.scalingFactor;let l;return r==="overline"?l=new Bn({shift:0,children:[{box:a},3*o,{box:s},o]}):l=new Bn({top:a.height,children:[o,{box:s},3*o,{box:a}]}),e.caret&&(l.caret=e.caret),new Ue(l,{classes:r,type:"ignore"})}});Ge("overset","{:auto}{base:auto}",{createAtom:e=>{let t=Me(e.args[1]);return new ll(zt(Xt({},e),{above:Me(e.args[0]),body:t,skipBoundary:!1,boxType:k1(t)}))},serialize:(e,t)=>Zr(e.command,e.aboveToLatex(t),e.bodyToLatex(t))});Ge("underset","{:auto}{base:auto}",{createAtom:e=>{let t=Me(e.args[1]);return new ll(zt(Xt({},e),{below:Me(e.args[0]),body:t,skipBoundary:!1,boxType:k1(t)}))},serialize:(e,t)=>Zr(e.command,e.belowToLatex(t),e.bodyToLatex(t))});Ge("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:e=>{let t=Me(e.args[2]);return new ll(zt(Xt({},e),{above:Me(e.args[0]),below:Me(e.args[1]),body:t,skipBoundary:!1,boxType:k1(t)}))},serialize:(e,t)=>Zr(e.command,e.belowToLatex(t),e.bodyToLatex(t))});Ge(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:e=>new ll(zt(Xt({},e),{body:Me(e.args[2]),above:Me(e.args[1]),below:Me(e.args[0]),skipBoundary:!1,boxType:e.command==="\\stackrel"?"rel":"bin"})),serialize:(e,t)=>Zr(e.command,e.aboveToLatex(t),e.bodyToLatex(t))});Ge("smash","[:string]{:auto}",{createAtom:e=>{var t,r,n,a;return new C0(zt(Xt({},e),{body:Me(e.args[1]),smashHeight:(r=(t=e.args[0])==null?void 0:t.includes("t"))!=null?r:!0,smashDepth:(a=(n=e.args[0])==null?void 0:n.includes("b"))!=null?a:!0}))}});Ge("vphantom","{:auto}",{createAtom:e=>new C0(zt(Xt({},e),{body:Me(e.args[0]),isInvisible:!0,smashWidth:!0}))});Ge("hphantom","{:auto}",{createAtom:e=>new C0(zt(Xt({},e),{body:Me(e.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))});Ge("phantom","{:auto}",{createAtom:e=>new C0(zt(Xt({},e),{body:Me(e.args[0]),isInvisible:!0}))});Ge("mathstrut","",{createAtom:e=>new C0(zt(Xt({},e),{body:[new be({value:"("})],isInvisible:!0}))});Ge("not","{:math}",{createAtom:e=>{let t=Me(e.args[0]);return t.length===0?new be(zt(Xt({},e),{type:"mrel",value:"\uE020"})):new be(zt(Xt({},e),{body:[new cp(zt(Xt({},e),{body:"\uE020",align:"right"})),...t],captureSelection:!0}))},serialize:(e,t)=>{let r=e.args[0],n=r&&typeof r=="object"&&"group"in r;return e.value!=="\uE020"?n?`\\not{${be.serialize(r.group,t)}}`:`\\not${be.serialize(r,t)}`:n?"\\not{}":"\\not"},render:(e,t)=>{if(e.value)return e.createBox(t);let r=e.args[0]&&typeof e.args[0]=="object"&&"group"in e.args[0]?"ord":k1(Me(e.args[0])),n=be.createBox(t,e.body,{type:r});return e.caret&&(n.caret=e.caret),e.bind(t,n)}});Ge(["ne","neq"],"",{createAtom:e=>new be(zt(Xt({},e),{type:"mrel",body:[new cp(zt(Xt({},e),{body:"\uE020",align:"right",boxType:"rel"})),new be(zt(Xt({},e),{value:"="}))],captureSelection:!0})),serialize:e=>e.command});Ge("rlap","{:auto}",{createAtom:e=>new cp(zt(Xt({},e),{body:Me(e.args[0]),align:"right"}))});Ge("llap","{:auto}",{createAtom:e=>new cp(zt(Xt({},e),{body:Me(e.args[0]),align:"left"}))});Ge("mathrlap","{:math}",{createAtom:e=>new cp(zt(Xt({},e),{body:Me(e.args[0]),align:"right"}))});Ge("mathllap","{:math}",{createAtom:e=>new cp(zt(Xt({},e),{body:Me(e.args[0]),align:"left"}))});Ge("raisebox","{:value}{:text}",{createAtom:e=>{var t;return new zg(zt(Xt({},e),{body:Me(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r;return Zr("\\raisebox",(r=fa(e.offset))!=null?r:"0pt",e.bodyToLatex(t))}});Ge("raise","{:value}{:auto}",{createAtom:e=>{var t;return new zg(zt(Xt({},e),{body:Me(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r;return Zr("\\raise",(r=fa(e.offset))!=null?r:"0pt",e.bodyToLatex(t))}});Ge("lower","{:value}{:auto}",{createAtom:e=>{var t;return new zg(zt(Xt({},e),{body:Me(e.args[1]),padding:{dimension:0},offset:(t=Hc(e.args[0],-1))!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r,n;return Zr("\\lower",(n=fa(Hc((r=e.offset)!=null?r:{dimension:0},-1)))!=null?n:"0pt",e.bodyToLatex(t))}});ta("0123456789/@.?!");HLt(65,90);HLt(97,122);ta([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]);ta([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]);ta([["\\backslash",92],["\\nabla",8711],["\\partial",8706],["\\ell",8467],["\\hbar",8463],["\\pounds",163],["\\euro",8364]]);ta([["\\rightarrow",8594],["\\to",8594],["\\leftarrow",8592],["\\gets",8592],["\\Rightarrow",8658],["\\Leftarrow",8656],["\\longrightarrow",10230],["\\longleftarrow",10229],["\\Longrightarrow",10233],["\\implies",10233],["\\Longleftarrow",10232],["\\impliedby",10232],["\\longleftrightarrow",10231],["\\biconditional",10231],["\\Longleftrightarrow",10234],["\\mapsto",8614],["\\longmapsto",10236],["\\uparrow",8593],["\\downarrow",8595],["\\Uparrow",8657],["\\Downarrow",8659],["\\updownarrow",8597],["\\Updownarrow",8661],["\\hookrightarrow",8618],["\\hookleftarrow",8617],["\\rightharpoonup",8640],["\\leftharpoonup",8636],["\\rightharpoondown",8641],["\\leftharpoondown",8637],["\\searrow",8600],["\\nearrow",8599],["\\swarrow",8601],["\\nwarrow",8598],["\\originalof",8886],["\\laplace",8886],["\\imageof",8887],["\\Laplace",8887]],"mrel");ta([["\\mapsfrom",8612,"mrel"],["\\Mapsfrom",10502,"mrel"],["\\MapsTo",10503,"mrel"],["\\Yup",8516,"mord"],["\\lightning",8623,"mrel"],["\\leftarrowtriangle",8701,"mrel"],["\\rightarrowtriangle",8702,"mrel"],["\\leftrightarrowtriangle",8703,"mrel"],["\\boxdot",8865,"mbin"],["\\bigtriangleup",9651,"mbin"],["\\bigtriangledown",9661,"mbin"],["\\boxbar",9707,"mbin"],["\\Lbag",10181,"mopen"],["\\Rbag",10182,"mclose"],["\\llbracket",10214,"mopen"],["\\rrbracket",10215,"mclose"],["\\longmapsfrom",10235,"mrel"],["\\Longmapsfrom",10237,"mrel"],["\\Longmapsto",10238,"mrel"],["\\boxslash",10692,"mbin"],["\\boxbslash",10693,"mbin"],["\\boxast",10694,"mbin"],["\\boxcircle",10695,"mbin"],["\\boxbox",10696,"mbin"],["\\fatsemi",10783,"mop"],["\\leftslice",10918,"mrel"],["\\rightslice",10919,"mrel"],["\\interleave",10996,"mbin"],["\\biginterleave",11004,"mop"],["\\sslash",11005,"mbin"],["\\talloblong",11006,"mbin"]]);ta([["\\lbrace",123,"mopen"],["\\rbrace",125,"mclose"],["\\lparen",40,"mopen"],["\\rparen",41,"mclose"],["\\langle",10216,"mopen"],["\\rangle",10217,"mclose"],["\\lfloor",8970,"mopen"],["\\rfloor",8971,"mclose"],["\\lceil",8968,"mopen"],["\\rceil",8969,"mclose"],["\\vert",8739],["\\lvert",8739,"mopen"],["\\rvert",8739,"mclose"],["\\|",8741],["\\Vert",8741],["\\mVert",8741],["\\lVert",8741,"mopen"],["\\rVert",8741,"mclose"],["\\lbrack",91,"mopen"],["\\rbrack",93,"mclose"],["\\{",123,"mopen"],["\\}",125,"mclose"],["(",40,"mopen"],[")",41,"mclose"],["[",91,"mopen"],["]",93,"mclose"],["\\ulcorner",9484,"mopen","ams"],["\\urcorner",9488,"mclose","ams"],["\\llcorner",9492,"mopen","ams"],["\\lrcorner",9496,"mclose","ams"],["\\lgroup",10222,"mopen"],["\\rgroup",10223,"mclose"],["\\lmoustache",9136,"mopen"],["\\rmoustache",9137,"mclose"]]);ta([["\\dashrightarrow",8674],["\\dashleftarrow",8672],["\\Rrightarrow",8667],["\\Lleftarrow",8666],["\\leftrightarrows",8646],["\\rightleftarrows",8644],["\\curvearrowright",8631],["\\curvearrowleft",8630],["\\rightrightarrows",8649],["\\leftleftarrows",8647],["\\upuparrows",8648],["\\downdownarrows",8650],["\\vartriangle",9651],["\\triangleq",8796],["\\vartriangleleft",8882],["\\trianglelefteq",8884],["\\ntriangleleft",8938],["\\ntrianglelefteq",8940],["\\vartriangleright",8883],["\\trianglerighteq",8885],["\\ntriangleright",8939],["\\ntrianglerighteq",8941],["\\blacktriangleleft",9664],["\\blacktriangleright",9654],["\\leftarrowtail",8610],["\\rightarrowtail",8611],["\\looparrowright",8620],["\\looparrowleft",8619],["\\twoheadleftarrow",8606],["\\twoheadrightarrow",8608],["\\twoheadrightarrowtail",10518],["\\rightleftharpoons",8652],["\\leftrightharpoons",8651],["\\Rsh",8625],["\\Lsh",8624],["\\circlearrowright",8635],["\\circlearrowleft",8634],["\\restriction",8638],["\\upharpoonright",8638],["\\upharpoonleft",8639],["\\downharpoonright",8642],["\\downharpoonleft",8643],["\\rightsquigarrow",8669],["\\leadsto",8669],["\\leftrightsquigarrow",8621],["\\multimap",8888],["\\nleftarrow",8602],["\\nrightarrow",8603],["\\nRightarrow",8655],["\\nLeftarrow",8653],["\\nleftrightarrow",8622],["\\nLeftrightarrow",8654],["\\nvrightarrow",8696],["\\nvtwoheadrightarrow",10496],["\\nvrightarrowtail",10516],["\\nvtwoheadrightarrowtail",10519],["\\shortparallel",8741],["\\nless",8814],["\\nleqslant",57360],["\\lneq",10887],["\\lneqq",8808],["\\nleqq",57361],["\\lvertneqq",57356],["\\lnsim",8934],["\\lnapprox",10889],["\\nprec",8832],["\\npreceq",8928],["\\precnsim",8936],["\\precnapprox",10937],["\\nsim",8769],["\\nshortmid",57350],["\\nmid",8740],["\\nvdash",8876],["\\nvDash",8877],["\\ngtr",8815],["\\ngeqslant",57359],["\\ngeqq",57358],["\\gneq",10888],["\\gneqq",8809],["\\gvertneqq",57357],["\\gnsim",8935],["\\gnapprox",10890],["\\nsucc",8833],["\\nsucceq",8929],["\\succnsim",8937],["\\succnapprox",10938],["\\ncong",8774],["\\nshortparallel",57351],["\\nparallel",8742],["\\nVDash",8879],["\\nsupseteqq",57368],["\\supsetneq",8843],["\\varsupsetneq",57371],["\\supsetneqq",10956],["\\varsupsetneqq",57369],["\\nVdash",8878],["\\precneqq",10933],["\\succneqq",10934],["\\nsubseteqq",57366],["\\leqslant",10877],["\\geqslant",10878],["\\gtrsim",8819],["\\approxeq",8778],["\\thickapprox",8776],["\\lessapprox",10885],["\\gtrapprox",10886],["\\precapprox",10935],["\\succapprox",10936],["\\thicksim",8764],["\\succsim",8831],["\\precsim",8830],["\\backsim",8765],["\\eqsim",8770],["\\backsimeq",8909],["\\lesssim",8818],["\\nleq",8816],["\\ngeq",8817],["\\smallsmile",8995],["\\smallfrown",8994],["\\leqq",8806],["\\eqslantless",10901],["\\lll",8920],["\\lessgtr",8822],["\\lesseqgtr",8922],["\\lesseqqgtr",10891],["\\risingdotseq",8787],["\\fallingdotseq",8786],["\\subseteqq",10949],["\\Subset",8912],["\\sqsubset",8847],["\\preccurlyeq",8828],["\\curlyeqprec",8926],["\\vDash",8872],["\\Vvdash",8874],["\\bumpeq",8783],["\\Bumpeq",8782],["\\geqq",8807],["\\eqslantgtr",10902],["\\ggg",8921],["\\gtrless",8823],["\\gtreqless",8923],["\\gtreqqless",10892],["\\supseteqq",10950],["\\Supset",8913],["\\sqsupset",8848],["\\succcurlyeq",8829],["\\curlyeqsucc",8927],["\\Vdash",8873],["\\shortmid",8739],["\\between",8812],["\\pitchfork",8916],["\\varpropto",8733],["\\backepsilon",8717],["\\llless",8920],["\\gggtr",8921],["\\doteqdot",8785],["\\Doteq",8785],["\\eqcirc",8790],["\\circeq",8791],["\\therefore",8756],["\\because",8757]],"mrel","ams");ta([["+",43],["-",8722],["\u2212",8722],["\\pm",177],["\\mp",8723],["*",8727],["\\times",215],["\\div",247],["\\divides",8739],["\\cdot",8901],["\\cap",8745],["\\cup",8746],["\\setminus",8726],["\\land",8743],["\\wedge",8743],["\\lor",8744],["\\vee",8744],["\\circ",8728],["\\bigcirc",9711],["\\bullet",8729],["\\oplus",8853],["\\ominus",8854],["\\otimes",8855],["\\odot",8857],["\\oslash",8856],["\\bigtriangleup",9651],["\\bigtriangledown",9661],["\\triangleleft",9667],["\\triangleright",9657],["\\And",38],["\\dagger",8224],["\\dag",8224],["\\ddag",8225],["\\ddagger",8225],["\\ast",8727],["\\star",8902],["\\bigstar",9733],["\\diamond",8900]],"mbin");ta([["\\lhd",8882],["\\rhd",8883],["\\lessdot",8918],["\\gtrdot",8919],["\\ltimes",8905],["\\rtimes",8906],["\\leftthreetimes",8907],["\\rightthreetimes",8908],["\\intercal",8890],["\\dotplus",8724],["\\doublebarwedge",10846],["\\divideontimes",8903],["\\centerdot",8901],["\\smallsetminus",8726],["\\barwedge",8892],["\\veebar",8891],["\\nor",8891],["\\curlywedge",8911],["\\curlyvee",8910],["\\boxminus",8863],["\\boxplus",8862],["\\boxtimes",8864],["\\boxdot",8865],["\\circleddash",8861],["\\circledast",8859],["\\circledcirc",8858],["\\unlhd",8884],["\\unrhd",8885]],"mbin","ams");ta([["\\surd",8730],["\\S",167],["\\infty",8734],["\\prime",8242],["\\doubleprime",8243],["\\angle",8736],["`",8216],["\\$",36],["\\%",37],["\\_",95],["\\alpha",945],["\\beta",946],["\\gamma",947],["\\delta",948],["\\epsilon",1013],["\\varepsilon",949],["\\zeta",950],["\\eta",951],["\\theta",952],["\\vartheta",977],["\\iota",953],["\\kappa",954],["\\varkappa",1008,"mord","ams"],["\\lambda",955],["\\mu",956],["\\nu",957],["\\xi",958],["\\omicron",111],["\\pi",960],["\\varpi",982],["\\rho",961],["\\varrho",1009],["\\sigma",963],["\\varsigma",962],["\\tau",964],["\\phi",981],["\\varphi",966],["\\upsilon",965],["\\chi",967],["\\psi",968],["\\omega",969],["\\Gamma",915],["\\Delta",916],["\\Theta",920],["\\Lambda",923],["\\Xi",926],["\\Pi",928],["\\Sigma",931],["\\Upsilon",933],["\\Phi",934],["\\Psi",936],["\\Omega",937],["\\digamma",989,"mord","ams"],["\\varkappa",1008,"mord","ams"],["\\coppa",985,"mord","ams"],["\\koppa",985,"mord","ams"],["\\Coppa",984,"mord","ams"],["\\Koppa",984,"mord","ams"],["\\sampi",993,"mord","ams"],["\\Sampi",992,"mord","ams"],["\\emptyset",8709]]);ta([["=",61],["<",60],["\\lt",60],[">",62],["\\gt",62],["\\le",8804],["\\leq",8804],["\\ge",8805],["\\geq",8805],["\\ll",8810],["\\gg",8811],["\\coloneq",8788],["\\coloneqq",8788],["\\colonequals",8788],["\\measeq",8797],["\\eqdef",8798],["\\questeq",8799],[":",58],["\\cong",8773],["\\equiv",8801],["\\prec",8826],["\\preceq",10927],["\\succ",8827],["\\succeq",10928],["\\perp",10178],["\\propto",8733],["\\Colon",8759],["\\smile",8995],["\\frown",8994],["\\sim",8764],["\\doteq",8784],["\\bowtie",8904],["\\Join",8904],["\\asymp",8781],["\\sqsubseteq",8849],["\\sqsupseteq",8850],["\\approx",8776],["\\~",126],["\\leftrightarrow",8596],["\\Leftrightarrow",8660],["\\models",8872],["\\vdash",8866],["\\dashv",8867],["\\roundimplies",10608],["\\in",8712],["\\notin",8713],["\\ni",8715],["\\owns",8715],["\\subset",8834],["\\supset",8835],["\\subseteq",8838],["\\supseteq",8839],["\\differencedelta",8710],["\\mvert",8739],["\\parallel",8741],["\\simeq",8771]],"mrel");ta([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams");ta([["\\wp",8472],["\\aleph",8501]]);ta([["\\blacktriangle",9650],["\\hslash",8463],["\\Finv",8498],["\\Game",8513],["\\eth",240],["\\mho",8487],["\\Bbbk",107],["\\yen",165],["\\square",9633],["\\Box",9633],["\\blacksquare",9632],["\\circledS",9416],["\\circledR",174],["\\triangledown",9661],["\\blacktriangledown",9660],["\\checkmark",10003],["\\diagup",9585],["\\measuredangle",8737],["\\sphericalangle",8738],["\\backprime",8245],["\\backdoubleprime",8246],["\\Diamond",9674],["\\lozenge",9674],["\\blacklozenge",10731],["\\varnothing",8709],["\\complement",8705],["\\maltese",10016],["\\beth",8502],["\\daleth",8504],["\\gimel",8503]],"mord","ams");ta([["\\ ",160],["~",160]],"space");Ge(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:e=>new L1(e)});Ge("space","",{createAtom:e=>new L1(e)});ta([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct");ta([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner");ta([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);RF={main:["Main-Regular","ML__cmr"],"main-italic":["Main-Italic","ML__cmr ML__it"],"main-bold":["Main-Bold","ML__cmr ML__bold"],"main-bolditalic":["Main-BoldItalic","ML__cmr ML__bold ML__it"],normal:["Main-Regular","ML__cmr"],"normal-bold":["Main-Bold","ML__mathbf"],"normal-italic":["Math-Italic","ML__mathit"],"normal-bolditalic":["Math-BoldItalic","ML__mathbfit"],roman:["Main-Regular","ML__cmr"],"roman-bold":["Main-Bold","ML__mathbf"],"roman-italic":["Math-Italic","ML__mathit"],"roman-bolditalic":["Math-BoldItalic","ML__mathbfit"],ams:["AMS-Regular","ML__ams"],"ams-bold":["AMS-Regular","ML__ams ML__bold"],"ams-italic":["AMS-Regular","ML__ams ML__it"],"ams-bolditalic":["AMS-Regular","ML__ams ML__bold ML__it"],"sans-serif":["SansSerif-Regular","ML__sans"],"sans-serif-bold":["SansSerif-Regular","ML__sans ML__bold"],"sans-serif-italic":["SansSerif-Regular","ML__sans ML__it"],"sans-serif-bolditalic":["SansSerif-Regular","ML__sans ML__bold ML__it"],calligraphic:["Caligraphic-Regular","ML__cal"],"calligraphic-bold":["Caligraphic-Regular","ML__cal ML__bold"],"calligraphic-italic":["Caligraphic-Regular","ML__cal ML__it"],"calligraphic-bolditalic":["Caligraphic-Regular","ML__cal ML__bold ML__it"],script:["Script-Regular","ML__script"],"script-bold":["Script-Regular","ML__script ML__bold"],"script-italic":["Script-Regular","ML__script ML__it"],"script-bolditalic":["Script-Regular","ML__script ML__bold ML__it"],fraktur:["Fraktur-Regular","ML__frak"],"fraktur-bold":["Fraktur-Regular","ML__frak ML__bold"],"fraktur-italic":["Fraktur-Regular","ML__frak ML__it"],"fraktur-bolditalic":["Fraktur-Regular","ML__frak ML__bold ML__it"],monospace:["Typewriter-Regular","ML__tt"],"monospace-bold":["Typewriter-Regular","ML__tt ML__bold"],"monospace-italic":["Typewriter-Regular","ML__tt ML__it"],"monospace-bolditalic":["Typewriter-Regular","ML__tt ML__bold ML__it"],"double-struck":["AMS-Regular","ML__bb"],"double-struck-bold":["AMS-Regular","ML__bb ML__bold"],"double-struck-italic":["AMS-Regular","ML__bb ML_italic"],"double-struck-bolditalic":["AMS-Regular","ML__bb ML_bolditalic"]},D9={"double-struck":/^[A-Z ]$/,script:/^[A-Z ]$/,calligraphic:/^[\dA-Z ]$/,fraktur:/^[\dA-Za-z ]$|^[!"#$%&'()*+,\-./:;=?[]^’‘]$/,monospace:/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/,"sans-serif":/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/},tUt=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,f6e=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,I6e=[/^[a-z]$/,/^[A-Z]$/,tUt,f6e],v6e={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},G6e=class extends xs{constructor(){super("math")}createAtom(e,t,r){var n,a,o,s,l,c;if(t===null)return new be({type:"mord",mode:"math",command:e,value:e,style:r});let u;try{u=(o=(a=globalThis.MathfieldElement)==null?void 0:a.isFunction((n=t.command)!=null?n:e))!=null?o:!1}catch{u=!1}if(t.definitionType==="symbol"){let d=new be({type:(s=t.type)!=null?s:"mord",mode:"math",command:(l=t.command)!=null?l:e,value:String.fromCodePoint(t.codepoint),isFunction:u,style:r});return e.startsWith("\\")&&(d.verbatimLatex=e),d}let g=new be({type:"mord",mode:"math",command:(c=t.command)!=null?c:e,value:e,isFunction:u,style:r});return e.startsWith("\\")&&(g.verbatimLatex=e),g}serialize(e,t){let r=y6e(e,zt(Xt({},t),{defaultMode:"math"}));return r.length===0||t.defaultMode!=="text"?r:["$ ",...r," $"]}getFont(e,t){var r,n,a;if(t.variant,t.fontFamily){let g=t.fontFamily;t.fontSeries==="b"&&t.fontShape==="it"?g+="-bolditalic":t.fontSeries==="b"?g+="-bold":t.fontShape==="it"&&(g+="-italic");let d=(r=RF[g])!=null?r:RF[t.fontFamily];if(!d)return console.error(`Unknown font family variant: ${g}`),null;let[h,m]=d;return m&&(e.classes+=" "+m),h}let{variant:o}=t,{variantStyle:s}=t;if(o==="normal"&&!s&&/[\u00A3\u0131\u0237]/.test(e.value)&&(o="main",s="italic"),o==="normal"&&!s&&e.value.length===1){let g=!1;I6e.forEach((d,h)=>{var m;d.test(e.value)&&v6e[(m=t.letterShapeStyle)!=null?m:"tex"][h]==="it"&&(g=!0)}),g&&(s=b6e(s))}s==="up"&&(s=void 0);let l=s?o+"-"+s:o;RF[l];let[c,u]=RF[l];if(D9[o]&&!D9[o].test(e.value)){let g=w9(e.value,o,s);return g||(g=(n=w9(e.value,o))!=null?n:e.value,e.classes+=(a={bold:" ML__bold",italic:" ML__it","bold-italic":" ML__bold ML__it"}[s??""])!=null?a:""),e.value=g,null}return tUt.test(e.value)&&(e.classes+=" lcGreek"),u&&(e.classes+=" "+u),c}};new G6e;MSt={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},B6e=class extends xs{constructor(){super("text")}createAtom(e,t,r){return t&&t.definitionType==="symbol"?new y0(e,String.fromCodePoint(t.codepoint),r??{}):null}serialize(e,t){return A6e(e,zt(Xt({},t),{defaultMode:"text"}),t.defaultMode!=="text")}getFont(e,t){var r,n,a,o,s;let{fontFamily:l}=t;if(MSt[l]?e.classes+=" "+MSt[l]:l&&e.setStyle("font-family",l),t.fontShape&&(e.classes+=" ",e.classes+=(r={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[t.fontShape])!=null?r:""),t.fontSeries){let c=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);c&&(e.classes+=" ",e.classes+=(a={ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[(n=c[1])!=null?n:""])!=null?a:"",e.classes+=" ",e.classes+=(s={uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[(o=c[2])!=null?o:""])!=null?s:"")}return"Main-Regular"}};new B6e;X6e=class extends xs{constructor(){super("latex")}createAtom(e){return new Kn(e)}serialize(e,t){return e.filter(r=>r instanceof Kn&&!r.isSuggestion).map(r=>r.value)}getFont(){return null}};new X6e;F6e=new Set(["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"]);Ml=class zd{static get scrim(){return zd._scrim||(zd._scrim=new zd),zd._scrim}static open(t){zd.scrim.open(t)}static close(){zd.scrim.close()}static get state(){return zd.scrim.state}static get element(){return zd.scrim.element}constructor(t){var r,n;this.lightDismiss=(r=t?.lightDismiss)!=null?r:!0,this.translucent=(n=t?.translucent)!=null?n:!1,this.state="closed"}get element(){if(this._element)return this._element;let t=document.createElement("div");return t.setAttribute("role","presentation"),t.style.position="fixed",t.style.contain="content",t.style.top="0",t.style.left="0",t.style.right="0",t.style.bottom="0",t.style.zIndex="var(--scrim-zindex, 10099)",t.style.outline="none",this.translucent?(t.style.background="rgba(255, 255, 255, .2)",t.style.backdropFilter="contrast(40%)"):t.style.background="transparent",this._element=t,t}open(t){var r;if(this.state!=="closed")return;this.state="opening",this.onDismiss=t?.onDismiss,this.savedActiveElement=dV();let{element:n}=this;((r=t?.root)!=null?r:document.body).appendChild(n),n.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);let a=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";let o=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${o+a}px`;let s=document.querySelector(".MLK__plate");if(s instanceof HTMLElement){this.savedMlkPaddingRight=s.style.paddingRight;let l=Number.parseFloat(getComputedStyle(s).paddingRight);s.style.paddingRight=`${l+a}px`}t!=null&&t.child&&n.append(t.child),this.state="open"}close(){var t,r,n,a,o;if(this.state!=="open"){this.element.parentElement;return}this.state="closing",typeof this.onDismiss=="function"&&this.onDismiss(),this.onDismiss=void 0;let{element:s}=this;s.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),s.remove(),document.body.style.overflow=(t=this.savedOverflow)!=null?t:"",document.body.style.marginRight=(r=this.savedMarginRight)!=null?r:"";let l=document.querySelector(".MLK__plate");l instanceof HTMLElement&&(l.style.paddingRight=(n=this.savedMlkPaddingRight)!=null?n:""),dV()!==this.savedActiveElement&&((o=(a=this.savedActiveElement)==null?void 0:a.focus)==null||o.call(a)),s.innerHTML="",this.state="closed"}handleEvent(t){this.lightDismiss&&(t.target===this._element&&t.type==="click"?(this.close(),t.preventDefault(),t.stopPropagation()):t.target===document&&(t.type==="touchmove"||t.type==="scroll")&&(this.close(),t.preventDefault(),t.stopPropagation()))}};Y6e=class extends yr{constructor(){super("latex")}createAtom(e){return new Kn(e)}onPaste(e,t){if(!t)return!1;let r=typeof t=="string"?t:t.getData("application/x-latex")||t.getData("text/plain");return r&&e.model.contentWillChange({inputType:"insertFromPaste",data:r})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,r)&&(e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),Hr(e)),e.startRecording(),!0):!1}insert(e,t,r){if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;r||(r={}),r.insertionMode||(r.insertionMode="replaceSelection"),r.selectionMode||(r.selectionMode="placeholder");let{silenceNotifications:n}=e;r.silenceNotifications&&(e.silenceNotifications=!0);let a=e.silenceNotifications;e.silenceNotifications=!0,r.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(Ia(e.selection)):r.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):r.insertionMode==="insertBefore"?e.collapseSelection("backward"):r.insertionMode==="insertAfter"&&e.collapseSelection("forward");let o=[];for(let c of t)DDe.test(c)&&o.push(new Kn(c));let s=e.at(e.position);if(s instanceof h1&&(s=s.lastChild),!(s.parent instanceof h1)){let c=new h1;s.parent.addChildAfter(c,s),s=c.firstChild}let l=s.parent.addChildrenAfter(o,s);return e.silenceNotifications=a,r.selectionMode==="before"||(r.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(l)):l&&(e.position=e.offsetOf(l))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=n,!0}};new Y6e;Ua({applyStyle:E6e},{target:"mathfield",canUndo:!0,changeContent:!0});Lg=null,f9=((tLt=($St=globalThis?.document)==null?void 0:$St.currentScript)==null?void 0:tLt.src)||J6e();Cs="not-loaded";oUt=3;Ua({performWithFeedback:(e,t)=>P6e(e,t)});Ua({complete:Dg},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0});Ua({dispatchEvent:(e,t,r)=>{var n,a;return(a=(n=e.host)==null?void 0:n.dispatchEvent(new CustomEvent(t,{detail:r})))!=null?a:!1}},{target:"mathfield"});Ua({nextSuggestion:K6e,previousSuggestion:q6e},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});gV="mathlive#virtual-keyboard-message";$6e=class sUt{constructor(){this.targetOrigin=window.origin,this.originValidator="none",this.targetWindow=window.top,this._boundingRect=new DOMRect(0,0,0,0),this._isShifted=!1,window.addEventListener("message",this),this.sendMessage("proxy-created"),this.listeners={}}static get singleton(){return this._singleton||(this._singleton=new sUt),this._singleton}getKeycap(t){}setKeycap(t,r){this.sendMessage("update-setting",{setKeycap:{keycap:t,value:r}})}set alphabeticLayout(t){this.sendMessage("update-setting",{alphabeticLayout:t})}set layouts(t){this.sendMessage("update-setting",{layouts:t})}get normalizedLayouts(){return[]}set editToolbar(t){this.sendMessage("update-setting",{editToolbar:t})}set container(t){throw new Error("Container inside an iframe cannot be changed")}show(t){this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:!0},bubbles:!0,cancelable:!0,composed:!0}))&&(this.sendMessage("show",t),this.dispatchEvent(new Event("virtual-keyboard-toggle")))}hide(t){this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:!1},bubbles:!0,cancelable:!0,composed:!0}))&&(this.sendMessage("hide",t),this.dispatchEvent(new Event("virtual-keyboard-toggle")))}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(t){t?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(t){return this.sendMessage("execute-command",{command:t}),!0}updateToolbar(t){this.sendMessage("update-toolbar",t)}update(t){this.sendMessage("update-setting",t)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(t,r,n){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(r)||this.listeners[t].add(r)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(r=>{typeof r=="function"?r(t):r?.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,r,n){this.listeners[t]&&this.listeners[t].delete(r)}handleEvent(t){if(V_(t)){if(!x_(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");this.handleMessage(t.data)}}handleMessage(t){let{action:r}=t;if(r==="execute-command"){let{command:n}=t;h0(n)==="virtual-keyboard"&&this.executeCommand(n);return}if(r==="synchronize-proxy"){this._boundingRect=t.boundingRect,this._isShifted=t.isShifted;return}if(r==="geometry-changed"){this._boundingRect=t.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(t,r={}){if(!this.targetWindow)throw new DOMException("A frame does not have access to the top window and can't communicate with the keyboard.","SecurityError");this.targetWindow.postMessage(Xt({type:gV,action:t},r),this.targetOrigin)}},iLt={numeric:{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",rows:[[{latex:"x",shift:"y",variants:["y","z","t","r","x^2","x^n","x^{#?}","x_n","x_i","x_{#?}",{latex:"f(#?)",class:"small"},{latex:"g(#?)",class:"small"}]},{latex:"n",shift:"a",variants:["i","j","p","k","a","u"]},"[separator-5]","[7]","[8]","[9]","[/]","[separator-5]",{latex:"\\exponentialE",shift:"\\ln",variants:["\\exp","\\times 10^{#?}","\\ln","\\log_{10}","\\log","\\lg","\\operatorname{lb}"]},{latex:"\\imaginaryI",variants:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"]},{latex:"\\pi",shift:"\\sin",variants:["\\prod",{latex:"\\theta",aside:"theta"},{latex:"\\rho",aside:"rho"},{latex:"\\tau",aside:"tau"},"\\sin","\\cos","\\tan"]}],[{label:"<",latex:"<",class:"hide-shift",shift:{latex:"\\le",label:"\u2264"}},{label:">",latex:">",class:"hide-shift",shift:{latex:"\\ge",label:"\u2265"}},"[separator-5]","[4]","[5]","[6]","[*]","[separator-5]",{class:"hide-shift",latex:"#@^2}",shift:"#@^{\\prime}}"},{latex:"#@^{#0}}",class:"hide-shift",shift:"#@_{#?}"},{class:"hide-shift",latex:"\\sqrt{#0}",shift:{latex:"\\sqrt[#0]{#?}}"}}],["[(]","[)]","[separator-5]","[1]","[2]","[3]","[-]","[separator-5]",{latex:"\\int^{\\infty}_{0}\\!#?\\,\\mathrm{d}x",class:"small hide-shift",shift:"\\int",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{class:"hide-shift",latex:"\\forall",shift:"\\exists"},{label:"[backspace]",width:1}],[{label:"[shift]",width:2},"[separator-5]","[0]","[.]","[=]","[+]","[separator-5]","[left]","[right]",{label:"[action]",width:1}]]},greek:{label:"αβγ",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"φ",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"ς",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"ϵ",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"epsilon",shift:'\\char"0190'},{label:"ρ",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"τ",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"υ",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"θ",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"ι",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"ο",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"π",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"α",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"σ",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"δ",class:"MLK__tex hide-shift",insert:"\\delta",aside:"delta",shift:"\\Delta"},{latex:"\\phi",class:"MLK__tex hide-shift",insert:"\\phi",aside:"phi",shift:"\\Phi"},{label:"γ",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"η",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"ξ",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"κ",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"λ",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"ζ",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"χ",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"ψ",class:"MLK__tex hide-shift",insert:"\\psi",aside:"psi",shift:"\\Psi"},{label:"ω",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"β",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"ν",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"μ",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"ε",class:"MLK__tex",insert:"\\varepsilon",aside:"epsilon var."},{label:"ϑ",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"ϰ",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"ϖ",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"ϱ",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"∞\u2260\u2208",labelClass:"MLK__tex",tooltip:"keyboard.tooltip.symbols",rows:[[{latex:"\\sin",shift:"\\sin^{-1}",variants:[{class:"small",latex:"\\sinh"},{class:"small",latex:"\\sin^{-1}"},{class:"small",latex:"\\operatorname{arsinh}"}]},"\\ln",{latex:"\\mathrm{abs}",insert:"\\mathrm{abs}\\left(#0\\right)"},{latex:"\\rightarrow",shift:"\\Rightarrow",variants:[{latex:"\\implies",aside:"implies"},{latex:"\\to",aside:"to"},"\\dashv",{latex:"\\roundimplies",aside:"round implies"}]},{latex:"\\exists",variants:["\\nexists"],shift:"\\nexists"},{latex:"\\in",shift:"\\notin",variants:["\\notin","\\owns"]},"\\cup",{latex:"\\overrightarrow{#@}",shift:"\\overleftarrow{#@}",variants:["\\overleftarrow{#@}","\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"]},{class:"small hide-shift",latex:"\\lim_{#?}",shift:"\\lim_{x\\to\\infty}",variants:[{class:"small",latex:"\\liminf_{#?}"},{class:"small",latex:"\\limsup_{#?}"}]},"\\exponentialE"],[{latex:"\\cos",shift:"\\cos^{-1}",variants:[{class:"small",latex:"\\cosh"},{class:"small",latex:"\\cos^{-1}"},{class:"small",latex:"\\operatorname{arcosh}"}]},{latex:"\\log",shift:"\\log_{10}",variants:["\\log_{#0}","\\log_{10}"]},"\\left\\vert#0\\right\\vert",{latex:"\\larr",shift:"\\lArr",variants:[{latex:"\\impliedby",aside:"implied by"},{latex:"\\gets",aside:"gets"},"\\lArr","\\vdash",{latex:"\\models",aside:"models"}]},{latex:"\\forall",shift:"\\lnot",variants:[{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"}]},{latex:"\\ni",shift:"\\not\\owns"},"\\cap",{latex:"\\overline{#@}",shift:"\\underline{#@}",variants:["\\overbrace{#@}","\\overlinesegment{#@}","\\overleftrightarrow{#@}","\\overrightarrow{#@}","\\overleftarrow{#@}","\\overgroup{#@}","\\underbrace{#@}","\\underlinesegment{#@}","\\underleftrightarrow{#@}","\\underrightarrow{#@}","\\underleftarrow{#@}","\\undergroup{#@}"]},{class:"hide-shift small",latex:"\\int",shift:"\\iint",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\smallint",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\intop","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"]},{latex:"\\pi",shift:"\\tau",variants:["\\tau"]}],[{latex:"\\tan",shift:"\\tan^{-1}",variants:[{class:"small",latex:"\\tanh"},{class:"small",latex:"\\tan^{-1}"},{class:"small",latex:"\\operatorname{artanh}"},{class:"small",latex:"\\arctan"},{class:"small",latex:"\\operatorname{arctg}"},{class:"small",latex:"\\operatorname{tg}"}]},{latex:"\\exp",insert:"\\exp\\left(#0\\right)",variants:["\\exponentialE^{#0}"]},"\\left\\Vert#0\\right\\Vert",{latex:"\\lrArr",shift:"\\leftrightarrow",variants:[{latex:"\\iff",aside:"if and only if"},"\\leftrightarrow","\\leftrightarrows","\\Leftrightarrow",{latex:"^\\biconditional",aside:"biconditional"}]},{latex:"\\vert",shift:"!"},{latex:"#@^{\\complement}",aside:"complement",variants:[{latex:"\\setminus",aside:"set minus"},{latex:"\\smallsetminus",aside:"small set minus"}]},{latex:"\\subset",shift:"\\subseteq",variants:["\\subset","\\subseteq","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsubseteq","\\supset","\\supseteq","\\supsetneq","\\supsetneqq","\\nsupset","\\nsupseteq"]},{latex:"#@^{\\prime}",shift:"#@^{\\doubleprime}",variants:["#@^{\\doubleprime}","#@\\degree"]},{latex:"\\mathrm{d}",shift:"\\partial",variants:["\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{latex:"\\infty",variants:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"]}],[{label:"[shift]",width:2},{class:"box",latex:",",shift:";",variants:[";","?"]},{class:"box",latex:"\\colon",shift:"\\Colon",variants:[{latex:"\\Colon",aside:"such that",class:"box"},{latex:":",aside:"ratio",class:"box"},{latex:"\\vdots",aside:"",class:"box"},{latex:"\\ddots",aside:"",class:"box"},{latex:"\\ldotp",aside:"low dot",class:"box"},{latex:"\\cdotp",aside:"center dot",class:"box"},{latex:"\\ldots",aside:"low ellipsis",class:"box"},{latex:"\\cdots",aside:"center ellipsis",class:"box"},{latex:"\\therefore",aside:"therefore",class:"box"},{latex:"\\because",aside:"because",class:"box"}]},{class:"box",latex:"\\cdot",aside:"centered dot",shift:"\\ast",variants:["\\circ","\\bigcirc","\\bullet","\\odot","\\oslash","\\circledcirc","\\ast","\\star","\\times","\\doteq","\\doteqdot"]},"[separator]","[left]","[right]",{label:"[backspace]",width:1,class:"action hide-shift"},{label:"[action]",width:1}]]},compact:{label:"compact",rows:[["[+]","[-]","[*]","[/]","[=]","[.]","[(]","[)]","\\sqrt{#0}","#@^{#?}"],["[1]","[2]","[3]","[4]","[5]","[6]","[7]","[8]","[9]","[0]"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]},minimalist:{label:"minimalist",layers:[{style:` div.minimalist-backdrop { display: flex; justify-content: center; } div.minimalist-container { --keycap-height: 40px; --keycap-max-width: 53px; --keycap-small-font-size: 12px; background: var(--keyboard-background); padding: 20px 20px 0px 20px; border-top-left-radius: 8px; border-top-right-radius: 8px; border: 1px solid var(--keyboard-border); box-shadow: 0 0 32px rgb(0 0 0 / 30%); } `,backdrop:"minimalist-backdrop",container:"minimalist-container",rows:[["+","-","\\times",{latex:"\\frac{#@}{#0}",class:"small"},"=","[.]","(",")",{latex:"\\sqrt{#0}",class:"small"},{latex:"#@^{#?}",class:"small"}],["1","2","3","4","5","6","7","8","9","0"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]}]},"numeric-only":{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",id:"numeric-only",rows:[["7","8","9","[separator]",{label:"[backspace]",width:2}],["4","5","6","[separator]","[separator]","[separator]"],["1","2","3","[separator]","[separator]","[separator]"],["0",{label:"[.]",variants:[]},"-","[separator]","[left]","[right]"]]}},DF={0:["\\varnothing","\\infty"],1:["\\frac{1}{#@}","#@^{-1}","\\times 10^{#?}","\\phi","\\imaginaryI"],2:["\\frac{1}{2}","#@^2","\\sqrt2","\\exponentialE"],3:["\\frac{1}{3}","#@^3","\\sqrt3","\\pi"],4:["\\frac{1}{4}","#@^4"],5:["\\frac{1}{5}","#@^5","\\sqrt5"],6:["\\frac{1}{6}","#@^6"],7:["\\frac{1}{7}","#@^7"],8:["\\frac{1}{8}","#@^8"],9:["\\frac{1}{9}","#@^9"],".":[".",",",";","\\colon"],",":["{,}",".",";","\\colon"],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"},"\xE5","\xE0","\xE1","\xE2","\xE4","\xE6"],A:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"},"\xC5","\xC0","\xC1","\xC2","\xC4","\xC6"],b:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"},"\xE7"],d:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn\u2019t"},"\xE8","\xE9","\xEA","\xEB"],E:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn\u2019t"},"\xC8","\xC9","\xCA","\xCB"],g:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"},"\xEC","\xED","\xEE","\xEF"],I:[{latex:"\\imaginaryI",aside:"imaginary i"},"\xCC","\xCD","\xCE","\xCF"],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\mathbb{N}",aside:"set of natural numbers"},"\xF1"],o:["\xF8","\u0153","\xF2","\xF3","\xF4","\xF6"],O:["\xF8","\u0152","\xD2","\xD3","\xD4","\xD6"],p:[{latex:"\\mathbb{P}",aside:"set of primes"}],q:[{latex:"\\mathbb{Q}",aside:"set of rational numbers"}],r:[{latex:"\\mathbb{R}",aside:"set of real numbers"}],u:["\xF9","\xFA","\xFB","\xFC"],U:["\xD9","\xDA","\xDB","\xDC"],z:[{latex:"\\mathbb{Z}",aside:"set of integers"}],y:["\xFD","\xFF"],Y:["\u0178"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space
    \u207B\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\,\\char"2039',insert:"\\,",aside:"thin space
    \xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\:\\char"2039',insert:"\\:",aside:"medium space
    \u2074\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\;\\char"2039',insert:"\\;",aside:"thick space
    \u2075\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\ \\char"2039',insert:"\\ ",aside:"\u2153 em"},{latex:'\\char"203A\\enspace\\char"2039',insert:"\\enspace",aside:"\xBD em"},{latex:'\\char"203A\\quad\\char"2039',insert:"\\quad",aside:"1 em"},{latex:'\\char"203A\\qquad\\char"2039',insert:"\\qquad",aside:"2 em"}]};p8e=` `;Dd={"[left]":{class:"action hide-shift",label:"",command:"performWithFeedback(moveToPreviousChar)",shift:{label:"",command:"performWithFeedback(extendSelectionBackward)"}},"[right]":{class:"action hide-shift",label:"",command:"performWithFeedback(moveToNextChar)",shift:{label:"",command:"performWithFeedback(extendSelectionForward)"}},"[up]":{class:"action hide-shift",label:"\u2191",command:"performWithFeedback(moveUp)",shift:{label:"\u219F",command:"performWithFeedback(extendSelectionUpward)"}},"[down]":{class:"action hide-shift",label:"\u2193",command:"performWithFeedback(moveDown)",shift:{label:"\u21A1",command:"performWithFeedback(extendSelectionDownward)"}},"[return]":{class:"action hide-shift",command:"performWithFeedback(commit)",shift:{command:"performWithFeedback(addRowAfter)"},width:1.5,label:""},"[action]":{class:"action hide-shift",command:"performWithFeedback(commit)",shift:{label:"",command:"performWithFeedback(addRowAfter)"},width:1.5,label:""},"[hr]":{class:"separator horizontal-rule"},"[hide-keyboard]":{class:"action",command:["hideVirtualKeyboard"],width:1.5,label:""},"[.]":{variants:".",command:"performWithFeedback(insertDecimalSeparator)",shift:",",class:"big-op hide-shift",label:"."},"[,]":{variants:",",command:"performWithFeedback(insertDecimalSeparator)",shift:".",class:"big-op hide-shift",label:","},"[+]":{variants:[{latex:"\\sum_{#0}^{#0}",class:"small"},"\\oplus"],latex:"+",label:"+",class:"big-op hide-shift",shift:{latex:"\\sum",insert:"\\sum",class:"small"}},"[-]":{variants:["\\pm","\\ominus"],latex:"-",label:"−",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"÷"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"×",shift:{latex:"\\times"},class:"big-op hide-shift"},"[=]":{variants:["\\neq","\\equiv","\\varpropto","\\thickapprox","\\lt","\\gt","\\le","\\ge"],latex:"=",label:"=",shift:{label:"\u2260",latex:"\\ne"},class:"big-op hide-shift"},"[backspace]":{class:"action bottom right hide-shift",width:1.5,command:"performWithFeedback(deleteBackward)",label:"",shift:{class:"action warning",label:"",command:"deleteAll"}},"[undo]":{class:"ghost if-can-undo",command:"undo",label:"",tooltip:"tooltip.undo"},"[redo]":{class:"ghost if-can-redo",command:"redo",label:"",tooltip:"tooltip.redo"},"[(]":{variants:[{latex:"\\lbrack",key:"["},"\\langle","\\lfloor","\\lceil",{latex:"\\lbrace",key:"{"}],key:"(",label:"(",shift:{label:"[",key:"["},class:"hide-shift"},"[)]":{variants:[{latex:"\\rbrack",key:"]"},"\\rangle","\\rfloor","\\rceil",{latex:"\\rbrace",key:"}"}],key:")",label:")",shift:{label:"]",latex:"\\rbrack"},class:"hide-shift"},"[0]":{variants:"0",latex:"0",label:"0",shift:"\\infty",class:"hide-shift"},"[1]":{variants:"1",latex:"1",label:"1",shift:"#@^{-1}",class:"hide-shift"},"[2]":{variants:"2",latex:"2",label:"2",shift:"#@^2",class:"hide-shift"},"[3]":{variants:"3",latex:"3",label:"3",shift:"#@^3",class:"hide-shift"},"[4]":{variants:"4",latex:"4",label:"4",shift:"#@^4",class:"hide-shift"},"[5]":{variants:"5",latex:"5",label:"5",shift:"#@^5",class:"hide-shift"},"[6]":{variants:"6",latex:"6",label:"6",shift:"#@^6",class:"hide-shift"},"[7]":{variants:"7",latex:"7",label:"7",shift:"#@^7",class:"hide-shift"},"[8]":{variants:"8",latex:"8",label:"8",shift:"#@^8",class:"hide-shift"},"[9]":{variants:"9",latex:"9",label:"9",shift:"#@^9",class:"hide-shift"},"[separator-5]":{class:"separator",width:.5},"[separator]":{class:"separator"},"[separator-10]":{class:"separator"},"[separator-15]":{class:"separator",width:1.5},"[separator-20]":{class:"separator",width:2},"[separator-50]":{class:"separator",width:5},"[shift]":{class:"shift bottom left",width:1.5,label:""},"[foreground-color]":{variants:"foreground-color",command:["applyStyle",{color:"red"}],label:""},"[background-color]":{variants:"background-color",command:["applyStyle",{backgroundColor:"yellow"}],label:""}};Mg=class dUt{constructor(){this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0,this.isSandbox=!1;var t;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=void 0,this._visible=!1,this._rebuilding=!1,this.observer=new ResizeObserver(r=>{this.adjustBoundingRect(),this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect})}),this.listeners={};try{(t=window.top)==null||t.addEventListener("message",this)}catch{window.addEventListener("message",this)}ULt()&&document.addEventListener("focusin",r=>{let n=r.target;n!=null&&n.isConnected&&setTimeout(()=>{let a=rLt();a&&a.mathVirtualKeyboardPolicy==="auto"&&a.hasEditableContent&&this.show({animate:!0})},300)}),document.addEventListener("focusout",r=>{r.target instanceof sp&&r.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{rLt()||this.hide()},300)})}get currentLayer(){var t,r,n;return(n=(r=(t=this._element)==null?void 0:t.querySelector(".MLK__layer.is-visible"))==null?void 0:r.id)!=null?n:""}set currentLayer(t){var r;if(!this._element){this.latentLayer=t;return}let n=t?this._element.querySelector(`#${t}.MLK__layer`):null;n||(n=this._element.querySelector(".MLK__layer")),n&&((r=this._element.querySelector(".MLK__layer.is-visible"))==null||r.classList.remove("is-visible"),n.classList.add("is-visible")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(t){var r;this._shiftPressCount=t>2||t<0?0:t,(r=this._element)==null||r.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(t){let r="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[r]=t,r}setKeycap(t,r){Dd[t]=k_(r),this.rebuild()}getKeycap(t){var r;return t?(r=Dd[t])!=null?r:this.keycapRegistry[t]:void 0}getLayer(t){let r=this.normalizedLayouts;for(let n of r)for(let a of n.layers)if(a.id===t)return a}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(t){this._alphabeticLayout=t,this._normalizedLayouts=void 0,this.rebuild()}get layouts(){return this._layouts}set layouts(t){this.updateNormalizedLayouts(t),this.rebuild()}updateNormalizedLayouts(t){let r=Array.isArray(t)?[...t]:[t],n=r.findIndex(a=>a==="default");n>=0&&r.splice(n,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(r),this._normalizedLayouts=r.map(a=>cUt(a))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(t){this._editToolbar=t,this.rebuild()}get container(){return this._container===void 0?window.document.body:this._container}set container(t){this._container=t,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new dUt}catch{this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(t,r,n){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(r)||this.listeners[t].add(r)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(r=>{typeof r=="function"?r(t):r?.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,r,n){this.listeners[t]&&this.listeners[t].delete(r)}get element(){return this._element}set element(t){var r;this._element!==t&&((r=this._element)==null||r.remove(),this._element=t)}get visible(){return this._visible}set visible(t){t?this.show():this.hide()}get boundingRect(){var t;if(!this._visible)return new DOMRect;let r=(t=this._element)==null?void 0:t.getElementsByClassName("MLK__plate")[0];return r?r.getBoundingClientRect():new DOMRect}adjustBoundingRect(){if(!this._element)return;let t=this.boundingRect.height;if(this.container===document.body){this._element.style.setProperty("--_keyboard-height",`calc(${t}px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0))`);let r=t-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${r}px)`:`${r}px`}else this._element.style.setProperty("--_keyboard-height",`${t}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;let t=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=t,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){var t;if(!this._element)return;let r=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(r&&(r.backdrop||r.container)));let n=this._element.querySelectorAll(".MLK__layer.is-visible .MLK__keycap, .MLK__layer.is-visible .action, .fnbutton, .MLK__layer.is-visible .bigfnbutton, .MLK__layer.is-visible .shift");if(!n)return;let a=this.isShifted;for(let o of n){let s=this.getKeycap(o.id);if(s){let[l,c]=VV(s,{shifted:a});o.innerHTML=globalThis.MathfieldElement.createHTML(l),o.className=c,a&&typeof s.shift=="object"&&(t=s.shift)!=null&&t.tooltip?o.dataset.tooltip=s.shift.tooltip:!a&&s.tooltip&&(o.dataset.tooltip=s.tooltip)}}}show(t){var r;if(this._visible)return;let n=this.container;if(n&&window.mathVirtualKeyboard&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){let a=this._element.getElementsByClassName("MLK__plate")[0];if(a&&this.observer.observe(a),n===window.document.body){let o=n.style.paddingBottom;this.originalContainerBottomPadding=o;let s=a.offsetHeight-1;n.style.paddingBottom=o?`calc(${o} + ${s}px)`:`${s}px`}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),(r=this._element)==null||r.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,t!=null&&t.animate?requestAnimationFrame(()=>{this._element&&(this._element.classList.add("animate"),this._element.addEventListener("transitionend",()=>{var a;return(a=this._element)==null?void 0:a.classList.remove("animate")},{once:!0}),this._element.classList.add("is-visible"),this.stateChanged())}):(this._element.classList.add("is-visible"),this.stateChanged())}}hide(t){var r;let n=this.container;if(n&&this._visible&&this.stateWillChange(!1)){if(this._visible=!1,this._element){this.latentLayer=this.currentLayer;let a=this._element.getElementsByClassName("MLK__plate")[0];a&&this.observer.unobserve(a),window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("keydown",this,{capture:!0}),window.removeEventListener("keyup",this,{capture:!0}),window.removeEventListener("contextmenu",this,{capture:!0}),s0(),m8e(),(r=this._element)==null||r.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(n.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var t,r;return(r=(t=this.element)==null?void 0:t.offsetHeight)!=null?r:0}buildAndAttachElement(){var t;this.element,this.element=b8e(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",r=>{r.shiftKey||((r.ctrlKey||r.button===2)&&lUt(r.target),r.preventDefault(),r.stopPropagation())},{capture:!0}),(t=this.container)==null||t.appendChild(this.element)}handleEvent(t){if(V_(t)){if(!x_(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");if(t.data.action==="disconnect"){if(this._visible)return;this.connectedMathfieldWindow=void 0}else t.data.action!=="update-setting"&&t.data.action!=="proxy-created"&&t.data.action!=="execute-command"&&(t.source,this.connectedMathfieldWindow=t.source);this.handleMessage(t.data,t.source)}if(this._element)switch(t.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":t.button!==2&&t.preventDefault();break;case"keydown":{t.key==="Shift"&&!t.repeat&&(this.shiftPressCount=1);break}case"keyup":{(t.key==="Shift"||!t.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(t,r){let{action:n}=t;if(n==="execute-command"){let{command:a}=t,o=h0(a);if(window===window.top&&r!==window||window===window.top&&o!=="virtual-keyboard")return;this.executeCommand(a);return}if((n==="connect"||n==="show")&&this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},r),n!=="disconnect"&&!this.isSandbox){if(n==="show"){typeof t.animate<"u"?this.show({animate:t.animate}):this.show();return}if(n==="hide"){typeof t.animate<"u"?this.hide({animate:t.animate}):this.hide();return}if(n==="update-setting"){if(t.alphabeticLayout&&(this.alphabeticLayout=t.alphabeticLayout),t.layouts&&(this.layouts=t.layouts),t.editToolbar&&(this.editToolbar=t.editToolbar),t.setKeycap){let{keycap:a,value:o}=t.setKeycap;this.setKeycap(a,o),this.render()}return}if(n==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},r);return}}}sendMessage(t,r,n){if(r.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:r.command})),n||(n=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||n===window){window.dispatchEvent(new MessageEvent("message",{source:window,origin:window.origin,data:Xt({type:gV,action:t},r)}));return}if(n)n.postMessage(Xt({type:gV,action:t},r),{targetOrigin:this.targetOrigin});else if(t==="execute-command"&&Array.isArray(r.command)&&r.command[0]==="insert"){let a=r.command[1].split("");for(let o of a)this.dispatchEvent(new KeyboardEvent("keydown",{key:o,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:o,bubbles:!0}))}}stateWillChange(t){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:t},bubbles:!0,cancelable:!0,composed:!0}))}stateChanged(){this.dispatchEvent(new Event("virtual-keyboard-toggle")),this._visible||(this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect}))}focus(){this.sendMessage("focus",{})}blur(){this.sendMessage("blur",{})}updateToolbar(t){let r=this._element;if(!r)return;r.classList.toggle("is-math-mode",t.mode==="math"),r.classList.toggle("is-text-mode",t.mode==="text"),r.classList.toggle("can-undo",t.canUndo),r.classList.toggle("can-redo",t.canRedo),r.classList.toggle("can-copy",!t.selectionIsCollapsed),r.classList.toggle("can-cut",!t.selectionIsCollapsed),r.classList.toggle("can-paste",!0);let n=r.querySelectorAll(".ML__edit-toolbar");if(n)for(let a of n)a.innerHTML=d8e(this,t)}update(t){this._style=t.style,this.updateToolbar(t)}connect(){this.connectedMathfieldWindow=window}disconnect(){this._visible||(this.connectedMathfieldWindow=void 0)}executeCommand(t){if(t=W1(t),!t)return!1;let r,n=[],a=h0(t);return $n(t)?(r=t[0],r==="performWithFeedback"&&(a=h0(t.slice(1))),n=t.slice(1)):r=t,a==="virtual-keyboard"?jc[r].fn(void 0,...n):(this.sendMessage("execute-command",{command:t}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};sl()&&!("mathVirtualKeyboard"in window)&&(window===window.top?uUt():Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>$6e.singleton,configurable:!0}));Ua({addRowAfter:gUt,addColumnAfter:hUt,addRowBefore:A8e,addColumnBefore:B8e,removeRow:X8e,removeColumn:W8e,setEnvironment:mUt},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});bUt=class fUt{constructor(t){this.recording=!1,this.model=t,this.reset()}reset(){this.stack=[],this.index=-1,this.lastOp=""}startRecording(){this.recording=!0}stopRecording(){this.recording=!1}canUndo(){return this.index-1>=0}canRedo(){return this.stack.length-1>this.index}stopCoalescing(t){t&&this.index>=0&&(this.stack[this.index].selection=t),this.lastOp=""}undo(){if(!this.canUndo())return!1;let t=this.stack[this.index-1];return this.index-=1,this.lastOp="",this.model.setState(t,{silenceNotifications:!1,type:"undo"}),!0}redo(){if(!this.canRedo())return!1;let t=this.stack[this.index+1];return this.index+=1,this.lastOp="",this.model.setState(t,{silenceNotifications:!1,type:"redo"}),!0}pop(){this.canUndo()&&(this.stack.splice(this.index,this.stack.length-this.index),this.index-=1)}snapshot(t){return this.recording?(t&&t===this.lastOp&&this.pop(),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push(this.model.getState()),this.index+=1,this.stack.length>fUt.maximumDepth&&(this.stack.shift(),this.index-=1),this.lastOp=t??"",!0):!1}};bUt.maximumDepth=1e3;F8e=bUt;Ua({moveToOpposite:e=>{let t={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},r=e.at(e.position),{parent:n}=r;if(!n)return e.announce("plonk"),!1;let a=r.parentBranch,o;if(typeof a=="string"&&(o=t[a]),!o){let l=r.subsupPlacement?oLt(e):aLt(e);return e.mathfield.stopCoalescingUndo(),l}n.branch(o)||n.createBranch(o);let s=e.setSelection(e.getBranchRange(e.offsetOf(n),o));return e.mathfield.stopCoalescingUndo(),s},moveBeforeParent:e=>{let{parent:t}=e.at(e.position);return t?(e.position=e.offsetOf(t),e.mathfield.stopCoalescingUndo(),!0):(e.announce("plonk"),!1)},moveAfterParent:e=>vUt(e),moveToNextChar:e=>zc(e,"forward"),moveToPreviousChar:e=>zc(e,"backward"),moveUp:e=>zc(e,"upward"),moveDown:e=>zc(e,"downward"),moveToNextWord:e=>Tg(e,"forward"),moveToPreviousWord:e=>Tg(e,"backward"),moveToGroupStart:e=>{let t=e.offsetOf(e.at(e.position).firstSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:e=>{let t=e.offsetOf(e.at(e.position).lastSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:e=>{var t,r,n,a;if(e.position===e.lastOffset&&e.anchor===e.lastOffset)return c0(e,"forward");let o=e.at(e.position);if(o.mode==="text"){if(e.selectionIsCollapsed){let d=o;for(;d?.mode==="text";)d=d.leftSibling;let h=o;for(;((t=h.rightSibling)==null?void 0:t.mode)==="text";)h=h.rightSibling;if(d&&h)return $a(e,[d,h])}if(o.rightSibling.mode==="text"){let d=o;for(;d?.mode==="text";)d=d.rightSibling;return d?(Dl(e,(r=d.leftSibling)!=null?r:d),e.mathfield.switchMode("math"),!0):Dl(e,e.lastOffset)}}let s=e.at(e.anchor).parentPrompt,l=s?e.offsetOf(s)+1:Math.max(e.position+1,0),c=t_(e,l,"forward");if(c&&e.offsetOf(c)d.type==="leftright"||d.type==="text","forward");if(u){if(u.mode==="text"){let d=u;for(;d?.mode==="text";)d=d.rightSibling;return $a(e,[(n=u.leftSibling)!=null?n:u,(a=d.leftSibling)!=null?a:d])}return $a(e,u)}let g=o.parent;if(g){if(g.type==="leftright"||g.type==="surd")return $a(e,g);if(o.parentBranch==="superscript"&&g.subscript)return $a(e,g.subscript);if(o.parentBranch==="above"&&g.below)return $a(e,g.below);if(o.parentBranch==="superscript"||o.parentBranch==="subscript")return Dl(e,g);if(o.parentBranch==="above"||o.parentBranch==="below")return $a(e,g)}return Dl(e,e.lastOffset)},moveToPreviousGroup:e=>{var t;if(e.position===0&&e.anchor===0)return c0(e,"backward");let r=e.at(e.position),n=r.mode;if(n==="text"){if(e.selectionIsCollapsed){let l=r;for(;l?.mode==="text";)l=l.leftSibling;let c=r;for(;((t=c.rightSibling)==null?void 0:t.mode)==="text";)c=c.rightSibling;if(l&&c)return $a(e,[l,c])}for(;r?.mode==="text";)r=r.leftSibling;return r?Dl(e,r):Dl(e,0)}let a=e.at(e.anchor).parentPrompt,o=a?e.offsetOf(a.leftSibling):Math.max(e.position-1,0),s=t_(e,o,"backward");if(s&&e.offsetOf(s)>o)return c0(e,"backward");if(s)return Dl(e,s);if(n==="math"){let l=sLt(e,r,u=>u.type==="leftright"||u.type==="text","backward");if(l){if(l.mode==="text"){let u=l;for(;u?.mode==="text";)u=u.leftSibling;return $a(e,[l,u])}return $a(e,l)}let c=r.parent;if(c){if(c.type==="leftright"||c.type==="surd")return $a(e,c);if(r.parentBranch==="subscript"&&c.superscript)return $a(e,c.superscript);if(r.parentBranch==="below"&&c.above)return $a(e,c.above);if(r.parentBranch==="superscript"||r.parentBranch==="subscript")return Dl(e,c);if(r.parentBranch==="above"||r.parentBranch==="below")return $a(e,c)}return Dl(e,0)}return!1},moveToMathfieldStart:e=>e.selectionIsCollapsed&&e.position===0?(e.announce("plonk"),!1):(e.position=0,e.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:e=>e.selectionIsCollapsed&&e.position===e.lastOffset?(e.announce("plonk"),!1):(e.position=e.lastOffset,e.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:aLt,moveToSubscript:oLt},{target:"model",changeSelection:!0});Ua({moveToNextPlaceholder:e=>c0(e,"forward"),moveToPreviousPlaceholder:e=>c0(e,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});Ua({scrollIntoView:e=>(e.scrollIntoView(),!0),scrollToStart:e=>(e.field.scroll(0,0),!0),scrollToEnd:e=>{let t=e.field.getBoundingClientRect();return e.field.scroll(t.left-window.scrollX,0),!0},toggleKeystrokeCaption:H8e,toggleContextMenu:e=>{let t=e.toggleContextMenu();return t||e.model.announce("plonk"),t},plonk:e=>(e.model.announce("plonk"),!0),switchMode:(e,t,r,n)=>(e.switchMode(t,r,n),!0)});Ua({undo:e=>(e.undo(),!0),redo:e=>(e.redo(),!0)},{target:"mathfield",changeContent:!0});Ua({insert:(e,t,r)=>e.insert(t,r),typedText:(e,t,r)=>(e_(e,t,r),!0),insertDecimalSeparator:e=>{let t=e.model;return t.mode==="math"&&globalThis.MathfieldElement.decimalSeparator===","&&t.at(Math.max(t.position,t.anchor)).isDigit()?(e.insert("{,}",{format:"latex"}),e.snapshot("insert-mord"),!0):(e.insert("."),!0)},commit:e=>{var t,r;let n=e.model;return n.contentWillChange({inputType:"insertLineBreak"})&&((t=e.host)==null||t.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),(r=n.parentEnvironment)!=null&&r.isMultiline&&e.executeCommand("addRowAfter"),n.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(e,t,r)=>{let n=e.getPrompts(),a="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),o=0;for(;n.includes(a)&&o<100;){if(o===99)return console.error("could not find a unique ID after 100 tries"),!1;a="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),o++}return e.insert(`\\placeholder[${t??a}]{}`,r),!0}},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});Ua({copyToClipboard:e=>(e.focus(),e.model.selectionIsCollapsed&&e.select(),"queryCommandSupported"in document&&document.queryCommandSupported("copy")&&document.execCommand("copy")||e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("copy",{bubbles:!0,composed:!0})),!1)},{target:"mathfield"});Ua({cutToClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("cut")&&document.execCommand("cut")||e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("cut",{bubbles:!0,composed:!0})),!0),pasteFromClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(t=>{t&&e.model.contentWillChange({inputType:"insertFromPaste",data:t})?(e.stopCoalescingUndo(),e.stopRecording(),e.insert(t,{mode:e.model.mode})&&(U1(e),e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),Hr(e))):e.model.announce("plonk"),e.startRecording()}).catch(()=>{e.model.announce("plonk"),e.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});Ua({selectGroup:e=>{let t=r_(e);return t||e.announce("plonk"),t},selectAll:e=>e.setSelection(0,e.lastOffset),extendSelectionForward:e=>zc(e,"forward",{extend:!0}),extendSelectionBackward:e=>zc(e,"backward",{extend:!0}),extendToNextWord:e=>Tg(e,"forward",{extend:!0}),extendToPreviousWord:e=>Tg(e,"backward",{extend:!0}),extendSelectionUpward:e=>zc(e,"upward",{extend:!0}),extendSelectionDownward:e=>zc(e,"downward",{extend:!0}),extendToNextBoundary:e=>Tg(e,"forward",{extend:!0}),extendToPreviousBoundary:e=>Tg(e,"backward",{extend:!0}),extendToGroupStart:e=>{let t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).firstSibling));return t||e.announce("plonk"),t},extendToGroupEnd:e=>{let t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).lastSibling));return t||e.announce("plonk"),t},extendToMathFieldStart:e=>{let t=e.setSelection(e.anchor,0);return t||e.announce("plonk"),t},extendToMathFieldEnd:e=>{let t=e.setSelection(e.anchor,e.lastOffset);return t||e.announce("plonk"),t}},{target:"model",changeSelection:!0});Tm=null,n1=0,pV=class ol{static start(t,r,n,a){var o;ol.element=t,(o=ol.controller)==null||o.abort(),ol.controller=new AbortController;let s={signal:ol.controller.signal};"PointerEvent"in window?(t.addEventListener("pointermove",n,s),t.addEventListener("pointerup",a,s),t.addEventListener("pointercancel",a,s),n_(r)&&(ol.pointerId=r.pointerId,t.setPointerCapture(r.pointerId))):(window.addEventListener("mousemove",n,s),window.addEventListener("blur",a,s),window.addEventListener("mouseup",a,s))}static stop(){var t;(t=ol.controller)==null||t.abort(),ol.controller=void 0,typeof ol.pointerId=="number"&&(ol.element.releasePointerCapture(ol.pointerId),ol.pointerId=void 0)}};$8e=class extends yr{constructor(){super("math")}onPaste(e,t){if(!t||!e.model.contentWillChange({data:typeof t=="string"?t:null,dataTransfer:typeof t=="string"?null:t,inputType:"insertFromPaste"}))return!1;let r="",n="auto",a=typeof t!="string"?t.getData("application/json+mathlive"):"";if(a)try{let o=JSON.parse(a);if(o&&Array.isArray(o)){e.snapshot();let s=_g(o),{model:l}=e;l.selectionIsCollapsed||l.deleteAtoms(Ia(l.selection));let c=l.at(l.position);if(c.parent instanceof Ui){c.parentBranch;let u=[],g=[];s[0].type==="first"&&s.shift(),s[s.length-1].type==="first"&&s.pop();for(let p of s)p.type==="first"&&g.length>0?(u.push(g),g=[p]):g.push(p);g.length>0&&u.push(g);let d=Number(c.parentBranch[0]),h=Number(c.parentBranch[1]),m=c.parent.maxColumns;for(;c.parent.colCount-h=m&&(h=0,c.parent.addRowAfter(d),d++),c.parent.setCell(d,h,u[p])}else c.parent.addChildrenAfter(s.filter(u=>u.type!=="first"),c);return l.position=l.offsetOf(s[s.length-1]),l.contentDidChange({inputType:"insertFromPaste"}),Hr(e),!0}}catch{}if(a=typeof t!="string"?t.getData("application/json"):"",a&&globalThis.MathfieldElement.computeEngine)try{let o=JSON.parse(a);if(typeof o=="object"&&"latex"in o&&o.latex&&(r=o.latex),!r){let s=globalThis.MathfieldElement.computeEngine.box(o);s&&!s.has("Error")&&(r=s.latex)}r||(n="latex")}catch{}if(!r&&typeof t!="string"&&(r=t.getData("application/x-latex"),r&&(n="latex")),r||(r=typeof t=="string"?t:t.getData("text/plain")),r){let o;return[o,r]=C_(r),n==="auto"&&o&&(n="latex"),e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,r,{format:n})&&(e.startRecording(),e.snapshot("paste"),Hr(e)),e.startRecording(),!0}return!1}insert(e,t,r){var n,a;let o=typeof t=="string"?t:(a=(n=globalThis.MathfieldElement.computeEngine)==null?void 0:n.box(t).latex)!=null?a:"";if(!r.silenceNotifications&&!e.contentWillChange({data:o,inputType:"insertText"}))return!1;r.insertionMode||(r.insertionMode="replaceSelection"),r.selectionMode||(r.selectionMode="placeholder"),r.format||(r.format="auto");let{silenceNotifications:s}=e;r.silenceNotifications&&(e.silenceNotifications=!0);let l=e.silenceNotifications;e.silenceNotifications=!0;let c={"?":"\\placeholder{}","@":"\\placeholder{}"};c[0]=r.insertionMode==="replaceAll"?"":e.getValue(e.selection,"latex-unstyled"),r.insertionMode==="replaceSelection"?e.deleteAtoms(Ia(e.selection)):r.insertionMode==="replaceAll"?e.deleteAtoms():r.insertionMode==="insertBefore"?e.collapseSelection("backward"):r.insertionMode==="insertAfter"&&e.collapseSelection("forward"),!e.at(e.position).isLastSibling&&e.at(e.position+1).type==="placeholder"?e.deleteAtoms([e.position,e.position+1]):e.at(e.position).type==="placeholder"&&e.deleteAtoms([e.position-1,e.position]);let u=-1;c[0]?c["@"]=c[0]:typeof t=="string"&&/(^|[^\\])#@/.test(t)&&(u=tPe(e),u>=0&&(c["@"]=e.getValue(u,e.position,"latex"))),c[0]||(c[0]=c["?"]);let g=!1,d=f=>(g=!0,c[f]),[h,m]=hLt(e,t,d,r);if(!m)return!1;let p=m.length===1&&m[0].type==="genfrac";if(p&&u>=0&&typeof e.mathfield.options.isImplicitFunction=="function"&&e.mathfield.options.isImplicitFunction(e.at(e.position).command)?(c["@"]=c["?"],g=!1,[h,m]=hLt(e,t,d,r)):u>=0&&e.deleteAtoms([u,e.position]),m.length===1&&m[0].isRoot)e.root=m[0];else{let{parent:f}=e.at(e.position),v=f.hasEmptyBranch("body");if(p&&h!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&f instanceof qr&&f.leftDelim==="("&&v){let x=f.parent,C=f.parentBranch;x.removeChild(f),x.setChildren(m,C)}let y=e.at(e.position);y.parent.addChildrenAfter(m,y),h==="latex"&&typeof t=="string"&&f?.type==="root"&&v&&!g&&(f.verbatimLatex=t)}e.silenceNotifications=l;let b=m[m.length-1];if(r.selectionMode==="placeholder"){let f;if(m.length===1&&m[0].type==="genfrac"){let v=m[0].branch("above");if(f=v?.find(y=>y.type==="placeholder"),!f){let y=m[0].branch("below");f=y?.find(x=>x.type==="placeholder")}}if(f||(f=m.flatMap(v=>[v,...v.children]).find(v=>v.type==="placeholder")),f){let v=e.offsetOf(f);e.setSelection(v-1,v),e.announce("move")}else if(b){let v=b.body,y=b.hasEmptyBranch("body");v&&y?e.setSelection(e.offsetOf(v[0]),e.offsetOf(v[v.length-1])+1):e.position=e.offsetOf(b)}}else r.selectionMode==="before"||(r.selectionMode==="after"?b&&(e.position=e.offsetOf(b)):r.selectionMode==="item"&&e.setSelection(e.anchor,e.offsetOf(b)));return e.contentDidChange({data:o,inputType:"insertText"}),e.silenceNotifications=s,!0}};new $8e;iPe=class extends yr{constructor(){super("text")}onPaste(e,t){if(!t)return!1;let r=typeof t=="string"?t:t.getData("text/plain");return r&&e.model.contentWillChange({inputType:"insertFromPaste",data:r})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,r)&&(e.model.contentDidChange({inputType:"insertFromPaste"}),e.startRecording(),e.snapshot("paste"),Hr(e)),e.startRecording(),!0):!1}insert(e,t,r={}){if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;r.insertionMode||(r.insertionMode="replaceSelection"),r.selectionMode||(r.selectionMode="placeholder"),r.format||(r.format="auto");let{silenceNotifications:n}=e;r.silenceNotifications&&(e.silenceNotifications=!0);let a=e.silenceNotifications;e.silenceNotifications=!0,r.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(Ia(e.selection)):r.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):r.insertionMode==="insertBefore"?e.collapseSelection("backward"):r.insertionMode==="insertAfter"&&e.collapseSelection("forward");let o=rPe(t,e.mathfield.context);if(A_(o,r.style),!o)return!1;let s=e.at(e.position),l=s.parent.addChildrenAfter(o,s);return e.silenceNotifications=a,r.selectionMode==="before"||(r.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(l)):l&&(e.position=e.offsetOf(l))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=n,!0}};new iPe;Fr=4,Co=20,Gn=2*(Co+Fr),SF=(e,t)=>` `,pLt=(e,t)=>` `,LF=(e,t,r)=>` `,aPe=` ${LF(2*(Fr+Gn),2*Fr+3*Gn,0)} ${LF(2*(Fr+Gn),2*Fr+Gn,180)} ${LF(2*Fr+3*Gn,2*(Fr+Gn),-90)} ${LF(2*Fr+Gn,2*(Fr+Gn),90)} ${SF(2*Fr+Gn,Fr)} ${pLt(2*Fr+2*Gn,Fr)} ${SF(2*Fr+3*Gn,Fr)} ${SF(Fr,2*Fr+Gn)} ${pLt(Fr,2*Fr+2*Gn)} ${SF(Fr,2*Fr+3*Gn)} `,oPe=e=>` `,sPe=e=>` `,CUt=e=>` `,lPe=e=>` `,cPe=e=>` `,dPe=e=>` `,uPe=e=>` `,gPe=e=>` `,G9={matrix:oPe,pmatrix:sPe,bmatrix:lPe,Bmatrix:CUt,vmatrix:cPe,Vmatrix:dPe},y9={cases:uPe,rcases:gPe,Bmatrix:CUt};fLt={};ILt=80,ZUt=class{constructor(e,t){this._className="",this._element=null;var r;this.parentMenu=t,this._declaration=e,Object.freeze(this._declaration),d0(e)?(this.type="submenu",this.submenu=new RUt(e.submenu,{parentMenu:t,submenuClass:e.submenuClass,columnCount:e.columnCount})):this.type=(r=e.type)!=null?r:"command",this.hasCheck=Md(e)&&e.checked!==void 0}get rootMenu(){return this.parentMenu.rootMenu}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}dispose(){var e,t;(e=this._abortController)==null||e.abort(),this._abortController=void 0,(t=this._element)==null||t.remove(),this._element=null,this.submenu&&this.submenu.dispose(),this.submenu=void 0}get menuItem(){return this._declaration}get label(){var e;return(e=this._label)!=null?e:""}set label(e){e===void 0&&(e=""),e!==this._label&&(this._label=e,this.dirty=!0)}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this.dirty=!0)}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.element&&(e?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")),this.dirty=!0}get checked(){return this._checked}set checked(e){this._checked=e,this.dirty=!0}get tooltip(){return this._tooltip}set tooltip(e){e!==this._tooltip&&(this._tooltip=e,this.dirty=!0)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){e!==this._ariaLabel&&(this._ariaLabel=e,this.dirty=!0)}get active(){var e,t;return(t=(e=this.element)==null?void 0:e.classList.contains("active"))!=null?t:!1}set active(e){this.element&&this.element.classList.toggle("active",e)}updateState(e){var t,r,n;let a=this._declaration;if(o_(a)){this.enabled=!1,this.checked=!1;return}x9(a)&&(this.enabled=!1,this.checked=!1,this.visible=!0),Md(a)&&(this.checked=(t=Jm(a.checked,e))!=null?t:!1),(Md(a)||d0(a))&&(this.enabled=(r=Jm(a.enabled,e))!=null?r:!0,this.visible=(n=Jm(a.visible,e))!=null?n:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(e),this.submenu.visible||(this.visible=!1))),(Md(a)||x9(a)||d0(a))&&(this.label=Jm(a.label,e),this._className=Jm(a.class,e),this.tooltip=Jm(a.tooltip,e),this.ariaLabel=Jm(a.ariaLabel,e)),this._element&&this.updateElement()}set dirty(e){e&&this.parentMenu&&(this.parentMenu.dirty=!0)}updateElement(){var e;if(!this.visible||!this.element)return;let t=this.element;t.textContent="",t.className="",t.className=(e=this._className)!=null?e:"",this.enabled?t.removeAttribute("aria-disabled"):t.setAttribute("aria-disabled","true"),this.checked===!0?(t.setAttribute("aria-checked","true"),t.append(Z9("checkmark"))):this.checked==="mixed"?(t.setAttribute("aria-checked","mixed"),t.append(Z9("mixedmark"))):t.removeAttribute("aria-checked"),this.ariaLabel&&t.setAttribute("aria-label",this.ariaLabel);let r=document.createElement("span");if(r.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&r.classList.add("heading"),r.innerHTML=this.label,t.append(r),this._tooltip&&t.setAttribute("data-tooltip",this._tooltip),Md(this._declaration)&&this._declaration.keyboardShortcut){let n=document.createElement("kbd");n.innerHTML=B_(this._declaration.keyboardShortcut),t.append(n)}this.type==="submenu"&&t.append(Z9("trailing-chevron"))}get element(){if(this._element)return this._element;if(o_(this._declaration)){let r=document.createElement("li");return r.setAttribute("part","menu-divider"),r.setAttribute("role","divider"),this._element=r,r}let e=document.createElement("li");this._element=e,(Md(this._declaration)||x9(this._declaration)||d0(this._declaration))&&e.setAttribute("part","menu-item"),e.setAttribute("tabindex","-1"),this.hasCheck?e.setAttribute("role","menuitemcheckbox"):e.setAttribute("role","menuitem"),this.type==="submenu"&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"));let t=this.abortController.signal;return e.addEventListener("pointerenter",this,{signal:t}),e.addEventListener("pointerleave",this,{signal:t}),e.addEventListener("pointerup",this,{signal:t}),e.addEventListener("click",this,{signal:t}),this._element}dispatchSelect(){var e;if(!Md(this._declaration))return;let t=new CustomEvent("menu-select",{cancelable:!0,bubbles:!0,detail:{modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data}});this.parentMenu.dispatchEvent(t)&&typeof this._declaration.onMenuSelect=="function"&&this._declaration.onMenuSelect({target:(e=this.parentMenu.host)!=null?e:void 0,modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data})}handleEvent(e){var t;if(!(!this.visible||!this.enabled)){if(e.type==="click"){this.rootMenu.state==="modal"&&this.select(),e.stopPropagation(),e.preventDefault();return}if(e.type==="pointerenter"){let r=e;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&(t=this.parentMenu.activeMenuItem)!=null&&t.movingTowardSubmenu(r)?this.rootMenu.scheduleOperation(()=>{this.parentMenu.activeMenuItem=this,this.openSubmenu()}):(this.parentMenu.activeMenuItem=this,this.openSubmenu({withDelay:!0}));return}if(e.type==="pointerleave"){this.rootMenu.activeSubmenu===this.parentMenu&&(this.parentMenu.activeMenuItem=null);return}if(e.type==="pointerup"){this.rootMenu.state!=="modal"&&this.select(),e.stopPropagation(),e.preventDefault();return}}}select(){if(this.rootMenu.cancelDelayedOperation(),this.type==="submenu"){this.openSubmenu();return}this.active=!1,setTimeout(()=>{this.active=!0,setTimeout(()=>{this.active=!1,this.rootMenu.hide(),this.dispatchSelect()},ILt)},ILt)}openSubmenu(e){var t;if(this.type!=="submenu"||!this.element)return;if((t=e?.withDelay)!=null&&t){this.rootMenu.scheduleOperation(()=>this.openSubmenu());return}let r=this.element.getBoundingClientRect(),n=xUt(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:bLt(r,"trailing",n),y:r.top-4},alternateLocation:{x:bLt(r,"leading",n),y:r.top-4}})}movingTowardSubmenu(e){if(!this.element||this.type!=="submenu")return!1;let t=this.rootMenu.lastMoveEvent;if(!t)return!1;let r=e.timeStamp-t.timeStamp;if(r>500)return!1;let n=e.clientX-t.clientX;if(GPe(n,t.clientY-e.clientY,r)<=.2)return!1;let a="right";if(this.submenu.element){let o=this.submenu.element.getBoundingClientRect(),s=this.element.getBoundingClientRect();o.left0:n<0}};RUt=class u1{constructor(t,r){this._element=null,this._activeMenuItem=null,this._dirty=!0;var n,a;this.parentMenu=(n=r?.parentMenu)!=null?n:null,this._submenuClass=r?.submenuClass,this.columnCount=(a=r?.columnCount)!=null?a:1,this.isSubmenuOpen=!1,this.menuItems=t}get children(){return Object.freeze([...this._menuItems])}set menuItems(t){let r=this.parentMenu;this.dispose(),this.parentMenu=r,t=[...t],this._menuItems=t.map(n=>n.onCreate?n.onCreate(n,this):new ZUt(n,this)),this.hasCheck=void 0,this.dirty=!0}dispose(){var t;this.hide(),this._element&&this._element.remove(),this._abortController&&this._abortController.abort(),(t=this._menuItems)==null||t.forEach(r=>r.dispose()),this._menuItems=[],this._activeMenuItem=null,this.parentMenu=null}handleEvent(t){if(t.type==="wheel"&&this._element){let r=t;this._element.scrollBy(0,r.deltaY),t.stopPropagation()}}dispatchEvent(t){return this.rootMenu.dispatchEvent(t)}get host(){return this.rootMenu.host}get rootMenu(){return this.parentMenu.rootMenu}updateState(t){var r,n,a;this._menuItems.forEach(u=>u.updateState(t));let o=this.hasCheck;this.hasCheck=this._menuItems.some(u=>u.visible&&u.hasCheck),this.hasCheck!==o&&this._menuItems.forEach(u=>u.updateState(t));let s,l=0;for(let u of this._menuItems)u.type==="heading"?(s&&l===0&&(s.visible=!1),s=u,l=0):u.type==="divider"&&s?(s.visible=l>0,s=void 0,l=0):s&&u.visible&&(l+=1);s&&(s.visible=l>0);let c=!0;for(let u of this._menuItems)u.type==="divider"?(u.visible=!c,c=!0):u.visible&&(c=!1);(r=this.activeMenuItem)!=null&&r.visible||(this.activeMenuItem=null),!((n=this.activeMenuItem)!=null&&n.enabled)&&((a=this.activeMenuItem)==null?void 0:a.type)==="submenu"&&this._activeMenuItem.submenu.hide(),this._dirty=!1}get enabled(){return this.updateIfDirty(),this._menuItems.some(t=>t.type!=="divider"&&t.visible&&t.enabled)}get visible(){return this.updateIfDirty(),this._menuItems.some(t=>t.type!=="divider"&&t.visible)}set dirty(t){this._dirty!==t&&t&&this.parentMenu&&(this._dirty=!0,this.parentMenu.dirty=!0)}updateIfDirty(){this._dirty&&this.updateState(this.rootMenu.modifiers)}updateElement(){var t;if(this._element){this._element.textContent="";for(let{element:r,visible:n}of this._menuItems)r&&n&&this._element.append(r);(t=this._element.querySelector("li:first-of-type"))==null||t.setAttribute("tabindex","0")}}get element(){if(this._element)return this._element;let t=document.createElement("menu");t.setAttribute("role","menu"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-orientation","vertical"),t.setAttribute("part","ui-menu-container"),this._submenuClass&&t.classList.add(this._submenuClass),t.classList.add("ui-menu-container"),this._abortController||(this._abortController=new AbortController);let r=this._abortController.signal;return t.addEventListener("focus",this,{signal:r}),t.addEventListener("wheel",this,{passive:!0,signal:r}),this._element=t,this.updateElement(),t}get activeMenuItem(){return this._activeMenuItem}set activeMenuItem(t){var r,n,a,o;if(this.rootMenu.cancelDelayedOperation(),t!==this._activeMenuItem){if(this.activeMenuItem){let s=this.activeMenuItem;s.active=!1,(r=s.submenu)==null||r.hide()}if(!((n=t?.visible)==null||n)){this._activeMenuItem=null;return}this._activeMenuItem=t,t&&(t.active=!0)}t?(a=t.element)==null||a.focus({preventScroll:!0}):(o=this._element)==null||o.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let t=0,r=!1,n=this._menuItems;for(;!r&&t<=n.length-1;){let a=n[t];r=a.type!=="divider"&&a.visible&&a.enabled,t+=1}return r?n[t-1]:null}get lastMenuItem(){this.updateIfDirty();let t=this._menuItems,r=t.length-1,n=!1;for(;!n&&r>=0;){let a=t[r];n=a.type!=="divider"&&a.visible&&a.enabled,r-=1}return n?t[r+1]:null}nextMenuItem(t){if(t===0)return this._activeMenuItem;if(!this._activeMenuItem)return t>0?this.firstMenuItem:this.lastMenuItem;if(!this.firstMenuItem||!this.lastMenuItem||!this._activeMenuItem)return null;this.updateIfDirty();let r=this._menuItems.indexOf(this.firstMenuItem),n=this._menuItems.indexOf(this.lastMenuItem),a=this._menuItems.indexOf(this._activeMenuItem),o=1;for(;a>=r&&a<=n;){a+=t>0?1:-1;let s=this._menuItems[a];if(!s)break;if(s.visible&&s.enabled){if(o===Math.abs(t))return this._menuItems[a];o+=1}}return t>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(t){this.updateIfDirty();let r=this._menuItems.filter(n=>n.visible&&n.enabled).indexOf(t);return r<0?-1:r%this.columnCount}static get collator(){return u1._collator||(u1._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),u1._collator}findMenuItem(t){var r;this.updateIfDirty();let n=this._menuItems.filter(l=>l.type!=="divider"&&l.visible&&l.enabled);if(n.length===0)return null;let a=Math.max(...n.map(l=>l.label.length))-t.length;if(a<0)return null;let o=null,s=0;for(;su1.collator.compare(t,l.label.substring(s,t.length))===0))!=null?r:null,s++;return o}show(t){return!this.visible||!t.container?!1:(this.updateElement(),t.container.appendChild(this.element),HVt()&&(this.element.popover="manual",this.element.showPopover()),t.location&&IPe(this.element,{location:t.location,alternateLocation:t.alternateLocation,verticalPos:"bottom",horizontalPos:"start"}),vLt(),this.element.focus({preventScroll:!0}),GLt(),this.parentMenu&&(this.parentMenu.openSubmenu=this),!0)}hide(){var t,r,n,a,o,s;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),!(!((t=this._element)!=null&&t.isConnected)||!this._element.parentElement)&&(HVt()&&(r=this._element)!=null&&r.popover&&this._element.hidePopover(),vLt(),(a=(n=this.parentMenu)==null?void 0:n.element)==null||a.focus(),(s=(o=this._element)==null?void 0:o.parentNode)==null||s.removeChild(this._element),GLt())}set openSubmenu(t){var r,n,a,o;let s=t!==null;((r=this.activeMenuItem)==null?void 0:r.type)==="submenu"&&((n=this.activeMenuItem.element)==null||n.setAttribute("aria-expanded",s.toString())),(o=(a=this.activeMenuItem)==null?void 0:a.element)==null||o.classList.toggle("is-submenu-open",s),this.isSubmenuOpen=s}};AUt=class BUt extends RUt{constructor(t,r){var n;super(t),this.state="closed",this.typingBufferResetTimer=0,this.hysteresisTimer=0,this._updating=!1,this._host=(n=r?.host)!=null?n:null,this.isDynamic=t.some(XUt),this._modifiers={shift:!1,control:!1,alt:!1,meta:!1},this.typingBuffer="",this.state="closed"}get modifiers(){return this._modifiers}set modifiers(t){W6e(this._modifiers,t)||(this._modifiers=t,this.dirty=!0)}get activeSubmenu(){let t=this;for(;t.isSubmenuOpen;)t=t.activeMenuItem.submenu;return t}set dirty(t){this._updating||this._dirty!==t&&(this._dirty=!0,t&&setTimeout(()=>{this.updateState(this.modifiers),this.updateElement()}))}updateState(t){this._updating=!0,this.modifiers=t??this.modifiers,super.updateState(this.modifiers),this._updating=!1}handleKeyupEvent(t){this.isDynamic&&(this.modifiers=qm(t)),t.stopImmediatePropagation()}handleKeydownEvent(t){var r,n,a;if(t.key==="Tab"||t.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=qm(t));let o=!0,s=this.activeSubmenu,l=s.activeMenuItem;switch(t.key){case" ":case"Space":case"Return":case"Enter":l?.select(qm(t));break;case"ArrowRight":if(l?.type==="submenu")l.select(qm(t)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!l)s.activeMenuItem=s.firstMenuItem;else{let c=(r=s.getMenuItemColumn(l))!=null?r:-1;if(c>=0&&c<((n=s.columnCount)!=null?n:1)-1){let u=s.nextMenuItem(1);u&&(s.activeMenuItem=u)}}break;case"ArrowLeft":if(s===this.rootMenu)l||(s.activeMenuItem=s.firstMenuItem);else if((l&&(a=s.getMenuItemColumn(l))!=null?a:-1)<=0||!l){s.hide();let c=s.parentMenu.activeMenuItem;if(c){let{element:u}=c;u?.focus(),u?.classList.remove("is-submenu-open")}}else{let c=s.nextMenuItem(-1);c&&(s.activeMenuItem=c)}break;case"ArrowDown":s.activeMenuItem=s.nextMenuItem(s.columnCount);break;case"ArrowUp":s.activeMenuItem=s.nextMenuItem(-s.columnCount);break;case"Home":case"PageUp":s.activeMenuItem=s.firstMenuItem;break;case"End":case"PageDown":s.activeMenuItem=s.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);let c=s.findMenuItem(this.typingBuffer);c&&(s.activeMenuItem=c),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(B1(t)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=t.key;let c=s.findMenuItem(this.typingBuffer);c&&(s.activeMenuItem=c),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else o=!1}o&&(t.preventDefault(),t.stopPropagation())}handleEvent(t){if(t.type==="keydown")this.handleKeydownEvent(t);else if(t.type==="keyup")this.handleKeyupEvent(t);else if(t.type==="pointermove")this.lastMoveEvent=t;else if(t.type==="pointerup")Number.isFinite(this.rootMenu._openTimestamp)&&Date.now()-this.rootMenu._openTimestamp<120?this.state="modal":this.state==="modal"&&t.target===this.scrim&&this.hide();else if(t.type==="contextmenu"){t.preventDefault(),t.stopPropagation();return}super.handleEvent(t)}dispatchEvent(t){return this._host?this._host.dispatchEvent(t):!0}get host(){return this._host}get scrim(){return Ml.element}connectScrim(t){let r=this.scrim;r.addEventListener("pointerup",this,!0),r.addEventListener("contextmenu",this),r.addEventListener("keydown",this),r.addEventListener("keyup",this),r.addEventListener("pointermove",this),Ml.open({root:t,onDismiss:()=>this.hide()})}disconnectScrim(){let t=this.scrim;t.removeEventListener("pointerup",this,!0),t.removeEventListener("contextmenu",this),t.removeEventListener("keydown",this),t.removeEventListener("keyup",this),t.removeEventListener("pointermove",this),Ml.state==="open"&&Ml.scrim.close()}get rootMenu(){return this}show(t){return this._onDismiss=t?.onDismiss,t!=null&&t.modifiers&&(this.modifiers=t.modifiers),this.updateState(),this.connectScrim(t?.target),super.show(zt(Xt({},t),{container:this.scrim}))?(this._openTimestamp=Date.now(),this.state="open",!0):(this.disconnectScrim(),!1)}hide(){this.cancelDelayedOperation(),this.state!==void 0&&(this.state!=="closed"&&(this.activeMenuItem=null,Ml.element.parentElement.focus(),super.hide(),this.state="closed",this.disconnectScrim()),this._onDismiss&&(this._onDismiss(),this._onDismiss=void 0))}scheduleOperation(t){this.cancelDelayedOperation();let r=BUt.SUBMENU_DELAY;if(r<=0){t();return}this.hysteresisTimer=setTimeout(()=>{this.hysteresisTimer=0,t()},r)}cancelDelayedOperation(){this.hysteresisTimer&&(clearTimeout(this.hysteresisTimer),this.hysteresisTimer=0)}};AUt.SUBMENU_DELAY=120;yLt=AUt;fV=class{};fV.DELAY=300,fV.MAX_DISTANCE=10;WUt="",IV="";t0={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"imaginary eye ","\\imaginaryJ":"imaginary jay ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":' semi-colon ',",":' comma ',"|":'Vertical bar',"(":'Open paren. ',")":' Close paren. ',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","\\ne":"is not equal to ","\\neq":"is not equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","\u200B":"","\u2212":"minus ",":":' such that ',"\\colon":' such that ',"\\hbar":"etch bar ","\\iff":'if, and only if, ',"\\Longleftrightarrow":'if, and only if, ',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set n',"\\C":'the set c',"\\Z":'the set z',"\\Q":'the set q',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'open paren',"\\rparen":'close paren',"\\lbrace":'open brace',"\\{":'open brace',"\\rbrace":'close brace',"\\}":'close brace',"\\langle":'left angle bracket',"\\rangle":'right angle bracket',"\\lfloor":'open floor',"\\rfloor":'close floor',"\\lceil":'open ceiling',"\\rceil":'close ceiling',"\\vert":'vertical bar',"\\mvert":'divides',"\\lvert":'left vertical bar',"\\rvert":'right vertical bar',"\\lbrack":' open square bracket ',"\\rbrack":' close square bracket ',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},R9={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};Jc={"\\ne":"\u2260","\\neq":"\u2260","\u2212":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega","\\exponentialE":"e","\\imaginaryI":"i","\\imaginaryJ":"j","\\!":" ","\\,":" ","\\:":" ","\\>":" ","\\;":" ","\\enskip":" ","\\enspace":" ","\\qquad":" ","\\quad":" ","\\infty":"oo","\\R":"RR","\\mathbb{R}":"RR","\\N":"NN","\\mathbb{N}":"NN","\\Z":"ZZ","\\mathbb{Z}":"ZZ","\\Q":"QQ","\\mathbb{Q}":"QQ","\\C":"CC","\\mathbb{C}":"CC","\\emptyset":"O/","\\varnothing":"O/","\\varDelta":"Delta","\\varTheta":"Theta","\\varLambda":"Lambda","\\varXi":"Xi","\\varPi":"Pi","\\varSigma":"Sigma","\\varUpsilon":"Upsilon","\\varPhi":"Phi","\\varPsi":"Psi","\\varOmega":"Omega"},o1={"\\pm":"+-","\\colon":" : ","\\sum":" sum ","\\prod":" prod ","\\bigcap":" nnn ","\\bigcup":" uuu ","\\int":" int ","\\oint":" oint ","\\ge":">=","\\le":"<=","\\ne":"!=","\\neq":"!=","\\lt":"<","\\gt":">","\\gets":"<-","\\to":"->","\\land":" and ","\\lor":" or ","\\lnot":" not ","\\forall":" AA ","\\exists":" EE ","\\in":" in ","\\notin":" !in ","\\mapsto":"|->","\\implies":"=>","\\iff":"<=>","\\cdot":" * ","\\ast":" ** ","\\star":" *** ","\\times":" * ","\\div":" -: ","\\ltimes":" |>< ","\\rtimes":" ><| ","\\bowtie":" |><| ","\\circ":"@"},YF={"\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrack":"[","\\rbrack":"]","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)"};HPe=class extends ZUt{constructor(e,t,r,n){super(e,t),this.row=r,this.col=n}set active(e){let t=this.parentMenu.children;if(e)for(let r of t)r.element.classList.toggle("active",r.row<=this.row&&r.col<=this.col);else for(let r of t)r.element.classList.remove("active")}};yo={"\\ne":"!=","\\neq":"!=","\u2212":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon.alt","\\varepsilon":"epsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta.alt","\\vartheta":"theta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi.alt","\\varphi":"phi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega","\\exponentialE":"e","\\imaginaryI":"i","\\imaginaryJ":"j","\\!":" #h(-1em/6) ","\\,":" thin ","\\:":" med ","\\>":" med ","\\;":" thick ","\\enskip":"space.en","\\enspace":"space.en","\\qquad":"space.quad space.quad","\\quad":"space.quad","\\infty":"infinity","\\R":"RR","\\mathbb{R}":"RR","\\N":"NN","\\mathbb{N}":"NN","\\Z":"ZZ","\\mathbb{Z}":"ZZ","\\Q":"QQ","\\mathbb{Q}":"QQ","\\C":"CC","\\mathbb{C}":"CC","\\emptyset":"emptyset","\\varnothing":"nothing","\\varDelta":"Delta","\\varTheta":"Theta","\\varLambda":"Lambda","\\varXi":"Xi","\\varPi":"Pi","\\varSigma":"Sigma","\\varUpsilon":"Upsilon","\\varPhi":"Phi","\\varPsi":"Psi","\\varOmega":"Omega","\\vert":" | ","\\Vert":" || ","\\mid":" divides ","\\lbrack":" bracket.l ","\\rbrack":" bracket.r ","\\lbrace":" brace.l ","\\rbrace":" brace.r ","\\lparen":" paren.l ","\\rparen":" paren.r ","\\langle":" angle.l ","\\rangle":" angle.r ","\\differentialD":" dif ","\\diamond":" diamond.stroked.small ","\\square":" square.stroked.small ","\\lceil":" ceil.l ","\\rceil":" ceil.r ","\\lfloor":" floor.l ","\\rfloor":" floor.r ","\\aleph":" aleph ","\\bet":" bet ","\\gimel":" gimel ","\\dalet":" dalet ","\\mod":" mod ","\\equiv":" equiv ","\\subset":" subset ","\\supset":" supset ","\\subseteq":" subset.eq ","\\supseteq":" supset.eq ","\\subsetneq":" subset.neq ","\\supsetneq":" supset.neq ","\\supsetneqq":" supset.neq ","\\nsubset":" subset.not ","\\nsupset":" supset.not ","\\nsubseteq":" subset.eq.not ","\\nsupseteq":" supset.eq.not ","\\approx":" approx ","\\uparrow":" arrow.t ","\\downarrow":" arrow.b ","\\rightarrow":" arrow.r ","\\leftarrow":" arrow.l ","\\longmapsto":" mapsto.long ","\\longmapsfrom":" arrow.l.bar.long ","/":"\\/","&":"&"},ALt={"[":" bracket.l ","]":" bracket.r ","{":" brace.l ","}":" brace.r ","(":" paren.l ",")":" paren.r ","<":" angle.l ",">":" angle.r ",".":""},BLt={" bracket.l ":"["," bracket.r ":"]"," brace.l ":"{"," brace.r ":"}"," paren.l ":"("," paren.r ":")"," angle.l ":" angle.l "," angle.r ":" angle.r "},l1={"\\pm":"plus.minus","\\colon":" : ","\\sum":" sum ","\\prod":" product ","\\bigcap":" inter.big ","\\bigcup":" union.big ","\\int":" integral ","\\iint":" integral.double ","\\iiint":" integral.triple ","\\intop":" integral ","\\oint":" integral.cont ","\\oiint":" integral.surf ","\\oiiint":" integral.vol ","\\setminus":" without ","\\vdots":" without ","\\ddots":" dots.down ","\\ge":">=","\\le":"<=","\\ne":"!=","\\neq":"!=","\\lt":"<","\\gt":">","\\gets":"<-","\\to":"->","\\land":" and ","\\lor":" or ","\\lnot":" not ","\\forall":" forall ","\\exists":" exists ","\\in":" in ","\\notin":" in.not ","\\mapsto":"|->","\\implies":"==>","\\iff":"<==>","\\cdot":" dot.op ","\\ast":" * ","\\star":" star.op ","\\times":" times ","\\div":" div ","\\ltimes":" times.l ","\\rtimes":" times.r ","\\bowtie":" \u22C8 ","\\circ":" circle.stroked.small "},PPe={underarc:"underparen",underparen:"underparen",underbrace:"underbrace",underline:"underline",overarc:"overparen",overparen:"overparen",overbrace:"overbrace",overline:"overline",cancel:"cancel",displaystyle:"display",textstyle:"inline"},KPe={longrightarrow:e=>`arrow.r.long^(${Wr(e.above)})`,longleftarrow:e=>`arrow.l.long^(${Wr(e.above)})`};rKe=class{constructor(e,t,r){this.mathfield=e,this.mode=t,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=r}dispose(){this.mathfield=void 0}getState(){let e={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(e.direction=this.selection.direction),{content:this.root.toJson(),selection:e,mode:this.mode}}setState(e,t){var r;let n=this.silenceNotifications;this.silenceNotifications=(r=t?.silenceNotifications)!=null?r:!0;let a={};if(t?.type==="undo"&&(a={inputType:"historyUndo"}),t?.type==="redo"&&(a={inputType:"historyRedo"}),this.contentWillChange(a)){let o=this.silenceNotifications;this.silenceNotifications=!0,this.mode=e.mode,this.root=_g(e.content),this.selection=e.selection,this.silenceNotifications=o,this.contentDidChange(a),this.selectionDidChange()}this.silenceNotifications=n}get atoms(){return this.root.children}get selection(){return this._selection}set selection(e){this.setSelection(e)}setSelection(e,t){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0,content:!0},()=>{var r,n,a,o;let s=this.normalizeSelection(e,t);if(s===void 0)throw new TypeError("Invalid selection");if(s.ranges.length===1&&s.ranges[0][0]===s.ranges[0][1]){let h=s.ranges[0][0];if(!this.mathfield.dirty&&!((r=this.at(h))!=null&&r.parentPrompt)&&this.mathfield.hasEditablePrompts){if((n=this.at(h-1))!=null&&n.parentPrompt){this._anchor=this.normalizeOffset(h-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((a=this.at(h+1))!=null&&a.parentPrompt){this._anchor=this.normalizeOffset(h+1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}this._anchor=0,this._position=0,this._selection={ranges:[[0,0]]};return}this._anchor=h,this._position=h,this._selection=s;return}let l=Ia(s);l=nKe(this,l),s.direction==="backward"?[this._position,this._anchor]=l:[this._anchor,this._position]=l;let c=l[0]+1;for(;c<=this.lastOffset&&((o=this.at(c))==null?void 0:o.type)==="first"&&c=0&&this._position<=this.lastOffset})}setPositionHandlingPlaceholder(e){var t;let r=this.at(e);r?.type==="placeholder"?this.setSelection(e-1,e):((t=r?.rightSibling)==null?void 0:t.type)==="placeholder"?this.setSelection(e,e+1):this.position=e,r instanceof Kn&&r.isSuggestion&&(r.isSuggestion=!1),this.mathfield.stopCoalescingUndo()}get position(){return this._position}set position(e){this.setSelection(e,e)}get anchor(){return this._anchor}get selectionIsCollapsed(){return this._anchor===this._position}get selectionIsPlaceholder(){return Math.abs(this._anchor-this._position)===1?this.at(Math.max(this._anchor,this._position)).type==="placeholder":!1}collapseSelection(e="forward"){return this._anchor===this._position?!1:(e==="backward"?this.position=Math.min(this._anchor,this._position):this.position=Math.max(this._anchor,this._position),!0)}get lastOffset(){return this.atoms.length-1}at(e){return this.atoms[e]}offsetOf(e){return this.atoms.indexOf(e)}getSiblingsRange(e){let t=this.at(e),{parent:r}=t;if(!r)return[0,this.lastOffset];let n=t.parent.branch(t.parentBranch);return[this.offsetOf(n[0]),this.offsetOf(n[n.length-1])]}getBranchRange(e,t){let r=this.at(e).branch(t);return[this.offsetOf(r[0]),this.offsetOf(r[r.length-1])]}getCellRange(e){var t,r;let n=this.getParentCell(e),a=this.at(e);if(a){for(;a&&((t=a.parent)==null?void 0:t.type)!=="array";)a=a.parent;if(((r=a?.parent)==null?void 0:r.type)==="array")return[this.offsetOf(a.firstSibling),this.offsetOf(a.lastSibling)]}}getAtoms(e,t,r){let n=r??{};if(JF(e)){if(n=t??{},e.ranges.length>1)return e.ranges.reduce((d,h)=>[...d,...this.getAtoms(h,n)],[]);e=e.ranges[0]}let a,o;if(Og(e)){if(a=e,!Og(t))return[];o=t}else[a,o]=e,Object.keys(n).length===0&&(n=t??{});if(!Number.isFinite(a))return[];n.includeChildren===void 0&&(n.includeChildren=!1),a<0&&(a=this.lastOffset-a+1),o<0&&(o=this.lastOffset+o+1);let s=Math.min(a,o),l=Math.max(a,o),c=s===0?0:s+1,u=l;if(!n.includeChildren&&c===1&&u===this.lastOffset)return[this.root];let g=[];for(let d=c;d<=u;d++){let h=this.atoms[d];XLt(this,h,c,u,n.includeFirstAtoms)&&g.push(h)}return n.includeChildren||(g=g.filter(d=>{let h=!1,{parent:m}=d;for(;m&&!h;)h=XLt(this,m,c,u,n.includeFirstAtoms),m=m.parent;return!h})),g}findAtom(e,t=0,r="forward"){let n,a=this.lastOffset;if(r==="forward"){for(let o=t;o<=a;o++)if(n=this.atoms[o],e(n))return n;for(let o=0;o=0;o--)if(n=this.atoms[o],e(n))return n;for(let o=a;o>t;o--)if(n=this.atoms[o],e(n))return n}extractAtoms(e){var t;let r=this.getAtoms(e);r.length===1&&!r[0].parent&&r[0].isRoot&&(r[0]instanceof Ui?r=r[0].rows.flatMap(n=>n.flatMap(a=>a)):r=[...(t=r[0].body)!=null?t:r[0].children],r=r.filter(n=>n.type!=="first"));for(let n of r)n.parent.removeChild(n);return r}deleteAtoms(e){if(e!=null||(e=[0,-1]),this.extractAtoms(e),e[0]===0&&e[1]===-1&&this.root instanceof Ui)for(;this.root.rowCount>1;)this.root.removeRow(1);this.position=e[0]}atomToString(e,t){let r=t??"latex";if(r.startsWith("latex"))return be.serialize([e],{expandMacro:r==="latex-expanded",skipStyles:r==="latex-unstyled",skipPlaceholders:r==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode});if(r==="math-ml")return sr(e);if(r==="spoken")return np(e);if(r==="spoken-text"){let n=globalThis.MathfieldElement.textToSpeechMarkup;globalThis.MathfieldElement.textToSpeechMarkup="";let a=np(e);return globalThis.MathfieldElement.textToSpeechMarkup=n,a}if(r==="spoken-ssml"||r==="spoken-ssml-with-highlighting"){let n=globalThis.MathfieldElement.textToSpeechMarkup;globalThis.MathfieldElement.textToSpeechMarkup="ssml";let a=np(e);return globalThis.MathfieldElement.textToSpeechMarkup=n,a}return r==="typst"?Wr(e):r==="plain-text"?Jr(e,{plain:!0}):r==="ascii-math"?Jr(e):(console.error(`MathLive 0.108.3: Unexpected format "${r}`),"")}getValue(e,t,r){if(e===void 0)return this.atomToString(this.root,"latex");if(typeof e=="string"&&e!=="math-json")return this.atomToString(this.root,e);let n,a;if(Og(e)&&Og(t)?(n=[this.normalizeRange([e,t])],a=r):oV(e)?(n=[this.normalizeRange(e)],a=t):JF(e)?(n=e.ranges,a=t):(n=[this.normalizeRange([0,-1])],a=e),a!=null||(a="latex"),a==="math-json"){if(!globalThis.MathfieldElement.computeEngine)return window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`The CortexJS Compute Engine library is not available. Load the library, for example with: import "https://esm.run/@cortex-js/compute-engine"`),'["Error", "compute-engine-not-available"]';let o=this.getValue({ranges:n},"latex-unstyled");try{let s=globalThis.MathfieldElement.computeEngine.parse(o);return JSON.stringify(s.json)}catch(s){return JSON.stringify(["Error",`'${s.toString()}'`])}}if(a.startsWith("latex")){let o={expandMacro:a==="latex-expanded",skipStyles:a==="latex-unstyled",skipPlaceholders:a==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode};return ki(n.map(s=>be.serialize(this.getAtoms(s),o)))}return n.map(o=>this.getAtoms(o).map(s=>this.atomToString(s,a)).join("")).join("")}extendSelectionTo(e,t){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{let r=this.normalizeRange([e,t]),[n,a]=r,o=new Set(["genfrac","subsup","accent","box","overlap","overunder"]),{parent:s}=this.at(a);if(s!=null&&s.type&&o.has(s.type))for(;s!=null&&s.type&&o.has(s.type)&&$F(this,s,[n,a]);)a=this.offsetOf(s),s=s.parent;for(s=this.at(n).parent;s!=null&&s.type&&o.has(s.type)&&$F(this,s,[n,a]);)n=this.offsetOf(s.leftSibling),s=s.parent;if(s=this.at(a).parent,s!=null&&s.type&&o.has(s.type))for(;s!=null&&s.type&&o.has(s.type)&&$F(this,s,[n,a]);)a=this.offsetOf(s),a>=0,s=s.parent;this._position=this.normalizeOffset(t),this._selection={ranges:[[n,a]],direction:"none"}})}announce(e,t,r=[]){var n,a;((a=(n=this.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("announce",{detail:{command:e,previousPosition:t,atoms:r},cancelable:!0,bubbles:!0,composed:!0})))==null||a)&&tKe(this.mathfield,e,t,r)}deferNotifications(e,t){let r=this._selection,n=this._anchor,a=this._position,o=this.silenceNotifications;this.silenceNotifications=!0;let s=this.root.changeCounter;t(),this.silenceNotifications=o;let l=n!==this._anchor||a!==this._position||IMe(this._selection,r)==="different";e.selection&&l&&this.selectionDidChange();let c=this.root.changeCounter!==s;return e.content&&c&&this.contentDidChange({inputType:e.type}),c||l}normalizeOffset(e){return e>0?e=Math.min(e,this.lastOffset):e<0&&(e=this.lastOffset+e+1),e}normalizeRange(e){let[t,r]=e;return t=this.normalizeOffset(t),r=this.normalizeOffset(r),tthis.normalizeRange(a)),direction:(r=e.direction)!=null?r:"none"});return n}get parentEnvironment(){let e=this.at(this.position).parent;if(e){for(;e.parent&&e.type!=="array";)e=e.parent;if(e.type==="array")return e}}get parentCell(){return this.getParentCell(this.position)}getParentCell(e){var t,r;let n=this.at(e);if(n){for(;n&&((t=n.parent)==null?void 0:t.type)!=="array";)n=n.parent;if(((r=n?.parent)==null?void 0:r.type)==="array")return n.parentBranch}}contentWillChange(e={}){if(this.silenceNotifications||!this.mathfield)return!0;let t=this.silenceNotifications;this.silenceNotifications=!0;let r=this.mathfield.onContentWillChange(e);return this.silenceNotifications=t,r}contentDidChange(e){var t;if(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Yg(this.mathfield)),this.silenceNotifications||!((t=this.mathfield)!=null&&t.host))return;let r=this.silenceNotifications;this.silenceNotifications=!0,setTimeout(()=>{var n;!this.mathfield||!Pd(this.mathfield)||!this.mathfield.host||this.mathfield.host.dispatchEvent(new InputEvent("input",zt(Xt({},e),{data:e.data?e.data:(n=e.inputType)!=null?n:"",bubbles:!0,composed:!0})))},0),this.silenceNotifications=r}selectionDidChange(){if(!this.mathfield)return;let e=this.silenceNotifications;e||(this.silenceNotifications=!0,this.mathfield.onSelectionDidChange()),this.silenceNotifications=e}};Ua({deleteAll:e=>e.contentWillChange({inputType:"deleteContent"})&&tu(e,[0,-1],"deleteContent"),deleteForward:e=>k8e(e),deleteBackward:e=>V8e(e),deleteNextWord:e=>e.contentWillChange({inputType:"deleteWordForward"})&&Tg(e,"forward",{delete:!0}),deletePreviousWord:e=>e.contentWillChange({inputType:"deleteWordBackward"})&&Tg(e,"backward",{delete:!0}),deleteToGroupStart:e=>{if(!e.contentWillChange({inputType:"deleteSoftLineBackward"}))return!1;let t=e.offsetOf(e.at(e.position).firstSibling);return t===e.position?(e.announce("plonk"),!1):(e.deferNotifications({content:!0,selection:!0,type:"deleteSoftLineBackward"},()=>e.deleteAtoms([e.anchor,t])),e.position=t,!0)},deleteToGroupEnd:e=>{if(!e.contentWillChange({inputType:"deleteSoftLineForward"}))return!1;let t=e.offsetOf(e.at(e.position).lastSibling);return t===e.position?(e.announce("plonk"),!1):(e.deferNotifications({content:!0,selection:!0,type:"deleteSoftLineForward"},()=>e.deleteAtoms([e.anchor,t])),!0)},deleteToMathFieldStart:e=>e.contentWillChange({inputType:"deleteHardLineBackward"})&&tu(e,[e.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:e=>e.contentWillChange({inputType:"deleteHardLineForward"})&&tu(e,[e.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});oKe=``,sKe=``,lKe=class g1{constructor(t,r){this.focusBlurInProgress=!1,this.programmaticFocusInProgress=!1,this.connectedToVirtualKeyboard=!1;var n,a,o;this.options=Xt(zt(Xt({},MF()),{macros:f_(),registers:$Lt()}),hV(r)),this.eventController=new AbortController;let s=this.eventController.signal;r.eventSink&&(this.host=r.eventSink),this.element=t,t.mathfield=this,this.blurred=!0,this.keystrokeCaptionVisible=!1,this.suggestionIndex=0,this.inlineShortcutBuffer=[],this.inlineShortcutBufferFlushTimer=0,this.scientificNotationTimer=0,this.defaultStyle={},this.styleBias="left",this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline"),this.dirty=!1;let l=(a=(n=r.value)!=null?n:this.element.textContent)!=null?a:"";l=l.trim();let c=nLt(this.options),u=xo(l,{context:this.context}),g;u.length===1&&u[0].isRoot?g=u[0]:g=new be({type:"root",mode:c,body:u}),this.model=new rKe(this,c,g),this.undoManager=new F8e(this.model);let d=[];if(d.push(""),d.push('"),d.push(""),d.push(""),d.push(""),this.element.innerHTML=globalThis.MathfieldElement.createHTML(d.join("")),!this.element.children){console.error("%cMathLive 0.108.3: Something went wrong and the mathfield could not be created.%c\nIf you are using Vue, this may be because you are using the runtime-only build of Vue. Make sure to include `runtimeCompiler: true` in your Vue configuration. There may a warning from Vue in the log above.","color:red;font-family:system-ui;font-size:1.2rem;font-weight:bold","color:inherit;font-family:system-ui;font-size:inherit;font-weight:inherit");return}this._l10Subscription=Fi.subscribe(()=>Fi.update(this.element)),Fi.update(this.element),this.container=this.element.querySelector("[part=container]"),this.field=this.container.querySelector("[part=content]"),this.field.addEventListener("click",b=>b.stopImmediatePropagation(),{capture:!1,signal:s}),this.field.addEventListener("wheel",this,{passive:!1,signal:s});let h=this.element;if("PointerEvent"in window?h.addEventListener("pointerdown",this,{signal:s}):h.addEventListener("mousedown",this,{signal:s}),this.host){let b=f=>{f.target===this.host&&this.handleEvent(f)};"PointerEvent"in window?this.host.addEventListener("pointerdown",b,{signal:s}):this.host.addEventListener("mousedown",b,{signal:s})}let m=this.element.querySelector("[part=virtual-keyboard-toggle]");m?.addEventListener("pointerdown",b=>{b.currentTarget===m&&(window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(Yg(this))),b.preventDefault(),b.stopPropagation())},{signal:s}),this.field.addEventListener("contextmenu",this,{signal:s});let p=this.element.querySelector("[part=menu-toggle]");p?.addEventListener("pointerdown",b=>{if(b.currentTarget!==p)return;let f=this.menu;if(f.state!=="closed")return;this.element.classList.add("tracking");let v=p.getBoundingClientRect();f.modifiers=qm(b),f.show({target:p,location:{x:v.left,y:v.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),b.preventDefault(),b.stopPropagation()},{signal:s}),(this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(p.style.display="none"),this.ariaLiveText=(o=this.element.querySelector("[role=status]"))!=null?o:void 0,this.keyboardDelegate=V6e(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:s}),document.addEventListener("scroll",this,{signal:s}),this.resizeObserver=new ResizeObserver(b=>{if(this.resizeObserverStarted){this.resizeObserverStarted=!1;return}this.updateToggleLayout(),Hr(this)}),this.resizeObserverStarted=!0,this.resizeObserver.observe(this.field),this.resizeObserver.observe(this.container),setTimeout(()=>this.updateToggleLayout(),100),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:s}),G1&&!Fi.locale.startsWith(G1.locale)&&VDe(Fi.locale),Cs!=="ready"&&document.fonts.ready.then(()=>uV(this)),t.querySelector("[part=container]").style.removeProperty("visibility"),this.undoManager.startRecording(),this.undoManager.snapshot("set-value"),Hr(this)}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Yg(this)),wF(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,a_())}showMenu(t){var r,n;let a=(n=(r=t?.location)!=null?r:_F(this.field))!=null?n:void 0,o=t?.modifiers,s=this.element.querySelector("[part=container]");return this._menu.show({target:s,location:a,modifiers:o})}get colorMap(){return t=>{var r,n,a;return(a=(n=(r=this.options).colorMap)==null?void 0:n.call(r,t))!=null?a:vV(t)}}get backgroundColorMap(){return t=>{var r,n,a,o,s,l;return(l=(s=(n=(r=this.options).backgroundColorMap)==null?void 0:n.call(r,t))!=null?s:(o=(a=this.options).colorMap)==null?void 0:o.call(a,t))!=null?l:m_(t)}}get smartFence(){var t;return(t=this.options.smartFence)!=null?t:!1}get readOnly(){var t;return(t=this.options.readOnly)!=null?t:!1}get disabled(){var t,r;return(r=(t=this.host)==null?void 0:t.disabled)!=null?r:!1}get contentEditable(){return this.host?this.host.getAttribute("contenteditable")!=="false":!1}get userSelect(){if(!this.host)return"";let t=getComputedStyle(this.host);return t.getPropertyValue("user-select")||t.getPropertyValue("-webkit-user-select")}get hasEditableContent(){return this.disabled||!this.contentEditable?!1:!this.readOnly||this.hasEditablePrompts}get hasEditablePrompts(){return this.readOnly&&!this.disabled&&this.contentEditable&&this.model.findAtom(t=>t.type==="prompt"&&!t.locked)!==void 0}get isSelectionEditable(){if(this.disabled||!this.contentEditable)return!1;if(!this.readOnly)return!0;let t=this.model.at(this.model.anchor),r=this.model.at(this.model.position),n=be.commonAncestor(t,r);return!!(n?.type==="prompt"||n!=null&&n.parentPrompt)}get letterShapeStyle(){var t;return(t=this.options.letterShapeStyle)!=null?t:"tex"}get minFontScale(){return this.options.minFontScale}get maxMatrixCols(){return this.options.maxMatrixCols}queryStyle(t){let r=P9(this,t);"verbatimColor"in r&&delete r.verbatimColor,"verbatimBackgroundColor"in r&&delete r.verbatimBackgroundColor;let n=Object.keys(r).length;if(n===0)return"all";if(n>1){for(let u of Object.keys(r)){let g=this.queryStyle({[u]:r[u]});if(g==="none")return"none";if(g==="some")return"some"}return"all"}let a=Object.keys(r)[0],o=r[a];if(this.model.selectionIsCollapsed)return ep(this)[a]===o?"all":"none";let s=this.model.getAtoms(this.model.selection,{includeChildren:!0}),l=s.length;if(l===0)return"none";let c=0;for(let u of s){if(u.type==="first"){l-=1;continue}u.style[a]===o&&(c+=1)}return c===0?"none":c===l?"all":"some"}get keybindings(){var t,r;if(this._keybindings)return this._keybindings;let[n,a]=U6e(this.options.keybindings,(t=y1())!=null?t:kDe());return((r=y1())==null?void 0:r.score)>0&&(this._keybindings=n,a.length>0&&console.error("MathLive 0.108.3: Invalid keybindings for current keyboard layout",a)),n}get menu(){var t;return(t=this._menu)!=null||(this._menu=new yLt(jPe(this),{host:this.host})),this._menu}set menuItems(t){this._menu?this._menu.menuItems=t:this._menu=new yLt(t,{host:this.host})}setOptions(t){var r;this.options=Xt(Xt({},this.options),hV(t)),this._keybindings=void 0,this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline");let n=this.options.defaultMode;n==="inline-math"&&(n="math"),((r=this.model.root.firstChild)==null?void 0:r.mode)!==n&&(this.model.root.firstChild.mode=n),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");let a=be.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in t||this.model.getValue()!==a)&&aUt(this),("value"in t||"registers"in t||"colorMap"in t||"backgroundColorMap"in t||"letterShapeStyle"in t||"minFontScale"in t||"maxMatrixCols"in t||"readOnly"in t||"contentPlaceholder"in t||"placeholderSymbol"in t)&&Hr(this)}getOptions(t){return Pm(this.options,t)}getOption(t){return Pm(this.options,t)}async handleEvent(t){var r,n,a;if(Pd(this)){if(V_(t)){if(!x_(t.origin,(r=this.options.originValidator)!=null?r:"none"))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");let{action:o}=t.data;if(o==="execute-command"){let s=W1(t.data.command);if(!s||h0(s)==="virtual-keyboard")return;this.executeCommand(s)}else o==="update-state"||(o==="focus"?this.focus({preventScroll:!0}):o==="blur"&&this.blur());return}switch(t.type){case"focus":this.programmaticFocusInProgress||this.onFocus({suppressEvents:!0});break;case"blur":this.onBlur({dispatchEvents:!1});break;case"mousedown":this.userSelect!=="none"&&!((n=t.target)!=null&&n.closest("[part=virtual-keyboard-toggle],[part=menu-toggle]"))&&gLt(this,t);break;case"pointerdown":!t.defaultPrevented&&this.userSelect!=="none"&&!((a=t.target)!=null&&a.closest("[part=virtual-keyboard-toggle],[part=menu-toggle]"))&&(gLt(this,t),t.shiftKey===!1&&await CLt(t,this.container,this.menu)&&pV.stop());break;case"contextmenu":this.userSelect!=="none"&&t.shiftKey===!1&&await CLt(t,this.container,this.menu)&&pV.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&wF(this),this.hasFocus()&&this.options.mathVirtualKeyboardPolicy!=="manual"&&(this.keyboardDelegate.blur(),this.keyboardDelegate.focus());break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Pd(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Pd(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(t);break;case"message":break;default:console.warn("Unexpected event type",t.type)}}}updateToggleLayout(){if(!this.element||!this.host)return;let t=this.element.querySelector(".ML__toggles");if(!t)return;let r=this.host.offsetHeight,n=t.classList.contains("ML__toggles--vertical");r>=100&&!n?t.classList.add("ML__toggles--vertical"):r<100&&n&&t.classList.remove("ML__toggles--vertical")}dispose(){if(!Pd(this))return;Fi.unsubscribe(this._l10Subscription),this.keyboardDelegate.dispose(),this.keyboardDelegate=void 0,this.eventController.abort(),this.eventController=void 0,this.resizeObserver.disconnect(),window.mathVirtualKeyboard.removeEventListener("virtual-keyboard-toggle",this),this.disconnectFromVirtualKeyboard(),this.model.dispose();let t=this.element;delete t.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.ariaLiveText=void 0,_8e(),T6e(),mPe()}flushInlineShortcutBuffer(t){if(t!=null||(t={defer:!1}),!t.defer){this.inlineShortcutBuffer.length=0,clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=0;return}this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout(()=>this.flushInlineShortcutBuffer(),this.options.inlineShortcutTimeout))}executeCommand(t){return h0(t)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(t),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(Yg(this))),!1):M6e(this,t)}get errors(){return s6e(this.model.getValue(),{context:this.context})}getValue(t,r,n){return this.model.getValue(t,r,n)}setValue(t,r){var n;r=r??{mode:"math"},r.insertionMode===void 0&&(r.insertionMode="replaceAll"),(r.format===void 0||r.format==="auto")&&(r.format="latex"),(r.mode===void 0||r.mode==="auto")&&(r.mode=(n=GMe(this.model,this.model.position))!=null?n:"math");let a=this.undoManager.canUndo();yr.insert(this.model,t,r)&&(Hr(this),a||this.undoManager.reset(),this.undoManager.snapshot("set-value"))}get expression(){let t=globalThis.MathfieldElement.computeEngine;return t?t.box(t.parse(this.model.getValue("latex-unstyled"))):(console.error("MathLive 0.108.3: no compute engine available. Make sure the Compute Engine library is loaded."),null)}scrollIntoView(){var t;if(!this.element)return;if(this.host){if(this.options.onScrollIntoView)this.options.onScrollIntoView(this);else if(this.host.scrollIntoView({block:"nearest",inline:"nearest"}),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.container===window.document.body){let a=window.mathVirtualKeyboard.boundingRect,o=this.host.getBoundingClientRect();o.bottom>a.top&&((t=window.document.scrollingElement)==null||t.scrollBy(0,o.bottom-a.top+8))}}this.dirty&&ip(this,{interactive:!0});let r=this.field.getBoundingClientRect(),n=null;if(this.model.selectionIsCollapsed)n=_F(this.field);else{let a=swt(this);if(a.length>0){let o=-1/0,s=1/0,l=-1/0;for(let u of a)u.right>o&&(o=u.right),u.topl&&(l=u.bottom);let c=l-s;n={x:o+r.left-this.field.scrollLeft,y:s+r.top-this.field.scrollTop,height:c}}}if(this.host&&n){let a=this.host.getBoundingClientRect(),o=20,s=n.y,l=n.y+n.height,c=this.host.scrollTop;sa.bottom-o&&(c=l-a.bottom+this.host.scrollTop+o),c!==this.host.scrollTop&&this.host.scroll({top:c,behavior:"auto"})}if(n){let a=n.x-window.scrollX,o=this.field.scrollLeft;ar.right&&(o=a-r.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:o})}}insert(t,r){if(typeof t!="string"||t.length===0&&(r?.insertionMode==="insertBefore"||r?.insertionMode==="insertAfter")||t.length===0&&this.model.selectionIsCollapsed)return!1;if(this.flushInlineShortcutBuffer(),r=r??{mode:"math"},r.focus&&this.focus(),r.feedback&&(globalThis.MathfieldElement.keypressVibration&&YLt()&&navigator.vibrate(oUt),globalThis.MathfieldElement.playSound("keypress")),t==="\\\\")gUt(this.model);else if(t==="&")hUt(this.model);else if(this.model.selectionIsCollapsed){let n=Xt({},ep(this));!/^[a-zA-Z0-9]$/.test(t)&&this.styleBias!=="none"&&(n.variant="normal",n.variantStyle=void 0),yr.insert(this.model,t,Xt({style:n},r))}else yr.insert(this.model,t,r);return this.snapshot(`insert-${this.model.at(this.model.position).type}`),Hr(this),r.scrollIntoView&&this.scrollIntoView(),!0}switchMode(t,r="",n=""){if(this.model.mode===t||!this.hasEditableContent||!this.contentEditable||this.disabled)return;let{model:a}=this,o=a.mode;if(a.mode=t,this.host&&!this.host.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0}))){a.mode=o;return}a.mode=o,a.deferNotifications({content:!!n||!!r,selection:!0,type:"insertText"},()=>{let s=a.at(a.position),l=(d,h)=>{if(!d)return;let m=a.mode==="math"?xo(R1(d,{format:"ascii-math"})[1],{context:this.context}):[...d].map(p=>new y0(p,p,{}));if(h.select){let p=s.parent.addChildrenAfter(m,s);a.setSelection(a.offsetOf(m[0].leftSibling),a.offsetOf(p))}else a.position=a.offsetOf(s.parent.addChildrenAfter(m,s));g=!0},c=(d,h)=>{let m=new h1(d);s.parent.addChildAfter(m,s),h.select?a.setSelection(a.offsetOf(m.firstChild),a.offsetOf(m.lastChild)):a.position=a.offsetOf(m.lastChild),g=!0},u=()=>{let d=t==="latex"?"latex":t==="math"?"plain-text":"ascii-math",h=Ia(a.selection),m=this.model.getValue(h,d),p=this.model.extractAtoms(h);return p.length===1&&p[0].type==="placeholder"&&(m=n),s=a.at(h[0]),m},g=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),Dg(this,"accept"),a.selectionIsCollapsed)l(r,{select:!1}),a.mode=t,t==="latex"?c(n,{select:!1}):l(n,{select:!1});else{let d=u();a.mode=t,t==="latex"?c(d,{select:!0}):l(d,{select:!0})}return Hr(this),this.undoManager.snapshot(t==="latex"?"insert-latex":"insert"),g}),a.mode=t,window.mathVirtualKeyboard.update(Yg(this))}hasFocus(){return!this.blurred}focus(t){var r;this.disabled||this.focusBlurInProgress||(this.hasFocus()||(this.programmaticFocusInProgress=!0,this.onFocus(),this.model.announce("line")),(r=t?.preventScroll)!=null&&r||this.scrollIntoView())}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus()}applyStyle(t,r={}){var n;let a,o="set",s=!1;oV(r)?a=r:(r.operation==="toggle"&&(o="toggle"),a=r.range,s=(n=r.silenceNotifications)!=null?n:!1),a&&(a=this.model.normalizeRange(a)),a&&a[0]===a[1]&&(a=void 0);let l=P9(this,t);if(a===void 0&&this.model.selectionIsCollapsed){if(o==="set"){let g=Xt({},this.defaultStyle);"color"in l&&delete g.verbatimColor,"backgroundColor"in l&&delete g.verbatimBackgroundColor,this.defaultStyle=Xt(Xt({},g),l),this.styleBias="none";return}let c=ep(this),u=Xt({},this.defaultStyle);for(let g of Object.keys(l))c[g]===l[g]?(g==="color"&&delete u.verbatimColor,g==="backgroundColor"&&delete u.verbatimBackgroundColor,delete u[g]):u[g]=l[g];this.defaultStyle=u,this.styleBias="none";return}this.model.deferNotifications({content:!s,type:"insertText"},()=>{if(a===void 0)for(let c of this.model.selection.ranges)z9(this.model,c,l,{operation:o});else z9(this.model,a,l,{operation:o})}),Hr(this)}toggleContextMenu(){var t;let r=this.menu;if(!r.visible)return!1;if(r.state==="open")return r.hide(),!0;let n=(t=cwt(this,this.model.position))==null?void 0:t.bounds;if(!n)return!1;let a={x:n.right,y:n.bottom};return r.show({target:this.element.querySelector("[part=container]"),location:a,onDismiss:()=>{var o;return(o=this.element)==null?void 0:o.focus()}}),!0}getPrompt(t){return this.model.findAtom(n=>n.type==="prompt"&&n.placeholderId===t)}getPromptValue(t,r){let n=this.getPrompt(t);if(!n)return"";let a=this.model.offsetOf(n.firstChild),o=this.model.offsetOf(n.lastChild);return this.model.getValue(a,o,r)}getPrompts(t){return this.model.atoms.filter(r=>r.type!=="prompt"?!1:t?!(t.id&&r.placeholderId!==t.id||t.locked&&r.locked!==t.locked||t.correctness==="undefined"&&r.correctness||t.correctness&&r.correctness!==t.correctness):!0).map(r=>r.placeholderId)}setPromptValue(t,r,n){if(r!==void 0){let a=this.getPrompt(t);if(!a){console.error(`MathLive 0.108.3: unknown prompt ${t}`);return}let o=this.model.getBranchRange(this.model.offsetOf(a),"body");this.model.setSelection(o),this.insert(r,zt(Xt({},n),{insertionMode:"replaceSelection"}))}n!=null&&n.silenceNotifications&&(this.valueOnFocus=this.getValue()),Hr(this)}setPromptState(t,r,n){let a=this.getPrompt(t);if(!a){console.error(`MathLive 0.108.3: unknown prompt ${t}`);return}r==="undefined"?a.correctness=void 0:typeof r=="string"&&(a.correctness=r),typeof n=="boolean"&&(a.locked=n,a.captureSelection=n),Hr(this)}getPromptState(t){let r=this.getPrompt(t);return r?[r.correctness,r.locked]:(console.error(`MathLive 0.108.3: unknown prompt ${t}`),[void 0,!0])}getPromptRange(t){let r=this.getPrompt(t);return r?this.model.getBranchRange(this.model.offsetOf(r),"body"):(console.error(`MathLive 0.108.3: unknown prompt ${t}`),[0,0])}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Yg(this))}snapshot(t){var r;this.undoManager.snapshot(t)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Yg(this)),(r=this.host)==null||r.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"snapshot"}})))}stopCoalescingUndo(){this.undoManager.stopCoalescing(this.model.selection)}stopRecording(){this.undoManager.stopRecording()}startRecording(){this.undoManager.startRecording()}undo(){var t;this.undoManager.undo()&&((t=this.host)==null||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}redo(){var t;this.undoManager.redo()&&((t=this.host)==null||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"redo"}})))}resetUndo(){var t;(t=this.undoManager)==null||t.reset()}onSelectionDidChange(){var t,r;let n=this.model;if(n.mathfield.hasFocus()&&this.keyboardDelegate.setValue(n.getValue(n.selection,"latex-expanded")),n.selectionIsCollapsed){let a=X_(n),o=n.position,s=n.at(o),l=(t=s.mode)!=null?t:nLt(this.options);if(a&&(on.offsetOf(a.lastChild)+1))Dg(this,"accept",{mode:l}),n.position=n.offsetOf(s);else{let c=n.at(o+1);c?.type==="first"&&c.mode==="latex"?n.position=o+1:a&&c?.mode!=="latex"?n.position=o-1:this.switchMode(l)}}(r=this.host)==null||r.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Yg(this)),wF(this)}onContentWillChange(t){var r,n,a;return(a=(n=this.host)==null?void 0:n.dispatchEvent(new InputEvent("beforeinput",zt(Xt({},t),{data:t.data?t.data:(r=t.inputType)!=null?r:"",cancelable:!0,bubbles:!0,composed:!0}))))!=null?a:!0}onFocus(t){if(this.disabled||this.focusBlurInProgress||!this.blurred)return;let r=g1._globallyFocusedMathfield;r&&r!==this&&!r.disabled&&r.hasFocus()&&r.onBlur({dispatchEvents:!0}),this.focusBlurInProgress=!0,this.blurred=!1,g1._globallyFocusedMathfield=this,this.stopCoalescingUndo(),this.valueOnFocus=this.model.getValue(),this.hasEditablePrompts&&!this.model.at(this.model.anchor).parentPrompt&&this.executeCommand("moveToNextPlaceholder"),ip(this,{interactive:!0}),setTimeout(()=>{var n,a;if(Pd(this))if((n=t?.suppressEvents)!=null&&n){let o=new AbortController,s=o.signal,l=c=>{c.preventDefault(),c.stopPropagation()};for(let c of["focus","focusin"])(a=this.host)==null||a.addEventListener(c,l,{capture:!0,signal:s});this.focusBlurInProgress=!1,this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),setTimeout(()=>o.abort(),0)}else this.focusBlurInProgress=!1,this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),setTimeout(()=>{this.programmaticFocusInProgress=!1},0)},60)}onBlur(t){var r,n,a,o;if(!(this.focusBlurInProgress||this.blurred)&&(this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,g1._globallyFocusedMathfield===this&&(g1._globallyFocusedMathfield=void 0),this.ariaLiveText&&(this.ariaLiveText.textContent=""),v0(this),this.model.getValue()!==this.valueOnFocus&&((r=this.host)==null||r.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),((n=t?.dispatchEvents)==null||n)&&((a=this.host)==null||a.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(o=this.host)==null||o.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0}))),Hr(this),this.focusBlurInProgress=!1,a_(),L_.restoreFocusWhenDocumentFocused)){let s=new AbortController,l=s.signal;window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{Pd(this)&&this.focus({preventScroll:!0})},{once:!0,signal:l})},{once:!0,signal:l}),document.addEventListener("focusin",()=>s.abort(),{once:!0}),document.addEventListener("click",()=>s.abort(),{once:!0})}}onInput(t){e_(this,t)}onKeystroke(t){return yUt(this,t)}onCompositionStart(t){tu(this.model,Ia(this.model.selection),"insertText");let r=_F(this.field);r&&requestAnimationFrame(()=>{ip(this),this.keyboardDelegate.moveTo(r.x,r.y-r.height)})}onCompositionUpdate(t){y8e(this.model,t),Hr(this)}onCompositionEnd(t){C8e(this.model),e_(this,t,{simulateKeystroke:!0})}onCut(t){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),t.clipboardData?yr.onCopy(this,t):yr.copyToClipboard(this,"latex"),tu(this.model,Ia(this.model.selection),"deleteByCut"),this.snapshot("cut"),Hr(this))}onCopy(t){t.clipboardData?yr.onCopy(this,t):yr.copyToClipboard(this,"latex")}onPaste(t){let r=this.isSelectionEditable;return r&&(r=yr.onPaste(this.model.at(this.model.position).mode,this,t.clipboardData)),r||this.model.announce("plonk"),t.preventDefault(),t.stopPropagation(),r}onGeometryChange(){var t;(t=this._menu)==null||t.hide(),FV(this),wF(this)}onWheel(t){let r=5*t.deltaX;if(!Number.isFinite(r)||r===0)return;let n=this.field;r<0&&n.scrollLeft===0||r>0&&n.offsetWidth+n.scrollLeft>=n.scrollWidth||(n.scrollBy({top:0,left:r}),t.preventDefault(),t.stopPropagation())}getHTMLElement(t){let r=t;for(;!r.id&&r.hasChildren;)r=t.children[0];return this.field.querySelector(`[data-atom-id="${r.id}"]`)}get context(){var t,r;return{registers:(t=this.options.registers)!=null?t:{},smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,maxMatrixCols:this.maxMatrixCols,placeholderSymbol:(r=this.options.placeholderSymbol)!=null?r:"\u25A2",colorMap:n=>this.colorMap(n),backgroundColorMap:n=>this.backgroundColorMap(n),getMacro:n=>I_(n,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};Ua({speak:(e,t,r)=>cKe(e,t,r)},{target:"mathfield"});sl()||console.error('MathLive 0.108.3: this version of the MathLive library is for use in the browser. A subset of the API is available on the server side in the "mathlive-ssr" library. If using server side rendering (with React for example) you may want to do a dynamic import of the MathLive library inside a `useEffect()` call.');br=new WeakMap,gKe=.5,Ug={letterShapeStyle:"mf.letterShapeStyle = ...",horizontalSpacingScale:'Removed. Use `"thinmuskip"`, `"medmuskip"`, and `"thickmuskip"` registers ',macros:"mf.macros = ...",registers:"mf.registers = ...",backgroundColorMap:"mf.backgroundColorMap = ...",colorMap:"mf.colorMap = ...",enablePopover:"mf.popoverPolicy = ...",mathModeSpace:"mf.mathModeSpace = ...",placeholderSymbol:"mf.placeholderSymbol = ...",readOnly:"mf.readOnly = ...",removeExtraneousParentheses:"mf.removeExtraneousParentheses = ...",scriptDepth:"mf.scriptDepth = ...",smartFence:"mf.smartFence = ...",smartMode:"mf.smartMode = ...",smartSuperscript:"mf.smartSuperscript = ...",inlineShortcutTimeout:"mf.inlineShortcutTimeout = ...",inlineShortcuts:"mf.inlineShortcuts = ...",keybindings:"mf.keybindings = ...",virtualKeyboardMode:"mf.mathVirtualKeyboardPolicy = ...",customVirtualKeyboardLayers:"mathVirtualKeyboard.layers = ...",customVirtualKeyboards:"mathVirtualKeyboard.layouts = ...",keypressSound:"mathVirtualKeyboard.keypressSound = ...",keypressVibration:"mathVirtualKeyboard.keypressVibration = ...",plonkSound:"mathVirtualKeyboard.plonkSound = ...",virtualKeyboardContainer:"mathVirtualKeyboard.container = ...",virtualKeyboardLayout:"mathVirtualKeyboard.alphabeticLayout = ...",virtualKeyboardTheme:"No longer supported",virtualKeyboardToggleGlyph:"No longer supported",virtualKeyboardToolbar:"mathVirtualKeyboard.editToolbar = ...",virtualKeyboards:"Use `mathVirtualKeyboard.layouts`",speechEngine:"`MathfieldElement.speechEngine`",speechEngineRate:"`MathfieldElement.speechEngineRate`",speechEngineVoice:"`MathfieldElement.speechEngineVoice`",textToSpeechMarkup:"`MathfieldElement.textToSpeechMarkup`",textToSpeechRules:"`MathfieldElement.textToSpeechRules`",textToSpeechRulesOptions:"`MathfieldElement.textToSpeechRulesOptions`",readAloudHook:"`MathfieldElement.readAloudHook`",speakHook:"`MathfieldElement.speakHook`",computeEngine:"`MathfieldElement.computeEngine`",fontsDirectory:"`MathfieldElement.fontsDirectory`",soundsDirectory:"`MathfieldElement.soundsDirectory`",createHTML:"`MathfieldElement.createHTML`",onExport:"`mf.onExport`",onInlineShortcut:"`mf.onInlineShortcut`",onScrollIntoView:"`mf.onScrollIntoView`",locale:"MathfieldElement.locale = ...",strings:"MathfieldElement.strings = ...",decimalSeparator:"MathfieldElement.decimalSeparator = ...",fractionNavigationOrder:"MathfieldElement.fractionNavigationOrder = ..."},yn=class Eg extends HTMLElement{constructor(t){if(super(),this._observer=null,t){let r=[];for(let n of Object.keys(t))if(Ug[n])if(Ug[n].startsWith("mf."))if(Ug[n].startsWith(`mf.${n}`))r.push(`Option \`${n}\` cannot be used as a constructor option. Use ${Ug[n]}`);else{let a=Ug[n].match(/([a-zA-Z]+) =/);r.push(`Option \`${n}\` has been renamed \`${a[1]}\``)}else r.push(`Option \`${n}\` cannot be used as a constructor option. Use ${Ug[n]}`);if(r.length>0){console.group("%cMathLive 0.108.3: %cInvalid Options","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn("Some of the options passed to `new MathfieldElement(...)` are invalid. \n See mathfield/changelog/ for details.");for(let n of r)console.warn(n);console.groupEnd()}}if(i0()&&(this._internals=this.attachInternals(),this._internals.role="math",this._internals.ariaLabel="math input field",this._internals.ariaMultiLine="false"),this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot&&"adoptedStyleSheets"in this.shadowRoot){this.shadowRoot.adoptedStyleSheets=[Mm("core"),Mm("mathfield"),Mm("mathfield-element"),Mm("ui"),Mm("menu")],this.shadowRoot.appendChild(document.createElement("span"));let r=document.createElement("slot");r.style.display="none",this.shadowRoot.appendChild(r)}else this.shadowRoot.innerHTML="';t&&this._setOptions(t)}static get formAssociated(){return i0()}static get optionsAttributes(){return{"default-mode":"string","letter-shape-style":"string","min-font-scale":"number","max-matrix-cols":"number","popover-policy":"string","math-mode-space":"string","read-only":"boolean","remove-extraneous-parentheses":"on/off","smart-fence":"on/off","smart-mode":"on/off","smart-superscript":"on/off","inline-shortcut-timeout":"string","script-depth":"string",placeholder:"string","virtual-keyboard-target-origin":"string","math-virtual-keyboard-policy":"string"}}static get observedAttributes(){return[...Object.keys(this.optionsAttributes),"contenteditable","disabled","readonly","read-only"]}static get fontsDirectory(){return this._fontsDirectory}static set fontsDirectory(t){t!==this._fontsDirectory&&(this._fontsDirectory=t,_6e())}get fontsDirectory(){throw new Error("Use MathfieldElement.fontsDirectory instead")}set fontsDirectory(t){throw new Error("Use MathfieldElement.fontsDirectory instead")}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(t){this._soundsDirectory=t,this.audioBuffers={}}get soundsDirectory(){throw new Error("Use MathfieldElement.soundsDirectory instead")}set soundsDirectory(t){throw new Error("Use MathfieldElement.soundsDirectory instead")}static get keypressSound(){return this._keypressSound}static set keypressSound(t){var r,n,a;this.audioBuffers={},t===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof t=="string"?this._keypressSound={spacebar:t,return:t,delete:t,default:t}:typeof t=="object"&&"default"in t&&(this._keypressSound={spacebar:(r=t.spacebar)!=null?r:t.default,return:(n=t.return)!=null?n:t.default,delete:(a=t.delete)!=null?a:t.default,default:t.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(t){this.audioBuffers={},this._plonkSound=t}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(t){this._speechEngine=t}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(t){this._speechEngineRate=t}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(t){this._speechEngineVoice=t}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(t){this._textToSpeechMarkup=t}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(t){this._textToSpeechRules=t}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(t){this._textToSpeechRulesOptions=t}static get locale(){return Fi.locale}static set locale(t){t==="auto"&&(t=navigator.language.slice(0,5)),Fi.locale=t}get locale(){throw new Error("Use MathfieldElement.locale instead")}set locale(t){throw new Error("Use MathfieldElement.locale instead")}static get strings(){return Fi.strings}static set strings(t){Fi.merge(t)}get strings(){throw new Error("Use MathfieldElement.strings instead")}set strings(t){throw new Error("Use MathfieldElement.strings instead")}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(t){this._decimalSeparator=t,this._computeEngine&&(this._computeEngine.decimalSeparator=this.decimalSeparator===","?"{,}":".")}get decimalSeparator(){throw new Error("Use MathfieldElement.decimalSeparator instead")}set decimalSeparator(t){throw new Error("Use MathfieldElement.decimalSeparator instead")}static set scientificNotationTemplate(t){this._scientificNotationTemplate=t}static get scientificNotationTemplate(){return this._scientificNotationTemplate}static get fractionNavigationOrder(){return jF.fractionNavigationOrder}static set fractionNavigationOrder(t){if(t!=="numerator-denominator"&&t!=="denominator-numerator")throw new Error("Invalid value");jF.fractionNavigationOrder!==t&&(jF.fractionNavigationOrder=t,eLt())}static get computeEngine(){var t,r;if(this._computeEngine===void 0){let n=(t=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;if(!n)return null;this._computeEngine=new n,this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.decimalSeparator="{,}")}return(r=this._computeEngine)!=null?r:null}static set computeEngine(t){this._computeEngine=t}get computeEngine(){throw new Error("Use MathfieldElement.computeEngine instead")}set computeEngine(t){throw new Error("Use MathfieldElement.computeEngine instead")}static get isFunction(){return typeof this._isFunction!="function"?()=>!1:this._isFunction}static set isFunction(t){this._isFunction=t,eLt()}static async loadSound(t){delete this.audioBuffers[t];let r="";switch(t){case"keypress":r=this._keypressSound.default;break;case"return":r=this._keypressSound.return;break;case"spacebar":r=this._keypressSound.spacebar;break;case"delete":r=this._keypressSound.delete;break;case"plonk":r=this.plonkSound;break}if(typeof r!="string")return;r=r.trim();let n=this.soundsDirectory;if(!(n==null||n==="null"||r==="none"||r==="null"))try{let a=await(await fetch(await rUt(`${n}/${r}`))).arrayBuffer(),o=await this.audioContext.decodeAudioData(a);this.audioBuffers[t]=o}catch{}}static async playSound(t){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&await this.audioContext.resume(),this.audioBuffers[t]||await this.loadSound(t),!this.audioBuffers[t])return;let r=this.audioContext.createBufferSource();r.buffer=this.audioBuffers[t];let n=this.audioContext.createGain();n.gain.value=gKe,r.connect(n).connect(this.audioContext.destination),r.start()}showMenu(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.showMenu(t))!=null?n:!1}get mathVirtualKeyboard(){throw new Error("The `mathVirtualKeyboard` property is not available on the MathfieldElement. Use `window.mathVirtualKeyboard` instead.")}onPointerDown(){window.addEventListener("pointerup",t=>{let r=this._mathfield;if(r&&t.target===this&&!r.disabled){this.dispatchEvent(new MouseEvent("click",{altKey:t.altKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,metaKey:t.metaKey,movementX:t.movementX,movementY:t.movementY,relatedTarget:t.relatedTarget,screenX:t.screenX,screenY:t.screenY,shiftKey:t.shiftKey}));let n=this.getOffsetFromPoint(t.clientX,t.clientY);n>=0&&Eg.openUrl(kMe(r,n)),t.pointerType==="touch"&&this.selectionIsCollapsed&&(this.position=n)}},{once:!0})}getPromptValue(t,r){var n,a;return(a=(n=this._mathfield)==null?void 0:n.getPromptValue(t,r))!=null?a:""}setPromptValue(t,r,n){var a;(a=this._mathfield)==null||a.setPromptValue(t,r,n)}getPromptRange(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.getPromptRange(t))!=null?n:null}getPrompts(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.getPrompts(t))!=null?n:[]}get hasEditableContent(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.hasEditableContent)!=null?r:!1}get form(){var t;return(t=this._internals)==null?void 0:t.form}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}get type(){return this.localName}get mode(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.model.mode)!=null?r:this.defaultMode==="text"?"text":"math"}set mode(t){var r;(r=this._mathfield)==null||r.switchMode(t)}get expression(){if(this._mathfield)return window[Symbol.for("io.cortexjs.compute-engine")]?this._mathfield.expression:(console.error(`MathLive 0.108.3: The CortexJS Compute Engine library is not available. Load the library, for example with: import "https://esm.run/@cortex-js/compute-engine"`),null)}set expression(t){var r,n;if(!this._mathfield)return;let a=(n=(r=Eg.computeEngine)==null?void 0:r.box(t).latex)!=null?n:null;a!==null&&this._mathfield.setValue(a),window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`MathLive 0.108.3: The Compute Engine library is not available. Load the library, for example with: import "https://esm.run/@cortex-js/compute-engine"`)}get errors(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.errors)!=null?r:[]}_getOptions(t){return this._mathfield?Pm(this._mathfield.options,t):br.has(this)?Xt({},Pm(Xt(Xt({},MF()),hV(br.get(this).options)),t)):null}getOptions(t){return console.warn("%cMathLive 0.108.3: %cDeprecated Usage%c\n `mf.getOptions()` is deprecated. Read the property directly on the mathfield instead.\n See mathfield/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._mathfield?Pm(this._mathfield.options,t):br.has(this)?Pm(Xt(Xt({},MF()),hV(br.get(this).options)),t):null}reflectAttributes(){let t=MF(),r=this._getOptions();Object.keys(Eg.optionsAttributes).forEach(n=>{let a=n==="placeholder"?"contentPlaceholder":Kd(n);Eg.optionsAttributes[n]==="on/off"?t[a]!==r[a]?this.setAttribute(n,r[a]?"on":"off"):this.removeAttribute(n):t[a]!==r[a]&&(Eg.optionsAttributes[n]==="boolean"?r[a]?this.setAttribute(n,""):this.removeAttribute(n):(typeof r[a]=="string"||typeof r[a]=="number")&&this.setAttribute(n,r[a].toString()))})}getOption(t){return console.warn("%cMathLive 0.108.3: %cDeprecated Usage%c\n `mf.getOption()` is deprecated. Read the property directly on the mathfield instead.\n See mathfield/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._getOptions([t])[t]}_getOption(t){return this._getOptions([t])[t]}_setOptions(t){if(this._mathfield)this._mathfield.setOptions(t);else if(br.has(this)){let r=Xt(Xt({},br.get(this).options),t);br.set(this,zt(Xt({},br.get(this)),{selection:{ranges:r.readOnly?[[0,0]]:[[0,-1]]},options:r}))}else br.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:t,menuItems:void 0});this.reflectAttributes()}setOptions(t){console.group("%cMathLive 0.108.3: %cDeprecated Usage","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn(" `mf.setOptions()` is deprecated. Set the property directly on the mathfield instead.\n See mathfield/changelog/ for details.");for(let r of Object.keys(t))Ug[r]&&console.warn(`\`mf.setOptions({${r}:...})\` -> ${Ug[r]}`);console.groupEnd(),this._setOptions(t)}executeCommand(...t){var r,n;let a;if(t.length===1?a=t[0]:a=[t[0],...t.slice(1)],a)return(n=(r=this._mathfield)==null?void 0:r.executeCommand(a))!=null?n:!1;throw new Error("Invalid selector")}getValue(t,r,n){var a,o;if(this._mathfield)return this._mathfield.model.getValue(t,r,n);if(br.has(this)){let s,l,c;if(JF(t)?([s,l]=t.ranges[0],c=r):oV(t)?([s,l]=t,c=r):Og(t)&&Og(r)?(s=t,l=r,c=n):(s=0,l=-1,c=t),(c===void 0||c==="latex")&&s===0&&l===-1)return(o=(a=br.get(this).value)!=null?a:this.textContent)!=null?o:""}return""}setValue(t,r){if(this._mathfield&&t!==void 0){if(this._mathfield.model.getValue()===t)return;r!=null||(r={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(t,r);return}if(br.has(this)){let a=br.get(this).options;br.set(this,{value:t,selection:{ranges:[[-1,-1]],direction:"forward"},options:a,menuItems:void 0});return}let n=NF(this);br.set(this,{value:t,selection:{ranges:[[-1,-1]],direction:"forward"},options:n,menuItems:void 0})}hasFocus(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.hasFocus())!=null?r:!1}focus(){var t;this.disabled||(t=this._mathfield)==null||t.focus()}blur(){var t;(t=this._mathfield)==null||t.blur()}select(){var t;(t=this._mathfield)==null||t.select()}insert(t,r){var n,a;return(a=(n=this._mathfield)==null?void 0:n.insert(t,r))!=null?a:!1}applyStyle(t,r){var n;return(n=this._mathfield)==null?void 0:n.applyStyle(t,r)}queryStyle(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.queryStyle(t))!=null?n:"none"}getOffsetFromPoint(t,r,n){return this._mathfield?KF(this._mathfield,t,r,n):-1}getElementInfo(t){return cwt(this._mathfield,t)}resetUndo(){var t;(t=this._mathfield)==null||t.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(t){var r,n,a,o,s;if(Ml.state!=="closed"||((n=(r=this._mathfield)==null?void 0:r.menu)==null?void 0:n.state)!=="closed"||(t.type==="pointerdown"&&this.onPointerDown(),t.type==="focus")||t.type!=="blur")return;let l=ULt();l&&(a=window?.mathVirtualKeyboard)!=null&&a.visible||((o=Ml.scrim)==null?void 0:o.state)!=="closed"||l&&pDe()||(s=this._mathfield)==null||s.onBlur({dispatchEvents:!1})}connectedCallback(){var t,r,n,a;let o=this.shadowRoot,s=o.host,l=window.getComputedStyle(this).userSelect!=="none";if(l)s.addEventListener("pointerdown",this,!0);else{let g=o.querySelector("span");g.style.pointerEvents="none"}s.addEventListener("focus",this,!0),s.addEventListener("blur",this,!0),this._observer=new MutationObserver(()=>{var g;this.value=(g=this.textContent)!=null?g:""}),this._observer.observe(this,{childList:!0,characterData:!0,subtree:!0}),i0()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),l&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");let c=o.querySelector("slot:not([name])");if(c)try{this._style=c.assignedElements().filter(g=>g.tagName.toLowerCase()==="style").map(g=>g.textContent).join("")}catch(g){console.error(g)}if(this._style){let g=document.createElement("style");g.textContent=this._style,o.appendChild(g)}let u="";if(this.hasAttribute("value")?u=this.getAttribute("value"):u=(t=c?.assignedNodes().map(g=>g.nodeType===3?g.textContent:"").join("").trim())!=null?t:"",this._mathfield=new lKe(o.querySelector(":host > span"),zt(Xt({},(n=(r=br.get(this))==null?void 0:r.options)!=null?n:NF(this)),{eventSink:this,value:u})),!br.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(let g of Object.keys(Eg.optionsAttributes))this.upgradeProperty(Kd(g))}if(!((a=this._mathfield)!=null&&a.model)){this._mathfield=null;return}if(br.has(this)){let g=this._mathfield,d=br.get(this),h=d.menuItems;g.model.deferNotifications({content:!1,selection:!1},()=>{let m=d.value;m!==void 0&&g.setValue(m),g.model.selection=d.selection,br.delete(this)}),h&&(this.menuItems=h)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),E1()}disconnectedCallback(){var t,r,n;if(this.shadowRoot.host.removeEventListener("pointerdown",this,!0),!this._mathfield)return;(t=this._observer)==null||t.disconnect(),this._observer=null,window.queueMicrotask(()=>this.dispatchEvent(new Event("unmount",{cancelable:!1,bubbles:!0,composed:!0})));let a=Pm(this._mathfield.options,Object.keys(Eg.optionsAttributes).map(o=>Kd(o)));br.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,menuItems:(n=(r=this._mathfield.menu)==null?void 0:r.menuItems)!=null?n:void 0,options:a}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(t){if(this.hasOwnProperty(t)){let r=this[t];delete this[t],(t==="readonly"||t==="read-only")&&(t="readOnly"),this[t]=r}}attributeChangedCallback(t,r,n){if(r===n)return;let a=n!==null;switch(t){case"contenteditable":Hr(this._mathfield);break;case"placeholder":n===!1&&(n=""),this.placeholder=n;break;case"disabled":this.disabled=a;break;case"read-only":case"readonly":this.readOnly=a;break;default:}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(t){let r=!!t;r?(this.setAttribute("readonly",""),i0()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(i0()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:r})}get disabled(){return this.hasAttribute("disabled")}set disabled(t){var r;let n=!!t;n?this.setAttribute("disabled",""):this.removeAttribute("disabled"),i0()?this._internals.ariaDisabled=n?"true":"false":this.setAttribute("aria-disabled",n?"true":"false"),n&&(r=this._mathfield)!=null&&r.hasFocus&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(t){this.setValue(t)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(t){this._setOptions({defaultMode:t})}get macros(){if(!this._mathfield)throw new Error("Mathfield not mounted");return this._getOption("macros")}set macros(t){this._setOptions({macros:t})}get registers(){if(!this._mathfield)throw new Error("Mathfield not mounted");let t=this;return new Proxy({},{get:(r,n)=>{if(typeof n=="string")return t._getOption("registers")[n]},set(r,n,a){return typeof n!="string"?!1:(t._setOptions({registers:zt(Xt({},t._getOption("registers")),{[n]:a})}),!0)},ownKeys:()=>Reflect.ownKeys(t._getOption("registers")),getOwnPropertyDescriptor:(r,n)=>{let a=t._getOption("registers")[n];if(a!==void 0)return{configurable:!0,enumerable:!0,value:a,writable:!0}}})}set registers(t){this._setOptions({registers:t})}get colorMap(){return this._getOption("colorMap")}set colorMap(t){this._setOptions({colorMap:t})}get backgroundColorMap(){return this._getOption("backgroundColorMap")}set backgroundColorMap(t){this._setOptions({backgroundColorMap:t})}get letterShapeStyle(){return this._getOption("letterShapeStyle")}set letterShapeStyle(t){this._setOptions({letterShapeStyle:t})}get minFontScale(){return this._getOption("minFontScale")}set minFontScale(t){this._setOptions({minFontScale:t})}get maxMatrixCols(){return this._getOption("maxMatrixCols")}set maxMatrixCols(t){this._setOptions({maxMatrixCols:t})}get smartMode(){return this._getOption("smartMode")}set smartMode(t){this._setOptions({smartMode:t})}get smartFence(){return this._getOption("smartFence")}set smartFence(t){this._setOptions({smartFence:t})}get smartSuperscript(){return this._getOption("smartSuperscript")}set smartSuperscript(t){this._setOptions({smartSuperscript:t})}get scriptDepth(){return this._getOption("scriptDepth")}set scriptDepth(t){this._setOptions({scriptDepth:t})}get removeExtraneousParentheses(){return this._getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(t){this._setOptions({removeExtraneousParentheses:t})}get mathModeSpace(){return this._getOption("mathModeSpace")}set mathModeSpace(t){this._setOptions({mathModeSpace:t})}get placeholderSymbol(){return this._getOption("placeholderSymbol")}set placeholderSymbol(t){this._setOptions({placeholderSymbol:t})}get placeholder(){return this._getOption("contentPlaceholder")}set placeholder(t){this._setOptions({contentPlaceholder:t})}get popoverPolicy(){return this._getOption("popoverPolicy")}set popoverPolicy(t){this._setOptions({popoverPolicy:t})}get environmentPopoverPolicy(){return this._getOption("environmentPopoverPolicy")}set environmentPopoverPolicy(t){this._setOptions({environmentPopoverPolicy:t})}get menuItems(){var t;if(!this._mathfield)throw new Error("Mathfield not mounted");return(t=this._mathfield.menu._menuItems.map(r=>r.menuItem))!=null?t:[]}set menuItems(t){var r;if(!this._mathfield)throw new Error("Mathfield not mounted");if(this._mathfield){let n=(r=this._mathfield.element)==null?void 0:r.querySelector("[part=menu-toggle]");n&&(n.style.display=t.length===0?"none":""),this._mathfield.menu.menuItems=t}}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(t){this._setOptions({mathVirtualKeyboardPolicy:t})}get inlineShortcuts(){if(!this._mathfield)throw new Error("Mathfield not mounted");return this._getOption("inlineShortcuts")}set inlineShortcuts(t){if(!this._mathfield)throw new Error("Mathfield not mounted");this._setOptions({inlineShortcuts:t})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(t){this._setOptions({inlineShortcutTimeout:t})}get keybindings(){if(!this._mathfield)throw new Error("Mathfield not mounted");return this._getOption("keybindings")}set keybindings(t){if(!this._mathfield)throw new Error("Mathfield not mounted");this._setOptions({keybindings:t})}get onInsertStyle(){let t=this._getOption("onInsertStyle");return t===void 0?W_:t}set onInsertStyle(t){this._setOptions({onInsertStyle:t})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(t){this._setOptions({onInlineShortcut:t})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(t){this._setOptions({onScrollIntoView:t})}get onExport(){return this._getOption("onExport")}set onExport(t){this._setOptions({onExport:t})}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOptions({readOnly:t})}get isSelectionEditable(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.isSelectionEditable)!=null?r:!1}setPromptState(t,r,n){var a;(a=this._mathfield)==null||a.setPromptState(t,r,n)}getPromptState(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.getPromptState(t))!=null?n:[void 0,!0]}get selection(){return this._mathfield?this._mathfield.model.selection:br.has(this)?br.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(t){if(typeof t=="number"&&(t={ranges:[[t,t]]}),this._mathfield){this._mathfield.model.selection=t,Hr(this._mathfield);return}if(br.has(this)){br.set(this,zt(Xt({},br.get(this)),{selection:t}));return}br.set(this,{value:void 0,selection:t,options:NF(this),menuItems:void 0})}get selectionIsCollapsed(){let t=this.selection;return t.ranges.length===1&&t.ranges[0][0]===t.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:br.has(this)?br.get(this).selection.ranges[0][0]:0}set position(t){if(this._mathfield&&(this._mathfield.model.position=t,Hr(this._mathfield)),br.has(this)){br.set(this,zt(Xt({},br.get(this)),{selection:{ranges:[[t,t]]}}));return}br.set(this,{value:void 0,selection:{ranges:[[t,t]]},options:NF(this),menuItems:void 0})}get lastOffset(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.model.lastOffset)!=null?r:-1}};yn.version="0.108.3",yn.openUrl=e=>{if(!e)return;let t=new URL(e);if(!["http:","https:","file:"].includes(t.protocol.toLowerCase())){yn.playSound("plonk");return}window.open(t,"_blank")},yn._fontsDirectory="./fonts/",yn._soundsDirectory="./sounds",yn.keypressVibration=!0,yn._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},yn._plonkSound="plonk.wav",yn.audioBuffers={},yn.createHTML=e=>e,yn._speechEngineRate="100%",yn._speechEngineVoice="Joanna",yn._textToSpeechMarkup="",yn._textToSpeechRules="mathlive",yn._textToSpeechRulesOptions={},yn.speakHook=dKe,yn.readAloudHook=uKe,yn.restoreFocusWhenDocumentFocused=!0,yn._decimalSeparator=".",yn._scientificNotationTemplate="#1\\times10^{#2}",yn._isFunction=e=>{var t,r;let n=globalThis.MathfieldElement.computeEngine;return(r=(t=n?.parse(e).domain)==null?void 0:t.isFunction)!=null?r:!1};sp=yn;L_=sp;if(sl()&&!((WLt=window.customElements)!=null&&WLt.get("math-field"))){(hKe=window[FLt=Symbol.for("io.cortexjs.mathlive")])!=null||(window[FLt]={});let e=window[Symbol.for("io.cortexjs.mathlive")];e.version="0.108.3",globalThis.MathfieldElement=sp,(VLt=window.customElements)==null||VLt.define("math-field",sp)}IKe={skipTags:["math-field","noscript","style","textarea","pre","code","annotation","annotation-xml"],processScriptType:"math/tex",processMathJSONScriptType:"math/json",ignoreClass:"^(tex2jax_ignore|ML__latex)$",processClass:"tex2jax_process",renderAccessibleContent:"mathml",asciiMath:{delimiters:{inline:[["`","`"]]}},TeX:{processEnvironments:!0,delimiters:{inline:[["\\(","\\)"]],display:[["$$","$$"],["\\[","\\]"]]}}};Ua({switchKeyboardLayer:GKe,toggleVirtualKeyboard:yKe,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});kLt=!1,SLt=null;JUt=class extends HTMLElement{constructor(){if(super(),this._hasRendered=!1,this._shadowRoot=this.attachShadow({mode:"open"}),"adoptedStyleSheets"in this._shadowRoot)this._shadowRoot.adoptedStyleSheets=[Mm("core")];else{let e=document.createElement("style");e.textContent=Qg("core"),this._shadowRoot.appendChild(e)}this._contentSlot=document.createElement("div"),this._contentSlot.style.display="none",this._contentSlot.setAttribute("part","content"),this._renderContainer=document.createElement("div"),this._renderContainer.setAttribute("part","render"),this._renderContainer.setAttribute("aria-hidden","true"),this._errorFallback=document.createElement("div"),this._errorFallback.style.display="none",this._errorFallback.setAttribute("part","error"),this._shadowRoot.appendChild(this._contentSlot),this._shadowRoot.appendChild(this._renderContainer),this._shadowRoot.appendChild(this._errorFallback),this.addEventListener("keydown",this._handleKeydown.bind(this))}static get observedAttributes(){return["mode","format","macros","letter-shape-style","min-font-scale","max-matrix-cols"]}connectedCallback(){CKe(),"IntersectionObserver"in window&&!this._hasRendered?(this._observer=new IntersectionObserver(e=>{var t;e[0].isIntersecting&&!this._hasRendered&&(this.render(),(t=this._observer)==null||t.disconnect())},{rootMargin:"50px"}),this._observer.observe(this)):this.render()}disconnectedCallback(){var e;(e=this._observer)==null||e.disconnect()}attributeChangedCallback(e,t,r){t!==r&&this._hasRendered&&this.render()}_handleKeydown(e){if(this.getAttribute("tabindex")!==null&&(e.key===" "||e.key==="Enter")){e.preventDefault();let t=this.getAttribute("aria-label");if(t&&"speechSynthesis"in window){let r=new SpeechSynthesisUtterance(t);speechSynthesis.speak(r)}}}get mode(){let e=this.getAttribute("mode");return e==="textstyle"||e==="displaystyle"?e:this.getDefaultMathstyle()}set mode(e){this.setAttribute("mode",e)}get format(){let e=this.getAttribute("format");return e==="latex"||e==="ascii-math"||e==="math-json"?e:"latex"}set format(e){this.setAttribute("format",e)}get letterShapeStyle(){let e=this.getAttribute("letter-shape-style");if(e==="auto"||e==="tex"||e==="iso"||e==="french"||e==="upright")return e}set letterShapeStyle(e){e===void 0?this.removeAttribute("letter-shape-style"):this.setAttribute("letter-shape-style",e)}get macros(){var e;return(e=this.getAttribute("macros"))!=null?e:void 0}set macros(e){e===void 0?this.removeAttribute("macros"):this.setAttribute("macros",e)}get minFontScale(){let e=this.getAttribute("min-font-scale");return e?parseFloat(e):void 0}set minFontScale(e){e===void 0?this.removeAttribute("min-font-scale"):this.setAttribute("min-font-scale",String(e))}get maxMatrixCols(){let e=this.getAttribute("max-matrix-cols");return e?parseInt(e,10):void 0}set maxMatrixCols(e){e===void 0?this.removeAttribute("max-matrix-cols"):this.setAttribute("max-matrix-cols",String(e))}render(){var e,t,r;try{let n=(t=(e=this.textContent)==null?void 0:e.trim())!=null?t:"";if(!n){this._renderContainer.innerHTML="",this._errorFallback.style.display="none",this._renderContainer.style.display="none",this._removeMathML();return}this._contentSlot.textContent=n;let a,o=this.format;if(o==="ascii-math")a=SPe(n);else if(o==="math-json"){let c=JSON.parse(n);a=LUt(c)}else a=n;let s={defaultMode:this.mode==="displaystyle"?"math":"inline-math"};if(this.letterShapeStyle&&(s.letterShapeStyle=this.letterShapeStyle),this.macros)try{s.macros=JSON.parse(this.macros)}catch(c){console.warn("Invalid macros JSON:",c)}this.minFontScale!==void 0&&(s.minFontScale=this.minFontScale),this.maxMatrixCols!==void 0&&(s.maxMatrixCols=this.maxMatrixCols);let l=Nr(a,s);this._renderContainer.innerHTML=l,this._renderContainer.style.display=this.getDefaultDisplay(),this._errorFallback.style.display="none",this._updateAccessibility(a),this._hasRendered=!0,this.dispatchEvent(new CustomEvent("render",{bubbles:!0,composed:!0,detail:{format:o,content:a}}))}catch(n){console.error("MathLive static element render error:",n),this._renderContainer.style.display="none",this._errorFallback.textContent=(r=this.textContent)!=null?r:"",this._errorFallback.style.display="block",this._removeMathML(),this.dispatchEvent(new CustomEvent("render-error",{bubbles:!0,composed:!0,detail:{error:n,content:this.textContent}}))}}_updateAccessibility(e){if(!this.hasAttribute("aria-label"))try{let t=SUt(e);this.setAttribute("aria-label",t)}catch(t){console.warn("Could not generate speakable text:",t)}this.hasAttribute("role")||this.setAttribute("role","img"),this._addMathML(e)}_addMathML(e){try{let t=kUt(e);this._mathMLContainer||(this._mathMLContainer=document.createElement("div"),this._mathMLContainer.style.position="absolute",this._mathMLContainer.style.width="1px",this._mathMLContainer.style.height="1px",this._mathMLContainer.style.overflow="hidden",this._mathMLContainer.style.clip="rect(0, 0, 0, 0)",this._mathMLContainer.setAttribute("aria-hidden","false"),this._shadowRoot.appendChild(this._mathMLContainer)),this._mathMLContainer.innerHTML=t}catch(t){console.warn("Could not generate MathML:",t)}}_removeMathML(){this._mathMLContainer&&(this._mathMLContainer.remove(),this._mathMLContainer=void 0)}},xKe=class extends JUt{getDefaultMathstyle(){return"textstyle"}getDefaultDisplay(){return"inline-flex"}},ZKe=class extends JUt{getDefaultMathstyle(){return"displaystyle"}getDefaultDisplay(){return"flex"}};RKe()});var NV,Kg,__=ce(()=>{NV=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Kg={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return typeof console<"u"&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var r=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-r.getTime())/864e5-3+(r.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1}});var OV,QV,j_=ce(()=>{OV={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},QV=OV});function z_(e,t){var r;return function(){var n=this,a=arguments;clearTimeout(r),r=setTimeout(function(){return e.apply(n,a)},t)}}var to,qo,TV,D_=ce(()=>{to=function(e,t){return t===void 0&&(t=2),("000"+e).slice(t*-1)},qo=function(e){return e===!0?1:0};TV=function(e){return e instanceof Array?e:[e]}});function eo(e,t,r){if(r===!0)return e.classList.add(t);e.classList.remove(t)}function Cr(e,t,r){var n=window.document.createElement(e);return t=t||"",r=r||"",n.className=t,r!==void 0&&(n.textContent=r),n}function J1(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function M_(e,t){if(t(e))return e;if(e.parentNode)return M_(e.parentNode,t)}function H1(e,t){var r=Cr("div","numInputWrapper"),n=Cr("input","numInput "+e),a=Cr("span","arrowUp"),o=Cr("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?n.type="number":(n.type="text",n.pattern="\\d*"),t!==void 0)for(var s in t)n.setAttribute(s,t[s]);return r.appendChild(n),r.appendChild(a),r.appendChild(o),r}function $o(e){try{if(typeof e.composedPath=="function"){var t=e.composedPath();return t[0]}return e.target}catch{return e.target}}var CYt=ce(()=>{});var P_,_1,xYt,lu,A0,K_=ce(()=>{D_();P_=function(){},_1=function(e,t,r){return r.months[t?"shorthand":"longhand"][e]},xYt={D:P_,F:function(e,t,r){e.setMonth(r.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,r){e.setHours(e.getHours()%12+12*qo(new RegExp(r.amPM[1],"i").test(t)))},M:function(e,t,r){e.setMonth(r.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(parseFloat(t)*1e3)},W:function(e,t,r){var n=parseInt(t),a=new Date(e.getFullYear(),0,2+(n-1)*7,0,0,0,0);return a.setDate(a.getDate()-a.getDay()+r.firstDayOfWeek),a},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:P_,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:P_,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},lu={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},A0={Z:function(e){return e.toISOString()},D:function(e,t,r){return t.weekdays.shorthand[A0.w(e,t,r)]},F:function(e,t,r){return _1(A0.n(e,t,r)-1,!1,t)},G:function(e,t,r){return to(A0.h(e,t,r))},H:function(e){return to(e.getHours())},J:function(e,t){return t.ordinal!==void 0?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[qo(e.getHours()>11)]},M:function(e,t){return _1(e.getMonth(),!0,t)},S:function(e){return to(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,r){return r.getWeek(e)},Y:function(e){return to(e.getFullYear(),4)},d:function(e){return to(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return to(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return to(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}}});function ts(e,t,r){return r===void 0&&(r=!0),r!==!1?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}function _V(e){var t=e.defaultHour,r=e.defaultMinute,n=e.defaultSeconds;if(e.minDate!==void 0){var a=e.minDate.getHours(),o=e.minDate.getMinutes(),s=e.minDate.getSeconds();t{K_();__();j_();q_=function(e){var t=e.config,r=t===void 0?Kg:t,n=e.l10n,a=n===void 0?OV:n,o=e.isMobile,s=o===void 0?!1:o;return function(l,c,u){var g=u||a;return r.formatDate!==void 0&&!s?r.formatDate(l,c,g):c.split("").map(function(d,h,m){return A0[d]&&m[h-1]!=="\\"?A0[d](l,g,r):d!=="\\"?d:""}).join("")}},JV=function(e){var t=e.config,r=t===void 0?Kg:t,n=e.l10n,a=n===void 0?OV:n;return function(o,s,l,c){if(!(o!==0&&!o)){var u=c||a,g,d=o;if(o instanceof Date)g=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)g=new Date(o);else if(typeof o=="string"){var h=s||(r||Kg).dateFormat,m=String(o).trim();if(m==="today")g=new Date,l=!0;else if(r&&r.parseDate)g=r.parseDate(o,h);else if(/Z$/.test(m)||/GMT$/.test(m))g=new Date(o);else{for(var p=void 0,b=[],f=0,v=0,y="";fMath.min(t,r)&&e{"use strict";typeof Object.assign!="function"&&(Object.assign=function(e){for(var t=[],r=1;rwKe});function LKe(e,t){var r={config:io(io({},Kg),Qn.defaultConfig),l10n:QV};r.parseDate=JV({config:r.config,l10n:r.l10n}),r._handlers=[],r.pluginElements=[],r.loadedPlugins=[],r._bind=b,r._setHoursFromDate=h,r._positionCalendar=ft,r.changeMonth=Rt,r.changeYear=ut,r.clear=$,r.close=Kt,r.onMouseOver=Ye,r._createElement=Cr,r.createDay=Z,r.destroy=st,r.isEnabled=Yt,r.jumpToDate=y,r.updateValue=q,r.open=he,r.redraw=te,r.set=ne,r.setDate=U,r.toggle=Y;function n(){r.utils={getDaysInMonth:function(z,et){return z===void 0&&(z=r.currentMonth),et===void 0&&(et=r.currentYear),z===1&&(et%4===0&&et%100!==0||et%400===0)?29:r.l10n.daysInMonth[z]}}}function a(){r.element=r.input=e,r.isOpen=!1,fe(),at(),ue(),Ht(),n(),r.isMobile||I(),v(),(r.selectedDates.length||r.config.noCalendar)&&(r.config.enableTime&&h(r.config.noCalendar?r.latestSelectedDateObj:void 0),q(!1)),l();var z=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!r.isMobile&&z&&ft(),V("onReady")}function o(){var z;return((z=r.calendarContainer)===null||z===void 0?void 0:z.getRootNode()).activeElement||document.activeElement}function s(z){return z.bind(r)}function l(){var z=r.config;z.weekNumbers===!1&&z.showMonths===1||z.noCalendar!==!0&&window.requestAnimationFrame(function(){if(r.calendarContainer!==void 0&&(r.calendarContainer.style.visibility="hidden",r.calendarContainer.style.display="block"),r.daysContainer!==void 0){var et=(r.days.offsetWidth+1)*z.showMonths;r.daysContainer.style.width=et+"px",r.calendarContainer.style.width=et+(r.weekWrapper!==void 0?r.weekWrapper.offsetWidth:0)+"px",r.calendarContainer.style.removeProperty("visibility"),r.calendarContainer.style.removeProperty("display")}})}function c(z){if(r.selectedDates.length===0){var et=r.config.minDate===void 0||ts(new Date,r.config.minDate)>=0?new Date:new Date(r.config.minDate.getTime()),It=_V(r.config);et.setHours(It.hours,It.minutes,It.seconds,et.getMilliseconds()),r.selectedDates=[et],r.latestSelectedDateObj=et}z!==void 0&&z.type!=="blur"&&yt(z);var Pt=r._input.value;d(),q(),r._input.value!==Pt&&r._debouncedChange()}function u(z,et){return z%12+12*qo(et===r.l10n.amPM[1])}function g(z){switch(z%24){case 0:case 12:return 12;default:return z%12}}function d(){if(!(r.hourElement===void 0||r.minuteElement===void 0)){var z=(parseInt(r.hourElement.value.slice(-2),10)||0)%24,et=(parseInt(r.minuteElement.value,10)||0)%60,It=r.secondElement!==void 0?(parseInt(r.secondElement.value,10)||0)%60:0;r.amPM!==void 0&&(z=u(z,r.amPM.textContent));var Pt=r.config.minTime!==void 0||r.config.minDate&&r.minDateHasTime&&r.latestSelectedDateObj&&ts(r.latestSelectedDateObj,r.config.minDate,!0)===0,ge=r.config.maxTime!==void 0||r.config.maxDate&&r.maxDateHasTime&&r.latestSelectedDateObj&&ts(r.latestSelectedDateObj,r.config.maxDate,!0)===0;if(r.config.maxTime!==void 0&&r.config.minTime!==void 0&&r.config.minTime>r.config.maxTime){var Xe=HV(r.config.minTime.getHours(),r.config.minTime.getMinutes(),r.config.minTime.getSeconds()),De=HV(r.config.maxTime.getHours(),r.config.maxTime.getMinutes(),r.config.maxTime.getSeconds()),pt=HV(z,et,It);if(pt>De&&pt=12)]),r.secondElement!==void 0&&(r.secondElement.value=to(It)))}function p(z){var et=$o(z),It=parseInt(et.value)+(z.delta||0);(It/1e3>1||z.key==="Enter"&&!/[^\d]/.test(It.toString()))&&ut(It)}function b(z,et,It,Pt){if(et instanceof Array)return et.forEach(function(ge){return b(z,ge,It,Pt)});if(z instanceof Array)return z.forEach(function(ge){return b(ge,et,It,Pt)});z.addEventListener(et,It,Pt),r._handlers.push({remove:function(){return z.removeEventListener(et,It,Pt)}})}function f(){V("onChange")}function v(){if(r.config.wrap&&["open","close","toggle","clear"].forEach(function(It){Array.prototype.forEach.call(r.element.querySelectorAll("[data-"+It+"]"),function(Pt){return b(Pt,"click",r[It])})}),r.isMobile){A();return}var z=z_(Ie,50);if(r._debouncedChange=z_(f,SKe),r.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&b(r.daysContainer,"mouseover",function(It){r.config.mode==="range"&&Ye($o(It))}),b(r._input,"keydown",se),r.calendarContainer!==void 0&&b(r.calendarContainer,"keydown",se),!r.config.inline&&!r.config.static&&b(window,"resize",z),window.ontouchstart!==void 0?b(window.document,"touchstart",Gt):b(window.document,"mousedown",Gt),b(window.document,"focus",Gt,{capture:!0}),r.config.clickOpens===!0&&(b(r._input,"focus",r.open),b(r._input,"click",r.open)),r.daysContainer!==void 0&&(b(r.monthNav,"click",Dt),b(r.monthNav,["keyup","increment"],p),b(r.daysContainer,"click",pe)),r.timeContainer!==void 0&&r.minuteElement!==void 0&&r.hourElement!==void 0){var et=function(It){return $o(It).select()};b(r.timeContainer,["increment"],c),b(r.timeContainer,"blur",c,{capture:!0}),b(r.timeContainer,"click",x),b([r.hourElement,r.minuteElement],["focus","click"],et),r.secondElement!==void 0&&b(r.secondElement,"focus",function(){return r.secondElement&&r.secondElement.select()}),r.amPM!==void 0&&b(r.amPM,"click",function(It){c(It)})}r.config.allowInput&&b(r._input,"blur",xe)}function y(z,et){var It=z!==void 0?r.parseDate(z):r.latestSelectedDateObj||(r.config.minDate&&r.config.minDate>r.now?r.config.minDate:r.config.maxDate&&r.config.maxDate1),r.calendarContainer.appendChild(z);var ge=r.config.appendTo!==void 0&&r.config.appendTo.nodeType!==void 0;if((r.config.inline||r.config.static)&&(r.calendarContainer.classList.add(r.config.inline?"inline":"static"),r.config.inline&&(!ge&&r.element.parentNode?r.element.parentNode.insertBefore(r.calendarContainer,r._input.nextSibling):r.config.appendTo!==void 0&&r.config.appendTo.appendChild(r.calendarContainer)),r.config.static)){var Xe=Cr("div","flatpickr-wrapper");r.element.parentNode&&r.element.parentNode.insertBefore(Xe,r.element),Xe.appendChild(r.element),r.altInput&&Xe.appendChild(r.altInput),Xe.appendChild(r.calendarContainer)}!r.config.static&&!r.config.inline&&(r.config.appendTo!==void 0?r.config.appendTo:window.document.body).appendChild(r.calendarContainer)}function Z(z,et,It,Pt){var ge=Yt(et,!0),Xe=Cr("span",z,et.getDate().toString());return Xe.dateObj=et,Xe.$i=Pt,Xe.setAttribute("aria-label",r.formatDate(et,r.config.ariaDateFormat)),z.indexOf("hidden")===-1&&ts(et,r.now)===0&&(r.todayDateElem=Xe,Xe.classList.add("today"),Xe.setAttribute("aria-current","date")),ge?(Xe.tabIndex=-1,lt(et)&&(Xe.classList.add("selected"),r.selectedDateElem=Xe,r.config.mode==="range"&&(eo(Xe,"startRange",r.selectedDates[0]&&ts(et,r.selectedDates[0],!0)===0),eo(Xe,"endRange",r.selectedDates[1]&&ts(et,r.selectedDates[1],!0)===0),z==="nextMonthDay"&&Xe.classList.add("inRange")))):Xe.classList.add("flatpickr-disabled"),r.config.mode==="range"&&xt(et)&&!lt(et)&&Xe.classList.add("inRange"),r.weekNumbers&&r.config.showMonths===1&&z!=="prevMonthDay"&&Pt%7===6&&r.weekNumbers.insertAdjacentHTML("beforeend",""+r.config.getWeek(et)+""),V("onDayCreate",Xe),Xe}function F(z){z.focus(),r.config.mode==="range"&&Ye(z)}function R(z){for(var et=z>0?0:r.config.showMonths-1,It=z>0?r.config.showMonths:-1,Pt=et;Pt!=It;Pt+=z)for(var ge=r.daysContainer.children[Pt],Xe=z>0?0:ge.children.length-1,De=z>0?ge.children.length:-1,pt=Xe;pt!=De;pt+=z){var At=ge.children[pt];if(At.className.indexOf("hidden")===-1&&Yt(At.dateObj))return At}}function X(z,et){for(var It=z.className.indexOf("Month")===-1?z.dateObj.getMonth():r.currentMonth,Pt=et>0?r.config.showMonths:-1,ge=et>0?1:-1,Xe=It-r.currentMonth;Xe!=Pt;Xe+=ge)for(var De=r.daysContainer.children[Xe],pt=It-r.currentMonth===Xe?z.$i+et:et<0?De.children.length-1:0,At=De.children.length,ct=pt;ct>=0&&ct0?At:-1);ct+=ge){var gt=De.children[ct];if(gt.className.indexOf("hidden")===-1&&Yt(gt.dateObj)&&Math.abs(z.$i-ct)>=Math.abs(et))return F(gt)}r.changeMonth(ge),S(R(ge),0)}function S(z,et){var It=o(),Pt=ae(It||document.body),ge=z!==void 0?z:Pt?It:r.selectedDateElem!==void 0&&ae(r.selectedDateElem)?r.selectedDateElem:r.todayDateElem!==void 0&&ae(r.todayDateElem)?r.todayDateElem:R(et>0?1:-1);ge===void 0?r._input.focus():Pt?X(ge,et):F(ge)}function w(z,et){for(var It=(new Date(z,et,1).getDay()-r.l10n.firstDayOfWeek+7)%7,Pt=r.utils.getDaysInMonth((et-1+12)%12,z),ge=r.utils.getDaysInMonth(et,z),Xe=window.document.createDocumentFragment(),De=r.config.showMonths>1,pt=De?"prevMonthDay hidden":"prevMonthDay",At=De?"nextMonthDay hidden":"nextMonthDay",ct=Pt+1-It,gt=0;ct<=Pt;ct++,gt++)Xe.appendChild(Z("flatpickr-day "+pt,new Date(z,et-1,ct),ct,gt));for(ct=1;ct<=ge;ct++,gt++)Xe.appendChild(Z("flatpickr-day",new Date(z,et,ct),ct,gt));for(var K=ge+1;K<=42-It&&(r.config.showMonths===1||gt%7!==0);K++,gt++)Xe.appendChild(Z("flatpickr-day "+At,new Date(z,et+1,K%ge),K,gt));var rt=Cr("div","dayContainer");return rt.appendChild(Xe),rt}function Q(){if(r.daysContainer!==void 0){J1(r.daysContainer),r.weekNumbers&&J1(r.weekNumbers);for(var z=document.createDocumentFragment(),et=0;et1||r.config.monthSelectorType!=="dropdown")){var z=function(Pt){return r.config.minDate!==void 0&&r.currentYear===r.config.minDate.getFullYear()&&Ptr.config.maxDate.getMonth())};r.monthsDropdownContainer.tabIndex=-1,r.monthsDropdownContainer.innerHTML="";for(var et=0;et<12;et++)if(z(et)){var It=Cr("option","flatpickr-monthDropdown-month");It.value=new Date(r.currentYear,et).getMonth().toString(),It.textContent=_1(et,r.config.shorthandCurrentMonth,r.l10n),It.tabIndex=-1,r.currentMonth===et&&(It.selected=!0),r.monthsDropdownContainer.appendChild(It)}}}function O(){var z=Cr("div","flatpickr-month"),et=window.document.createDocumentFragment(),It;r.config.showMonths>1||r.config.monthSelectorType==="static"?It=Cr("span","cur-month"):(r.monthsDropdownContainer=Cr("select","flatpickr-monthDropdown-months"),r.monthsDropdownContainer.setAttribute("aria-label",r.l10n.monthAriaLabel),b(r.monthsDropdownContainer,"change",function(De){var pt=$o(De),At=parseInt(pt.value,10);r.changeMonth(At-r.currentMonth),V("onMonthChange")}),T(),It=r.monthsDropdownContainer);var Pt=H1("cur-year",{tabindex:"-1"}),ge=Pt.getElementsByTagName("input")[0];ge.setAttribute("aria-label",r.l10n.yearAriaLabel),r.config.minDate&&ge.setAttribute("min",r.config.minDate.getFullYear().toString()),r.config.maxDate&&(ge.setAttribute("max",r.config.maxDate.getFullYear().toString()),ge.disabled=!!r.config.minDate&&r.config.minDate.getFullYear()===r.config.maxDate.getFullYear());var Xe=Cr("div","flatpickr-current-month");return Xe.appendChild(It),Xe.appendChild(Pt),et.appendChild(Xe),z.appendChild(et),{container:z,yearElement:ge,monthElement:It}}function J(){J1(r.monthNav),r.monthNav.appendChild(r.prevMonthNav),r.config.showMonths&&(r.yearElements=[],r.monthElements=[]);for(var z=r.config.showMonths;z--;){var et=O();r.yearElements.push(et.yearElement),r.monthElements.push(et.monthElement),r.monthNav.appendChild(et.container)}r.monthNav.appendChild(r.nextMonthNav)}function E(){return r.monthNav=Cr("div","flatpickr-months"),r.yearElements=[],r.monthElements=[],r.prevMonthNav=Cr("span","flatpickr-prev-month"),r.prevMonthNav.innerHTML=r.config.prevArrow,r.nextMonthNav=Cr("span","flatpickr-next-month"),r.nextMonthNav.innerHTML=r.config.nextArrow,J(),Object.defineProperty(r,"_hidePrevMonthArrow",{get:function(){return r.__hidePrevMonthArrow},set:function(z){r.__hidePrevMonthArrow!==z&&(eo(r.prevMonthNav,"flatpickr-disabled",z),r.__hidePrevMonthArrow=z)}}),Object.defineProperty(r,"_hideNextMonthArrow",{get:function(){return r.__hideNextMonthArrow},set:function(z){r.__hideNextMonthArrow!==z&&(eo(r.nextMonthNav,"flatpickr-disabled",z),r.__hideNextMonthArrow=z)}}),r.currentYearElement=r.yearElements[0],Et(),r.monthNav}function _(){r.calendarContainer.classList.add("hasTime"),r.config.noCalendar&&r.calendarContainer.classList.add("noCalendar");var z=_V(r.config);r.timeContainer=Cr("div","flatpickr-time"),r.timeContainer.tabIndex=-1;var et=Cr("span","flatpickr-time-separator",":"),It=H1("flatpickr-hour",{"aria-label":r.l10n.hourAriaLabel});r.hourElement=It.getElementsByTagName("input")[0];var Pt=H1("flatpickr-minute",{"aria-label":r.l10n.minuteAriaLabel});if(r.minuteElement=Pt.getElementsByTagName("input")[0],r.hourElement.tabIndex=r.minuteElement.tabIndex=-1,r.hourElement.value=to(r.latestSelectedDateObj?r.latestSelectedDateObj.getHours():r.config.time_24hr?z.hours:g(z.hours)),r.minuteElement.value=to(r.latestSelectedDateObj?r.latestSelectedDateObj.getMinutes():z.minutes),r.hourElement.setAttribute("step",r.config.hourIncrement.toString()),r.minuteElement.setAttribute("step",r.config.minuteIncrement.toString()),r.hourElement.setAttribute("min",r.config.time_24hr?"0":"1"),r.hourElement.setAttribute("max",r.config.time_24hr?"23":"12"),r.hourElement.setAttribute("maxlength","2"),r.minuteElement.setAttribute("min","0"),r.minuteElement.setAttribute("max","59"),r.minuteElement.setAttribute("maxlength","2"),r.timeContainer.appendChild(It),r.timeContainer.appendChild(et),r.timeContainer.appendChild(Pt),r.config.time_24hr&&r.timeContainer.classList.add("time24hr"),r.config.enableSeconds){r.timeContainer.classList.add("hasSeconds");var ge=H1("flatpickr-second");r.secondElement=ge.getElementsByTagName("input")[0],r.secondElement.value=to(r.latestSelectedDateObj?r.latestSelectedDateObj.getSeconds():z.seconds),r.secondElement.setAttribute("step",r.minuteElement.getAttribute("step")),r.secondElement.setAttribute("min","0"),r.secondElement.setAttribute("max","59"),r.secondElement.setAttribute("maxlength","2"),r.timeContainer.appendChild(Cr("span","flatpickr-time-separator",":")),r.timeContainer.appendChild(ge)}return r.config.time_24hr||(r.amPM=Cr("span","flatpickr-am-pm",r.l10n.amPM[qo((r.latestSelectedDateObj?r.hourElement.value:r.config.defaultHour)>11)]),r.amPM.title=r.l10n.toggleTitle,r.amPM.tabIndex=-1,r.timeContainer.appendChild(r.amPM)),r.timeContainer}function P(){r.weekdayContainer?J1(r.weekdayContainer):r.weekdayContainer=Cr("div","flatpickr-weekdays");for(var z=r.config.showMonths;z--;){var et=Cr("div","flatpickr-weekdaycontainer");r.weekdayContainer.appendChild(et)}return it(),r.weekdayContainer}function it(){if(r.weekdayContainer){var z=r.l10n.firstDayOfWeek,et=WYt(r.l10n.weekdays.shorthand);z>0&&z `+et.join("")+` `}}function bt(){r.calendarContainer.classList.add("hasWeeks");var z=Cr("div","flatpickr-weekwrapper");z.appendChild(Cr("span","flatpickr-weekday",r.l10n.weekAbbreviation));var et=Cr("div","flatpickr-weeks");return z.appendChild(et),{weekWrapper:z,weekNumbers:et}}function Rt(z,et){et===void 0&&(et=!0);var It=et?z:z-r.currentMonth;It<0&&r._hidePrevMonthArrow===!0||It>0&&r._hideNextMonthArrow===!0||(r.currentMonth+=It,(r.currentMonth<0||r.currentMonth>11)&&(r.currentYear+=r.currentMonth>11?1:-1,r.currentMonth=(r.currentMonth+12)%12,V("onYearChange"),T()),Q(),V("onMonthChange"),Et())}function $(z,et){if(z===void 0&&(z=!0),et===void 0&&(et=!0),r.input.value="",r.altInput!==void 0&&(r.altInput.value=""),r.mobileInput!==void 0&&(r.mobileInput.value=""),r.selectedDates=[],r.latestSelectedDateObj=void 0,et===!0&&(r.currentYear=r._initialDate.getFullYear(),r.currentMonth=r._initialDate.getMonth()),r.config.enableTime===!0){var It=_V(r.config),Pt=It.hours,ge=It.minutes,Xe=It.seconds;m(Pt,ge,Xe)}r.redraw(),z&&V("onChange")}function Kt(){r.isOpen=!1,r.isMobile||(r.calendarContainer!==void 0&&r.calendarContainer.classList.remove("open"),r._input!==void 0&&r._input.classList.remove("active")),V("onClose")}function st(){r.config!==void 0&&V("onDestroy");for(var z=r._handlers.length;z--;)r._handlers[z].remove();if(r._handlers=[],r.mobileInput)r.mobileInput.parentNode&&r.mobileInput.parentNode.removeChild(r.mobileInput),r.mobileInput=void 0;else if(r.calendarContainer&&r.calendarContainer.parentNode)if(r.config.static&&r.calendarContainer.parentNode){var et=r.calendarContainer.parentNode;if(et.lastChild&&et.removeChild(et.lastChild),et.parentNode){for(;et.firstChild;)et.parentNode.insertBefore(et.firstChild,et);et.parentNode.removeChild(et)}}else r.calendarContainer.parentNode.removeChild(r.calendarContainer);r.altInput&&(r.input.type="text",r.altInput.parentNode&&r.altInput.parentNode.removeChild(r.altInput),delete r.altInput),r.input&&(r.input.type=r.input._type,r.input.classList.remove("flatpickr-input"),r.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(It){try{delete r[It]}catch{}})}function Ft(z){return r.calendarContainer.contains(z)}function Gt(z){if(r.isOpen&&!r.config.inline){var et=$o(z),It=Ft(et),Pt=et===r.input||et===r.altInput||r.element.contains(et)||z.path&&z.path.indexOf&&(~z.path.indexOf(r.input)||~z.path.indexOf(r.altInput)),ge=!Pt&&!It&&!Ft(z.relatedTarget),Xe=!r.config.ignoredFocusElements.some(function(De){return De.contains(et)});ge&&Xe&&(r.config.allowInput&&r.setDate(r._input.value,!1,r.config.altInput?r.config.altFormat:r.config.dateFormat),r.timeContainer!==void 0&&r.minuteElement!==void 0&&r.hourElement!==void 0&&r.input.value!==""&&r.input.value!==void 0&&c(),r.close(),r.config&&r.config.mode==="range"&&r.selectedDates.length===1&&r.clear(!1))}}function ut(z){if(!(!z||r.config.minDate&&zr.config.maxDate.getFullYear())){var et=z,It=r.currentYear!==et;r.currentYear=et||r.currentYear,r.config.maxDate&&r.currentYear===r.config.maxDate.getFullYear()?r.currentMonth=Math.min(r.config.maxDate.getMonth(),r.currentMonth):r.config.minDate&&r.currentYear===r.config.minDate.getFullYear()&&(r.currentMonth=Math.max(r.config.minDate.getMonth(),r.currentMonth)),It&&(r.redraw(),V("onYearChange"),T())}}function Yt(z,et){var It;et===void 0&&(et=!0);var Pt=r.parseDate(z,void 0,et);if(r.config.minDate&&Pt&&ts(Pt,r.config.minDate,et!==void 0?et:!r.minDateHasTime)<0||r.config.maxDate&&Pt&&ts(Pt,r.config.maxDate,et!==void 0?et:!r.maxDateHasTime)>0)return!1;if(!r.config.enable&&r.config.disable.length===0)return!0;if(Pt===void 0)return!1;for(var ge=!!r.config.enable,Xe=(It=r.config.enable)!==null&&It!==void 0?It:r.config.disable,De=0,pt=void 0;De=pt.from.getTime()&&Pt.getTime()<=pt.to.getTime())return ge}return!ge}function ae(z){return r.daysContainer!==void 0?z.className.indexOf("hidden")===-1&&z.className.indexOf("flatpickr-disabled")===-1&&r.daysContainer.contains(z):!1}function xe(z){var et=z.target===r._input,It=r._input.value.trimEnd()!==$t();et&&It&&!(z.relatedTarget&&Ft(z.relatedTarget))&&r.setDate(r._input.value,!0,z.target===r.altInput?r.config.altFormat:r.config.dateFormat)}function se(z){var et=$o(z),It=r.config.wrap?e.contains(et):et===r._input,Pt=r.config.allowInput,ge=r.isOpen&&(!Pt||!It),Xe=r.config.inline&&It&&!Pt;if(z.keyCode===13&&It){if(Pt)return r.setDate(r._input.value,!0,et===r.altInput?r.config.altFormat:r.config.dateFormat),r.close(),et.blur();r.open()}else if(Ft(et)||ge||Xe){var De=!!r.timeContainer&&r.timeContainer.contains(et);switch(z.keyCode){case 13:De?(z.preventDefault(),c(),le()):pe(z);break;case 27:z.preventDefault(),le();break;case 8:case 46:It&&!r.config.allowInput&&(z.preventDefault(),r.clear());break;case 37:case 39:if(!De&&!It){z.preventDefault();var pt=o();if(r.daysContainer!==void 0&&(Pt===!1||pt&&ae(pt))){var At=z.keyCode===39?1:-1;z.ctrlKey?(z.stopPropagation(),Rt(At),S(R(1),0)):S(void 0,At)}}else r.hourElement&&r.hourElement.focus();break;case 38:case 40:z.preventDefault();var ct=z.keyCode===40?1:-1;r.daysContainer&&et.$i!==void 0||et===r.input||et===r.altInput?z.ctrlKey?(z.stopPropagation(),ut(r.currentYear-ct),S(R(1),0)):De||S(void 0,ct*7):et===r.currentYearElement?ut(r.currentYear-ct):r.config.enableTime&&(!De&&r.hourElement&&r.hourElement.focus(),c(z),r._debouncedChange());break;case 9:if(De){var gt=[r.hourElement,r.minuteElement,r.secondElement,r.amPM].concat(r.pluginElements).filter(function(kt){return kt}),K=gt.indexOf(et);if(K!==-1){var rt=gt[K+(z.shiftKey?-1:1)];z.preventDefault(),(rt||r._input).focus()}}else!r.config.noCalendar&&r.daysContainer&&r.daysContainer.contains(et)&&z.shiftKey&&(z.preventDefault(),r._input.focus());break;default:break}}if(r.amPM!==void 0&&et===r.amPM)switch(z.key){case r.l10n.amPM[0].charAt(0):case r.l10n.amPM[0].charAt(0).toLowerCase():r.amPM.textContent=r.l10n.amPM[0],d(),q();break;case r.l10n.amPM[1].charAt(0):case r.l10n.amPM[1].charAt(0).toLowerCase():r.amPM.textContent=r.l10n.amPM[1],d(),q();break}(It||Ft(et))&&V("onKeyDown",z)}function Ye(z,et){if(et===void 0&&(et="flatpickr-day"),!(r.selectedDates.length!==1||z&&(!z.classList.contains(et)||z.classList.contains("flatpickr-disabled")))){for(var It=z?z.dateObj.getTime():r.days.firstElementChild.dateObj.getTime(),Pt=r.parseDate(r.selectedDates[0],void 0,!0).getTime(),ge=Math.min(It,r.selectedDates[0].getTime()),Xe=Math.max(It,r.selectedDates[0].getTime()),De=!1,pt=0,At=0,ct=ge;ctge&&ctpt)?pt=ct:ct>Pt&&(!At||ct ."+et));gt.forEach(function(K){var rt=K.dateObj,kt=rt.getTime(),Tt=pt>0&&kt0&&kt>At;if(Tt){K.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(wt){K.classList.remove(wt)});return}else if(De&&!Tt)return;["startRange","inRange","endRange","notAllowed"].forEach(function(wt){K.classList.remove(wt)}),z!==void 0&&(z.classList.add(It<=r.selectedDates[0].getTime()?"startRange":"endRange"),PtIt&&kt===Pt&&K.classList.add("endRange"),kt>=pt&&(At===0||kt<=At)&&ZYt(kt,Pt,It)&&K.classList.add("inRange"))})}}function Ie(){r.isOpen&&!r.config.static&&!r.config.inline&&ft()}function he(z,et){if(et===void 0&&(et=r._positionElement),r.isMobile===!0){if(z){z.preventDefault();var It=$o(z);It&&It.blur()}r.mobileInput!==void 0&&(r.mobileInput.focus(),r.mobileInput.click()),V("onOpen");return}else if(r._input.disabled||r.config.inline)return;var Pt=r.isOpen;r.isOpen=!0,Pt||(r.calendarContainer.classList.add("open"),r._input.classList.add("active"),V("onOpen"),ft(et)),r.config.enableTime===!0&&r.config.noCalendar===!0&&r.config.allowInput===!1&&(z===void 0||!r.timeContainer.contains(z.relatedTarget))&&setTimeout(function(){return r.hourElement.select()},50)}function me(z){return function(et){var It=r.config["_"+z+"Date"]=r.parseDate(et,r.config.dateFormat),Pt=r.config["_"+(z==="min"?"max":"min")+"Date"];It!==void 0&&(r[z==="min"?"minDateHasTime":"maxDateHasTime"]=It.getHours()>0||It.getMinutes()>0||It.getSeconds()>0),r.selectedDates&&(r.selectedDates=r.selectedDates.filter(function(ge){return Yt(ge)}),!r.selectedDates.length&&z==="min"&&h(It),q()),r.daysContainer&&(te(),It!==void 0?r.currentYearElement[z]=It.getFullYear().toString():r.currentYearElement.removeAttribute(z),r.currentYearElement.disabled=!!Pt&&It!==void 0&&Pt.getFullYear()===It.getFullYear())}}function fe(){var z=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],et=io(io({},JSON.parse(JSON.stringify(e.dataset||{}))),t),It={};r.config.parseDate=et.parseDate,r.config.formatDate=et.formatDate,Object.defineProperty(r.config,"enable",{get:function(){return r.config._enable},set:function(gt){r.config._enable=Bt(gt)}}),Object.defineProperty(r.config,"disable",{get:function(){return r.config._disable},set:function(gt){r.config._disable=Bt(gt)}});var Pt=et.mode==="time";if(!et.dateFormat&&(et.enableTime||Pt)){var ge=Qn.defaultConfig.dateFormat||Kg.dateFormat;It.dateFormat=et.noCalendar||Pt?"H:i"+(et.enableSeconds?":S":""):ge+" H:i"+(et.enableSeconds?":S":"")}if(et.altInput&&(et.enableTime||Pt)&&!et.altFormat){var Xe=Qn.defaultConfig.altFormat||Kg.altFormat;It.altFormat=et.noCalendar||Pt?"h:i"+(et.enableSeconds?":S K":" K"):Xe+(" h:i"+(et.enableSeconds?":S":"")+" K")}Object.defineProperty(r.config,"minDate",{get:function(){return r.config._minDate},set:me("min")}),Object.defineProperty(r.config,"maxDate",{get:function(){return r.config._maxDate},set:me("max")});var De=function(gt){return function(K){r.config[gt==="min"?"_minTime":"_maxTime"]=r.parseDate(K,"H:i:S")}};Object.defineProperty(r.config,"minTime",{get:function(){return r.config._minTime},set:De("min")}),Object.defineProperty(r.config,"maxTime",{get:function(){return r.config._maxTime},set:De("max")}),et.mode==="time"&&(r.config.noCalendar=!0,r.config.enableTime=!0),Object.assign(r.config,It,et);for(var pt=0;pt-1?r.config[ct]=TV(At[ct]).map(s).concat(r.config[ct]):typeof et[ct]>"u"&&(r.config[ct]=At[ct])}et.altInputClass||(r.config.altInputClass=tt().className+" "+r.config.altInputClass),V("onParseConfig")}function tt(){return r.config.wrap?e.querySelector("[data-input]"):e}function at(){typeof r.config.locale!="object"&&typeof Qn.l10ns[r.config.locale]>"u"&&r.config.errorHandler(new Error("flatpickr: invalid locale "+r.config.locale)),r.l10n=io(io({},Qn.l10ns.default),typeof r.config.locale=="object"?r.config.locale:r.config.locale!=="default"?Qn.l10ns[r.config.locale]:void 0),lu.D="("+r.l10n.weekdays.shorthand.join("|")+")",lu.l="("+r.l10n.weekdays.longhand.join("|")+")",lu.M="("+r.l10n.months.shorthand.join("|")+")",lu.F="("+r.l10n.months.longhand.join("|")+")",lu.K="("+r.l10n.amPM[0]+"|"+r.l10n.amPM[1]+"|"+r.l10n.amPM[0].toLowerCase()+"|"+r.l10n.amPM[1].toLowerCase()+")";var z=io(io({},t),JSON.parse(JSON.stringify(e.dataset||{})));z.time_24hr===void 0&&Qn.defaultConfig.time_24hr===void 0&&(r.config.time_24hr=r.l10n.time_24hr),r.formatDate=q_(r),r.parseDate=JV({config:r.config,l10n:r.l10n})}function ft(z){if(typeof r.config.position=="function")return void r.config.position(r,z);if(r.calendarContainer!==void 0){V("onPreCalendarPosition");var et=z||r._positionElement,It=Array.prototype.reduce.call(r.calendarContainer.children,(function(oe,j){return oe+j.offsetHeight}),0),Pt=r.calendarContainer.offsetWidth,ge=r.config.position.split(" "),Xe=ge[0],De=ge.length>1?ge[1]:null,pt=et.getBoundingClientRect(),At=window.innerHeight-pt.bottom,ct=Xe==="above"||Xe!=="below"&&AtIt,gt=window.pageYOffset+pt.top+(ct?-It-2:et.offsetHeight+2);if(eo(r.calendarContainer,"arrowTop",!ct),eo(r.calendarContainer,"arrowBottom",ct),!r.config.inline){var K=window.pageXOffset+pt.left,rt=!1,kt=!1;De==="center"?(K-=(Pt-pt.width)/2,rt=!0):De==="right"&&(K-=Pt-pt.width,kt=!0),eo(r.calendarContainer,"arrowLeft",!rt&&!kt),eo(r.calendarContainer,"arrowCenter",rt),eo(r.calendarContainer,"arrowRight",kt);var Tt=window.document.body.offsetWidth-(window.pageXOffset+pt.right),wt=K+Pt>window.document.body.offsetWidth,de=Tt+Pt>window.document.body.offsetWidth;if(eo(r.calendarContainer,"rightMost",wt),!r.config.static)if(r.calendarContainer.style.top=gt+"px",!wt)r.calendarContainer.style.left=K+"px",r.calendarContainer.style.right="auto";else if(!de)r.calendarContainer.style.left="auto",r.calendarContainer.style.right=Tt+"px";else{var Ae=Ct();if(Ae===void 0)return;var Ee=window.document.body.offsetWidth,Ze=Math.max(0,Ee/2-Pt/2),je=".flatpickr-calendar.centerMost:before",Xi=".flatpickr-calendar.centerMost:after",fi=Ae.cssRules.length,ht="{left:"+pt.left+"px;right:auto;}";eo(r.calendarContainer,"rightMost",!1),eo(r.calendarContainer,"centerMost",!0),Ae.insertRule(je+","+Xi+ht,fi),r.calendarContainer.style.left=Ze+"px",r.calendarContainer.style.right="auto"}}}}function Ct(){for(var z=null,et=0;etr.currentMonth+r.config.showMonths-1)&&r.config.mode!=="range";if(r.selectedDateElem=Pt,r.config.mode==="single")r.selectedDates=[ge];else if(r.config.mode==="multiple"){var De=lt(ge);De?r.selectedDates.splice(parseInt(De),1):r.selectedDates.push(ge)}else r.config.mode==="range"&&(r.selectedDates.length===2&&r.clear(!1,!1),r.latestSelectedDateObj=ge,r.selectedDates.push(ge),ts(ge,r.selectedDates[0],!0)!==0&&r.selectedDates.sort(function(gt,K){return gt.getTime()-K.getTime()}));if(d(),Xe){var pt=r.currentYear!==ge.getFullYear();r.currentYear=ge.getFullYear(),r.currentMonth=ge.getMonth(),pt&&(V("onYearChange"),T()),V("onMonthChange")}if(Et(),Q(),q(),!Xe&&r.config.mode!=="range"&&r.config.showMonths===1?F(Pt):r.selectedDateElem!==void 0&&r.hourElement===void 0&&r.selectedDateElem&&r.selectedDateElem.focus(),r.hourElement!==void 0&&r.hourElement!==void 0&&r.hourElement.focus(),r.config.closeOnSelect){var At=r.config.mode==="single"&&!r.config.enableTime,ct=r.config.mode==="range"&&r.selectedDates.length===2&&!r.config.enableTime;(At||ct)&&le()}f()}}var He={locale:[at,it],showMonths:[J,l,P],minDate:[y],maxDate:[y],positionElement:[G],clickOpens:[function(){r.config.clickOpens===!0?(b(r._input,"focus",r.open),b(r._input,"click",r.open)):(r._input.removeEventListener("focus",r.open),r._input.removeEventListener("click",r.open))}]};function ne(z,et){if(z!==null&&typeof z=="object"){Object.assign(r.config,z);for(var It in z)He[It]!==void 0&&He[It].forEach(function(Pt){return Pt()})}else r.config[z]=et,He[z]!==void 0?He[z].forEach(function(Pt){return Pt()}):NV.indexOf(z)>-1&&(r.config[z]=TV(et));r.redraw(),q(!0)}function qt(z,et){var It=[];if(z instanceof Array)It=z.map(function(Pt){return r.parseDate(Pt,et)});else if(z instanceof Date||typeof z=="number")It=[r.parseDate(z,et)];else if(typeof z=="string")switch(r.config.mode){case"single":case"time":It=[r.parseDate(z,et)];break;case"multiple":It=z.split(r.config.conjunction).map(function(Pt){return r.parseDate(Pt,et)});break;case"range":It=z.split(r.l10n.rangeSeparator).map(function(Pt){return r.parseDate(Pt,et)});break;default:break}else r.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(z)));r.selectedDates=r.config.allowInvalidPreload?It:It.filter(function(Pt){return Pt instanceof Date&&Yt(Pt,!1)}),r.config.mode==="range"&&r.selectedDates.sort(function(Pt,ge){return Pt.getTime()-ge.getTime()})}function U(z,et,It){if(et===void 0&&(et=!1),It===void 0&&(It=r.config.dateFormat),z!==0&&!z||z instanceof Array&&z.length===0)return r.clear(et);qt(z,It),r.latestSelectedDateObj=r.selectedDates[r.selectedDates.length-1],r.redraw(),y(void 0,et),h(),r.selectedDates.length===0&&r.clear(!1),q(et),et&&V("onChange")}function Bt(z){return z.slice().map(function(et){return typeof et=="string"||typeof et=="number"||et instanceof Date?r.parseDate(et,void 0,!0):et&&typeof et=="object"&&et.from&&et.to?{from:r.parseDate(et.from,void 0),to:r.parseDate(et.to,void 0)}:et}).filter(function(et){return et})}function Ht(){r.selectedDates=[],r.now=r.parseDate(r.config.now)||new Date;var z=r.config.defaultDate||((r.input.nodeName==="INPUT"||r.input.nodeName==="TEXTAREA")&&r.input.placeholder&&r.input.value===r.input.placeholder?null:r.input.value);z&&qt(z,r.config.dateFormat),r._initialDate=r.selectedDates.length>0?r.selectedDates[0]:r.config.minDate&&r.config.minDate.getTime()>r.now.getTime()?r.config.minDate:r.config.maxDate&&r.config.maxDate.getTime()0&&(r.latestSelectedDateObj=r.selectedDates[0]),r.config.minTime!==void 0&&(r.config.minTime=r.parseDate(r.config.minTime,"H:i")),r.config.maxTime!==void 0&&(r.config.maxTime=r.parseDate(r.config.maxTime,"H:i")),r.minDateHasTime=!!r.config.minDate&&(r.config.minDate.getHours()>0||r.config.minDate.getMinutes()>0||r.config.minDate.getSeconds()>0),r.maxDateHasTime=!!r.config.maxDate&&(r.config.maxDate.getHours()>0||r.config.maxDate.getMinutes()>0||r.config.maxDate.getSeconds()>0)}function ue(){if(r.input=tt(),!r.input){r.config.errorHandler(new Error("Invalid input element specified"));return}r.input._type=r.input.type,r.input.type="text",r.input.classList.add("flatpickr-input"),r._input=r.input,r.config.altInput&&(r.altInput=Cr(r.input.nodeName,r.config.altInputClass),r._input=r.altInput,r.altInput.placeholder=r.input.placeholder,r.altInput.disabled=r.input.disabled,r.altInput.required=r.input.required,r.altInput.tabIndex=r.input.tabIndex,r.altInput.type="text",r.input.setAttribute("type","hidden"),!r.config.static&&r.input.parentNode&&r.input.parentNode.insertBefore(r.altInput,r.input.nextSibling)),r.config.allowInput||r._input.setAttribute("readonly","readonly"),G()}function G(){r._positionElement=r.config.positionElement||r._input}function A(){var z=r.config.enableTime?r.config.noCalendar?"time":"datetime-local":"date";r.mobileInput=Cr("input",r.input.className+" flatpickr-mobile"),r.mobileInput.tabIndex=1,r.mobileInput.type=z,r.mobileInput.disabled=r.input.disabled,r.mobileInput.required=r.input.required,r.mobileInput.placeholder=r.input.placeholder,r.mobileFormatStr=z==="datetime-local"?"Y-m-d\\TH:i:S":z==="date"?"Y-m-d":"H:i:S",r.selectedDates.length>0&&(r.mobileInput.defaultValue=r.mobileInput.value=r.formatDate(r.selectedDates[0],r.mobileFormatStr)),r.config.minDate&&(r.mobileInput.min=r.formatDate(r.config.minDate,"Y-m-d")),r.config.maxDate&&(r.mobileInput.max=r.formatDate(r.config.maxDate,"Y-m-d")),r.input.getAttribute("step")&&(r.mobileInput.step=String(r.input.getAttribute("step"))),r.input.type="hidden",r.altInput!==void 0&&(r.altInput.type="hidden");try{r.input.parentNode&&r.input.parentNode.insertBefore(r.mobileInput,r.input.nextSibling)}catch{}b(r.mobileInput,"change",function(et){r.setDate($o(et).value,!1,r.mobileFormatStr),V("onChange"),V("onClose")})}function Y(z){if(r.isOpen===!0)return r.close();r.open(z)}function V(z,et){if(r.config!==void 0){var It=r.config[z];if(It!==void 0&&It.length>0)for(var Pt=0;It[Pt]&&Pt=0&&ts(z,r.selectedDates[1])<=0}function Et(){r.config.noCalendar||r.isMobile||!r.monthNav||(r.yearElements.forEach(function(z,et){var It=new Date(r.currentYear,r.currentMonth,1);It.setMonth(r.currentMonth+et),r.config.showMonths>1||r.config.monthSelectorType==="static"?r.monthElements[et].textContent=_1(It.getMonth(),r.config.shorthandCurrentMonth,r.l10n)+" ":r.monthsDropdownContainer.value=It.getMonth().toString(),z.value=It.getFullYear().toString()}),r._hidePrevMonthArrow=r.config.minDate!==void 0&&(r.currentYear===r.config.minDate.getFullYear()?r.currentMonth<=r.config.minDate.getMonth():r.currentYearr.config.maxDate.getMonth():r.currentYear>r.config.maxDate.getFullYear()))}function $t(z){var et=z||(r.config.altInput?r.config.altFormat:r.config.dateFormat);return r.selectedDates.map(function(It){return r.formatDate(It,et)}).filter(function(It,Pt,ge){return r.config.mode!=="range"||r.config.enableTime||ge.indexOf(It)===Pt}).join(r.config.mode!=="range"?r.config.conjunction:r.l10n.rangeSeparator)}function q(z){z===void 0&&(z=!0),r.mobileInput!==void 0&&r.mobileFormatStr&&(r.mobileInput.value=r.latestSelectedDateObj!==void 0?r.formatDate(r.latestSelectedDateObj,r.mobileFormatStr):""),r.input.value=$t(r.config.dateFormat),r.altInput!==void 0&&(r.altInput.value=$t(r.config.altFormat)),z!==!1&&V("onValueUpdate")}function Dt(z){var et=$o(z),It=r.prevMonthNav.contains(et),Pt=r.nextMonthNav.contains(et);It||Pt?Rt(It?-1:1):r.yearElements.indexOf(et)>=0?et.select():et.classList.contains("arrowUp")?r.changeYear(r.currentYear+1):et.classList.contains("arrowDown")&&r.changeYear(r.currentYear-1)}function yt(z){z.preventDefault();var et=z.type==="keydown",It=$o(z),Pt=It;r.amPM!==void 0&&It===r.amPM&&(r.amPM.textContent=r.l10n.amPM[qo(r.amPM.textContent===r.l10n.amPM[0])]);var ge=parseFloat(Pt.getAttribute("min")),Xe=parseFloat(Pt.getAttribute("max")),De=parseFloat(Pt.getAttribute("step")),pt=parseInt(Pt.value,10),At=z.delta||(et?z.which===38?1:-1:0),ct=pt+De*At;if(typeof Pt.value<"u"&&Pt.value.length===2){var gt=Pt===r.hourElement,K=Pt===r.minuteElement;ctXe&&(ct=Pt===r.hourElement?ct-Xe-qo(!r.amPM):ge,K&&C(void 0,1,r.hourElement)),r.amPM&>&&(De===1?ct+pt===23:Math.abs(ct-pt)>De)&&(r.amPM.textContent=r.l10n.amPM[qo(r.amPM.textContent===r.l10n.amPM[0])]),Pt.value=to(ct)}}return a(),r}function B0(e,t){for(var r=Array.prototype.slice.call(e).filter(function(s){return s instanceof HTMLElement}),n=[],a=0;a{__();j_();D_();CYt();BYt();K_();XYt();io=function(){return io=Object.assign||function(e){for(var t,r=1,n=arguments.length;r{(function(e,t){typeof jV=="object"&&typeof kYt<"u"?t(jV):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.nl={}))})(jV,(function(e){"use strict";var t=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},r={weekdays:{shorthand:["zo","ma","di","wo","do","vr","za"],longhand:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},months:{shorthand:["jan","feb","mrt","apr","mei","jun","jul","aug","sept","okt","nov","dec"],longhand:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},firstDayOfWeek:1,weekAbbreviation:"wk",rangeSeparator:" t/m ",scrollTitle:"Scroll voor volgende / vorige",toggleTitle:"Klik om te wisselen",time_24hr:!0,ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};t.l10ns.nl=r;var n=t.l10ns;e.Dutch=r,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})}))});var wYt=k((zV,LYt)=>{(function(e,t){typeof zV=="object"&&typeof LYt<"u"?t(zV):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.de={}))})(zV,(function(e){"use strict";var t=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},r={weekdays:{shorthand:["So","Mo","Di","Mi","Do","Fr","Sa"],longhand:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},months:{shorthand:["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],longhand:["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},firstDayOfWeek:1,weekAbbreviation:"KW",rangeSeparator:" bis ",scrollTitle:"Zum \xC4ndern scrollen",toggleTitle:"Zum Umschalten klicken",time_24hr:!0};t.l10ns.de=r;var n=t.l10ns;e.German=r,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})}))});var YYt=k((DV,UYt)=>{(function(e,t){typeof DV=="object"&&typeof UYt<"u"?t(DV):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.fr={}))})(DV,(function(e){"use strict";var t=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},r={firstDayOfWeek:1,weekdays:{shorthand:["dim","lun","mar","mer","jeu","ven","sam"],longhand:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},months:{shorthand:["janv","f\xE9vr","mars","avr","mai","juin","juil","ao\xFBt","sept","oct","nov","d\xE9c"],longhand:["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xFBt","septembre","octobre","novembre","d\xE9cembre"]},ordinal:function(a){return a>1?"":"er"},rangeSeparator:" au ",weekAbbreviation:"Sem",scrollTitle:"D\xE9filer pour augmenter la valeur",toggleTitle:"Cliquer pour basculer",time_24hr:!0};t.l10ns.fr=r;var n=t.l10ns;e.French=r,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})}))});var NYt=k((MV,EYt)=>{(function(e,t){typeof MV=="object"&&typeof EYt<"u"?t(MV):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.es={}))})(MV,(function(e){"use strict";var t=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},r={weekdays:{shorthand:["Dom","Lun","Mar","Mi\xE9","Jue","Vie","S\xE1b"],longhand:["Domingo","Lunes","Martes","Mi\xE9rcoles","Jueves","Viernes","S\xE1bado"]},months:{shorthand:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],longhand:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]},ordinal:function(){return"\xBA"},firstDayOfWeek:1,rangeSeparator:" a ",time_24hr:!0};t.l10ns.es=r;var n=t.l10ns;e.Spanish=r,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})}))});var QYt=k((PV,OYt)=>{(function(e,t){typeof PV=="object"&&typeof OYt<"u"?t(PV):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.pt={}))})(PV,(function(e){"use strict";var t=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},r={weekdays:{shorthand:["Dom","Seg","Ter","Qua","Qui","Sex","S\xE1b"],longhand:["Domingo","Segunda-feira","Ter\xE7a-feira","Quarta-feira","Quinta-feira","Sexta-feira","S\xE1bado"]},months:{shorthand:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],longhand:["Janeiro","Fevereiro","Mar\xE7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"]},rangeSeparator:" at\xE9 ",time_24hr:!0};t.l10ns.pt=r;var n=t.l10ns;e.Portuguese=r,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})}))});var JYt=k((KV,TYt)=>{(function(e,t){typeof KV=="object"&&typeof TYt<"u"?t(KV):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.it={}))})(KV,(function(e){"use strict";var t=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},r={weekdays:{shorthand:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],longhand:["Domenica","Luned\xEC","Marted\xEC","Mercoled\xEC","Gioved\xEC","Venerd\xEC","Sabato"]},months:{shorthand:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],longhand:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]},firstDayOfWeek:1,ordinal:function(){return"\xB0"},rangeSeparator:" al ",weekAbbreviation:"Se",scrollTitle:"Scrolla per aumentare",toggleTitle:"Clicca per cambiare",time_24hr:!0};t.l10ns.it=r;var n=t.l10ns;e.Italian=r,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})}))});var _Yt=k((qV,HYt)=>{(function(e,t){typeof qV=="object"&&typeof HYt<"u"?t(qV):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.pl={}))})(qV,(function(e){"use strict";var t=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},r={weekdays:{shorthand:["Nd","Pn","Wt","\u015Ar","Cz","Pt","So"],longhand:["Niedziela","Poniedzia\u0142ek","Wtorek","\u015Aroda","Czwartek","Pi\u0105tek","Sobota"]},months:{shorthand:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Pa\u017A","Lis","Gru"],longhand:["Stycze\u0144","Luty","Marzec","Kwiecie\u0144","Maj","Czerwiec","Lipiec","Sierpie\u0144","Wrzesie\u0144","Pa\u017Adziernik","Listopad","Grudzie\u0144"]},rangeSeparator:" do ",weekAbbreviation:"tydz.",scrollTitle:"Przewi\u0144, aby zwi\u0119kszy\u0107",toggleTitle:"Kliknij, aby prze\u0142\u0105czy\u0107",firstDayOfWeek:1,time_24hr:!0,ordinal:function(){return"."}};t.l10ns.pl=r;var n=t.l10ns;e.Polish=r,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})}))});var sC={};Dn(sC,{MultiDrag:()=>vqe,Sortable:()=>Gi,Swap:()=>fqe,default:()=>oC});function g7(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function dEt(e){return e.host&&e!==document&&e.host.nodeType&&e.host!==e?e.host:e.parentNode}function rs(e,t,r,n){if(e){r=r||document;do{if(t!=null&&(t[0]===">"?e.parentNode===r&&c2(e,t):c2(e,t))||n&&e===r)return e;if(e===r)break}while(e=dEt(e))}return null}function gn(e,t,r){if(e&&t)if(e.classList)e.classList[r?"add":"remove"](t);else{var n=(" "+e.className+" ").replace($Yt," ").replace(" "+t+" "," ");e.className=(n+(r?" "+t:"")).replace($Yt," ")}}function li(e,t,r){var n=e&&e.style;if(n){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(r=e.currentStyle),t===void 0?r:r[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=r+(typeof r=="string"?"":"px")}}function pp(e,t){var r="";if(typeof e=="string")r=e;else do{var n=li(e,"transform");n&&n!=="none"&&(r=n+" "+r)}while(!t&&(e=e.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(r)}function uEt(e,t,r){if(e){var n=e.getElementsByTagName(t),a=0,o=n.length;if(r)for(;a=o:s=a<=o,!s)return n;if(n===Pc())break;n=th(n,!1)}return!1}function S0(e,t,r,n){for(var a=0,o=0,s=e.children;oli":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return bEt(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,l){s.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Gi.supportPointer!==!1&&"PointerEvent"in window&&(!$1||I7),emptyInsertThreshold:5};aC.initializePlugins(this,e,r);for(var n in r)!(n in t)&&(t[n]=r[n]);fEt(t);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=t.forceFallback?!1:nqe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Ki(e,"pointerdown",this._onTapStart):(Ki(e,"mousedown",this._onTapStart),Ki(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ki(e,"dragover",this),Ki(e,"dragenter",this)),u2.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),ul(this,tqe())}function lqe(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function i2(e,t,r,n,a,o,s,l){var c,u=e[Ea],g=u.options.onMove,d;return window.CustomEvent&&!du&&!nC?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=t,c.from=e,c.dragged=r,c.draggedRect=n,c.related=a||t,c.relatedRect=o||Mr(t),c.willInsertAfter=l,c.originalEvent=s,e.dispatchEvent(c),g&&(d=g.call(u,c,s)),d}function l7(e){e.draggable=!1}function cqe(){m7=!1}function dqe(e,t,r){var n=Mr(S0(r.el,0,r.options,!0)),a=mEt(r.el,r.options,Ei),o=10;return t?e.clientXa.right+o||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>a.bottom+o||e.clientX>n.right&&e.clientY>n.top}function gqe(e,t,r,n,a,o,s,l){var c=n?e.clientY:e.clientX,u=n?r.height:r.width,g=n?r.top:r.left,d=n?r.bottom:r.right,h=!1;if(!s){if(l&&o2g+u*o/2:cd-o2)return-iC}else if(c>g+u*(1-a)/2&&cd-u*o/2)?c>g+u/2?1:-1:0}function hqe(e){return xn(Pe)1&&(Yi.forEach(function(l){o.addAnimationState({target:l,rect:is?Mr(l):s}),r7(l),l.fromRect=s,n.removeAnimationState(l)}),is=!1,Gqe(!this.options.removeCloneOnHide,a))},dragOverCompleted:function(r){var n=r.sortable,a=r.isOwner,o=r.insertion,s=r.activeSortable,l=r.parentEl,c=r.putSortable,u=this.options;if(o){if(a&&s._hideClone(),z1=!1,u.animation&&Yi.length>1&&(is||!a&&!s.options.sort&&!c)){var g=Mr(_r,!1,!0,!0);Yi.forEach(function(h){h!==_r&&(iEt(h,g),l.appendChild(h))}),is=!0}if(!a)if(is||n2(),Yi.length>1){var d=r2;s._showClone(n),s.options.animation&&!r2&&d&&Rs.forEach(function(h){s.addAnimationState({target:h,rect:D1}),h.fromRect=D1,h.thisAnimationDuration=null})}else s._showClone(n)}},dragOverAnimationCapture:function(r){var n=r.dragRect,a=r.isOwner,o=r.activeSortable;if(Yi.forEach(function(l){l.thisAnimationDuration=null}),o.options.animation&&!a&&o.multiDrag.isMultiDrag){D1=ul({},n);var s=pp(_r,!0);D1.top-=s.f,D1.left-=s.e}},dragOverAnimationComplete:function(){is&&(is=!1,n2())},drop:function(r){var n=r.originalEvent,a=r.rootEl,o=r.parentEl,s=r.sortable,l=r.dispatchSortableEvent,c=r.oldIndex,u=r.putSortable,g=u||this.sortable;if(n){var d=this.options,h=o.children;if(!F0)if(d.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),gn(_r,d.selectedClass,!~Yi.indexOf(_r)),~Yi.indexOf(_r))Yi.splice(Yi.indexOf(_r),1),j1=null,M1({sortable:s,rootEl:a,name:"deselect",targetEl:_r,originalEvent:n});else{if(Yi.push(_r),M1({sortable:s,rootEl:a,name:"select",targetEl:_r,originalEvent:n}),n.shiftKey&&j1&&s.el.contains(j1)){var m=xn(j1),p=xn(_r);~m&&~p&&m!==p&&(function(){var y,x;p>m?(x=m,y=p):(x=p,y=m+1);for(var C=d.filter;x1){var b=Mr(_r),f=xn(_r,":not(."+this.options.selectedClass+")");if(!z1&&d.animation&&(_r.thisAnimationDuration=null),g.captureAnimationState(),!z1&&(d.animation&&(_r.fromRect=b,Yi.forEach(function(y){if(y.thisAnimationDuration=null,y!==_r){var x=is?Mr(y):b;y.fromRect=x,g.addAnimationState({target:y,rect:x})}})),n2(),Yi.forEach(function(y){h[f]?o.insertBefore(y,h[f]):o.appendChild(y),f++}),c===xn(_r))){var v=!1;Yi.forEach(function(y){if(y.sortableIndex!==xn(y)){v=!0;return}}),v&&(l("update"),l("sort"))}Yi.forEach(function(y){r7(y)}),g.animateAll()}tc=g}(a===o||u&&u.lastPutMode!=="clone")&&Rs.forEach(function(y){y.parentNode&&y.parentNode.removeChild(y)})}},nullingGlobal:function(){this.isMultiDrag=F0=!1,Rs.length=0},destroyGlobal:function(){this._deselectMultiDrag(),_i(document,"pointerup",this._deselectMultiDrag),_i(document,"mouseup",this._deselectMultiDrag),_i(document,"touchend",this._deselectMultiDrag),_i(document,"keydown",this._checkKeyDown),_i(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(r){if(!(typeof F0<"u"&&F0)&&tc===this.sortable&&!(r&&rs(r.target,this.options.draggable,this.sortable.el,!1))&&!(r&&r.button!==0))for(;Yi.length;){var n=Yi[0];gn(n,this.options.selectedClass,!1),Yi.shift(),M1({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:n,originalEvent:r})}},_checkKeyDown:function(r){r.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(r){r.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},ul(e,{pluginName:"multiDrag",utils:{select:function(r){var n=r.parentNode[Ea];!n||!n.options.multiDrag||~Yi.indexOf(r)||(tc&&tc!==n&&(tc.multiDrag._deselectMultiDrag(),tc=n),gn(r,n.options.selectedClass,!0),Yi.push(r))},deselect:function(r){var n=r.parentNode[Ea],a=Yi.indexOf(r);!n||!n.options.multiDrag||!~a||(gn(r,n.options.selectedClass,!1),Yi.splice(a,1))}},eventProperties:function(){var r=this,n=[],a=[];return Yi.forEach(function(o){n.push({multiDragElement:o,index:o.sortableIndex});var s;is&&o!==_r?s=-1:is?s=xn(o,":not(."+r.options.selectedClass+")"):s=xn(o),a.push({multiDragElement:o,index:s})}),{items:jKe(Yi),clones:[].concat(Rs),oldIndicies:n,newIndicies:a}},optionListeners:{multiDragKey:function(r){return r=r.toLowerCase(),r==="ctrl"?r="Control":r.length>1&&(r=r.charAt(0).toUpperCase()+r.substr(1)),r}}})}function Gqe(e,t){Yi.forEach(function(r,n){var a=t.children[r.sortableIndex+(e?Number(n):0)];a?t.insertBefore(r,a):t.appendChild(r)})}function sEt(e,t){Rs.forEach(function(r,n){var a=t.children[r.sortableIndex+(e?Number(n):0)];a?t.insertBefore(r,a):t.appendChild(r)})}function n2(){Yi.forEach(function(e){e!==_r&&e.parentNode&&e.parentNode.removeChild(e)})}var PKe,du,nC,qYt,$1,I7,lEt,cEt,$Yt,tC,Ea,X0,n7,aC,rqe,es,Pe,Cn,Ei,$r,mp,a2,un,$g,k0,As,eC,qg,$V,Ya,V0,d2,u2,gp,$l,a7,o7,rEt,nEt,P1,W0,iC,rC,t2,o2,ro,s7,m7,g2,m2,e2,aEt,nqe,pEt,bEt,aqe,oqe,fEt,IEt,vEt,hp,sqe,Tn,K1,b7,f7,c7,d7,h2,q1,u7,GEt,dl,Yi,Rs,j1,tc,z1,is,F0,_r,D1,r2,oC,eh=ce(()=>{PKe="1.15.7";du=cu(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),nC=cu(/Edge/i),qYt=cu(/firefox/i),$1=cu(/safari/i)&&!cu(/chrome/i)&&!cu(/android/i),I7=cu(/iP(ad|od|hone)/i),lEt=cu(/chrome/i)&&cu(/android/i),cEt={capture:!1,passive:!1};$Yt=/\s+/g;Ea="Sortable"+new Date().getTime();X0=[],n7={initializeByDefault:!0},aC={mount:function(t){for(var r in n7)n7.hasOwnProperty(r)&&!(r in t)&&(t[r]=n7[r]);X0.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),X0.push(t)},pluginEvent:function(t,r,n){var a=this;this.eventCanceled=!1,n.cancel=function(){a.eventCanceled=!0};var o=t+"Global";X0.forEach(function(s){r[s.pluginName]&&(r[s.pluginName][o]&&r[s.pluginName][o](Kc({sortable:r},n)),r.options[s.pluginName]&&r[s.pluginName][t]&&r[s.pluginName][t](Kc({sortable:r},n)))})},initializePlugins:function(t,r,n,a){X0.forEach(function(l){var c=l.pluginName;if(!(!t.options[c]&&!l.initializeByDefault)){var u=new l(t,r,t.options);u.sortable=t,u.options=t.options,t[c]=u,ul(n,u.defaults)}});for(var o in t.options)if(t.options.hasOwnProperty(o)){var s=this.modifyOption(t,o,t.options[o]);typeof s<"u"&&(t.options[o]=s)}},getEventProperties:function(t,r){var n={};return X0.forEach(function(a){typeof a.eventProperties=="function"&&ul(n,a.eventProperties.call(r[a.pluginName],t))}),n},modifyOption:function(t,r,n){var a;return X0.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[r]=="function"&&(a=o.optionListeners[r].call(t[o.pluginName],n))}),a}};rqe=["evt"],es=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n.evt,o=HKe(n,rqe);aC.pluginEvent.bind(Gi)(t,r,Kc({dragEl:Pe,parentEl:Cn,ghostEl:Ei,rootEl:$r,nextEl:mp,lastDownEl:a2,cloneEl:un,cloneHidden:$g,dragStarted:P1,putSortable:Ya,activeSortable:Gi.active,originalEvent:a,oldIndex:k0,oldDraggableIndex:eC,newIndex:As,newDraggableIndex:qg,hideGhostForTarget:IEt,unhideGhostForTarget:vEt,cloneNowHidden:function(){$g=!0},cloneNowShown:function(){$g=!1},dispatchSortableEvent:function(l){Ao({sortable:r,name:l,originalEvent:a})}},o))};V0=!1,d2=!1,u2=[],rC=!1,t2=!1,s7=[],m7=!1,g2=[],m2=typeof document<"u",e2=I7,aEt=nC||du?"cssFloat":"float",nqe=m2&&!lEt&&!I7&&"draggable"in document.createElement("div"),pEt=(function(){if(m2){if(du)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}})(),bEt=function(t,r){var n=li(t),a=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=S0(t,0,r),s=S0(t,1,r),l=o&&li(o),c=s&&li(s),u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Mr(o).width,g=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+Mr(s).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&l.float&&l.float!=="none"){var d=l.float==="left"?"left":"right";return s&&(c.clear==="both"||c.clear===d)?"vertical":"horizontal"}return o&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||u>=a&&n[aEt]==="none"||s&&n[aEt]==="none"&&u+g>a)?"vertical":"horizontal"},aqe=function(t,r,n){var a=n?t.left:t.top,o=n?t.right:t.bottom,s=n?t.width:t.height,l=n?r.left:r.top,c=n?r.right:r.bottom,u=n?r.width:r.height;return a===l||o===c||a+s/2===l+u/2},oqe=function(t,r){var n;return u2.some(function(a){var o=a[Ea].options.emptyInsertThreshold;if(!(!o||v7(a))){var s=Mr(a),l=t>=s.left-o&&t<=s.right+o,c=r>=s.top-o&&r<=s.bottom+o;if(l&&c)return n=a}}),n},fEt=function(t){function r(o,s){return function(l,c,u,g){var d=l.options.group.name&&c.options.group.name&&l.options.group.name===c.options.group.name;if(o==null&&(s||d))return!0;if(o==null||o===!1)return!1;if(s&&o==="clone")return o;if(typeof o=="function")return r(o(l,c,u,g),s)(l,c,u,g);var h=(s?l:c).options.group.name;return o===!0||typeof o=="string"&&o===h||o.join&&o.indexOf(h)>-1}}var n={},a=t.group;(!a||h7(a)!="object")&&(a={name:a}),n.name=a.name,n.checkPull=r(a.pull,!0),n.checkPut=r(a.put),n.revertClone=a.revertClone,t.group=n},IEt=function(){!pEt&&Ei&&li(Ei,"display","none")},vEt=function(){!pEt&&Ei&&li(Ei,"display","")};m2&&!lEt&&document.addEventListener("click",function(e){if(d2)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),d2=!1,!1},!0);hp=function(t){if(Pe){t=t.touches?t.touches[0]:t;var r=oqe(t.clientX,t.clientY);if(r){var n={};for(var a in t)t.hasOwnProperty(a)&&(n[a]=t[a]);n.target=n.rootEl=r,n.preventDefault=void 0,n.stopPropagation=void 0,r[Ea]._onDragOver(n)}}},sqe=function(t){Pe&&Pe.parentNode[Ea]._isOutsideThisEl(t.target)};Gi.prototype={constructor:Gi,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(W0=null)},_getDirection:function(t,r){return typeof this.options.direction=="function"?this.options.direction.call(this,t,r,Pe):this.options.direction},_onTapStart:function(t){if(t.cancelable){var r=this,n=this.el,a=this.options,o=a.preventOnFilter,s=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,c=(l||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||c,g=a.filter;if(pqe(n),!Pe&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||a.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&$1&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=rs(c,a.draggable,n,!1),!(c&&c.animated)&&a2!==c)){if(k0=xn(c),eC=xn(c,a.draggable),typeof g=="function"){if(g.call(this,t,c,this)){Ao({sortable:r,rootEl:u,name:"filter",targetEl:c,toEl:n,fromEl:n}),es("filter",r,{evt:t}),o&&t.preventDefault();return}}else if(g&&(g=g.split(",").some(function(d){if(d=rs(u,d.trim(),n,!1),d)return Ao({sortable:r,rootEl:d,name:"filter",targetEl:c,fromEl:n,toEl:n}),es("filter",r,{evt:t}),!0}),g)){o&&t.preventDefault();return}a.handle&&!rs(u,a.handle,n,!1)||this._prepareDragStart(t,l,c)}}},_prepareDragStart:function(t,r,n){var a=this,o=a.el,s=a.options,l=o.ownerDocument,c;if(n&&!Pe&&n.parentNode===o){var u=Mr(n);if($r=o,Pe=n,Cn=Pe.parentNode,mp=Pe.nextSibling,a2=n,$V=s.group,Gi.dragged=Pe,gp={target:Pe,clientX:(r||t).clientX,clientY:(r||t).clientY},rEt=gp.clientX-u.left,nEt=gp.clientY-u.top,this._lastX=(r||t).clientX,this._lastY=(r||t).clientY,Pe.style["will-change"]="all",c=function(){if(es("delayEnded",a,{evt:t}),Gi.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!qYt&&a.nativeDraggable&&(Pe.draggable=!0),a._triggerDragStart(t,r),Ao({sortable:a,name:"choose",originalEvent:t}),gn(Pe,s.chosenClass,!0)},s.ignore.split(",").forEach(function(g){uEt(Pe,g.trim(),l7)}),Ki(l,"dragover",hp),Ki(l,"mousemove",hp),Ki(l,"touchmove",hp),s.supportPointer?(Ki(l,"pointerup",a._onDrop),!this.nativeDraggable&&Ki(l,"pointercancel",a._onDrop)):(Ki(l,"mouseup",a._onDrop),Ki(l,"touchend",a._onDrop),Ki(l,"touchcancel",a._onDrop)),qYt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Pe.draggable=!0),es("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||r)&&(!this.nativeDraggable||!(nC||du))){if(Gi.eventCanceled){this._onDrop();return}s.supportPointer?(Ki(l,"pointerup",a._disableDelayedDrag),Ki(l,"pointercancel",a._disableDelayedDrag)):(Ki(l,"mouseup",a._disableDelayedDrag),Ki(l,"touchend",a._disableDelayedDrag),Ki(l,"touchcancel",a._disableDelayedDrag)),Ki(l,"mousemove",a._delayedDragTouchMoveHandler),Ki(l,"touchmove",a._delayedDragTouchMoveHandler),s.supportPointer&&Ki(l,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(c,s.delay)}else c()}},_delayedDragTouchMoveHandler:function(t){var r=t.touches?t.touches[0]:t;Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Pe&&l7(Pe),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;_i(t,"mouseup",this._disableDelayedDrag),_i(t,"touchend",this._disableDelayedDrag),_i(t,"touchcancel",this._disableDelayedDrag),_i(t,"pointerup",this._disableDelayedDrag),_i(t,"pointercancel",this._disableDelayedDrag),_i(t,"mousemove",this._delayedDragTouchMoveHandler),_i(t,"touchmove",this._delayedDragTouchMoveHandler),_i(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,r){r=r||t.pointerType=="touch"&&t,!this.nativeDraggable||r?this.options.supportPointer?Ki(document,"pointermove",this._onTouchMove):r?Ki(document,"touchmove",this._onTouchMove):Ki(document,"mousemove",this._onTouchMove):(Ki(Pe,"dragend",this),Ki($r,"dragstart",this._onDragStart));try{document.selection?s2(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,r){if(V0=!1,$r&&Pe){es("dragStarted",this,{evt:r}),this.nativeDraggable&&Ki(document,"dragover",sqe);var n=this.options;!t&&gn(Pe,n.dragClass,!1),gn(Pe,n.ghostClass,!0),Gi.active=this,t&&this._appendGhost(),Ao({sortable:this,name:"start",originalEvent:r})}else this._nulling()},_emulateDragOver:function(){if($l){this._lastX=$l.clientX,this._lastY=$l.clientY,IEt();for(var t=document.elementFromPoint($l.clientX,$l.clientY),r=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint($l.clientX,$l.clientY),t!==r);)r=t;if(Pe.parentNode[Ea]._isOutsideThisEl(t),r)do{if(r[Ea]){var n=void 0;if(n=r[Ea]._onDragOver({clientX:$l.clientX,clientY:$l.clientY,target:t,rootEl:r}),n&&!this.options.dragoverBubble)break}t=r}while(r=dEt(r));vEt()}},_onTouchMove:function(t){if(gp){var r=this.options,n=r.fallbackTolerance,a=r.fallbackOffset,o=t.touches?t.touches[0]:t,s=Ei&&pp(Ei,!0),l=Ei&&s&&s.a,c=Ei&&s&&s.d,u=e2&&ro&&eEt(ro),g=(o.clientX-gp.clientX+a.x)/(l||1)+(u?u[0]-s7[0]:0)/(l||1),d=(o.clientY-gp.clientY+a.y)/(c||1)+(u?u[1]-s7[1]:0)/(c||1);if(!Gi.active&&!V0){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(Ao({rootEl:Cn,name:"add",toEl:Cn,fromEl:$r,originalEvent:t}),Ao({sortable:this,name:"remove",toEl:Cn,originalEvent:t}),Ao({rootEl:Cn,name:"sort",toEl:Cn,fromEl:$r,originalEvent:t}),Ao({sortable:this,name:"sort",toEl:Cn,originalEvent:t})),Ya&&Ya.save()):As!==k0&&As>=0&&(Ao({sortable:this,name:"update",toEl:Cn,originalEvent:t}),Ao({sortable:this,name:"sort",toEl:Cn,originalEvent:t})),Gi.active&&((As==null||As===-1)&&(As=k0,qg=eC),Ao({sortable:this,name:"end",toEl:Cn,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){es("nulling",this),$r=Pe=Cn=Ei=mp=un=a2=$g=gp=$l=P1=As=qg=k0=eC=W0=iC=Ya=$V=Gi.dragged=Gi.ghost=Gi.clone=Gi.active=null;var t=this.el;g2.forEach(function(r){t.contains(r)&&(r.checked=!0)}),g2.length=a7=o7=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Pe&&(this._onDragOver(t),lqe(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],r,n=this.el.children,a=0,o=n.length,s=this.options;a{(function(e,t){typeof p2=="object"&&p2.exports?p2.exports=t():e.EvEmitter=t()})(typeof window<"u"?window:ZEt,function(){function e(){}let t=e.prototype;return t.on=function(r,n){if(!r||!n)return this;let a=this._events=this._events||{},o=a[r]=a[r]||[];return o.includes(n)||o.push(n),this},t.once=function(r,n){if(!r||!n)return this;this.on(r,n);let a=this._onceEvents=this._onceEvents||{},o=a[r]=a[r]||{};return o[n]=!0,this},t.off=function(r,n){let a=this._events&&this._events[r];if(!a||!a.length)return this;let o=a.indexOf(n);return o!=-1&&a.splice(o,1),this},t.emitEvent=function(r,n){let a=this._events&&this._events[r];if(!a||!a.length)return this;a=a.slice(0),n=n||[];let o=this._onceEvents&&this._onceEvents[r];for(let s of a)o&&o[s]&&(this.off(r,s),delete o[s]),s.apply(this,n);return this},t.allOff=function(){return delete this._events,delete this._onceEvents,this},e})});var f2=k((AEt,b2)=>{(function(e,t){typeof b2=="object"&&b2.exports?b2.exports=t(e,REt()):e.imagesLoaded=t(e,e.EvEmitter)})(typeof window<"u"?window:AEt,function(t,r){let n=t.jQuery,a=t.console;function o(d){return Array.isArray(d)?d:typeof d=="object"&&typeof d.length=="number"?[...d]:[d]}function s(d,h,m){if(!(this instanceof s))return new s(d,h,m);let p=d;if(typeof d=="string"&&(p=document.querySelectorAll(d)),!p){a.error(`Bad element for imagesLoaded ${p||d}`);return}this.elements=o(p),this.options={},typeof h=="function"?m=h:Object.assign(this.options,h),m&&this.on("always",m),this.getImages(),n&&(this.jqDeferred=new n.Deferred),setTimeout(this.check.bind(this))}s.prototype=Object.create(r.prototype),s.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};let l=[1,9,11];s.prototype.addElementImages=function(d){d.nodeName==="IMG"&&this.addImage(d),this.options.background===!0&&this.addElementBackgroundImages(d);let{nodeType:h}=d;if(!h||!l.includes(h))return;let m=d.querySelectorAll("img");for(let p of m)this.addImage(p);if(typeof this.options.background=="string"){let p=d.querySelectorAll(this.options.background);for(let b of p)this.addElementBackgroundImages(b)}};let c=/url\((['"])?(.*?)\1\)/gi;s.prototype.addElementBackgroundImages=function(d){let h=getComputedStyle(d);if(!h)return;let m=c.exec(h.backgroundImage);for(;m!==null;){let p=m&&m[2];p&&this.addBackground(p,d),m=c.exec(h.backgroundImage)}},s.prototype.addImage=function(d){let h=new u(d);this.images.push(h)},s.prototype.addBackground=function(d,h){let m=new g(d,h);this.images.push(m)},s.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length){this.complete();return}let d=(h,m,p)=>{setTimeout(()=>{this.progress(h,m,p)})};this.images.forEach(function(h){h.once("progress",d),h.check()})},s.prototype.progress=function(d,h,m){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!d.isLoaded,this.emitEvent("progress",[this,d,h]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,d),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&a&&a.log(`progress: ${m}`,d,h)},s.prototype.complete=function(){let d=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(d,[this]),this.emitEvent("always",[this]),this.jqDeferred){let h=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[h](this)}};function u(d){this.img=d}u.prototype=Object.create(r.prototype),u.prototype.check=function(){if(this.getIsImageComplete()){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src},u.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},u.prototype.confirm=function(d,h){this.isLoaded=d;let{parentNode:m}=this.img,p=m.nodeName==="PICTURE"?m:this.img;this.emitEvent("progress",[this,p,h])},u.prototype.handleEvent=function(d){let h="on"+d.type;this[h]&&this[h](d)},u.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},u.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},u.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)};function g(d,h){this.url=d,this.element=h,this.img=new Image}return g.prototype=Object.create(u.prototype),g.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(this.img.naturalWidth!==0,"naturalWidth"),this.unbindEvents())},g.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},g.prototype.confirm=function(d,h){this.isLoaded=d,this.emitEvent("progress",[this,this.element,h])},s.makeJQueryPlugin=function(d){d=d||t.jQuery,d&&(n=d,n.fn.imagesLoaded=function(h,m){return new s(this,h,m).jqDeferred.promise(n(this))})},s.makeJQueryPlugin(),s})});var bp=k((lC,R7)=>{(function(t,r){typeof lC=="object"&&typeof R7=="object"?R7.exports=r():typeof define=="function"&&define.amd?define("@material/select",[],r):typeof lC=="object"?lC.select=r():(t.mdc=t.mdc||{},t.mdc.select=r())})(lC,function(){return(function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(n,a,o){r.o(n,a)||Object.defineProperty(n,a,{enumerable:!0,get:o})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,a){if(a&1&&(n=r(n)),a&8||a&4&&typeof n=="object"&&n&&n.__esModule)return n;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),a&2&&typeof n!="string")for(var s in n)r.d(o,s,function(l){return n[l]}.bind(null,s));return o},r.n=function(n){var a=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(a,"a",a),a},r.o=function(n,a){return Object.prototype.hasOwnProperty.call(n,a)},r.p="",r(r.s="./packages/mdc-select/index.ts")})({"./packages/mdc-animation/util.ts":(function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCorrectEventName=t.getCorrectPropertyName=void 0;var n={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},a={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};function o(c){return!!c.document&&typeof c.document.createElement=="function"}function s(c,u){if(o(c)&&u in n){var g=c.document.createElement("div"),d=n[u],h=d.standard,m=d.prefixed,p=h in g.style;return p?h:m}return u}t.getCorrectPropertyName=s;function l(c,u){if(o(c)&&u in a){var g=c.document.createElement("div"),d=a[u],h=d.standard,m=d.prefixed,p=d.cssProperty,b=p in g.style;return b?h:m}return u}t.getCorrectEventName=l}),"./packages/mdc-base/component.ts":(function(e,t,r){"use strict";var n=this&&this.__read||function(l,c){var u=typeof Symbol=="function"&&l[Symbol.iterator];if(!u)return l;var g=u.call(l),d,h=[],m;try{for(;(c===void 0||c-- >0)&&!(d=g.next()).done;)h.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(u=g.return)&&u.call(g)}finally{if(m)throw m.error}}return h},a=this&&this.__spreadArray||function(l,c){for(var u=0,g=c.length,d=l.length;u0&&(this.selectedIndex=h[0]);return}var m=this.root.querySelectorAll(s.strings.ARIA_ROLE_CHECKBOX_SELECTOR),p=this.root.querySelector(s.strings.ARIA_CHECKED_RADIO_SELECTOR);if(m.length){var b=this.root.querySelectorAll(s.strings.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=Array.from(b,function(f){return d.listElements.indexOf(f)})}else p&&(this.selectedIndex=this.listElements.indexOf(p))},g.prototype.setEnabled=function(d,h){this.foundation.setEnabled(d,h)},g.prototype.typeaheadMatchItem=function(d,h){return this.foundation.typeaheadMatchItem(d,h,!0)},g.prototype.getDefaultFoundation=function(){var d=this,h={addClassForElementIndex:function(p,b){var f=d.listElements[p];f&&f.classList.add(d.classNameMap[b])},focusItemAtIndex:function(p){var b=d.listElements[p];b&&b.focus()},getAttributeForElementIndex:function(p,b){return d.listElements[p].getAttribute(b)},getFocusedElementIndex:function(){return d.listElements.indexOf(document.activeElement)},getListItemCount:function(){return d.listElements.length},getPrimaryTextAtIndex:function(p){return d.getPrimaryText(d.listElements[p])},hasCheckboxAtIndex:function(p){var b=d.listElements[p];return!!b.querySelector(s.strings.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(p){var b=d.listElements[p];return!!b.querySelector(s.strings.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(p){var b=d.listElements[p],f=b.querySelector(s.strings.CHECKBOX_SELECTOR);return f.checked},isFocusInsideList:function(){return d.root!==document.activeElement&&d.root.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===d.root},listItemAtIndexHasClass:function(p,b){return d.listElements[p].classList.contains(d.classNameMap[b])},notifyAction:function(p){d.emit(s.strings.ACTION_EVENT,{index:p},!0)},notifySelectionChange:function(p){d.emit(s.strings.SELECTION_CHANGE_EVENT,{changedIndices:p},!0)},removeClassForElementIndex:function(p,b){var f=d.listElements[p];f&&f.classList.remove(d.classNameMap[b])},setAttributeForElementIndex:function(p,b,f){var v=d.listElements[p];v&&v.setAttribute(b,f)},setCheckedCheckboxOrRadioAtIndex:function(p,b){var f=d.listElements[p],v=f.querySelector(s.strings.CHECKBOX_RADIO_SELECTOR);v.checked=b;var y=document.createEvent("Event");y.initEvent("change",!0,!0),v.dispatchEvent(y)},setTabIndexForListItemChildren:function(p,b){var f=d.listElements[p],v=s.strings.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX;Array.prototype.forEach.call(f.querySelectorAll(v),function(y){y.setAttribute("tabindex",b)})}};return new l.MDCListFoundation(h)},g.prototype.ensureFocusable=function(){if(this.isEvolutionEnabled&&this.isInteractive&&!this.root.querySelector("."+this.classNameMap[s.cssClasses.LIST_ITEM_CLASS]+'[tabindex="0"]')){var d=this.initialFocusIndex();d!==-1&&(this.listElements[d].tabIndex=0)}},g.prototype.initialFocusIndex=function(){if(this.selectedIndex instanceof Array&&this.selectedIndex.length>0)return this.selectedIndex[0];if(typeof this.selectedIndex=="number"&&this.selectedIndex!==s.numbers.UNSET_INDEX)return this.selectedIndex;var d=this.root.querySelector("."+this.classNameMap[s.cssClasses.LIST_ITEM_CLASS]+":not(."+this.classNameMap[s.cssClasses.LIST_ITEM_DISABLED_CLASS]+")");return d===null?-1:this.getListItemIndex(d)},g.prototype.getListItemIndex=function(d){var h=o.closest(d,"."+this.classNameMap[s.cssClasses.LIST_ITEM_CLASS]+", ."+this.classNameMap[s.cssClasses.ROOT]);return h&&o.matches(h,"."+this.classNameMap[s.cssClasses.LIST_ITEM_CLASS])?this.listElements.indexOf(h):-1},g.prototype.handleFocusInEvent=function(d){var h=this.getListItemIndex(d.target);this.foundation.handleFocusIn(h)},g.prototype.handleFocusOutEvent=function(d){var h=this.getListItemIndex(d.target);this.foundation.handleFocusOut(h)},g.prototype.handleKeydownEvent=function(d){var h=this.getListItemIndex(d.target),m=d.target;this.foundation.handleKeydown(d,m.classList.contains(this.classNameMap[s.cssClasses.LIST_ITEM_CLASS]),h)},g.prototype.handleClickEvent=function(d){var h=this.getListItemIndex(d.target),m=d.target,p=o.matches(m,s.strings.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(h,p,d)},g})(a.MDCComponent);t.MDCList=c}),"./packages/mdc-list/constants.ts":(function(e,t,r){"use strict";var n,a;Object.defineProperty(t,"__esModule",{value:!0}),t.evolutionClassNameMap=t.evolutionAttribute=t.deprecatedClassNameMap=t.numbers=t.cssClasses=t.strings=void 0;var o={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"};t.cssClasses=o;var s=(n={},n[""+o.LIST_ITEM_ACTIVATED_CLASS]="mdc-list-item--activated",n[""+o.LIST_ITEM_CLASS]="mdc-list-item",n[""+o.LIST_ITEM_DISABLED_CLASS]="mdc-list-item--disabled",n[""+o.LIST_ITEM_SELECTED_CLASS]="mdc-list-item--selected",n[""+o.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-list-item__primary-text",n[""+o.ROOT]="mdc-list",n);t.evolutionClassNameMap=s;var l=(a={},a[""+o.LIST_ITEM_ACTIVATED_CLASS]="mdc-deprecated-list-item--activated",a[""+o.LIST_ITEM_CLASS]="mdc-deprecated-list-item",a[""+o.LIST_ITEM_DISABLED_CLASS]="mdc-deprecated-list-item--disabled",a[""+o.LIST_ITEM_SELECTED_CLASS]="mdc-deprecated-list-item--selected",a[""+o.LIST_ITEM_TEXT_CLASS]="mdc-deprecated-list-item__text",a[""+o.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-deprecated-list-item__primary-text",a[""+o.ROOT]="mdc-deprecated-list",a);t.deprecatedClassNameMap=l;var c={ACTION_EVENT:"MDCList:action",SELECTION_CHANGE_EVENT:"MDCList:selectionChange",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:` .`+o.LIST_ITEM_CLASS+` button:not(:disabled), .`+o.LIST_ITEM_CLASS+` a, .`+l[o.LIST_ITEM_CLASS]+` button:not(:disabled), .`+l[o.LIST_ITEM_CLASS]+` a `,DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:` .`+o.LIST_ITEM_CLASS+` button:not(:disabled), .`+o.LIST_ITEM_CLASS+` a, .`+o.LIST_ITEM_CLASS+` input[type="radio"]:not(:disabled), .`+o.LIST_ITEM_CLASS+` input[type="checkbox"]:not(:disabled), .`+l[o.LIST_ITEM_CLASS]+` button:not(:disabled), .`+l[o.LIST_ITEM_CLASS]+` a, .`+l[o.LIST_ITEM_CLASS]+` input[type="radio"]:not(:disabled), .`+l[o.LIST_ITEM_CLASS]+` input[type="checkbox"]:not(:disabled) `,RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'};t.strings=c;var u={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300};t.numbers=u;var g="evolution";t.evolutionAttribute=g}),"./packages/mdc-list/events.ts":(function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preventDefaultEvent=void 0;var n=["input","button","textarea","select"],a=function(s){var l=s.target;if(l){var c=(""+l.tagName).toLowerCase();n.indexOf(c)===-1&&s.preventDefault()}};t.preventDefaultEvent=a}),"./packages/mdc-list/foundation.ts":(function(e,t,r){"use strict";var n=this&&this.__extends||(function(){var x=function(I,Z){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(F,R){F.__proto__=R}||function(F,R){for(var X in R)Object.prototype.hasOwnProperty.call(R,X)&&(F[X]=R[X])},x(I,Z)};return function(C,I){if(typeof I!="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");x(C,I);function Z(){this.constructor=C}C.prototype=I===null?Object.create(I):(Z.prototype=I.prototype,new Z)}})(),a=this&&this.__assign||function(){return a=Object.assign||function(x){for(var C,I=1,Z=arguments.length;I0)&&!(F=Z.next()).done;)R.push(F.value)}catch(S){X={error:S}}finally{try{F&&!F.done&&(I=Z.return)&&I.call(Z)}finally{if(X)throw X.error}}return R},u=this&&this.__spreadArray||function(x,C){for(var I=0,Z=C.length,F=x.length;I=0&&(this.focusedItemIndex=I,this.adapter.setAttributeForElementIndex(I,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(I,"0"))},C.prototype.handleFocusOut=function(I){var Z=this;I>=0&&(this.adapter.setAttributeForElementIndex(I,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(I,"-1")),setTimeout(function(){Z.adapter.isFocusInsideList()||Z.setTabindexToFirstSelectedOrFocusedItem()},0)},C.prototype.isIndexDisabled=function(I){return this.adapter.listItemAtIndexHasClass(I,h.cssClasses.LIST_ITEM_DISABLED_CLASS)},C.prototype.handleKeydown=function(I,Z,F){var R=this,X,S=d.normalizeKey(I)==="ArrowLeft",w=d.normalizeKey(I)==="ArrowUp",Q=d.normalizeKey(I)==="ArrowRight",T=d.normalizeKey(I)==="ArrowDown",O=d.normalizeKey(I)==="Home",J=d.normalizeKey(I)==="End",E=d.normalizeKey(I)==="Enter",_=d.normalizeKey(I)==="Spacebar",P=this.isVertical&&T||!this.isVertical&&Q,it=this.isVertical&&w||!this.isVertical&&S,bt=I.key==="A"||I.key==="a",Rt=v(I);if(this.adapter.isRootFocused()){if((it||J)&&Rt([]))I.preventDefault(),this.focusLastElement();else if((P||O)&&Rt([]))I.preventDefault(),this.focusFirstElement();else if(it&&Rt(["Shift"])&&this.isCheckboxList){I.preventDefault();var $=this.focusLastElement();$!==-1&&this.setSelectedIndexOnAction($,!1)}else if(P&&Rt(["Shift"])&&this.isCheckboxList){I.preventDefault();var $=this.focusFirstElement();$!==-1&&this.setSelectedIndexOnAction($,!1)}if(this.hasTypeahead){var Kt={event:I,focusItemAtIndex:function(ut){R.focusItemAtIndex(ut)},focusedItemIndex:-1,isTargetListItem:Z,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(ut){return R.isIndexDisabled(ut)}};p.handleKeydown(Kt,this.typeaheadState)}return}var st=this.adapter.getFocusedElementIndex();if(!(st===-1&&(st=F,st<0))){if(P&&Rt([]))m.preventDefaultEvent(I),this.focusNextElement(st);else if(it&&Rt([]))m.preventDefaultEvent(I),this.focusPrevElement(st);else if(P&&Rt(["Shift"])&&this.isCheckboxList){m.preventDefaultEvent(I);var $=this.focusNextElement(st);$!==-1&&this.setSelectedIndexOnAction($,!1)}else if(it&&Rt(["Shift"])&&this.isCheckboxList){m.preventDefaultEvent(I);var $=this.focusPrevElement(st);$!==-1&&this.setSelectedIndexOnAction($,!1)}else if(O&&Rt([]))m.preventDefaultEvent(I),this.focusFirstElement();else if(J&&Rt([]))m.preventDefaultEvent(I),this.focusLastElement();else if(O&&Rt(["Control","Shift"])&&this.isCheckboxList){if(m.preventDefaultEvent(I),this.isIndexDisabled(st))return;this.focusFirstElement(),this.toggleCheckboxRange(0,st,st)}else if(J&&Rt(["Control","Shift"])&&this.isCheckboxList){if(m.preventDefaultEvent(I),this.isIndexDisabled(st))return;this.focusLastElement(),this.toggleCheckboxRange(st,this.adapter.getListItemCount()-1,st)}else if(bt&&Rt(["Control"])&&this.isCheckboxList)I.preventDefault(),this.checkboxListToggleAll(this.selectedIndex===h.numbers.UNSET_INDEX?[]:this.selectedIndex,!0);else if((E||_)&&Rt([])){if(Z){var Ft=I.target;if(Ft&&Ft.tagName==="A"&&E||(m.preventDefaultEvent(I),this.isIndexDisabled(st)))return;this.isTypeaheadInProgress()||(this.isSelectableList()&&this.setSelectedIndexOnAction(st,!1),this.adapter.notifyAction(st))}}else if((E||_)&&Rt(["Shift"])&&this.isCheckboxList){var Ft=I.target;if(Ft&&Ft.tagName==="A"&&E||(m.preventDefaultEvent(I),this.isIndexDisabled(st)))return;this.isTypeaheadInProgress()||(this.toggleCheckboxRange((X=this.lastSelectedIndex)!==null&&X!==void 0?X:st,st,st),this.adapter.notifyAction(st))}if(this.hasTypeahead){var Kt={event:I,focusItemAtIndex:function(Yt){R.focusItemAtIndex(Yt)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:Z,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(Yt){return R.isIndexDisabled(Yt)}};p.handleKeydown(Kt,this.typeaheadState)}}},C.prototype.handleClick=function(I,Z,F){var R,X=v(F);I!==h.numbers.UNSET_INDEX&&(this.isIndexDisabled(I)||(X([])?(this.isSelectableList()&&this.setSelectedIndexOnAction(I,Z),this.adapter.notifyAction(I)):this.isCheckboxList&&X(["Shift"])&&(this.toggleCheckboxRange((R=this.lastSelectedIndex)!==null&&R!==void 0?R:I,I,I),this.adapter.notifyAction(I))))},C.prototype.focusNextElement=function(I){var Z=this.adapter.getListItemCount(),F=I,R=null;do{if(F++,F>=Z)if(this.wrapFocus)F=0;else return I;if(F===R)return-1;R=R??F}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(F));return this.focusItemAtIndex(F),F},C.prototype.focusPrevElement=function(I){var Z=this.adapter.getListItemCount(),F=I,R=null;do{if(F--,F<0)if(this.wrapFocus)F=Z-1;else return I;if(F===R)return-1;R=R??F}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(F));return this.focusItemAtIndex(F),F},C.prototype.focusFirstElement=function(){return this.focusNextElement(-1)},C.prototype.focusLastElement=function(){return this.focusPrevElement(this.adapter.getListItemCount())},C.prototype.focusInitialElement=function(){var I=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(I),I},C.prototype.setEnabled=function(I,Z){this.isIndexValid(I,!1)&&(Z?(this.adapter.removeClassForElementIndex(I,h.cssClasses.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(I,h.strings.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(I,h.cssClasses.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(I,h.strings.ARIA_DISABLED,"true")))},C.prototype.setSingleSelectionAtIndex=function(I,Z){if(Z===void 0&&(Z={}),!(this.selectedIndex===I&&!Z.forceUpdate)){var F=h.cssClasses.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass&&(F=h.cssClasses.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex!==h.numbers.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex,F),this.setAriaForSingleSelectionAtIndex(I),this.setTabindexAtIndex(I),I!==h.numbers.UNSET_INDEX&&this.adapter.addClassForElementIndex(I,F),this.selectedIndex=I,Z.isUserInteraction&&!Z.forceUpdate&&this.adapter.notifySelectionChange([I])}},C.prototype.setAriaForSingleSelectionAtIndex=function(I){this.selectedIndex===h.numbers.UNSET_INDEX&&(this.ariaCurrentAttrValue=this.adapter.getAttributeForElementIndex(I,h.strings.ARIA_CURRENT));var Z=this.ariaCurrentAttrValue!==null,F=Z?h.strings.ARIA_CURRENT:h.strings.ARIA_SELECTED;if(this.selectedIndex!==h.numbers.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,F,"false"),I!==h.numbers.UNSET_INDEX){var R=Z?this.ariaCurrentAttrValue:"true";this.adapter.setAttributeForElementIndex(I,F,R)}},C.prototype.getSelectionAttribute=function(){return this.useSelectedAttr?h.strings.ARIA_SELECTED:h.strings.ARIA_CHECKED},C.prototype.setRadioAtIndex=function(I,Z){Z===void 0&&(Z={});var F=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(I,!0),!(this.selectedIndex===I&&!Z.forceUpdate)&&(this.selectedIndex!==h.numbers.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,F,"false"),this.adapter.setAttributeForElementIndex(I,F,"true"),this.selectedIndex=I,Z.isUserInteraction&&!Z.forceUpdate&&this.adapter.notifySelectionChange([I]))},C.prototype.setCheckboxAtIndex=function(I,Z){Z===void 0&&(Z={});for(var F=this.selectedIndex,R=Z.isUserInteraction?new Set(F===h.numbers.UNSET_INDEX?[]:F):null,X=this.getSelectionAttribute(),S=[],w=0;w=0;T!==Q&&S.push(w),this.adapter.setCheckedCheckboxOrRadioAtIndex(w,T),this.adapter.setAttributeForElementIndex(w,X,T?"true":"false")}this.selectedIndex=I,Z.isUserInteraction&&S.length&&this.adapter.notifySelectionChange(S)},C.prototype.toggleCheckboxRange=function(I,Z,F){this.lastSelectedIndex=F;for(var R=new Set(this.selectedIndex===h.numbers.UNSET_INDEX?[]:this.selectedIndex),X=!R?.has(F),S=c([I,Z].sort(),2),w=S[0],Q=S[1],T=this.getSelectionAttribute(),O=[],J=w;J<=Q;J++)if(!this.isIndexDisabled(J)){var E=R.has(J);X!==E&&(O.push(J),this.adapter.setCheckedCheckboxOrRadioAtIndex(J,X),this.adapter.setAttributeForElementIndex(J,T,""+X),X?R.add(J):R.delete(J))}O.length&&(this.selectedIndex=u([],c(R)),this.adapter.notifySelectionChange(O))},C.prototype.setTabindexAtIndex=function(I){this.focusedItemIndex===h.numbers.UNSET_INDEX&&I!==0?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==I&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),!(this.selectedIndex instanceof Array)&&this.selectedIndex!==I&&this.adapter.setAttributeForElementIndex(this.selectedIndex,"tabindex","-1"),I!==h.numbers.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(I,"tabindex","0")},C.prototype.isSelectableList=function(){return this.isSingleSelectionList||this.isCheckboxList||this.isRadioList},C.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var I=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(I)},C.prototype.getFirstSelectedOrFocusedItemIndex=function(){return this.isSelectableList()?typeof this.selectedIndex=="number"&&this.selectedIndex!==h.numbers.UNSET_INDEX?this.selectedIndex:b(this.selectedIndex)&&this.selectedIndex.length>0?this.selectedIndex.reduce(function(I,Z){return Math.min(I,Z)}):0:Math.max(this.focusedItemIndex,0)},C.prototype.isIndexValid=function(I,Z){var F=this;if(Z===void 0&&(Z=!0),I instanceof Array){if(!this.isCheckboxList&&Z)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return I.length===0?!0:I.some(function(R){return F.isIndexInRange(R)})}else return typeof I=="number"?this.isCheckboxList&&Z?!1:this.isIndexInRange(I)||this.isSingleSelectionList&&I===h.numbers.UNSET_INDEX:!1},C.prototype.isIndexInRange=function(I){var Z=this.adapter.getListItemCount();return I>=0&&I-1)&&R.push(X);this.setCheckboxAtIndex(R,{isUserInteraction:Z})}},C.prototype.typeaheadMatchItem=function(I,Z,F){var R=this;F===void 0&&(F=!1);var X={focusItemAtIndex:function(w){R.focusItemAtIndex(w)},focusedItemIndex:Z||this.focusedItemIndex,nextChar:I,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:F,isItemAtIndexDisabled:function(w){return R.isIndexDisabled(w)}};return p.matchItem(X,this.typeaheadState)},C.prototype.typeaheadInitSortedIndex=function(){return p.initSortedIndex(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},C.prototype.clearTypeaheadBuffer=function(){p.clearBuffer(this.typeaheadState)},C})(g.MDCFoundation);t.MDCListFoundation=y,t.default=y}),"./packages/mdc-list/typeahead.ts":(function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleKeydown=t.clearBuffer=t.isTypingInProgress=t.matchItem=t.initSortedIndex=t.initState=void 0;var n=r("./packages/mdc-dom/keyboard.ts"),a=r("./packages/mdc-list/constants.ts"),o=r("./packages/mdc-list/events.ts");function s(){var p={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""};return p}t.initState=s;function l(p,b){for(var f=new Map,v=0;vb&&!f(x[Z].index)){I=Z;break}return I!==-1?(v.sortedIndexCursor=I,x[v.sortedIndexCursor].index):-1}function g(p,b,f){var v=f.typeaheadBuffer[0],y=p.get(v);if(!y)return-1;var x=y[f.sortedIndexCursor];if(x.text.lastIndexOf(f.typeaheadBuffer,0)===0&&!b(x.index))return x.index;for(var C=(f.sortedIndexCursor+1)%y.length,I=-1;C!==f.sortedIndexCursor;){var Z=y[C],F=Z.text.lastIndexOf(f.typeaheadBuffer,0)===0,R=!b(Z.index);if(F&&R){I=C;break}C=(C+1)%y.length}return I!==-1?(f.sortedIndexCursor=I,y[f.sortedIndexCursor].index):-1}function d(p){return p.typeaheadBuffer.length>0}t.isTypingInProgress=d;function h(p){p.typeaheadBuffer=""}t.clearBuffer=h;function m(p,b){var f=p.event,v=p.isTargetListItem,y=p.focusedItemIndex,x=p.focusItemAtIndex,C=p.sortedIndexByFirstChar,I=p.isItemAtIndexDisabled,Z=n.normalizeKey(f)==="ArrowLeft",F=n.normalizeKey(f)==="ArrowUp",R=n.normalizeKey(f)==="ArrowRight",X=n.normalizeKey(f)==="ArrowDown",S=n.normalizeKey(f)==="Home",w=n.normalizeKey(f)==="End",Q=n.normalizeKey(f)==="Enter",T=n.normalizeKey(f)==="Spacebar";if(f.altKey||f.ctrlKey||f.metaKey||Z||F||R||X||S||w||Q)return-1;var O=!T&&f.key.length===1;if(O){o.preventDefaultEvent(f);var J={focusItemAtIndex:x,focusedItemIndex:y,nextChar:f.key.toLowerCase(),sortedIndexByFirstChar:C,skipFocus:!1,isItemAtIndexDisabled:I};return c(J,b)}if(!T)return-1;v&&o.preventDefaultEvent(f);var E=v&&d(b);if(E){var J={focusItemAtIndex:x,focusedItemIndex:y,nextChar:" ",sortedIndexByFirstChar:C,skipFocus:!1,isItemAtIndexDisabled:I};return c(J,b)}return-1}t.handleKeydown=m}),"./packages/mdc-menu-surface/component.ts":(function(e,t,r){"use strict";var n=this&&this.__extends||(function(){var u=function(d,h){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,p){m.__proto__=p}||function(m,p){for(var b in p)Object.prototype.hasOwnProperty.call(p,b)&&(m[b]=p[b])},u(d,h)};return function(g,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(g,d);function h(){this.constructor=g}g.prototype=d===null?Object.create(d):(h.prototype=d.prototype,new h)}})();Object.defineProperty(t,"__esModule",{value:!0}),t.MDCMenuSurface=void 0;var a=r("./packages/mdc-base/component.ts"),o=r("./packages/mdc-menu-surface/constants.ts"),s=r("./packages/mdc-menu-surface/foundation.ts"),l=r("./packages/mdc-animation/util.ts"),c=(function(u){n(g,u);function g(){return u!==null&&u.apply(this,arguments)||this}return g.attachTo=function(d){return new g(d)},g.prototype.initialSyncWithDOM=function(){var d=this,h=this.root.parentElement;this.anchorElement=h&&h.classList.contains(o.cssClasses.ANCHOR)?h:null,this.root.classList.contains(o.cssClasses.FIXED)&&this.setFixedPosition(!0),this.handleKeydown=function(m){d.foundation.handleKeydown(m)},this.handleBodyClick=function(m){d.foundation.handleBodyClick(m)},this.registerBodyClickListener=function(){document.body.addEventListener("click",d.handleBodyClick,{capture:!0})},this.deregisterBodyClickListener=function(){document.body.removeEventListener("click",d.handleBodyClick,{capture:!0})},this.listen("keydown",this.handleKeydown),this.listen(o.strings.OPENED_EVENT,this.registerBodyClickListener),this.listen(o.strings.CLOSED_EVENT,this.deregisterBodyClickListener)},g.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(o.strings.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(o.strings.CLOSED_EVENT,this.deregisterBodyClickListener),u.prototype.destroy.call(this)},g.prototype.isOpen=function(){return this.foundation.isOpen()},g.prototype.open=function(){this.foundation.open()},g.prototype.close=function(d){d===void 0&&(d=!1),this.foundation.close(d)},Object.defineProperty(g.prototype,"quickOpen",{set:function(h){this.foundation.setQuickOpen(h)},enumerable:!1,configurable:!0}),g.prototype.setIsHoisted=function(d){this.foundation.setIsHoisted(d)},g.prototype.setMenuSurfaceAnchorElement=function(d){this.anchorElement=d},g.prototype.setFixedPosition=function(d){d?this.root.classList.add(o.cssClasses.FIXED):this.root.classList.remove(o.cssClasses.FIXED),this.foundation.setFixedPosition(d)},g.prototype.setAbsolutePosition=function(d,h){this.foundation.setAbsolutePosition(d,h),this.setIsHoisted(!0)},g.prototype.setAnchorCorner=function(d){this.foundation.setAnchorCorner(d)},g.prototype.setAnchorMargin=function(d){this.foundation.setAnchorMargin(d)},g.prototype.getDefaultFoundation=function(){var d=this,h={addClass:function(p){return d.root.classList.add(p)},removeClass:function(p){return d.root.classList.remove(p)},hasClass:function(p){return d.root.classList.contains(p)},hasAnchor:function(){return!!d.anchorElement},notifyClose:function(){return d.emit(s.MDCMenuSurfaceFoundation.strings.CLOSED_EVENT,{})},notifyClosing:function(){d.emit(s.MDCMenuSurfaceFoundation.strings.CLOSING_EVENT,{})},notifyOpen:function(){return d.emit(s.MDCMenuSurfaceFoundation.strings.OPENED_EVENT,{})},notifyOpening:function(){return d.emit(s.MDCMenuSurfaceFoundation.strings.OPENING_EVENT,{})},isElementInContainer:function(p){return d.root.contains(p)},isRtl:function(){return getComputedStyle(d.root).getPropertyValue("direction")==="rtl"},setTransformOrigin:function(p){var b=l.getCorrectPropertyName(window,"transform")+"-origin";d.root.style.setProperty(b,p)},isFocused:function(){return document.activeElement===d.root},saveFocus:function(){d.previousFocus=document.activeElement},restoreFocus:function(){d.root.contains(document.activeElement)&&d.previousFocus&&d.previousFocus.focus&&d.previousFocus.focus()},getInnerDimensions:function(){return{width:d.root.offsetWidth,height:d.root.offsetHeight}},getAnchorDimensions:function(){return d.anchorElement?d.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(p){var b=d.root;b.style.left="left"in p?p.left+"px":"",b.style.right="right"in p?p.right+"px":"",b.style.top="top"in p?p.top+"px":"",b.style.bottom="bottom"in p?p.bottom+"px":""},setMaxHeight:function(p){d.root.style.maxHeight=p}};return new s.MDCMenuSurfaceFoundation(h)},g})(a.MDCComponent);t.MDCMenuSurface=c}),"./packages/mdc-menu-surface/constants.ts":(function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Corner=t.CornerBit=t.numbers=t.strings=t.cssClasses=void 0;var n={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"};t.cssClasses=n;var a={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",OPENING_EVENT:"MDCMenuSurface:opening",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")};t.strings=a;var o={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};t.numbers=o;var s;(function(c){c[c.BOTTOM=1]="BOTTOM",c[c.CENTER=2]="CENTER",c[c.RIGHT=4]="RIGHT",c[c.FLIP_RTL=8]="FLIP_RTL"})(s||(s={})),t.CornerBit=s;var l;(function(c){c[c.TOP_LEFT=0]="TOP_LEFT",c[c.TOP_RIGHT=4]="TOP_RIGHT",c[c.BOTTOM_LEFT=1]="BOTTOM_LEFT",c[c.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",c[c.TOP_START=8]="TOP_START",c[c.TOP_END=12]="TOP_END",c[c.BOTTOM_START=9]="BOTTOM_START",c[c.BOTTOM_END=13]="BOTTOM_END"})(l||(l={})),t.Corner=l}),"./packages/mdc-menu-surface/foundation.ts":(function(e,t,r){"use strict";var n=this&&this.__extends||(function(){var u=function(d,h){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,p){m.__proto__=p}||function(m,p){for(var b in p)Object.prototype.hasOwnProperty.call(p,b)&&(m[b]=p[b])},u(d,h)};return function(g,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(g,d);function h(){this.constructor=g}g.prototype=d===null?Object.create(d):(h.prototype=d.prototype,new h)}})(),a=this&&this.__assign||function(){return a=Object.assign||function(u){for(var g,d=1,h=arguments.length;d=u.length&&(u=void 0),{value:u&&u[h++],done:!u}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.MDCMenuSurfaceFoundation=void 0;var s=r("./packages/mdc-base/foundation.ts"),l=r("./packages/mdc-menu-surface/constants.ts"),c=(function(u){n(g,u);function g(d){var h=u.call(this,a(a({},g.defaultAdapter),d))||this;return h.isSurfaceOpen=!1,h.isQuickOpen=!1,h.isHoistedElement=!1,h.isFixedPosition=!1,h.isHorizontallyCenteredOnViewport=!1,h.maxHeight=0,h.openBottomBias=0,h.openAnimationEndTimerId=0,h.closeAnimationEndTimerId=0,h.animationRequestId=0,h.anchorCorner=l.Corner.TOP_START,h.originCorner=l.Corner.TOP_START,h.anchorMargin={top:0,right:0,bottom:0,left:0},h.position={x:0,y:0},h}return Object.defineProperty(g,"cssClasses",{get:function(){return l.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(g,"strings",{get:function(){return l.strings},enumerable:!1,configurable:!0}),Object.defineProperty(g,"numbers",{get:function(){return l.numbers},enumerable:!1,configurable:!0}),Object.defineProperty(g,"Corner",{get:function(){return l.Corner},enumerable:!1,configurable:!0}),Object.defineProperty(g,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyClosing:function(){},notifyOpen:function(){},notifyOpening:function(){}}},enumerable:!1,configurable:!0}),g.prototype.init=function(){var d=g.cssClasses,h=d.ROOT,m=d.OPEN;if(!this.adapter.hasClass(h))throw new Error(h+" class required in root element.");this.adapter.hasClass(m)&&(this.isSurfaceOpen=!0)},g.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},g.prototype.setAnchorCorner=function(d){this.anchorCorner=d},g.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^l.CornerBit.RIGHT},g.prototype.setAnchorMargin=function(d){this.anchorMargin.top=d.top||0,this.anchorMargin.right=d.right||0,this.anchorMargin.bottom=d.bottom||0,this.anchorMargin.left=d.left||0},g.prototype.setIsHoisted=function(d){this.isHoistedElement=d},g.prototype.setFixedPosition=function(d){this.isFixedPosition=d},g.prototype.isFixed=function(){return this.isFixedPosition},g.prototype.setAbsolutePosition=function(d,h){this.position.x=this.isFinite(d)?d:0,this.position.y=this.isFinite(h)?h:0},g.prototype.setIsHorizontallyCenteredOnViewport=function(d){this.isHorizontallyCenteredOnViewport=d},g.prototype.setQuickOpen=function(d){this.isQuickOpen=d},g.prototype.setMaxHeight=function(d){this.maxHeight=d},g.prototype.setOpenBottomBias=function(d){this.openBottomBias=d},g.prototype.isOpen=function(){return this.isSurfaceOpen},g.prototype.open=function(){var d=this;this.isSurfaceOpen||(this.adapter.notifyOpening(),this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(g.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(g.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){d.dimensions=d.adapter.getInnerDimensions(),d.autoposition(),d.adapter.addClass(g.cssClasses.OPEN),d.openAnimationEndTimerId=setTimeout(function(){d.openAnimationEndTimerId=0,d.adapter.removeClass(g.cssClasses.ANIMATING_OPEN),d.adapter.notifyOpen()},l.numbers.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},g.prototype.close=function(d){var h=this;if(d===void 0&&(d=!1),!!this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen){this.isSurfaceOpen=!1,d||this.maybeRestoreFocus(),this.adapter.removeClass(g.cssClasses.OPEN),this.adapter.removeClass(g.cssClasses.IS_OPEN_BELOW),this.adapter.notifyClose();return}this.adapter.addClass(g.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){h.adapter.removeClass(g.cssClasses.OPEN),h.adapter.removeClass(g.cssClasses.IS_OPEN_BELOW),h.closeAnimationEndTimerId=setTimeout(function(){h.closeAnimationEndTimerId=0,h.adapter.removeClass(g.cssClasses.ANIMATING_CLOSED),h.adapter.notifyClose()},l.numbers.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,d||this.maybeRestoreFocus()}},g.prototype.handleBodyClick=function(d){var h=d.target;this.adapter.isElementInContainer(h)||this.close()},g.prototype.handleKeydown=function(d){var h=d.keyCode,m=d.key,p=m==="Escape"||h===27;p&&this.close()},g.prototype.autoposition=function(){var d;this.measurements=this.getAutoLayoutmeasurements();var h=this.getoriginCorner(),m=this.getMenuSurfaceMaxHeight(h),p=this.hasBit(h,l.CornerBit.BOTTOM)?"bottom":"top",b=this.hasBit(h,l.CornerBit.RIGHT)?"right":"left",f=this.getHorizontalOriginOffset(h),v=this.getVerticalOriginOffset(h),y=this.measurements,x=y.anchorSize,C=y.surfaceSize,I=(d={},d[b]=f,d[p]=v,d);x.width/C.width>l.numbers.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(b="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(I),this.adapter.setTransformOrigin(b+" "+p),this.adapter.setPosition(I),this.adapter.setMaxHeight(m?m+"px":""),this.hasBit(h,l.CornerBit.BOTTOM)||this.adapter.addClass(g.cssClasses.IS_OPEN_BELOW)},g.prototype.getAutoLayoutmeasurements=function(){var d=this.adapter.getAnchorDimensions(),h=this.adapter.getBodyDimensions(),m=this.adapter.getWindowDimensions(),p=this.adapter.getWindowScroll();return d||(d={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:d,bodySize:h,surfaceSize:this.dimensions,viewportDistance:{top:d.top,right:m.width-d.right,bottom:m.height-d.bottom,left:d.left},viewportSize:m,windowScroll:p}},g.prototype.getoriginCorner=function(){var d=this.originCorner,h=this.measurements,m=h.viewportDistance,p=h.anchorSize,b=h.surfaceSize,f=g.numbers.MARGIN_TO_EDGE,v=this.hasBit(this.anchorCorner,l.CornerBit.BOTTOM),y,x;v?(y=m.top-f+this.anchorMargin.bottom,x=m.bottom-f-this.anchorMargin.bottom):(y=m.top-f+this.anchorMargin.top,x=m.bottom-f+p.height-this.anchorMargin.top);var C=x-b.height>0;!C&&y>x+this.openBottomBias&&(d=this.setBit(d,l.CornerBit.BOTTOM));var I=this.adapter.isRtl(),Z=this.hasBit(this.anchorCorner,l.CornerBit.FLIP_RTL),F=this.hasBit(this.anchorCorner,l.CornerBit.RIGHT)||this.hasBit(d,l.CornerBit.RIGHT),R=!1;I&&Z?R=!F:R=F;var X,S;R?(X=m.left+p.width+this.anchorMargin.right,S=m.right-this.anchorMargin.right):(X=m.left+this.anchorMargin.left,S=m.right+p.width-this.anchorMargin.left);var w=X-b.width>0,Q=S-b.width>0,T=this.hasBit(d,l.CornerBit.FLIP_RTL)&&this.hasBit(d,l.CornerBit.RIGHT);return Q&&T&&I||!w&&T?d=this.unsetBit(d,l.CornerBit.RIGHT):(w&&R&&I||w&&!R&&F||!Q&&X>=S)&&(d=this.setBit(d,l.CornerBit.RIGHT)),d},g.prototype.getMenuSurfaceMaxHeight=function(d){if(this.maxHeight>0)return this.maxHeight;var h=this.measurements.viewportDistance,m=0,p=this.hasBit(d,l.CornerBit.BOTTOM),b=this.hasBit(this.anchorCorner,l.CornerBit.BOTTOM),f=g.numbers.MARGIN_TO_EDGE;return p?(m=h.top+this.anchorMargin.top-f,b||(m+=this.measurements.anchorSize.height)):(m=h.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-f,b&&(m-=this.measurements.anchorSize.height)),m},g.prototype.getHorizontalOriginOffset=function(d){var h=this.measurements.anchorSize,m=this.hasBit(d,l.CornerBit.RIGHT),p=this.hasBit(this.anchorCorner,l.CornerBit.RIGHT);if(m){var b=p?h.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?b-(this.measurements.viewportSize.width-this.measurements.bodySize.width):b}return p?h.width-this.anchorMargin.right:this.anchorMargin.left},g.prototype.getVerticalOriginOffset=function(d){var h=this.measurements.anchorSize,m=this.hasBit(d,l.CornerBit.BOTTOM),p=this.hasBit(this.anchorCorner,l.CornerBit.BOTTOM),b=0;return m?b=p?h.height-this.anchorMargin.top:-this.anchorMargin.bottom:b=p?h.height+this.anchorMargin.bottom:this.anchorMargin.top,b},g.prototype.adjustPositionForHoistedElement=function(d){var h,m,p=this.measurements,b=p.windowScroll,f=p.viewportDistance,v=p.surfaceSize,y=p.viewportSize,x=Object.keys(d);try{for(var C=o(x),I=C.next();!I.done;I=C.next()){var Z=I.value,F=d[Z]||0;if(this.isHorizontallyCenteredOnViewport&&(Z==="left"||Z==="right")){d[Z]=(y.width-v.width)/2;continue}F+=f[Z],this.isFixedPosition||(Z==="top"?F+=b.y:Z==="bottom"?F-=b.y:Z==="left"?F+=b.x:F-=b.x),d[Z]=F}}catch(R){h={error:R}}finally{try{I&&!I.done&&(m=C.return)&&m.call(C)}finally{if(h)throw h.error}}},g.prototype.maybeRestoreFocus=function(){var d=this,h=this.adapter.isFocused(),m=this.adapter.getOwnerDocument?this.adapter.getOwnerDocument():document,p=m.activeElement&&this.adapter.isElementInContainer(m.activeElement);(h||p)&&setTimeout(function(){d.adapter.restoreFocus()},l.numbers.TOUCH_EVENT_WAIT_MS)},g.prototype.hasBit=function(d,h){return!!(d&h)},g.prototype.setBit=function(d,h){return d|h},g.prototype.unsetBit=function(d,h){return d^h},g.prototype.isFinite=function(d){return typeof d=="number"&&isFinite(d)},g})(s.MDCFoundation);t.MDCMenuSurfaceFoundation=c,t.default=c}),"./packages/mdc-menu/component.ts":(function(e,t,r){"use strict";var n=this&&this.__extends||(function(){var p=function(f,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,x){y.__proto__=x}||function(y,x){for(var C in x)Object.prototype.hasOwnProperty.call(x,C)&&(y[C]=x[C])},p(f,v)};return function(b,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");p(b,f);function v(){this.constructor=b}b.prototype=f===null?Object.create(f):(v.prototype=f.prototype,new v)}})();Object.defineProperty(t,"__esModule",{value:!0}),t.MDCMenu=void 0;var a=r("./packages/mdc-base/component.ts"),o=r("./packages/mdc-dom/ponyfill.ts"),s=r("./packages/mdc-list/component.ts"),l=r("./packages/mdc-list/constants.ts"),c=r("./packages/mdc-list/foundation.ts"),u=r("./packages/mdc-menu-surface/component.ts"),g=r("./packages/mdc-menu-surface/foundation.ts"),d=r("./packages/mdc-menu/constants.ts"),h=r("./packages/mdc-menu/foundation.ts"),m=(function(p){n(b,p);function b(){return p!==null&&p.apply(this,arguments)||this}return b.attachTo=function(f){return new b(f)},b.prototype.initialize=function(f,v){f===void 0&&(f=function(x){return new u.MDCMenuSurface(x)}),v===void 0&&(v=function(x){return new s.MDCList(x)}),this.menuSurfaceFactory=f,this.listFactory=v},b.prototype.initialSyncWithDOM=function(){var f=this;this.menuSurface=this.menuSurfaceFactory(this.root);var v=this.root.querySelector(d.strings.LIST_SELECTOR);v?(this.list=this.listFactory(v),this.list.wrapFocus=!0):this.list=null,this.handleKeydown=function(y){f.foundation.handleKeydown(y)},this.handleItemAction=function(y){f.foundation.handleItemAction(f.items[y.detail.index])},this.handleMenuSurfaceOpened=function(){f.foundation.handleMenuSurfaceOpened()},this.menuSurface.listen(g.MDCMenuSurfaceFoundation.strings.OPENED_EVENT,this.handleMenuSurfaceOpened),this.listen("keydown",this.handleKeydown),this.listen(c.MDCListFoundation.strings.ACTION_EVENT,this.handleItemAction)},b.prototype.destroy=function(){this.list&&this.list.destroy(),this.menuSurface.destroy(),this.menuSurface.unlisten(g.MDCMenuSurfaceFoundation.strings.OPENED_EVENT,this.handleMenuSurfaceOpened),this.unlisten("keydown",this.handleKeydown),this.unlisten(c.MDCListFoundation.strings.ACTION_EVENT,this.handleItemAction),p.prototype.destroy.call(this)},Object.defineProperty(b.prototype,"open",{get:function(){return this.menuSurface.isOpen()},set:function(v){v?this.menuSurface.open():this.menuSurface.close()},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"wrapFocus",{get:function(){return this.list?this.list.wrapFocus:!1},set:function(v){this.list&&(this.list.wrapFocus=v)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"hasTypeahead",{set:function(v){this.list&&(this.list.hasTypeahead=v)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"typeaheadInProgress",{get:function(){return this.list?this.list.typeaheadInProgress:!1},enumerable:!1,configurable:!0}),b.prototype.typeaheadMatchItem=function(f,v){return this.list?this.list.typeaheadMatchItem(f,v):-1},b.prototype.layout=function(){this.list&&this.list.layout()},Object.defineProperty(b.prototype,"items",{get:function(){return this.list?this.list.listElements:[]},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"singleSelection",{set:function(v){this.list&&(this.list.singleSelection=v)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"selectedIndex",{get:function(){return this.list?this.list.selectedIndex:l.numbers.UNSET_INDEX},set:function(v){this.list&&(this.list.selectedIndex=v)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"quickOpen",{set:function(v){this.menuSurface.quickOpen=v},enumerable:!1,configurable:!0}),b.prototype.setDefaultFocusState=function(f){this.foundation.setDefaultFocusState(f)},b.prototype.setAnchorCorner=function(f){this.menuSurface.setAnchorCorner(f)},b.prototype.setAnchorMargin=function(f){this.menuSurface.setAnchorMargin(f)},b.prototype.setSelectedIndex=function(f){this.foundation.setSelectedIndex(f)},b.prototype.setEnabled=function(f,v){this.foundation.setEnabled(f,v)},b.prototype.getOptionByIndex=function(f){var v=this.items;return f=0&&m.adapter.isSelectableItemAtIndex(f)&&m.setSelectedIndex(f)},l.MDCMenuSurfaceFoundation.numbers.TRANSITION_CLOSE_DURATION)}},d.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case c.DefaultFocusState.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case c.DefaultFocusState.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case c.DefaultFocusState.NONE:break;default:this.adapter.focusListRoot();break}},d.prototype.setDefaultFocusState=function(h){this.defaultFocusState=h},d.prototype.getSelectedIndex=function(){return this.selectedIndex},d.prototype.setSelectedIndex=function(h){if(this.validatedIndex(h),!this.adapter.isSelectableItemAtIndex(h))throw new Error("MDCMenuFoundation: No selection group at specified index.");var m=this.adapter.getSelectedSiblingOfItemAtIndex(h);m>=0&&(this.adapter.removeAttributeFromElementAtIndex(m,c.strings.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(m,c.cssClasses.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(h,c.cssClasses.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(h,c.strings.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=h},d.prototype.setEnabled=function(h,m){this.validatedIndex(h),m?(this.adapter.removeClassFromElementAtIndex(h,s.cssClasses.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(h,c.strings.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(h,s.cssClasses.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(h,c.strings.ARIA_DISABLED_ATTR,"true"))},d.prototype.validatedIndex=function(h){var m=this.adapter.getMenuItemCount(),p=h>=0&&h0&&(g+=s.numbers.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(g),this.adapter.addClass(d)},u.prototype.closeNotch=function(){var g=u.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(g),this.adapter.removeNotchWidthProperty()},u})(o.MDCFoundation);t.MDCNotchedOutlineFoundation=l,t.default=l}),"./packages/mdc-ripple/component.ts":(function(e,t,r){"use strict";var n=this&&this.__extends||(function(){var m=function(b,f){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(v[x]=y[x])},m(b,f)};return function(p,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");m(p,b);function f(){this.constructor=p}p.prototype=b===null?Object.create(b):(f.prototype=b.prototype,new f)}})(),a=this&&this.__createBinding||(Object.create?function(m,p,b,f){f===void 0&&(f=b),Object.defineProperty(m,f,{enumerable:!0,get:function(){return p[b]}})}:function(m,p,b,f){f===void 0&&(f=b),m[f]=p[b]}),o=this&&this.__setModuleDefault||(Object.create?function(m,p){Object.defineProperty(m,"default",{enumerable:!0,value:p})}:function(m,p){m.default=p}),s=this&&this.__importStar||function(m){if(m&&m.__esModule)return m;var p={};if(m!=null)for(var b in m)b!=="default"&&Object.prototype.hasOwnProperty.call(m,b)&&a(p,m,b);return o(p,m),p};Object.defineProperty(t,"__esModule",{value:!0}),t.MDCRipple=void 0;var l=r("./packages/mdc-base/component.ts"),c=r("./packages/mdc-dom/events.ts"),u=r("./packages/mdc-dom/ponyfill.ts"),g=r("./packages/mdc-ripple/foundation.ts"),d=s(r("./packages/mdc-ripple/util.ts")),h=(function(m){n(p,m);function p(){var b=m!==null&&m.apply(this,arguments)||this;return b.disabled=!1,b}return p.attachTo=function(b,f){f===void 0&&(f={isUnbounded:void 0});var v=new p(b);return f.isUnbounded!==void 0&&(v.unbounded=f.isUnbounded),v},p.createAdapter=function(b){return{addClass:function(v){return b.root.classList.add(v)},browserSupportsCssVars:function(){return d.supportsCssVariables(window)},computeBoundingRect:function(){return b.root.getBoundingClientRect()},containsEventTarget:function(v){return b.root.contains(v)},deregisterDocumentInteractionHandler:function(v,y){return document.documentElement.removeEventListener(v,y,c.applyPassive())},deregisterInteractionHandler:function(v,y){return b.root.removeEventListener(v,y,c.applyPassive())},deregisterResizeHandler:function(v){return window.removeEventListener("resize",v)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return u.matches(b.root,":active")},isSurfaceDisabled:function(){return!!b.disabled},isUnbounded:function(){return!!b.unbounded},registerDocumentInteractionHandler:function(v,y){return document.documentElement.addEventListener(v,y,c.applyPassive())},registerInteractionHandler:function(v,y){return b.root.addEventListener(v,y,c.applyPassive())},registerResizeHandler:function(v){return window.addEventListener("resize",v)},removeClass:function(v){return b.root.classList.remove(v)},updateCssVariable:function(v,y){return b.root.style.setProperty(v,y)}}},Object.defineProperty(p.prototype,"unbounded",{get:function(){return!!this.isUnbounded},set:function(f){this.isUnbounded=!!f,this.setUnbounded()},enumerable:!1,configurable:!0}),p.prototype.activate=function(){this.foundation.activate()},p.prototype.deactivate=function(){this.foundation.deactivate()},p.prototype.layout=function(){this.foundation.layout()},p.prototype.getDefaultFoundation=function(){return new g.MDCRippleFoundation(p.createAdapter(this))},p.prototype.initialSyncWithDOM=function(){var b=this.root;this.isUnbounded="mdcRippleIsUnbounded"in b.dataset},p.prototype.setUnbounded=function(){this.foundation.setUnbounded(!!this.isUnbounded)},p})(l.MDCComponent);t.MDCRipple=h}),"./packages/mdc-ripple/constants.ts":(function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numbers=t.strings=t.cssClasses=void 0,t.cssClasses={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},t.strings={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},t.numbers={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300}}),"./packages/mdc-ripple/foundation.ts":(function(e,t,r){"use strict";var n=this&&this.__extends||(function(){var m=function(b,f){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(v[x]=y[x])},m(b,f)};return function(p,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");m(p,b);function f(){this.constructor=p}p.prototype=b===null?Object.create(b):(f.prototype=b.prototype,new f)}})(),a=this&&this.__assign||function(){return a=Object.assign||function(m){for(var p,b=1,f=arguments.length;b=m.length&&(m=void 0),{value:m&&m[f++],done:!m}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.MDCRippleFoundation=void 0;var s=r("./packages/mdc-base/foundation.ts"),l=r("./packages/mdc-ripple/constants.ts"),c=r("./packages/mdc-ripple/util.ts"),u=["touchstart","pointerdown","mousedown","keydown"],g=["touchend","pointerup","mouseup","contextmenu"],d=[],h=(function(m){n(p,m);function p(b){var f=m.call(this,a(a({},p.defaultAdapter),b))||this;return f.activationAnimationHasEnded=!1,f.activationTimer=0,f.fgDeactivationRemovalTimer=0,f.fgScale="0",f.frame={width:0,height:0},f.initialSize=0,f.layoutFrame=0,f.maxRadius=0,f.unboundedCoords={left:0,top:0},f.activationState=f.defaultActivationState(),f.activationTimerCallback=function(){f.activationAnimationHasEnded=!0,f.runDeactivationUXLogicIfReady()},f.activateHandler=function(v){f.activateImpl(v)},f.deactivateHandler=function(){f.deactivateImpl()},f.focusHandler=function(){f.handleFocus()},f.blurHandler=function(){f.handleBlur()},f.resizeHandler=function(){f.layout()},f}return Object.defineProperty(p,"cssClasses",{get:function(){return l.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(p,"strings",{get:function(){return l.strings},enumerable:!1,configurable:!0}),Object.defineProperty(p,"numbers",{get:function(){return l.numbers},enumerable:!1,configurable:!0}),Object.defineProperty(p,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),p.prototype.init=function(){var b=this,f=this.supportsPressRipple();if(this.registerRootHandlers(f),f){var v=p.cssClasses,y=v.ROOT,x=v.UNBOUNDED;requestAnimationFrame(function(){b.adapter.addClass(y),b.adapter.isUnbounded()&&(b.adapter.addClass(x),b.layoutInternal())})}},p.prototype.destroy=function(){var b=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(p.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(p.cssClasses.FG_DEACTIVATION));var f=p.cssClasses,v=f.ROOT,y=f.UNBOUNDED;requestAnimationFrame(function(){b.adapter.removeClass(v),b.adapter.removeClass(y),b.removeCssVars()})}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},p.prototype.activate=function(b){this.activateImpl(b)},p.prototype.deactivate=function(){this.deactivateImpl()},p.prototype.layout=function(){var b=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame(function(){b.layoutInternal(),b.layoutFrame=0})},p.prototype.setUnbounded=function(b){var f=p.cssClasses.UNBOUNDED;b?this.adapter.addClass(f):this.adapter.removeClass(f)},p.prototype.handleFocus=function(){var b=this;requestAnimationFrame(function(){return b.adapter.addClass(p.cssClasses.BG_FOCUSED)})},p.prototype.handleBlur=function(){var b=this;requestAnimationFrame(function(){return b.adapter.removeClass(p.cssClasses.BG_FOCUSED)})},p.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},p.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},p.prototype.registerRootHandlers=function(b){var f,v;if(b){try{for(var y=o(u),x=y.next();!x.done;x=y.next()){var C=x.value;this.adapter.registerInteractionHandler(C,this.activateHandler)}}catch(I){f={error:I}}finally{try{x&&!x.done&&(v=y.return)&&v.call(y)}finally{if(f)throw f.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},p.prototype.registerDeactivationHandlers=function(b){var f,v;if(b.type==="keydown")this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var y=o(g),x=y.next();!x.done;x=y.next()){var C=x.value;this.adapter.registerDocumentInteractionHandler(C,this.deactivateHandler)}}catch(I){f={error:I}}finally{try{x&&!x.done&&(v=y.return)&&v.call(y)}finally{if(f)throw f.error}}},p.prototype.deregisterRootHandlers=function(){var b,f;try{for(var v=o(u),y=v.next();!y.done;y=v.next()){var x=y.value;this.adapter.deregisterInteractionHandler(x,this.activateHandler)}}catch(C){b={error:C}}finally{try{y&&!y.done&&(f=v.return)&&f.call(v)}finally{if(b)throw b.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},p.prototype.deregisterDeactivationHandlers=function(){var b,f;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var v=o(g),y=v.next();!y.done;y=v.next()){var x=y.value;this.adapter.deregisterDocumentInteractionHandler(x,this.deactivateHandler)}}catch(C){b={error:C}}finally{try{y&&!y.done&&(f=v.return)&&f.call(v)}finally{if(b)throw b.error}}},p.prototype.removeCssVars=function(){var b=this,f=p.strings,v=Object.keys(f);v.forEach(function(y){y.indexOf("VAR_")===0&&b.adapter.updateCssVariable(f[y],null)})},p.prototype.activateImpl=function(b){var f=this;if(!this.adapter.isSurfaceDisabled()){var v=this.activationState;if(!v.isActivated){var y=this.previousActivationEvent,x=y&&b!==void 0&&y.type!==b.type;if(!x){v.isActivated=!0,v.isProgrammatic=b===void 0,v.activationEvent=b,v.wasActivatedByPointer=v.isProgrammatic?!1:b!==void 0&&(b.type==="mousedown"||b.type==="touchstart"||b.type==="pointerdown");var C=b!==void 0&&d.length>0&&d.some(function(I){return f.adapter.containsEventTarget(I)});if(C){this.resetActivationState();return}b!==void 0&&(d.push(b.target),this.registerDeactivationHandlers(b)),v.wasElementMadeActive=this.checkElementMadeActive(b),v.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame(function(){d=[],!v.wasElementMadeActive&&b!==void 0&&(b.key===" "||b.keyCode===32)&&(v.wasElementMadeActive=f.checkElementMadeActive(b),v.wasElementMadeActive&&f.animateActivation()),v.wasElementMadeActive||(f.activationState=f.defaultActivationState())})}}}},p.prototype.checkElementMadeActive=function(b){return b!==void 0&&b.type==="keydown"?this.adapter.isSurfaceActive():!0},p.prototype.animateActivation=function(){var b=this,f=p.strings,v=f.VAR_FG_TRANSLATE_START,y=f.VAR_FG_TRANSLATE_END,x=p.cssClasses,C=x.FG_DEACTIVATION,I=x.FG_ACTIVATION,Z=p.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var F="",R="";if(!this.adapter.isUnbounded()){var X=this.getFgTranslationCoordinates(),S=X.startPoint,w=X.endPoint;F=S.x+"px, "+S.y+"px",R=w.x+"px, "+w.y+"px"}this.adapter.updateCssVariable(v,F),this.adapter.updateCssVariable(y,R),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(C),this.adapter.computeBoundingRect(),this.adapter.addClass(I),this.activationTimer=setTimeout(function(){b.activationTimerCallback()},Z)},p.prototype.getFgTranslationCoordinates=function(){var b=this.activationState,f=b.activationEvent,v=b.wasActivatedByPointer,y;v?y=c.getNormalizedEventCoords(f,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):y={x:this.frame.width/2,y:this.frame.height/2},y={x:y.x-this.initialSize/2,y:y.y-this.initialSize/2};var x={x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2};return{startPoint:y,endPoint:x}},p.prototype.runDeactivationUXLogicIfReady=function(){var b=this,f=p.cssClasses.FG_DEACTIVATION,v=this.activationState,y=v.hasDeactivationUXRun,x=v.isActivated,C=y||!x;C&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(f),this.fgDeactivationRemovalTimer=setTimeout(function(){b.adapter.removeClass(f)},l.numbers.FG_DEACTIVATION_MS))},p.prototype.rmBoundedActivationClasses=function(){var b=p.cssClasses.FG_ACTIVATION;this.adapter.removeClass(b),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},p.prototype.resetActivationState=function(){var b=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout(function(){return b.previousActivationEvent=void 0},p.numbers.TAP_DELAY_MS)},p.prototype.deactivateImpl=function(){var b=this,f=this.activationState;if(f.isActivated){var v=a({},f);f.isProgrammatic?(requestAnimationFrame(function(){b.animateDeactivation(v)}),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame(function(){b.activationState.hasDeactivationUXRun=!0,b.animateDeactivation(v),b.resetActivationState()}))}},p.prototype.animateDeactivation=function(b){var f=b.wasActivatedByPointer,v=b.wasElementMadeActive;(f||v)&&this.runDeactivationUXLogicIfReady()},p.prototype.layoutInternal=function(){var b=this;this.frame=this.adapter.computeBoundingRect();var f=Math.max(this.frame.height,this.frame.width),v=function(){var C=Math.sqrt(Math.pow(b.frame.width,2)+Math.pow(b.frame.height,2));return C+p.numbers.PADDING};this.maxRadius=this.adapter.isUnbounded()?f:v();var y=Math.floor(f*p.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&y%2!==0?this.initialSize=y-1:this.initialSize=y,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},p.prototype.updateLayoutCssVars=function(){var b=p.strings,f=b.VAR_FG_SIZE,v=b.VAR_LEFT,y=b.VAR_TOP,x=b.VAR_FG_SCALE;this.adapter.updateCssVariable(f,this.initialSize+"px"),this.adapter.updateCssVariable(x,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(v,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(y,this.unboundedCoords.top+"px"))},p})(s.MDCFoundation);t.MDCRippleFoundation=h,t.default=h}),"./packages/mdc-ripple/util.ts":(function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNormalizedEventCoords=t.supportsCssVariables=void 0;var n;function a(s,l){l===void 0&&(l=!1);var c=s.CSS,u=n;if(typeof n=="boolean"&&!l)return n;var g=c&&typeof c.supports=="function";if(!g)return!1;var d=c.supports("--css-vars","yes"),h=c.supports("(--css-vars: yes)")&&c.supports("color","#00000000");return u=d||h,l||(n=u),u}t.supportsCssVariables=a;function o(s,l,c){if(!s)return{x:0,y:0};var u=l.x,g=l.y,d=u+c.left,h=g+c.top,m,p;if(s.type==="touchstart"){var b=s;m=b.changedTouches[0].pageX-d,p=b.changedTouches[0].pageY-h}else{var f=s;m=f.pageX-d,p=f.pageY-h}return{x:m,y:p}}t.getNormalizedEventCoords=o}),"./packages/mdc-select/adapter.ts":(function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}),"./packages/mdc-select/component.ts":(function(e,t,r){"use strict";var n=this&&this.__extends||(function(){var Z=function(R,X){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,w){S.__proto__=w}||function(S,w){for(var Q in w)Object.prototype.hasOwnProperty.call(w,Q)&&(S[Q]=w[Q])},Z(R,X)};return function(F,R){if(typeof R!="function"&&R!==null)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");Z(F,R);function X(){this.constructor=F}F.prototype=R===null?Object.create(R):(X.prototype=R.prototype,new X)}})(),a=this&&this.__assign||function(){return a=Object.assign||function(Z){for(var F,R=1,X=arguments.length;R=this.adapter.getMenuItemCount())&&(h===c.numbers.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(h).trim()),this.adapter.setSelectedIndex(h),m&&this.adapter.closeMenu(),!p&&this.lastSelectedIndex!==h?this.handleChange():!p&&this.getValue()instanceof Array&&this.handleChange(),this.lastSelectedIndex=h)},d.prototype.setValue=function(h,m){m===void 0&&(m=!1);var p=this.adapter.getMenuItemValues().indexOf(h);this.setSelectedIndex(p,!1,m)},d.prototype.getValue=function(){var h=this.adapter.getSelectedIndex(),m=this.adapter.getMenuItemValues();return h instanceof Array?h.map(p=>m[p]||""):h!==c.numbers.UNSET_INDEX?m[h]:""},d.prototype.getDisabled=function(){return this.disabled},d.prototype.setDisabled=function(h){this.disabled=h,this.disabled?(this.adapter.addClass(c.cssClasses.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(c.cssClasses.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},d.prototype.openMenu=function(){this.adapter.addClass(c.cssClasses.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},d.prototype.setHelperTextContent=function(h){this.helperText&&this.helperText.setContent(h)},d.prototype.layout=function(){if(this.adapter.hasLabel()){var h=this.getValue().length>0,m=this.adapter.hasClass(c.cssClasses.FOCUSED),p=h||m,b=this.adapter.hasClass(c.cssClasses.REQUIRED);this.notchOutline(p),this.adapter.floatLabel(p),this.adapter.setLabelRequired(b)}},d.prototype.layoutOptions=function(){var h=this.adapter.getMenuItemValues(),m=h.indexOf(this.getValue());this.setSelectedIndex(m,!1,!0)},d.prototype.handleMenuOpened=function(){if(this.adapter.getMenuItemValues().length!==0){var h=this.getSelectedIndex(),m=h>=0?h:0;this.adapter.focusMenuItemAtIndex(m)}},d.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},d.prototype.handleMenuClosed=function(){this.adapter.removeClass(c.cssClasses.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},d.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue());var h=this.adapter.hasClass(c.cssClasses.REQUIRED);h&&this.useDefaultValidation&&this.setValid(this.isValid())},d.prototype.handleMenuItemAction=function(h){this.setSelectedIndex(h,!0)},d.prototype.handleFocus=function(){this.adapter.addClass(c.cssClasses.FOCUSED),this.layout(),this.adapter.activateBottomLine()},d.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},d.prototype.handleClick=function(h){if(!(this.disabled||this.recentlyClicked)){if(this.setClickDebounceTimeout(),this.isMenuOpen){this.adapter.closeMenu();return}this.adapter.setRippleCenter(h),this.openMenu()}},d.prototype.handleKeydown=function(h){if(!(this.isMenuOpen||!this.adapter.hasClass(c.cssClasses.FOCUSED))){var m=s.normalizeKey(h)===s.KEY.ENTER,p=s.normalizeKey(h)===s.KEY.SPACEBAR,b=s.normalizeKey(h)===s.KEY.ARROW_UP,f=s.normalizeKey(h)===s.KEY.ARROW_DOWN,v=h.ctrlKey||h.metaKey;if(!v&&(!p&&h.key&&h.key.length===1||p&&this.adapter.isTypeaheadInProgress())){var y=p?" ":h.key,x=this.adapter.typeaheadMatchItem(y,this.getSelectedIndex());x>=0&&this.setSelectedIndex(x),h.preventDefault();return}!m&&!p&&!b&&!f||(this.openMenu(),h.preventDefault())}},d.prototype.notchOutline=function(h){if(this.adapter.hasOutline()){var m=this.adapter.hasClass(c.cssClasses.FOCUSED);if(h){var p=c.numbers.LABEL_SCALE,b=this.adapter.getLabelWidth()*p;this.adapter.notchOutline(b)}else m||this.adapter.closeOutline()}},d.prototype.setLeadingIconAriaLabel=function(h){this.leadingIcon&&this.leadingIcon.setAriaLabel(h)},d.prototype.setLeadingIconContent=function(h){this.leadingIcon&&this.leadingIcon.setContent(h)},d.prototype.getUseDefaultValidation=function(){return this.useDefaultValidation},d.prototype.setUseDefaultValidation=function(h){this.useDefaultValidation=h},d.prototype.setValid=function(h){this.useDefaultValidation||(this.customValidity=h),this.adapter.setSelectAnchorAttr("aria-invalid",(!h).toString()),h?(this.adapter.removeClass(c.cssClasses.INVALID),this.adapter.removeMenuClass(c.cssClasses.MENU_INVALID)):(this.adapter.addClass(c.cssClasses.INVALID),this.adapter.addMenuClass(c.cssClasses.MENU_INVALID)),this.syncHelperTextValidity(h)},d.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(c.cssClasses.REQUIRED)&&!this.adapter.hasClass(c.cssClasses.DISABLED)?Array.isArray(this.getSelectedIndex())?this.getSelectedIndex().length>0:this.getSelectedIndex()!==c.numbers.UNSET_INDEX&&(this.getSelectedIndex()!==0||!!this.getValue()):this.customValidity},d.prototype.setRequired=function(h){h?this.adapter.addClass(c.cssClasses.REQUIRED):this.adapter.removeClass(c.cssClasses.REQUIRED),this.adapter.setSelectAnchorAttr("aria-required",h.toString()),this.adapter.setLabelRequired(h)},d.prototype.getRequired=function(){return this.adapter.getSelectAnchorAttr("aria-required")==="true"},d.prototype.init=function(){var h=this.adapter.getAnchorElement();h&&(this.adapter.setMenuAnchorElement(h),this.adapter.setMenuAnchorCorner(l.Corner.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(c.cssClasses.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(c.cssClasses.INVALID)),this.layout(),this.layoutOptions()},d.prototype.blur=function(){this.adapter.removeClass(c.cssClasses.FOCUSED),this.layout(),this.adapter.deactivateBottomLine();var h=this.adapter.hasClass(c.cssClasses.REQUIRED);h&&this.useDefaultValidation&&this.setValid(this.isValid())},d.prototype.syncHelperTextValidity=function(h){if(this.helperText){this.helperText.setValidity(h);var m=this.helperText.isVisible(),p=this.helperText.getId();m&&p?this.adapter.setSelectAnchorAttr(c.strings.ARIA_DESCRIBEDBY,p):this.adapter.removeSelectAnchorAttr(c.strings.ARIA_DESCRIBEDBY)}},d.prototype.setClickDebounceTimeout=function(){var h=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout(function(){h.recentlyClicked=!1},c.numbers.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},d})(o.MDCFoundation);t.MDCSelectFoundation=u,t.default=u}),"./packages/mdc-select/helper-text/adapter.ts":(function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}),"./packages/mdc-select/helper-text/component.ts":(function(e,t,r){"use strict";var n=this&&this.__extends||(function(){var l=function(u,g){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,h){d.__proto__=h}||function(d,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(d[m]=h[m])},l(u,g)};return function(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");l(c,u);function g(){this.constructor=c}c.prototype=u===null?Object.create(u):(g.prototype=u.prototype,new g)}})();Object.defineProperty(t,"__esModule",{value:!0}),t.MDCSelectHelperText=void 0;var a=r("./packages/mdc-base/component.ts"),o=r("./packages/mdc-select/helper-text/foundation.ts"),s=(function(l){n(c,l);function c(){return l!==null&&l.apply(this,arguments)||this}return c.attachTo=function(u){return new c(u)},Object.defineProperty(c.prototype,"foundationForSelect",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),c.prototype.getDefaultFoundation=function(){var u=this,g={addClass:function(h){return u.root.classList.add(h)},removeClass:function(h){return u.root.classList.remove(h)},hasClass:function(h){return u.root.classList.contains(h)},getAttr:function(h){return u.root.getAttribute(h)},setAttr:function(h,m){return u.root.setAttribute(h,m)},removeAttr:function(h){return u.root.removeAttribute(h)},setContent:function(h){u.root.textContent=h}};return new o.MDCSelectHelperTextFoundation(g)},c})(a.MDCComponent);t.MDCSelectHelperText=s}),"./packages/mdc-select/helper-text/constants.ts":(function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cssClasses=t.strings=void 0;var n={ARIA_HIDDEN:"aria-hidden",ROLE:"role"};t.strings=n;var a={HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg",HELPER_TEXT_VALIDATION_MSG_PERSISTENT:"mdc-select-helper-text--validation-msg-persistent"};t.cssClasses=a}),"./packages/mdc-select/helper-text/foundation.ts":(function(e,t,r){"use strict";var n=this&&this.__extends||(function(){var c=function(g,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,m){h.__proto__=m}||function(h,m){for(var p in m)Object.prototype.hasOwnProperty.call(m,p)&&(h[p]=m[p])},c(g,d)};return function(u,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");c(u,g);function d(){this.constructor=u}u.prototype=g===null?Object.create(g):(d.prototype=g.prototype,new d)}})(),a=this&&this.__assign||function(){return a=Object.assign||function(c){for(var u,g=1,d=arguments.length;g=g.length&&(g=void 0),{value:g&&g[m++],done:!g}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.MDCSelectIconFoundation=void 0;var s=r("./packages/mdc-base/foundation.ts"),l=r("./packages/mdc-select/icon/constants.ts"),c=["click","keydown"],u=(function(g){n(d,g);function d(h){var m=g.call(this,a(a({},d.defaultAdapter),h))||this;return m.savedTabIndex=null,m.interactionHandler=function(p){m.handleInteraction(p)},m}return Object.defineProperty(d,"strings",{get:function(){return l.strings},enumerable:!1,configurable:!0}),Object.defineProperty(d,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),d.prototype.init=function(){var h,m;this.savedTabIndex=this.adapter.getAttr("tabindex");try{for(var p=o(c),b=p.next();!b.done;b=p.next()){var f=b.value;this.adapter.registerInteractionHandler(f,this.interactionHandler)}}catch(v){h={error:v}}finally{try{b&&!b.done&&(m=p.return)&&m.call(p)}finally{if(h)throw h.error}}},d.prototype.destroy=function(){var h,m;try{for(var p=o(c),b=p.next();!b.done;b=p.next()){var f=b.value;this.adapter.deregisterInteractionHandler(f,this.interactionHandler)}}catch(v){h={error:v}}finally{try{b&&!b.done&&(m=p.return)&&m.call(p)}finally{if(h)throw h.error}}},d.prototype.setDisabled=function(h){this.savedTabIndex&&(h?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex),this.adapter.setAttr("role",l.strings.ICON_ROLE)))},d.prototype.setAriaLabel=function(h){this.adapter.setAttr("aria-label",h)},d.prototype.setContent=function(h){this.adapter.setContent(h)},d.prototype.handleInteraction=function(h){var m=h.key==="Enter"||h.keyCode===13;(h.type==="click"||m)&&this.adapter.notifyIconAction()},d})(s.MDCFoundation);t.MDCSelectIconFoundation=u,t.default=u}),"./packages/mdc-select/icon/index.ts":(function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(s,l,c,u){u===void 0&&(u=c),Object.defineProperty(s,u,{enumerable:!0,get:function(){return l[c]}})}:function(s,l,c,u){u===void 0&&(u=c),s[u]=l[c]}),a=this&&this.__exportStar||function(s,l){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(l,c)&&n(l,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.iconStrings=void 0,a(r("./packages/mdc-select/icon/adapter.ts"),t),a(r("./packages/mdc-select/icon/component.ts"),t),a(r("./packages/mdc-select/icon/foundation.ts"),t);var o=r("./packages/mdc-select/icon/constants.ts");Object.defineProperty(t,"iconStrings",{enumerable:!0,get:function(){return o.strings}})}),"./packages/mdc-select/index.ts":(function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(o,s,l,c){c===void 0&&(c=l),Object.defineProperty(o,c,{enumerable:!0,get:function(){return s[l]}})}:function(o,s,l,c){c===void 0&&(c=l),o[c]=s[l]}),a=this&&this.__exportStar||function(o,s){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(s,l)&&n(s,o,l)};Object.defineProperty(t,"__esModule",{value:!0}),a(r("./packages/mdc-select/adapter.ts"),t),a(r("./packages/mdc-select/component.ts"),t),a(r("./packages/mdc-select/constants.ts"),t),a(r("./packages/mdc-select/foundation.ts"),t),a(r("./packages/mdc-select/types.ts"),t),a(r("./packages/mdc-select/helper-text/index.ts"),t),a(r("./packages/mdc-select/icon/index.ts"),t)}),"./packages/mdc-select/types.ts":(function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})})})});var wEt=k((exports,module)=>{typeof CodeMirror>"u"&&(CodeMirror=void 0);var CodeMirror;typeof jQuery>"u"&&(jQuery=void 0);var jQuery;(function(){var Ajax={};Ajax.settings={},Ajax.post=function(e){return new AjaxRequest("post",e)},Ajax.get=function(e){return new AjaxRequest("get",e)};var AjaxRequest=function(e,t){var r={method:e,url:"",before:function(){},success:function(){},error:function(){},data:!1,async:!0,headers:{}};this.p=this.extend(r,t),this.p=this.extend(this.p,Ajax.settings),this.p.method=this.p.method.toUpperCase(),this.prepareData(),this.xhr=new XMLHttpRequest,this.xhr.open(this.p.method,this.p.url,this.p.async),this.setHeaders();var n=typeof this.p.before=="function"?this.p.before(this.xhr):!0;n!==!1&&this.send()};AjaxRequest.prototype={extend:function(e,t){if(t)for(var r in t)e[r]=t[r];return e},prepareData:function(){this.p.method==="POST"&&!this.isFormData()&&(this.p.headers["Content-Type"]="application/x-www-form-urlencoded"),typeof this.p.data=="object"&&!this.isFormData()&&(this.p.data=this.toParams(this.p.data)),this.p.method==="GET"&&(this.p.url=this.p.data?this.p.url+"?"+this.p.data:this.p.url)},setHeaders:function(){this.xhr.setRequestHeader("X-Requested-With",this.p.headers["X-Requested-With"]||"XMLHttpRequest");for(var e in this.p.headers)this.xhr.setRequestHeader(e,this.p.headers[e])},isFormData:function(){return typeof window.FormData<"u"&&this.p.data instanceof window.FormData},isComplete:function(){return!(this.xhr.status<200||this.xhr.status>=300&&this.xhr.status!==304)},send:function(){this.p.async?(this.xhr.onload=this.loaded.bind(this),this.xhr.send(this.p.data)):(this.xhr.send(this.p.data),this.loaded.call(this))},loaded:function(){if(this.isComplete()){var e=this.xhr.response,t=this.parseJson(e);e=t||e,typeof this.p.success=="function"&&this.p.success(e,this.xhr)}else typeof this.p.error=="function"&&this.p.error(this.xhr.statusText)},parseJson:function(e){try{var t=JSON.parse(e);if(t&&typeof t=="object")return t}catch{}return!1},toParams:function(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")}};var DomCache=[0],DomExpando="data"+new Date().getTime(),DomHClass="is-hidden",DomHMClass="is-hidden-mobile",Dom=function(e,t){return this.parse(e,t)};Dom.ready=function(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)},Dom.prototype={get sdom(){return!0},get length(){return this.nodes.length},parse:function(e,t){var r,n=/^\s*<(\w+|!)[^>]*>/;if(!e)r=[];else{if(e.sdom)return this.nodes=e.nodes,e;typeof e!="string"?e.nodeType&&e.nodeType===11?r=e.childNodes:r=e.nodeType||e===window?[e]:e:n.test(e)?r=this.create(e):r=this._query(e,t)}this.nodes=this._slice(r)},create:function(e){if(/^<(\w+)\s*\/?>(?:<\/\1>|)$/.test(e))return[document.createElement(RegExp.$1)];var t=[],r=document.createElement("div"),n=r.childNodes;r.innerHTML=e;for(var a=0,o=n.length;a0},filter:function(e){var t;return e===void 0?this:(typeof e=="function"?t=e:t=function(r){return e instanceof Node?e===r:e&&e.sdom?e.nodes.indexOf(r)!==-1:(r.matches=r.matches||r.msMatchesSelector||r.webkitMatchesSelector,r.nodeType===1?r.matches(e||"*"):!1)},new Dom(this.nodes.filter(t)))},not:function(e){return this.filter(function(t){return!new Dom(t).is(e||!0)})},find:function(e){var t=[];return this.each(function(r){for(var n=this._query(e||"*",r),a=0;a"u")){if(typeof e=="string")return e;if(e instanceof Node||e.nodeType)return e.cloneNode(!0);if("length"in e)return[].map.call(this._toArray(e),function(t){return t.cloneNode(!0)})}},_slice:function(e){return!e||e.length===0?[]:e.length?[].slice.call(e.nodes||e):[e]},_eachClass:function(e,t){return this.each(function(r){if(e){var n=function(a){r.classList&&r.classList[t](a)};e.split(" ").forEach(n)}})},_triggerEvent:function(e){var t=this.get();return t&&t.nodeType!==3&&t[e](),this},_getOneHandler:function(e,t){var r=this;return function(){e.apply(this,arguments),r.off(t)}},_getEventNamespace:function(e){var t=e.split("."),r=t[1]?t[1]:"_events";return t[2]?r+t[2]:r},_getEventName:function(e){return e.split(".")[0]},_offEvent:function(e,t,r,n,a){for(var o in e._e)for(var s in e._e[o])if(a(s,o,t,r))for(var l=e._e[o][s],c=0;c"u"))if(r.translations&&($R.lang=$R.extend(!0,{},$R.lang,r.translations)),r.modals&&($R.modals=$R.extend(!0,{},$R.modals,r.modals)),e==="mixin")$R[$R.env[e]][t]=r;else{var n=function(){};if(n.prototype=r,r.mixins)for(var a=0;a"u"&&($R.lang[e]={}),$R.lang[e]=$R.extend($R.lang[e],t)},$R.create=function(e){var t=e.split("."),r=[].slice.call(arguments,1),n="classes";typeof $R.env[t[0]]<"u"&&(n=$R.env[t[0]],e=t.slice(1).join("."));var a=new $R[n][e];if(a.init){var o=a.init.apply(a,r);return o||a}return a},$R.inherit=function(e,t){var r=function(){};r.prototype=t;var n=new r;for(var a in e.prototype)e.prototype.__lookupGetter__(a)?n.__defineGetter__(a,e.prototype.__lookupGetter__(a)):n[a]=e.prototype[a];return e.prototype=n,e.prototype.super=t,e},$R.error=function(e){throw e},$R.extend=function(){var e={},t=!1,r=0,n=arguments.length;Object.prototype.toString.call(arguments[0])==="[object Boolean]"&&(t=arguments[0],r++);for(var a=function(s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(t&&Object.prototype.toString.call(s[l])==="[object Object]"?e[l]=$R.extend(!0,e[l],s[l]):e[l]=s[l])};r

    ",markerChar:"\uFEFF",imageTypes:["image/png","image/jpeg","image/gif"],imageAttrs:["alt","title","src","class","width","height","srcset"],inlineTags:["a","span","strong","strike","b","u","em","i","code","del","ins","samp","kbd","sup","sub","mark","var","cite","small","abbr"],blockTags:["pre","ul","ol","li","p","h1","h2","h3","h4","h5","h6","dl","dt","dd","div","table","tbody","thead","tfoot","tr","th","td","blockquote","output","figcaption","figure","address","section","header","footer","aside","article","iframe"],regex:{youtube:/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w-\s])([\w-]{11})(?=[^\w-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/gi,vimeo:/(http|https)?:\/\/(?:www.|player.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:\/[a-zA-Z0-9_-]+)?/gi,imageurl:/((https?|www)[^\s]+\.)(jpe?g|png|gif)(\?[^\s-]+)?/gi,url:/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/gi},input:!0,zindex:!1,modes:{inline:{pastePlainText:!0,pasteImages:!1,enterKey:!1,toolbar:!1,autoparse:!1,source:!1,showSource:!1,styles:!1,air:!1},original:{styles:!1}}},$R.lang.en={format:"Format",image:"Image",file:"File",link:"Link",bold:"Bold",italic:"Italic",deleted:"Strikethrough",underline:"Underline",superscript:"Superscript",subscript:"Subscript","bold-abbr":"B","italic-abbr":"I","deleted-abbr":"S","underline-abbr":"U","superscript-abbr":"Sup","subscript-abbr":"Sub",lists:"Lists","link-insert":"Insert Link","link-edit":"Edit Link","link-in-new-tab":"Open link in new tab",unlink:"Unlink",cancel:"Cancel",close:"Close",insert:"Insert",save:"Save",delete:"Delete",text:"Text",edit:"Edit",title:"Alt",paragraph:"Normal text",quote:"Quote",code:"Code",heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",heading4:"Heading 4",heading5:"Heading 5",heading6:"Heading 6",filename:"Name",optional:"optional",unorderedlist:"Unordered List",orderedlist:"Ordered List",outdent:"Outdent",indent:"Indent",horizontalrule:"Line",upload:"Upload","upload-label":"Drop files here or click to upload","accessibility-help-label":"Rich text editor",caption:"Caption",bulletslist:"Bullets",numberslist:"Numbers","image-position":"Position",none:"None",left:"Left",right:"Right",center:"Center",undo:"Undo",redo:"Redo"},$R.buttons={html:{title:"HTML",icon:!0,api:"module.source.toggle"},undo:{title:"## undo ##",icon:!0,api:"module.buffer.undo"},redo:{title:"## redo ##",icon:!0,api:"module.buffer.redo"},format:{title:"## format ##",icon:!0,dropdown:{p:{title:"## paragraph ##",api:"module.block.format",args:{tag:"p"}},blockquote:{title:"## quote ##",api:"module.block.format",args:{tag:"blockquote"}},pre:{title:"## code ##",api:"module.block.format",args:{tag:"pre"}},h1:{title:"## heading1 ##",api:"module.block.format",args:{tag:"h1"}},h2:{title:"## heading2 ##",api:"module.block.format",args:{tag:"h2"}},h3:{title:"## heading3 ##",api:"module.block.format",args:{tag:"h3"}},h4:{title:"## heading4 ##",api:"module.block.format",args:{tag:"h4"}},h5:{title:"## heading5 ##",api:"module.block.format",args:{tag:"h5"}},h6:{title:"## heading6 ##",api:"module.block.format",args:{tag:"h6"}}}},bold:{title:"## bold-abbr ##",icon:!0,tooltip:"## bold ##",api:"module.inline.format",args:{tag:"b"}},italic:{title:"## italic-abbr ##",icon:!0,tooltip:"## italic ##",api:"module.inline.format",args:{tag:"i"}},deleted:{title:"## deleted-abbr ##",icon:!0,tooltip:"## deleted ##",api:"module.inline.format",args:{tag:"del"}},underline:{title:"## underline-abbr ##",icon:!0,tooltip:"## underline ##",api:"module.inline.format",args:{tag:"u"}},sup:{title:"## superscript-abbr ##",icon:!0,tooltip:"## superscript ##",api:"module.inline.format",args:{tag:"sup"}},sub:{title:"## subscript-abbr ##",icon:!0,tooltip:"## subscript ##",api:"module.inline.format",args:{tag:"sub"}},lists:{title:"## lists ##",icon:!0,observe:"list",dropdown:{observe:"list",unorderedlist:{title:"• ## unorderedlist ##",api:"module.list.toggle",args:"ul"},orderedlist:{title:"1. ## orderedlist ##",api:"module.list.toggle",args:"ol"},outdent:{title:"< ## outdent ##",api:"module.list.outdent"},indent:{title:"> ## indent ##",api:"module.list.indent"}}},ul:{title:"• ## bulletslist ##",icon:!0,api:"module.list.toggle",observe:"list",args:"ul"},ol:{title:"1. ## numberslist ##",icon:!0,api:"module.list.toggle",observe:"list",args:"ol"},outdent:{title:"## outdent ##",icon:!0,api:"module.list.outdent",observe:"list"},indent:{title:"## indent ##",icon:!0,api:"module.list.indent",observe:"list"},image:{title:"## image ##",icon:!0,api:"module.image.open"},file:{title:"## file ##",icon:!0,api:"module.file.open"},link:{title:"## link ##",icon:!0,observe:"link",dropdown:{observe:"link",link:{title:"## link-insert ##",api:"module.link.open"},unlink:{title:"## unlink ##",api:"module.link.unlink"}}},line:{title:"## horizontalrule ##",icon:!0,api:"module.line.insert"}};var App=function(e,t,r){this.module={},this.plugin={},this.instances={},this.started=!1,this.stopped=!1,this.uuid=r,this.rootElement=e,this.rootOpts=t,this.dragInside=!1,this.dragComponentInside=!1,this.keycodes=$R.keycodes,this.namespace="redactor",this.$win=$R.dom(window),this.$doc=$R.dom(document),this.$body=$R.dom("body"),this.editorReadOnly=!1,this.opts=$R.create("service.options",t,e),this.lang=$R.create("service.lang",this),this.buildServices(),this.buildModules(),this.buildPlugins(),this.start()};App.prototype={start:function(){this.stopped=!1,this.broadcast("start"),this.broadcast("startcode"),this.opts.clickToEdit?this.broadcast("startclicktoedit"):(this.broadcast("enable"),this.opts.showSource&&this.broadcast("startcodeshow"),this.broadcast("enablefocus")),this.broadcast("started"),this.started=!0},stop:function(){this.started=!1,this.stopped=!0,this.broadcast("stop"),this.broadcast("disable"),this.broadcast("stopped")},isStarted:function(){return this.started},isStopped:function(){return this.stopped},buildServices:function(){var e=["options","lang"],t=["uuid","keycodes","opts","lang","$win","$doc","$body"],r=[];for(var n in $R.services)e.indexOf(n)===-1&&(this[n]=$R.create("service."+n,this),r.push(n),t.push(n));for(var a=0;a0;){var n=t.attributes[r],a=n.name;a!=="style"&&a!=="class"&&t.removeAttributeNode(n)}})},_convertStyleQuotes:function(e){var t=e.attr("style");t&&e.attr("style",t.replace(/"/g,"'"))},_clearAll:function(e,t){t!==!1&&this.selection.save();for(var r=0;r0;)n.removeAttribute(n.attributes[0].name);return e=this._unwrapSpanWithoutAttr(e),t!==!1&&this.selection.restore(),e},_unwrapSpanWithoutAttr:function(e){for(var t=[],r=0;r"u"&&t&&t[0]!==!1?t[0]:r},_set:function(e,t){for(var r in e){var n=t===""?r:t+"."+r;typeof e[r]=="object"?this._set(e[r],n):(this.callbacks[n]=[],this.callbacks[n].push(e[r]))}},_loop:function(e,t,r){var n;for(var a in r)if(e===a)for(var o=0;os.height)};$R.add("service","selection",{init:function(e){this.app=e},is:function(){var e=this.get();if(e){var t=e.anchorNode,r=this.inspector.parse(t);return r.isInEditor()||r.isEditor()}return!1},isCollapsed:function(){var e=this.get(),t=this.getRange();return e&&e.isCollapsed?!0:!!(t&&t.toString().length===0)},isBackwards:function(){var e=!1,t=this.get();if(t&&!t.isCollapsed){var r=document.createRange();r.setStart(t.anchorNode,t.anchorOffset),r.setEnd(t.focusNode,t.focusOffset),e=r.collapsed,r.detach()}return e},isIn:function(e){var t=$R.dom(e).get(),r=this.getCurrent();return r&&t?t.contains(r):!1},isText:function(){var e=this.get();if(e){var t=e.anchorNode,r=this.getBlock(t),n=this.getBlocks();if(r&&this.inspector.isTableCellTag(r.tagName)||r===!1&&n.length===0)return!0}return!1},isAll:function(e){var t=this.utils.getNode(e);if(!t)return!1;var r=this.editor.isEditor(t),n=this.inspector.parse(t);if(!n.isFigcaption()&&this.component.isNonEditable(t)&&this.component.isActive(t))return!0;if(r){var a=this.editor.getElement(),o=a.html().replace(/

    <\/p>$/i,""),s=this.getHtml(!1).length,l=o.length;if(s!==l)return!1}if(r&&this.editor.isEmpty()||this.isCollapsed())return!1;var c=this.offset.get(t,!0),u=this.offset.size(t,!0);return!r&&n.isComponentType("code")&&(u=this.getText().trim().length),!!(c&&c.start===0&&c.end===u)},hasNonEditable:function(){var e=this.getHtml(),t=$R.dom("

    ").html(e);return!this.isCollapsed()&&t.find(".non-editable").length!==0},setRange:function(e){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)},setAll:function(e){var t=this.utils.getNode(e);if(t){var r=this.inspector.parse(t);if(this.component.clearActive(),this.editor.focus(),this.editor.saveScroll(),this.editor.disableNonEditables(),t&&t.tagName==="TABLE"){var n=r.findFirstNode("td, th"),a=r.findLastNode("td, th");$R.dom(n).prepend(this.marker.build("start")),$R.dom(a).append(this.marker.build("end")),this.restoreMarkers()}else if(!r.isFigcaption()&&this.component.isNonEditable(t))this.component.setActive(t);else{r.isComponentType("code")&&(t=r.getComponentCodeElement(),t.focus());var o=document.createRange();o.selectNodeContents(t),this.setRange(o)}this.editor.enableNonEditables(),this.editor.restoreScroll()}},get:function(){var e=window.getSelection();return e.rangeCount>0?e:null},getRange:function(){var e=this.get();return e&&e.getRangeAt(0)?e.getRangeAt(0):null},getTextBeforeCaret:function(e){e=typeof e>"u"?1:e;var t=this.editor.getElement().get(),r=this.getRange(),n="";return r&&(r=r.cloneRange(),r.collapse(!0),r.setStart(t,0),n=r.toString().slice(-e)),n},getTextAfterCaret:function(e){e=typeof e>"u"?1:e;var t=this.editor.getElement().get(),r=this.getRange(),n="";if(r){var a=r.cloneRange();a.selectNodeContents(t),a.setStart(r.endContainer,r.endOffset),n=a.toString().slice(0,e)}return n},getPosition:function(){var e=this.getRange(),t={top:0,left:0,width:0,height:0};if(window.getSelection&&e.getBoundingClientRect){e=e.cloneRange();var r=e.startOffset-1;e.setStart(e.startContainer,r<0?0:r);var n=e.getBoundingClientRect();t={top:n.top,left:n.left,width:n.right-n.left,height:n.bottom-n.top}}return t},getCurrent:function(){var e=!1,t=this.get(),r=this.component.getActive();if(r)e=r;else if(t&&this.is()){var n=this.inspector.parse(t.anchorNode);e=n.isEditor()?!1:t.anchorNode}return e},getParent:function(){var e=!1,t=this.getCurrent();if(t){var r=t.parentNode,n=this.inspector.parse(r);e=n.isEditor()?!1:r}return e},getElement:function(e){for(var t=e||this.getCurrent();t;){var r=this.inspector.parse(t);if(r.isElement()&&r.isInEditor())return t;t=t.parentNode}return!1},getInline:function(e){for(var t=e||this.getCurrent(),r=!1;t;)this._isInlineNode(t)&&(r=t),t=t.parentNode;return r},getInlineFirst:function(e){for(var t=e||this.getCurrent();t;){if(this._isInlineNode(t))return t;t=t.parentNode}return!1},getInlineAll:function(e){for(var t=e||this.getCurrent(),r=[];t;)this._isInlineNode(t)&&r.push(t),t=t.parentNode;return r},getBlock:function(e){for(var t=e||this.getCurrent();t;){var r=this.inspector.parse(t),n=this.inspector.isBlockTag(t.tagName);if(n&&r.isInEditor(t))return t;t=t.parentNode}return!1},getInlinesAllSelected:function(e){if(this.isAll())return[];var t=this.getInlines({all:!0}),r=this.getNodes({textnodes:!0,inline:!1}),n=this.getText().replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),a=[];if(r.length!==0)return a;if(n==="")a=t;else if(t.length>1)for(var o=0;o<\/p>$/i,"")}return t},clear:function(){this.component.clearActive(),this.get().removeAllRanges()},collapseToStart:function(){var e=this.get();e&&!e.isCollapsed&&e.collapseToStart()},collapseToEnd:function(){var e=this.get();e&&!e.isCollapsed&&e.collapseToEnd()},saveActiveComponent:function(){var e=this.component.getActive();return e?(this.savedComponent=e,!0):!1},restoreActiveComponent:function(){return this.savedComponent?(this.component.setActive(this.savedComponent),!0):!1},save:function(){this._clearSaved();var e=this.getElement(),t=["TD","TH","P","DIV","PRE","H1","H2","H3","H4","H5","H6","LI","BLOCKQUOTE"];e&&t.indexOf(e.tagName)!==-1&&(e.innerHTML===""||e.innerHTML==="
    ")?this.savedElement=e:this.saveActiveComponent()||(this.saved=this.offset.get())},restore:function(){!this.saved&&!this.savedComponent&&!this.savedElement||(this.editor.saveScroll(),this.savedElement?this.caret.setStart(this.savedElement):this.restoreActiveComponent()||this.offset.set(this.saved),this._clearSaved(),this.editor.restoreScroll())},saveMarkers:function(){this._clearSaved(),this.saveActiveComponent()||this.marker.insert()},restoreMarkers:function(){this.editor.saveScroll(),this.restoreActiveComponent()||this.marker.restore(),this._clearSaved(),this.editor.restoreScroll()},_getNextNode:function(e){if(e.hasChildNodes())return e.firstChild;for(;e&&!e.nextSibling;)e=e.parentNode;return e?e.nextSibling:null},_getNodesComponent:function(e){var t=this.getCurrent(),r=this.inspector.parse(t);return r.isFigcaption()?[r.getFigcaption()]:[e]},_getRangeSelectedNodes:function(){var e=[],t=this.getRange(),r=t.startContainer,n=t.startContainer,a=t.endContainer,o=this.editor.getElement();if(n===o.get()&&this.isAll())e=this.utils.getChildNodes(o);else if(r===a)e=[r];else{for(;r&&r!==a;)e.push(r=this._getNextNode(r));for(r=t.startContainer;r&&r!==t.commonAncestorContainer;)e.unshift(r),r=r.parentNode}return e},_isInNodesArray:function(e,t){return e.indexOf(t)!==-1},_filterEditor:function(e){for(var t=[],r=0;r":e.get();this.$editor=$R.dom(t)},_getScrollTarget:function(){var e=this.$doc;return this.opts.toolbarFixedTarget!==document?e=$R.dom(this.opts.toolbarFixedTarget):e=this.opts.scrollTarget?$R.dom(this.opts.scrollTarget):e,e},_isContenteditableFocus:function(){var e=this.selection.getBlock(),t=e?$R.dom(e).closest("[contenteditable=true]").not(".redactor-in"):[];return t.length!==0}}),$R.add("service","container",{init:function(e){this.app=e},start:function(){this._build()},getElement:function(){return this.$container},_build:function(){var e=this.element.isType("inline")?"":"
    ";this.$container=$R.dom(e)}}),$R.add("service","source",{init:function(e){this.app=e,this.$source={},this.content=""},start:function(){this._build(),this._buildName(),this._buildStartedContent()},getElement:function(){return this.$source},getCode:function(){return this.$source.val()},getName:function(){return this.$source.attr("name")},getStartedContent:function(){return this.content},setCode:function(e){return this.insertion.set(e,!0,!1)},isNameGenerated:function(){return this.name},rebuildStartedContent:function(){this._buildStartedContent()},_build:function(){var e=this.element.getElement(),t=this.element.isType("textarea"),r=t?e.get():"