diff --git a/static/assets/app.js b/static/assets/app.js index f8b7e3228..75016dbac 100644 --- a/static/assets/app.js +++ b/static/assets/app.js @@ -1,48 +1,48 @@ -import{a as hg}from"./chunk-GJ6CDUB5.js";import{a as ka}from"./chunk-BZUL2CAN.js";import{a as H,b as Ce,c as us,d as Rk,e as pi,f as po,g as Jl,h as wa,i as bt}from"./chunk-3NXJ7VWC.js";var jS=po((poe,zS)=>{"use strict";var _h=Object.prototype.hasOwnProperty,US=Object.prototype.toString,RS=Object.defineProperty,LS=Object.getOwnPropertyDescriptor,IS=function(e){return typeof Array.isArray=="function"?Array.isArray(e):US.call(e)==="[object Array]"},DS=function(e){if(!e||US.call(e)!=="[object Object]")return!1;var i=_h.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&_h.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!r)return!1;var n;for(n in e);return typeof n=="undefined"||_h.call(e,n)},MS=function(e,i){RS&&i.name==="__proto__"?RS(e,i.name,{enumerable:!0,configurable:!0,value:i.newValue,writable:!0}):e[i.name]=i.newValue},NS=function(e,i){if(i==="__proto__")if(_h.call(e,i)){if(LS)return LS(e,i).value}else return;return e[i]};zS.exports=function t(){var e,i,r,n,o,s,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l{});var RO=po((XO,fX)=>{(function(t,e){typeof XO=="object"?fX.exports=XO=e():typeof define=="function"&&define.amd?define([],e):t.CryptoJS=e()})(XO,function(){var t=t||function(e,i){var r;if(typeof window!="undefined"&&window.crypto&&(r=window.crypto),typeof self!="undefined"&&self.crypto&&(r=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(r=globalThis.crypto),!r&&typeof window!="undefined"&&window.msCrypto&&(r=window.msCrypto),!r&&typeof global!="undefined"&&global.crypto&&(r=global.crypto),!r&&typeof us=="function")try{r=uX()}catch(w){}var n=function(){if(r){if(typeof r.getRandomValues=="function")try{return r.getRandomValues(new Uint32Array(1))[0]}catch(w){}if(typeof r.randomBytes=="function")try{return r.randomBytes(4).readInt32LE()}catch(w){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function w(){}return function(T){var $;return w.prototype=T,$=new w,w.prototype=null,$}}(),s={},a=s.lib={},l=a.Base=function(){return{extend:function(w){var T=o(this);return w&&T.mixIn(w),(!T.hasOwnProperty("init")||this.init===T.init)&&(T.init=function(){T.$super.init.apply(this,arguments)}),T.init.prototype=T,T.$super=this,T},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var T in w)w.hasOwnProperty(T)&&(this[T]=w[T]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=l.extend({init:function(w,T){w=this.words=w||[],T!=i?this.sigBytes=T:this.sigBytes=w.length*4},toString:function(w){return(w||f).stringify(this)},concat:function(w){var T=this.words,$=w.words,I=this.sigBytes,_=w.sigBytes;if(this.clamp(),I%4)for(var A=0;A<_;A++){var q=$[A>>>2]>>>24-A%4*8&255;T[I+A>>>2]|=q<<24-(I+A)%4*8}else for(var le=0;le<_;le+=4)T[I+le>>>2]=$[le>>>2];return this.sigBytes+=_,this},clamp:function(){var w=this.words,T=this.sigBytes;w[T>>>2]&=4294967295<<32-T%4*8,w.length=e.ceil(T/4)},clone:function(){var w=l.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var T=[],$=0;$>>2]>>>24-_%4*8&255;I.push((A>>>4).toString(16)),I.push((A&15).toString(16))}return I.join("")},parse:function(w){for(var T=w.length,$=[],I=0;I>>3]|=parseInt(w.substr(I,2),16)<<24-I%8*4;return new c.init($,T/2)}},d=u.Latin1={stringify:function(w){for(var T=w.words,$=w.sigBytes,I=[],_=0;_<$;_++){var A=T[_>>>2]>>>24-_%4*8&255;I.push(String.fromCharCode(A))}return I.join("")},parse:function(w){for(var T=w.length,$=[],I=0;I>>2]|=(w.charCodeAt(I)&255)<<24-I%4*8;return new c.init($,T)}},p=u.Utf8={stringify:function(w){try{return decodeURIComponent(escape(d.stringify(w)))}catch(T){throw new Error("Malformed UTF-8 data")}},parse:function(w){return d.parse(unescape(encodeURIComponent(w)))}},g=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=p.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var T,$=this._data,I=$.words,_=$.sigBytes,A=this.blockSize,q=A*4,le=_/q;w?le=e.ceil(le):le=e.max((le|0)-this._minBufferSize,0);var F=le*A,U=e.min(F*4,_);if(F){for(var ie=0;ie{(function(t,e){typeof LO=="object"?hX.exports=LO=e(RO()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(LO,function(t){return function(e){var i=t,r=i.lib,n=r.WordArray,o=r.Hasher,s=i.algo,a=[];(function(){for(var p=0;p<64;p++)a[p]=e.abs(e.sin(p+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(p,g){for(var x=0;x<16;x++){var S=g+x,w=p[S];p[S]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var T=this._hash.words,$=p[g+0],I=p[g+1],_=p[g+2],A=p[g+3],q=p[g+4],le=p[g+5],F=p[g+6],U=p[g+7],ie=p[g+8],ue=p[g+9],re=p[g+10],de=p[g+11],me=p[g+12],we=p[g+13],j=p[g+14],ae=p[g+15],V=T[0],E=T[1],B=T[2],ne=T[3];V=c(V,E,B,ne,$,7,a[0]),ne=c(ne,V,E,B,I,12,a[1]),B=c(B,ne,V,E,_,17,a[2]),E=c(E,B,ne,V,A,22,a[3]),V=c(V,E,B,ne,q,7,a[4]),ne=c(ne,V,E,B,le,12,a[5]),B=c(B,ne,V,E,F,17,a[6]),E=c(E,B,ne,V,U,22,a[7]),V=c(V,E,B,ne,ie,7,a[8]),ne=c(ne,V,E,B,ue,12,a[9]),B=c(B,ne,V,E,re,17,a[10]),E=c(E,B,ne,V,de,22,a[11]),V=c(V,E,B,ne,me,7,a[12]),ne=c(ne,V,E,B,we,12,a[13]),B=c(B,ne,V,E,j,17,a[14]),E=c(E,B,ne,V,ae,22,a[15]),V=u(V,E,B,ne,I,5,a[16]),ne=u(ne,V,E,B,F,9,a[17]),B=u(B,ne,V,E,de,14,a[18]),E=u(E,B,ne,V,$,20,a[19]),V=u(V,E,B,ne,le,5,a[20]),ne=u(ne,V,E,B,re,9,a[21]),B=u(B,ne,V,E,ae,14,a[22]),E=u(E,B,ne,V,q,20,a[23]),V=u(V,E,B,ne,ue,5,a[24]),ne=u(ne,V,E,B,j,9,a[25]),B=u(B,ne,V,E,A,14,a[26]),E=u(E,B,ne,V,ie,20,a[27]),V=u(V,E,B,ne,we,5,a[28]),ne=u(ne,V,E,B,_,9,a[29]),B=u(B,ne,V,E,U,14,a[30]),E=u(E,B,ne,V,me,20,a[31]),V=f(V,E,B,ne,le,4,a[32]),ne=f(ne,V,E,B,ie,11,a[33]),B=f(B,ne,V,E,de,16,a[34]),E=f(E,B,ne,V,j,23,a[35]),V=f(V,E,B,ne,I,4,a[36]),ne=f(ne,V,E,B,q,11,a[37]),B=f(B,ne,V,E,U,16,a[38]),E=f(E,B,ne,V,re,23,a[39]),V=f(V,E,B,ne,we,4,a[40]),ne=f(ne,V,E,B,$,11,a[41]),B=f(B,ne,V,E,A,16,a[42]),E=f(E,B,ne,V,F,23,a[43]),V=f(V,E,B,ne,ue,4,a[44]),ne=f(ne,V,E,B,me,11,a[45]),B=f(B,ne,V,E,ae,16,a[46]),E=f(E,B,ne,V,_,23,a[47]),V=d(V,E,B,ne,$,6,a[48]),ne=d(ne,V,E,B,U,10,a[49]),B=d(B,ne,V,E,j,15,a[50]),E=d(E,B,ne,V,le,21,a[51]),V=d(V,E,B,ne,me,6,a[52]),ne=d(ne,V,E,B,A,10,a[53]),B=d(B,ne,V,E,re,15,a[54]),E=d(E,B,ne,V,I,21,a[55]),V=d(V,E,B,ne,ie,6,a[56]),ne=d(ne,V,E,B,ae,10,a[57]),B=d(B,ne,V,E,F,15,a[58]),E=d(E,B,ne,V,we,21,a[59]),V=d(V,E,B,ne,q,6,a[60]),ne=d(ne,V,E,B,de,10,a[61]),B=d(B,ne,V,E,_,15,a[62]),E=d(E,B,ne,V,ue,21,a[63]),T[0]=T[0]+V|0,T[1]=T[1]+E|0,T[2]=T[2]+B|0,T[3]=T[3]+ne|0},_doFinalize:function(){var p=this._data,g=p.words,x=this._nDataBytes*8,S=p.sigBytes*8;g[S>>>5]|=128<<24-S%32;var w=e.floor(x/4294967296),T=x;g[(S+64>>>9<<4)+15]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,g[(S+64>>>9<<4)+14]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,p.sigBytes=(g.length+1)*4,this._process();for(var $=this._hash,I=$.words,_=0;_<4;_++){var A=I[_];I[_]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360}return $},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p}});function c(p,g,x,S,w,T,$){var I=p+(g&x|~g&S)+w+$;return(I<>>32-T)+g}function u(p,g,x,S,w,T,$){var I=p+(g&S|x&~S)+w+$;return(I<>>32-T)+g}function f(p,g,x,S,w,T,$){var I=p+(g^x^S)+w+$;return(I<>>32-T)+g}function d(p,g,x,S,w,T,$){var I=p+(x^(g|~S))+w+$;return(I<>>32-T)+g}i.MD5=o._createHelper(l),i.HmacMD5=o._createHmacHelper(l)}(Math),t.MD5})});var OX=po((IO,pX)=>{(function(t,e){typeof IO=="object"?pX.exports=IO=e(RO()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(IO,function(t){return function(e){var i=t,r=i.lib,n=r.WordArray,o=r.Hasher,s=i.algo,a=[],l=[];(function(){function f(x){for(var S=e.sqrt(x),w=2;w<=S;w++)if(!(x%w))return!1;return!0}function d(x){return(x-(x|0))*4294967296|0}for(var p=2,g=0;g<64;)f(p)&&(g<8&&(a[g]=d(e.pow(p,1/2))),l[g]=d(e.pow(p,1/3)),g++),p++})();var c=[],u=s.SHA256=o.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(f,d){for(var p=this._hash.words,g=p[0],x=p[1],S=p[2],w=p[3],T=p[4],$=p[5],I=p[6],_=p[7],A=0;A<64;A++){if(A<16)c[A]=f[d+A]|0;else{var q=c[A-15],le=(q<<25|q>>>7)^(q<<14|q>>>18)^q>>>3,F=c[A-2],U=(F<<15|F>>>17)^(F<<13|F>>>19)^F>>>10;c[A]=le+c[A-7]+U+c[A-16]}var ie=T&$^~T&I,ue=g&x^g&S^x&S,re=(g<<30|g>>>2)^(g<<19|g>>>13)^(g<<10|g>>>22),de=(T<<26|T>>>6)^(T<<21|T>>>11)^(T<<7|T>>>25),me=_+de+ie+l[A]+c[A],we=re+ue;_=I,I=$,$=T,T=w+me|0,w=S,S=x,x=g,g=me+we|0}p[0]=p[0]+g|0,p[1]=p[1]+x|0,p[2]=p[2]+S|0,p[3]=p[3]+w|0,p[4]=p[4]+T|0,p[5]=p[5]+$|0,p[6]=p[6]+I|0,p[7]=p[7]+_|0},_doFinalize:function(){var f=this._data,d=f.words,p=this._nDataBytes*8,g=f.sigBytes*8;return d[g>>>5]|=128<<24-g%32,d[(g+64>>>9<<4)+14]=e.floor(p/4294967296),d[(g+64>>>9<<4)+15]=p,f.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var f=o.clone.call(this);return f._hash=this._hash.clone(),f}});i.SHA256=o._createHelper(u),i.HmacSHA256=o._createHmacHelper(u)}(Math),t.SHA256})});var gX=po((DO,mX)=>{(function(t,e){typeof DO=="object"?mX.exports=DO=e(RO()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(DO,function(t){return function(){var e=t,i=e.lib,r=i.WordArray,n=e.enc,o=n.Base64={stringify:function(a){var l=a.words,c=a.sigBytes,u=this._map;a.clamp();for(var f=[],d=0;d>>2]>>>24-d%4*8&255,g=l[d+1>>>2]>>>24-(d+1)%4*8&255,x=l[d+2>>>2]>>>24-(d+2)%4*8&255,S=p<<16|g<<8|x,w=0;w<4&&d+w*.75>>6*(3-w)&63));var T=u.charAt(64);if(T)for(;f.length%4;)f.push(T);return f.join("")},parse:function(a){var l=a.length,c=this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var f=0;f>>6-d%4*2,x=p|g;u[f>>>2]|=x<<24-f%4*8,f++}return r.create(u,f)}}(),t.enc.Base64})});var tI=po((eI,nk)=>{(function(t){if(typeof eI=="object"&&typeof nk!="undefined")nk.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.HyperList=t()}})(function(){var t,e,i;return function(){function r(n,o,s){function a(u,f){if(!o[u]){if(!n[u]){var d=typeof us=="function"&&us;if(!f&&d)return d(u,!0);if(l)return l(u,!0);var p=new Error("Cannot find module '"+u+"'");throw p.code="MODULE_NOT_FOUND",p}var g=o[u]={exports:{}};n[u][0].call(g.exports,function(x){var S=n[u][1][x];return a(S||x)},g,g.exports,r,n,o,s)}return o[u].exports}for(var l=typeof us=="function"&&us,c=0;cS._averageHeight){var q=S._renderChunk();S._lastRepaint=I,q!==!1&&typeof w.afterRender=="function"&&w.afterRender()}}};T()}return s(p,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(x,S){var w;if(Object.assign(this._config,c,S),!x||x.nodeType!==1)throw new Error("HyperList requires a valid DOM Node container");this._element=x;var T=this._config,$=this._scroller||T.scroller||document.createElement(T.scrollerTagName||"tr");if(typeof T.useFragment!="boolean"&&(this._config.useFragment=!0),!T.generate)throw new Error("Missing required `generate` function");if(!u(T.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(T.itemHeight)&&!u(T.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());u(T.itemHeight)?this._itemHeights=Array(T.total).fill(T.itemHeight):this._itemHeights=T.itemHeight,Object.keys(c).filter(function(we){return we in T}).forEach(function(we){var j=T[we],ae=u(j);if(j&&typeof j!="string"&&typeof j!="number"){var V="Invalid optional `"+we+"`, expected string or number";throw new Error(V)}else ae&&(T[we]=j+"px")});var I=!!T.horizontal,_=T[I?"width":"height"];if(_){var A=u(_),q=A?!1:_.slice(-1)==="%",le=A?_:parseInt(_.replace(/px|%/,""),10),F=window[I?"innerWidth":"innerHeight"];q?this._containerSize=F*le/100:this._containerSize=u(_)?_:le}var U=T.scrollContainer,ie=T.itemHeight*T.total,ue=this._maxElementHeight;ie>ue&&console.warn(["HyperList: The maximum element height",ue+"px has","been exceeded; please reduce your item height."].join(" "));var re={width:""+T.width,height:U?ie+"px":""+T.height,overflow:U?"none":"auto",position:"relative"};p.mergeStyle(x,re),U&&p.mergeStyle(T.scrollContainer,{overflow:"auto"});var de=(w={opacity:"0",position:"absolute"},a(w,I?"height":"width","1px"),a(w,I?"width":"height",ie+"px"),w);p.mergeStyle($,de),this._scroller||x.appendChild($);var me=this._computeScrollPadding();this._scrollPaddingBottom=me.bottom,this._scrollPaddingTop=me.top,this._scroller=$,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(T.total).fill(0),this._computePositions(0),this._renderChunk(this._lastRepaint!==null),typeof T.afterRender=="function"&&T.afterRender()}},{key:"_getRow",value:function(x){var S=this._config,w=S.generate(x),T=w.height;if(T!==void 0&&u(T)?(w=w.element,T!==this._itemHeights[x]&&(this._itemHeights[x]=T,this._computePositions(x),this._scrollHeight=this._computeScrollHeight(x))):T=this._itemHeights[x],!w||w.nodeType!==1)throw new Error("Generator did not return a DOM Node for index: "+x);f(w,S.rowClassName||"vrow");var $=this._itemPositions[x]+this._scrollPaddingTop;return p.mergeStyle(w,a({position:"absolute"},S.horizontal?"left":"top",$+"px")),w}},{key:"_getScrollPosition",value:function(){var x=this._config;return typeof x.overrideScrollPosition=="function"?x.overrideScrollPosition():this._element[x.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(x){var S=this._config,w=this._element,T=this._getScrollPosition(),$=S.total,I=S.reverse?this._getReverseFrom(T):this._getFrom(T)-1;if((I<0||I-this._screenItemsLen<0)&&(I=0),!x&&this._lastFrom===I)return!1;this._lastFrom=I;var _=I+this._cachedItemsLen;(_>$||_+this._cachedItemsLen>$)&&(_=$);var A=S.useFragment?document.createDocumentFragment():[],q=this._scroller;A[S.useFragment?"appendChild":"push"](q);for(var le=I;le<_;le++){var F=this._getRow(le);A[S.useFragment?"appendChild":"push"](F)}if(S.applyPatch)return S.applyPatch(w,A);w.innerHTML="",w.appendChild(A)}},{key:"_computePositions",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,S=this._config,w=S.total,T=S.reverse;x<1&&!T&&(x=1);for(var $=x;$0&&this._itemPositions[S]{(function(t,e){"use strict";function i(){r.width=t.innerWidth,r.height=5*c.barThickness;var f=r.getContext("2d");f.shadowBlur=c.shadowBlur,f.shadowColor=c.shadowColor;var d,p=f.createLinearGradient(0,0,r.width,0);for(d in c.barColors)p.addColorStop(d,c.barColors[d]);f.lineWidth=c.barThickness,f.beginPath(),f.moveTo(0,c.barThickness/2),f.lineTo(Math.ceil(n*r.width),c.barThickness/2),f.strokeStyle=p,f.stroke()}var r,n,o,s=null,a=null,l=null,c={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},u={config:function(f){for(var d in f)c.hasOwnProperty(d)&&(c[d]=f[d])},show:function(f){var d,p;o||(f?l=l||setTimeout(()=>u.show(),f):(o=!0,a!==null&&t.cancelAnimationFrame(a),r||((p=(r=e.createElement("canvas")).style).position="fixed",p.top=p.left=p.right=p.margin=p.padding=0,p.zIndex=100001,p.display="none",c.className&&r.classList.add(c.className),d="resize",f=i,(p=t).addEventListener?p.addEventListener(d,f,!1):p.attachEvent?p.attachEvent("on"+d,f):p["on"+d]=f),r.parentElement||e.body.appendChild(r),r.style.opacity=1,r.style.display="block",u.progress(0),c.autoRun&&function g(){s=t.requestAnimationFrame(g),u.progress("+"+.05*Math.pow(1-Math.sqrt(n),2))}()))},progress:function(f){return f===void 0||(typeof f=="string"&&(f=(0<=f.indexOf("+")||0<=f.indexOf("-")?n:0)+parseFloat(f)),n=1typeof t=="function"?t:function(){return t},GI=typeof self!="undefined"?self:null,tc=typeof window!="undefined"?window:null,fs=GI||tc||fs,KI="2.0.0",Fr={connecting:0,open:1,closing:2,closed:3},JI=1e4,e7=1e3,Yi={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Sn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},dg={longpoll:"longpoll",websocket:"websocket"},t7={complete:4},hh=class{constructor(t,e,i,r){this.channel=t,this.event=e,this.payload=i||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:t,response:e,_ref:i}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},Lk=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},i7=class{constructor(t,e,i){this.state=Yi.closed,this.topic=t,this.params=ic(e||{}),this.socket=i,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new hh(this,Sn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Lk(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Yi.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Yi.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=Yi.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=Yi.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new hh(this,Sn.leave,ic({}),this.timeout).send(),this.state=Yi.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Sn.reply,(r,n)=>{this.trigger(this.replyEventName(n),r)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(t){this.on(Sn.close,t)}onError(t){return this.on(Sn.error,e=>t(e))}on(t,e){let i=this.bindingRef++;return this.bindings.push({event:t,ref:i,callback:e}),i}off(t,e){this.bindings=this.bindings.filter(i=>!(i.event===t&&(typeof e=="undefined"||e===i.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,i=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new hh(this,t,function(){return e},i);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Yi.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Sn.close,"leave")},i=new hh(this,Sn.leave,ic({}),t);return i.receive("ok",()=>e()).receive("timeout",()=>e()),i.send(),this.canPush()||i.trigger("ok",{}),i}onMessage(t,e,i){return e}isMember(t,e,i,r){return this.topic!==t?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:i,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Yi.joining,this.joinPush.resend(t))}trigger(t,e,i,r){let n=this.onMessage(t,e,i,r);if(e&&!n)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(s=>s.event===t);for(let s=0;s{let a=this.parseJSON(t.responseText);s&&s(a)},o&&(t.ontimeout=o),t.onprogress=()=>{},t.send(r),t}static xhrRequest(t,e,i,r,n,o,s,a){return t.open(e,i,!0),t.timeout=o,t.setRequestHeader("Content-Type",r),t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===t7.complete&&a){let l=this.parseJSON(t.responseText);a(l)}},s&&(t.ontimeout=s),t.send(n),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch(e){return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let i=[];for(var r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let n=e?`${e}[${r}]`:r,o=t[r];typeof o=="object"?i.push(this.serialize(o,n)):i.push(encodeURIComponent(n)+"="+encodeURIComponent(o))}return i.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let i=t.match(/\?/)?"&":"?";return`${t}${i}${this.serialize(e)}`}},r7=t=>{let e="",i=new Uint8Array(t),r=i.byteLength;for(let n=0;nthis.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+dg.websocket),"$1/"+dg.longpoll)}endpointURL(){return ph.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,i){this.close(t,e,i),this.readyState=Fr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Fr.open||this.readyState===Fr.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),t=>{if(t){var{status:e,token:i,messages:r}=t;this.token=i}else e=0;switch(e){case 200:r.forEach(n=>{setTimeout(()=>this.onmessage({data:n}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Fr.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${e}`)}})}send(t){typeof t!="string"&&(t=r7(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",t.join(` -`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,i){for(let n of this.reqs)n.abort();this.readyState=Fr.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:i});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent!="undefined"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(t,e,i,r,n){let o,s=()=>{this.reqs.delete(o),r()};o=ph.request(t,this.endpointURL(),e,i,this.timeout,s,a=>{this.reqs.delete(o),this.isActive()&&n(a)}),this.reqs.add(o)}};var dh={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let i=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(i))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[i,r,n,o,s]=JSON.parse(t);return e({join_ref:i,ref:r,topic:n,event:o,payload:s})}},binaryEncode(t){let{join_ref:e,ref:i,event:r,topic:n,payload:o}=t,s=this.META_LENGTH+e.length+i.length+n.length+r.length,a=new ArrayBuffer(this.HEADER_LENGTH+s),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,e.length),l.setUint8(c++,i.length),l.setUint8(c++,n.length),l.setUint8(c++,r.length),Array.from(e,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(i,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(n,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(r,f=>l.setUint8(c++,f.charCodeAt(0)));var u=new Uint8Array(a.byteLength+o.byteLength);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(o),a.byteLength),u.buffer},binaryDecode(t){let e=new DataView(t),i=e.getUint8(0),r=new TextDecoder;switch(i){case this.KINDS.push:return this.decodePush(t,e,r);case this.KINDS.reply:return this.decodeReply(t,e,r);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,r)}},decodePush(t,e,i){let r=e.getUint8(1),n=e.getUint8(2),o=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,a=i.decode(t.slice(s,s+r));s=s+r;let l=i.decode(t.slice(s,s+n));s=s+n;let c=i.decode(t.slice(s,s+o));s=s+o;let u=t.slice(s,t.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:u}},decodeReply(t,e,i){let r=e.getUint8(1),n=e.getUint8(2),o=e.getUint8(3),s=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=i.decode(t.slice(a,a+r));a=a+r;let c=i.decode(t.slice(a,a+n));a=a+n;let u=i.decode(t.slice(a,a+o));a=a+o;let f=i.decode(t.slice(a,a+s));a=a+s;let d=t.slice(a,t.byteLength),p={status:f,response:d};return{join_ref:l,ref:c,topic:u,event:Sn.reply,payload:p}},decodeBroadcast(t,e,i){let r=e.getUint8(1),n=e.getUint8(2),o=this.HEADER_LENGTH+2,s=i.decode(t.slice(o,o+r));o=o+r;let a=i.decode(t.slice(o,o+n));o=o+n;let l=t.slice(o,t.byteLength);return{join_ref:null,ref:null,topic:s,event:a,payload:l}}},Oh=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||JI,this.transport=e.transport||fs.WebSocket||ec,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=e.sessionStorage||fs&&fs.sessionStorage,this.establishedConnections=0,this.defaultEncoder=dh.encode.bind(dh),this.defaultDecoder=dh.decode.bind(dh),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==ec?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;tc&&tc.addEventListener&&(tc.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),i=this.connectClock)}),tc.addEventListener("pageshow",r=>{i===this.connectClock&&(i=null,this.connect())})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=r=>e.rejoinAfterMs?e.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>e.reconnectAfterMs?e.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(r,n,o)=>{console.log(`${r}: ${n}`,o)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=ic(e.params||{}),this.endPoint=`${t}/${dg.websocket}`,this.vsn=e.vsn||KI,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Lk(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return ec}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=ph.appendParams(ph.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,i){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(t,e,i)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ic(t)),!this.conn&&(this.longPollFallbackMs&&this.transport!==ec?this.connectWithFallback(ec,this.longPollFallbackMs):this.transportConnect())}log(t,e,i){this.logger&&this.logger(t,e,i)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),i=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let r=this.onMessage(n=>{n.ref===e&&(this.off([r]),t(Date.now()-i))});return!0}transportConnect(){this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let i=!1,r=!0,n,o,s=a=>{this.log("transport",`falling back to ${t.name}...`,a),this.off([n,o]),r=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${t.name}`))return s("memorized");this.fallbackTimer=setTimeout(s,e),o=this.onError(a=>{this.log("transport","error",a),r&&!i&&(clearTimeout(this.fallbackTimer),s(a))}),this.onOpen(()=>{if(i=!0,!r)return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t.name}`,"true"),this.log("transport",`established ${t.name} fallback`);clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(s,e),this.ping(a=>{this.log("transport","connected to primary after",a),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`${this.transport.name} connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,t])=>t())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),e7,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,i){if(!this.conn)return t&&t();this.waitForBufferDone(()=>{this.conn&&(e?this.conn.close(e,i||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e=1){if(e===5||!this.conn||!this.conn.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(t,e+1)},150*e)}waitForSocketClosed(t,e=1){if(e===5||!this.conn||this.conn.readyState===Fr.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(t,e+1)},150*e)}onConnClose(t){let e=t&&t.code;this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&e!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,i])=>i(t))}onConnError(t){this.hasLogger()&&this.log("transport",t);let e=this.transport,i=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,r])=>{r(t,e,i)}),(e===this.transport||i>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Sn.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case Fr.connecting:return"connecting";case Fr.open:return"open";case Fr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([i])=>t.indexOf(i)===-1)}channel(t,e={}){let i=new i7(t,e,this);return this.channels.push(i),i}push(t){if(this.hasLogger()){let{topic:e,event:i,payload:r,ref:n,join_ref:o}=t;this.log("push",`${e} ${i} (${o}, ${n})`,r)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:i,event:r,payload:n,ref:o,join_ref:s}=e;o&&o===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${n.status||""} ${i} ${r} ${o&&"("+o+")"||""}`,n);for(let a=0;ai.topic===t&&(i.isJoined()||i.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};var cS="consecutive-reloads",n7=10,o7=5e3,s7=1e4,a7=3e4,l7=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading","phx-hook-loading"],En="data-phx-component",pg="data-phx-link",c7="track-static",u7="data-phx-link-state",Ti="data-phx-ref",hs="data-phx-ref-src",uS="track-uploads",Cn="data-phx-upload-ref",Eg="data-phx-preflighted-refs",f7="data-phx-done-refs",Ik="drop-target",kg="data-phx-active-refs",Sh="phx:live-file:updated",fS="data-phx-skip",hS="data-phx-id",Dk="data-phx-prune",Mk="page-loading",Nk="phx-connected",rc="phx-loading",mh="phx-error",Uk="phx-client-error",Og="phx-server-error",Os="data-phx-parent-id",Cg="data-phx-main",go="data-phx-root-id",Sg="viewport-top",Tg="viewport-bottom",h7="trigger-action",Eh="phx-has-focused",d7=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],dS=["checkbox","radio"],dc="phx-has-submitted",Jr="data-phx-session",Ca=`[${Jr}]`,zk="data-phx-sticky",ps="data-phx-static",mg="data-phx-readonly",Sa="data-phx-disabled",jk="disable-with",gh="data-phx-disable-with-restore",nc="hook",p7="debounce",O7="throttle",fc="update",gg="stream",bg="data-phx-stream",m7="key",Hr="phxPrivate",qk="auto-recover",bh="phx:live-socket:debug",yg="phx:live-socket:profiling",xg="phx:live-socket:latency-sim",g7="progress",Wk="mounted",b7=1,y7=200,x7="phx-",v7=3e4,oc="debounce-trigger",sc="throttled",Bk="debounce-prev-key",w7={debounce:300,throttle:300},yh="d",Gr="s",vg="r",Si="c",Zk="e",Vk="r",Yk="t",k7="p",Fk="stream",S7=class{constructor(t,e,i){this.liveSocket=i,this.entry=t,this.offset=0,this.chunkSize=e,this.chunkTimer=null,this.errored=!1,this.uploadChannel=i.channel(`lvu:${t.ref}`,{token:t.metadata()})}error(t){this.errored||(this.uploadChannel.leave(),this.errored=!0,clearTimeout(this.chunkTimer),this.entry.error(t))}upload(){this.uploadChannel.onError(t=>this.error(t)),this.uploadChannel.join().receive("ok",t=>this.readNextChunk()).receive("error",t=>this.error(t))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let t=new window.FileReader,e=this.entry.file.slice(this.offset,this.chunkSize+this.offset);t.onload=i=>{if(i.target.error===null)this.offset+=i.target.result.byteLength,this.pushChunk(i.target.result);else return Fi("Read error: "+i.target.error)},t.readAsArrayBuffer(e)}pushChunk(t){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",t).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))}).receive("error",({reason:e})=>this.error(e))}},Fi=(t,e)=>console.error&&console.error(t,e),Tn=t=>{let e=typeof t;return e==="number"||e==="string"&&/^(0|[1-9]\d*)$/.test(t)};function T7(){let t=new Set,e=document.querySelectorAll("*[id]");for(let i=0,r=e.length;i{t.liveSocket.isDebugEnabled()&&console.log(`${t.id} ${e}: ${i} - `,r)},ac=t=>typeof t=="function"?t:function(){return t},Th=t=>JSON.parse(JSON.stringify(t)),hc=(t,e,i)=>{do{if(t.matches(`[${e}]`)&&!t.disabled)return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1&&!(i&&i.isSameNode(t)||t.matches(Ca)));return null},Ta=t=>t!==null&&typeof t=="object"&&!(t instanceof Array),C7=(t,e)=>JSON.stringify(t)===JSON.stringify(e),Hk=t=>{for(let e in t)return!1;return!0},mo=(t,e)=>t&&e(t),P7=function(t,e,i,r){t.forEach(n=>{new S7(n,i.config.chunk_size,r).upload()})},pS={canPushState(){return typeof history.pushState!="undefined"},dropLocal(t,e,i){return t.removeItem(this.localKey(e,i))},updateLocal(t,e,i,r,n){let o=this.getLocal(t,e,i),s=this.localKey(e,i),a=o===null?r:n(o);return t.setItem(s,JSON.stringify(a)),a},getLocal(t,e,i){return JSON.parse(t.getItem(this.localKey(e,i)))},updateCurrentState(t){this.canPushState()&&history.replaceState(t(history.state||{}),"",window.location.href)},pushState(t,e,i){if(this.canPushState()){if(i!==window.location.href){if(e.type=="redirect"&&e.scroll){let n=history.state||{};n.scroll=e.scroll,history.replaceState(n,"",window.location.href)}delete e.scroll,history[t+"State"](e,"",i||null);let r=this.getHashTargetEl(window.location.hash);r?r.scrollIntoView():e.type==="redirect"&&window.scroll(0,0)}}else this.redirect(i)},setCookie(t,e){document.cookie=`${t}=${e}`},getCookie(t){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${t}s*=s*([^;]*).*$)|^.*$`),"$1")},redirect(t,e){e&&pS.setCookie("__phoenix_flash__",e+"; max-age=60000; path=/"),window.location=t},localKey(t,e){return`${t}-${e}`},getHashTargetEl(t){let e=t.toString().substring(1);if(e!=="")return document.getElementById(e)||document.querySelector(`a[name="${e}"]`)}},Kr=pS,_7={focusMain(){let t=document.querySelector("main h1, main, h1");if(t){let e=t.tabIndex;t.tabIndex=-1,t.focus(),t.tabIndex=e}},anyOf(t,e){return e.find(i=>t instanceof i)},isFocusable(t,e){return t instanceof HTMLAnchorElement&&t.rel!=="ignore"||t instanceof HTMLAreaElement&&t.href!==void 0||!t.disabled&&this.anyOf(t,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||t instanceof HTMLIFrameElement||t.tabIndex>0||!e&&t.getAttribute("tabindex")!==null&&t.getAttribute("aria-hidden")!=="true"},attemptFocus(t,e){if(this.isFocusable(t,e))try{t.focus()}catch(i){}return!!document.activeElement&&document.activeElement.isSameNode(t)},focusFirstInteractive(t){let e=t.firstElementChild;for(;e;){if(this.attemptFocus(e,!0)||this.focusFirstInteractive(e,!0))return!0;e=e.nextElementSibling}},focusFirst(t){let e=t.firstElementChild;for(;e;){if(this.attemptFocus(e)||this.focusFirst(e))return!0;e=e.nextElementSibling}},focusLast(t){let e=t.lastElementChild;for(;e;){if(this.attemptFocus(e)||this.focusLast(e))return!0;e=e.previousElementSibling}}},Ea=_7,Gk=[],Kk=200,Q7={exec(t,e,i,r,n){let[o,s]=n||[null,{callback:n&&n.callback}];(e.charAt(0)==="["?JSON.parse(e):[[o,s]]).forEach(([l,c])=>{l===o&&s.data&&(c.data=Object.assign(c.data||{},s.data),c.callback=c.callback||s.callback),this.filterToEls(r,c).forEach(u=>{this[`exec_${l}`](t,e,i,r,u,c)})})},isVisible(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length>0)},isInViewport(t){let e=t.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return e.right>0&&e.bottom>0&&e.left{let c=l.getAttribute(o);if(!c)throw new Error(`expected ${o} to contain JS command on "${s}"`);i.liveSocket.execJS(l,c,t)})},exec_dispatch(t,e,i,r,n,{to:o,event:s,detail:a,bubbles:l}){a=a||{},a.dispatcher=r,te.dispatchEvent(n,s,{detail:a,bubbles:l})},exec_push(t,e,i,r,n,o){let{event:s,data:a,target:l,page_loading:c,loading:u,value:f,dispatcher:d,callback:p}=o,g={loading:u,value:f,target:l,page_loading:!!c},x=t==="change"&&d?d:r,S=l||x.getAttribute(i.binding("target"))||x;i.withinTargets(S,(w,T)=>{if(w.isConnected())if(t==="change"){let{newCid:$,_target:I}=o;I=I||(te.isFormInput(r)?r.name:void 0),I&&(g._target=I),w.pushInput(r,T,$,s||e,g,p)}else if(t==="submit"){let{submitter:$}=o;w.submitForm(r,T,s||e,$,g,p)}else w.pushEvent(t,r,T,s||e,a,g,p)})},exec_navigate(t,e,i,r,n,{href:o,replace:s}){i.liveSocket.historyRedirect(o,s?"replace":"push")},exec_patch(t,e,i,r,n,{href:o,replace:s}){i.liveSocket.pushHistoryPatch(o,s?"replace":"push",r)},exec_focus(t,e,i,r,n){window.requestAnimationFrame(()=>Ea.attemptFocus(n))},exec_focus_first(t,e,i,r,n){window.requestAnimationFrame(()=>Ea.focusFirstInteractive(n)||Ea.focusFirst(n))},exec_push_focus(t,e,i,r,n){window.requestAnimationFrame(()=>Gk.push(n||r))},exec_pop_focus(t,e,i,r,n){window.requestAnimationFrame(()=>{let o=Gk.pop();o&&o.focus()})},exec_add_class(t,e,i,r,n,{names:o,transition:s,time:a}){this.addOrRemoveClasses(n,o,[],s,a,i)},exec_remove_class(t,e,i,r,n,{names:o,transition:s,time:a}){this.addOrRemoveClasses(n,[],o,s,a,i)},exec_toggle_class(t,e,i,r,n,{to:o,names:s,transition:a,time:l}){this.toggleClasses(n,s,a,l,i)},exec_toggle_attr(t,e,i,r,n,{attr:[o,s,a]}){n.hasAttribute(o)?a!==void 0?n.getAttribute(o)===s?this.setOrRemoveAttrs(n,[[o,a]],[]):this.setOrRemoveAttrs(n,[[o,s]],[]):this.setOrRemoveAttrs(n,[],[o]):this.setOrRemoveAttrs(n,[[o,s]],[])},exec_transition(t,e,i,r,n,{time:o,transition:s}){this.addOrRemoveClasses(n,[],[],s,o,i)},exec_toggle(t,e,i,r,n,{display:o,ins:s,outs:a,time:l}){this.toggle(t,i,n,o,s,a,l)},exec_show(t,e,i,r,n,{display:o,transition:s,time:a}){this.show(t,i,n,o,s,a)},exec_hide(t,e,i,r,n,{display:o,transition:s,time:a}){this.hide(t,i,n,o,s,a)},exec_set_attr(t,e,i,r,n,{attr:[o,s]}){this.setOrRemoveAttrs(n,[[o,s]],[])},exec_remove_attr(t,e,i,r,n,{attr:o}){this.setOrRemoveAttrs(n,[],[o])},show(t,e,i,r,n,o){this.isVisible(i)||this.toggle(t,e,i,r,n,null,o)},hide(t,e,i,r,n,o){this.isVisible(i)&&this.toggle(t,e,i,r,null,n,o)},toggle(t,e,i,r,n,o,s){s=s||Kk;let[a,l,c]=n||[[],[],[]],[u,f,d]=o||[[],[],[]];if(a.length>0||u.length>0)if(this.isVisible(i)){let p=()=>{this.addOrRemoveClasses(i,f,a.concat(l).concat(c)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,u,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,d,f))})};i.dispatchEvent(new Event("phx:hide-start")),e.transition(s,p,()=>{this.addOrRemoveClasses(i,[],u.concat(d)),te.putSticky(i,"toggle",g=>g.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))})}else{if(t==="remove")return;let p=()=>{this.addOrRemoveClasses(i,l,u.concat(f).concat(d));let g=r||this.defaultDisplay(i);te.putSticky(i,"toggle",x=>x.style.display=g),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,c,l))})};i.dispatchEvent(new Event("phx:show-start")),e.transition(s,p,()=>{this.addOrRemoveClasses(i,[],a.concat(c)),i.dispatchEvent(new Event("phx:show-end"))})}else this.isVisible(i)?window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:hide-start")),te.putSticky(i,"toggle",p=>p.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:show-start"));let p=r||this.defaultDisplay(i);te.putSticky(i,"toggle",g=>g.style.display=p),i.dispatchEvent(new Event("phx:show-end"))})},toggleClasses(t,e,i,r,n){window.requestAnimationFrame(()=>{let[o,s]=te.getSticky(t,"classes",[[],[]]),a=e.filter(c=>o.indexOf(c)<0&&!t.classList.contains(c)),l=e.filter(c=>s.indexOf(c)<0&&t.classList.contains(c));this.addOrRemoveClasses(t,a,l,i,r,n)})},addOrRemoveClasses(t,e,i,r,n,o){n=n||Kk;let[s,a,l]=r||[[],[],[]];if(s.length>0){let c=()=>{this.addOrRemoveClasses(t,a,[].concat(s).concat(l)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,s,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,l,a))})},u=()=>this.addOrRemoveClasses(t,e.concat(l),i.concat(s).concat(a));return o.transition(n,c,u)}window.requestAnimationFrame(()=>{let[c,u]=te.getSticky(t,"classes",[[],[]]),f=e.filter(x=>c.indexOf(x)<0&&!t.classList.contains(x)),d=i.filter(x=>u.indexOf(x)<0&&t.classList.contains(x)),p=c.filter(x=>i.indexOf(x)<0).concat(f),g=u.filter(x=>e.indexOf(x)<0).concat(d);te.putSticky(t,"classes",x=>(x.classList.remove(...g),x.classList.add(...p),[p,g]))})},setOrRemoveAttrs(t,e,i){let[r,n]=te.getSticky(t,"attrs",[[],[]]),o=e.map(([l,c])=>l).concat(i),s=r.filter(([l,c])=>!o.includes(l)).concat(e),a=n.filter(l=>!o.includes(l)).concat(i);te.putSticky(t,"attrs",l=>(a.forEach(c=>l.removeAttribute(c)),s.forEach(([c,u])=>l.setAttribute(c,u)),[s,a]))},hasAllClasses(t,e){return e.every(i=>t.classList.contains(i))},isToggledOut(t,e){return!this.isVisible(t)||this.hasAllClasses(t,e)},filterToEls(t,{to:e}){return e?te.all(document,e):[t]},defaultDisplay(t){return{tr:"table-row",td:"table-cell"}[t.tagName.toLowerCase()]||"block"}},_r=Q7,ds={byId(t){return document.getElementById(t)||Fi(`no id found for ${t}`)},removeClass(t,e){t.classList.remove(e),t.classList.length===0&&t.removeAttribute("class")},all(t,e,i){if(!t)return[];let r=Array.from(t.querySelectorAll(e));return i?r.forEach(i):r},childNodeLength(t){let e=document.createElement("template");return e.innerHTML=t,e.content.childElementCount},isUploadInput(t){return t.type==="file"&&t.getAttribute(Cn)!==null},isAutoUpload(t){return t.hasAttribute("data-phx-auto-upload")},findUploadInputs(t){let e=t.id,i=this.all(document,`input[type="file"][${Cn}][form="${e}"]`);return this.all(t,`input[type="file"][${Cn}]`).concat(i)},findComponentNodeList(t,e){return this.filterWithinSameLiveView(this.all(t,`[${En}="${e}"]`),t)},isPhxDestroyed(t){return!!(t.id&&ds.private(t,"destroyed"))},wantsNewTab(t){let e=t.ctrlKey||t.shiftKey||t.metaKey||t.button&&t.button===1,i=t.target instanceof HTMLAnchorElement&&t.target.hasAttribute("download"),r=t.target.hasAttribute("target")&&t.target.getAttribute("target").toLowerCase()==="_blank",n=t.target.hasAttribute("target")&&!t.target.getAttribute("target").startsWith("_");return e||r||i||n},isUnloadableFormSubmit(t){return t.target&&t.target.getAttribute("method")==="dialog"||t.submitter&&t.submitter.getAttribute("formmethod")==="dialog"?!1:!t.defaultPrevented&&!this.wantsNewTab(t)},isNewPageClick(t,e){let i=t.target instanceof HTMLAnchorElement?t.target.getAttribute("href"):null,r;if(t.defaultPrevented||i===null||this.wantsNewTab(t)||i.startsWith("mailto:")||i.startsWith("tel:")||t.target.isContentEditable)return!1;try{r=new URL(i)}catch(n){try{r=new URL(i,e)}catch(o){return!0}}return r.host===e.host&&r.protocol===e.protocol&&r.pathname===e.pathname&&r.search===e.search?r.hash===""&&!r.href.endsWith("#"):r.protocol.startsWith("http")},markPhxChildDestroyed(t){this.isPhxChild(t)&&t.setAttribute(Jr,""),this.putPrivate(t,"destroyed",!0)},findPhxChildrenInFragment(t,e){let i=document.createElement("template");return i.innerHTML=t,this.findPhxChildren(i.content,e)},isIgnored(t,e){return(t.getAttribute(e)||t.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(t,e,i){return t.getAttribute&&i.indexOf(t.getAttribute(e))>=0},findPhxSticky(t){return this.all(t,`[${zk}]`)},findPhxChildren(t,e){return this.all(t,`${Ca}[${Os}="${e}"]`)},findExistingParentCIDs(t,e){let i=new Set,r=new Set;return e.forEach(n=>{this.filterWithinSameLiveView(this.all(t,`[${En}="${n}"]`),t).forEach(o=>{i.add(n),this.all(o,`[${En}]`).map(s=>parseInt(s.getAttribute(En))).forEach(s=>r.add(s))})}),r.forEach(n=>i.delete(n)),i},filterWithinSameLiveView(t,e){return e.querySelector(Ca)?t.filter(i=>this.withinSameLiveView(i,e)):t},withinSameLiveView(t,e){for(;t=t.parentNode;){if(t.isSameNode(e))return!0;if(t.getAttribute(Jr)!==null)return!1}},private(t,e){return t[Hr]&&t[Hr][e]},deletePrivate(t,e){t[Hr]&&delete t[Hr][e]},putPrivate(t,e,i){t[Hr]||(t[Hr]={}),t[Hr][e]=i},updatePrivate(t,e,i,r){let n=this.private(t,e);n===void 0?this.putPrivate(t,e,r(i)):this.putPrivate(t,e,r(n))},copyPrivates(t,e){e[Hr]&&(t[Hr]=e[Hr])},putTitle(t){let e=document.querySelector("title");if(e){let{prefix:i,suffix:r}=e.dataset;document.title=`${i||""}${t}${r||""}`}else document.title=t},debounce(t,e,i,r,n,o,s,a){let l=t.getAttribute(i),c=t.getAttribute(n);l===""&&(l=r),c===""&&(c=o);let u=l||c;switch(u){case null:return a();case"blur":this.once(t,"debounce-blur")&&t.addEventListener("blur",()=>{s()&&a()});return;default:let f=parseInt(u),d=()=>c?this.deletePrivate(t,sc):a(),p=this.incCycle(t,oc,d);if(isNaN(f))return Fi(`invalid throttle/debounce value: ${u}`);if(c){let x=!1;if(e.type==="keydown"){let S=this.private(t,Bk);this.putPrivate(t,Bk,e.key),x=S!==e.key}if(!x&&this.private(t,sc))return!1;{a();let S=setTimeout(()=>{s()&&this.triggerCycle(t,oc)},f);this.putPrivate(t,sc,S)}}else setTimeout(()=>{s()&&this.triggerCycle(t,oc,p)},f);let g=t.form;g&&this.once(g,"bind-debounce")&&g.addEventListener("submit",()=>{Array.from(new FormData(g).entries(),([x])=>{let S=g.querySelector(`[name="${x}"]`);this.incCycle(S,oc),this.deletePrivate(S,sc)})}),this.once(t,"bind-debounce")&&t.addEventListener("blur",()=>{clearTimeout(this.private(t,sc)),this.triggerCycle(t,oc)})}},triggerCycle(t,e,i){let[r,n]=this.private(t,e);i||(i=r),i===r&&(this.incCycle(t,e),n())},once(t,e){return this.private(t,e)===!0?!1:(this.putPrivate(t,e,!0),!0)},incCycle(t,e,i=function(){}){let[r]=this.private(t,e)||[0,i];return r++,this.putPrivate(t,e,[r,i]),r},maybeAddPrivateHooks(t,e,i){t.hasAttribute&&(t.hasAttribute(e)||t.hasAttribute(i))&&t.setAttribute("data-phx-hook","Phoenix.InfiniteScroll")},isUsedInput(t){return t.nodeType===Node.ELEMENT_NODE&&(this.private(t,Eh)||this.private(t,dc))},resetForm(t){Array.from(t.elements).forEach(e=>{this.deletePrivate(e,Eh),this.deletePrivate(e,dc)})},isPhxChild(t){return t.getAttribute&&t.getAttribute(Os)},isPhxSticky(t){return t.getAttribute&&t.getAttribute(zk)!==null},isChildOfAny(t,e){return!!e.find(i=>i.contains(t))},firstPhxChild(t){return this.isPhxChild(t)?t:this.all(t,`[${Os}]`)[0]},dispatchEvent(t,e,i={}){let r=!0;t.nodeName==="INPUT"&&t.type==="file"&&e==="click"&&(r=!1);let s={bubbles:i.bubbles===void 0?r:!!i.bubbles,cancelable:!0,detail:i.detail||{}},a=e==="click"?new MouseEvent("click",s):new CustomEvent(e,s);t.dispatchEvent(a)},cloneNode(t,e){if(typeof e=="undefined")return t.cloneNode(!0);{let i=t.cloneNode(!1);return i.innerHTML=e,i}},mergeAttrs(t,e,i={}){let r=new Set(i.exclude||[]),n=i.isIgnored,o=e.attributes;for(let a=o.length-1;a>=0;a--){let l=o[a].name;if(r.has(l))l==="value"&&t.value===e.value&&t.setAttribute("value",e.getAttribute(l));else{let c=e.getAttribute(l);t.getAttribute(l)!==c&&(!n||n&&l.startsWith("data-"))&&t.setAttribute(l,c)}}let s=t.attributes;for(let a=s.length-1;a>=0;a--){let l=s[a].name;n?l.startsWith("data-")&&!e.hasAttribute(l)&&![Ti,hs].includes(l)&&t.removeAttribute(l):e.hasAttribute(l)||t.removeAttribute(l)}},mergeFocusedInput(t,e){t instanceof HTMLSelectElement||ds.mergeAttrs(t,e,{exclude:["value"]}),e.readOnly?t.setAttribute("readonly",!0):t.removeAttribute("readonly")},hasSelectionRange(t){return t.setSelectionRange&&(t.type==="text"||t.type==="textarea")},restoreFocus(t,e,i){if(t instanceof HTMLSelectElement&&t.focus(),!ds.isTextualInput(t))return;t.matches(":focus")||t.focus(),this.hasSelectionRange(t)&&t.setSelectionRange(e,i)},isFormInput(t){return/^(?:input|select|textarea)$/i.test(t.tagName)&&t.type!=="button"},syncAttrsToProps(t){t instanceof HTMLInputElement&&dS.indexOf(t.type.toLocaleLowerCase())>=0&&(t.checked=t.getAttribute("checked")!==null)},isTextualInput(t){return d7.indexOf(t.type)>=0},isNowTriggerFormExternal(t,e){return t.getAttribute&&t.getAttribute(e)!==null},cleanChildNodes(t,e){if(ds.isPhxUpdate(t,e,["append","prepend"])){let i=[];t.childNodes.forEach(r=>{r.id||(!(r.nodeType===Node.TEXT_NODE&&r.nodeValue.trim()==="")&&r.nodeType!==Node.COMMENT_NODE&&Fi(`only HTML element tags with an id are allowed inside containers with phx-update. +import{a as hg}from"./chunk-GJ6CDUB5.js";import{a as ka}from"./chunk-BZUL2CAN.js";import{a as H,b as Ce,c as us,d as Rk,e as pi,f as po,g as Jl,h as wa,i as bt}from"./chunk-3NXJ7VWC.js";var jS=po((Ooe,zS)=>{"use strict";var _h=Object.prototype.hasOwnProperty,US=Object.prototype.toString,RS=Object.defineProperty,LS=Object.getOwnPropertyDescriptor,IS=function(e){return typeof Array.isArray=="function"?Array.isArray(e):US.call(e)==="[object Array]"},DS=function(e){if(!e||US.call(e)!=="[object Object]")return!1;var i=_h.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&_h.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!r)return!1;var n;for(n in e);return typeof n=="undefined"||_h.call(e,n)},NS=function(e,i){RS&&i.name==="__proto__"?RS(e,i.name,{enumerable:!0,configurable:!0,value:i.newValue,writable:!0}):e[i.name]=i.newValue},MS=function(e,i){if(i==="__proto__")if(_h.call(e,i)){if(LS)return LS(e,i).value}else return;return e[i]};zS.exports=function t(){var e,i,r,n,o,s,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l{});var RO=po((XO,fX)=>{(function(t,e){typeof XO=="object"?fX.exports=XO=e():typeof define=="function"&&define.amd?define([],e):t.CryptoJS=e()})(XO,function(){var t=t||function(e,i){var r;if(typeof window!="undefined"&&window.crypto&&(r=window.crypto),typeof self!="undefined"&&self.crypto&&(r=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(r=globalThis.crypto),!r&&typeof window!="undefined"&&window.msCrypto&&(r=window.msCrypto),!r&&typeof global!="undefined"&&global.crypto&&(r=global.crypto),!r&&typeof us=="function")try{r=uX()}catch(w){}var n=function(){if(r){if(typeof r.getRandomValues=="function")try{return r.getRandomValues(new Uint32Array(1))[0]}catch(w){}if(typeof r.randomBytes=="function")try{return r.randomBytes(4).readInt32LE()}catch(w){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function w(){}return function(T){var $;return w.prototype=T,$=new w,w.prototype=null,$}}(),s={},a=s.lib={},l=a.Base=function(){return{extend:function(w){var T=o(this);return w&&T.mixIn(w),(!T.hasOwnProperty("init")||this.init===T.init)&&(T.init=function(){T.$super.init.apply(this,arguments)}),T.init.prototype=T,T.$super=this,T},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var T in w)w.hasOwnProperty(T)&&(this[T]=w[T]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=l.extend({init:function(w,T){w=this.words=w||[],T!=i?this.sigBytes=T:this.sigBytes=w.length*4},toString:function(w){return(w||f).stringify(this)},concat:function(w){var T=this.words,$=w.words,I=this.sigBytes,_=w.sigBytes;if(this.clamp(),I%4)for(var A=0;A<_;A++){var q=$[A>>>2]>>>24-A%4*8&255;T[I+A>>>2]|=q<<24-(I+A)%4*8}else for(var le=0;le<_;le+=4)T[I+le>>>2]=$[le>>>2];return this.sigBytes+=_,this},clamp:function(){var w=this.words,T=this.sigBytes;w[T>>>2]&=4294967295<<32-T%4*8,w.length=e.ceil(T/4)},clone:function(){var w=l.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var T=[],$=0;$>>2]>>>24-_%4*8&255;I.push((A>>>4).toString(16)),I.push((A&15).toString(16))}return I.join("")},parse:function(w){for(var T=w.length,$=[],I=0;I>>3]|=parseInt(w.substr(I,2),16)<<24-I%8*4;return new c.init($,T/2)}},d=u.Latin1={stringify:function(w){for(var T=w.words,$=w.sigBytes,I=[],_=0;_<$;_++){var A=T[_>>>2]>>>24-_%4*8&255;I.push(String.fromCharCode(A))}return I.join("")},parse:function(w){for(var T=w.length,$=[],I=0;I>>2]|=(w.charCodeAt(I)&255)<<24-I%4*8;return new c.init($,T)}},p=u.Utf8={stringify:function(w){try{return decodeURIComponent(escape(d.stringify(w)))}catch(T){throw new Error("Malformed UTF-8 data")}},parse:function(w){return d.parse(unescape(encodeURIComponent(w)))}},g=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=p.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var T,$=this._data,I=$.words,_=$.sigBytes,A=this.blockSize,q=A*4,le=_/q;w?le=e.ceil(le):le=e.max((le|0)-this._minBufferSize,0);var F=le*A,U=e.min(F*4,_);if(F){for(var ie=0;ie{(function(t,e){typeof LO=="object"?hX.exports=LO=e(RO()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(LO,function(t){return function(e){var i=t,r=i.lib,n=r.WordArray,o=r.Hasher,s=i.algo,a=[];(function(){for(var p=0;p<64;p++)a[p]=e.abs(e.sin(p+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(p,g){for(var x=0;x<16;x++){var S=g+x,w=p[S];p[S]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var T=this._hash.words,$=p[g+0],I=p[g+1],_=p[g+2],A=p[g+3],q=p[g+4],le=p[g+5],F=p[g+6],U=p[g+7],ie=p[g+8],ue=p[g+9],re=p[g+10],de=p[g+11],me=p[g+12],we=p[g+13],j=p[g+14],ae=p[g+15],V=T[0],E=T[1],B=T[2],ne=T[3];V=c(V,E,B,ne,$,7,a[0]),ne=c(ne,V,E,B,I,12,a[1]),B=c(B,ne,V,E,_,17,a[2]),E=c(E,B,ne,V,A,22,a[3]),V=c(V,E,B,ne,q,7,a[4]),ne=c(ne,V,E,B,le,12,a[5]),B=c(B,ne,V,E,F,17,a[6]),E=c(E,B,ne,V,U,22,a[7]),V=c(V,E,B,ne,ie,7,a[8]),ne=c(ne,V,E,B,ue,12,a[9]),B=c(B,ne,V,E,re,17,a[10]),E=c(E,B,ne,V,de,22,a[11]),V=c(V,E,B,ne,me,7,a[12]),ne=c(ne,V,E,B,we,12,a[13]),B=c(B,ne,V,E,j,17,a[14]),E=c(E,B,ne,V,ae,22,a[15]),V=u(V,E,B,ne,I,5,a[16]),ne=u(ne,V,E,B,F,9,a[17]),B=u(B,ne,V,E,de,14,a[18]),E=u(E,B,ne,V,$,20,a[19]),V=u(V,E,B,ne,le,5,a[20]),ne=u(ne,V,E,B,re,9,a[21]),B=u(B,ne,V,E,ae,14,a[22]),E=u(E,B,ne,V,q,20,a[23]),V=u(V,E,B,ne,ue,5,a[24]),ne=u(ne,V,E,B,j,9,a[25]),B=u(B,ne,V,E,A,14,a[26]),E=u(E,B,ne,V,ie,20,a[27]),V=u(V,E,B,ne,we,5,a[28]),ne=u(ne,V,E,B,_,9,a[29]),B=u(B,ne,V,E,U,14,a[30]),E=u(E,B,ne,V,me,20,a[31]),V=f(V,E,B,ne,le,4,a[32]),ne=f(ne,V,E,B,ie,11,a[33]),B=f(B,ne,V,E,de,16,a[34]),E=f(E,B,ne,V,j,23,a[35]),V=f(V,E,B,ne,I,4,a[36]),ne=f(ne,V,E,B,q,11,a[37]),B=f(B,ne,V,E,U,16,a[38]),E=f(E,B,ne,V,re,23,a[39]),V=f(V,E,B,ne,we,4,a[40]),ne=f(ne,V,E,B,$,11,a[41]),B=f(B,ne,V,E,A,16,a[42]),E=f(E,B,ne,V,F,23,a[43]),V=f(V,E,B,ne,ue,4,a[44]),ne=f(ne,V,E,B,me,11,a[45]),B=f(B,ne,V,E,ae,16,a[46]),E=f(E,B,ne,V,_,23,a[47]),V=d(V,E,B,ne,$,6,a[48]),ne=d(ne,V,E,B,U,10,a[49]),B=d(B,ne,V,E,j,15,a[50]),E=d(E,B,ne,V,le,21,a[51]),V=d(V,E,B,ne,me,6,a[52]),ne=d(ne,V,E,B,A,10,a[53]),B=d(B,ne,V,E,re,15,a[54]),E=d(E,B,ne,V,I,21,a[55]),V=d(V,E,B,ne,ie,6,a[56]),ne=d(ne,V,E,B,ae,10,a[57]),B=d(B,ne,V,E,F,15,a[58]),E=d(E,B,ne,V,we,21,a[59]),V=d(V,E,B,ne,q,6,a[60]),ne=d(ne,V,E,B,de,10,a[61]),B=d(B,ne,V,E,_,15,a[62]),E=d(E,B,ne,V,ue,21,a[63]),T[0]=T[0]+V|0,T[1]=T[1]+E|0,T[2]=T[2]+B|0,T[3]=T[3]+ne|0},_doFinalize:function(){var p=this._data,g=p.words,x=this._nDataBytes*8,S=p.sigBytes*8;g[S>>>5]|=128<<24-S%32;var w=e.floor(x/4294967296),T=x;g[(S+64>>>9<<4)+15]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,g[(S+64>>>9<<4)+14]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,p.sigBytes=(g.length+1)*4,this._process();for(var $=this._hash,I=$.words,_=0;_<4;_++){var A=I[_];I[_]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360}return $},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p}});function c(p,g,x,S,w,T,$){var I=p+(g&x|~g&S)+w+$;return(I<>>32-T)+g}function u(p,g,x,S,w,T,$){var I=p+(g&S|x&~S)+w+$;return(I<>>32-T)+g}function f(p,g,x,S,w,T,$){var I=p+(g^x^S)+w+$;return(I<>>32-T)+g}function d(p,g,x,S,w,T,$){var I=p+(x^(g|~S))+w+$;return(I<>>32-T)+g}i.MD5=o._createHelper(l),i.HmacMD5=o._createHmacHelper(l)}(Math),t.MD5})});var OX=po((IO,pX)=>{(function(t,e){typeof IO=="object"?pX.exports=IO=e(RO()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(IO,function(t){return function(e){var i=t,r=i.lib,n=r.WordArray,o=r.Hasher,s=i.algo,a=[],l=[];(function(){function f(x){for(var S=e.sqrt(x),w=2;w<=S;w++)if(!(x%w))return!1;return!0}function d(x){return(x-(x|0))*4294967296|0}for(var p=2,g=0;g<64;)f(p)&&(g<8&&(a[g]=d(e.pow(p,1/2))),l[g]=d(e.pow(p,1/3)),g++),p++})();var c=[],u=s.SHA256=o.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(f,d){for(var p=this._hash.words,g=p[0],x=p[1],S=p[2],w=p[3],T=p[4],$=p[5],I=p[6],_=p[7],A=0;A<64;A++){if(A<16)c[A]=f[d+A]|0;else{var q=c[A-15],le=(q<<25|q>>>7)^(q<<14|q>>>18)^q>>>3,F=c[A-2],U=(F<<15|F>>>17)^(F<<13|F>>>19)^F>>>10;c[A]=le+c[A-7]+U+c[A-16]}var ie=T&$^~T&I,ue=g&x^g&S^x&S,re=(g<<30|g>>>2)^(g<<19|g>>>13)^(g<<10|g>>>22),de=(T<<26|T>>>6)^(T<<21|T>>>11)^(T<<7|T>>>25),me=_+de+ie+l[A]+c[A],we=re+ue;_=I,I=$,$=T,T=w+me|0,w=S,S=x,x=g,g=me+we|0}p[0]=p[0]+g|0,p[1]=p[1]+x|0,p[2]=p[2]+S|0,p[3]=p[3]+w|0,p[4]=p[4]+T|0,p[5]=p[5]+$|0,p[6]=p[6]+I|0,p[7]=p[7]+_|0},_doFinalize:function(){var f=this._data,d=f.words,p=this._nDataBytes*8,g=f.sigBytes*8;return d[g>>>5]|=128<<24-g%32,d[(g+64>>>9<<4)+14]=e.floor(p/4294967296),d[(g+64>>>9<<4)+15]=p,f.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var f=o.clone.call(this);return f._hash=this._hash.clone(),f}});i.SHA256=o._createHelper(u),i.HmacSHA256=o._createHmacHelper(u)}(Math),t.SHA256})});var gX=po((DO,mX)=>{(function(t,e){typeof DO=="object"?mX.exports=DO=e(RO()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(DO,function(t){return function(){var e=t,i=e.lib,r=i.WordArray,n=e.enc,o=n.Base64={stringify:function(a){var l=a.words,c=a.sigBytes,u=this._map;a.clamp();for(var f=[],d=0;d>>2]>>>24-d%4*8&255,g=l[d+1>>>2]>>>24-(d+1)%4*8&255,x=l[d+2>>>2]>>>24-(d+2)%4*8&255,S=p<<16|g<<8|x,w=0;w<4&&d+w*.75>>6*(3-w)&63));var T=u.charAt(64);if(T)for(;f.length%4;)f.push(T);return f.join("")},parse:function(a){var l=a.length,c=this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var f=0;f>>6-d%4*2,x=p|g;u[f>>>2]|=x<<24-f%4*8,f++}return r.create(u,f)}}(),t.enc.Base64})});var iI=po((tI,nk)=>{(function(t){if(typeof tI=="object"&&typeof nk!="undefined")nk.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.HyperList=t()}})(function(){var t,e,i;return function(){function r(n,o,s){function a(u,f){if(!o[u]){if(!n[u]){var d=typeof us=="function"&&us;if(!f&&d)return d(u,!0);if(l)return l(u,!0);var p=new Error("Cannot find module '"+u+"'");throw p.code="MODULE_NOT_FOUND",p}var g=o[u]={exports:{}};n[u][0].call(g.exports,function(x){var S=n[u][1][x];return a(S||x)},g,g.exports,r,n,o,s)}return o[u].exports}for(var l=typeof us=="function"&&us,c=0;cS._averageHeight){var q=S._renderChunk();S._lastRepaint=I,q!==!1&&typeof w.afterRender=="function"&&w.afterRender()}}};T()}return s(p,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(x,S){var w;if(Object.assign(this._config,c,S),!x||x.nodeType!==1)throw new Error("HyperList requires a valid DOM Node container");this._element=x;var T=this._config,$=this._scroller||T.scroller||document.createElement(T.scrollerTagName||"tr");if(typeof T.useFragment!="boolean"&&(this._config.useFragment=!0),!T.generate)throw new Error("Missing required `generate` function");if(!u(T.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(T.itemHeight)&&!u(T.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());u(T.itemHeight)?this._itemHeights=Array(T.total).fill(T.itemHeight):this._itemHeights=T.itemHeight,Object.keys(c).filter(function(we){return we in T}).forEach(function(we){var j=T[we],ae=u(j);if(j&&typeof j!="string"&&typeof j!="number"){var V="Invalid optional `"+we+"`, expected string or number";throw new Error(V)}else ae&&(T[we]=j+"px")});var I=!!T.horizontal,_=T[I?"width":"height"];if(_){var A=u(_),q=A?!1:_.slice(-1)==="%",le=A?_:parseInt(_.replace(/px|%/,""),10),F=window[I?"innerWidth":"innerHeight"];q?this._containerSize=F*le/100:this._containerSize=u(_)?_:le}var U=T.scrollContainer,ie=T.itemHeight*T.total,ue=this._maxElementHeight;ie>ue&&console.warn(["HyperList: The maximum element height",ue+"px has","been exceeded; please reduce your item height."].join(" "));var re={width:""+T.width,height:U?ie+"px":""+T.height,overflow:U?"none":"auto",position:"relative"};p.mergeStyle(x,re),U&&p.mergeStyle(T.scrollContainer,{overflow:"auto"});var de=(w={opacity:"0",position:"absolute"},a(w,I?"height":"width","1px"),a(w,I?"width":"height",ie+"px"),w);p.mergeStyle($,de),this._scroller||x.appendChild($);var me=this._computeScrollPadding();this._scrollPaddingBottom=me.bottom,this._scrollPaddingTop=me.top,this._scroller=$,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(T.total).fill(0),this._computePositions(0),this._renderChunk(this._lastRepaint!==null),typeof T.afterRender=="function"&&T.afterRender()}},{key:"_getRow",value:function(x){var S=this._config,w=S.generate(x),T=w.height;if(T!==void 0&&u(T)?(w=w.element,T!==this._itemHeights[x]&&(this._itemHeights[x]=T,this._computePositions(x),this._scrollHeight=this._computeScrollHeight(x))):T=this._itemHeights[x],!w||w.nodeType!==1)throw new Error("Generator did not return a DOM Node for index: "+x);f(w,S.rowClassName||"vrow");var $=this._itemPositions[x]+this._scrollPaddingTop;return p.mergeStyle(w,a({position:"absolute"},S.horizontal?"left":"top",$+"px")),w}},{key:"_getScrollPosition",value:function(){var x=this._config;return typeof x.overrideScrollPosition=="function"?x.overrideScrollPosition():this._element[x.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(x){var S=this._config,w=this._element,T=this._getScrollPosition(),$=S.total,I=S.reverse?this._getReverseFrom(T):this._getFrom(T)-1;if((I<0||I-this._screenItemsLen<0)&&(I=0),!x&&this._lastFrom===I)return!1;this._lastFrom=I;var _=I+this._cachedItemsLen;(_>$||_+this._cachedItemsLen>$)&&(_=$);var A=S.useFragment?document.createDocumentFragment():[],q=this._scroller;A[S.useFragment?"appendChild":"push"](q);for(var le=I;le<_;le++){var F=this._getRow(le);A[S.useFragment?"appendChild":"push"](F)}if(S.applyPatch)return S.applyPatch(w,A);w.innerHTML="",w.appendChild(A)}},{key:"_computePositions",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,S=this._config,w=S.total,T=S.reverse;x<1&&!T&&(x=1);for(var $=x;$0&&this._itemPositions[S]{(function(t,e){"use strict";function i(){r.width=t.innerWidth,r.height=5*c.barThickness;var f=r.getContext("2d");f.shadowBlur=c.shadowBlur,f.shadowColor=c.shadowColor;var d,p=f.createLinearGradient(0,0,r.width,0);for(d in c.barColors)p.addColorStop(d,c.barColors[d]);f.lineWidth=c.barThickness,f.beginPath(),f.moveTo(0,c.barThickness/2),f.lineTo(Math.ceil(n*r.width),c.barThickness/2),f.strokeStyle=p,f.stroke()}var r,n,o,s=null,a=null,l=null,c={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},u={config:function(f){for(var d in f)c.hasOwnProperty(d)&&(c[d]=f[d])},show:function(f){var d,p;o||(f?l=l||setTimeout(()=>u.show(),f):(o=!0,a!==null&&t.cancelAnimationFrame(a),r||((p=(r=e.createElement("canvas")).style).position="fixed",p.top=p.left=p.right=p.margin=p.padding=0,p.zIndex=100001,p.display="none",c.className&&r.classList.add(c.className),d="resize",f=i,(p=t).addEventListener?p.addEventListener(d,f,!1):p.attachEvent?p.attachEvent("on"+d,f):p["on"+d]=f),r.parentElement||e.body.appendChild(r),r.style.opacity=1,r.style.display="block",u.progress(0),c.autoRun&&function g(){s=t.requestAnimationFrame(g),u.progress("+"+.05*Math.pow(1-Math.sqrt(n),2))}()))},progress:function(f){return f===void 0||(typeof f=="string"&&(f=(0<=f.indexOf("+")||0<=f.indexOf("-")?n:0)+parseFloat(f)),n=1typeof t=="function"?t:function(){return t},KI=typeof self!="undefined"?self:null,tc=typeof window!="undefined"?window:null,fs=KI||tc||fs,JI="2.0.0",Fr={connecting:0,open:1,closing:2,closed:3},e7=1e4,t7=1e3,Yi={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Sn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},dg={longpoll:"longpoll",websocket:"websocket"},i7={complete:4},hh=class{constructor(t,e,i,r){this.channel=t,this.event=e,this.payload=i||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:t,response:e,_ref:i}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},Lk=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},r7=class{constructor(t,e,i){this.state=Yi.closed,this.topic=t,this.params=ic(e||{}),this.socket=i,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new hh(this,Sn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Lk(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Yi.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Yi.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=Yi.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=Yi.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new hh(this,Sn.leave,ic({}),this.timeout).send(),this.state=Yi.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Sn.reply,(r,n)=>{this.trigger(this.replyEventName(n),r)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(t){this.on(Sn.close,t)}onError(t){return this.on(Sn.error,e=>t(e))}on(t,e){let i=this.bindingRef++;return this.bindings.push({event:t,ref:i,callback:e}),i}off(t,e){this.bindings=this.bindings.filter(i=>!(i.event===t&&(typeof e=="undefined"||e===i.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,i=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new hh(this,t,function(){return e},i);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Yi.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Sn.close,"leave")},i=new hh(this,Sn.leave,ic({}),t);return i.receive("ok",()=>e()).receive("timeout",()=>e()),i.send(),this.canPush()||i.trigger("ok",{}),i}onMessage(t,e,i){return e}isMember(t,e,i,r){return this.topic!==t?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:i,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Yi.joining,this.joinPush.resend(t))}trigger(t,e,i,r){let n=this.onMessage(t,e,i,r);if(e&&!n)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(s=>s.event===t);for(let s=0;s{let a=this.parseJSON(t.responseText);s&&s(a)},o&&(t.ontimeout=o),t.onprogress=()=>{},t.send(r),t}static xhrRequest(t,e,i,r,n,o,s,a){return t.open(e,i,!0),t.timeout=o,t.setRequestHeader("Content-Type",r),t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===i7.complete&&a){let l=this.parseJSON(t.responseText);a(l)}},s&&(t.ontimeout=s),t.send(n),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch(e){return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let i=[];for(var r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let n=e?`${e}[${r}]`:r,o=t[r];typeof o=="object"?i.push(this.serialize(o,n)):i.push(encodeURIComponent(n)+"="+encodeURIComponent(o))}return i.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let i=t.match(/\?/)?"&":"?";return`${t}${i}${this.serialize(e)}`}},n7=t=>{let e="",i=new Uint8Array(t),r=i.byteLength;for(let n=0;nthis.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+dg.websocket),"$1/"+dg.longpoll)}endpointURL(){return ph.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,i){this.close(t,e,i),this.readyState=Fr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Fr.open||this.readyState===Fr.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),t=>{if(t){var{status:e,token:i,messages:r}=t;this.token=i}else e=0;switch(e){case 200:r.forEach(n=>{setTimeout(()=>this.onmessage({data:n}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Fr.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${e}`)}})}send(t){typeof t!="string"&&(t=n7(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",t.join(` +`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,i){for(let n of this.reqs)n.abort();this.readyState=Fr.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:i});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent!="undefined"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(t,e,i,r,n){let o,s=()=>{this.reqs.delete(o),r()};o=ph.request(t,this.endpointURL(),e,i,this.timeout,s,a=>{this.reqs.delete(o),this.isActive()&&n(a)}),this.reqs.add(o)}};var dh={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let i=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(i))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[i,r,n,o,s]=JSON.parse(t);return e({join_ref:i,ref:r,topic:n,event:o,payload:s})}},binaryEncode(t){let{join_ref:e,ref:i,event:r,topic:n,payload:o}=t,s=this.META_LENGTH+e.length+i.length+n.length+r.length,a=new ArrayBuffer(this.HEADER_LENGTH+s),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,e.length),l.setUint8(c++,i.length),l.setUint8(c++,n.length),l.setUint8(c++,r.length),Array.from(e,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(i,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(n,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(r,f=>l.setUint8(c++,f.charCodeAt(0)));var u=new Uint8Array(a.byteLength+o.byteLength);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(o),a.byteLength),u.buffer},binaryDecode(t){let e=new DataView(t),i=e.getUint8(0),r=new TextDecoder;switch(i){case this.KINDS.push:return this.decodePush(t,e,r);case this.KINDS.reply:return this.decodeReply(t,e,r);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,r)}},decodePush(t,e,i){let r=e.getUint8(1),n=e.getUint8(2),o=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,a=i.decode(t.slice(s,s+r));s=s+r;let l=i.decode(t.slice(s,s+n));s=s+n;let c=i.decode(t.slice(s,s+o));s=s+o;let u=t.slice(s,t.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:u}},decodeReply(t,e,i){let r=e.getUint8(1),n=e.getUint8(2),o=e.getUint8(3),s=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=i.decode(t.slice(a,a+r));a=a+r;let c=i.decode(t.slice(a,a+n));a=a+n;let u=i.decode(t.slice(a,a+o));a=a+o;let f=i.decode(t.slice(a,a+s));a=a+s;let d=t.slice(a,t.byteLength),p={status:f,response:d};return{join_ref:l,ref:c,topic:u,event:Sn.reply,payload:p}},decodeBroadcast(t,e,i){let r=e.getUint8(1),n=e.getUint8(2),o=this.HEADER_LENGTH+2,s=i.decode(t.slice(o,o+r));o=o+r;let a=i.decode(t.slice(o,o+n));o=o+n;let l=t.slice(o,t.byteLength);return{join_ref:null,ref:null,topic:s,event:a,payload:l}}},Oh=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||e7,this.transport=e.transport||fs.WebSocket||ec,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=e.sessionStorage||fs&&fs.sessionStorage,this.establishedConnections=0,this.defaultEncoder=dh.encode.bind(dh),this.defaultDecoder=dh.decode.bind(dh),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==ec?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;tc&&tc.addEventListener&&(tc.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),i=this.connectClock)}),tc.addEventListener("pageshow",r=>{i===this.connectClock&&(i=null,this.connect())})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=r=>e.rejoinAfterMs?e.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>e.reconnectAfterMs?e.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(r,n,o)=>{console.log(`${r}: ${n}`,o)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=ic(e.params||{}),this.endPoint=`${t}/${dg.websocket}`,this.vsn=e.vsn||JI,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Lk(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return ec}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=ph.appendParams(ph.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,i){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(t,e,i)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ic(t)),!this.conn&&(this.longPollFallbackMs&&this.transport!==ec?this.connectWithFallback(ec,this.longPollFallbackMs):this.transportConnect())}log(t,e,i){this.logger&&this.logger(t,e,i)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),i=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let r=this.onMessage(n=>{n.ref===e&&(this.off([r]),t(Date.now()-i))});return!0}transportConnect(){this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let i=!1,r=!0,n,o,s=a=>{this.log("transport",`falling back to ${t.name}...`,a),this.off([n,o]),r=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${t.name}`))return s("memorized");this.fallbackTimer=setTimeout(s,e),o=this.onError(a=>{this.log("transport","error",a),r&&!i&&(clearTimeout(this.fallbackTimer),s(a))}),this.onOpen(()=>{if(i=!0,!r)return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t.name}`,"true"),this.log("transport",`established ${t.name} fallback`);clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(s,e),this.ping(a=>{this.log("transport","connected to primary after",a),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`${this.transport.name} connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,t])=>t())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),t7,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,i){if(!this.conn)return t&&t();this.waitForBufferDone(()=>{this.conn&&(e?this.conn.close(e,i||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e=1){if(e===5||!this.conn||!this.conn.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(t,e+1)},150*e)}waitForSocketClosed(t,e=1){if(e===5||!this.conn||this.conn.readyState===Fr.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(t,e+1)},150*e)}onConnClose(t){let e=t&&t.code;this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&e!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,i])=>i(t))}onConnError(t){this.hasLogger()&&this.log("transport",t);let e=this.transport,i=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,r])=>{r(t,e,i)}),(e===this.transport||i>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Sn.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case Fr.connecting:return"connecting";case Fr.open:return"open";case Fr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([i])=>t.indexOf(i)===-1)}channel(t,e={}){let i=new r7(t,e,this);return this.channels.push(i),i}push(t){if(this.hasLogger()){let{topic:e,event:i,payload:r,ref:n,join_ref:o}=t;this.log("push",`${e} ${i} (${o}, ${n})`,r)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:i,event:r,payload:n,ref:o,join_ref:s}=e;o&&o===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${n.status||""} ${i} ${r} ${o&&"("+o+")"||""}`,n);for(let a=0;ai.topic===t&&(i.isJoined()||i.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};var cS="consecutive-reloads",o7=10,s7=5e3,a7=1e4,l7=3e4,c7=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading","phx-hook-loading"],En="data-phx-component",pg="data-phx-link",u7="track-static",f7="data-phx-link-state",Ti="data-phx-ref",hs="data-phx-ref-src",uS="track-uploads",Cn="data-phx-upload-ref",Eg="data-phx-preflighted-refs",h7="data-phx-done-refs",Ik="drop-target",kg="data-phx-active-refs",Sh="phx:live-file:updated",fS="data-phx-skip",hS="data-phx-id",Dk="data-phx-prune",Nk="page-loading",Mk="phx-connected",rc="phx-loading",mh="phx-error",Uk="phx-client-error",Og="phx-server-error",Os="data-phx-parent-id",Cg="data-phx-main",go="data-phx-root-id",Sg="viewport-top",Tg="viewport-bottom",d7="trigger-action",Eh="phx-has-focused",p7=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],dS=["checkbox","radio"],dc="phx-has-submitted",Jr="data-phx-session",Ca=`[${Jr}]`,zk="data-phx-sticky",ps="data-phx-static",mg="data-phx-readonly",Sa="data-phx-disabled",jk="disable-with",gh="data-phx-disable-with-restore",nc="hook",O7="debounce",m7="throttle",fc="update",gg="stream",bg="data-phx-stream",g7="key",Hr="phxPrivate",qk="auto-recover",bh="phx:live-socket:debug",yg="phx:live-socket:profiling",xg="phx:live-socket:latency-sim",b7="progress",Wk="mounted",y7=1,x7=200,v7="phx-",w7=3e4,oc="debounce-trigger",sc="throttled",Bk="debounce-prev-key",k7={debounce:300,throttle:300},yh="d",Gr="s",vg="r",Si="c",Zk="e",Vk="r",Yk="t",S7="p",Fk="stream",T7=class{constructor(t,e,i){this.liveSocket=i,this.entry=t,this.offset=0,this.chunkSize=e,this.chunkTimer=null,this.errored=!1,this.uploadChannel=i.channel(`lvu:${t.ref}`,{token:t.metadata()})}error(t){this.errored||(this.uploadChannel.leave(),this.errored=!0,clearTimeout(this.chunkTimer),this.entry.error(t))}upload(){this.uploadChannel.onError(t=>this.error(t)),this.uploadChannel.join().receive("ok",t=>this.readNextChunk()).receive("error",t=>this.error(t))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let t=new window.FileReader,e=this.entry.file.slice(this.offset,this.chunkSize+this.offset);t.onload=i=>{if(i.target.error===null)this.offset+=i.target.result.byteLength,this.pushChunk(i.target.result);else return Fi("Read error: "+i.target.error)},t.readAsArrayBuffer(e)}pushChunk(t){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",t).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))}).receive("error",({reason:e})=>this.error(e))}},Fi=(t,e)=>console.error&&console.error(t,e),Tn=t=>{let e=typeof t;return e==="number"||e==="string"&&/^(0|[1-9]\d*)$/.test(t)};function E7(){let t=new Set,e=document.querySelectorAll("*[id]");for(let i=0,r=e.length;i{t.liveSocket.isDebugEnabled()&&console.log(`${t.id} ${e}: ${i} - `,r)},ac=t=>typeof t=="function"?t:function(){return t},Th=t=>JSON.parse(JSON.stringify(t)),hc=(t,e,i)=>{do{if(t.matches(`[${e}]`)&&!t.disabled)return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1&&!(i&&i.isSameNode(t)||t.matches(Ca)));return null},Ta=t=>t!==null&&typeof t=="object"&&!(t instanceof Array),P7=(t,e)=>JSON.stringify(t)===JSON.stringify(e),Hk=t=>{for(let e in t)return!1;return!0},mo=(t,e)=>t&&e(t),_7=function(t,e,i,r){t.forEach(n=>{new T7(n,i.config.chunk_size,r).upload()})},pS={canPushState(){return typeof history.pushState!="undefined"},dropLocal(t,e,i){return t.removeItem(this.localKey(e,i))},updateLocal(t,e,i,r,n){let o=this.getLocal(t,e,i),s=this.localKey(e,i),a=o===null?r:n(o);return t.setItem(s,JSON.stringify(a)),a},getLocal(t,e,i){return JSON.parse(t.getItem(this.localKey(e,i)))},updateCurrentState(t){this.canPushState()&&history.replaceState(t(history.state||{}),"",window.location.href)},pushState(t,e,i){if(this.canPushState()){if(i!==window.location.href){if(e.type=="redirect"&&e.scroll){let n=history.state||{};n.scroll=e.scroll,history.replaceState(n,"",window.location.href)}delete e.scroll,history[t+"State"](e,"",i||null);let r=this.getHashTargetEl(window.location.hash);r?r.scrollIntoView():e.type==="redirect"&&window.scroll(0,0)}}else this.redirect(i)},setCookie(t,e){document.cookie=`${t}=${e}`},getCookie(t){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${t}s*=s*([^;]*).*$)|^.*$`),"$1")},redirect(t,e){e&&pS.setCookie("__phoenix_flash__",e+"; max-age=60000; path=/"),window.location=t},localKey(t,e){return`${t}-${e}`},getHashTargetEl(t){let e=t.toString().substring(1);if(e!=="")return document.getElementById(e)||document.querySelector(`a[name="${e}"]`)}},Kr=pS,Q7={focusMain(){let t=document.querySelector("main h1, main, h1");if(t){let e=t.tabIndex;t.tabIndex=-1,t.focus(),t.tabIndex=e}},anyOf(t,e){return e.find(i=>t instanceof i)},isFocusable(t,e){return t instanceof HTMLAnchorElement&&t.rel!=="ignore"||t instanceof HTMLAreaElement&&t.href!==void 0||!t.disabled&&this.anyOf(t,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||t instanceof HTMLIFrameElement||t.tabIndex>0||!e&&t.getAttribute("tabindex")!==null&&t.getAttribute("aria-hidden")!=="true"},attemptFocus(t,e){if(this.isFocusable(t,e))try{t.focus()}catch(i){}return!!document.activeElement&&document.activeElement.isSameNode(t)},focusFirstInteractive(t){let e=t.firstElementChild;for(;e;){if(this.attemptFocus(e,!0)||this.focusFirstInteractive(e,!0))return!0;e=e.nextElementSibling}},focusFirst(t){let e=t.firstElementChild;for(;e;){if(this.attemptFocus(e)||this.focusFirst(e))return!0;e=e.nextElementSibling}},focusLast(t){let e=t.lastElementChild;for(;e;){if(this.attemptFocus(e)||this.focusLast(e))return!0;e=e.previousElementSibling}}},Ea=Q7,Gk=[],Kk=200,A7={exec(t,e,i,r,n){let[o,s]=n||[null,{callback:n&&n.callback}];(e.charAt(0)==="["?JSON.parse(e):[[o,s]]).forEach(([l,c])=>{l===o&&s.data&&(c.data=Object.assign(c.data||{},s.data),c.callback=c.callback||s.callback),this.filterToEls(r,c).forEach(u=>{this[`exec_${l}`](t,e,i,r,u,c)})})},isVisible(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length>0)},isInViewport(t){let e=t.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return e.right>0&&e.bottom>0&&e.left{let c=l.getAttribute(o);if(!c)throw new Error(`expected ${o} to contain JS command on "${s}"`);i.liveSocket.execJS(l,c,t)})},exec_dispatch(t,e,i,r,n,{to:o,event:s,detail:a,bubbles:l}){a=a||{},a.dispatcher=r,te.dispatchEvent(n,s,{detail:a,bubbles:l})},exec_push(t,e,i,r,n,o){let{event:s,data:a,target:l,page_loading:c,loading:u,value:f,dispatcher:d,callback:p}=o,g={loading:u,value:f,target:l,page_loading:!!c},x=t==="change"&&d?d:r,S=l||x.getAttribute(i.binding("target"))||x;i.withinTargets(S,(w,T)=>{if(w.isConnected())if(t==="change"){let{newCid:$,_target:I}=o;I=I||(te.isFormInput(r)?r.name:void 0),I&&(g._target=I),w.pushInput(r,T,$,s||e,g,p)}else if(t==="submit"){let{submitter:$}=o;w.submitForm(r,T,s||e,$,g,p)}else w.pushEvent(t,r,T,s||e,a,g,p)})},exec_navigate(t,e,i,r,n,{href:o,replace:s}){i.liveSocket.historyRedirect(o,s?"replace":"push")},exec_patch(t,e,i,r,n,{href:o,replace:s}){i.liveSocket.pushHistoryPatch(o,s?"replace":"push",r)},exec_focus(t,e,i,r,n){window.requestAnimationFrame(()=>Ea.attemptFocus(n))},exec_focus_first(t,e,i,r,n){window.requestAnimationFrame(()=>Ea.focusFirstInteractive(n)||Ea.focusFirst(n))},exec_push_focus(t,e,i,r,n){window.requestAnimationFrame(()=>Gk.push(n||r))},exec_pop_focus(t,e,i,r,n){window.requestAnimationFrame(()=>{let o=Gk.pop();o&&o.focus()})},exec_add_class(t,e,i,r,n,{names:o,transition:s,time:a}){this.addOrRemoveClasses(n,o,[],s,a,i)},exec_remove_class(t,e,i,r,n,{names:o,transition:s,time:a}){this.addOrRemoveClasses(n,[],o,s,a,i)},exec_toggle_class(t,e,i,r,n,{to:o,names:s,transition:a,time:l}){this.toggleClasses(n,s,a,l,i)},exec_toggle_attr(t,e,i,r,n,{attr:[o,s,a]}){n.hasAttribute(o)?a!==void 0?n.getAttribute(o)===s?this.setOrRemoveAttrs(n,[[o,a]],[]):this.setOrRemoveAttrs(n,[[o,s]],[]):this.setOrRemoveAttrs(n,[],[o]):this.setOrRemoveAttrs(n,[[o,s]],[])},exec_transition(t,e,i,r,n,{time:o,transition:s}){this.addOrRemoveClasses(n,[],[],s,o,i)},exec_toggle(t,e,i,r,n,{display:o,ins:s,outs:a,time:l}){this.toggle(t,i,n,o,s,a,l)},exec_show(t,e,i,r,n,{display:o,transition:s,time:a}){this.show(t,i,n,o,s,a)},exec_hide(t,e,i,r,n,{display:o,transition:s,time:a}){this.hide(t,i,n,o,s,a)},exec_set_attr(t,e,i,r,n,{attr:[o,s]}){this.setOrRemoveAttrs(n,[[o,s]],[])},exec_remove_attr(t,e,i,r,n,{attr:o}){this.setOrRemoveAttrs(n,[],[o])},show(t,e,i,r,n,o){this.isVisible(i)||this.toggle(t,e,i,r,n,null,o)},hide(t,e,i,r,n,o){this.isVisible(i)&&this.toggle(t,e,i,r,null,n,o)},toggle(t,e,i,r,n,o,s){s=s||Kk;let[a,l,c]=n||[[],[],[]],[u,f,d]=o||[[],[],[]];if(a.length>0||u.length>0)if(this.isVisible(i)){let p=()=>{this.addOrRemoveClasses(i,f,a.concat(l).concat(c)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,u,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,d,f))})};i.dispatchEvent(new Event("phx:hide-start")),e.transition(s,p,()=>{this.addOrRemoveClasses(i,[],u.concat(d)),te.putSticky(i,"toggle",g=>g.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))})}else{if(t==="remove")return;let p=()=>{this.addOrRemoveClasses(i,l,u.concat(f).concat(d));let g=r||this.defaultDisplay(i);te.putSticky(i,"toggle",x=>x.style.display=g),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,c,l))})};i.dispatchEvent(new Event("phx:show-start")),e.transition(s,p,()=>{this.addOrRemoveClasses(i,[],a.concat(c)),i.dispatchEvent(new Event("phx:show-end"))})}else this.isVisible(i)?window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:hide-start")),te.putSticky(i,"toggle",p=>p.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:show-start"));let p=r||this.defaultDisplay(i);te.putSticky(i,"toggle",g=>g.style.display=p),i.dispatchEvent(new Event("phx:show-end"))})},toggleClasses(t,e,i,r,n){window.requestAnimationFrame(()=>{let[o,s]=te.getSticky(t,"classes",[[],[]]),a=e.filter(c=>o.indexOf(c)<0&&!t.classList.contains(c)),l=e.filter(c=>s.indexOf(c)<0&&t.classList.contains(c));this.addOrRemoveClasses(t,a,l,i,r,n)})},addOrRemoveClasses(t,e,i,r,n,o){n=n||Kk;let[s,a,l]=r||[[],[],[]];if(s.length>0){let c=()=>{this.addOrRemoveClasses(t,a,[].concat(s).concat(l)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,s,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,l,a))})},u=()=>this.addOrRemoveClasses(t,e.concat(l),i.concat(s).concat(a));return o.transition(n,c,u)}window.requestAnimationFrame(()=>{let[c,u]=te.getSticky(t,"classes",[[],[]]),f=e.filter(x=>c.indexOf(x)<0&&!t.classList.contains(x)),d=i.filter(x=>u.indexOf(x)<0&&t.classList.contains(x)),p=c.filter(x=>i.indexOf(x)<0).concat(f),g=u.filter(x=>e.indexOf(x)<0).concat(d);te.putSticky(t,"classes",x=>(x.classList.remove(...g),x.classList.add(...p),[p,g]))})},setOrRemoveAttrs(t,e,i){let[r,n]=te.getSticky(t,"attrs",[[],[]]),o=e.map(([l,c])=>l).concat(i),s=r.filter(([l,c])=>!o.includes(l)).concat(e),a=n.filter(l=>!o.includes(l)).concat(i);te.putSticky(t,"attrs",l=>(a.forEach(c=>l.removeAttribute(c)),s.forEach(([c,u])=>l.setAttribute(c,u)),[s,a]))},hasAllClasses(t,e){return e.every(i=>t.classList.contains(i))},isToggledOut(t,e){return!this.isVisible(t)||this.hasAllClasses(t,e)},filterToEls(t,{to:e}){return e?te.all(document,e):[t]},defaultDisplay(t){return{tr:"table-row",td:"table-cell"}[t.tagName.toLowerCase()]||"block"}},_r=A7,ds={byId(t){return document.getElementById(t)||Fi(`no id found for ${t}`)},removeClass(t,e){t.classList.remove(e),t.classList.length===0&&t.removeAttribute("class")},all(t,e,i){if(!t)return[];let r=Array.from(t.querySelectorAll(e));return i?r.forEach(i):r},childNodeLength(t){let e=document.createElement("template");return e.innerHTML=t,e.content.childElementCount},isUploadInput(t){return t.type==="file"&&t.getAttribute(Cn)!==null},isAutoUpload(t){return t.hasAttribute("data-phx-auto-upload")},findUploadInputs(t){let e=t.id,i=this.all(document,`input[type="file"][${Cn}][form="${e}"]`);return this.all(t,`input[type="file"][${Cn}]`).concat(i)},findComponentNodeList(t,e){return this.filterWithinSameLiveView(this.all(t,`[${En}="${e}"]`),t)},isPhxDestroyed(t){return!!(t.id&&ds.private(t,"destroyed"))},wantsNewTab(t){let e=t.ctrlKey||t.shiftKey||t.metaKey||t.button&&t.button===1,i=t.target instanceof HTMLAnchorElement&&t.target.hasAttribute("download"),r=t.target.hasAttribute("target")&&t.target.getAttribute("target").toLowerCase()==="_blank",n=t.target.hasAttribute("target")&&!t.target.getAttribute("target").startsWith("_");return e||r||i||n},isUnloadableFormSubmit(t){return t.target&&t.target.getAttribute("method")==="dialog"||t.submitter&&t.submitter.getAttribute("formmethod")==="dialog"?!1:!t.defaultPrevented&&!this.wantsNewTab(t)},isNewPageClick(t,e){let i=t.target instanceof HTMLAnchorElement?t.target.getAttribute("href"):null,r;if(t.defaultPrevented||i===null||this.wantsNewTab(t)||i.startsWith("mailto:")||i.startsWith("tel:")||t.target.isContentEditable)return!1;try{r=new URL(i)}catch(n){try{r=new URL(i,e)}catch(o){return!0}}return r.host===e.host&&r.protocol===e.protocol&&r.pathname===e.pathname&&r.search===e.search?r.hash===""&&!r.href.endsWith("#"):r.protocol.startsWith("http")},markPhxChildDestroyed(t){this.isPhxChild(t)&&t.setAttribute(Jr,""),this.putPrivate(t,"destroyed",!0)},findPhxChildrenInFragment(t,e){let i=document.createElement("template");return i.innerHTML=t,this.findPhxChildren(i.content,e)},isIgnored(t,e){return(t.getAttribute(e)||t.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(t,e,i){return t.getAttribute&&i.indexOf(t.getAttribute(e))>=0},findPhxSticky(t){return this.all(t,`[${zk}]`)},findPhxChildren(t,e){return this.all(t,`${Ca}[${Os}="${e}"]`)},findExistingParentCIDs(t,e){let i=new Set,r=new Set;return e.forEach(n=>{this.filterWithinSameLiveView(this.all(t,`[${En}="${n}"]`),t).forEach(o=>{i.add(n),this.all(o,`[${En}]`).map(s=>parseInt(s.getAttribute(En))).forEach(s=>r.add(s))})}),r.forEach(n=>i.delete(n)),i},filterWithinSameLiveView(t,e){return e.querySelector(Ca)?t.filter(i=>this.withinSameLiveView(i,e)):t},withinSameLiveView(t,e){for(;t=t.parentNode;){if(t.isSameNode(e))return!0;if(t.getAttribute(Jr)!==null)return!1}},private(t,e){return t[Hr]&&t[Hr][e]},deletePrivate(t,e){t[Hr]&&delete t[Hr][e]},putPrivate(t,e,i){t[Hr]||(t[Hr]={}),t[Hr][e]=i},updatePrivate(t,e,i,r){let n=this.private(t,e);n===void 0?this.putPrivate(t,e,r(i)):this.putPrivate(t,e,r(n))},copyPrivates(t,e){e[Hr]&&(t[Hr]=e[Hr])},putTitle(t){let e=document.querySelector("title");if(e){let{prefix:i,suffix:r}=e.dataset;document.title=`${i||""}${t}${r||""}`}else document.title=t},debounce(t,e,i,r,n,o,s,a){let l=t.getAttribute(i),c=t.getAttribute(n);l===""&&(l=r),c===""&&(c=o);let u=l||c;switch(u){case null:return a();case"blur":this.once(t,"debounce-blur")&&t.addEventListener("blur",()=>{s()&&a()});return;default:let f=parseInt(u),d=()=>c?this.deletePrivate(t,sc):a(),p=this.incCycle(t,oc,d);if(isNaN(f))return Fi(`invalid throttle/debounce value: ${u}`);if(c){let x=!1;if(e.type==="keydown"){let S=this.private(t,Bk);this.putPrivate(t,Bk,e.key),x=S!==e.key}if(!x&&this.private(t,sc))return!1;{a();let S=setTimeout(()=>{s()&&this.triggerCycle(t,oc)},f);this.putPrivate(t,sc,S)}}else setTimeout(()=>{s()&&this.triggerCycle(t,oc,p)},f);let g=t.form;g&&this.once(g,"bind-debounce")&&g.addEventListener("submit",()=>{Array.from(new FormData(g).entries(),([x])=>{let S=g.querySelector(`[name="${x}"]`);this.incCycle(S,oc),this.deletePrivate(S,sc)})}),this.once(t,"bind-debounce")&&t.addEventListener("blur",()=>{clearTimeout(this.private(t,sc)),this.triggerCycle(t,oc)})}},triggerCycle(t,e,i){let[r,n]=this.private(t,e);i||(i=r),i===r&&(this.incCycle(t,e),n())},once(t,e){return this.private(t,e)===!0?!1:(this.putPrivate(t,e,!0),!0)},incCycle(t,e,i=function(){}){let[r]=this.private(t,e)||[0,i];return r++,this.putPrivate(t,e,[r,i]),r},maybeAddPrivateHooks(t,e,i){t.hasAttribute&&(t.hasAttribute(e)||t.hasAttribute(i))&&t.setAttribute("data-phx-hook","Phoenix.InfiniteScroll")},isUsedInput(t){return t.nodeType===Node.ELEMENT_NODE&&(this.private(t,Eh)||this.private(t,dc))},resetForm(t){Array.from(t.elements).forEach(e=>{this.deletePrivate(e,Eh),this.deletePrivate(e,dc)})},isPhxChild(t){return t.getAttribute&&t.getAttribute(Os)},isPhxSticky(t){return t.getAttribute&&t.getAttribute(zk)!==null},isChildOfAny(t,e){return!!e.find(i=>i.contains(t))},firstPhxChild(t){return this.isPhxChild(t)?t:this.all(t,`[${Os}]`)[0]},dispatchEvent(t,e,i={}){let r=!0;t.nodeName==="INPUT"&&t.type==="file"&&e==="click"&&(r=!1);let s={bubbles:i.bubbles===void 0?r:!!i.bubbles,cancelable:!0,detail:i.detail||{}},a=e==="click"?new MouseEvent("click",s):new CustomEvent(e,s);t.dispatchEvent(a)},cloneNode(t,e){if(typeof e=="undefined")return t.cloneNode(!0);{let i=t.cloneNode(!1);return i.innerHTML=e,i}},mergeAttrs(t,e,i={}){let r=new Set(i.exclude||[]),n=i.isIgnored,o=e.attributes;for(let a=o.length-1;a>=0;a--){let l=o[a].name;if(r.has(l))l==="value"&&t.value===e.value&&t.setAttribute("value",e.getAttribute(l));else{let c=e.getAttribute(l);t.getAttribute(l)!==c&&(!n||n&&l.startsWith("data-"))&&t.setAttribute(l,c)}}let s=t.attributes;for(let a=s.length-1;a>=0;a--){let l=s[a].name;n?l.startsWith("data-")&&!e.hasAttribute(l)&&![Ti,hs].includes(l)&&t.removeAttribute(l):e.hasAttribute(l)||t.removeAttribute(l)}},mergeFocusedInput(t,e){t instanceof HTMLSelectElement||ds.mergeAttrs(t,e,{exclude:["value"]}),e.readOnly?t.setAttribute("readonly",!0):t.removeAttribute("readonly")},hasSelectionRange(t){return t.setSelectionRange&&(t.type==="text"||t.type==="textarea")},restoreFocus(t,e,i){if(t instanceof HTMLSelectElement&&t.focus(),!ds.isTextualInput(t))return;t.matches(":focus")||t.focus(),this.hasSelectionRange(t)&&t.setSelectionRange(e,i)},isFormInput(t){return/^(?:input|select|textarea)$/i.test(t.tagName)&&t.type!=="button"},syncAttrsToProps(t){t instanceof HTMLInputElement&&dS.indexOf(t.type.toLocaleLowerCase())>=0&&(t.checked=t.getAttribute("checked")!==null)},isTextualInput(t){return p7.indexOf(t.type)>=0},isNowTriggerFormExternal(t,e){return t.getAttribute&&t.getAttribute(e)!==null},cleanChildNodes(t,e){if(ds.isPhxUpdate(t,e,["append","prepend"])){let i=[];t.childNodes.forEach(r=>{r.id||(!(r.nodeType===Node.TEXT_NODE&&r.nodeValue.trim()==="")&&r.nodeType!==Node.COMMENT_NODE&&Fi(`only HTML element tags with an id are allowed inside containers with phx-update. removing illegal node: "${(r.outerHTML||r.nodeValue).trim()}" -`),i.push(r))}),i.forEach(r=>r.remove())}},replaceRootContainer(t,e,i){let r=new Set(["id",Jr,ps,Cg,go]);if(t.tagName.toLowerCase()===e.toLowerCase())return Array.from(t.attributes).filter(n=>!r.has(n.name.toLowerCase())).forEach(n=>t.removeAttribute(n.name)),Object.keys(i).filter(n=>!r.has(n.toLowerCase())).forEach(n=>t.setAttribute(n,i[n])),t;{let n=document.createElement(e);return Object.keys(i).forEach(o=>n.setAttribute(o,i[o])),r.forEach(o=>n.setAttribute(o,t.getAttribute(o))),n.innerHTML=t.innerHTML,t.replaceWith(n),n}},getSticky(t,e,i){let r=(ds.private(t,"sticky")||[]).find(([n])=>e===n);if(r){let[n,o,s]=r;return s}else return typeof i=="function"?i():i},deleteSticky(t,e){this.updatePrivate(t,"sticky",[],i=>i.filter(([r,n])=>r!==e))},putSticky(t,e,i){let r=i(t);this.updatePrivate(t,"sticky",[],n=>{let o=n.findIndex(([s])=>e===s);return o>=0?n[o]=[e,i,r]:n.push([e,i,r]),n})},applyStickyOperations(t){let e=ds.private(t,"sticky");e&&e.forEach(([i,r,n])=>this.putSticky(t,i,r))}},te=ds,lc=class{static isActive(t,e){let i=e._phxRef===void 0,n=t.getAttribute(kg).split(",").indexOf(Nt.genFileRef(e))>=0;return e.size>0&&(i||n)}static isPreflighted(t,e){return t.getAttribute(Eg).split(",").indexOf(Nt.genFileRef(e))>=0&&this.isActive(t,e)}static isPreflightInProgress(t){return t._preflightInProgress===!0}static markPreflightInProgress(t){t._preflightInProgress=!0}constructor(t,e,i,r){this.ref=Nt.genFileRef(e),this.fileEl=t,this.file=e,this.view=i,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(Sh,this._onElUpdated),this.autoUpload=r}metadata(){return this.meta}progress(t){this._progress=Math.floor(t),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{Nt.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}isCancelled(){return this._isCancelled}cancel(){this.file._preflightInProgress=!1,this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(t="failed"){this.fileEl.removeEventListener(Sh,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:t}),this.isAutoUpload()||Nt.clearFiles(this.fileEl)}isAutoUpload(){return this.autoUpload}onDone(t){this._onDone=()=>{this.fileEl.removeEventListener(Sh,this._onElUpdated),t()}}onElUpdated(){this.fileEl.getAttribute(kg).split(",").indexOf(this.ref)===-1&&(Nt.untrackFile(this.fileEl,this.file),this.cancel())}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref,meta:typeof this.file.meta=="function"?this.file.meta():void 0}}uploader(t){if(this.meta.uploader){let e=t[this.meta.uploader]||Fi(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:P7}}zipPostFlight(t){this.meta=t.entries[this.ref],this.meta||Fi(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:t})}},A7=0,Nt=class{static genFileRef(t){let e=t._phxRef;return e!==void 0?e:(t._phxRef=(A7++).toString(),t._phxRef)}static getEntryDataURL(t,e,i){let r=this.activeFiles(t).find(n=>this.genFileRef(n)===e);i(URL.createObjectURL(r))}static hasUploadsInProgress(t){let e=0;return te.findUploadInputs(t).forEach(i=>{i.getAttribute(Eg)!==i.getAttribute(f7)&&e++}),e>0}static serializeUploads(t){let e=this.activeFiles(t),i={};return e.forEach(r=>{let n={path:t.name},o=t.getAttribute(Cn);i[o]=i[o]||[],n.ref=this.genFileRef(r),n.last_modified=r.lastModified,n.name=r.name||n.ref,n.relative_path=r.webkitRelativePath,n.type=r.type,n.size=r.size,typeof r.meta=="function"&&(n.meta=r.meta()),i[o].push(n)}),i}static clearFiles(t){t.value=null,t.removeAttribute(Cn),te.putPrivate(t,"files",[])}static untrackFile(t,e){te.putPrivate(t,"files",te.private(t,"files").filter(i=>!Object.is(i,e)))}static trackFiles(t,e,i){if(t.getAttribute("multiple")!==null){let r=e.filter(n=>!this.activeFiles(t).find(o=>Object.is(o,n)));te.updatePrivate(t,"files",[],n=>n.concat(r)),t.value=null}else i&&i.files.length>0&&(t.files=i.files),te.putPrivate(t,"files",e)}static activeFileInputs(t){let e=te.findUploadInputs(t);return Array.from(e).filter(i=>i.files&&this.activeFiles(i).length>0)}static activeFiles(t){return(te.private(t,"files")||[]).filter(e=>lc.isActive(t,e))}static inputsAwaitingPreflight(t){let e=te.findUploadInputs(t);return Array.from(e).filter(i=>this.filesAwaitingPreflight(i).length>0)}static filesAwaitingPreflight(t){return this.activeFiles(t).filter(e=>!lc.isPreflighted(t,e)&&!lc.isPreflightInProgress(e))}static markPreflightInProgress(t){t.forEach(e=>lc.markPreflightInProgress(e.file))}constructor(t,e,i){this.autoUpload=te.isAutoUpload(t),this.view=e,this.onComplete=i,this._entries=Array.from(Nt.filesAwaitingPreflight(t)||[]).map(r=>new lc(t,r,e,this.autoUpload)),Nt.markPreflightInProgress(this._entries),this.numEntriesInProgress=this._entries.length}isAutoUpload(){return this.autoUpload}entries(){return this._entries}initAdapterUpload(t,e,i){this._entries=this._entries.map(n=>(n.isCancelled()?(this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()):(n.zipPostFlight(t),n.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()})),n));let r=this._entries.reduce((n,o)=>{if(!o.meta)return n;let{name:s,callback:a}=o.uploader(i.uploaders);return n[s]=n[s]||{callback:a,entries:[]},n[s].entries.push(o),n},{});for(let n in r){let{callback:o,entries:s}=r[n];o(s,e,t,i)}}},OS={LiveFileUpload:{activeRefs(){return this.el.getAttribute(kg)},preflightedRefs(){return this.el.getAttribute(Eg)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let t=this.preflightedRefs();this.preflightedWas!==t&&(this.preflightedWas=t,t===""&&this.__view.cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(Sh))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(Cn)),Nt.getEntryDataURL(this.inputEl,this.ref,t=>{this.url=t,this.el.src=t})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",()=>Ea.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>Ea.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&Ea.focusFirst(this.el)}}},mS=t=>["HTML","BODY"].indexOf(t.nodeName.toUpperCase())>=0?null:["scroll","auto"].indexOf(getComputedStyle(t).overflowY)>=0?t:mS(t.parentElement),Jk=t=>t?t.scrollTop:document.documentElement.scrollTop||document.body.scrollTop,Pg=t=>t?t.getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight,_g=t=>t?t.getBoundingClientRect().top:0,$7=(t,e)=>{let i=t.getBoundingClientRect();return i.top>=_g(e)&&i.left>=0&&i.top<=Pg(e)},X7=(t,e)=>{let i=t.getBoundingClientRect();return i.right>=_g(e)&&i.left>=0&&i.bottom<=Pg(e)},eS=(t,e)=>{let i=t.getBoundingClientRect();return i.top>=_g(e)&&i.left>=0&&i.top<=Pg(e)};OS.InfiniteScroll={mounted(){this.scrollContainer=mS(this.el);let t=Jk(this.scrollContainer),e=!1,i=500,r=null,n=this.throttle(i,(a,l)=>{r=()=>!0,this.liveSocket.execJSHookPush(this.el,a,{id:l.id,_overran:!0},()=>{r=null})}),o=this.throttle(i,(a,l)=>{r=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{r=null,window.requestAnimationFrame(()=>{eS(l,this.scrollContainer)||l.scrollIntoView({block:"start"})})})}),s=this.throttle(i,(a,l)=>{r=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{r=null,window.requestAnimationFrame(()=>{eS(l,this.scrollContainer)||l.scrollIntoView({block:"end"})})})});this.onScroll=a=>{let l=Jk(this.scrollContainer);if(r)return t=l,r();let c=this.el.getBoundingClientRect(),u=this.el.getAttribute(this.liveSocket.binding("viewport-top")),f=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),d=this.el.lastElementChild,p=this.el.firstElementChild,g=lt;g&&u&&!e&&c.top>=0?(e=!0,n(u,p)):x&&e&&c.top<=0&&(e=!1),u&&g&&$7(p,this.scrollContainer)?o(u,p):f&&x&&X7(d,this.scrollContainer)&&s(f,d),t=l},this.scrollContainer?this.scrollContainer.addEventListener("scroll",this.onScroll):window.addEventListener("scroll",this.onScroll)},destroyed(){this.scrollContainer?this.scrollContainer.removeEventListener("scroll",this.onScroll):window.removeEventListener("scroll",this.onScroll)},throttle(t,e){let i=0,r;return(...n)=>{let o=Date.now(),s=t-(o-i);s<=0||s>t?(r&&(clearTimeout(r),r=null),i=o,e(...n)):r||(r=setTimeout(()=>{i=Date.now(),r=null,e(...n)},s))}}};var R7=OS,L7=class{constructor(t,e,i){let r=new Set,n=new Set([...e.children].map(s=>s.id)),o=[];Array.from(t.children).forEach(s=>{if(s.id&&(r.add(s.id),n.has(s.id))){let a=s.previousElementSibling&&s.previousElementSibling.id;o.push({elementId:s.id,previousElementId:a})}}),this.containerId=e.id,this.updateType=i,this.elementsToModify=o,this.elementIdsToAdd=[...n].filter(s=>!r.has(s))}perform(){let t=te.byId(this.containerId);this.elementsToModify.forEach(e=>{e.previousElementId?mo(document.getElementById(e.previousElementId),i=>{mo(document.getElementById(e.elementId),r=>{r.previousElementSibling&&r.previousElementSibling.id==i.id||i.insertAdjacentElement("afterend",r)})}):mo(document.getElementById(e.elementId),i=>{i.previousElementSibling==null||t.insertAdjacentElement("afterbegin",i)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{mo(document.getElementById(e),i=>t.insertAdjacentElement("afterbegin",i))})}},tS=11;function I7(t,e){var i=e.attributes,r,n,o,s,a;if(!(e.nodeType===tS||t.nodeType===tS)){for(var l=i.length-1;l>=0;l--)r=i[l],n=r.name,o=r.namespaceURI,s=r.value,o?(n=r.localName||n,a=t.getAttributeNS(o,n),a!==s&&(r.prefix==="xmlns"&&(n=r.name),t.setAttributeNS(o,n,s))):(a=t.getAttribute(n),a!==s&&t.setAttribute(n,s));for(var c=t.attributes,u=c.length-1;u>=0;u--)r=c[u],n=r.name,o=r.namespaceURI,o?(n=r.localName||n,e.hasAttributeNS(o,n)||t.removeAttributeNS(o,n)):e.hasAttribute(n)||t.removeAttribute(n)}}var xh,D7="http://www.w3.org/1999/xhtml",Li=typeof document=="undefined"?void 0:document,M7=!!Li&&"content"in Li.createElement("template"),N7=!!Li&&Li.createRange&&"createContextualFragment"in Li.createRange();function U7(t){var e=Li.createElement("template");return e.innerHTML=t,e.content.childNodes[0]}function z7(t){xh||(xh=Li.createRange(),xh.selectNode(Li.body));var e=xh.createContextualFragment(t);return e.childNodes[0]}function j7(t){var e=Li.createElement("body");return e.innerHTML=t,e.childNodes[0]}function q7(t){return t=t.trim(),M7?U7(t):N7?z7(t):j7(t)}function vh(t,e){var i=t.nodeName,r=e.nodeName,n,o;return i===r?!0:(n=i.charCodeAt(0),o=r.charCodeAt(0),n<=90&&o>=97?i===r.toUpperCase():o<=90&&n>=97?r===i.toUpperCase():!1)}function W7(t,e){return!e||e===D7?Li.createElement(t):Li.createElementNS(e,t)}function B7(t,e){for(var i=t.firstChild;i;){var r=i.nextSibling;e.appendChild(i),i=r}return e}function wg(t,e,i){t[i]!==e[i]&&(t[i]=e[i],t[i]?t.setAttribute(i,""):t.removeAttribute(i))}var iS={OPTION:function(t,e){var i=t.parentNode;if(i){var r=i.nodeName.toUpperCase();r==="OPTGROUP"&&(i=i.parentNode,r=i&&i.nodeName.toUpperCase()),r==="SELECT"&&!i.hasAttribute("multiple")&&(t.hasAttribute("selected")&&!e.selected&&(t.setAttribute("selected","selected"),t.removeAttribute("selected")),i.selectedIndex=-1)}wg(t,e,"selected")},INPUT:function(t,e){wg(t,e,"checked"),wg(t,e,"disabled"),t.value!==e.value&&(t.value=e.value),e.hasAttribute("value")||t.removeAttribute("value")},TEXTAREA:function(t,e){var i=e.value;t.value!==i&&(t.value=i);var r=t.firstChild;if(r){var n=r.nodeValue;if(n==i||!i&&n==t.placeholder)return;r.nodeValue=i}},SELECT:function(t,e){if(!e.hasAttribute("multiple")){for(var i=-1,r=0,n=t.firstChild,o,s;n;)if(s=n.nodeName&&n.nodeName.toUpperCase(),s==="OPTGROUP")o=n,n=o.firstChild;else{if(s==="OPTION"){if(n.hasAttribute("selected")){i=r;break}r++}n=n.nextSibling,!n&&o&&(n=o.nextSibling,o=null)}t.selectedIndex=i}}},cc=1,rS=11,nS=3,oS=8;function Oo(){}function Z7(t){if(t)return t.getAttribute&&t.getAttribute("id")||t.id}function V7(t){return function(i,r,n){if(n||(n={}),typeof r=="string")if(i.nodeName==="#document"||i.nodeName==="HTML"||i.nodeName==="BODY"){var o=r;r=Li.createElement("html"),r.innerHTML=o}else r=q7(r);else r.nodeType===rS&&(r=r.firstElementChild);var s=n.getNodeKey||Z7,a=n.onBeforeNodeAdded||Oo,l=n.onNodeAdded||Oo,c=n.onBeforeElUpdated||Oo,u=n.onElUpdated||Oo,f=n.onBeforeNodeDiscarded||Oo,d=n.onNodeDiscarded||Oo,p=n.onBeforeElChildrenUpdated||Oo,g=n.skipFromChildren||Oo,x=n.addChild||function(j,ae){return j.appendChild(ae)},S=n.childrenOnly===!0,w=Object.create(null),T=[];function $(j){T.push(j)}function I(j,ae){if(j.nodeType===cc)for(var V=j.firstChild;V;){var E=void 0;ae&&(E=s(V))?$(E):(d(V),V.firstChild&&I(V,ae)),V=V.nextSibling}}function _(j,ae,V){f(j)!==!1&&(ae&&ae.removeChild(j),d(j),I(j,V))}function A(j){if(j.nodeType===cc||j.nodeType===rS)for(var ae=j.firstChild;ae;){var V=s(ae);V&&(w[V]=ae),A(ae),ae=ae.nextSibling}}A(i);function q(j){l(j);for(var ae=j.firstChild;ae;){var V=ae.nextSibling,E=s(ae);if(E){var B=w[E];B&&vh(ae,B)?(ae.parentNode.replaceChild(B,ae),F(B,ae)):q(ae)}else q(ae);ae=V}}function le(j,ae,V){for(;ae;){var E=ae.nextSibling;(V=s(ae))?$(V):_(ae,j,!0),ae=E}}function F(j,ae,V){var E=s(ae);if(E&&delete w[E],!V){var B=c(j,ae);if(B===!1||(B instanceof HTMLElement&&(j=B),t(j,ae),u(j),p(j,ae)===!1))return}j.nodeName!=="TEXTAREA"?U(j,ae):iS.TEXTAREA(j,ae)}function U(j,ae){var V=g(j,ae),E=ae.firstChild,B=j.firstChild,ne,D,Ue,Ze,Ve;e:for(;E;){for(Ze=E.nextSibling,ne=s(E);!V&&B;){if(Ue=B.nextSibling,E.isSameNode&&E.isSameNode(B)){E=Ze,B=Ue;continue e}D=s(B);var Rt=B.nodeType,Xe=void 0;if(Rt===E.nodeType&&(Rt===cc?(ne?ne!==D&&((Ve=w[ne])?Ue===Ve?Xe=!1:(j.insertBefore(Ve,B),D?$(D):_(B,j,!0),B=Ve,D=s(B)):Xe=!1):D&&(Xe=!1),Xe=Xe!==!1&&vh(B,E),Xe&&F(B,E)):(Rt===nS||Rt==oS)&&(Xe=!0,B.nodeValue!==E.nodeValue&&(B.nodeValue=E.nodeValue))),Xe){E=Ze,B=Ue;continue e}D?$(D):_(B,j,!0),B=Ue}if(ne&&(Ve=w[ne])&&vh(Ve,E))V||x(j,Ve),F(Ve,E);else{var Qt=a(E);Qt!==!1&&(Qt&&(E=Qt),E.actualize&&(E=E.actualize(j.ownerDocument||Li)),x(j,E),q(E))}E=Ze,B=Ue}le(j,B,D);var At=iS[j.nodeName];At&&At(j,ae)}var ie=i,ue=ie.nodeType,re=r.nodeType;if(!S){if(ue===cc)re===cc?vh(i,r)||(d(i),ie=B7(i,W7(r.nodeName,r.namespaceURI))):ie=r;else if(ue===nS||ue===oS){if(re===ue)return ie.nodeValue!==r.nodeValue&&(ie.nodeValue=r.nodeValue),ie;ie=r}}if(ie===r)d(i);else{if(r.isSameNode&&r.isSameNode(ie))return;if(F(ie,r,S),T)for(var de=0,me=T.length;de{if(te.isIgnored(o,n))return!1;if(r&&r.isSameNode(o)&&te.isFormInput(o))return te.mergeFocusedInput(o,s),!1}})}constructor(t,e,i,r,n,o){this.view=t,this.liveSocket=t.liveSocket,this.container=e,this.id=i,this.rootID=t.root.id,this.html=r,this.streams=n,this.streamInserts={},this.streamComponentRestore={},this.targetCID=o,this.cidPatch=Tn(this.targetCID),this.pendingRemoves=[],this.phxRemove=this.liveSocket.binding("remove"),this.targetContainer=this.isCIDPatch()?this.targetCIDContainer(r):e,this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[],aftertransitionsDiscarded:[]}}before(t,e){this.callbacks[`before${t}`].push(e)}after(t,e){this.callbacks[`after${t}`].push(e)}trackBefore(t,...e){this.callbacks[`before${t}`].forEach(i=>i(...e))}trackAfter(t,...e){this.callbacks[`after${t}`].forEach(i=>i(...e))}markPrunableContentForRemoval(){let t=this.liveSocket.binding(fc);te.all(this.container,`[${t}=append] > *, [${t}=prepend] > *`,e=>{e.setAttribute(Dk,"")})}perform(t){let{view:e,liveSocket:i,html:r,container:n,targetContainer:o}=this;if(this.isCIDPatch()&&!o)return;let s=i.getActiveElement(),{selectionStart:a,selectionEnd:l}=s&&te.hasSelectionRange(s)?s:{},c=i.binding(fc),u=i.binding(Sg),f=i.binding(Tg),d=i.binding(h7),p=[],g=[],x=[],S=null;function w(T,$,I=!1){sS(T,$,{childrenOnly:T.getAttribute(En)===null&&!I,getNodeKey:_=>te.isPhxDestroyed(_)?null:t?_.id:_.id||_.getAttribute&&_.getAttribute(hS),skipFromChildren:_=>_.getAttribute(c)===gg,addChild:(_,A)=>{let{ref:q,streamAt:le}=this.getStreamInsert(A);if(q===void 0)return _.appendChild(A);if(this.setStreamRef(A,q),le===0)_.insertAdjacentElement("afterbegin",A);else if(le===-1)_.appendChild(A);else if(le>0){let F=Array.from(_.children)[le];_.insertBefore(A,F)}},onBeforeNodeAdded:_=>{te.maybeAddPrivateHooks(_,u,f),this.trackBefore("added",_);let A=_;return!t&&this.streamComponentRestore[_.id]&&(A=this.streamComponentRestore[_.id],delete this.streamComponentRestore[_.id],w.call(this,A,_,!0)),A},onNodeAdded:_=>{_.getAttribute&&this.maybeReOrderStream(_,!0),_ instanceof HTMLImageElement&&_.srcset?_.srcset=_.srcset:_ instanceof HTMLVideoElement&&_.autoplay&&_.play(),te.isNowTriggerFormExternal(_,d)&&(S=_),(te.isPhxChild(_)&&e.ownsElement(_)||te.isPhxSticky(_)&&e.ownsElement(_.parentNode))&&this.trackAfter("phxChildAdded",_),p.push(_)},onNodeDiscarded:_=>this.onNodeDiscarded(_),onBeforeNodeDiscarded:_=>_.getAttribute&&_.getAttribute(Dk)!==null?!0:!(_.parentElement!==null&&_.id&&te.isPhxUpdate(_.parentElement,c,[gg,"append","prepend"])||this.maybePendingRemove(_)||this.skipCIDSibling(_)),onElUpdated:_=>{te.isNowTriggerFormExternal(_,d)&&(S=_),g.push(_),this.maybeReOrderStream(_,!1)},onBeforeElUpdated:(_,A)=>{if(te.maybeAddPrivateHooks(A,u,f),te.cleanChildNodes(A,c),this.skipCIDSibling(A))return this.maybeReOrderStream(_),!1;if(te.isPhxSticky(_))return[Jr,ps,go].map(F=>[F,_.getAttribute(F),A.getAttribute(F)]).forEach(([F,U,ie])=>{ie&&U!==ie&&_.setAttribute(F,ie)}),!1;if(te.isIgnored(_,c)||_.form&&_.form.isSameNode(S))return this.trackBefore("updated",_,A),te.mergeAttrs(_,A,{isIgnored:te.isIgnored(_,c)}),g.push(_),te.applyStickyOperations(_),!1;if(_.type==="number"&&_.validity&&_.validity.badInput)return!1;let q=s&&_.isSameNode(s)&&te.isFormInput(_),le=q&&this.isChangedSelect(_,A);if(_.hasAttribute(Ti)){te.isUploadInput(_)&&(te.mergeAttrs(_,A,{isIgnored:!0}),this.trackBefore("updated",_,A),g.push(_)),te.applyStickyOperations(_);let F=te.private(_,Ti)||_.cloneNode(!0);te.putPrivate(_,Ti,F),q||(_=F)}if(te.isPhxChild(A)){let F=_.getAttribute(Jr);return te.mergeAttrs(_,A,{exclude:[ps]}),F!==""&&_.setAttribute(Jr,F),_.setAttribute(go,this.rootID),te.applyStickyOperations(_),!1}return te.copyPrivates(A,_),q&&_.type!=="hidden"&&!le?(this.trackBefore("updated",_,A),te.mergeFocusedInput(_,A),te.syncAttrsToProps(_),g.push(_),te.applyStickyOperations(_),!1):(le&&_.blur(),te.isPhxUpdate(A,c,["append","prepend"])&&x.push(new L7(_,A,A.getAttribute(c))),te.syncAttrsToProps(A),te.applyStickyOperations(A),this.trackBefore("updated",_,A),_)}})}return this.trackBefore("added",n),this.trackBefore("updated",n,n),i.time("morphdom",()=>{this.streams.forEach(([T,$,I,_])=>{$.forEach(([A,q,le])=>{this.streamInserts[A]={ref:T,streamAt:q,limit:le,reset:_}}),_!==void 0&&te.all(n,`[${bg}="${T}"]`,A=>{this.removeStreamChildElement(A)}),I.forEach(A=>{let q=n.querySelector(`[id="${A}"]`);q&&this.removeStreamChildElement(q)})}),t&&te.all(this.container,`[${c}=${gg}]`,T=>{this.liveSocket.owner(T,$=>{$===this.view&&Array.from(T.children).forEach(I=>{this.removeStreamChildElement(I)})})}),w.call(this,o,r)}),i.isDebugEnabled()&&(T7(),Array.from(document.querySelectorAll("input[name=id]")).forEach(T=>{T.form&&console.error(`Detected an input with name="id" inside a form! This will cause problems when patching the DOM. -`,T)})),x.length>0&&i.time("post-morph append/prepend restoration",()=>{x.forEach(T=>T.perform())}),i.silenceEvents(()=>te.restoreFocus(s,a,l)),te.dispatchEvent(document,"phx:update"),p.forEach(T=>this.trackAfter("added",T)),g.forEach(T=>this.trackAfter("updated",T)),this.transitionPendingRemoves(),S&&(i.unload(),Object.getPrototypeOf(S).submit.call(S)),!0}onNodeDiscarded(t){(te.isPhxChild(t)||te.isPhxSticky(t))&&this.liveSocket.destroyViewByEl(t),this.trackAfter("discarded",t)}maybePendingRemove(t){return t.getAttribute&&t.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(t),!0):!1}removeStreamChildElement(t){this.streamInserts[t.id]?(this.streamComponentRestore[t.id]=t,t.remove()):this.maybePendingRemove(t)||(t.remove(),this.onNodeDiscarded(t))}getStreamInsert(t){return(t.id?this.streamInserts[t.id]:{})||{}}setStreamRef(t,e){te.putSticky(t,bg,i=>i.setAttribute(bg,e))}maybeReOrderStream(t,e){let{ref:i,streamAt:r,reset:n}=this.getStreamInsert(t);if(r!==void 0&&(this.setStreamRef(t,i),!(!n&&!e)&&t.parentElement)){if(r===0)t.parentElement.insertBefore(t,t.parentElement.firstElementChild);else if(r>0){let o=Array.from(t.parentElement.children),s=o.indexOf(t);if(r>=o.length-1)t.parentElement.appendChild(t);else{let a=o[r];s>r?t.parentElement.insertBefore(t,a):t.parentElement.insertBefore(t,a.nextElementSibling)}}this.maybeLimitStream(t)}}maybeLimitStream(t){let{limit:e}=this.getStreamInsert(t),i=e!==null&&Array.from(t.parentElement.children);e&&e<0&&i.length>e*-1?i.slice(0,i.length+e).forEach(r=>this.removeStreamChildElement(r)):e&&e>=0&&i.length>e&&i.slice(e).forEach(r=>this.removeStreamChildElement(r))}transitionPendingRemoves(){let{pendingRemoves:t,liveSocket:e}=this;t.length>0&&(e.transitionRemoves(t),e.requestDOMUpdate(()=>{t.forEach(i=>{let r=te.firstPhxChild(i);r&&e.destroyViewByEl(r),i.remove()}),this.trackAfter("transitionsDiscarded",t)}))}isChangedSelect(t,e){if(!(t instanceof HTMLSelectElement)||t.multiple)return!1;if(t.options.length!==e.options.length)return!0;let i=t.selectedOptions[0],r=e.selectedOptions[0];return i&&i.hasAttribute("selected")&&r.setAttribute("selected",i.getAttribute("selected")),!t.isEqualNode(e)}isCIDPatch(){return this.cidPatch}skipCIDSibling(t){return t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute(fS)}targetCIDContainer(t){if(!this.isCIDPatch())return;let[e,...i]=te.findComponentNodeList(this.container,this.targetCID);return i.length===0&&te.childNodeLength(t)===1?e:e&&e.parentNode}indexOf(t,e){return Array.from(t.children).indexOf(e)}},F7=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),H7=new Set(["'",'"']),aS=(t,e,i)=>{let r=0,n=!1,o,s,a,l,c,u,f=t.match(/^(\s*(?:\s*)*)<([^\s\/>]+)/);if(f===null)throw new Error(`malformed html ${t}`);for(r=f[0].length,o=f[1],a=f[2],l=r,r;r";r++)if(t.charAt(r)==="="){let g=t.slice(r-3,r)===" id";r++;let x=t.charAt(r);if(H7.has(x)){let S=r;for(r++,r;r=o.length+a.length;){let g=t.charAt(d);if(n)g==="-"&&t.slice(d-3,d)===""&&t.slice(d-2,d)==="--")n=!0,d-=3;else{if(g===">")break;d-=1}}s=t.slice(d+1,t.length);let p=Object.keys(e).map(g=>e[g]===!0?g:`${g}="${e[g]}"`).join(" ");if(i){let g=c?` id="${c}"`:"";F7.has(a)?u=`<${a}${g}${p===""?"":" "}${p}/>`:u=`<${a}${g}${p===""?"":" "}${p}>`}else{let g=t.slice(l,d+1);u=`<${a}${p===""?"":" "}${p}${g}`}return[u,o,s]},lS=class{static extract(t){let{[Vk]:e,[Zk]:i,[Yk]:r}=t;return delete t[Vk],delete t[Zk],delete t[Yk],{diff:t,title:r,reply:e||null,events:i||[]}}constructor(t,e){this.viewId=t,this.rendered={},this.magicId=0,this.mergeDiff(e)}parentViewId(){return this.viewId}toString(t){let[e,i]=this.recursiveToString(this.rendered,this.rendered[Si],t,!0,{});return[e,i]}recursiveToString(t,e=t[Si],i,r,n){i=i?new Set(i):null;let o={buffer:"",components:e,onlyCids:i,streams:new Set};return this.toOutputBuffer(t,null,o,r,n),[o.buffer,o.streams]}componentCIDs(t){return Object.keys(t[Si]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(t){return t[Si]?Object.keys(t).length===1:!1}getComponent(t,e){return t[Si][e]}resetRender(t){this.rendered[Si][t]&&(this.rendered[Si][t].reset=!0)}mergeDiff(t){let e=t[Si],i={};if(delete t[Si],this.rendered=this.mutableMerge(this.rendered,t),this.rendered[Si]=this.rendered[Si]||{},e){let r=this.rendered[Si];for(let n in e)e[n]=this.cachedFindComponent(n,e[n],r,e,i);for(let n in e)r[n]=e[n];t[Si]=e}}cachedFindComponent(t,e,i,r,n){if(n[t])return n[t];{let o,s,a=e[Gr];if(Tn(a)){let l;a>0?l=this.cachedFindComponent(a,r[a],i,r,n):l=i[-a],s=l[Gr],o=this.cloneMerge(l,e,!0),o[Gr]=s}else o=e[Gr]!==void 0||i[t]===void 0?e:this.cloneMerge(i[t],e,!1);return n[t]=o,o}}mutableMerge(t,e){return e[Gr]!==void 0?e:(this.doMutableMerge(t,e),t)}doMutableMerge(t,e){for(let i in e){let r=e[i],n=t[i];Ta(r)&&r[Gr]===void 0&&Ta(n)?this.doMutableMerge(n,r):t[i]=r}t[vg]&&(t.newRender=!0)}cloneMerge(t,e,i){let r=H(H({},t),e);for(let n in r){let o=e[n],s=t[n];Ta(o)&&o[Gr]===void 0&&Ta(s)?r[n]=this.cloneMerge(s,o,i):o===void 0&&Ta(s)&&(r[n]=this.cloneMerge(s,{},i))}return i?(delete r.magicId,delete r.newRender):t[vg]&&(r.newRender=!0),r}componentToString(t){let[e,i]=this.recursiveCIDToString(this.rendered[Si],t,null),[r,n,o]=aS(e,{});return[r,i]}pruneCIDs(t){t.forEach(e=>delete this.rendered[Si][e])}get(){return this.rendered}isNewFingerprint(t={}){return!!t[Gr]}templateStatic(t,e){return typeof t=="number"?e[t]:t}nextMagicID(){return this.magicId++,`m${this.magicId}-${this.parentViewId()}`}toOutputBuffer(t,e,i,r,n={}){if(t[yh])return this.comprehensionToBuffer(t,e,i);let{[Gr]:o}=t;o=this.templateStatic(o,e);let s=t[vg],a=i.buffer;s&&(i.buffer=""),r&&s&&!t.magicId&&(t.newRender=!0,t.magicId=this.nextMagicID()),i.buffer+=o[0];for(let l=1;l0||l.length>0||c)&&(delete t[Fk],t[yh]=[],i.streams.add(o))}dynamicToBuffer(t,e,i,r){if(typeof t=="number"){let[n,o]=this.recursiveCIDToString(i.components,t,i.onlyCids);i.buffer+=n,i.streams=new Set([...i.streams,...o])}else Ta(t)?this.toOutputBuffer(t,e,i,r,{}):i.buffer+=t}recursiveCIDToString(t,e,i){let r=t[e]||Fi(`no component for CID ${e}`,t),n={[En]:e},o=i&&!i.has(e);r.newRender=!o,r.magicId=`c${e}-${this.parentViewId()}`;let s=!r.reset,[a,l]=this.recursiveToString(r,t,i,s,n);return delete r.reset,[a,l]}},G7=1,uc=class{static makeID(){return G7++}static elementID(t){return t.phxHookId}constructor(t,e,i){this.__view=t,this.liveSocket=t.liveSocket,this.__callbacks=i,this.__listeners=new Set,this.__isDisconnected=!1,this.el=e,this.el.phxHookId=this.constructor.makeID();for(let r in this.__callbacks)this[r]=this.__callbacks[r]}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed()}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}pushEvent(t,e={},i=function(){}){return this.__view.pushHookEvent(this.el,null,t,e,i)}pushEventTo(t,e,i={},r=function(){}){return this.__view.withinTargets(t,(n,o)=>n.pushHookEvent(this.el,o,e,i,r))}handleEvent(t,e){let i=(r,n)=>n?t:e(r.detail);return window.addEventListener(`phx:${t}`,i),this.__listeners.add(i),i}removeHandleEvent(t){let e=t(null,!0);window.removeEventListener(`phx:${e}`,t),this.__listeners.delete(t)}upload(t,e){return this.__view.dispatchUploads(null,t,e)}uploadTo(t,e,i){return this.__view.withinTargets(t,(r,n)=>{r.dispatchUploads(n,e,i)})}__cleanup__(){this.__listeners.forEach(t=>this.removeHandleEvent(t))}},K7=(t,e)=>{let i=t.endsWith("[]"),r=i?t.slice(0,-2):t;return r=r.replace(/([^\[\]]+)(\]?$)/,`${e}$1$2`),i&&(r+="[]"),r},kh=(t,e,i=[])=>{let u=e,{submitter:r}=u,n=pi(u,["submitter"]),o;if(r&&r.name){let f=document.createElement("input");f.type="hidden";let d=r.getAttribute("form");d&&f.setAttribute("form",d),f.name=r.name,f.value=r.value,r.parentElement.insertBefore(f,r),o=f}let s=new FormData(t),a=[];s.forEach((f,d,p)=>{f instanceof File&&a.push(d)}),a.forEach(f=>s.delete(f));let l=new URLSearchParams,c=Array.from(t.elements);for(let[f,d]of s.entries())if(i.length===0||i.indexOf(f)>=0){let p=c.filter(S=>S.name===f),g=!p.some(S=>te.private(S,Eh)||te.private(S,dc)),x=p.every(S=>S.type==="hidden");g&&!(r&&r.name==f)&&!x&&l.append(K7(f,"_unused_"),""),l.append(f,d)}r&&o&&r.parentElement.removeChild(o);for(let f in n)l.append(f,n[f]);return l.toString()},gS=class{constructor(t,e,i,r,n){this.isDead=!1,this.liveSocket=e,this.flash=r,this.parent=i,this.root=i?i.root:this,this.el=t,this.id=this.el.id,this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pendingForms=new Set,this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(o){o&&o()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.formsForRecovery={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>{let o=this.href&&this.expandURL(this.href);return{redirect:this.redirect?o:void 0,url:this.redirect?void 0:o||void 0,params:this.connectParams(n),session:this.getSession(),static:this.getStatic(),flash:this.flash}})}setHref(t){this.href=t}setRedirect(t){this.redirect=!0,this.href=t}isMain(){return this.el.hasAttribute(Cg)}connectParams(t){let e=this.liveSocket.params(this.el),i=te.all(document,`[${this.binding(c7)}]`).map(r=>r.src||r.href).filter(r=>typeof r=="string");return i.length>0&&(e._track_static=i),e._mounts=this.joinCount,e._live_referer=t,e}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(Jr)}getStatic(){let t=this.el.getAttribute(ps);return t===""?null:t}destroy(t=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let e=()=>{t();for(let i in this.viewHooks)this.destroyHook(this.viewHooks[i])};te.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",e).receive("error",e).receive("timeout",e)}setContainerClasses(...t){this.el.classList.remove(Nk,rc,mh,Uk,Og),this.el.classList.add(...t)}showLoader(t){if(clearTimeout(this.loaderTimer),t)this.loaderTimer=setTimeout(()=>this.showLoader(),t);else{for(let e in this.viewHooks)this.viewHooks[e].__disconnected();this.setContainerClasses(rc)}}execAll(t){te.all(this.el,`[${t}]`,e=>this.liveSocket.execJS(e,e.getAttribute(t)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(Nk),this.execAll(this.binding("connected"))}triggerReconnected(){for(let t in this.viewHooks)this.viewHooks[t].__reconnected()}log(t,e){this.liveSocket.log(this,t,e)}transition(t,e,i=function(){}){this.liveSocket.transition(t,e,i)}withinTargets(t,e,i=document,r){if(t instanceof HTMLElement||t instanceof SVGElement)return this.liveSocket.owner(t,n=>e(n,t));if(Tn(t))te.findComponentNodeList(r||this.el,t).length===0?Fi(`no component found matching phx-target of ${t}`):e(this,parseInt(t));else{let n=Array.from(i.querySelectorAll(t));n.length===0&&Fi(`nothing found matching the phx-target selector "${t}"`),n.forEach(o=>this.liveSocket.owner(o,s=>e(s,o)))}}applyDiff(t,e,i){this.log(t,()=>["",Th(e)]);let{diff:r,reply:n,events:o,title:s}=lS.extract(e);i({diff:r,reply:n,events:o}),typeof s=="string"&&window.requestAnimationFrame(()=>te.putTitle(s))}onJoin(t){let{rendered:e,container:i,liveview_version:r}=t;if(i){let[n,o]=i;this.el=te.replaceRootContainer(this.el,n,o)}this.childJoins=0,this.joinPending=!0,this.flash=null,this.root===this&&(this.formsForRecovery=this.getFormsForRecovery()),r!==this.liveSocket.version()&&console.error(`LiveView asset version mismatch. JavaScript version ${this.liveSocket.version()} vs. server ${r}. To avoid issues, please ensure that your assets use the same version as the server.`),Kr.dropLocal(this.liveSocket.localStorage,window.location.pathname,cS),this.applyDiff("mount",e,({diff:n,events:o})=>{this.rendered=new lS(this.id,n);let[s,a]=this.renderContainer(null,"join");this.dropPendingRefs(),this.joinCount++,this.maybeRecoverForms(s,()=>{this.onJoinComplete(t,s,a,o)})})}dropPendingRefs(){te.all(document,`[${hs}="${this.id}"][${Ti}]`,t=>{t.removeAttribute(Ti),t.removeAttribute(hs)})}onJoinComplete({live_patch:t},e,i,r){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(t,e,i,r);te.findPhxChildrenInFragment(e,this.id).filter(o=>{let s=o.id&&this.el.querySelector(`[id="${o.id}"]`),a=s&&s.getAttribute(ps);return a&&o.setAttribute(ps,a),s&&s.setAttribute(go,this.root.id),this.joinChild(o)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(t,e,i,r)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(t,e,i,r)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(t,e,i,r)])}attachTrueDocEl(){this.el=te.byId(this.id),this.el.setAttribute(go,this.root.id)}execNewMounted(t=this.el){let e=this.binding(Sg),i=this.binding(Tg);te.all(t,`[${e}], [${i}]`,r=>{this.ownsElement(r)&&(te.maybeAddPrivateHooks(r,e,i),this.maybeAddNewHook(r))}),te.all(t,`[${this.binding(nc)}], [data-phx-${nc}]`,r=>{this.ownsElement(r)&&this.maybeAddNewHook(r)}),te.all(t,`[${this.binding(Wk)}]`,r=>{this.ownsElement(r)&&this.maybeMounted(r)})}applyJoinPatch(t,e,i,r){this.attachTrueDocEl();let n=new wh(this,this.el,this.id,e,i,null);if(n.markPrunableContentForRemoval(),this.performPatch(n,!1,!0),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(r),this.applyPendingUpdates(),t){let{kind:o,to:s}=t;this.liveSocket.historyPatch(s,o)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(t,e){this.liveSocket.triggerDOM("onBeforeElUpdated",[t,e]);let i=this.getHook(t),r=i&&te.isIgnored(t,this.binding(fc));if(i&&!t.isEqualNode(e)&&!(r&&C7(t.dataset,e.dataset)))return i.__beforeUpdate(),i}maybeMounted(t){let e=t.getAttribute(this.binding(Wk)),i=e&&te.private(t,"mounted");e&&!i&&(this.liveSocket.execJS(t,e),te.putPrivate(t,"mounted",!0))}maybeAddNewHook(t,e){let i=this.addHook(t);i&&i.__mounted()}performPatch(t,e,i=!1){let r=[],n=!1,o=new Set;return this.liveSocket.triggerDOM("onPatchStart",[t.targetContainer]),t.after("added",s=>{this.liveSocket.triggerDOM("onNodeAdded",[s]);let a=this.binding(Sg),l=this.binding(Tg);te.maybeAddPrivateHooks(s,a,l),this.maybeAddNewHook(s),s.getAttribute&&this.maybeMounted(s)}),t.after("phxChildAdded",s=>{te.isPhxSticky(s)?this.liveSocket.joinRootViews():n=!0}),t.before("updated",(s,a)=>{this.triggerBeforeUpdateHook(s,a)&&o.add(s.id)}),t.after("updated",s=>{o.has(s.id)&&this.getHook(s).__updated()}),t.after("discarded",s=>{s.nodeType===Node.ELEMENT_NODE&&r.push(s)}),t.after("transitionsDiscarded",s=>this.afterElementsRemoved(s,e)),t.perform(i),this.afterElementsRemoved(r,e),this.liveSocket.triggerDOM("onPatchEnd",[t.targetContainer]),n}afterElementsRemoved(t,e){let i=[];t.forEach(r=>{let n=te.all(r,`[${En}]`),o=te.all(r,`[${this.binding(nc)}]`);n.concat(r).forEach(s=>{let a=this.componentID(s);Tn(a)&&i.indexOf(a)===-1&&i.push(a)}),o.concat(r).forEach(s=>{let a=this.getHook(s);a&&this.destroyHook(a)})}),e&&this.maybePushComponentsDestroyed(i)}joinNewChildren(){te.findPhxChildren(this.el,this.id).forEach(t=>this.joinChild(t))}maybeRecoverForms(t,e){let i=this.binding("change"),r=this.root.formsForRecovery,n=document.createElement("template");n.innerHTML=t;let o=n.content.firstElementChild;o.id=this.id,o.setAttribute(go,this.root.id),o.setAttribute(Jr,this.getSession()),o.setAttribute(ps,this.getStatic()),o.setAttribute(Os,this.parent?this.parent.id:null);let s=te.all(n.content,"form").filter(a=>a.id&&r[a.id]).filter(a=>!this.pendingForms.has(a.id)).filter(a=>r[a.id].getAttribute(i)===a.getAttribute(i)).map(a=>[r[a.id],a]);if(s.length===0)return e();s.forEach(([a,l],c)=>{this.pendingForms.add(l.id),this.pushFormRecovery(a,l,n.content.firstElementChild,()=>{this.pendingForms.delete(l.id),c===s.length-1&&e()})})}getChildById(t){return this.root.children[this.id][t]}getDescendentByEl(t){return t.id===this.id?this:this.children[t.getAttribute(Os)][t.id]}destroyDescendent(t){for(let e in this.root.children)for(let i in this.root.children[e])if(i===t)return this.root.children[e][i].destroy()}joinChild(t){if(!this.getChildById(t.id)){let i=new gS(t,this.liveSocket,this);return this.root.children[this.id][i.id]=i,i.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(t){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.pendingForms.clear(),this.formsForRecovery={},this.joinCallback(()=>{this.pendingJoinOps.forEach(([t,e])=>{t.isDestroyed()||e()}),this.pendingJoinOps=[]})}update(t,e){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:t,events:e});this.rendered.mergeDiff(t);let i=!1;this.rendered.isComponentOnlyDiff(t)?this.liveSocket.time("component patch complete",()=>{te.findExistingParentCIDs(this.el,this.rendered.componentCIDs(t)).forEach(n=>{this.componentPatch(this.rendered.getComponent(t,n),n)&&(i=!0)})}):Hk(t)||this.liveSocket.time("full patch complete",()=>{let[r,n]=this.renderContainer(t,"update"),o=new wh(this,this.el,this.id,r,n,null);i=this.performPatch(o,!0)}),this.liveSocket.dispatchEvents(e),i&&this.joinNewChildren()}renderContainer(t,e){return this.liveSocket.time(`toString diff (${e})`,()=>{let i=this.el.tagName,r=t?this.rendered.componentCIDs(t):null,[n,o]=this.rendered.toString(r);return[`<${i}>${n}`,o]})}componentPatch(t,e){if(Hk(t))return!1;let[i,r]=this.rendered.componentToString(e),n=new wh(this,this.el,this.id,i,r,e);return this.performPatch(n,!0)}getHook(t){return this.viewHooks[uc.elementID(t)]}addHook(t){if(uc.elementID(t)||!t.getAttribute)return;let e=t.getAttribute(`data-phx-${nc}`)||t.getAttribute(this.binding(nc));if(e&&!this.ownsElement(t))return;let i=this.liveSocket.getHookCallbacks(e);if(i){t.id||Fi(`no DOM ID for hook "${e}". Hooks require a unique ID on each element.`,t);let r=new uc(this,t,i);return this.viewHooks[uc.elementID(r.el)]=r,r}else e!==null&&Fi(`unknown hook found for "${e}"`,t)}destroyHook(t){t.__destroyed(),t.__cleanup__(),delete this.viewHooks[uc.elementID(t.el)]}applyPendingUpdates(){this.pendingDiffs.forEach(({diff:t,events:e})=>this.update(t,e)),this.pendingDiffs=[],this.eachChild(t=>t.applyPendingUpdates())}eachChild(t){let e=this.root.children[this.id]||{};for(let i in e)t(this.getChildById(i))}onChannel(t,e){this.liveSocket.onChannel(this.channel,t,i=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>e(i)]):this.liveSocket.requestDOMUpdate(()=>e(i))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",t=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",t,({diff:e,events:i})=>this.update(e,i))})}),this.onChannel("redirect",({to:t,flash:e})=>this.onRedirect({to:t,flash:e})),this.onChannel("live_patch",t=>this.onLivePatch(t)),this.onChannel("live_redirect",t=>this.onLiveRedirect(t)),this.channel.onError(t=>this.onError(t)),this.channel.onClose(t=>this.onClose(t))}destroyAllChildren(){this.eachChild(t=>t.destroy())}onLiveRedirect(t){let{to:e,kind:i,flash:r}=t,n=this.expandURL(e);this.liveSocket.historyRedirect(n,i,r)}onLivePatch(t){let{to:e,kind:i}=t;this.href=this.expandURL(e),this.liveSocket.historyPatch(e,i)}expandURL(t){return t.startsWith("/")?`${window.location.protocol}//${window.location.host}${t}`:t}onRedirect({to:t,flash:e}){this.liveSocket.redirect(t,e)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}join(t){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=e=>{e=e||function(){},t?t(this.joinCount,e):e()},this.liveSocket.wrapPush(this,{timeout:!1},()=>this.channel.join().receive("ok",e=>{this.isDestroyed()||this.liveSocket.requestDOMUpdate(()=>this.onJoin(e))}).receive("error",e=>!this.isDestroyed()&&this.onJoinError(e)).receive("timeout",()=>!this.isDestroyed()&&this.onJoinError({reason:"timeout"})))}onJoinError(t){if(t.reason==="reload"){this.log("error",()=>[`failed mount with ${t.status}. Falling back to page request`,t]),this.isMain()&&this.onRedirect({to:this.href});return}else if(t.reason==="unauthorized"||t.reason==="stale"){this.log("error",()=>["unauthorized live_redirect. Falling back to page request",t]),this.isMain()&&this.onRedirect({to:this.href});return}if((t.redirect||t.live_redirect)&&(this.joinPending=!1,this.channel.leave()),t.redirect)return this.onRedirect(t.redirect);if(t.live_redirect)return this.onLiveRedirect(t.live_redirect);this.displayError([rc,mh,Og]),this.log("error",()=>["unable to join",t]),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this)}onClose(t){if(!this.isDestroyed()){if(this.liveSocket.hasPendingLink()&&t!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(y7)}}onError(t){this.onClose(t),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",t]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([rc,mh,Og]):this.displayError([rc,mh,Uk]))}displayError(t){this.isMain()&&te.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(...t),this.execAll(this.binding("disconnected"))}pushWithReply(t,e,i,r=function(){}){if(!this.isConnected())return;let[n,[o],s]=t?t():[null,[],{}],a=function(){};return(s.page_loading||o&&o.getAttribute(this.binding(Mk))!==null)&&(a=this.liveSocket.withPageLoading({kind:"element",target:o})),typeof i.cid!="number"&&delete i.cid,this.liveSocket.wrapPush(this,{timeout:!0},()=>this.channel.push(e,i,v7).receive("ok",l=>{let c=u=>{l.redirect&&this.onRedirect(l.redirect),l.live_patch&&this.onLivePatch(l.live_patch),l.live_redirect&&this.onLiveRedirect(l.live_redirect),a(),r(l,u)};l.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",l.diff,({diff:u,reply:f,events:d})=>{n!==null&&this.undoRefs(n),this.update(u,d),c(f)})}):(n!==null&&this.undoRefs(n),c(null))}))}undoRefs(t,e){e=e?new Set(e):null,this.isConnected()&&te.all(document,`[${hs}="${this.id}"][${Ti}="${t}"]`,i=>{e&&!e.has(i)||this.undoElRef(i,t)})}undoElRef(t,e){if(!(parseInt(t.getAttribute(Ti),10)<=e))return;t.dispatchEvent(new CustomEvent("phx:unlock",{bubbles:!0,cancelable:!1}));let i=t.getAttribute(Sa),r=t.getAttribute(mg);t.removeAttribute(Ti),t.removeAttribute(hs),r!==null&&(t.readOnly=r==="true",t.removeAttribute(mg)),i!==null&&(t.disabled=i==="true",t.removeAttribute(Sa)),l7.forEach(s=>te.removeClass(t,s));let n=t.getAttribute(gh);n!==null&&(t.innerText=n,t.removeAttribute(gh));let o=te.private(t,Ti);if(o){let s=this.triggerBeforeUpdateHook(t,o);wh.patchWithClonedTree(t,o,this.liveSocket),te.all(t,`[${hs}="${this.id}"][${Ti}]`,a=>this.undoElRef(a,e)),this.execNewMounted(t),s&&s.__updated(),te.deletePrivate(t,Ti)}}putRef(t,e,i={}){let r=this.ref++,n=this.binding(jk);i.loading&&(t=t.concat(te.all(document,i.loading)));for(let o of t){if(o.setAttribute(Ti,r),o.setAttribute(hs,this.el.id),i.submitter&&!(o===i.submitter||o===i.form))continue;o.classList.add(`phx-${e}-loading`),o.dispatchEvent(new CustomEvent(`phx:${e}-loading`,{bubbles:!0,cancelable:!1}));let s=o.getAttribute(n);s!==null&&(o.getAttribute(gh)||o.setAttribute(gh,o.innerText),s!==""&&(o.innerText=s),o.setAttribute(Sa,o.getAttribute(Sa)||o.disabled),o.setAttribute("disabled",""))}return[r,t,i]}componentID(t){let e=t.getAttribute&&t.getAttribute(En);return e?parseInt(e):null}targetComponentID(t,e,i={}){if(Tn(e))return e;let r=i.target||t.getAttribute(this.binding("target"));return Tn(r)?parseInt(r):e&&(r!==null||i.target)?this.closestComponentID(e):null}closestComponentID(t){return Tn(t)?t:t?mo(t.closest(`[${En}]`),e=>this.ownsElement(e)&&this.componentID(e)):null}pushHookEvent(t,e,i,r,n){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",i,r]),!1;let[o,s,a]=this.putRef([t],"hook");return this.pushWithReply(()=>[o,s,a],"event",{type:"hook",event:i,value:r,cid:this.closestComponentID(e)},(l,c)=>n(c,o)),o}extractMeta(t,e,i){let r=this.binding("value-");for(let n=0;n=0&&!t.checked&&delete e.value),i){e||(e={});for(let n in i)e[n]=i[n]}return e}pushEvent(t,e,i,r,n,o={},s){this.pushWithReply(()=>this.putRef([e],t,o),"event",{type:t,event:r,value:this.extractMeta(e,n,o.value),cid:this.targetComponentID(e,i,o)},(a,l)=>s&&s(l))}pushFileProgress(t,e,i,r=function(){}){this.liveSocket.withinOwners(t.form,(n,o)=>{n.pushWithReply(null,"progress",{event:t.getAttribute(n.binding(g7)),ref:t.getAttribute(Cn),entry_ref:e,progress:i,cid:n.targetComponentID(t.form,o)},r)})}pushInput(t,e,i,r,n,o){let s,a=Tn(i)?i:this.targetComponentID(t.form,e,n),l=()=>this.putRef([t,t.form],"change",n),c,u=this.extractMeta(t.form);t instanceof HTMLButtonElement&&(u.submitter=t),t.getAttribute(this.binding("change"))?c=kh(t.form,H({_target:n._target},u),[t.name]):c=kh(t.form,H({_target:n._target},u)),te.isUploadInput(t)&&t.files&&t.files.length>0&&Nt.trackFiles(t,Array.from(t.files)),s=Nt.serializeUploads(t);let f={type:"form",event:r,value:c,uploads:s,cid:a};this.pushWithReply(l,"event",f,d=>{if(te.isUploadInput(t)&&te.isAutoUpload(t)){if(Nt.filesAwaitingPreflight(t).length>0){let[p,g]=l();this.undoRefs(p,[t.form]),this.uploadFiles(t.form,e,p,a,x=>{o&&o(d),this.triggerAwaitingSubmit(t.form),this.undoRefs(p)})}}else o&&o(d)})}triggerAwaitingSubmit(t){let e=this.getScheduledSubmit(t);if(e){let[i,r,n,o]=e;this.cancelSubmit(t),o()}}getScheduledSubmit(t){return this.formSubmits.find(([e,i,r,n])=>e.isSameNode(t))}scheduleSubmit(t,e,i,r){if(this.getScheduledSubmit(t))return!0;this.formSubmits.push([t,e,i,r])}cancelSubmit(t){this.formSubmits=this.formSubmits.filter(([e,i,r])=>e.isSameNode(t)?(this.undoRefs(i),!1):!0)}disableForm(t,e={}){let i=u=>!(hc(u,`${this.binding(fc)}=ignore`,u.form)||hc(u,"data-phx-update=ignore",u.form)),r=u=>u.hasAttribute(this.binding(jk)),n=u=>u.tagName=="BUTTON",o=u=>["INPUT","TEXTAREA","SELECT"].includes(u.tagName),s=Array.from(t.elements),a=s.filter(r),l=s.filter(n).filter(i),c=s.filter(o).filter(i);return l.forEach(u=>{u.setAttribute(Sa,u.disabled),u.disabled=!0}),c.forEach(u=>{u.setAttribute(mg,u.readOnly),u.readOnly=!0,u.files&&(u.setAttribute(Sa,u.disabled),u.disabled=!0)}),t.setAttribute(this.binding(Mk),""),this.putRef([t].concat(a).concat(l).concat(c),"submit",e)}pushFormSubmit(t,e,i,r,n,o){let s=()=>this.disableForm(t,Ce(H({},n),{form:t,submitter:r})),a=this.targetComponentID(t,e);if(Nt.hasUploadsInProgress(t)){let[l,c]=s(),u=()=>this.pushFormSubmit(t,e,i,r,n,o);return this.scheduleSubmit(t,l,n,u)}else if(Nt.inputsAwaitingPreflight(t).length>0){let[l,c]=s(),u=()=>[l,c,n];this.uploadFiles(t,e,l,a,f=>{if(Nt.inputsAwaitingPreflight(t).length>0)return this.undoRefs(l);let d=this.extractMeta(t),p=kh(t,H({submitter:r},d));this.pushWithReply(u,"event",{type:"form",event:i,value:p,cid:a},o)})}else if(!(t.hasAttribute(Ti)&&t.classList.contains("phx-submit-loading"))){let l=this.extractMeta(t),c=kh(t,H({submitter:r},l));this.pushWithReply(s,"event",{type:"form",event:i,value:c,cid:a},o)}}uploadFiles(t,e,i,r,n){let o=this.joinCount,s=Nt.activeFileInputs(t),a=s.length;s.forEach(l=>{let c=new Nt(l,this,()=>{a--,a===0&&n()}),u=c.entries().map(d=>d.toPreflightPayload());if(u.length===0){a--;return}let f={ref:l.getAttribute(Cn),entries:u,cid:this.targetComponentID(l.form,e)};this.log("upload",()=>["sending preflight request",f]),this.pushWithReply(null,"allow_upload",f,d=>{if(this.log("upload",()=>["got preflight response",d]),c.entries().forEach(p=>{d.entries&&!d.entries[p.ref]&&this.handleFailedEntryPreflight(p.ref,"failed preflight",c)}),d.error||Object.keys(d.entries).length===0)this.undoRefs(i),(d.error||[]).map(([g,x])=>{this.handleFailedEntryPreflight(g,x,c)});else{let p=g=>{this.channel.onError(()=>{this.joinCount===o&&g()})};c.initAdapterUpload(d,p,this.liveSocket)}})})}handleFailedEntryPreflight(t,e,i){if(i.isAutoUpload()){let r=i.entries().find(n=>n.ref===t.toString());r&&r.cancel()}else i.entries().map(r=>r.cancel());this.log("upload",()=>[`error for entry ${t}`,e])}dispatchUploads(t,e,i){let r=this.targetCtxElement(t)||this.el,n=te.findUploadInputs(r).filter(o=>o.name===e);n.length===0?Fi(`no live file inputs found matching the name "${e}"`):n.length>1?Fi(`duplicate live file inputs found matching the name "${e}"`):te.dispatchEvent(n[0],uS,{detail:{files:i}})}targetCtxElement(t){if(Tn(t)){let[e]=te.findComponentNodeList(this.el,t);return e}else return t||null}pushFormRecovery(t,e,i,r){let n=this.binding("change"),o=e.getAttribute(this.binding("target"))||e,s=e.getAttribute(this.binding(qk))||e.getAttribute(this.binding("change")),a=Array.from(t.elements).filter(u=>te.isFormInput(u)&&u.name&&!u.hasAttribute(n));if(a.length===0)return;a.forEach(u=>u.hasAttribute(Cn)&&Nt.clearFiles(u));let l=a.find(u=>u.type!=="hidden")||a[0],c=0;this.withinTargets(o,(u,f)=>{let d=this.targetComponentID(e,f);c++,u.pushInput(l,f,d,s,{_target:l.name},()=>{c--,c===0&&r()})},i,i)}pushLinkPatch(t,e,i){let r=this.liveSocket.setPendingLink(t),n=e?()=>this.putRef([e],"click"):null,o=()=>this.liveSocket.redirect(window.location.href),s=t.startsWith("/")?`${location.protocol}//${location.host}${t}`:t,a=this.pushWithReply(n,"live_patch",{url:s},l=>{this.liveSocket.requestDOMUpdate(()=>{l.link_redirect?this.liveSocket.replaceMain(t,null,i,r):(this.liveSocket.commitPendingLink(r)&&(this.href=t),this.applyPendingUpdates(),i&&i(r))})});a?a.receive("timeout",o):o()}getFormsForRecovery(){if(this.joinCount===0)return{};let t=this.binding("change");return te.all(this.el,`form[${t}]`).filter(e=>e.id).filter(e=>e.elements.length>0).filter(e=>e.getAttribute(this.binding(qk))!=="ignore").map(e=>e.cloneNode(!0)).reduce((e,i)=>(e[i.id]=i,e),{})}maybePushComponentsDestroyed(t){let e=t.filter(i=>te.findComponentNodeList(this.el,i).length===0);e.length>0&&(e.forEach(i=>this.rendered.resetRender(i)),this.pushWithReply(null,"cids_will_destroy",{cids:e},()=>{this.liveSocket.requestDOMUpdate(()=>{let i=e.filter(r=>te.findComponentNodeList(this.el,r).length===0);i.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:i},r=>{this.rendered.pruneCIDs(r.cids)})})}))}ownsElement(t){let e=t.closest(Ca);return t.getAttribute(Os)===this.id||e&&e.id===this.id||!e&&this.isDead}submitForm(t,e,i,r,n={}){te.putPrivate(t,dc,!0),Array.from(t.elements).forEach(s=>te.putPrivate(s,dc,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(t,e,i,r,n,()=>{this.liveSocket.restorePreviouslyActiveFocus()})}binding(t){return this.liveSocket.binding(t)}};var bS=class{constructor(t,e,i={}){if(this.unloaded=!1,!e||e.constructor.name==="Object")throw new Error(` +`),i.push(r))}),i.forEach(r=>r.remove())}},replaceRootContainer(t,e,i){let r=new Set(["id",Jr,ps,Cg,go]);if(t.tagName.toLowerCase()===e.toLowerCase())return Array.from(t.attributes).filter(n=>!r.has(n.name.toLowerCase())).forEach(n=>t.removeAttribute(n.name)),Object.keys(i).filter(n=>!r.has(n.toLowerCase())).forEach(n=>t.setAttribute(n,i[n])),t;{let n=document.createElement(e);return Object.keys(i).forEach(o=>n.setAttribute(o,i[o])),r.forEach(o=>n.setAttribute(o,t.getAttribute(o))),n.innerHTML=t.innerHTML,t.replaceWith(n),n}},getSticky(t,e,i){let r=(ds.private(t,"sticky")||[]).find(([n])=>e===n);if(r){let[n,o,s]=r;return s}else return typeof i=="function"?i():i},deleteSticky(t,e){this.updatePrivate(t,"sticky",[],i=>i.filter(([r,n])=>r!==e))},putSticky(t,e,i){let r=i(t);this.updatePrivate(t,"sticky",[],n=>{let o=n.findIndex(([s])=>e===s);return o>=0?n[o]=[e,i,r]:n.push([e,i,r]),n})},applyStickyOperations(t){let e=ds.private(t,"sticky");e&&e.forEach(([i,r,n])=>this.putSticky(t,i,r))}},te=ds,lc=class{static isActive(t,e){let i=e._phxRef===void 0,n=t.getAttribute(kg).split(",").indexOf(Mt.genFileRef(e))>=0;return e.size>0&&(i||n)}static isPreflighted(t,e){return t.getAttribute(Eg).split(",").indexOf(Mt.genFileRef(e))>=0&&this.isActive(t,e)}static isPreflightInProgress(t){return t._preflightInProgress===!0}static markPreflightInProgress(t){t._preflightInProgress=!0}constructor(t,e,i,r){this.ref=Mt.genFileRef(e),this.fileEl=t,this.file=e,this.view=i,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(Sh,this._onElUpdated),this.autoUpload=r}metadata(){return this.meta}progress(t){this._progress=Math.floor(t),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{Mt.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}isCancelled(){return this._isCancelled}cancel(){this.file._preflightInProgress=!1,this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(t="failed"){this.fileEl.removeEventListener(Sh,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:t}),this.isAutoUpload()||Mt.clearFiles(this.fileEl)}isAutoUpload(){return this.autoUpload}onDone(t){this._onDone=()=>{this.fileEl.removeEventListener(Sh,this._onElUpdated),t()}}onElUpdated(){this.fileEl.getAttribute(kg).split(",").indexOf(this.ref)===-1&&(Mt.untrackFile(this.fileEl,this.file),this.cancel())}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref,meta:typeof this.file.meta=="function"?this.file.meta():void 0}}uploader(t){if(this.meta.uploader){let e=t[this.meta.uploader]||Fi(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:_7}}zipPostFlight(t){this.meta=t.entries[this.ref],this.meta||Fi(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:t})}},$7=0,Mt=class{static genFileRef(t){let e=t._phxRef;return e!==void 0?e:(t._phxRef=($7++).toString(),t._phxRef)}static getEntryDataURL(t,e,i){let r=this.activeFiles(t).find(n=>this.genFileRef(n)===e);i(URL.createObjectURL(r))}static hasUploadsInProgress(t){let e=0;return te.findUploadInputs(t).forEach(i=>{i.getAttribute(Eg)!==i.getAttribute(h7)&&e++}),e>0}static serializeUploads(t){let e=this.activeFiles(t),i={};return e.forEach(r=>{let n={path:t.name},o=t.getAttribute(Cn);i[o]=i[o]||[],n.ref=this.genFileRef(r),n.last_modified=r.lastModified,n.name=r.name||n.ref,n.relative_path=r.webkitRelativePath,n.type=r.type,n.size=r.size,typeof r.meta=="function"&&(n.meta=r.meta()),i[o].push(n)}),i}static clearFiles(t){t.value=null,t.removeAttribute(Cn),te.putPrivate(t,"files",[])}static untrackFile(t,e){te.putPrivate(t,"files",te.private(t,"files").filter(i=>!Object.is(i,e)))}static trackFiles(t,e,i){if(t.getAttribute("multiple")!==null){let r=e.filter(n=>!this.activeFiles(t).find(o=>Object.is(o,n)));te.updatePrivate(t,"files",[],n=>n.concat(r)),t.value=null}else i&&i.files.length>0&&(t.files=i.files),te.putPrivate(t,"files",e)}static activeFileInputs(t){let e=te.findUploadInputs(t);return Array.from(e).filter(i=>i.files&&this.activeFiles(i).length>0)}static activeFiles(t){return(te.private(t,"files")||[]).filter(e=>lc.isActive(t,e))}static inputsAwaitingPreflight(t){let e=te.findUploadInputs(t);return Array.from(e).filter(i=>this.filesAwaitingPreflight(i).length>0)}static filesAwaitingPreflight(t){return this.activeFiles(t).filter(e=>!lc.isPreflighted(t,e)&&!lc.isPreflightInProgress(e))}static markPreflightInProgress(t){t.forEach(e=>lc.markPreflightInProgress(e.file))}constructor(t,e,i){this.autoUpload=te.isAutoUpload(t),this.view=e,this.onComplete=i,this._entries=Array.from(Mt.filesAwaitingPreflight(t)||[]).map(r=>new lc(t,r,e,this.autoUpload)),Mt.markPreflightInProgress(this._entries),this.numEntriesInProgress=this._entries.length}isAutoUpload(){return this.autoUpload}entries(){return this._entries}initAdapterUpload(t,e,i){this._entries=this._entries.map(n=>(n.isCancelled()?(this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()):(n.zipPostFlight(t),n.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()})),n));let r=this._entries.reduce((n,o)=>{if(!o.meta)return n;let{name:s,callback:a}=o.uploader(i.uploaders);return n[s]=n[s]||{callback:a,entries:[]},n[s].entries.push(o),n},{});for(let n in r){let{callback:o,entries:s}=r[n];o(s,e,t,i)}}},OS={LiveFileUpload:{activeRefs(){return this.el.getAttribute(kg)},preflightedRefs(){return this.el.getAttribute(Eg)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let t=this.preflightedRefs();this.preflightedWas!==t&&(this.preflightedWas=t,t===""&&this.__view.cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(Sh))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(Cn)),Mt.getEntryDataURL(this.inputEl,this.ref,t=>{this.url=t,this.el.src=t})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",()=>Ea.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>Ea.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&Ea.focusFirst(this.el)}}},mS=t=>["HTML","BODY"].indexOf(t.nodeName.toUpperCase())>=0?null:["scroll","auto"].indexOf(getComputedStyle(t).overflowY)>=0?t:mS(t.parentElement),Jk=t=>t?t.scrollTop:document.documentElement.scrollTop||document.body.scrollTop,Pg=t=>t?t.getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight,_g=t=>t?t.getBoundingClientRect().top:0,X7=(t,e)=>{let i=t.getBoundingClientRect();return i.top>=_g(e)&&i.left>=0&&i.top<=Pg(e)},R7=(t,e)=>{let i=t.getBoundingClientRect();return i.right>=_g(e)&&i.left>=0&&i.bottom<=Pg(e)},eS=(t,e)=>{let i=t.getBoundingClientRect();return i.top>=_g(e)&&i.left>=0&&i.top<=Pg(e)};OS.InfiniteScroll={mounted(){this.scrollContainer=mS(this.el);let t=Jk(this.scrollContainer),e=!1,i=500,r=null,n=this.throttle(i,(a,l)=>{r=()=>!0,this.liveSocket.execJSHookPush(this.el,a,{id:l.id,_overran:!0},()=>{r=null})}),o=this.throttle(i,(a,l)=>{r=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{r=null,window.requestAnimationFrame(()=>{eS(l,this.scrollContainer)||l.scrollIntoView({block:"start"})})})}),s=this.throttle(i,(a,l)=>{r=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{r=null,window.requestAnimationFrame(()=>{eS(l,this.scrollContainer)||l.scrollIntoView({block:"end"})})})});this.onScroll=a=>{let l=Jk(this.scrollContainer);if(r)return t=l,r();let c=this.el.getBoundingClientRect(),u=this.el.getAttribute(this.liveSocket.binding("viewport-top")),f=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),d=this.el.lastElementChild,p=this.el.firstElementChild,g=lt;g&&u&&!e&&c.top>=0?(e=!0,n(u,p)):x&&e&&c.top<=0&&(e=!1),u&&g&&X7(p,this.scrollContainer)?o(u,p):f&&x&&R7(d,this.scrollContainer)&&s(f,d),t=l},this.scrollContainer?this.scrollContainer.addEventListener("scroll",this.onScroll):window.addEventListener("scroll",this.onScroll)},destroyed(){this.scrollContainer?this.scrollContainer.removeEventListener("scroll",this.onScroll):window.removeEventListener("scroll",this.onScroll)},throttle(t,e){let i=0,r;return(...n)=>{let o=Date.now(),s=t-(o-i);s<=0||s>t?(r&&(clearTimeout(r),r=null),i=o,e(...n)):r||(r=setTimeout(()=>{i=Date.now(),r=null,e(...n)},s))}}};var L7=OS,I7=class{constructor(t,e,i){let r=new Set,n=new Set([...e.children].map(s=>s.id)),o=[];Array.from(t.children).forEach(s=>{if(s.id&&(r.add(s.id),n.has(s.id))){let a=s.previousElementSibling&&s.previousElementSibling.id;o.push({elementId:s.id,previousElementId:a})}}),this.containerId=e.id,this.updateType=i,this.elementsToModify=o,this.elementIdsToAdd=[...n].filter(s=>!r.has(s))}perform(){let t=te.byId(this.containerId);this.elementsToModify.forEach(e=>{e.previousElementId?mo(document.getElementById(e.previousElementId),i=>{mo(document.getElementById(e.elementId),r=>{r.previousElementSibling&&r.previousElementSibling.id==i.id||i.insertAdjacentElement("afterend",r)})}):mo(document.getElementById(e.elementId),i=>{i.previousElementSibling==null||t.insertAdjacentElement("afterbegin",i)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{mo(document.getElementById(e),i=>t.insertAdjacentElement("afterbegin",i))})}},tS=11;function D7(t,e){var i=e.attributes,r,n,o,s,a;if(!(e.nodeType===tS||t.nodeType===tS)){for(var l=i.length-1;l>=0;l--)r=i[l],n=r.name,o=r.namespaceURI,s=r.value,o?(n=r.localName||n,a=t.getAttributeNS(o,n),a!==s&&(r.prefix==="xmlns"&&(n=r.name),t.setAttributeNS(o,n,s))):(a=t.getAttribute(n),a!==s&&t.setAttribute(n,s));for(var c=t.attributes,u=c.length-1;u>=0;u--)r=c[u],n=r.name,o=r.namespaceURI,o?(n=r.localName||n,e.hasAttributeNS(o,n)||t.removeAttributeNS(o,n)):e.hasAttribute(n)||t.removeAttribute(n)}}var xh,N7="http://www.w3.org/1999/xhtml",Li=typeof document=="undefined"?void 0:document,M7=!!Li&&"content"in Li.createElement("template"),U7=!!Li&&Li.createRange&&"createContextualFragment"in Li.createRange();function z7(t){var e=Li.createElement("template");return e.innerHTML=t,e.content.childNodes[0]}function j7(t){xh||(xh=Li.createRange(),xh.selectNode(Li.body));var e=xh.createContextualFragment(t);return e.childNodes[0]}function q7(t){var e=Li.createElement("body");return e.innerHTML=t,e.childNodes[0]}function W7(t){return t=t.trim(),M7?z7(t):U7?j7(t):q7(t)}function vh(t,e){var i=t.nodeName,r=e.nodeName,n,o;return i===r?!0:(n=i.charCodeAt(0),o=r.charCodeAt(0),n<=90&&o>=97?i===r.toUpperCase():o<=90&&n>=97?r===i.toUpperCase():!1)}function B7(t,e){return!e||e===N7?Li.createElement(t):Li.createElementNS(e,t)}function Z7(t,e){for(var i=t.firstChild;i;){var r=i.nextSibling;e.appendChild(i),i=r}return e}function wg(t,e,i){t[i]!==e[i]&&(t[i]=e[i],t[i]?t.setAttribute(i,""):t.removeAttribute(i))}var iS={OPTION:function(t,e){var i=t.parentNode;if(i){var r=i.nodeName.toUpperCase();r==="OPTGROUP"&&(i=i.parentNode,r=i&&i.nodeName.toUpperCase()),r==="SELECT"&&!i.hasAttribute("multiple")&&(t.hasAttribute("selected")&&!e.selected&&(t.setAttribute("selected","selected"),t.removeAttribute("selected")),i.selectedIndex=-1)}wg(t,e,"selected")},INPUT:function(t,e){wg(t,e,"checked"),wg(t,e,"disabled"),t.value!==e.value&&(t.value=e.value),e.hasAttribute("value")||t.removeAttribute("value")},TEXTAREA:function(t,e){var i=e.value;t.value!==i&&(t.value=i);var r=t.firstChild;if(r){var n=r.nodeValue;if(n==i||!i&&n==t.placeholder)return;r.nodeValue=i}},SELECT:function(t,e){if(!e.hasAttribute("multiple")){for(var i=-1,r=0,n=t.firstChild,o,s;n;)if(s=n.nodeName&&n.nodeName.toUpperCase(),s==="OPTGROUP")o=n,n=o.firstChild;else{if(s==="OPTION"){if(n.hasAttribute("selected")){i=r;break}r++}n=n.nextSibling,!n&&o&&(n=o.nextSibling,o=null)}t.selectedIndex=i}}},cc=1,rS=11,nS=3,oS=8;function Oo(){}function V7(t){if(t)return t.getAttribute&&t.getAttribute("id")||t.id}function Y7(t){return function(i,r,n){if(n||(n={}),typeof r=="string")if(i.nodeName==="#document"||i.nodeName==="HTML"||i.nodeName==="BODY"){var o=r;r=Li.createElement("html"),r.innerHTML=o}else r=W7(r);else r.nodeType===rS&&(r=r.firstElementChild);var s=n.getNodeKey||V7,a=n.onBeforeNodeAdded||Oo,l=n.onNodeAdded||Oo,c=n.onBeforeElUpdated||Oo,u=n.onElUpdated||Oo,f=n.onBeforeNodeDiscarded||Oo,d=n.onNodeDiscarded||Oo,p=n.onBeforeElChildrenUpdated||Oo,g=n.skipFromChildren||Oo,x=n.addChild||function(j,ae){return j.appendChild(ae)},S=n.childrenOnly===!0,w=Object.create(null),T=[];function $(j){T.push(j)}function I(j,ae){if(j.nodeType===cc)for(var V=j.firstChild;V;){var E=void 0;ae&&(E=s(V))?$(E):(d(V),V.firstChild&&I(V,ae)),V=V.nextSibling}}function _(j,ae,V){f(j)!==!1&&(ae&&ae.removeChild(j),d(j),I(j,V))}function A(j){if(j.nodeType===cc||j.nodeType===rS)for(var ae=j.firstChild;ae;){var V=s(ae);V&&(w[V]=ae),A(ae),ae=ae.nextSibling}}A(i);function q(j){l(j);for(var ae=j.firstChild;ae;){var V=ae.nextSibling,E=s(ae);if(E){var B=w[E];B&&vh(ae,B)?(ae.parentNode.replaceChild(B,ae),F(B,ae)):q(ae)}else q(ae);ae=V}}function le(j,ae,V){for(;ae;){var E=ae.nextSibling;(V=s(ae))?$(V):_(ae,j,!0),ae=E}}function F(j,ae,V){var E=s(ae);if(E&&delete w[E],!V){var B=c(j,ae);if(B===!1||(B instanceof HTMLElement&&(j=B),t(j,ae),u(j),p(j,ae)===!1))return}j.nodeName!=="TEXTAREA"?U(j,ae):iS.TEXTAREA(j,ae)}function U(j,ae){var V=g(j,ae),E=ae.firstChild,B=j.firstChild,ne,D,Ue,Ze,Ve;e:for(;E;){for(Ze=E.nextSibling,ne=s(E);!V&&B;){if(Ue=B.nextSibling,E.isSameNode&&E.isSameNode(B)){E=Ze,B=Ue;continue e}D=s(B);var Rt=B.nodeType,Xe=void 0;if(Rt===E.nodeType&&(Rt===cc?(ne?ne!==D&&((Ve=w[ne])?Ue===Ve?Xe=!1:(j.insertBefore(Ve,B),D?$(D):_(B,j,!0),B=Ve,D=s(B)):Xe=!1):D&&(Xe=!1),Xe=Xe!==!1&&vh(B,E),Xe&&F(B,E)):(Rt===nS||Rt==oS)&&(Xe=!0,B.nodeValue!==E.nodeValue&&(B.nodeValue=E.nodeValue))),Xe){E=Ze,B=Ue;continue e}D?$(D):_(B,j,!0),B=Ue}if(ne&&(Ve=w[ne])&&vh(Ve,E))V||x(j,Ve),F(Ve,E);else{var Qt=a(E);Qt!==!1&&(Qt&&(E=Qt),E.actualize&&(E=E.actualize(j.ownerDocument||Li)),x(j,E),q(E))}E=Ze,B=Ue}le(j,B,D);var At=iS[j.nodeName];At&&At(j,ae)}var ie=i,ue=ie.nodeType,re=r.nodeType;if(!S){if(ue===cc)re===cc?vh(i,r)||(d(i),ie=Z7(i,B7(r.nodeName,r.namespaceURI))):ie=r;else if(ue===nS||ue===oS){if(re===ue)return ie.nodeValue!==r.nodeValue&&(ie.nodeValue=r.nodeValue),ie;ie=r}}if(ie===r)d(i);else{if(r.isSameNode&&r.isSameNode(ie))return;if(F(ie,r,S),T)for(var de=0,me=T.length;de{if(te.isIgnored(o,n))return!1;if(r&&r.isSameNode(o)&&te.isFormInput(o))return te.mergeFocusedInput(o,s),!1}})}constructor(t,e,i,r,n,o){this.view=t,this.liveSocket=t.liveSocket,this.container=e,this.id=i,this.rootID=t.root.id,this.html=r,this.streams=n,this.streamInserts={},this.streamComponentRestore={},this.targetCID=o,this.cidPatch=Tn(this.targetCID),this.pendingRemoves=[],this.phxRemove=this.liveSocket.binding("remove"),this.targetContainer=this.isCIDPatch()?this.targetCIDContainer(r):e,this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[],aftertransitionsDiscarded:[]}}before(t,e){this.callbacks[`before${t}`].push(e)}after(t,e){this.callbacks[`after${t}`].push(e)}trackBefore(t,...e){this.callbacks[`before${t}`].forEach(i=>i(...e))}trackAfter(t,...e){this.callbacks[`after${t}`].forEach(i=>i(...e))}markPrunableContentForRemoval(){let t=this.liveSocket.binding(fc);te.all(this.container,`[${t}=append] > *, [${t}=prepend] > *`,e=>{e.setAttribute(Dk,"")})}perform(t){let{view:e,liveSocket:i,html:r,container:n,targetContainer:o}=this;if(this.isCIDPatch()&&!o)return;let s=i.getActiveElement(),{selectionStart:a,selectionEnd:l}=s&&te.hasSelectionRange(s)?s:{},c=i.binding(fc),u=i.binding(Sg),f=i.binding(Tg),d=i.binding(d7),p=[],g=[],x=[],S=null;function w(T,$,I=!1){sS(T,$,{childrenOnly:T.getAttribute(En)===null&&!I,getNodeKey:_=>te.isPhxDestroyed(_)?null:t?_.id:_.id||_.getAttribute&&_.getAttribute(hS),skipFromChildren:_=>_.getAttribute(c)===gg,addChild:(_,A)=>{let{ref:q,streamAt:le}=this.getStreamInsert(A);if(q===void 0)return _.appendChild(A);if(this.setStreamRef(A,q),le===0)_.insertAdjacentElement("afterbegin",A);else if(le===-1)_.appendChild(A);else if(le>0){let F=Array.from(_.children)[le];_.insertBefore(A,F)}},onBeforeNodeAdded:_=>{te.maybeAddPrivateHooks(_,u,f),this.trackBefore("added",_);let A=_;return!t&&this.streamComponentRestore[_.id]&&(A=this.streamComponentRestore[_.id],delete this.streamComponentRestore[_.id],w.call(this,A,_,!0)),A},onNodeAdded:_=>{_.getAttribute&&this.maybeReOrderStream(_,!0),_ instanceof HTMLImageElement&&_.srcset?_.srcset=_.srcset:_ instanceof HTMLVideoElement&&_.autoplay&&_.play(),te.isNowTriggerFormExternal(_,d)&&(S=_),(te.isPhxChild(_)&&e.ownsElement(_)||te.isPhxSticky(_)&&e.ownsElement(_.parentNode))&&this.trackAfter("phxChildAdded",_),p.push(_)},onNodeDiscarded:_=>this.onNodeDiscarded(_),onBeforeNodeDiscarded:_=>_.getAttribute&&_.getAttribute(Dk)!==null?!0:!(_.parentElement!==null&&_.id&&te.isPhxUpdate(_.parentElement,c,[gg,"append","prepend"])||this.maybePendingRemove(_)||this.skipCIDSibling(_)),onElUpdated:_=>{te.isNowTriggerFormExternal(_,d)&&(S=_),g.push(_),this.maybeReOrderStream(_,!1)},onBeforeElUpdated:(_,A)=>{if(te.maybeAddPrivateHooks(A,u,f),te.cleanChildNodes(A,c),this.skipCIDSibling(A))return this.maybeReOrderStream(_),!1;if(te.isPhxSticky(_))return[Jr,ps,go].map(F=>[F,_.getAttribute(F),A.getAttribute(F)]).forEach(([F,U,ie])=>{ie&&U!==ie&&_.setAttribute(F,ie)}),!1;if(te.isIgnored(_,c)||_.form&&_.form.isSameNode(S))return this.trackBefore("updated",_,A),te.mergeAttrs(_,A,{isIgnored:te.isIgnored(_,c)}),g.push(_),te.applyStickyOperations(_),!1;if(_.type==="number"&&_.validity&&_.validity.badInput)return!1;let q=s&&_.isSameNode(s)&&te.isFormInput(_),le=q&&this.isChangedSelect(_,A);if(_.hasAttribute(Ti)){te.isUploadInput(_)&&(te.mergeAttrs(_,A,{isIgnored:!0}),this.trackBefore("updated",_,A),g.push(_)),te.applyStickyOperations(_);let F=te.private(_,Ti)||_.cloneNode(!0);te.putPrivate(_,Ti,F),q||(_=F)}if(te.isPhxChild(A)){let F=_.getAttribute(Jr);return te.mergeAttrs(_,A,{exclude:[ps]}),F!==""&&_.setAttribute(Jr,F),_.setAttribute(go,this.rootID),te.applyStickyOperations(_),!1}return te.copyPrivates(A,_),q&&_.type!=="hidden"&&!le?(this.trackBefore("updated",_,A),te.mergeFocusedInput(_,A),te.syncAttrsToProps(_),g.push(_),te.applyStickyOperations(_),!1):(le&&_.blur(),te.isPhxUpdate(A,c,["append","prepend"])&&x.push(new I7(_,A,A.getAttribute(c))),te.syncAttrsToProps(A),te.applyStickyOperations(A),this.trackBefore("updated",_,A),_)}})}return this.trackBefore("added",n),this.trackBefore("updated",n,n),i.time("morphdom",()=>{this.streams.forEach(([T,$,I,_])=>{$.forEach(([A,q,le])=>{this.streamInserts[A]={ref:T,streamAt:q,limit:le,reset:_}}),_!==void 0&&te.all(n,`[${bg}="${T}"]`,A=>{this.removeStreamChildElement(A)}),I.forEach(A=>{let q=n.querySelector(`[id="${A}"]`);q&&this.removeStreamChildElement(q)})}),t&&te.all(this.container,`[${c}=${gg}]`,T=>{this.liveSocket.owner(T,$=>{$===this.view&&Array.from(T.children).forEach(I=>{this.removeStreamChildElement(I)})})}),w.call(this,o,r)}),i.isDebugEnabled()&&(E7(),Array.from(document.querySelectorAll("input[name=id]")).forEach(T=>{T.form&&console.error(`Detected an input with name="id" inside a form! This will cause problems when patching the DOM. +`,T)})),x.length>0&&i.time("post-morph append/prepend restoration",()=>{x.forEach(T=>T.perform())}),i.silenceEvents(()=>te.restoreFocus(s,a,l)),te.dispatchEvent(document,"phx:update"),p.forEach(T=>this.trackAfter("added",T)),g.forEach(T=>this.trackAfter("updated",T)),this.transitionPendingRemoves(),S&&(i.unload(),Object.getPrototypeOf(S).submit.call(S)),!0}onNodeDiscarded(t){(te.isPhxChild(t)||te.isPhxSticky(t))&&this.liveSocket.destroyViewByEl(t),this.trackAfter("discarded",t)}maybePendingRemove(t){return t.getAttribute&&t.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(t),!0):!1}removeStreamChildElement(t){this.streamInserts[t.id]?(this.streamComponentRestore[t.id]=t,t.remove()):this.maybePendingRemove(t)||(t.remove(),this.onNodeDiscarded(t))}getStreamInsert(t){return(t.id?this.streamInserts[t.id]:{})||{}}setStreamRef(t,e){te.putSticky(t,bg,i=>i.setAttribute(bg,e))}maybeReOrderStream(t,e){let{ref:i,streamAt:r,reset:n}=this.getStreamInsert(t);if(r!==void 0&&(this.setStreamRef(t,i),!(!n&&!e)&&t.parentElement)){if(r===0)t.parentElement.insertBefore(t,t.parentElement.firstElementChild);else if(r>0){let o=Array.from(t.parentElement.children),s=o.indexOf(t);if(r>=o.length-1)t.parentElement.appendChild(t);else{let a=o[r];s>r?t.parentElement.insertBefore(t,a):t.parentElement.insertBefore(t,a.nextElementSibling)}}this.maybeLimitStream(t)}}maybeLimitStream(t){let{limit:e}=this.getStreamInsert(t),i=e!==null&&Array.from(t.parentElement.children);e&&e<0&&i.length>e*-1?i.slice(0,i.length+e).forEach(r=>this.removeStreamChildElement(r)):e&&e>=0&&i.length>e&&i.slice(e).forEach(r=>this.removeStreamChildElement(r))}transitionPendingRemoves(){let{pendingRemoves:t,liveSocket:e}=this;t.length>0&&(e.transitionRemoves(t),e.requestDOMUpdate(()=>{t.forEach(i=>{let r=te.firstPhxChild(i);r&&e.destroyViewByEl(r),i.remove()}),this.trackAfter("transitionsDiscarded",t)}))}isChangedSelect(t,e){if(!(t instanceof HTMLSelectElement)||t.multiple)return!1;if(t.options.length!==e.options.length)return!0;let i=t.selectedOptions[0],r=e.selectedOptions[0];return i&&i.hasAttribute("selected")&&r.setAttribute("selected",i.getAttribute("selected")),!t.isEqualNode(e)}isCIDPatch(){return this.cidPatch}skipCIDSibling(t){return t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute(fS)}targetCIDContainer(t){if(!this.isCIDPatch())return;let[e,...i]=te.findComponentNodeList(this.container,this.targetCID);return i.length===0&&te.childNodeLength(t)===1?e:e&&e.parentNode}indexOf(t,e){return Array.from(t.children).indexOf(e)}},H7=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),G7=new Set(["'",'"']),aS=(t,e,i)=>{let r=0,n=!1,o,s,a,l,c,u,f=t.match(/^(\s*(?:\s*)*)<([^\s\/>]+)/);if(f===null)throw new Error(`malformed html ${t}`);for(r=f[0].length,o=f[1],a=f[2],l=r,r;r";r++)if(t.charAt(r)==="="){let g=t.slice(r-3,r)===" id";r++;let x=t.charAt(r);if(G7.has(x)){let S=r;for(r++,r;r=o.length+a.length;){let g=t.charAt(d);if(n)g==="-"&&t.slice(d-3,d)===""&&t.slice(d-2,d)==="--")n=!0,d-=3;else{if(g===">")break;d-=1}}s=t.slice(d+1,t.length);let p=Object.keys(e).map(g=>e[g]===!0?g:`${g}="${e[g]}"`).join(" ");if(i){let g=c?` id="${c}"`:"";H7.has(a)?u=`<${a}${g}${p===""?"":" "}${p}/>`:u=`<${a}${g}${p===""?"":" "}${p}>`}else{let g=t.slice(l,d+1);u=`<${a}${p===""?"":" "}${p}${g}`}return[u,o,s]},lS=class{static extract(t){let{[Vk]:e,[Zk]:i,[Yk]:r}=t;return delete t[Vk],delete t[Zk],delete t[Yk],{diff:t,title:r,reply:e||null,events:i||[]}}constructor(t,e){this.viewId=t,this.rendered={},this.magicId=0,this.mergeDiff(e)}parentViewId(){return this.viewId}toString(t){let[e,i]=this.recursiveToString(this.rendered,this.rendered[Si],t,!0,{});return[e,i]}recursiveToString(t,e=t[Si],i,r,n){i=i?new Set(i):null;let o={buffer:"",components:e,onlyCids:i,streams:new Set};return this.toOutputBuffer(t,null,o,r,n),[o.buffer,o.streams]}componentCIDs(t){return Object.keys(t[Si]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(t){return t[Si]?Object.keys(t).length===1:!1}getComponent(t,e){return t[Si][e]}resetRender(t){this.rendered[Si][t]&&(this.rendered[Si][t].reset=!0)}mergeDiff(t){let e=t[Si],i={};if(delete t[Si],this.rendered=this.mutableMerge(this.rendered,t),this.rendered[Si]=this.rendered[Si]||{},e){let r=this.rendered[Si];for(let n in e)e[n]=this.cachedFindComponent(n,e[n],r,e,i);for(let n in e)r[n]=e[n];t[Si]=e}}cachedFindComponent(t,e,i,r,n){if(n[t])return n[t];{let o,s,a=e[Gr];if(Tn(a)){let l;a>0?l=this.cachedFindComponent(a,r[a],i,r,n):l=i[-a],s=l[Gr],o=this.cloneMerge(l,e,!0),o[Gr]=s}else o=e[Gr]!==void 0||i[t]===void 0?e:this.cloneMerge(i[t],e,!1);return n[t]=o,o}}mutableMerge(t,e){return e[Gr]!==void 0?e:(this.doMutableMerge(t,e),t)}doMutableMerge(t,e){for(let i in e){let r=e[i],n=t[i];Ta(r)&&r[Gr]===void 0&&Ta(n)?this.doMutableMerge(n,r):t[i]=r}t[vg]&&(t.newRender=!0)}cloneMerge(t,e,i){let r=H(H({},t),e);for(let n in r){let o=e[n],s=t[n];Ta(o)&&o[Gr]===void 0&&Ta(s)?r[n]=this.cloneMerge(s,o,i):o===void 0&&Ta(s)&&(r[n]=this.cloneMerge(s,{},i))}return i?(delete r.magicId,delete r.newRender):t[vg]&&(r.newRender=!0),r}componentToString(t){let[e,i]=this.recursiveCIDToString(this.rendered[Si],t,null),[r,n,o]=aS(e,{});return[r,i]}pruneCIDs(t){t.forEach(e=>delete this.rendered[Si][e])}get(){return this.rendered}isNewFingerprint(t={}){return!!t[Gr]}templateStatic(t,e){return typeof t=="number"?e[t]:t}nextMagicID(){return this.magicId++,`m${this.magicId}-${this.parentViewId()}`}toOutputBuffer(t,e,i,r,n={}){if(t[yh])return this.comprehensionToBuffer(t,e,i);let{[Gr]:o}=t;o=this.templateStatic(o,e);let s=t[vg],a=i.buffer;s&&(i.buffer=""),r&&s&&!t.magicId&&(t.newRender=!0,t.magicId=this.nextMagicID()),i.buffer+=o[0];for(let l=1;l0||l.length>0||c)&&(delete t[Fk],t[yh]=[],i.streams.add(o))}dynamicToBuffer(t,e,i,r){if(typeof t=="number"){let[n,o]=this.recursiveCIDToString(i.components,t,i.onlyCids);i.buffer+=n,i.streams=new Set([...i.streams,...o])}else Ta(t)?this.toOutputBuffer(t,e,i,r,{}):i.buffer+=t}recursiveCIDToString(t,e,i){let r=t[e]||Fi(`no component for CID ${e}`,t),n={[En]:e},o=i&&!i.has(e);r.newRender=!o,r.magicId=`c${e}-${this.parentViewId()}`;let s=!r.reset,[a,l]=this.recursiveToString(r,t,i,s,n);return delete r.reset,[a,l]}},K7=1,uc=class{static makeID(){return K7++}static elementID(t){return t.phxHookId}constructor(t,e,i){this.__view=t,this.liveSocket=t.liveSocket,this.__callbacks=i,this.__listeners=new Set,this.__isDisconnected=!1,this.el=e,this.el.phxHookId=this.constructor.makeID();for(let r in this.__callbacks)this[r]=this.__callbacks[r]}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed()}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}pushEvent(t,e={},i=function(){}){return this.__view.pushHookEvent(this.el,null,t,e,i)}pushEventTo(t,e,i={},r=function(){}){return this.__view.withinTargets(t,(n,o)=>n.pushHookEvent(this.el,o,e,i,r))}handleEvent(t,e){let i=(r,n)=>n?t:e(r.detail);return window.addEventListener(`phx:${t}`,i),this.__listeners.add(i),i}removeHandleEvent(t){let e=t(null,!0);window.removeEventListener(`phx:${e}`,t),this.__listeners.delete(t)}upload(t,e){return this.__view.dispatchUploads(null,t,e)}uploadTo(t,e,i){return this.__view.withinTargets(t,(r,n)=>{r.dispatchUploads(n,e,i)})}__cleanup__(){this.__listeners.forEach(t=>this.removeHandleEvent(t))}},J7=(t,e)=>{let i=t.endsWith("[]"),r=i?t.slice(0,-2):t;return r=r.replace(/([^\[\]]+)(\]?$)/,`${e}$1$2`),i&&(r+="[]"),r},kh=(t,e,i=[])=>{let u=e,{submitter:r}=u,n=pi(u,["submitter"]),o;if(r&&r.name){let f=document.createElement("input");f.type="hidden";let d=r.getAttribute("form");d&&f.setAttribute("form",d),f.name=r.name,f.value=r.value,r.parentElement.insertBefore(f,r),o=f}let s=new FormData(t),a=[];s.forEach((f,d,p)=>{f instanceof File&&a.push(d)}),a.forEach(f=>s.delete(f));let l=new URLSearchParams,c=Array.from(t.elements);for(let[f,d]of s.entries())if(i.length===0||i.indexOf(f)>=0){let p=c.filter(S=>S.name===f),g=!p.some(S=>te.private(S,Eh)||te.private(S,dc)),x=p.every(S=>S.type==="hidden");g&&!(r&&r.name==f)&&!x&&l.append(J7(f,"_unused_"),""),l.append(f,d)}r&&o&&r.parentElement.removeChild(o);for(let f in n)l.append(f,n[f]);return l.toString()},gS=class{constructor(t,e,i,r,n){this.isDead=!1,this.liveSocket=e,this.flash=r,this.parent=i,this.root=i?i.root:this,this.el=t,this.id=this.el.id,this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pendingForms=new Set,this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(o){o&&o()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.formsForRecovery={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>{let o=this.href&&this.expandURL(this.href);return{redirect:this.redirect?o:void 0,url:this.redirect?void 0:o||void 0,params:this.connectParams(n),session:this.getSession(),static:this.getStatic(),flash:this.flash}})}setHref(t){this.href=t}setRedirect(t){this.redirect=!0,this.href=t}isMain(){return this.el.hasAttribute(Cg)}connectParams(t){let e=this.liveSocket.params(this.el),i=te.all(document,`[${this.binding(u7)}]`).map(r=>r.src||r.href).filter(r=>typeof r=="string");return i.length>0&&(e._track_static=i),e._mounts=this.joinCount,e._live_referer=t,e}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(Jr)}getStatic(){let t=this.el.getAttribute(ps);return t===""?null:t}destroy(t=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let e=()=>{t();for(let i in this.viewHooks)this.destroyHook(this.viewHooks[i])};te.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",e).receive("error",e).receive("timeout",e)}setContainerClasses(...t){this.el.classList.remove(Mk,rc,mh,Uk,Og),this.el.classList.add(...t)}showLoader(t){if(clearTimeout(this.loaderTimer),t)this.loaderTimer=setTimeout(()=>this.showLoader(),t);else{for(let e in this.viewHooks)this.viewHooks[e].__disconnected();this.setContainerClasses(rc)}}execAll(t){te.all(this.el,`[${t}]`,e=>this.liveSocket.execJS(e,e.getAttribute(t)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(Mk),this.execAll(this.binding("connected"))}triggerReconnected(){for(let t in this.viewHooks)this.viewHooks[t].__reconnected()}log(t,e){this.liveSocket.log(this,t,e)}transition(t,e,i=function(){}){this.liveSocket.transition(t,e,i)}withinTargets(t,e,i=document,r){if(t instanceof HTMLElement||t instanceof SVGElement)return this.liveSocket.owner(t,n=>e(n,t));if(Tn(t))te.findComponentNodeList(r||this.el,t).length===0?Fi(`no component found matching phx-target of ${t}`):e(this,parseInt(t));else{let n=Array.from(i.querySelectorAll(t));n.length===0&&Fi(`nothing found matching the phx-target selector "${t}"`),n.forEach(o=>this.liveSocket.owner(o,s=>e(s,o)))}}applyDiff(t,e,i){this.log(t,()=>["",Th(e)]);let{diff:r,reply:n,events:o,title:s}=lS.extract(e);i({diff:r,reply:n,events:o}),typeof s=="string"&&window.requestAnimationFrame(()=>te.putTitle(s))}onJoin(t){let{rendered:e,container:i,liveview_version:r}=t;if(i){let[n,o]=i;this.el=te.replaceRootContainer(this.el,n,o)}this.childJoins=0,this.joinPending=!0,this.flash=null,this.root===this&&(this.formsForRecovery=this.getFormsForRecovery()),r!==this.liveSocket.version()&&console.error(`LiveView asset version mismatch. JavaScript version ${this.liveSocket.version()} vs. server ${r}. To avoid issues, please ensure that your assets use the same version as the server.`),Kr.dropLocal(this.liveSocket.localStorage,window.location.pathname,cS),this.applyDiff("mount",e,({diff:n,events:o})=>{this.rendered=new lS(this.id,n);let[s,a]=this.renderContainer(null,"join");this.dropPendingRefs(),this.joinCount++,this.maybeRecoverForms(s,()=>{this.onJoinComplete(t,s,a,o)})})}dropPendingRefs(){te.all(document,`[${hs}="${this.id}"][${Ti}]`,t=>{t.removeAttribute(Ti),t.removeAttribute(hs)})}onJoinComplete({live_patch:t},e,i,r){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(t,e,i,r);te.findPhxChildrenInFragment(e,this.id).filter(o=>{let s=o.id&&this.el.querySelector(`[id="${o.id}"]`),a=s&&s.getAttribute(ps);return a&&o.setAttribute(ps,a),s&&s.setAttribute(go,this.root.id),this.joinChild(o)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(t,e,i,r)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(t,e,i,r)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(t,e,i,r)])}attachTrueDocEl(){this.el=te.byId(this.id),this.el.setAttribute(go,this.root.id)}execNewMounted(t=this.el){let e=this.binding(Sg),i=this.binding(Tg);te.all(t,`[${e}], [${i}]`,r=>{this.ownsElement(r)&&(te.maybeAddPrivateHooks(r,e,i),this.maybeAddNewHook(r))}),te.all(t,`[${this.binding(nc)}], [data-phx-${nc}]`,r=>{this.ownsElement(r)&&this.maybeAddNewHook(r)}),te.all(t,`[${this.binding(Wk)}]`,r=>{this.ownsElement(r)&&this.maybeMounted(r)})}applyJoinPatch(t,e,i,r){this.attachTrueDocEl();let n=new wh(this,this.el,this.id,e,i,null);if(n.markPrunableContentForRemoval(),this.performPatch(n,!1,!0),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(r),this.applyPendingUpdates(),t){let{kind:o,to:s}=t;this.liveSocket.historyPatch(s,o)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(t,e){this.liveSocket.triggerDOM("onBeforeElUpdated",[t,e]);let i=this.getHook(t),r=i&&te.isIgnored(t,this.binding(fc));if(i&&!t.isEqualNode(e)&&!(r&&P7(t.dataset,e.dataset)))return i.__beforeUpdate(),i}maybeMounted(t){let e=t.getAttribute(this.binding(Wk)),i=e&&te.private(t,"mounted");e&&!i&&(this.liveSocket.execJS(t,e),te.putPrivate(t,"mounted",!0))}maybeAddNewHook(t,e){let i=this.addHook(t);i&&i.__mounted()}performPatch(t,e,i=!1){let r=[],n=!1,o=new Set;return this.liveSocket.triggerDOM("onPatchStart",[t.targetContainer]),t.after("added",s=>{this.liveSocket.triggerDOM("onNodeAdded",[s]);let a=this.binding(Sg),l=this.binding(Tg);te.maybeAddPrivateHooks(s,a,l),this.maybeAddNewHook(s),s.getAttribute&&this.maybeMounted(s)}),t.after("phxChildAdded",s=>{te.isPhxSticky(s)?this.liveSocket.joinRootViews():n=!0}),t.before("updated",(s,a)=>{this.triggerBeforeUpdateHook(s,a)&&o.add(s.id)}),t.after("updated",s=>{o.has(s.id)&&this.getHook(s).__updated()}),t.after("discarded",s=>{s.nodeType===Node.ELEMENT_NODE&&r.push(s)}),t.after("transitionsDiscarded",s=>this.afterElementsRemoved(s,e)),t.perform(i),this.afterElementsRemoved(r,e),this.liveSocket.triggerDOM("onPatchEnd",[t.targetContainer]),n}afterElementsRemoved(t,e){let i=[];t.forEach(r=>{let n=te.all(r,`[${En}]`),o=te.all(r,`[${this.binding(nc)}]`);n.concat(r).forEach(s=>{let a=this.componentID(s);Tn(a)&&i.indexOf(a)===-1&&i.push(a)}),o.concat(r).forEach(s=>{let a=this.getHook(s);a&&this.destroyHook(a)})}),e&&this.maybePushComponentsDestroyed(i)}joinNewChildren(){te.findPhxChildren(this.el,this.id).forEach(t=>this.joinChild(t))}maybeRecoverForms(t,e){let i=this.binding("change"),r=this.root.formsForRecovery,n=document.createElement("template");n.innerHTML=t;let o=n.content.firstElementChild;o.id=this.id,o.setAttribute(go,this.root.id),o.setAttribute(Jr,this.getSession()),o.setAttribute(ps,this.getStatic()),o.setAttribute(Os,this.parent?this.parent.id:null);let s=te.all(n.content,"form").filter(a=>a.id&&r[a.id]).filter(a=>!this.pendingForms.has(a.id)).filter(a=>r[a.id].getAttribute(i)===a.getAttribute(i)).map(a=>[r[a.id],a]);if(s.length===0)return e();s.forEach(([a,l],c)=>{this.pendingForms.add(l.id),this.pushFormRecovery(a,l,n.content.firstElementChild,()=>{this.pendingForms.delete(l.id),c===s.length-1&&e()})})}getChildById(t){return this.root.children[this.id][t]}getDescendentByEl(t){return t.id===this.id?this:this.children[t.getAttribute(Os)][t.id]}destroyDescendent(t){for(let e in this.root.children)for(let i in this.root.children[e])if(i===t)return this.root.children[e][i].destroy()}joinChild(t){if(!this.getChildById(t.id)){let i=new gS(t,this.liveSocket,this);return this.root.children[this.id][i.id]=i,i.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(t){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.pendingForms.clear(),this.formsForRecovery={},this.joinCallback(()=>{this.pendingJoinOps.forEach(([t,e])=>{t.isDestroyed()||e()}),this.pendingJoinOps=[]})}update(t,e){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:t,events:e});this.rendered.mergeDiff(t);let i=!1;this.rendered.isComponentOnlyDiff(t)?this.liveSocket.time("component patch complete",()=>{te.findExistingParentCIDs(this.el,this.rendered.componentCIDs(t)).forEach(n=>{this.componentPatch(this.rendered.getComponent(t,n),n)&&(i=!0)})}):Hk(t)||this.liveSocket.time("full patch complete",()=>{let[r,n]=this.renderContainer(t,"update"),o=new wh(this,this.el,this.id,r,n,null);i=this.performPatch(o,!0)}),this.liveSocket.dispatchEvents(e),i&&this.joinNewChildren()}renderContainer(t,e){return this.liveSocket.time(`toString diff (${e})`,()=>{let i=this.el.tagName,r=t?this.rendered.componentCIDs(t):null,[n,o]=this.rendered.toString(r);return[`<${i}>${n}`,o]})}componentPatch(t,e){if(Hk(t))return!1;let[i,r]=this.rendered.componentToString(e),n=new wh(this,this.el,this.id,i,r,e);return this.performPatch(n,!0)}getHook(t){return this.viewHooks[uc.elementID(t)]}addHook(t){if(uc.elementID(t)||!t.getAttribute)return;let e=t.getAttribute(`data-phx-${nc}`)||t.getAttribute(this.binding(nc));if(e&&!this.ownsElement(t))return;let i=this.liveSocket.getHookCallbacks(e);if(i){t.id||Fi(`no DOM ID for hook "${e}". Hooks require a unique ID on each element.`,t);let r=new uc(this,t,i);return this.viewHooks[uc.elementID(r.el)]=r,r}else e!==null&&Fi(`unknown hook found for "${e}"`,t)}destroyHook(t){t.__destroyed(),t.__cleanup__(),delete this.viewHooks[uc.elementID(t.el)]}applyPendingUpdates(){this.pendingDiffs.forEach(({diff:t,events:e})=>this.update(t,e)),this.pendingDiffs=[],this.eachChild(t=>t.applyPendingUpdates())}eachChild(t){let e=this.root.children[this.id]||{};for(let i in e)t(this.getChildById(i))}onChannel(t,e){this.liveSocket.onChannel(this.channel,t,i=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>e(i)]):this.liveSocket.requestDOMUpdate(()=>e(i))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",t=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",t,({diff:e,events:i})=>this.update(e,i))})}),this.onChannel("redirect",({to:t,flash:e})=>this.onRedirect({to:t,flash:e})),this.onChannel("live_patch",t=>this.onLivePatch(t)),this.onChannel("live_redirect",t=>this.onLiveRedirect(t)),this.channel.onError(t=>this.onError(t)),this.channel.onClose(t=>this.onClose(t))}destroyAllChildren(){this.eachChild(t=>t.destroy())}onLiveRedirect(t){let{to:e,kind:i,flash:r}=t,n=this.expandURL(e);this.liveSocket.historyRedirect(n,i,r)}onLivePatch(t){let{to:e,kind:i}=t;this.href=this.expandURL(e),this.liveSocket.historyPatch(e,i)}expandURL(t){return t.startsWith("/")?`${window.location.protocol}//${window.location.host}${t}`:t}onRedirect({to:t,flash:e}){this.liveSocket.redirect(t,e)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}join(t){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=e=>{e=e||function(){},t?t(this.joinCount,e):e()},this.liveSocket.wrapPush(this,{timeout:!1},()=>this.channel.join().receive("ok",e=>{this.isDestroyed()||this.liveSocket.requestDOMUpdate(()=>this.onJoin(e))}).receive("error",e=>!this.isDestroyed()&&this.onJoinError(e)).receive("timeout",()=>!this.isDestroyed()&&this.onJoinError({reason:"timeout"})))}onJoinError(t){if(t.reason==="reload"){this.log("error",()=>[`failed mount with ${t.status}. Falling back to page request`,t]),this.isMain()&&this.onRedirect({to:this.href});return}else if(t.reason==="unauthorized"||t.reason==="stale"){this.log("error",()=>["unauthorized live_redirect. Falling back to page request",t]),this.isMain()&&this.onRedirect({to:this.href});return}if((t.redirect||t.live_redirect)&&(this.joinPending=!1,this.channel.leave()),t.redirect)return this.onRedirect(t.redirect);if(t.live_redirect)return this.onLiveRedirect(t.live_redirect);this.displayError([rc,mh,Og]),this.log("error",()=>["unable to join",t]),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this)}onClose(t){if(!this.isDestroyed()){if(this.liveSocket.hasPendingLink()&&t!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(x7)}}onError(t){this.onClose(t),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",t]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([rc,mh,Og]):this.displayError([rc,mh,Uk]))}displayError(t){this.isMain()&&te.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(...t),this.execAll(this.binding("disconnected"))}pushWithReply(t,e,i,r=function(){}){if(!this.isConnected())return;let[n,[o],s]=t?t():[null,[],{}],a=function(){};return(s.page_loading||o&&o.getAttribute(this.binding(Nk))!==null)&&(a=this.liveSocket.withPageLoading({kind:"element",target:o})),typeof i.cid!="number"&&delete i.cid,this.liveSocket.wrapPush(this,{timeout:!0},()=>this.channel.push(e,i,w7).receive("ok",l=>{let c=u=>{l.redirect&&this.onRedirect(l.redirect),l.live_patch&&this.onLivePatch(l.live_patch),l.live_redirect&&this.onLiveRedirect(l.live_redirect),a(),r(l,u)};l.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",l.diff,({diff:u,reply:f,events:d})=>{n!==null&&this.undoRefs(n),this.update(u,d),c(f)})}):(n!==null&&this.undoRefs(n),c(null))}))}undoRefs(t,e){e=e?new Set(e):null,this.isConnected()&&te.all(document,`[${hs}="${this.id}"][${Ti}="${t}"]`,i=>{e&&!e.has(i)||this.undoElRef(i,t)})}undoElRef(t,e){if(!(parseInt(t.getAttribute(Ti),10)<=e))return;t.dispatchEvent(new CustomEvent("phx:unlock",{bubbles:!0,cancelable:!1}));let i=t.getAttribute(Sa),r=t.getAttribute(mg);t.removeAttribute(Ti),t.removeAttribute(hs),r!==null&&(t.readOnly=r==="true",t.removeAttribute(mg)),i!==null&&(t.disabled=i==="true",t.removeAttribute(Sa)),c7.forEach(s=>te.removeClass(t,s));let n=t.getAttribute(gh);n!==null&&(t.innerText=n,t.removeAttribute(gh));let o=te.private(t,Ti);if(o){let s=this.triggerBeforeUpdateHook(t,o);wh.patchWithClonedTree(t,o,this.liveSocket),te.all(t,`[${hs}="${this.id}"][${Ti}]`,a=>this.undoElRef(a,e)),this.execNewMounted(t),s&&s.__updated(),te.deletePrivate(t,Ti)}}putRef(t,e,i={}){let r=this.ref++,n=this.binding(jk);i.loading&&(t=t.concat(te.all(document,i.loading)));for(let o of t){if(o.setAttribute(Ti,r),o.setAttribute(hs,this.el.id),i.submitter&&!(o===i.submitter||o===i.form))continue;o.classList.add(`phx-${e}-loading`),o.dispatchEvent(new CustomEvent(`phx:${e}-loading`,{bubbles:!0,cancelable:!1}));let s=o.getAttribute(n);s!==null&&(o.getAttribute(gh)||o.setAttribute(gh,o.innerText),s!==""&&(o.innerText=s),o.setAttribute(Sa,o.getAttribute(Sa)||o.disabled),o.setAttribute("disabled",""))}return[r,t,i]}componentID(t){let e=t.getAttribute&&t.getAttribute(En);return e?parseInt(e):null}targetComponentID(t,e,i={}){if(Tn(e))return e;let r=i.target||t.getAttribute(this.binding("target"));return Tn(r)?parseInt(r):e&&(r!==null||i.target)?this.closestComponentID(e):null}closestComponentID(t){return Tn(t)?t:t?mo(t.closest(`[${En}]`),e=>this.ownsElement(e)&&this.componentID(e)):null}pushHookEvent(t,e,i,r,n){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",i,r]),!1;let[o,s,a]=this.putRef([t],"hook");return this.pushWithReply(()=>[o,s,a],"event",{type:"hook",event:i,value:r,cid:this.closestComponentID(e)},(l,c)=>n(c,o)),o}extractMeta(t,e,i){let r=this.binding("value-");for(let n=0;n=0&&!t.checked&&delete e.value),i){e||(e={});for(let n in i)e[n]=i[n]}return e}pushEvent(t,e,i,r,n,o={},s){this.pushWithReply(()=>this.putRef([e],t,o),"event",{type:t,event:r,value:this.extractMeta(e,n,o.value),cid:this.targetComponentID(e,i,o)},(a,l)=>s&&s(l))}pushFileProgress(t,e,i,r=function(){}){this.liveSocket.withinOwners(t.form,(n,o)=>{n.pushWithReply(null,"progress",{event:t.getAttribute(n.binding(b7)),ref:t.getAttribute(Cn),entry_ref:e,progress:i,cid:n.targetComponentID(t.form,o)},r)})}pushInput(t,e,i,r,n,o){let s,a=Tn(i)?i:this.targetComponentID(t.form,e,n),l=()=>this.putRef([t,t.form],"change",n),c,u=this.extractMeta(t.form);t instanceof HTMLButtonElement&&(u.submitter=t),t.getAttribute(this.binding("change"))?c=kh(t.form,H({_target:n._target},u),[t.name]):c=kh(t.form,H({_target:n._target},u)),te.isUploadInput(t)&&t.files&&t.files.length>0&&Mt.trackFiles(t,Array.from(t.files)),s=Mt.serializeUploads(t);let f={type:"form",event:r,value:c,uploads:s,cid:a};this.pushWithReply(l,"event",f,d=>{if(te.isUploadInput(t)&&te.isAutoUpload(t)){if(Mt.filesAwaitingPreflight(t).length>0){let[p,g]=l();this.undoRefs(p,[t.form]),this.uploadFiles(t.form,e,p,a,x=>{o&&o(d),this.triggerAwaitingSubmit(t.form),this.undoRefs(p)})}}else o&&o(d)})}triggerAwaitingSubmit(t){let e=this.getScheduledSubmit(t);if(e){let[i,r,n,o]=e;this.cancelSubmit(t),o()}}getScheduledSubmit(t){return this.formSubmits.find(([e,i,r,n])=>e.isSameNode(t))}scheduleSubmit(t,e,i,r){if(this.getScheduledSubmit(t))return!0;this.formSubmits.push([t,e,i,r])}cancelSubmit(t){this.formSubmits=this.formSubmits.filter(([e,i,r])=>e.isSameNode(t)?(this.undoRefs(i),!1):!0)}disableForm(t,e={}){let i=u=>!(hc(u,`${this.binding(fc)}=ignore`,u.form)||hc(u,"data-phx-update=ignore",u.form)),r=u=>u.hasAttribute(this.binding(jk)),n=u=>u.tagName=="BUTTON",o=u=>["INPUT","TEXTAREA","SELECT"].includes(u.tagName),s=Array.from(t.elements),a=s.filter(r),l=s.filter(n).filter(i),c=s.filter(o).filter(i);return l.forEach(u=>{u.setAttribute(Sa,u.disabled),u.disabled=!0}),c.forEach(u=>{u.setAttribute(mg,u.readOnly),u.readOnly=!0,u.files&&(u.setAttribute(Sa,u.disabled),u.disabled=!0)}),t.setAttribute(this.binding(Nk),""),this.putRef([t].concat(a).concat(l).concat(c),"submit",e)}pushFormSubmit(t,e,i,r,n,o){let s=()=>this.disableForm(t,Ce(H({},n),{form:t,submitter:r})),a=this.targetComponentID(t,e);if(Mt.hasUploadsInProgress(t)){let[l,c]=s(),u=()=>this.pushFormSubmit(t,e,i,r,n,o);return this.scheduleSubmit(t,l,n,u)}else if(Mt.inputsAwaitingPreflight(t).length>0){let[l,c]=s(),u=()=>[l,c,n];this.uploadFiles(t,e,l,a,f=>{if(Mt.inputsAwaitingPreflight(t).length>0)return this.undoRefs(l);let d=this.extractMeta(t),p=kh(t,H({submitter:r},d));this.pushWithReply(u,"event",{type:"form",event:i,value:p,cid:a},o)})}else if(!(t.hasAttribute(Ti)&&t.classList.contains("phx-submit-loading"))){let l=this.extractMeta(t),c=kh(t,H({submitter:r},l));this.pushWithReply(s,"event",{type:"form",event:i,value:c,cid:a},o)}}uploadFiles(t,e,i,r,n){let o=this.joinCount,s=Mt.activeFileInputs(t),a=s.length;s.forEach(l=>{let c=new Mt(l,this,()=>{a--,a===0&&n()}),u=c.entries().map(d=>d.toPreflightPayload());if(u.length===0){a--;return}let f={ref:l.getAttribute(Cn),entries:u,cid:this.targetComponentID(l.form,e)};this.log("upload",()=>["sending preflight request",f]),this.pushWithReply(null,"allow_upload",f,d=>{if(this.log("upload",()=>["got preflight response",d]),c.entries().forEach(p=>{d.entries&&!d.entries[p.ref]&&this.handleFailedEntryPreflight(p.ref,"failed preflight",c)}),d.error||Object.keys(d.entries).length===0)this.undoRefs(i),(d.error||[]).map(([g,x])=>{this.handleFailedEntryPreflight(g,x,c)});else{let p=g=>{this.channel.onError(()=>{this.joinCount===o&&g()})};c.initAdapterUpload(d,p,this.liveSocket)}})})}handleFailedEntryPreflight(t,e,i){if(i.isAutoUpload()){let r=i.entries().find(n=>n.ref===t.toString());r&&r.cancel()}else i.entries().map(r=>r.cancel());this.log("upload",()=>[`error for entry ${t}`,e])}dispatchUploads(t,e,i){let r=this.targetCtxElement(t)||this.el,n=te.findUploadInputs(r).filter(o=>o.name===e);n.length===0?Fi(`no live file inputs found matching the name "${e}"`):n.length>1?Fi(`duplicate live file inputs found matching the name "${e}"`):te.dispatchEvent(n[0],uS,{detail:{files:i}})}targetCtxElement(t){if(Tn(t)){let[e]=te.findComponentNodeList(this.el,t);return e}else return t||null}pushFormRecovery(t,e,i,r){let n=this.binding("change"),o=e.getAttribute(this.binding("target"))||e,s=e.getAttribute(this.binding(qk))||e.getAttribute(this.binding("change")),a=Array.from(t.elements).filter(u=>te.isFormInput(u)&&u.name&&!u.hasAttribute(n));if(a.length===0)return;a.forEach(u=>u.hasAttribute(Cn)&&Mt.clearFiles(u));let l=a.find(u=>u.type!=="hidden")||a[0],c=0;this.withinTargets(o,(u,f)=>{let d=this.targetComponentID(e,f);c++,u.pushInput(l,f,d,s,{_target:l.name},()=>{c--,c===0&&r()})},i,i)}pushLinkPatch(t,e,i){let r=this.liveSocket.setPendingLink(t),n=e?()=>this.putRef([e],"click"):null,o=()=>this.liveSocket.redirect(window.location.href),s=t.startsWith("/")?`${location.protocol}//${location.host}${t}`:t,a=this.pushWithReply(n,"live_patch",{url:s},l=>{this.liveSocket.requestDOMUpdate(()=>{l.link_redirect?this.liveSocket.replaceMain(t,null,i,r):(this.liveSocket.commitPendingLink(r)&&(this.href=t),this.applyPendingUpdates(),i&&i(r))})});a?a.receive("timeout",o):o()}getFormsForRecovery(){if(this.joinCount===0)return{};let t=this.binding("change");return te.all(this.el,`form[${t}]`).filter(e=>e.id).filter(e=>e.elements.length>0).filter(e=>e.getAttribute(this.binding(qk))!=="ignore").map(e=>e.cloneNode(!0)).reduce((e,i)=>(e[i.id]=i,e),{})}maybePushComponentsDestroyed(t){let e=t.filter(i=>te.findComponentNodeList(this.el,i).length===0);e.length>0&&(e.forEach(i=>this.rendered.resetRender(i)),this.pushWithReply(null,"cids_will_destroy",{cids:e},()=>{this.liveSocket.requestDOMUpdate(()=>{let i=e.filter(r=>te.findComponentNodeList(this.el,r).length===0);i.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:i},r=>{this.rendered.pruneCIDs(r.cids)})})}))}ownsElement(t){let e=t.closest(Ca);return t.getAttribute(Os)===this.id||e&&e.id===this.id||!e&&this.isDead}submitForm(t,e,i,r,n={}){te.putPrivate(t,dc,!0),Array.from(t.elements).forEach(s=>te.putPrivate(s,dc,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(t,e,i,r,n,()=>{this.liveSocket.restorePreviouslyActiveFocus()})}binding(t){return this.liveSocket.binding(t)}};var bS=class{constructor(t,e,i={}){if(this.unloaded=!1,!e||e.constructor.name==="Object")throw new Error(` a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example: import {Socket} from "phoenix" import {LiveSocket} from "phoenix_live_view" let liveSocket = new LiveSocket("/live", Socket, {...}) - `);this.socket=new e(t,i),this.bindingPrefix=i.bindingPrefix||x7,this.opts=i,this.params=ac(i.params||{}),this.viewLogger=i.viewLogger,this.metadataCallbacks=i.metadata||{},this.defaults=Object.assign(Th(w7),i.defaults||{}),this.activeElement=null,this.prevActive=null,this.silenced=!1,this.main=null,this.outgoingMainEl=null,this.clickStartedAtTarget=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=Th(window.location),this.hooks=i.hooks||{},this.uploaders=i.uploaders||{},this.loaderTimeout=i.loaderTimeout||b7,this.reloadWithJitterTimer=null,this.maxReloads=i.maxReloads||n7,this.reloadJitterMin=i.reloadJitterMin||o7,this.reloadJitterMax=i.reloadJitterMax||s7,this.failsafeJitter=i.failsafeJitter||a7,this.localStorage=i.localStorage||window.localStorage,this.sessionStorage=i.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.boundEventNames=new Set,this.serverCloseRef=null,this.domCallbacks=Object.assign({onPatchStart:ac(),onPatchEnd:ac(),onNodeAdded:ac(),onBeforeElUpdated:ac()},i.dom||{}),this.transitions=new J7,window.addEventListener("pagehide",r=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}version(){return"1.0.0-rc.5"}isProfileEnabled(){return this.sessionStorage.getItem(yg)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(bh)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(bh)==="false"}enableDebug(){this.sessionStorage.setItem(bh,"true")}enableProfiling(){this.sessionStorage.setItem(yg,"true")}disableDebug(){this.sessionStorage.setItem(bh,"false")}disableProfiling(){this.sessionStorage.removeItem(yg)}enableLatencySim(t){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(xg,t)}disableLatencySim(){this.sessionStorage.removeItem(xg)}getLatencySim(){let t=this.sessionStorage.getItem(xg);return t?parseInt(t):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let t=()=>{this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?t():document.addEventListener("DOMContentLoaded",()=>t())}disconnect(t){clearTimeout(this.reloadWithJitterTimer),this.serverCloseRef&&(this.socket.off(this.serverCloseRef),this.serverCloseRef=null),this.socket.disconnect(t)}replaceTransport(t){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(t),this.connect()}execJS(t,e,i=null){this.owner(t,r=>_r.exec(i,e,r,t))}execJSHookPush(t,e,i,r){this.withinOwners(t,n=>{_r.exec("hook",e,n,t,["push",{data:i,callback:r}])})}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(t,e){this.domCallbacks[t](...e)}time(t,e){if(!this.isProfileEnabled()||!console.time)return e();console.time(t);let i=e();return console.timeEnd(t),i}log(t,e,i){if(this.viewLogger){let[r,n]=i();this.viewLogger(t,e,r,n)}else if(this.isDebugEnabled()){let[r,n]=i();E7(t,e,r,n)}}requestDOMUpdate(t){this.transitions.after(t)}transition(t,e,i=function(){}){this.transitions.addTransition(t,e,i)}onChannel(t,e,i){t.on(e,r=>{let n=this.getLatencySim();n?setTimeout(()=>i(r),n):i(r)})}wrapPush(t,e,i){let r=this.getLatencySim(),n=t.joinCount;if(!r)return this.isConnected()&&e.timeout?i().receive("timeout",()=>{t.joinCount===n&&!t.isDestroyed()&&this.reloadWithJitter(t,()=>{this.log(t,"timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}):i();let o={receives:[],receive(s,a){this.receives.push([s,a])}};return setTimeout(()=>{t.isDestroyed()||o.receives.reduce((s,[a,l])=>s.receive(a,l),i())},r),o}reloadWithJitter(t,e){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let i=this.reloadJitterMin,r=this.reloadJitterMax,n=Math.floor(Math.random()*(r-i+1))+i,o=Kr.updateLocal(this.localStorage,window.location.pathname,cS,0,s=>s+1);o>this.maxReloads&&(n=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{t.isDestroyed()||t.isConnected()||(t.destroy(),e?e():this.log(t,"join",()=>[`encountered ${o} consecutive reloads`]),o>this.maxReloads&&this.log(t,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},n)}getHookCallbacks(t){return t&&t.startsWith("Phoenix.")?R7[t.split(".")[1]]:this.hooks[t]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(t){return`${this.getBindingPrefix()}${t}`}channel(t,e){return this.socket.channel(t,e)}joinDeadView(){let t=document.body;if(t&&!this.isPhxView(t)&&!this.isPhxView(document.firstElementChild)){let e=this.newRootView(t);e.setHref(this.getHref()),e.joinDead(),this.main||(this.main=e),window.requestAnimationFrame(()=>e.execNewMounted())}}joinRootViews(){let t=!1;return te.all(document,`${Ca}:not([${Os}])`,e=>{if(!this.getRootById(e.id)){let i=this.newRootView(e);i.setHref(this.getHref()),i.join(),e.hasAttribute(Cg)&&(this.main=i)}t=!0}),t}redirect(t,e){this.unload(),Kr.redirect(t,e)}replaceMain(t,e,i=null,r=this.setPendingLink(t)){let n=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let o=te.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(o,e,n),this.main.setRedirect(t),this.transitionRemoves(null,!0),this.main.join((s,a)=>{s===1&&this.commitPendingLink(r)&&this.requestDOMUpdate(()=>{te.findPhxSticky(document).forEach(l=>o.appendChild(l)),this.outgoingMainEl.replaceWith(o),this.outgoingMainEl=null,i&&i(r),a()})})}transitionRemoves(t,e){let i=this.binding("remove");if(t=t||te.all(document,`[${i}]`),e){let r=te.findPhxSticky(document)||[];t=t.filter(n=>!te.isChildOfAny(n,r))}t.forEach(r=>{for(let n of this.boundEventNames)r.addEventListener(n,o=>{o.preventDefault(),o.stopImmediatePropagation()},!0);this.execJS(r,r.getAttribute(i),"remove")})}isPhxView(t){return t.getAttribute&&t.getAttribute(Jr)!==null}newRootView(t,e,i){let r=new gS(t,this,null,e,i);return this.roots[r.id]=r,r}owner(t,e){let i=mo(t.closest(Ca),r=>this.getViewByEl(r))||this.main;i&&e(i)}withinOwners(t,e){this.owner(t,i=>e(i,t))}getViewByEl(t){let e=t.getAttribute(go);return mo(this.getRootById(e),i=>i.getDescendentByEl(t))}getRootById(t){return this.roots[t]}destroyAllViews(){for(let t in this.roots)this.roots[t].destroy(),delete this.roots[t];this.main=null}destroyViewByEl(t){let e=this.getRootById(t.getAttribute(go));e&&e.id===t.id?(e.destroy(),delete this.roots[e.id]):e&&e.destroyDescendent(t.id)}setActiveElement(t){if(this.activeElement===t)return;this.activeElement=t;let e=()=>{t===this.activeElement&&(this.activeElement=null),t.removeEventListener("mouseup",this),t.removeEventListener("touchend",this)};t.addEventListener("mouseup",e),t.addEventListener("touchend",e)}getActiveElement(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}dropActiveElement(t){this.prevActive&&t.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:t}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.serverCloseRef=this.socket.onClose(e=>{if(e&&e.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",e=>{e.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),t||this.bindNav(),this.bindClicks(),t||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(e,i,r,n,o,s)=>{let a=n.getAttribute(this.binding(m7)),l=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let c=H({key:e.key},this.eventMeta(i,e,n));_r.exec(i,o,r,n,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,i,r,n,o,s)=>{if(!s){let a=H({key:e.key},this.eventMeta(i,e,n));_r.exec(i,o,r,n,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(e,i,r,n,o,s)=>{if(s==="window"){let a=this.eventMeta(i,e,n);_r.exec(i,o,r,n,["push",{data:a}])}}),this.on("dragover",e=>e.preventDefault()),this.on("drop",e=>{e.preventDefault();let i=mo(hc(e.target,this.binding(Ik)),o=>o.getAttribute(this.binding(Ik))),r=i&&document.getElementById(i),n=Array.from(e.dataTransfer.files||[]);!r||r.disabled||n.length===0||!(r.files instanceof FileList)||(Nt.trackFiles(r,n,e.dataTransfer),r.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(uS,e=>{let i=e.target;if(!te.isUploadInput(i))return;let r=Array.from(e.detail.files||[]).filter(n=>n instanceof File||n instanceof Blob);Nt.trackFiles(i,r),i.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(t,e,i){let r=this.metadataCallbacks[t];return r?r(e,i):{}}setPendingLink(t){return this.linkRef++,this.pendingLink=t,this.linkRef}commitPendingLink(t){return this.linkRef!==t?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(t,e){for(let i in t){let r=t[i];this.on(r,n=>{let o=this.binding(i),s=this.binding(`window-${i}`),a=n.target.getAttribute&&n.target.getAttribute(o);a?this.debounce(n.target,n,r,()=>{this.withinOwners(n.target,l=>{e(n,i,l,n.target,a,null)})}):te.all(document,`[${s}]`,l=>{let c=l.getAttribute(s);this.debounce(l,n,r,()=>{this.withinOwners(l,u=>{e(n,i,u,l,c,"window")})})})})}}bindClicks(){this.on("mousedown",t=>this.clickStartedAtTarget=t.target),this.bindClick("click","click")}bindClick(t,e){let i=this.binding(e);window.addEventListener(t,r=>{let n=null;r.detail===0&&(this.clickStartedAtTarget=r.target);let o=this.clickStartedAtTarget||r.target;n=hc(o,i),this.dispatchClickAway(r,o),this.clickStartedAtTarget=null;let s=n&&n.getAttribute(i);if(!s){te.isNewPageClick(r,window.location)&&this.unload();return}n.getAttribute("href")==="#"&&r.preventDefault(),!n.hasAttribute(Ti)&&this.debounce(n,r,"click",()=>{this.withinOwners(n,a=>{_r.exec("click",s,a,n,["push",{data:this.eventMeta("click",r,n)}])})})},!1)}dispatchClickAway(t,e){let i=this.binding("click-away");te.all(document,`[${i}]`,r=>{r.isSameNode(e)||r.contains(e)||this.withinOwners(r,n=>{let o=r.getAttribute(i);_r.isVisible(r)&&_r.isInViewport(r)&&_r.exec("click",o,n,r,["push",{data:this.eventMeta("click",t,t.target)}])})})}bindNav(){if(!Kr.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let t=null;window.addEventListener("scroll",e=>{clearTimeout(t),t=setTimeout(()=>{Kr.updateCurrentState(i=>Object.assign(i,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",e=>{if(!this.registerNewLocation(window.location))return;let{type:i,id:r,root:n,scroll:o}=e.state||{},s=window.location.href;te.dispatchEvent(window,"phx:navigate",{detail:{href:s,patch:i==="patch",pop:!0}}),this.requestDOMUpdate(()=>{this.main.isConnected()&&i==="patch"&&r===this.main.id?this.main.pushLinkPatch(s,null,()=>{this.maybeScroll(o)}):this.replaceMain(s,null,()=>{n&&this.replaceRootHistory(),this.maybeScroll(o)})})},!1),window.addEventListener("click",e=>{let i=hc(e.target,pg),r=i&&i.getAttribute(pg);if(!r||!this.isConnected()||!this.main||te.wantsNewTab(e))return;let n=i.href instanceof SVGAnimatedString?i.href.baseVal:i.href,o=i.getAttribute(u7);e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==n&&this.requestDOMUpdate(()=>{if(r==="patch")this.pushHistoryPatch(n,o,i);else if(r==="redirect")this.historyRedirect(n,o);else throw new Error(`expected ${pg} to be "patch" or "redirect", got: ${r}`);let s=i.getAttribute(this.binding("click"));s&&this.requestDOMUpdate(()=>this.execJS(i,s,"click"))})},!1)}maybeScroll(t){typeof t=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,t)})}dispatchEvent(t,e={}){te.dispatchEvent(window,`phx:${t}`,{detail:e})}dispatchEvents(t){t.forEach(([e,i])=>this.dispatchEvent(e,i))}withPageLoading(t,e){te.dispatchEvent(window,"phx:page-loading-start",{detail:t});let i=()=>te.dispatchEvent(window,"phx:page-loading-stop",{detail:t});return e?e(i):i}pushHistoryPatch(t,e,i){if(!this.isConnected()||!this.main.isMain())return Kr.redirect(t);this.withPageLoading({to:t,kind:"patch"},r=>{this.main.pushLinkPatch(t,i,n=>{this.historyPatch(t,e,n),r()})})}historyPatch(t,e,i=this.setPendingLink(t)){this.commitPendingLink(i)&&(Kr.pushState(e,{type:"patch",id:this.main.id},t),te.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:t,pop:!1}}),this.registerNewLocation(window.location))}historyRedirect(t,e,i){if(!this.isConnected()||!this.main.isMain())return Kr.redirect(t,i);if(/^\/$|^\/[^\/]+.*$/.test(t)){let{protocol:n,host:o}=window.location;t=`${n}//${o}${t}`}let r=window.scrollY;this.withPageLoading({to:t,kind:"redirect"},n=>{this.replaceMain(t,i,o=>{o===this.linkRef&&(Kr.pushState(e,{type:"redirect",id:this.main.id,scroll:r},t),te.dispatchEvent(window,"phx:navigate",{detail:{href:t,patch:!1,pop:!1}}),this.registerNewLocation(window.location)),n()})})}replaceRootHistory(){Kr.pushState("replace",{root:!0,type:"patch",id:this.main.id})}registerNewLocation(t){let{pathname:e,search:i}=this.currentLocation;return e+i===t.pathname+t.search?!1:(this.currentLocation=Th(t),!0)}bindForms(){let t=0,e=!1;this.on("submit",i=>{let r=i.target.getAttribute(this.binding("submit")),n=i.target.getAttribute(this.binding("change"));!e&&n&&!r&&(e=!0,i.preventDefault(),this.withinOwners(i.target,o=>{o.disableForm(i.target),window.requestAnimationFrame(()=>{te.isUnloadableFormSubmit(i)&&this.unload(),i.target.submit()})}))}),this.on("submit",i=>{let r=i.target.getAttribute(this.binding("submit"));if(!r){te.isUnloadableFormSubmit(i)&&this.unload();return}i.preventDefault(),i.target.disabled=!0,this.withinOwners(i.target,n=>{_r.exec("submit",r,n,i.target,["push",{submitter:i.submitter}])})});for(let i of["change","input"])this.on(i,r=>{let n=this.binding("change"),o=r.target,s=o.getAttribute(n),a=o.form&&o.form.getAttribute(n),l=s||a;if(!l||o.type==="number"&&o.validity&&o.validity.badInput)return;let c=s?o:o.form,u=t;t++;let{at:f,type:d}=te.private(o,"prev-iteration")||{};f===u-1&&i==="change"&&d==="input"||(te.putPrivate(o,"prev-iteration",{at:u,type:i}),this.debounce(o,r,i,()=>{this.withinOwners(c,p=>{te.putPrivate(o,Eh,!0),te.isTextualInput(o)||this.setActiveElement(o),_r.exec("change",l,p,o,["push",{_target:r.target.name,dispatcher:c}])})}))});this.on("reset",i=>{let r=i.target;te.resetForm(r);let n=Array.from(r.elements).find(o=>o.type==="reset");n&&window.requestAnimationFrame(()=>{n.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(t,e,i,r){if(i==="blur"||i==="focusout")return r();let n=this.binding(p7),o=this.binding(O7),s=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(t,l=>{let c=()=>!l.isDestroyed()&&document.body.contains(t);te.debounce(t,e,n,s,o,a,c,()=>{r()})})}silenceEvents(t){this.silenced=!0,t(),this.silenced=!1}on(t,e){this.boundEventNames.add(t),window.addEventListener(t,i=>{this.silenced||e(i)})}},J7=class{constructor(){this.transitions=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(t=>{clearTimeout(t),this.transitions.delete(t)}),this.flushPendingOps()}after(t){this.size()===0?t():this.pushPendingOp(t)}addTransition(t,e,i){e();let r=setTimeout(()=>{this.transitions.delete(r),i(),this.flushPendingOps()},t);this.transitions.add(r)}pushPendingOp(t){this.pendingOps.push(t)}size(){return this.transitions.size}flushPendingOps(){if(this.size()>0)return;let t=this.pendingOps.shift();t&&(t(),this.flushPendingOps())}};var yS="livebook:";function ms(t){try{let e=localStorage.getItem(yS+t);if(e)return JSON.parse(e)}catch(e){console.error(`Failed to load from local storage, reason: ${e.message}`)}}function Pa(t,e){try{let i=JSON.stringify(e);localStorage.setItem(yS+t,i)}catch(i){console.error(`Failed to write to local storage, reason: ${i.message}`)}}var xS="app_auth_token:";function vS(t,e){Pa(xS+t,e)}function wS(){let t=window.location.pathname;if(t.startsWith("/apps/")){let e=t.split("/")[2],i=ms(xS+e);if(i)return i}return null}var e8={mounted(){this.handleEvent("persist_app_auth",({slug:t,token:e})=>{vS(t,e),this.pushEvent("app_auth_persisted")})}},kS=e8;function ht(t,e){let i={};for(let r of e){let n=`data-p-${r}`;if(!t.hasAttribute(n))throw new Error(`Missing attribute "${n}" on element <${t.tagName}:${t.id}>`);let o=t.getAttribute(n);i[t8(r)]=JSON.parse(o)}return i}function t8(t){let[e,...i]=t.split("-");return[e,...i.map(r=>r.charAt(0).toUpperCase()+r.slice(1))].join("")}function SS(t,e,i){let n=new ArrayBuffer(44+t.byteLength),o=new DataView(n),s=t.byteLength/4,a=4,l=e*a,c=i*l,u=s*l,f=0;function d(w){o.setUint32(f,w,!1),f+=4}function p(w){o.setUint32(f,w,!0),f+=4}function g(w){o.setUint16(f,w,!0),f+=2}function x(w){o.setFloat32(f,w,!0),f+=4}d(1380533830),p(36+u),d(1463899717),d(1718449184),p(16),g(3),g(e),p(i),p(c),g(l),g(a*8),d(1684108385),p(u);let S=new Float32Array(t);for(let w=0;w{this.inputEl.click()}),this.inputEl.addEventListener("change",t=>{let[e]=t.target.files;e&&this.loadFile(e)}),this.el.addEventListener("dragover",t=>{t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"}),this.el.addEventListener("drop",t=>{t.stopPropagation(),t.preventDefault();let[e]=t.dataTransfer.files;e&&!this.isRecording()&&this.loadFile(e)}),this.el.addEventListener("dragenter",t=>{this.el.classList.add(...Qg)}),this.el.addEventListener("dragleave",t=>{this.el.contains(t.relatedTarget)||this.el.classList.remove(...Qg)}),this.el.addEventListener("drop",t=>{this.el.classList.remove(...Qg)}),this.recordButton.addEventListener("click",t=>{this.startRecording()}),this.stopButton.addEventListener("click",t=>{this.stopRecording()}),this.cancelButton.addEventListener("click",t=>{this.stopRecording(!1)})},updated(){this.props=this.getProps(),this.audioEl.src=this.props.audioUrl},getProps(){return ht(this.el,["id","phx-target","sampling-rate","endianness","format","audio-url"])},startRecording(){this.audioEl.classList.add("hidden"),this.uploadButton.classList.add("hidden"),this.recordButton.classList.add("hidden"),this.stopButton.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.audioChunks=[],navigator.mediaDevices.getUserMedia({audio:!0}).then(t=>{this.mediaRecorder=new MediaRecorder(t),this.mediaRecorder.addEventListener("dataavailable",e=>{this.audioChunks.push(e.data)}),this.mediaRecorder.start()})},stopRecording(t=!0){this.audioEl.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),this.recordButton.classList.remove("hidden"),this.stopButton.classList.add("hidden"),this.cancelButton.classList.add("hidden"),t&&this.mediaRecorder.addEventListener("stop",e=>{new Blob(this.audioChunks).arrayBuffer().then(r=>{this.loadEncodedAudio(r)})}),this.mediaRecorder.stop()},isRecording(){return this.mediaRecorder&&this.mediaRecorder.state==="recording"},loadFile(t){let e=new FileReader;e.onload=i=>{this.loadEncodedAudio(i.target.result)},e.readAsArrayBuffer(t)},loadEncodedAudio(t){this.pushEventTo(this.props.phxTarget,"decoding",{}),new AudioContext({sampleRate:this.props.samplingRate}).decodeAudioData(t,i=>{let r=r8(i);this.pushAudio(r)})},pushAudio(t){let e={num_channels:t.numChannels,sampling_rate:t.samplingRate},i=this.encodeAudio(t),r=new Blob([i]);r.meta=()=>e,this.uploadTo(this.props.phxTarget,"file",[r])},encodeAudio(t){if(this.props.format==="pcm_f32")return n8(t.data,this.props.endianness);if(this.props.format==="wav")return SS(t.data,t.numChannels,t.samplingRate)}};function r8(t){let e=t.numberOfChannels,i=t.sampleRate,r=t.length,n=4*e*r,o=new ArrayBuffer(n),s=new Float32Array(o);for(let a=0;a=0;l--)r=i[l],n=r.name,o=r.namespaceURI,s=r.value,o?(n=r.localName||n,a=t.getAttributeNS(o,n),a!==s&&(r.prefix==="xmlns"&&(n=r.name),t.setAttributeNS(o,n,s))):(a=t.getAttribute(n),a!==s&&t.setAttribute(n,s));for(var c=t.attributes,u=c.length-1;u>=0;u--)r=c[u],n=r.name,o=r.namespaceURI,o?(n=r.localName||n,e.hasAttributeNS(o,n)||t.removeAttributeNS(o,n)):e.hasAttribute(n)||t.removeAttribute(n)}}var Ch,a8="http://www.w3.org/1999/xhtml",Ii=typeof document=="undefined"?void 0:document,l8=!!Ii&&"content"in Ii.createElement("template"),c8=!!Ii&&Ii.createRange&&"createContextualFragment"in Ii.createRange();function u8(t){var e=Ii.createElement("template");return e.innerHTML=t,e.content.childNodes[0]}function f8(t){Ch||(Ch=Ii.createRange(),Ch.selectNode(Ii.body));var e=Ch.createContextualFragment(t);return e.childNodes[0]}function h8(t){var e=Ii.createElement("body");return e.innerHTML=t,e.childNodes[0]}function d8(t){return t=t.trim(),l8?u8(t):c8?f8(t):h8(t)}function Ph(t,e){var i=t.nodeName,r=e.nodeName,n,o;return i===r?!0:(n=i.charCodeAt(0),o=r.charCodeAt(0),n<=90&&o>=97?i===r.toUpperCase():o<=90&&n>=97?r===i.toUpperCase():!1)}function p8(t,e){return!e||e===a8?Ii.createElement(t):Ii.createElementNS(e,t)}function O8(t,e){for(var i=t.firstChild;i;){var r=i.nextSibling;e.appendChild(i),i=r}return e}function Ag(t,e,i){t[i]!==e[i]&&(t[i]=e[i],t[i]?t.setAttribute(i,""):t.removeAttribute(i))}var _S={OPTION:function(t,e){var i=t.parentNode;if(i){var r=i.nodeName.toUpperCase();r==="OPTGROUP"&&(i=i.parentNode,r=i&&i.nodeName.toUpperCase()),r==="SELECT"&&!i.hasAttribute("multiple")&&(t.hasAttribute("selected")&&!e.selected&&(t.setAttribute("selected","selected"),t.removeAttribute("selected")),i.selectedIndex=-1)}Ag(t,e,"selected")},INPUT:function(t,e){Ag(t,e,"checked"),Ag(t,e,"disabled"),t.value!==e.value&&(t.value=e.value),e.hasAttribute("value")||t.removeAttribute("value")},TEXTAREA:function(t,e){var i=e.value;t.value!==i&&(t.value=i);var r=t.firstChild;if(r){var n=r.nodeValue;if(n==i||!i&&n==t.placeholder)return;r.nodeValue=i}},SELECT:function(t,e){if(!e.hasAttribute("multiple")){for(var i=-1,r=0,n=t.firstChild,o,s;n;)if(s=n.nodeName&&n.nodeName.toUpperCase(),s==="OPTGROUP")o=n,n=o.firstChild;else{if(s==="OPTION"){if(n.hasAttribute("selected")){i=r;break}r++}n=n.nextSibling,!n&&o&&(n=o.nextSibling,o=null)}t.selectedIndex=i}}},Oc=1,QS=11,AS=3,$S=8;function bo(){}function m8(t){if(t)return t.getAttribute&&t.getAttribute("id")||t.id}function g8(t){return function(i,r,n){if(n||(n={}),typeof r=="string")if(i.nodeName==="#document"||i.nodeName==="HTML"||i.nodeName==="BODY"){var o=r;r=Ii.createElement("html"),r.innerHTML=o}else r=d8(r);else r.nodeType===QS&&(r=r.firstElementChild);var s=n.getNodeKey||m8,a=n.onBeforeNodeAdded||bo,l=n.onNodeAdded||bo,c=n.onBeforeElUpdated||bo,u=n.onElUpdated||bo,f=n.onBeforeNodeDiscarded||bo,d=n.onNodeDiscarded||bo,p=n.onBeforeElChildrenUpdated||bo,g=n.skipFromChildren||bo,x=n.addChild||function(j,ae){return j.appendChild(ae)},S=n.childrenOnly===!0,w=Object.create(null),T=[];function $(j){T.push(j)}function I(j,ae){if(j.nodeType===Oc)for(var V=j.firstChild;V;){var E=void 0;ae&&(E=s(V))?$(E):(d(V),V.firstChild&&I(V,ae)),V=V.nextSibling}}function _(j,ae,V){f(j)!==!1&&(ae&&ae.removeChild(j),d(j),I(j,V))}function A(j){if(j.nodeType===Oc||j.nodeType===QS)for(var ae=j.firstChild;ae;){var V=s(ae);V&&(w[V]=ae),A(ae),ae=ae.nextSibling}}A(i);function q(j){l(j);for(var ae=j.firstChild;ae;){var V=ae.nextSibling,E=s(ae);if(E){var B=w[E];B&&Ph(ae,B)?(ae.parentNode.replaceChild(B,ae),F(B,ae)):q(ae)}else q(ae);ae=V}}function le(j,ae,V){for(;ae;){var E=ae.nextSibling;(V=s(ae))?$(V):_(ae,j,!0),ae=E}}function F(j,ae,V){var E=s(ae);E&&delete w[E],!(!V&&(c(j,ae)===!1||(t(j,ae),u(j),p(j,ae)===!1)))&&(j.nodeName!=="TEXTAREA"?U(j,ae):_S.TEXTAREA(j,ae))}function U(j,ae){var V=g(j,ae),E=ae.firstChild,B=j.firstChild,ne,D,Ue,Ze,Ve;e:for(;E;){for(Ze=E.nextSibling,ne=s(E);!V&&B;){if(Ue=B.nextSibling,E.isSameNode&&E.isSameNode(B)){E=Ze,B=Ue;continue e}D=s(B);var Rt=B.nodeType,Xe=void 0;if(Rt===E.nodeType&&(Rt===Oc?(ne?ne!==D&&((Ve=w[ne])?Ue===Ve?Xe=!1:(j.insertBefore(Ve,B),D?$(D):_(B,j,!0),B=Ve,D=s(B)):Xe=!1):D&&(Xe=!1),Xe=Xe!==!1&&Ph(B,E),Xe&&F(B,E)):(Rt===AS||Rt==$S)&&(Xe=!0,B.nodeValue!==E.nodeValue&&(B.nodeValue=E.nodeValue))),Xe){E=Ze,B=Ue;continue e}D?$(D):_(B,j,!0),B=Ue}if(ne&&(Ve=w[ne])&&Ph(Ve,E))V||x(j,Ve),F(Ve,E);else{var Qt=a(E);Qt!==!1&&(Qt&&(E=Qt),E.actualize&&(E=E.actualize(j.ownerDocument||Ii)),x(j,E),q(E))}E=Ze,B=Ue}le(j,B,D);var At=_S[j.nodeName];At&&At(j,ae)}var ie=i,ue=ie.nodeType,re=r.nodeType;if(!S){if(ue===Oc)re===Oc?Ph(i,r)||(d(i),ie=O8(i,p8(r.nodeName,r.namespaceURI))):ie=r;else if(ue===AS||ue===$S){if(re===ue)return ie.nodeValue!==r.nodeValue&&(ie.nodeValue=r.nodeValue),ie;ie=r}}if(ie===r)d(i);else{if(r.isSameNode&&r.isSameNode(ie))return;if(F(ie,r,S),T)for(var de=0,me=T.length;des.length,l;a&&s.push(n);try{l=t.apply(this,s)}catch(c){let u=c;if(a&&i)throw u;return n(u)}a||(l instanceof Promise?l.then(o,n):l instanceof Error?n(l):o(l))}function n(s,...a){i||(i=!0,e(s,...a))}function o(s){n(null,s)}}function Rg(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?WS(t.position):"start"in t||"end"in t?WS(t):"line"in t||"column"in t?Xg(t):""}function Xg(t){return BS(t&&t.line)+":"+BS(t&&t.column)}function WS(t){return Xg(t&&t.start)+"-"+Xg(t&&t.end)}function BS(t){return t&&typeof t=="number"?t:1}var Ut=class extends Error{constructor(e,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let n="",o={},s=!1;if(i&&("line"in i&&"column"in i?o={place:i}:"start"in i&&"end"in i?o={place:i}:"type"in i?o={ancestors:[i],place:i.position}:o=H({},i)),typeof e=="string"?n=e:!o.cause&&e&&(s=!0,n=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof r=="string"){let l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){let l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}let a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=a?a.line:void 0,this.name=Rg(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}};Ut.prototype.file="";Ut.prototype.name="";Ut.prototype.reason="";Ut.prototype.message="";Ut.prototype.stack="";Ut.prototype.column=void 0;Ut.prototype.line=void 0;Ut.prototype.ancestors=void 0;Ut.prototype.cause=void 0;Ut.prototype.fatal=void 0;Ut.prototype.place=void 0;Ut.prototype.ruleId=void 0;Ut.prototype.source=void 0;var Qr={basename:x8,dirname:v8,extname:w8,join:k8,sep:"/"};function x8(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');gc(t);let i=0,r=-1,n=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;n--;)if(t.codePointAt(n)===47){if(o){i=n+1;break}}else r<0&&(o=!0,r=n+1);return r<0?"":t.slice(i,r)}if(e===t)return"";let s=-1,a=e.length-1;for(;n--;)if(t.codePointAt(n)===47){if(o){i=n+1;break}}else s<0&&(o=!0,s=n+1),a>-1&&(t.codePointAt(n)===e.codePointAt(a--)?a<0&&(r=n):(a=-1,r=s));return i===r?r=s:r<0&&(r=t.length),t.slice(i,r)}function v8(t){if(gc(t),t.length===0)return".";let e=-1,i=t.length,r;for(;--i;)if(t.codePointAt(i)===47){if(r){e=i;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function w8(t){gc(t);let e=t.length,i=-1,r=0,n=-1,o=0,s;for(;e--;){let a=t.codePointAt(e);if(a===47){if(s){r=e+1;break}continue}i<0&&(s=!0,i=e+1),a===46?n<0?n=e:o!==1&&(o=1):n>-1&&(o=-1)}return n<0||i<0||o===0||o===1&&n===i-1&&n===r+1?"":t.slice(n,i)}function k8(...t){let e=-1,i;for(;++e0&&t.codePointAt(t.length-1)===47&&(i+="/"),e?"/"+i:i}function T8(t,e){let i="",r=0,n=-1,o=0,s=-1,a,l;for(;++s<=t.length;){if(s2){if(l=i.lastIndexOf("/"),l!==i.length-1){l<0?(i="",r=0):(i=i.slice(0,l),r=i.length-1-i.lastIndexOf("/")),n=s,o=0;continue}}else if(i.length>0){i="",r=0,n=s,o=0;continue}}e&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+t.slice(n+1,s):i=t.slice(n+1,s),r=s-n-1;n=s,o=0}else a===46&&o>-1?o++:o=-1}return i}function gc(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}var ZS={cwd:E8};function E8(){return"/"}function _a(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function VS(t){if(typeof t=="string")t=new URL(t);else if(!_a(t)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return C8(t)}function C8(t){if(t.hostname!==""){let r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}let e=t.pathname,i=-1;for(;++i0){let[p,...g]=u,x=r[d][1];mc(x)&&mc(p)&&(p=(0,Ah.default)(!0,x,p)),r[d]=[c,p,...g]}}}},$h=new zg().freeze();function Mg(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Ng(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Ug(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function HS(t){if(!mc(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function GS(t,e,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Qh(t){return Q8(t)?t:new yo(t)}function Q8(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function A8(t){return typeof t=="string"||$8(t)}function $8(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var X8={};function jg(t,e){let i=e||X8,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,n=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return JS(t,r,n)}function JS(t,e,i){if(R8(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return KS(t.children,e,i)}return Array.isArray(t)?KS(t,e,i):""}function KS(t,e,i){let r=[],n=-1;for(;++nn?0:n+e:e=e>n?n:e,i=i>0?i:0,r.length<1e4)s=Array.from(r),s.unshift(e,i),t.splice(...s);else for(i&&t.splice(e,i);o0?(oi(t,t.length,0,e),t):e}var eT={}.hasOwnProperty;function tT(t){let e={},i=-1;for(;++i13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"\uFFFD":String.fromCharCode(i)}function Pn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var D8=xo(new RegExp("\\p{P}","u")),Hi=xo(/[A-Za-z]/),Ci=xo(/[\dA-Za-z]/),iT=xo(/[#-'*+\--9=?A-Z^-~]/);function bc(t){return t!==null&&(t<32||t===127)}var yc=xo(/\d/),rT=xo(/[\dA-Fa-f]/),qg=xo(/[!-/:-@[-`{-~]/);function Te(t){return t!==null&&t<-2}function It(t){return t!==null&&(t<0||t===32)}function Le(t){return t===-2||t===-1||t===32}function nT(t){return qg(t)||D8(t)}var oT=xo(/\s/);function xo(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Ie(t,e,i,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Le(l)?(t.enter(i),a(l)):e(l)}function a(l){return Le(l)&&o++s))return;let q=e.events.length,le=q,F,U;for(;le--;)if(e.events[le][0]==="exit"&&e.events[le][1].type==="chunkFlow"){if(F){U=e.events[le][1].end;break}F=!0}for(w(r),A=q;A$;){let _=i[I];e.containerState=_[1],_[0].exit.call(e,t)}i.length=$}function T(){n.write([null]),o=void 0,n=void 0,e.containerState._closeFlow=void 0}}function U8(t,e,i){return Ie(t,t.attempt(this.parser.constructs.document,e,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Wg(t){if(t===null||It(t)||oT(t))return 1;if(nT(t))return 2}function Qa(t,e,i){let r=[],n=-1;for(;++n1&&t[i][1].end.offset-t[i][1].start.offset>1?2:1;let f=Object.assign({},t[r][1].end),d=Object.assign({},t[i][1].start);cT(f,-l),cT(d,l),s={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},t[r][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[i][1].start),end:d},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[r][1].end),end:Object.assign({},t[i][1].start)},n={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},t[r][1].end=Object.assign({},s.start),t[i][1].start=Object.assign({},a.end),c=[],t[r][1].end.offset-t[r][1].start.offset&&(c=Ei(c,[["enter",t[r][1],e],["exit",t[r][1],e]])),c=Ei(c,[["enter",n,e],["enter",s,e],["exit",s,e],["enter",o,e]]),c=Ei(c,Qa(e.parser.constructs.insideSpan.null,t.slice(r+1,i),e)),c=Ei(c,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",n,e]]),t[i][1].end.offset-t[i][1].start.offset?(u=2,c=Ei(c,[["enter",t[i][1],e],["exit",t[i][1],e]])):u=0,oi(t,r-1,i-r+3,c),i=r+c.length-u-2;break}}for(i=-1;++i0&&Le(A)?Ie(t,T,"linePrefix",o+1)(A):T(A)}function T(A){return A===null||Te(A)?t.check(uT,x,I)(A):(t.enter("codeFlowValue"),$(A))}function $(A){return A===null||Te(A)?(t.exit("codeFlowValue"),T(A)):(t.consume(A),$)}function I(A){return t.exit("codeFenced"),e(A)}function _(A,q,le){let F=0;return U;function U(me){return A.enter("lineEnding"),A.consume(me),A.exit("lineEnding"),ie}function ie(me){return A.enter("codeFencedFence"),Le(me)?Ie(A,ue,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(me):ue(me)}function ue(me){return me===a?(A.enter("codeFencedFenceSequence"),re(me)):le(me)}function re(me){return me===a?(F++,A.consume(me),re):F>=s?(A.exit("codeFencedFenceSequence"),Le(me)?Ie(A,de,"whitespace")(me):de(me)):le(me)}function de(me){return me===null||Te(me)?(A.exit("codeFencedFence"),q(me)):le(me)}}}function G8(t,e,i){let r=this;return n;function n(s){return s===null?i(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?i(s):e(s)}}var vc={name:"codeIndented",tokenize:J8},K8={tokenize:eD,partial:!0};function J8(t,e,i){let r=this;return n;function n(c){return t.enter("codeIndented"),Ie(t,o,"linePrefix",5)(c)}function o(c){let u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):i(c)}function s(c){return c===null?l(c):Te(c)?t.attempt(K8,s,l)(c):(t.enter("codeFlowValue"),a(c))}function a(c){return c===null||Te(c)?(t.exit("codeFlowValue"),s(c)):(t.consume(c),a)}function l(c){return t.exit("codeIndented"),e(c)}}function eD(t,e,i){let r=this;return n;function n(s){return r.parser.lazy[r.now().line]?i(s):Te(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),n):Ie(t,o,"linePrefix",5)(s)}function o(s){let a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):Te(s)?n(s):i(s)}}var Zg={name:"codeText",tokenize:rD,resolve:tD,previous:iD};function tD(t){let e=t.length-4,i=3,r,n;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=i;++r=4?e(s):t.interrupt(r.parser.constructs.flow,i,e)(s)}}function Nh(t,e,i,r,n,o,s,a,l){let c=l||Number.POSITIVE_INFINITY,u=0;return f;function f(w){return w===60?(t.enter(r),t.enter(n),t.enter(o),t.consume(w),t.exit(o),d):w===null||w===32||w===41||bc(w)?i(w):(t.enter(r),t.enter(s),t.enter(a),t.enter("chunkString",{contentType:"string"}),x(w))}function d(w){return w===62?(t.enter(o),t.consume(w),t.exit(o),t.exit(n),t.exit(r),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===62?(t.exit("chunkString"),t.exit(a),d(w)):w===null||w===60||Te(w)?i(w):(t.consume(w),w===92?g:p)}function g(w){return w===60||w===62||w===92?(t.consume(w),p):p(w)}function x(w){return!u&&(w===null||w===41||It(w))?(t.exit("chunkString"),t.exit(a),t.exit(s),t.exit(r),e(w)):u999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?i(p):p===93?(t.exit(o),t.enter(n),t.consume(p),t.exit(n),t.exit(r),e):Te(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||Te(p)||a++>999?(t.exit("chunkString"),u(p)):(t.consume(p),l||(l=!Le(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(t.consume(p),a++,f):f(p)}}function zh(t,e,i,r,n,o){let s;return a;function a(d){return d===34||d===39||d===40?(t.enter(r),t.enter(n),t.consume(d),t.exit(n),s=d===40?41:d,l):i(d)}function l(d){return d===s?(t.enter(n),t.consume(d),t.exit(n),t.exit(r),e):(t.enter(o),c(d))}function c(d){return d===s?(t.exit(o),l(s)):d===null?i(d):Te(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Ie(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===s||d===null||Te(d)?(t.exit("chunkString"),c(d)):(t.consume(d),d===92?f:u)}function f(d){return d===s||d===92?(t.consume(d),u):u(d)}}function gs(t,e){let i;return r;function r(n){return Te(n)?(t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),i=!0,r):Le(n)?Ie(t,r,i?"linePrefix":"lineSuffix")(n):e(n)}}var Yg={name:"definition",tokenize:uD},cD={tokenize:fD,partial:!0};function uD(t,e,i){let r=this,n;return o;function o(p){return t.enter("definition"),s(p)}function s(p){return Uh.call(r,t,a,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return n=Pn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),l):i(p)}function l(p){return It(p)?gs(t,c)(p):c(p)}function c(p){return Nh(t,u,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return t.attempt(cD,f,f)(p)}function f(p){return Le(p)?Ie(t,d,"whitespace")(p):d(p)}function d(p){return p===null||Te(p)?(t.exit("definition"),r.parser.defined.push(n),e(p)):i(p)}}function fD(t,e,i){return r;function r(a){return It(a)?gs(t,n)(a):i(a)}function n(a){return zh(t,o,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Le(a)?Ie(t,s,"whitespace")(a):s(a)}function s(a){return a===null||Te(a)?e(a):i(a)}}var Fg={name:"hardBreakEscape",tokenize:hD};function hD(t,e,i){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),n}function n(o){return Te(o)?(t.exit("hardBreakEscape"),e(o)):i(o)}}var Hg={name:"headingAtx",tokenize:pD,resolve:dD};function dD(t,e){let i=t.length-2,r=3,n,o;return t[r][1].type==="whitespace"&&(r+=2),i-2>r&&t[i][1].type==="whitespace"&&(i-=2),t[i][1].type==="atxHeadingSequence"&&(r===i-1||i-4>r&&t[i-2][1].type==="whitespace")&&(i-=r+1===i?2:4),i>r&&(n={type:"atxHeadingText",start:t[r][1].start,end:t[i][1].end},o={type:"chunkText",start:t[r][1].start,end:t[i][1].end,contentType:"text"},oi(t,r,i-r+1,[["enter",n,e],["enter",o,e],["exit",o,e],["exit",n,e]])),t}function pD(t,e,i){let r=0;return n;function n(u){return t.enter("atxHeading"),o(u)}function o(u){return t.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&r++<6?(t.consume(u),s):u===null||It(u)?(t.exit("atxHeadingSequence"),a(u)):i(u)}function a(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||Te(u)?(t.exit("atxHeading"),e(u)):Le(u)?Ie(t,a,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||It(u)?(t.exit("atxHeadingText"),a(u)):(t.consume(u),c)}}var fT=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gg=["pre","script","style","textarea"];var Kg={name:"htmlFlow",tokenize:bD,resolveTo:gD,concrete:!0},OD={tokenize:xD,partial:!0},mD={tokenize:yD,partial:!0};function gD(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function bD(t,e,i){let r=this,n,o,s,a,l;return c;function c(D){return u(D)}function u(D){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(D),f}function f(D){return D===33?(t.consume(D),d):D===47?(t.consume(D),o=!0,x):D===63?(t.consume(D),n=3,r.interrupt?e:E):Hi(D)?(t.consume(D),s=String.fromCharCode(D),S):i(D)}function d(D){return D===45?(t.consume(D),n=2,p):D===91?(t.consume(D),n=5,a=0,g):Hi(D)?(t.consume(D),n=4,r.interrupt?e:E):i(D)}function p(D){return D===45?(t.consume(D),r.interrupt?e:E):i(D)}function g(D){let Ue="CDATA[";return D===Ue.charCodeAt(a++)?(t.consume(D),a===Ue.length?r.interrupt?e:ue:g):i(D)}function x(D){return Hi(D)?(t.consume(D),s=String.fromCharCode(D),S):i(D)}function S(D){if(D===null||D===47||D===62||It(D)){let Ue=D===47,Ze=s.toLowerCase();return!Ue&&!o&&Gg.includes(Ze)?(n=1,r.interrupt?e(D):ue(D)):fT.includes(s.toLowerCase())?(n=6,Ue?(t.consume(D),w):r.interrupt?e(D):ue(D)):(n=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(D):o?T(D):$(D))}return D===45||Ci(D)?(t.consume(D),s+=String.fromCharCode(D),S):i(D)}function w(D){return D===62?(t.consume(D),r.interrupt?e:ue):i(D)}function T(D){return Le(D)?(t.consume(D),T):U(D)}function $(D){return D===47?(t.consume(D),U):D===58||D===95||Hi(D)?(t.consume(D),I):Le(D)?(t.consume(D),$):U(D)}function I(D){return D===45||D===46||D===58||D===95||Ci(D)?(t.consume(D),I):_(D)}function _(D){return D===61?(t.consume(D),A):Le(D)?(t.consume(D),_):$(D)}function A(D){return D===null||D===60||D===61||D===62||D===96?i(D):D===34||D===39?(t.consume(D),l=D,q):Le(D)?(t.consume(D),A):le(D)}function q(D){return D===l?(t.consume(D),l=null,F):D===null||Te(D)?i(D):(t.consume(D),q)}function le(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||It(D)?_(D):(t.consume(D),le)}function F(D){return D===47||D===62||Le(D)?$(D):i(D)}function U(D){return D===62?(t.consume(D),ie):i(D)}function ie(D){return D===null||Te(D)?ue(D):Le(D)?(t.consume(D),ie):i(D)}function ue(D){return D===45&&n===2?(t.consume(D),we):D===60&&n===1?(t.consume(D),j):D===62&&n===4?(t.consume(D),B):D===63&&n===3?(t.consume(D),E):D===93&&n===5?(t.consume(D),V):Te(D)&&(n===6||n===7)?(t.exit("htmlFlowData"),t.check(OD,ne,re)(D)):D===null||Te(D)?(t.exit("htmlFlowData"),re(D)):(t.consume(D),ue)}function re(D){return t.check(mD,de,ne)(D)}function de(D){return t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),me}function me(D){return D===null||Te(D)?re(D):(t.enter("htmlFlowData"),ue(D))}function we(D){return D===45?(t.consume(D),E):ue(D)}function j(D){return D===47?(t.consume(D),s="",ae):ue(D)}function ae(D){if(D===62){let Ue=s.toLowerCase();return Gg.includes(Ue)?(t.consume(D),B):ue(D)}return Hi(D)&&s.length<8?(t.consume(D),s+=String.fromCharCode(D),ae):ue(D)}function V(D){return D===93?(t.consume(D),E):ue(D)}function E(D){return D===62?(t.consume(D),B):D===45&&n===2?(t.consume(D),E):ue(D)}function B(D){return D===null||Te(D)?(t.exit("htmlFlowData"),ne(D)):(t.consume(D),B)}function ne(D){return t.exit("htmlFlow"),e(D)}}function yD(t,e,i){let r=this;return n;function n(s){return Te(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):i(s)}function o(s){return r.parser.lazy[r.now().line]?i(s):e(s)}}function xD(t,e,i){return r;function r(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),t.attempt(vo,e,i)}}var Jg={name:"htmlText",tokenize:vD};function vD(t,e,i){let r=this,n,o,s;return a;function a(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),l}function l(E){return E===33?(t.consume(E),c):E===47?(t.consume(E),_):E===63?(t.consume(E),$):Hi(E)?(t.consume(E),le):i(E)}function c(E){return E===45?(t.consume(E),u):E===91?(t.consume(E),o=0,g):Hi(E)?(t.consume(E),T):i(E)}function u(E){return E===45?(t.consume(E),p):i(E)}function f(E){return E===null?i(E):E===45?(t.consume(E),d):Te(E)?(s=f,j(E)):(t.consume(E),f)}function d(E){return E===45?(t.consume(E),p):f(E)}function p(E){return E===62?we(E):E===45?d(E):f(E)}function g(E){let B="CDATA[";return E===B.charCodeAt(o++)?(t.consume(E),o===B.length?x:g):i(E)}function x(E){return E===null?i(E):E===93?(t.consume(E),S):Te(E)?(s=x,j(E)):(t.consume(E),x)}function S(E){return E===93?(t.consume(E),w):x(E)}function w(E){return E===62?we(E):E===93?(t.consume(E),w):x(E)}function T(E){return E===null||E===62?we(E):Te(E)?(s=T,j(E)):(t.consume(E),T)}function $(E){return E===null?i(E):E===63?(t.consume(E),I):Te(E)?(s=$,j(E)):(t.consume(E),$)}function I(E){return E===62?we(E):$(E)}function _(E){return Hi(E)?(t.consume(E),A):i(E)}function A(E){return E===45||Ci(E)?(t.consume(E),A):q(E)}function q(E){return Te(E)?(s=q,j(E)):Le(E)?(t.consume(E),q):we(E)}function le(E){return E===45||Ci(E)?(t.consume(E),le):E===47||E===62||It(E)?F(E):i(E)}function F(E){return E===47?(t.consume(E),we):E===58||E===95||Hi(E)?(t.consume(E),U):Te(E)?(s=F,j(E)):Le(E)?(t.consume(E),F):we(E)}function U(E){return E===45||E===46||E===58||E===95||Ci(E)?(t.consume(E),U):ie(E)}function ie(E){return E===61?(t.consume(E),ue):Te(E)?(s=ie,j(E)):Le(E)?(t.consume(E),ie):F(E)}function ue(E){return E===null||E===60||E===61||E===62||E===96?i(E):E===34||E===39?(t.consume(E),n=E,re):Te(E)?(s=ue,j(E)):Le(E)?(t.consume(E),ue):(t.consume(E),de)}function re(E){return E===n?(t.consume(E),n=void 0,me):E===null?i(E):Te(E)?(s=re,j(E)):(t.consume(E),re)}function de(E){return E===null||E===34||E===39||E===60||E===61||E===96?i(E):E===47||E===62||It(E)?F(E):(t.consume(E),de)}function me(E){return E===47||E===62||It(E)?F(E):i(E)}function we(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),e):i(E)}function j(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),ae}function ae(E){return Le(E)?Ie(t,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):V(E)}function V(E){return t.enter("htmlTextData"),s(E)}}var bs={name:"labelEnd",tokenize:CD,resolveTo:ED,resolveAll:TD},wD={tokenize:PD},kD={tokenize:_D},SD={tokenize:QD};function TD(t){let e=-1;for(;++e=3&&(c===null||Te(c))?(t.exit("thematicBreak"),e(c)):i(c)}function l(c){return c===n?(t.consume(c),r++,l):(t.exit("thematicBreakSequence"),Le(c)?Ie(t,a,"whitespace")(c):a(c))}}var Oi={name:"list",tokenize:DD,continuation:{tokenize:MD},exit:UD},LD={tokenize:zD,partial:!0},ID={tokenize:ND,partial:!0};function DD(t,e,i){let r=this,n=r.events[r.events.length-1],o=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,s=0;return a;function a(p){let g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:yc(p)){if(r.containerState.type||(r.containerState.type=g,t.enter(g,{_container:!0})),g==="listUnordered")return t.enter("listItemPrefix"),p===42||p===45?t.check(ys,i,c)(p):c(p);if(!r.interrupt||p===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(p)}return i(p)}function l(p){return yc(p)&&++s<10?(t.consume(p),l):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(t.exit("listItemValue"),c(p)):i(p)}function c(p){return t.enter("listItemMarker"),t.consume(p),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,t.check(vo,r.interrupt?i:u,t.attempt(LD,d,f))}function u(p){return r.containerState.initialBlankLine=!0,o++,d(p)}function f(p){return Le(p)?(t.enter("listItemPrefixWhitespace"),t.consume(p),t.exit("listItemPrefixWhitespace"),d):i(p)}function d(p){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(p)}}function MD(t,e,i){let r=this;return r.containerState._closeFlow=void 0,t.check(vo,n,o);function n(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ie(t,e,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!Le(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(ID,e,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ie(t,t.attempt(Oi,e,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ND(t,e,i){let r=this;return Ie(t,n,"listItemIndent",r.containerState.size+1);function n(o){let s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?e(o):i(o)}}function UD(t){t.exit(this.containerState.type)}function zD(t,e,i){let r=this;return Ie(t,n,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(o){let s=r.events[r.events.length-1];return!Le(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):i(o)}}var jh={name:"setextUnderline",tokenize:qD,resolveTo:jD};function jD(t,e){let i=t.length,r,n,o;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){r=i;break}t[i][1].type==="paragraph"&&(n=i)}else t[i][1].type==="content"&&t.splice(i,1),!o&&t[i][1].type==="definition"&&(o=i);let s={type:"setextHeading",start:Object.assign({},t[n][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[n][1].type="setextHeadingText",o?(t.splice(n,0,["enter",s,e]),t.splice(o+1,0,["exit",t[r][1],e]),t[r][1].end=Object.assign({},t[o][1].end)):t[r][1]=s,t.push(["exit",s,e]),t}function qD(t,e,i){let r=this,n;return o;function o(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),n=c,s(c)):i(c)}function s(c){return t.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===n?(t.consume(c),a):(t.exit("setextHeadingLineSequence"),Le(c)?Ie(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Te(c)?(t.exit("setextHeadingLine"),e(c)):i(c)}}var hT={tokenize:WD};function WD(t){let e=this,i=t.attempt(vo,r,t.attempt(this.parser.constructs.flowInitial,n,Ie(t,t.attempt(this.parser.constructs.flow,n,t.attempt(Vg,n)),"linePrefix")));return i;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,i}function n(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,i}}var dT={resolveAll:gT()},pT=mT("string"),OT=mT("text");function mT(t){return{tokenize:e,resolveAll:gT(t==="text"?BD:void 0)};function e(i){let r=this,n=this.parser.constructs[t],o=i.attempt(n,s,a);return s;function s(u){return c(u)?o(u):a(u)}function a(u){if(u===null){i.consume(u);return}return i.enter("data"),i.consume(u),l}function l(u){return c(u)?(i.exit("data"),o(u)):(i.consume(u),l)}function c(u){if(u===null)return!0;let f=n[u],d=-1;if(f)for(;++d-1){let a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(t[n].slice(0,o))}return s}function VD(t,e){let i=-1,r=[],n;for(;++i{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}version(){return"1.0.0-rc.5"}isProfileEnabled(){return this.sessionStorage.getItem(yg)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(bh)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(bh)==="false"}enableDebug(){this.sessionStorage.setItem(bh,"true")}enableProfiling(){this.sessionStorage.setItem(yg,"true")}disableDebug(){this.sessionStorage.setItem(bh,"false")}disableProfiling(){this.sessionStorage.removeItem(yg)}enableLatencySim(t){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(xg,t)}disableLatencySim(){this.sessionStorage.removeItem(xg)}getLatencySim(){let t=this.sessionStorage.getItem(xg);return t?parseInt(t):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let t=()=>{this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?t():document.addEventListener("DOMContentLoaded",()=>t())}disconnect(t){clearTimeout(this.reloadWithJitterTimer),this.serverCloseRef&&(this.socket.off(this.serverCloseRef),this.serverCloseRef=null),this.socket.disconnect(t)}replaceTransport(t){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(t),this.connect()}execJS(t,e,i=null){this.owner(t,r=>_r.exec(i,e,r,t))}execJSHookPush(t,e,i,r){this.withinOwners(t,n=>{_r.exec("hook",e,n,t,["push",{data:i,callback:r}])})}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(t,e){this.domCallbacks[t](...e)}time(t,e){if(!this.isProfileEnabled()||!console.time)return e();console.time(t);let i=e();return console.timeEnd(t),i}log(t,e,i){if(this.viewLogger){let[r,n]=i();this.viewLogger(t,e,r,n)}else if(this.isDebugEnabled()){let[r,n]=i();C7(t,e,r,n)}}requestDOMUpdate(t){this.transitions.after(t)}transition(t,e,i=function(){}){this.transitions.addTransition(t,e,i)}onChannel(t,e,i){t.on(e,r=>{let n=this.getLatencySim();n?setTimeout(()=>i(r),n):i(r)})}wrapPush(t,e,i){let r=this.getLatencySim(),n=t.joinCount;if(!r)return this.isConnected()&&e.timeout?i().receive("timeout",()=>{t.joinCount===n&&!t.isDestroyed()&&this.reloadWithJitter(t,()=>{this.log(t,"timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}):i();let o={receives:[],receive(s,a){this.receives.push([s,a])}};return setTimeout(()=>{t.isDestroyed()||o.receives.reduce((s,[a,l])=>s.receive(a,l),i())},r),o}reloadWithJitter(t,e){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let i=this.reloadJitterMin,r=this.reloadJitterMax,n=Math.floor(Math.random()*(r-i+1))+i,o=Kr.updateLocal(this.localStorage,window.location.pathname,cS,0,s=>s+1);o>this.maxReloads&&(n=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{t.isDestroyed()||t.isConnected()||(t.destroy(),e?e():this.log(t,"join",()=>[`encountered ${o} consecutive reloads`]),o>this.maxReloads&&this.log(t,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},n)}getHookCallbacks(t){return t&&t.startsWith("Phoenix.")?L7[t.split(".")[1]]:this.hooks[t]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(t){return`${this.getBindingPrefix()}${t}`}channel(t,e){return this.socket.channel(t,e)}joinDeadView(){let t=document.body;if(t&&!this.isPhxView(t)&&!this.isPhxView(document.firstElementChild)){let e=this.newRootView(t);e.setHref(this.getHref()),e.joinDead(),this.main||(this.main=e),window.requestAnimationFrame(()=>e.execNewMounted())}}joinRootViews(){let t=!1;return te.all(document,`${Ca}:not([${Os}])`,e=>{if(!this.getRootById(e.id)){let i=this.newRootView(e);i.setHref(this.getHref()),i.join(),e.hasAttribute(Cg)&&(this.main=i)}t=!0}),t}redirect(t,e){this.unload(),Kr.redirect(t,e)}replaceMain(t,e,i=null,r=this.setPendingLink(t)){let n=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let o=te.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(o,e,n),this.main.setRedirect(t),this.transitionRemoves(null,!0),this.main.join((s,a)=>{s===1&&this.commitPendingLink(r)&&this.requestDOMUpdate(()=>{te.findPhxSticky(document).forEach(l=>o.appendChild(l)),this.outgoingMainEl.replaceWith(o),this.outgoingMainEl=null,i&&i(r),a()})})}transitionRemoves(t,e){let i=this.binding("remove");if(t=t||te.all(document,`[${i}]`),e){let r=te.findPhxSticky(document)||[];t=t.filter(n=>!te.isChildOfAny(n,r))}t.forEach(r=>{for(let n of this.boundEventNames)r.addEventListener(n,o=>{o.preventDefault(),o.stopImmediatePropagation()},!0);this.execJS(r,r.getAttribute(i),"remove")})}isPhxView(t){return t.getAttribute&&t.getAttribute(Jr)!==null}newRootView(t,e,i){let r=new gS(t,this,null,e,i);return this.roots[r.id]=r,r}owner(t,e){let i=mo(t.closest(Ca),r=>this.getViewByEl(r))||this.main;i&&e(i)}withinOwners(t,e){this.owner(t,i=>e(i,t))}getViewByEl(t){let e=t.getAttribute(go);return mo(this.getRootById(e),i=>i.getDescendentByEl(t))}getRootById(t){return this.roots[t]}destroyAllViews(){for(let t in this.roots)this.roots[t].destroy(),delete this.roots[t];this.main=null}destroyViewByEl(t){let e=this.getRootById(t.getAttribute(go));e&&e.id===t.id?(e.destroy(),delete this.roots[e.id]):e&&e.destroyDescendent(t.id)}setActiveElement(t){if(this.activeElement===t)return;this.activeElement=t;let e=()=>{t===this.activeElement&&(this.activeElement=null),t.removeEventListener("mouseup",this),t.removeEventListener("touchend",this)};t.addEventListener("mouseup",e),t.addEventListener("touchend",e)}getActiveElement(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}dropActiveElement(t){this.prevActive&&t.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:t}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.serverCloseRef=this.socket.onClose(e=>{if(e&&e.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",e=>{e.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),t||this.bindNav(),this.bindClicks(),t||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(e,i,r,n,o,s)=>{let a=n.getAttribute(this.binding(g7)),l=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let c=H({key:e.key},this.eventMeta(i,e,n));_r.exec(i,o,r,n,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,i,r,n,o,s)=>{if(!s){let a=H({key:e.key},this.eventMeta(i,e,n));_r.exec(i,o,r,n,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(e,i,r,n,o,s)=>{if(s==="window"){let a=this.eventMeta(i,e,n);_r.exec(i,o,r,n,["push",{data:a}])}}),this.on("dragover",e=>e.preventDefault()),this.on("drop",e=>{e.preventDefault();let i=mo(hc(e.target,this.binding(Ik)),o=>o.getAttribute(this.binding(Ik))),r=i&&document.getElementById(i),n=Array.from(e.dataTransfer.files||[]);!r||r.disabled||n.length===0||!(r.files instanceof FileList)||(Mt.trackFiles(r,n,e.dataTransfer),r.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(uS,e=>{let i=e.target;if(!te.isUploadInput(i))return;let r=Array.from(e.detail.files||[]).filter(n=>n instanceof File||n instanceof Blob);Mt.trackFiles(i,r),i.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(t,e,i){let r=this.metadataCallbacks[t];return r?r(e,i):{}}setPendingLink(t){return this.linkRef++,this.pendingLink=t,this.linkRef}commitPendingLink(t){return this.linkRef!==t?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(t,e){for(let i in t){let r=t[i];this.on(r,n=>{let o=this.binding(i),s=this.binding(`window-${i}`),a=n.target.getAttribute&&n.target.getAttribute(o);a?this.debounce(n.target,n,r,()=>{this.withinOwners(n.target,l=>{e(n,i,l,n.target,a,null)})}):te.all(document,`[${s}]`,l=>{let c=l.getAttribute(s);this.debounce(l,n,r,()=>{this.withinOwners(l,u=>{e(n,i,u,l,c,"window")})})})})}}bindClicks(){this.on("mousedown",t=>this.clickStartedAtTarget=t.target),this.bindClick("click","click")}bindClick(t,e){let i=this.binding(e);window.addEventListener(t,r=>{let n=null;r.detail===0&&(this.clickStartedAtTarget=r.target);let o=this.clickStartedAtTarget||r.target;n=hc(o,i),this.dispatchClickAway(r,o),this.clickStartedAtTarget=null;let s=n&&n.getAttribute(i);if(!s){te.isNewPageClick(r,window.location)&&this.unload();return}n.getAttribute("href")==="#"&&r.preventDefault(),!n.hasAttribute(Ti)&&this.debounce(n,r,"click",()=>{this.withinOwners(n,a=>{_r.exec("click",s,a,n,["push",{data:this.eventMeta("click",r,n)}])})})},!1)}dispatchClickAway(t,e){let i=this.binding("click-away");te.all(document,`[${i}]`,r=>{r.isSameNode(e)||r.contains(e)||this.withinOwners(r,n=>{let o=r.getAttribute(i);_r.isVisible(r)&&_r.isInViewport(r)&&_r.exec("click",o,n,r,["push",{data:this.eventMeta("click",t,t.target)}])})})}bindNav(){if(!Kr.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let t=null;window.addEventListener("scroll",e=>{clearTimeout(t),t=setTimeout(()=>{Kr.updateCurrentState(i=>Object.assign(i,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",e=>{if(!this.registerNewLocation(window.location))return;let{type:i,id:r,root:n,scroll:o}=e.state||{},s=window.location.href;te.dispatchEvent(window,"phx:navigate",{detail:{href:s,patch:i==="patch",pop:!0}}),this.requestDOMUpdate(()=>{this.main.isConnected()&&i==="patch"&&r===this.main.id?this.main.pushLinkPatch(s,null,()=>{this.maybeScroll(o)}):this.replaceMain(s,null,()=>{n&&this.replaceRootHistory(),this.maybeScroll(o)})})},!1),window.addEventListener("click",e=>{let i=hc(e.target,pg),r=i&&i.getAttribute(pg);if(!r||!this.isConnected()||!this.main||te.wantsNewTab(e))return;let n=i.href instanceof SVGAnimatedString?i.href.baseVal:i.href,o=i.getAttribute(f7);e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==n&&this.requestDOMUpdate(()=>{if(r==="patch")this.pushHistoryPatch(n,o,i);else if(r==="redirect")this.historyRedirect(n,o);else throw new Error(`expected ${pg} to be "patch" or "redirect", got: ${r}`);let s=i.getAttribute(this.binding("click"));s&&this.requestDOMUpdate(()=>this.execJS(i,s,"click"))})},!1)}maybeScroll(t){typeof t=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,t)})}dispatchEvent(t,e={}){te.dispatchEvent(window,`phx:${t}`,{detail:e})}dispatchEvents(t){t.forEach(([e,i])=>this.dispatchEvent(e,i))}withPageLoading(t,e){te.dispatchEvent(window,"phx:page-loading-start",{detail:t});let i=()=>te.dispatchEvent(window,"phx:page-loading-stop",{detail:t});return e?e(i):i}pushHistoryPatch(t,e,i){if(!this.isConnected()||!this.main.isMain())return Kr.redirect(t);this.withPageLoading({to:t,kind:"patch"},r=>{this.main.pushLinkPatch(t,i,n=>{this.historyPatch(t,e,n),r()})})}historyPatch(t,e,i=this.setPendingLink(t)){this.commitPendingLink(i)&&(Kr.pushState(e,{type:"patch",id:this.main.id},t),te.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:t,pop:!1}}),this.registerNewLocation(window.location))}historyRedirect(t,e,i){if(!this.isConnected()||!this.main.isMain())return Kr.redirect(t,i);if(/^\/$|^\/[^\/]+.*$/.test(t)){let{protocol:n,host:o}=window.location;t=`${n}//${o}${t}`}let r=window.scrollY;this.withPageLoading({to:t,kind:"redirect"},n=>{this.replaceMain(t,i,o=>{o===this.linkRef&&(Kr.pushState(e,{type:"redirect",id:this.main.id,scroll:r},t),te.dispatchEvent(window,"phx:navigate",{detail:{href:t,patch:!1,pop:!1}}),this.registerNewLocation(window.location)),n()})})}replaceRootHistory(){Kr.pushState("replace",{root:!0,type:"patch",id:this.main.id})}registerNewLocation(t){let{pathname:e,search:i}=this.currentLocation;return e+i===t.pathname+t.search?!1:(this.currentLocation=Th(t),!0)}bindForms(){let t=0,e=!1;this.on("submit",i=>{let r=i.target.getAttribute(this.binding("submit")),n=i.target.getAttribute(this.binding("change"));!e&&n&&!r&&(e=!0,i.preventDefault(),this.withinOwners(i.target,o=>{o.disableForm(i.target),window.requestAnimationFrame(()=>{te.isUnloadableFormSubmit(i)&&this.unload(),i.target.submit()})}))}),this.on("submit",i=>{let r=i.target.getAttribute(this.binding("submit"));if(!r){te.isUnloadableFormSubmit(i)&&this.unload();return}i.preventDefault(),i.target.disabled=!0,this.withinOwners(i.target,n=>{_r.exec("submit",r,n,i.target,["push",{submitter:i.submitter}])})});for(let i of["change","input"])this.on(i,r=>{let n=this.binding("change"),o=r.target,s=o.getAttribute(n),a=o.form&&o.form.getAttribute(n),l=s||a;if(!l||o.type==="number"&&o.validity&&o.validity.badInput)return;let c=s?o:o.form,u=t;t++;let{at:f,type:d}=te.private(o,"prev-iteration")||{};f===u-1&&i==="change"&&d==="input"||(te.putPrivate(o,"prev-iteration",{at:u,type:i}),this.debounce(o,r,i,()=>{this.withinOwners(c,p=>{te.putPrivate(o,Eh,!0),te.isTextualInput(o)||this.setActiveElement(o),_r.exec("change",l,p,o,["push",{_target:r.target.name,dispatcher:c}])})}))});this.on("reset",i=>{let r=i.target;te.resetForm(r);let n=Array.from(r.elements).find(o=>o.type==="reset");n&&window.requestAnimationFrame(()=>{n.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(t,e,i,r){if(i==="blur"||i==="focusout")return r();let n=this.binding(O7),o=this.binding(m7),s=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(t,l=>{let c=()=>!l.isDestroyed()&&document.body.contains(t);te.debounce(t,e,n,s,o,a,c,()=>{r()})})}silenceEvents(t){this.silenced=!0,t(),this.silenced=!1}on(t,e){this.boundEventNames.add(t),window.addEventListener(t,i=>{this.silenced||e(i)})}},e8=class{constructor(){this.transitions=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(t=>{clearTimeout(t),this.transitions.delete(t)}),this.flushPendingOps()}after(t){this.size()===0?t():this.pushPendingOp(t)}addTransition(t,e,i){e();let r=setTimeout(()=>{this.transitions.delete(r),i(),this.flushPendingOps()},t);this.transitions.add(r)}pushPendingOp(t){this.pendingOps.push(t)}size(){return this.transitions.size}flushPendingOps(){if(this.size()>0)return;let t=this.pendingOps.shift();t&&(t(),this.flushPendingOps())}};var yS="livebook:";function ms(t){try{let e=localStorage.getItem(yS+t);if(e)return JSON.parse(e)}catch(e){console.error(`Failed to load from local storage, reason: ${e.message}`)}}function Pa(t,e){try{let i=JSON.stringify(e);localStorage.setItem(yS+t,i)}catch(i){console.error(`Failed to write to local storage, reason: ${i.message}`)}}var xS="app_auth_token:";function vS(t,e){Pa(xS+t,e)}function wS(){let t=window.location.pathname;if(t.startsWith("/apps/")){let e=t.split("/")[2],i=ms(xS+e);if(i)return i}return null}var t8={mounted(){this.handleEvent("persist_app_auth",({slug:t,token:e})=>{vS(t,e),this.pushEvent("app_auth_persisted")})}},kS=t8;function ht(t,e){let i={};for(let r of e){let n=`data-p-${r}`;if(!t.hasAttribute(n))throw new Error(`Missing attribute "${n}" on element <${t.tagName}:${t.id}>`);let o=t.getAttribute(n);i[i8(r)]=JSON.parse(o)}return i}function i8(t){let[e,...i]=t.split("-");return[e,...i.map(r=>r.charAt(0).toUpperCase()+r.slice(1))].join("")}function SS(t,e,i){let n=new ArrayBuffer(44+t.byteLength),o=new DataView(n),s=t.byteLength/4,a=4,l=e*a,c=i*l,u=s*l,f=0;function d(w){o.setUint32(f,w,!1),f+=4}function p(w){o.setUint32(f,w,!0),f+=4}function g(w){o.setUint16(f,w,!0),f+=2}function x(w){o.setFloat32(f,w,!0),f+=4}d(1380533830),p(36+u),d(1463899717),d(1718449184),p(16),g(3),g(e),p(i),p(c),g(l),g(a*8),d(1684108385),p(u);let S=new Float32Array(t);for(let w=0;w{this.inputEl.click()}),this.inputEl.addEventListener("change",t=>{let[e]=t.target.files;e&&this.loadFile(e)}),this.el.addEventListener("dragover",t=>{t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"}),this.el.addEventListener("drop",t=>{t.stopPropagation(),t.preventDefault();let[e]=t.dataTransfer.files;e&&!this.isRecording()&&this.loadFile(e)}),this.el.addEventListener("dragenter",t=>{this.el.classList.add(...Qg)}),this.el.addEventListener("dragleave",t=>{this.el.contains(t.relatedTarget)||this.el.classList.remove(...Qg)}),this.el.addEventListener("drop",t=>{this.el.classList.remove(...Qg)}),this.recordButton.addEventListener("click",t=>{this.startRecording()}),this.stopButton.addEventListener("click",t=>{this.stopRecording()}),this.cancelButton.addEventListener("click",t=>{this.stopRecording(!1)})},updated(){this.props=this.getProps(),this.audioEl.src=this.props.audioUrl},getProps(){return ht(this.el,["id","phx-target","sampling-rate","endianness","format","audio-url"])},startRecording(){this.audioEl.classList.add("hidden"),this.uploadButton.classList.add("hidden"),this.recordButton.classList.add("hidden"),this.stopButton.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.audioChunks=[],navigator.mediaDevices.getUserMedia({audio:!0}).then(t=>{this.mediaRecorder=new MediaRecorder(t),this.mediaRecorder.addEventListener("dataavailable",e=>{this.audioChunks.push(e.data)}),this.mediaRecorder.start()})},stopRecording(t=!0){this.audioEl.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),this.recordButton.classList.remove("hidden"),this.stopButton.classList.add("hidden"),this.cancelButton.classList.add("hidden"),t&&this.mediaRecorder.addEventListener("stop",e=>{new Blob(this.audioChunks).arrayBuffer().then(r=>{this.loadEncodedAudio(r)})}),this.mediaRecorder.stop()},isRecording(){return this.mediaRecorder&&this.mediaRecorder.state==="recording"},loadFile(t){let e=new FileReader;e.onload=i=>{this.loadEncodedAudio(i.target.result)},e.readAsArrayBuffer(t)},loadEncodedAudio(t){this.pushEventTo(this.props.phxTarget,"decoding",{}),new AudioContext({sampleRate:this.props.samplingRate}).decodeAudioData(t,i=>{let r=n8(i);this.pushAudio(r)})},pushAudio(t){let e={num_channels:t.numChannels,sampling_rate:t.samplingRate},i=this.encodeAudio(t),r=new Blob([i]);r.meta=()=>e,this.uploadTo(this.props.phxTarget,"file",[r])},encodeAudio(t){if(this.props.format==="pcm_f32")return o8(t.data,this.props.endianness);if(this.props.format==="wav")return SS(t.data,t.numChannels,t.samplingRate)}};function n8(t){let e=t.numberOfChannels,i=t.sampleRate,r=t.length,n=4*e*r,o=new ArrayBuffer(n),s=new Float32Array(o);for(let a=0;a=0;l--)r=i[l],n=r.name,o=r.namespaceURI,s=r.value,o?(n=r.localName||n,a=t.getAttributeNS(o,n),a!==s&&(r.prefix==="xmlns"&&(n=r.name),t.setAttributeNS(o,n,s))):(a=t.getAttribute(n),a!==s&&t.setAttribute(n,s));for(var c=t.attributes,u=c.length-1;u>=0;u--)r=c[u],n=r.name,o=r.namespaceURI,o?(n=r.localName||n,e.hasAttributeNS(o,n)||t.removeAttributeNS(o,n)):e.hasAttribute(n)||t.removeAttribute(n)}}var Ch,l8="http://www.w3.org/1999/xhtml",Ii=typeof document=="undefined"?void 0:document,c8=!!Ii&&"content"in Ii.createElement("template"),u8=!!Ii&&Ii.createRange&&"createContextualFragment"in Ii.createRange();function f8(t){var e=Ii.createElement("template");return e.innerHTML=t,e.content.childNodes[0]}function h8(t){Ch||(Ch=Ii.createRange(),Ch.selectNode(Ii.body));var e=Ch.createContextualFragment(t);return e.childNodes[0]}function d8(t){var e=Ii.createElement("body");return e.innerHTML=t,e.childNodes[0]}function p8(t){return t=t.trim(),c8?f8(t):u8?h8(t):d8(t)}function Ph(t,e){var i=t.nodeName,r=e.nodeName,n,o;return i===r?!0:(n=i.charCodeAt(0),o=r.charCodeAt(0),n<=90&&o>=97?i===r.toUpperCase():o<=90&&n>=97?r===i.toUpperCase():!1)}function O8(t,e){return!e||e===l8?Ii.createElement(t):Ii.createElementNS(e,t)}function m8(t,e){for(var i=t.firstChild;i;){var r=i.nextSibling;e.appendChild(i),i=r}return e}function Ag(t,e,i){t[i]!==e[i]&&(t[i]=e[i],t[i]?t.setAttribute(i,""):t.removeAttribute(i))}var _S={OPTION:function(t,e){var i=t.parentNode;if(i){var r=i.nodeName.toUpperCase();r==="OPTGROUP"&&(i=i.parentNode,r=i&&i.nodeName.toUpperCase()),r==="SELECT"&&!i.hasAttribute("multiple")&&(t.hasAttribute("selected")&&!e.selected&&(t.setAttribute("selected","selected"),t.removeAttribute("selected")),i.selectedIndex=-1)}Ag(t,e,"selected")},INPUT:function(t,e){Ag(t,e,"checked"),Ag(t,e,"disabled"),t.value!==e.value&&(t.value=e.value),e.hasAttribute("value")||t.removeAttribute("value")},TEXTAREA:function(t,e){var i=e.value;t.value!==i&&(t.value=i);var r=t.firstChild;if(r){var n=r.nodeValue;if(n==i||!i&&n==t.placeholder)return;r.nodeValue=i}},SELECT:function(t,e){if(!e.hasAttribute("multiple")){for(var i=-1,r=0,n=t.firstChild,o,s;n;)if(s=n.nodeName&&n.nodeName.toUpperCase(),s==="OPTGROUP")o=n,n=o.firstChild;else{if(s==="OPTION"){if(n.hasAttribute("selected")){i=r;break}r++}n=n.nextSibling,!n&&o&&(n=o.nextSibling,o=null)}t.selectedIndex=i}}},Oc=1,QS=11,AS=3,$S=8;function bo(){}function g8(t){if(t)return t.getAttribute&&t.getAttribute("id")||t.id}function b8(t){return function(i,r,n){if(n||(n={}),typeof r=="string")if(i.nodeName==="#document"||i.nodeName==="HTML"||i.nodeName==="BODY"){var o=r;r=Ii.createElement("html"),r.innerHTML=o}else r=p8(r);else r.nodeType===QS&&(r=r.firstElementChild);var s=n.getNodeKey||g8,a=n.onBeforeNodeAdded||bo,l=n.onNodeAdded||bo,c=n.onBeforeElUpdated||bo,u=n.onElUpdated||bo,f=n.onBeforeNodeDiscarded||bo,d=n.onNodeDiscarded||bo,p=n.onBeforeElChildrenUpdated||bo,g=n.skipFromChildren||bo,x=n.addChild||function(j,ae){return j.appendChild(ae)},S=n.childrenOnly===!0,w=Object.create(null),T=[];function $(j){T.push(j)}function I(j,ae){if(j.nodeType===Oc)for(var V=j.firstChild;V;){var E=void 0;ae&&(E=s(V))?$(E):(d(V),V.firstChild&&I(V,ae)),V=V.nextSibling}}function _(j,ae,V){f(j)!==!1&&(ae&&ae.removeChild(j),d(j),I(j,V))}function A(j){if(j.nodeType===Oc||j.nodeType===QS)for(var ae=j.firstChild;ae;){var V=s(ae);V&&(w[V]=ae),A(ae),ae=ae.nextSibling}}A(i);function q(j){l(j);for(var ae=j.firstChild;ae;){var V=ae.nextSibling,E=s(ae);if(E){var B=w[E];B&&Ph(ae,B)?(ae.parentNode.replaceChild(B,ae),F(B,ae)):q(ae)}else q(ae);ae=V}}function le(j,ae,V){for(;ae;){var E=ae.nextSibling;(V=s(ae))?$(V):_(ae,j,!0),ae=E}}function F(j,ae,V){var E=s(ae);E&&delete w[E],!(!V&&(c(j,ae)===!1||(t(j,ae),u(j),p(j,ae)===!1)))&&(j.nodeName!=="TEXTAREA"?U(j,ae):_S.TEXTAREA(j,ae))}function U(j,ae){var V=g(j,ae),E=ae.firstChild,B=j.firstChild,ne,D,Ue,Ze,Ve;e:for(;E;){for(Ze=E.nextSibling,ne=s(E);!V&&B;){if(Ue=B.nextSibling,E.isSameNode&&E.isSameNode(B)){E=Ze,B=Ue;continue e}D=s(B);var Rt=B.nodeType,Xe=void 0;if(Rt===E.nodeType&&(Rt===Oc?(ne?ne!==D&&((Ve=w[ne])?Ue===Ve?Xe=!1:(j.insertBefore(Ve,B),D?$(D):_(B,j,!0),B=Ve,D=s(B)):Xe=!1):D&&(Xe=!1),Xe=Xe!==!1&&Ph(B,E),Xe&&F(B,E)):(Rt===AS||Rt==$S)&&(Xe=!0,B.nodeValue!==E.nodeValue&&(B.nodeValue=E.nodeValue))),Xe){E=Ze,B=Ue;continue e}D?$(D):_(B,j,!0),B=Ue}if(ne&&(Ve=w[ne])&&Ph(Ve,E))V||x(j,Ve),F(Ve,E);else{var Qt=a(E);Qt!==!1&&(Qt&&(E=Qt),E.actualize&&(E=E.actualize(j.ownerDocument||Ii)),x(j,E),q(E))}E=Ze,B=Ue}le(j,B,D);var At=_S[j.nodeName];At&&At(j,ae)}var ie=i,ue=ie.nodeType,re=r.nodeType;if(!S){if(ue===Oc)re===Oc?Ph(i,r)||(d(i),ie=m8(i,O8(r.nodeName,r.namespaceURI))):ie=r;else if(ue===AS||ue===$S){if(re===ue)return ie.nodeValue!==r.nodeValue&&(ie.nodeValue=r.nodeValue),ie;ie=r}}if(ie===r)d(i);else{if(r.isSameNode&&r.isSameNode(ie))return;if(F(ie,r,S),T)for(var de=0,me=T.length;des.length,l;a&&s.push(n);try{l=t.apply(this,s)}catch(c){let u=c;if(a&&i)throw u;return n(u)}a||(l instanceof Promise?l.then(o,n):l instanceof Error?n(l):o(l))}function n(s,...a){i||(i=!0,e(s,...a))}function o(s){n(null,s)}}function Rg(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?WS(t.position):"start"in t||"end"in t?WS(t):"line"in t||"column"in t?Xg(t):""}function Xg(t){return BS(t&&t.line)+":"+BS(t&&t.column)}function WS(t){return Xg(t&&t.start)+"-"+Xg(t&&t.end)}function BS(t){return t&&typeof t=="number"?t:1}var Ut=class extends Error{constructor(e,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let n="",o={},s=!1;if(i&&("line"in i&&"column"in i?o={place:i}:"start"in i&&"end"in i?o={place:i}:"type"in i?o={ancestors:[i],place:i.position}:o=H({},i)),typeof e=="string"?n=e:!o.cause&&e&&(s=!0,n=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof r=="string"){let l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){let l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}let a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=a?a.line:void 0,this.name=Rg(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}};Ut.prototype.file="";Ut.prototype.name="";Ut.prototype.reason="";Ut.prototype.message="";Ut.prototype.stack="";Ut.prototype.column=void 0;Ut.prototype.line=void 0;Ut.prototype.ancestors=void 0;Ut.prototype.cause=void 0;Ut.prototype.fatal=void 0;Ut.prototype.place=void 0;Ut.prototype.ruleId=void 0;Ut.prototype.source=void 0;var Qr={basename:v8,dirname:w8,extname:k8,join:S8,sep:"/"};function v8(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');gc(t);let i=0,r=-1,n=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;n--;)if(t.codePointAt(n)===47){if(o){i=n+1;break}}else r<0&&(o=!0,r=n+1);return r<0?"":t.slice(i,r)}if(e===t)return"";let s=-1,a=e.length-1;for(;n--;)if(t.codePointAt(n)===47){if(o){i=n+1;break}}else s<0&&(o=!0,s=n+1),a>-1&&(t.codePointAt(n)===e.codePointAt(a--)?a<0&&(r=n):(a=-1,r=s));return i===r?r=s:r<0&&(r=t.length),t.slice(i,r)}function w8(t){if(gc(t),t.length===0)return".";let e=-1,i=t.length,r;for(;--i;)if(t.codePointAt(i)===47){if(r){e=i;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function k8(t){gc(t);let e=t.length,i=-1,r=0,n=-1,o=0,s;for(;e--;){let a=t.codePointAt(e);if(a===47){if(s){r=e+1;break}continue}i<0&&(s=!0,i=e+1),a===46?n<0?n=e:o!==1&&(o=1):n>-1&&(o=-1)}return n<0||i<0||o===0||o===1&&n===i-1&&n===r+1?"":t.slice(n,i)}function S8(...t){let e=-1,i;for(;++e0&&t.codePointAt(t.length-1)===47&&(i+="/"),e?"/"+i:i}function E8(t,e){let i="",r=0,n=-1,o=0,s=-1,a,l;for(;++s<=t.length;){if(s2){if(l=i.lastIndexOf("/"),l!==i.length-1){l<0?(i="",r=0):(i=i.slice(0,l),r=i.length-1-i.lastIndexOf("/")),n=s,o=0;continue}}else if(i.length>0){i="",r=0,n=s,o=0;continue}}e&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+t.slice(n+1,s):i=t.slice(n+1,s),r=s-n-1;n=s,o=0}else a===46&&o>-1?o++:o=-1}return i}function gc(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}var ZS={cwd:C8};function C8(){return"/"}function _a(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function VS(t){if(typeof t=="string")t=new URL(t);else if(!_a(t)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return P8(t)}function P8(t){if(t.hostname!==""){let r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}let e=t.pathname,i=-1;for(;++i0){let[p,...g]=u,x=r[d][1];mc(x)&&mc(p)&&(p=(0,Ah.default)(!0,x,p)),r[d]=[c,p,...g]}}}},$h=new zg().freeze();function Ng(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Mg(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Ug(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function HS(t){if(!mc(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function GS(t,e,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Qh(t){return A8(t)?t:new yo(t)}function A8(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function $8(t){return typeof t=="string"||X8(t)}function X8(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var R8={};function jg(t,e){let i=e||R8,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,n=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return JS(t,r,n)}function JS(t,e,i){if(L8(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return KS(t.children,e,i)}return Array.isArray(t)?KS(t,e,i):""}function KS(t,e,i){let r=[],n=-1;for(;++nn?0:n+e:e=e>n?n:e,i=i>0?i:0,r.length<1e4)s=Array.from(r),s.unshift(e,i),t.splice(...s);else for(i&&t.splice(e,i);o0?(oi(t,t.length,0,e),t):e}var eT={}.hasOwnProperty;function tT(t){let e={},i=-1;for(;++i13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"\uFFFD":String.fromCharCode(i)}function Pn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var N8=xo(new RegExp("\\p{P}","u")),Hi=xo(/[A-Za-z]/),Ci=xo(/[\dA-Za-z]/),iT=xo(/[#-'*+\--9=?A-Z^-~]/);function bc(t){return t!==null&&(t<32||t===127)}var yc=xo(/\d/),rT=xo(/[\dA-Fa-f]/),qg=xo(/[!-/:-@[-`{-~]/);function Te(t){return t!==null&&t<-2}function It(t){return t!==null&&(t<0||t===32)}function Le(t){return t===-2||t===-1||t===32}function nT(t){return qg(t)||N8(t)}var oT=xo(/\s/);function xo(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Ie(t,e,i,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Le(l)?(t.enter(i),a(l)):e(l)}function a(l){return Le(l)&&o++s))return;let q=e.events.length,le=q,F,U;for(;le--;)if(e.events[le][0]==="exit"&&e.events[le][1].type==="chunkFlow"){if(F){U=e.events[le][1].end;break}F=!0}for(w(r),A=q;A$;){let _=i[I];e.containerState=_[1],_[0].exit.call(e,t)}i.length=$}function T(){n.write([null]),o=void 0,n=void 0,e.containerState._closeFlow=void 0}}function z8(t,e,i){return Ie(t,t.attempt(this.parser.constructs.document,e,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Wg(t){if(t===null||It(t)||oT(t))return 1;if(nT(t))return 2}function Qa(t,e,i){let r=[],n=-1;for(;++n1&&t[i][1].end.offset-t[i][1].start.offset>1?2:1;let f=Object.assign({},t[r][1].end),d=Object.assign({},t[i][1].start);cT(f,-l),cT(d,l),s={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},t[r][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[i][1].start),end:d},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[r][1].end),end:Object.assign({},t[i][1].start)},n={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},t[r][1].end=Object.assign({},s.start),t[i][1].start=Object.assign({},a.end),c=[],t[r][1].end.offset-t[r][1].start.offset&&(c=Ei(c,[["enter",t[r][1],e],["exit",t[r][1],e]])),c=Ei(c,[["enter",n,e],["enter",s,e],["exit",s,e],["enter",o,e]]),c=Ei(c,Qa(e.parser.constructs.insideSpan.null,t.slice(r+1,i),e)),c=Ei(c,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",n,e]]),t[i][1].end.offset-t[i][1].start.offset?(u=2,c=Ei(c,[["enter",t[i][1],e],["exit",t[i][1],e]])):u=0,oi(t,r-1,i-r+3,c),i=r+c.length-u-2;break}}for(i=-1;++i0&&Le(A)?Ie(t,T,"linePrefix",o+1)(A):T(A)}function T(A){return A===null||Te(A)?t.check(uT,x,I)(A):(t.enter("codeFlowValue"),$(A))}function $(A){return A===null||Te(A)?(t.exit("codeFlowValue"),T(A)):(t.consume(A),$)}function I(A){return t.exit("codeFenced"),e(A)}function _(A,q,le){let F=0;return U;function U(me){return A.enter("lineEnding"),A.consume(me),A.exit("lineEnding"),ie}function ie(me){return A.enter("codeFencedFence"),Le(me)?Ie(A,ue,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(me):ue(me)}function ue(me){return me===a?(A.enter("codeFencedFenceSequence"),re(me)):le(me)}function re(me){return me===a?(F++,A.consume(me),re):F>=s?(A.exit("codeFencedFenceSequence"),Le(me)?Ie(A,de,"whitespace")(me):de(me)):le(me)}function de(me){return me===null||Te(me)?(A.exit("codeFencedFence"),q(me)):le(me)}}}function K8(t,e,i){let r=this;return n;function n(s){return s===null?i(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?i(s):e(s)}}var vc={name:"codeIndented",tokenize:eD},J8={tokenize:tD,partial:!0};function eD(t,e,i){let r=this;return n;function n(c){return t.enter("codeIndented"),Ie(t,o,"linePrefix",5)(c)}function o(c){let u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):i(c)}function s(c){return c===null?l(c):Te(c)?t.attempt(J8,s,l)(c):(t.enter("codeFlowValue"),a(c))}function a(c){return c===null||Te(c)?(t.exit("codeFlowValue"),s(c)):(t.consume(c),a)}function l(c){return t.exit("codeIndented"),e(c)}}function tD(t,e,i){let r=this;return n;function n(s){return r.parser.lazy[r.now().line]?i(s):Te(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),n):Ie(t,o,"linePrefix",5)(s)}function o(s){let a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):Te(s)?n(s):i(s)}}var Zg={name:"codeText",tokenize:nD,resolve:iD,previous:rD};function iD(t){let e=t.length-4,i=3,r,n;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=i;++r=4?e(s):t.interrupt(r.parser.constructs.flow,i,e)(s)}}function Mh(t,e,i,r,n,o,s,a,l){let c=l||Number.POSITIVE_INFINITY,u=0;return f;function f(w){return w===60?(t.enter(r),t.enter(n),t.enter(o),t.consume(w),t.exit(o),d):w===null||w===32||w===41||bc(w)?i(w):(t.enter(r),t.enter(s),t.enter(a),t.enter("chunkString",{contentType:"string"}),x(w))}function d(w){return w===62?(t.enter(o),t.consume(w),t.exit(o),t.exit(n),t.exit(r),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===62?(t.exit("chunkString"),t.exit(a),d(w)):w===null||w===60||Te(w)?i(w):(t.consume(w),w===92?g:p)}function g(w){return w===60||w===62||w===92?(t.consume(w),p):p(w)}function x(w){return!u&&(w===null||w===41||It(w))?(t.exit("chunkString"),t.exit(a),t.exit(s),t.exit(r),e(w)):u999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?i(p):p===93?(t.exit(o),t.enter(n),t.consume(p),t.exit(n),t.exit(r),e):Te(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||Te(p)||a++>999?(t.exit("chunkString"),u(p)):(t.consume(p),l||(l=!Le(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(t.consume(p),a++,f):f(p)}}function zh(t,e,i,r,n,o){let s;return a;function a(d){return d===34||d===39||d===40?(t.enter(r),t.enter(n),t.consume(d),t.exit(n),s=d===40?41:d,l):i(d)}function l(d){return d===s?(t.enter(n),t.consume(d),t.exit(n),t.exit(r),e):(t.enter(o),c(d))}function c(d){return d===s?(t.exit(o),l(s)):d===null?i(d):Te(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Ie(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===s||d===null||Te(d)?(t.exit("chunkString"),c(d)):(t.consume(d),d===92?f:u)}function f(d){return d===s||d===92?(t.consume(d),u):u(d)}}function gs(t,e){let i;return r;function r(n){return Te(n)?(t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),i=!0,r):Le(n)?Ie(t,r,i?"linePrefix":"lineSuffix")(n):e(n)}}var Yg={name:"definition",tokenize:fD},uD={tokenize:hD,partial:!0};function fD(t,e,i){let r=this,n;return o;function o(p){return t.enter("definition"),s(p)}function s(p){return Uh.call(r,t,a,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return n=Pn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),l):i(p)}function l(p){return It(p)?gs(t,c)(p):c(p)}function c(p){return Mh(t,u,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return t.attempt(uD,f,f)(p)}function f(p){return Le(p)?Ie(t,d,"whitespace")(p):d(p)}function d(p){return p===null||Te(p)?(t.exit("definition"),r.parser.defined.push(n),e(p)):i(p)}}function hD(t,e,i){return r;function r(a){return It(a)?gs(t,n)(a):i(a)}function n(a){return zh(t,o,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Le(a)?Ie(t,s,"whitespace")(a):s(a)}function s(a){return a===null||Te(a)?e(a):i(a)}}var Fg={name:"hardBreakEscape",tokenize:dD};function dD(t,e,i){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),n}function n(o){return Te(o)?(t.exit("hardBreakEscape"),e(o)):i(o)}}var Hg={name:"headingAtx",tokenize:OD,resolve:pD};function pD(t,e){let i=t.length-2,r=3,n,o;return t[r][1].type==="whitespace"&&(r+=2),i-2>r&&t[i][1].type==="whitespace"&&(i-=2),t[i][1].type==="atxHeadingSequence"&&(r===i-1||i-4>r&&t[i-2][1].type==="whitespace")&&(i-=r+1===i?2:4),i>r&&(n={type:"atxHeadingText",start:t[r][1].start,end:t[i][1].end},o={type:"chunkText",start:t[r][1].start,end:t[i][1].end,contentType:"text"},oi(t,r,i-r+1,[["enter",n,e],["enter",o,e],["exit",o,e],["exit",n,e]])),t}function OD(t,e,i){let r=0;return n;function n(u){return t.enter("atxHeading"),o(u)}function o(u){return t.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&r++<6?(t.consume(u),s):u===null||It(u)?(t.exit("atxHeadingSequence"),a(u)):i(u)}function a(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||Te(u)?(t.exit("atxHeading"),e(u)):Le(u)?Ie(t,a,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||It(u)?(t.exit("atxHeadingText"),a(u)):(t.consume(u),c)}}var fT=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gg=["pre","script","style","textarea"];var Kg={name:"htmlFlow",tokenize:yD,resolveTo:bD,concrete:!0},mD={tokenize:vD,partial:!0},gD={tokenize:xD,partial:!0};function bD(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function yD(t,e,i){let r=this,n,o,s,a,l;return c;function c(D){return u(D)}function u(D){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(D),f}function f(D){return D===33?(t.consume(D),d):D===47?(t.consume(D),o=!0,x):D===63?(t.consume(D),n=3,r.interrupt?e:E):Hi(D)?(t.consume(D),s=String.fromCharCode(D),S):i(D)}function d(D){return D===45?(t.consume(D),n=2,p):D===91?(t.consume(D),n=5,a=0,g):Hi(D)?(t.consume(D),n=4,r.interrupt?e:E):i(D)}function p(D){return D===45?(t.consume(D),r.interrupt?e:E):i(D)}function g(D){let Ue="CDATA[";return D===Ue.charCodeAt(a++)?(t.consume(D),a===Ue.length?r.interrupt?e:ue:g):i(D)}function x(D){return Hi(D)?(t.consume(D),s=String.fromCharCode(D),S):i(D)}function S(D){if(D===null||D===47||D===62||It(D)){let Ue=D===47,Ze=s.toLowerCase();return!Ue&&!o&&Gg.includes(Ze)?(n=1,r.interrupt?e(D):ue(D)):fT.includes(s.toLowerCase())?(n=6,Ue?(t.consume(D),w):r.interrupt?e(D):ue(D)):(n=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(D):o?T(D):$(D))}return D===45||Ci(D)?(t.consume(D),s+=String.fromCharCode(D),S):i(D)}function w(D){return D===62?(t.consume(D),r.interrupt?e:ue):i(D)}function T(D){return Le(D)?(t.consume(D),T):U(D)}function $(D){return D===47?(t.consume(D),U):D===58||D===95||Hi(D)?(t.consume(D),I):Le(D)?(t.consume(D),$):U(D)}function I(D){return D===45||D===46||D===58||D===95||Ci(D)?(t.consume(D),I):_(D)}function _(D){return D===61?(t.consume(D),A):Le(D)?(t.consume(D),_):$(D)}function A(D){return D===null||D===60||D===61||D===62||D===96?i(D):D===34||D===39?(t.consume(D),l=D,q):Le(D)?(t.consume(D),A):le(D)}function q(D){return D===l?(t.consume(D),l=null,F):D===null||Te(D)?i(D):(t.consume(D),q)}function le(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||It(D)?_(D):(t.consume(D),le)}function F(D){return D===47||D===62||Le(D)?$(D):i(D)}function U(D){return D===62?(t.consume(D),ie):i(D)}function ie(D){return D===null||Te(D)?ue(D):Le(D)?(t.consume(D),ie):i(D)}function ue(D){return D===45&&n===2?(t.consume(D),we):D===60&&n===1?(t.consume(D),j):D===62&&n===4?(t.consume(D),B):D===63&&n===3?(t.consume(D),E):D===93&&n===5?(t.consume(D),V):Te(D)&&(n===6||n===7)?(t.exit("htmlFlowData"),t.check(mD,ne,re)(D)):D===null||Te(D)?(t.exit("htmlFlowData"),re(D)):(t.consume(D),ue)}function re(D){return t.check(gD,de,ne)(D)}function de(D){return t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),me}function me(D){return D===null||Te(D)?re(D):(t.enter("htmlFlowData"),ue(D))}function we(D){return D===45?(t.consume(D),E):ue(D)}function j(D){return D===47?(t.consume(D),s="",ae):ue(D)}function ae(D){if(D===62){let Ue=s.toLowerCase();return Gg.includes(Ue)?(t.consume(D),B):ue(D)}return Hi(D)&&s.length<8?(t.consume(D),s+=String.fromCharCode(D),ae):ue(D)}function V(D){return D===93?(t.consume(D),E):ue(D)}function E(D){return D===62?(t.consume(D),B):D===45&&n===2?(t.consume(D),E):ue(D)}function B(D){return D===null||Te(D)?(t.exit("htmlFlowData"),ne(D)):(t.consume(D),B)}function ne(D){return t.exit("htmlFlow"),e(D)}}function xD(t,e,i){let r=this;return n;function n(s){return Te(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):i(s)}function o(s){return r.parser.lazy[r.now().line]?i(s):e(s)}}function vD(t,e,i){return r;function r(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),t.attempt(vo,e,i)}}var Jg={name:"htmlText",tokenize:wD};function wD(t,e,i){let r=this,n,o,s;return a;function a(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),l}function l(E){return E===33?(t.consume(E),c):E===47?(t.consume(E),_):E===63?(t.consume(E),$):Hi(E)?(t.consume(E),le):i(E)}function c(E){return E===45?(t.consume(E),u):E===91?(t.consume(E),o=0,g):Hi(E)?(t.consume(E),T):i(E)}function u(E){return E===45?(t.consume(E),p):i(E)}function f(E){return E===null?i(E):E===45?(t.consume(E),d):Te(E)?(s=f,j(E)):(t.consume(E),f)}function d(E){return E===45?(t.consume(E),p):f(E)}function p(E){return E===62?we(E):E===45?d(E):f(E)}function g(E){let B="CDATA[";return E===B.charCodeAt(o++)?(t.consume(E),o===B.length?x:g):i(E)}function x(E){return E===null?i(E):E===93?(t.consume(E),S):Te(E)?(s=x,j(E)):(t.consume(E),x)}function S(E){return E===93?(t.consume(E),w):x(E)}function w(E){return E===62?we(E):E===93?(t.consume(E),w):x(E)}function T(E){return E===null||E===62?we(E):Te(E)?(s=T,j(E)):(t.consume(E),T)}function $(E){return E===null?i(E):E===63?(t.consume(E),I):Te(E)?(s=$,j(E)):(t.consume(E),$)}function I(E){return E===62?we(E):$(E)}function _(E){return Hi(E)?(t.consume(E),A):i(E)}function A(E){return E===45||Ci(E)?(t.consume(E),A):q(E)}function q(E){return Te(E)?(s=q,j(E)):Le(E)?(t.consume(E),q):we(E)}function le(E){return E===45||Ci(E)?(t.consume(E),le):E===47||E===62||It(E)?F(E):i(E)}function F(E){return E===47?(t.consume(E),we):E===58||E===95||Hi(E)?(t.consume(E),U):Te(E)?(s=F,j(E)):Le(E)?(t.consume(E),F):we(E)}function U(E){return E===45||E===46||E===58||E===95||Ci(E)?(t.consume(E),U):ie(E)}function ie(E){return E===61?(t.consume(E),ue):Te(E)?(s=ie,j(E)):Le(E)?(t.consume(E),ie):F(E)}function ue(E){return E===null||E===60||E===61||E===62||E===96?i(E):E===34||E===39?(t.consume(E),n=E,re):Te(E)?(s=ue,j(E)):Le(E)?(t.consume(E),ue):(t.consume(E),de)}function re(E){return E===n?(t.consume(E),n=void 0,me):E===null?i(E):Te(E)?(s=re,j(E)):(t.consume(E),re)}function de(E){return E===null||E===34||E===39||E===60||E===61||E===96?i(E):E===47||E===62||It(E)?F(E):(t.consume(E),de)}function me(E){return E===47||E===62||It(E)?F(E):i(E)}function we(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),e):i(E)}function j(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),ae}function ae(E){return Le(E)?Ie(t,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):V(E)}function V(E){return t.enter("htmlTextData"),s(E)}}var bs={name:"labelEnd",tokenize:PD,resolveTo:CD,resolveAll:ED},kD={tokenize:_D},SD={tokenize:QD},TD={tokenize:AD};function ED(t){let e=-1;for(;++e=3&&(c===null||Te(c))?(t.exit("thematicBreak"),e(c)):i(c)}function l(c){return c===n?(t.consume(c),r++,l):(t.exit("thematicBreakSequence"),Le(c)?Ie(t,a,"whitespace")(c):a(c))}}var Oi={name:"list",tokenize:ND,continuation:{tokenize:MD},exit:zD},ID={tokenize:jD,partial:!0},DD={tokenize:UD,partial:!0};function ND(t,e,i){let r=this,n=r.events[r.events.length-1],o=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,s=0;return a;function a(p){let g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:yc(p)){if(r.containerState.type||(r.containerState.type=g,t.enter(g,{_container:!0})),g==="listUnordered")return t.enter("listItemPrefix"),p===42||p===45?t.check(ys,i,c)(p):c(p);if(!r.interrupt||p===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(p)}return i(p)}function l(p){return yc(p)&&++s<10?(t.consume(p),l):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(t.exit("listItemValue"),c(p)):i(p)}function c(p){return t.enter("listItemMarker"),t.consume(p),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,t.check(vo,r.interrupt?i:u,t.attempt(ID,d,f))}function u(p){return r.containerState.initialBlankLine=!0,o++,d(p)}function f(p){return Le(p)?(t.enter("listItemPrefixWhitespace"),t.consume(p),t.exit("listItemPrefixWhitespace"),d):i(p)}function d(p){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(p)}}function MD(t,e,i){let r=this;return r.containerState._closeFlow=void 0,t.check(vo,n,o);function n(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ie(t,e,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!Le(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(DD,e,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ie(t,t.attempt(Oi,e,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function UD(t,e,i){let r=this;return Ie(t,n,"listItemIndent",r.containerState.size+1);function n(o){let s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?e(o):i(o)}}function zD(t){t.exit(this.containerState.type)}function jD(t,e,i){let r=this;return Ie(t,n,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(o){let s=r.events[r.events.length-1];return!Le(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):i(o)}}var jh={name:"setextUnderline",tokenize:WD,resolveTo:qD};function qD(t,e){let i=t.length,r,n,o;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){r=i;break}t[i][1].type==="paragraph"&&(n=i)}else t[i][1].type==="content"&&t.splice(i,1),!o&&t[i][1].type==="definition"&&(o=i);let s={type:"setextHeading",start:Object.assign({},t[n][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[n][1].type="setextHeadingText",o?(t.splice(n,0,["enter",s,e]),t.splice(o+1,0,["exit",t[r][1],e]),t[r][1].end=Object.assign({},t[o][1].end)):t[r][1]=s,t.push(["exit",s,e]),t}function WD(t,e,i){let r=this,n;return o;function o(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),n=c,s(c)):i(c)}function s(c){return t.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===n?(t.consume(c),a):(t.exit("setextHeadingLineSequence"),Le(c)?Ie(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Te(c)?(t.exit("setextHeadingLine"),e(c)):i(c)}}var hT={tokenize:BD};function BD(t){let e=this,i=t.attempt(vo,r,t.attempt(this.parser.constructs.flowInitial,n,Ie(t,t.attempt(this.parser.constructs.flow,n,t.attempt(Vg,n)),"linePrefix")));return i;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,i}function n(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,i}}var dT={resolveAll:gT()},pT=mT("string"),OT=mT("text");function mT(t){return{tokenize:e,resolveAll:gT(t==="text"?ZD:void 0)};function e(i){let r=this,n=this.parser.constructs[t],o=i.attempt(n,s,a);return s;function s(u){return c(u)?o(u):a(u)}function a(u){if(u===null){i.consume(u);return}return i.enter("data"),i.consume(u),l}function l(u){return c(u)?(i.exit("data"),o(u)):(i.consume(u),l)}function c(u){if(u===null)return!0;let f=n[u],d=-1;if(f)for(;++d-1){let a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(t[n].slice(0,o))}return s}function YD(t,e){let i=-1,r=[],n;for(;++it9,contentInitial:()=>FD,disable:()=>i9,document:()=>YD,flow:()=>GD,flowInitial:()=>HD,insideSpan:()=>e9,string:()=>KD,text:()=>JD});var YD={42:Oi,43:Oi,45:Oi,48:Oi,49:Oi,50:Oi,51:Oi,52:Oi,53:Oi,54:Oi,55:Oi,56:Oi,57:Oi,62:Rh},FD={91:Yg},HD={[-2]:vc,[-1]:vc,32:vc},GD={35:Hg,42:ys,45:[jh,ys],60:Kg,61:jh,95:ys,96:Dh,126:Dh},KD={38:Ih,92:Lh},JD={[-5]:wc,[-4]:wc,[-3]:wc,33:e0,38:Ih,42:xc,60:[Bg,Jg],91:t0,92:[Fg,Lh],93:bs,95:xc,96:Zg},e9={null:[xc,dT]},t9={null:[42,95]},i9={null:[]};function r0(t){let i=tT([i0,...(t||{}).extensions||[]]),r={defined:[],lazy:{},constructs:i,content:n(sT),document:n(lT),flow:n(hT),string:n(pT),text:n(OT)};return r;function n(o){return s;function s(a){return bT(r,o,a)}}}function n0(t){for(;!Mh(t););return t}var yT=/[\0\t\n\r]/g;function o0(){let t=1,e="",i=!0,r;return n;function n(o,s,a){let l=[],c,u,f,d,p;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,e="",i&&(o.charCodeAt(0)===65279&&f++,i=void 0);f0){let Vi=Ee.tokenStack[Ee.tokenStack.length-1];(Vi[1]||kT).call(Ee,void 0,Vi[0])}for(ye.position={start:wo(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:wo(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e-1&&t.test(String.fromCharCode(i))}}function l0(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var en=function(t){if(t==null)return h9;if(typeof t=="function")return Wh(t);if(typeof t=="object")return Array.isArray(t)?c9(t):u9(t);if(typeof t=="string")return f9(t);throw new Error("Expected function, string, or object as test")};function c9(t){let e=[],i=-1;for(;++i":""))+")"})}return d;function d(){let p=PT,g,x,S;if((!e||o(l,c,u[u.length-1]||void 0))&&(p=p9(i(l,u)),p[0]===xs))return p;if("children"in l&&l.children){let w=l;if(w.children&&p[0]!==Xa)for(x=(r?w.children.length:-1)+s,S=u.concat(w);x>-1&&x0?{type:"text",value:A}:void 0),A===!1?d.lastIndex=I+1:(g!==I&&T.push({type:"text",value:c.value.slice(g,I)}),Array.isArray(A)?T.push(...A):A&&T.push(A),g=I+$[0].length,w=!0),!d.global)break;$=d.exec(c.value)}return w?(g?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let i=e[0],r=i.indexOf(")"),n=$a(t,"("),o=$a(t,")");for(;r!==-1&&n>o;)t+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),o++;return[t,i]}function _T(t,e){let i=t.input.charCodeAt(t.index-1);return(t.index===0||CT(i)||ET(i))&&(!e||i!==47)}function O0(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}QT.peek=I9;function m0(){return{enter:{gfmFootnoteDefinition:P9,gfmFootnoteDefinitionLabelString:_9,gfmFootnoteCall:$9,gfmFootnoteCallString:X9},exit:{gfmFootnoteDefinition:A9,gfmFootnoteDefinitionLabelString:Q9,gfmFootnoteCall:L9,gfmFootnoteCallString:R9}}}function g0(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:D9,footnoteReference:QT}}}function P9(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function _9(){this.buffer()}function Q9(t){let e=this.resume(),i=this.stack[this.stack.length-1];i.type,i.label=e,i.identifier=O0(this.sliceSerialize(t)).toLowerCase()}function A9(t){this.exit(t)}function $9(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function X9(){this.buffer()}function R9(t){let e=this.resume(),i=this.stack[this.stack.length-1];i.type,i.label=e,i.identifier=O0(this.sliceSerialize(t)).toLowerCase()}function L9(t){this.exit(t)}function QT(t,e,i,r){let n=i.createTracker(r),o=n.move("[^"),s=i.enter("footnoteReference"),a=i.enter("reference");return o+=n.move(i.safe(i.associationId(t),Ce(H({},n.current()),{before:o,after:"]"}))),a(),s(),o+=n.move("]"),o}function I9(){return"["}function D9(t,e,i,r){let n=i.createTracker(r),o=n.move("[^"),s=i.enter("footnoteDefinition"),a=i.enter("label");return o+=n.move(i.safe(i.associationId(t),Ce(H({},n.current()),{before:o,after:"]"}))),a(),o+=n.move("]:"+(t.children&&t.children.length>0?" ":"")),n.shift(4),o+=n.move(i.indentLines(i.containerFlow(t,n.current()),M9)),s(),o}function M9(t,e,i){return e===0?t:(i?"":" ")+t}var N9=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];AT.peek=j9;function b0(){return{canContainEols:["delete"],enter:{strikethrough:U9},exit:{strikethrough:z9}}}function y0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:N9}],handlers:{delete:AT}}}function U9(t){this.enter({type:"delete",children:[]},t)}function z9(t){this.exit(t)}function AT(t,e,i,r){let n=i.createTracker(r),o=i.enter("strikethrough"),s=n.move("~~");return s+=i.containerPhrasing(t,Ce(H({},n.current()),{before:s,after:"~"})),s+=n.move("~~"),o(),s}function j9(){return"~"}function XT(t,e={}){let i=(e.align||[]).concat(),r=e.stringLength||W9,n=[],o=[],s=[],a=[],l=0,c=-1;for(;++cl&&(l=t[c].length);++Sa[S])&&(a[S]=T)}g.push(w)}o[c]=g,s[c]=x}let u=-1;if(typeof i=="object"&&"length"in i)for(;++ua[u]&&(a[u]=w),d[u]=w),f[u]=T}o.splice(1,0,f),s.splice(1,0,d),c=-1;let p=[];for(;++c "),o.shift(2);let s=i.indentLines(i.containerFlow(t,o.current()),B9);return n(),s}function B9(t,e,i){return">"+(i?"":" ")+t}function DT(t,e){return IT(t,e.inConstruct,!0)&&!IT(t,e.notInConstruct,!1)}function IT(t,e,i){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return i;let r=-1;for(;++ri9,contentInitial:()=>HD,disable:()=>r9,document:()=>FD,flow:()=>KD,flowInitial:()=>GD,insideSpan:()=>t9,string:()=>JD,text:()=>e9});var FD={42:Oi,43:Oi,45:Oi,48:Oi,49:Oi,50:Oi,51:Oi,52:Oi,53:Oi,54:Oi,55:Oi,56:Oi,57:Oi,62:Rh},HD={91:Yg},GD={[-2]:vc,[-1]:vc,32:vc},KD={35:Hg,42:ys,45:[jh,ys],60:Kg,61:jh,95:ys,96:Dh,126:Dh},JD={38:Ih,92:Lh},e9={[-5]:wc,[-4]:wc,[-3]:wc,33:e0,38:Ih,42:xc,60:[Bg,Jg],91:t0,92:[Fg,Lh],93:bs,95:xc,96:Zg},t9={null:[xc,dT]},i9={null:[42,95]},r9={null:[]};function r0(t){let i=tT([i0,...(t||{}).extensions||[]]),r={defined:[],lazy:{},constructs:i,content:n(sT),document:n(lT),flow:n(hT),string:n(pT),text:n(OT)};return r;function n(o){return s;function s(a){return bT(r,o,a)}}}function n0(t){for(;!Nh(t););return t}var yT=/[\0\t\n\r]/g;function o0(){let t=1,e="",i=!0,r;return n;function n(o,s,a){let l=[],c,u,f,d,p;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,e="",i&&(o.charCodeAt(0)===65279&&f++,i=void 0);f0){let Vi=Ee.tokenStack[Ee.tokenStack.length-1];(Vi[1]||kT).call(Ee,void 0,Vi[0])}for(ye.position={start:wo(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:wo(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e-1&&t.test(String.fromCharCode(i))}}function l0(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var en=function(t){if(t==null)return d9;if(typeof t=="function")return Wh(t);if(typeof t=="object")return Array.isArray(t)?u9(t):f9(t);if(typeof t=="string")return h9(t);throw new Error("Expected function, string, or object as test")};function u9(t){let e=[],i=-1;for(;++i":""))+")"})}return d;function d(){let p=PT,g,x,S;if((!e||o(l,c,u[u.length-1]||void 0))&&(p=O9(i(l,u)),p[0]===xs))return p;if("children"in l&&l.children){let w=l;if(w.children&&p[0]!==Xa)for(x=(r?w.children.length:-1)+s,S=u.concat(w);x>-1&&x0?{type:"text",value:A}:void 0),A===!1?d.lastIndex=I+1:(g!==I&&T.push({type:"text",value:c.value.slice(g,I)}),Array.isArray(A)?T.push(...A):A&&T.push(A),g=I+$[0].length,w=!0),!d.global)break;$=d.exec(c.value)}return w?(g?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let i=e[0],r=i.indexOf(")"),n=$a(t,"("),o=$a(t,")");for(;r!==-1&&n>o;)t+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),o++;return[t,i]}function _T(t,e){let i=t.input.charCodeAt(t.index-1);return(t.index===0||CT(i)||ET(i))&&(!e||i!==47)}function O0(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}QT.peek=D9;function m0(){return{enter:{gfmFootnoteDefinition:_9,gfmFootnoteDefinitionLabelString:Q9,gfmFootnoteCall:X9,gfmFootnoteCallString:R9},exit:{gfmFootnoteDefinition:$9,gfmFootnoteDefinitionLabelString:A9,gfmFootnoteCall:I9,gfmFootnoteCallString:L9}}}function g0(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:N9,footnoteReference:QT}}}function _9(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Q9(){this.buffer()}function A9(t){let e=this.resume(),i=this.stack[this.stack.length-1];i.type,i.label=e,i.identifier=O0(this.sliceSerialize(t)).toLowerCase()}function $9(t){this.exit(t)}function X9(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function R9(){this.buffer()}function L9(t){let e=this.resume(),i=this.stack[this.stack.length-1];i.type,i.label=e,i.identifier=O0(this.sliceSerialize(t)).toLowerCase()}function I9(t){this.exit(t)}function QT(t,e,i,r){let n=i.createTracker(r),o=n.move("[^"),s=i.enter("footnoteReference"),a=i.enter("reference");return o+=n.move(i.safe(i.associationId(t),Ce(H({},n.current()),{before:o,after:"]"}))),a(),s(),o+=n.move("]"),o}function D9(){return"["}function N9(t,e,i,r){let n=i.createTracker(r),o=n.move("[^"),s=i.enter("footnoteDefinition"),a=i.enter("label");return o+=n.move(i.safe(i.associationId(t),Ce(H({},n.current()),{before:o,after:"]"}))),a(),o+=n.move("]:"+(t.children&&t.children.length>0?" ":"")),n.shift(4),o+=n.move(i.indentLines(i.containerFlow(t,n.current()),M9)),s(),o}function M9(t,e,i){return e===0?t:(i?"":" ")+t}var U9=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];AT.peek=q9;function b0(){return{canContainEols:["delete"],enter:{strikethrough:z9},exit:{strikethrough:j9}}}function y0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:U9}],handlers:{delete:AT}}}function z9(t){this.enter({type:"delete",children:[]},t)}function j9(t){this.exit(t)}function AT(t,e,i,r){let n=i.createTracker(r),o=i.enter("strikethrough"),s=n.move("~~");return s+=i.containerPhrasing(t,Ce(H({},n.current()),{before:s,after:"~"})),s+=n.move("~~"),o(),s}function q9(){return"~"}function XT(t,e={}){let i=(e.align||[]).concat(),r=e.stringLength||B9,n=[],o=[],s=[],a=[],l=0,c=-1;for(;++cl&&(l=t[c].length);++Sa[S])&&(a[S]=T)}g.push(w)}o[c]=g,s[c]=x}let u=-1;if(typeof i=="object"&&"length"in i)for(;++ua[u]&&(a[u]=w),d[u]=w),f[u]=T}o.splice(1,0,f),s.splice(1,0,d),c=-1;let p=[];for(;++c "),o.shift(2);let s=i.indentLines(i.containerFlow(t,o.current()),Z9);return n(),s}function Z9(t,e,i){return">"+(i?"":" ")+t}function DT(t,e){return IT(t,e.inConstruct,!0)&&!IT(t,e.notInConstruct,!1)}function IT(t,e,i){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return i;let r=-1;for(;++rs&&(s=o):o=1,n=r+e.length,r=i.indexOf(e,n);return s}function MT(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function NT(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function UT(t,e,i,r){let n=NT(i),o=t.value||"",s=n==="`"?"GraveAccent":"Tilde";if(MT(t,i)){let f=i.enter("codeIndented"),d=i.indentLines(o,Z9);return f(),d}let a=i.createTracker(r),l=n.repeat(Math.max(Zh(o,n)+1,3)),c=i.enter("codeFenced"),u=a.move(l);if(t.lang){let f=i.enter(`codeFencedLang${s}`);u+=a.move(i.safe(t.lang,H({before:u,after:" ",encode:["`"]},a.current()))),f()}if(t.lang&&t.meta){let f=i.enter(`codeFencedMeta${s}`);u+=a.move(" "),u+=a.move(i.safe(t.meta,H({before:u,after:` +`}function Zh(t,e){let i=String(t),r=i.indexOf(e),n=r,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===n?++o>s&&(s=o):o=1,n=r+e.length,r=i.indexOf(e,n);return s}function NT(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function MT(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function UT(t,e,i,r){let n=MT(i),o=t.value||"",s=n==="`"?"GraveAccent":"Tilde";if(NT(t,i)){let f=i.enter("codeIndented"),d=i.indentLines(o,V9);return f(),d}let a=i.createTracker(r),l=n.repeat(Math.max(Zh(o,n)+1,3)),c=i.enter("codeFenced"),u=a.move(l);if(t.lang){let f=i.enter(`codeFencedLang${s}`);u+=a.move(i.safe(t.lang,H({before:u,after:" ",encode:["`"]},a.current()))),f()}if(t.lang&&t.meta){let f=i.enter(`codeFencedMeta${s}`);u+=a.move(" "),u+=a.move(i.safe(t.meta,H({before:u,after:` `,encode:["`"]},a.current()))),f()}return u+=a.move(` `),o&&(u+=a.move(o+` -`)),u+=a.move(l),c(),u}function Z9(t,e,i){return(i?"":" ")+t}function La(t){let e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function zT(t,e,i,r){let n=La(i),o=n==='"'?"Quote":"Apostrophe",s=i.enter("definition"),a=i.enter("label"),l=i.createTracker(r),c=l.move("[");return c+=l.move(i.safe(i.associationId(t),H({before:c,after:"]"},l.current()))),c+=l.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=i.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(i.safe(t.url,H({before:c,after:">"},l.current()))),c+=l.move(">")):(a=i.enter("destinationRaw"),c+=l.move(i.safe(t.url,H({before:c,after:t.title?" ":` -`},l.current())))),a(),t.title&&(a=i.enter(`title${o}`),c+=l.move(" "+n),c+=l.move(i.safe(t.title,H({before:c,after:n},l.current()))),c+=l.move(n),a()),s(),c}function jT(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}v0.peek=V9;function v0(t,e,i,r){let n=jT(i),o=i.enter("emphasis"),s=i.createTracker(r),a=s.move(n);return a+=s.move(i.containerPhrasing(t,H({before:a,after:n},s.current()))),a+=s.move(n),o(),a}function V9(t,e,i){return i.options.emphasis||"*"}function mi(t,e,i,r){let n,o,s;typeof e=="function"&&typeof i!="function"?(o=void 0,s=e,n=i):(o=e,s=i,n=r),vs(t,o,a,n);function a(l,c){let u=c[c.length-1],f=u?u.children.indexOf(l):void 0;return s(l,f,u)}}var Y9={};function kc(t,e){let i=e||Y9,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,n=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return WT(t,r,n)}function WT(t,e,i){if(F9(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return qT(t.children,e,i)}return Array.isArray(t)?qT(t,e,i):""}function qT(t,e,i){let r=[],n=-1;for(;++n"},l.current()))),c+=l.move(">")):(a=i.enter("destinationRaw"),c+=l.move(i.safe(t.url,H({before:c,after:t.title?" ":` +`},l.current())))),a(),t.title&&(a=i.enter(`title${o}`),c+=l.move(" "+n),c+=l.move(i.safe(t.title,H({before:c,after:n},l.current()))),c+=l.move(n),a()),s(),c}function jT(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}v0.peek=Y9;function v0(t,e,i,r){let n=jT(i),o=i.enter("emphasis"),s=i.createTracker(r),a=s.move(n);return a+=s.move(i.containerPhrasing(t,H({before:a,after:n},s.current()))),a+=s.move(n),o(),a}function Y9(t,e,i){return i.options.emphasis||"*"}function mi(t,e,i,r){let n,o,s;typeof e=="function"&&typeof i!="function"?(o=void 0,s=e,n=i):(o=e,s=i,n=r),vs(t,o,a,n);function a(l,c){let u=c[c.length-1],f=u?u.children.indexOf(l):void 0;return s(l,f,u)}}var F9={};function kc(t,e){let i=e||F9,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,n=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return WT(t,r,n)}function WT(t,e,i){if(H9(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return qT(t.children,e,i)}return Array.isArray(t)?qT(t,e,i):""}function qT(t,e,i){let r=[],n=-1;for(;++n"},l.current()))),c+=l.move(">")):(a=i.enter("destinationRaw"),c+=l.move(i.safe(t.url,H({before:c,after:t.title?" ":")"},l.current())))),a(),t.title&&(a=i.enter(`title${o}`),c+=l.move(" "+n),c+=l.move(i.safe(t.title,H({before:c,after:n},l.current()))),c+=l.move(n),a()),c+=l.move(")"),s(),c}function G9(){return"!"}S0.peek=K9;function S0(t,e,i,r){let n=t.referenceType,o=i.enter("imageReference"),s=i.enter("label"),a=i.createTracker(r),l=a.move("!["),c=i.safe(t.alt,H({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let u=i.stack;i.stack=[],s=i.enter("reference");let f=i.safe(i.associationId(t),H({before:l,after:"]"},a.current()));return s(),i.stack=u,o(),n==="full"||!c||c!==f?l+=a.move(f+"]"):n==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function K9(){return"!"}T0.peek=J9;function T0(t,e,i){let r=t.value||"",n="`",o=-1;for(;new RegExp("(^|[^`])"+n+"([^`]|$)").test(r);)n+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o\u007F]/.test(t.url))}C0.peek=eM;function C0(t,e,i,r){let n=La(i),o=n==='"'?"Quote":"Apostrophe",s=i.createTracker(r),a,l;if(E0(t,i)){let u=i.stack;i.stack=[],a=i.enter("autolink");let f=s.move("<");return f+=s.move(i.containerPhrasing(t,H({before:f,after:">"},s.current()))),f+=s.move(">"),a(),i.stack=u,f}a=i.enter("link"),l=i.enter("label");let c=s.move("[");return c+=s.move(i.containerPhrasing(t,H({before:c,after:"]("},s.current()))),c+=s.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=i.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(i.safe(t.url,H({before:c,after:">"},s.current()))),c+=s.move(">")):(l=i.enter("destinationRaw"),c+=s.move(i.safe(t.url,H({before:c,after:t.title?" ":")"},s.current())))),l(),t.title&&(l=i.enter(`title${o}`),c+=s.move(" "+n),c+=s.move(i.safe(t.title,H({before:c,after:n},s.current()))),c+=s.move(n),l()),c+=s.move(")"),a(),c}function eM(t,e,i){return E0(t,i)?"<":"["}P0.peek=tM;function P0(t,e,i,r){let n=t.referenceType,o=i.enter("linkReference"),s=i.enter("label"),a=i.createTracker(r),l=a.move("["),c=i.containerPhrasing(t,H({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let u=i.stack;i.stack=[],s=i.enter("reference");let f=i.safe(i.associationId(t),H({before:l,after:"]"},a.current()));return s(),i.stack=u,o(),n==="full"||!c||c!==f?l+=a.move(f+"]"):n==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function tM(){return"["}function Ia(t){let e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function VT(t){let e=Ia(t),i=t.options.bulletOther;if(!i)return e==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+i+"`) to be different");return i}function YT(t){let e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function Vh(t){let e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function FT(t,e,i,r){let n=i.enter("list"),o=i.bulletCurrent,s=t.ordered?YT(i):Ia(i),a=t.ordered?s==="."?")":".":VT(i),l=e&&i.bulletLastUsed?s===i.bulletLastUsed:!1;if(!t.ordered){let u=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&u&&(!u.children||!u.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(l=!0),Vh(i)===s&&u){let f=-1;for(;++f-1?e.start:1)+(i.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let s=o.length+1;(n==="tab"||n==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);let a=i.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);let l=i.enter("listItem"),c=i.indentLines(i.containerFlow(t,a.current()),u);return l(),c;function u(f,d,p){return d?(p?"":" ".repeat(s))+f:(p?o:o+" ".repeat(s-o.length))+f}}function KT(t,e,i,r){let n=i.enter("paragraph"),o=i.enter("phrasing"),s=i.containerPhrasing(t,r);return o(),n(),s}var _0=en(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function JT(t,e,i,r){return(t.children.some(function(s){return _0(s)})?i.containerPhrasing:i.containerFlow).call(i,t,r)}function e3(t){let e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Q0.peek=iM;function Q0(t,e,i,r){let n=e3(i),o=i.enter("strong"),s=i.createTracker(r),a=s.move(n+n);return a+=s.move(i.containerPhrasing(t,H({before:a,after:n},s.current()))),a+=s.move(n+n),o(),a}function iM(t,e,i){return i.options.strong||"*"}function t3(t,e,i,r){return i.safe(t.value,r)}function i3(t){let e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function r3(t,e,i){let r=(Vh(i)+(i.options.ruleSpaces?" ":"")).repeat(i3(i));return i.options.ruleSpaces?r.slice(0,-1):r}var Sc={blockquote:LT,break:x0,code:UT,definition:zT,emphasis:v0,hardBreak:x0,heading:ZT,html:w0,image:k0,imageReference:S0,inlineCode:T0,link:C0,linkReference:P0,list:FT,listItem:GT,paragraph:KT,root:JT,strong:Q0,text:t3,thematicBreak:r3};function $0(){return{enter:{table:rM,tableData:n3,tableHeader:n3,tableRow:oM},exit:{codeText:sM,table:nM,tableData:A0,tableHeader:A0,tableRow:A0}}}function rM(t){let e=t._align;this.enter({type:"table",align:e.map(function(i){return i==="none"?null:i}),children:[]},t),this.data.inTable=!0}function nM(t){this.exit(t),this.data.inTable=void 0}function oM(t){this.enter({type:"tableRow",children:[]},t)}function A0(t){this.exit(t)}function n3(t){this.enter({type:"tableCell",children:[]},t)}function sM(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,aM));let i=this.stack[this.stack.length-1];i.type,i.value=e,this.exit(t)}function aM(t,e){return e==="|"?e:t}function X0(t){let e=t||{},i=e.tableCellPadding,r=e.tablePipeAlign,n=e.stringLength,o=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`},o.current()));return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,i.options.closeAtx&&(c+=" "+s),l(),a(),c}w0.peek=G9;function w0(t){return t.value||""}function G9(){return"<"}k0.peek=K9;function k0(t,e,i,r){let n=La(i),o=n==='"'?"Quote":"Apostrophe",s=i.enter("image"),a=i.enter("label"),l=i.createTracker(r),c=l.move("![");return c+=l.move(i.safe(t.alt,H({before:c,after:"]"},l.current()))),c+=l.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=i.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(i.safe(t.url,H({before:c,after:">"},l.current()))),c+=l.move(">")):(a=i.enter("destinationRaw"),c+=l.move(i.safe(t.url,H({before:c,after:t.title?" ":")"},l.current())))),a(),t.title&&(a=i.enter(`title${o}`),c+=l.move(" "+n),c+=l.move(i.safe(t.title,H({before:c,after:n},l.current()))),c+=l.move(n),a()),c+=l.move(")"),s(),c}function K9(){return"!"}S0.peek=J9;function S0(t,e,i,r){let n=t.referenceType,o=i.enter("imageReference"),s=i.enter("label"),a=i.createTracker(r),l=a.move("!["),c=i.safe(t.alt,H({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let u=i.stack;i.stack=[],s=i.enter("reference");let f=i.safe(i.associationId(t),H({before:l,after:"]"},a.current()));return s(),i.stack=u,o(),n==="full"||!c||c!==f?l+=a.move(f+"]"):n==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function J9(){return"!"}T0.peek=eN;function T0(t,e,i){let r=t.value||"",n="`",o=-1;for(;new RegExp("(^|[^`])"+n+"([^`]|$)").test(r);)n+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o\u007F]/.test(t.url))}C0.peek=tN;function C0(t,e,i,r){let n=La(i),o=n==='"'?"Quote":"Apostrophe",s=i.createTracker(r),a,l;if(E0(t,i)){let u=i.stack;i.stack=[],a=i.enter("autolink");let f=s.move("<");return f+=s.move(i.containerPhrasing(t,H({before:f,after:">"},s.current()))),f+=s.move(">"),a(),i.stack=u,f}a=i.enter("link"),l=i.enter("label");let c=s.move("[");return c+=s.move(i.containerPhrasing(t,H({before:c,after:"]("},s.current()))),c+=s.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=i.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(i.safe(t.url,H({before:c,after:">"},s.current()))),c+=s.move(">")):(l=i.enter("destinationRaw"),c+=s.move(i.safe(t.url,H({before:c,after:t.title?" ":")"},s.current())))),l(),t.title&&(l=i.enter(`title${o}`),c+=s.move(" "+n),c+=s.move(i.safe(t.title,H({before:c,after:n},s.current()))),c+=s.move(n),l()),c+=s.move(")"),a(),c}function tN(t,e,i){return E0(t,i)?"<":"["}P0.peek=iN;function P0(t,e,i,r){let n=t.referenceType,o=i.enter("linkReference"),s=i.enter("label"),a=i.createTracker(r),l=a.move("["),c=i.containerPhrasing(t,H({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let u=i.stack;i.stack=[],s=i.enter("reference");let f=i.safe(i.associationId(t),H({before:l,after:"]"},a.current()));return s(),i.stack=u,o(),n==="full"||!c||c!==f?l+=a.move(f+"]"):n==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function iN(){return"["}function Ia(t){let e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function VT(t){let e=Ia(t),i=t.options.bulletOther;if(!i)return e==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+i+"`) to be different");return i}function YT(t){let e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function Vh(t){let e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function FT(t,e,i,r){let n=i.enter("list"),o=i.bulletCurrent,s=t.ordered?YT(i):Ia(i),a=t.ordered?s==="."?")":".":VT(i),l=e&&i.bulletLastUsed?s===i.bulletLastUsed:!1;if(!t.ordered){let u=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&u&&(!u.children||!u.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(l=!0),Vh(i)===s&&u){let f=-1;for(;++f-1?e.start:1)+(i.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let s=o.length+1;(n==="tab"||n==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);let a=i.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);let l=i.enter("listItem"),c=i.indentLines(i.containerFlow(t,a.current()),u);return l(),c;function u(f,d,p){return d?(p?"":" ".repeat(s))+f:(p?o:o+" ".repeat(s-o.length))+f}}function KT(t,e,i,r){let n=i.enter("paragraph"),o=i.enter("phrasing"),s=i.containerPhrasing(t,r);return o(),n(),s}var _0=en(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function JT(t,e,i,r){return(t.children.some(function(s){return _0(s)})?i.containerPhrasing:i.containerFlow).call(i,t,r)}function e3(t){let e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Q0.peek=rN;function Q0(t,e,i,r){let n=e3(i),o=i.enter("strong"),s=i.createTracker(r),a=s.move(n+n);return a+=s.move(i.containerPhrasing(t,H({before:a,after:n},s.current()))),a+=s.move(n+n),o(),a}function rN(t,e,i){return i.options.strong||"*"}function t3(t,e,i,r){return i.safe(t.value,r)}function i3(t){let e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function r3(t,e,i){let r=(Vh(i)+(i.options.ruleSpaces?" ":"")).repeat(i3(i));return i.options.ruleSpaces?r.slice(0,-1):r}var Sc={blockquote:LT,break:x0,code:UT,definition:zT,emphasis:v0,hardBreak:x0,heading:ZT,html:w0,image:k0,imageReference:S0,inlineCode:T0,link:C0,linkReference:P0,list:FT,listItem:GT,paragraph:KT,root:JT,strong:Q0,text:t3,thematicBreak:r3};function $0(){return{enter:{table:nN,tableData:n3,tableHeader:n3,tableRow:sN},exit:{codeText:aN,table:oN,tableData:A0,tableHeader:A0,tableRow:A0}}}function nN(t){let e=t._align;this.enter({type:"table",align:e.map(function(i){return i==="none"?null:i}),children:[]},t),this.data.inTable=!0}function oN(t){this.exit(t),this.data.inTable=void 0}function sN(t){this.enter({type:"tableRow",children:[]},t)}function A0(t){this.exit(t)}function n3(t){this.enter({type:"tableCell",children:[]},t)}function aN(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,lN));let i=this.stack[this.stack.length-1];i.type,i.value=e,this.exit(t)}function lN(t,e){return e==="|"?e:t}function X0(t){let e=t||{},i=e.tableCellPadding,r=e.tablePipeAlign,n=e.stringLength,o=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:s,tableCell:l,tableRow:a}};function s(p,g,x,S){return c(u(p,x,S),p.align)}function a(p,g,x,S){let w=f(p,x,S),T=c([w]);return T.slice(0,T.indexOf(` -`))}function l(p,g,x,S){let w=x.enter("tableCell"),T=x.enter("phrasing"),$=x.containerPhrasing(p,Ce(H({},S),{before:o,after:o}));return T(),w(),$}function c(p,g){return XT(p,{align:g,alignDelimiters:r,padding:i,stringLength:n})}function u(p,g,x){let S=p.children,w=-1,T=[],$=g.enter("table");for(;++wn?0:n+e:e=e>n?n:e,i=i>0?i:0,r.length<1e4)s=Array.from(r),s.unshift(e,i),t.splice(...s);else for(i&&t.splice(e,i);o-1&&t.test(String.fromCharCode(i))}}var pM={tokenize:yM,partial:!0},u3={tokenize:xM,partial:!0},f3={tokenize:vM,partial:!0},h3={tokenize:wM,partial:!0},OM={tokenize:kM,partial:!0},d3={tokenize:gM,previous:O3},p3={tokenize:bM,previous:m3},_n={tokenize:mM,previous:g3},tn={};function U0(){return{text:tn}}var ks=48;for(;ks<123;)tn[ks]=_n,ks++,ks===58?ks=65:ks===91&&(ks=97);tn[43]=_n;tn[45]=_n;tn[46]=_n;tn[95]=_n;tn[72]=[_n,p3];tn[104]=[_n,p3];tn[87]=[_n,d3];tn[119]=[_n,d3];function mM(t,e,i){let r=this,n,o;return s;function s(f){return!N0(f)||!g3.call(r,r.previous)||z0(r.events)?i(f):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(f))}function a(f){return N0(f)?(t.consume(f),a):f===64?(t.consume(f),l):i(f)}function l(f){return f===46?t.check(OM,u,c)(f):f===45||f===95||Yh(f)?(o=!0,t.consume(f),l):u(f)}function c(f){return t.consume(f),n=!0,l}function u(f){return o&&n&&Da(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(f)):i(f)}}function gM(t,e,i){let r=this;return n;function n(s){return s!==87&&s!==119||!O3.call(r,r.previous)||z0(r.events)?i(s):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(pM,t.attempt(u3,t.attempt(f3,o),i),i)(s))}function o(s){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(s)}}function bM(t,e,i){let r=this,n="",o=!1;return s;function s(f){return(f===72||f===104)&&m3.call(r,r.previous)&&!z0(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),n+=String.fromCodePoint(f),t.consume(f),a):i(f)}function a(f){if(Da(f)&&n.length<5)return n+=String.fromCodePoint(f),t.consume(f),a;if(f===58){let d=n.toLowerCase();if(d==="http"||d==="https")return t.consume(f),l}return i(f)}function l(f){return f===47?(t.consume(f),o?c:(o=!0,l)):i(f)}function c(f){return f===null||c3(f)||ws(f)||Ma(f)||M0(f)?i(f):t.attempt(u3,t.attempt(f3,u),i)(f)}function u(f){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(f)}}function yM(t,e,i){let r=0;return n;function n(s){return(s===87||s===119)&&r<3?(r++,t.consume(s),n):s===46&&r===3?(t.consume(s),o):i(s)}function o(s){return s===null?i(s):e(s)}}function xM(t,e,i){let r,n,o;return s;function s(c){return c===46||c===95?t.check(h3,l,a)(c):c===null||ws(c)||Ma(c)||c!==45&&M0(c)?l(c):(o=!0,t.consume(c),s)}function a(c){return c===95?r=!0:(n=r,r=void 0),t.consume(c),s}function l(c){return n||r||!o?i(c):e(c)}}function vM(t,e){let i=0,r=0;return n;function n(s){return s===40?(i++,t.consume(s),n):s===41&&r0&&!i&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}var yhe=To(new RegExp("\\p{P}","u")),xhe=To(/[A-Za-z]/),vhe=To(/[\dA-Za-z]/),whe=To(/[#-'*+\--9=?A-Z^-~]/);var khe=To(/\d/),She=To(/[\dA-Fa-f]/),The=To(/[!-/:-@[-`{-~]/);function b3(t){return t!==null&&t<-2}function Tc(t){return t!==null&&(t<0||t===32)}function Ec(t){return t===-2||t===-1||t===32}var Ehe=To(/\s/);function To(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Cc(t,e,i,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Ec(l)?(t.enter(i),a(l)):e(l)}function a(l){return Ec(l)&&o++999||f===93&&!s||f===null||f===91||Tc(f))return i(f);if(f===93){t.exit("chunkString");let d=t.exit("gfmFootnoteCallString");return n.includes(Fh(r.sliceSerialize(d)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):i(f)}return Tc(f)||(s=!0),o++,t.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(t.consume(f),o++,c):c(f)}}function _M(t,e,i){let r=this,n=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(g){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):i(g)}function u(g){if(s>999||g===93&&!a||g===null||g===91||Tc(g))return i(g);if(g===93){t.exit("chunkString");let x=t.exit("gfmFootnoteDefinitionLabelString");return o=Fh(r.sliceSerialize(x)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),d}return Tc(g)||(a=!0),s++,t.consume(g),g===92?f:u}function f(g){return g===91||g===92||g===93?(t.consume(g),s++,u):u(g)}function d(g){return g===58?(t.enter("definitionMarker"),t.consume(g),t.exit("definitionMarker"),n.includes(o)||n.push(o),Cc(t,p,"gfmFootnoteDefinitionWhitespace")):i(g)}function p(g){return e(g)}}function QM(t,e,i){return t.check(j0,e,t.attempt(TM,e,i))}function AM(t){t.exit("gfmFootnoteDefinition")}function $M(t,e,i){let r=this;return Cc(t,n,"gfmFootnoteDefinitionIndent",5);function n(o){let s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):i(o)}}function Hh(t,e,i,r){let n=t.length,o=0,s;if(e<0?e=-e>n?0:n+e:e=e>n?n:e,i=i>0?i:0,r.length<1e4)s=Array.from(r),s.unshift(e,i),t.splice(...s);else for(i&&t.splice(e,i);o-1&&t.test(String.fromCharCode(i))}}function W0(t){if(t===null||y3(t)||v3(t))return 1;if(x3(t))return 2}function w3(t,e,i){let r=[],n=-1;for(;++n1?l(g):(s.consume(g),f++,p);if(f<2&&!i)return l(g);let S=s.exit("strikethroughSequenceTemporary"),w=W0(g);return S._open=!w||w===2&&!!x,S._close=!x||x===2&&!!w,a(g)}}}var ode=Co(new RegExp("\\p{P}","u")),sde=Co(/[A-Za-z]/),ade=Co(/[\dA-Za-z]/),lde=Co(/[#-'*+\--9=?A-Z^-~]/);var cde=Co(/\d/),ude=Co(/[\dA-Fa-f]/),fde=Co(/[!-/:-@[-`{-~]/);function Pc(t){return t!==null&&t<-2}function Z0(t){return t!==null&&(t<0||t===32)}function Qn(t){return t===-2||t===-1||t===32}var hde=Co(/\s/);function Co(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Na(t,e,i,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Qn(l)?(t.enter(i),a(l)):e(l)}function a(l){return Qn(l)&&o++0;)i-=1,r.push(e.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),e.length=this.map[i][0];r.push([...e]),e.length=0;let n=r.pop();for(;n;)e.push(...n),n=r.pop();this.map.length=0}};function LM(t,e,i,r){let n=0;if(!(i===0&&r.length===0)){for(;n-1;){let de=r.events[ie][1].type;if(de==="lineEnding"||de==="linePrefix")ie--;else break}let ue=ie>-1?r.events[ie][1].type:null,re=ue==="tableHead"||ue==="tableRow"?A:l;return re===A&&r.parser.lazy[r.now().line]?i(U):re(U)}function l(U){return t.enter("tableHead"),t.enter("tableRow"),c(U)}function c(U){return U===124||(s=!0,o+=1),u(U)}function u(U){return U===null?i(U):Pc(U)?o>1?(o=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(U),t.exit("lineEnding"),p):i(U):Qn(U)?Na(t,u,"whitespace")(U):(o+=1,s&&(s=!1,n+=1),U===124?(t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),s=!0,u):(t.enter("data"),f(U)))}function f(U){return U===null||U===124||Z0(U)?(t.exit("data"),u(U)):(t.consume(U),U===92?d:f)}function d(U){return U===92||U===124?(t.consume(U),f):f(U)}function p(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(U):(t.enter("tableDelimiterRow"),s=!1,Qn(U)?Na(t,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):g(U))}function g(U){return U===45||U===58?S(U):U===124?(s=!0,t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),x):_(U)}function x(U){return Qn(U)?Na(t,S,"whitespace")(U):S(U)}function S(U){return U===58?(o+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(U),t.exit("tableDelimiterMarker"),w):U===45?(o+=1,w(U)):U===null||Pc(U)?I(U):_(U)}function w(U){return U===45?(t.enter("tableDelimiterFiller"),T(U)):_(U)}function T(U){return U===45?(t.consume(U),T):U===58?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(U),t.exit("tableDelimiterMarker"),$):(t.exit("tableDelimiterFiller"),$(U))}function $(U){return Qn(U)?Na(t,I,"whitespace")(U):I(U)}function I(U){return U===124?g(U):U===null||Pc(U)?!s||n!==o?_(U):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(U)):_(U)}function _(U){return i(U)}function A(U){return t.enter("tableRow"),q(U)}function q(U){return U===124?(t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),q):U===null||Pc(U)?(t.exit("tableRow"),e(U)):Qn(U)?Na(t,q,"whitespace")(U):(t.enter("data"),le(U))}function le(U){return U===null||U===124||Z0(U)?(t.exit("data"),q(U)):(t.consume(U),U===92?F:le)}function F(U){return U===92||U===124?(t.consume(U),le):le(U)}}function DM(t,e){let i=-1,r=!0,n=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,c,u,f,d=new Gh;for(;++ii[2]+1){let g=i[2]+1,x=i[3]-i[2]-1;t.add(g,x,[])}}t.add(i[3]+1,0,[["exit",f,e]])}return n!==void 0&&(o.end=Object.assign({},Ua(e.events,n)),t.add(n,0,[["exit",o,e]]),o=void 0),o}function S3(t,e,i,r,n){let o=[],s=Ua(e.events,i);n&&(n.end=Object.assign({},s),o.push(["exit",n,e])),r.end=Object.assign({},s),o.push(["exit",r,e]),t.add(i+1,0,o)}function Ua(t,e){let i=t[e],r=i[0]==="enter"?"start":"end";return i[1][r]}var Tde=Po(new RegExp("\\p{P}","u")),Ede=Po(/[A-Za-z]/),Cde=Po(/[\dA-Za-z]/),Pde=Po(/[#-'*+\--9=?A-Z^-~]/);var _de=Po(/\d/),Qde=Po(/[\dA-Fa-f]/),Ade=Po(/[!-/:-@[-`{-~]/);function T3(t){return t!==null&&t<-2}function E3(t){return t!==null&&(t<0||t===32)}function _c(t){return t===-2||t===-1||t===32}var $de=Po(/\s/);function Po(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function C3(t,e,i,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return _c(l)?(t.enter(i),a(l)):e(l)}function a(l){return _c(l)&&o++n?0:n+e:e=e>n?n:e,i=i>0?i:0,r.length<1e4)s=Array.from(r),s.unshift(e,i),t.splice(...s);else for(i&&t.splice(e,i);o-1&&t.test(String.fromCharCode(i))}}var ON={tokenize:xN,partial:!0},u3={tokenize:vN,partial:!0},f3={tokenize:wN,partial:!0},h3={tokenize:kN,partial:!0},mN={tokenize:SN,partial:!0},d3={tokenize:bN,previous:O3},p3={tokenize:yN,previous:m3},_n={tokenize:gN,previous:g3},tn={};function U0(){return{text:tn}}var ks=48;for(;ks<123;)tn[ks]=_n,ks++,ks===58?ks=65:ks===91&&(ks=97);tn[43]=_n;tn[45]=_n;tn[46]=_n;tn[95]=_n;tn[72]=[_n,p3];tn[104]=[_n,p3];tn[87]=[_n,d3];tn[119]=[_n,d3];function gN(t,e,i){let r=this,n,o;return s;function s(f){return!M0(f)||!g3.call(r,r.previous)||z0(r.events)?i(f):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(f))}function a(f){return M0(f)?(t.consume(f),a):f===64?(t.consume(f),l):i(f)}function l(f){return f===46?t.check(mN,u,c)(f):f===45||f===95||Yh(f)?(o=!0,t.consume(f),l):u(f)}function c(f){return t.consume(f),n=!0,l}function u(f){return o&&n&&Da(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(f)):i(f)}}function bN(t,e,i){let r=this;return n;function n(s){return s!==87&&s!==119||!O3.call(r,r.previous)||z0(r.events)?i(s):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(ON,t.attempt(u3,t.attempt(f3,o),i),i)(s))}function o(s){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(s)}}function yN(t,e,i){let r=this,n="",o=!1;return s;function s(f){return(f===72||f===104)&&m3.call(r,r.previous)&&!z0(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),n+=String.fromCodePoint(f),t.consume(f),a):i(f)}function a(f){if(Da(f)&&n.length<5)return n+=String.fromCodePoint(f),t.consume(f),a;if(f===58){let d=n.toLowerCase();if(d==="http"||d==="https")return t.consume(f),l}return i(f)}function l(f){return f===47?(t.consume(f),o?c:(o=!0,l)):i(f)}function c(f){return f===null||c3(f)||ws(f)||Na(f)||N0(f)?i(f):t.attempt(u3,t.attempt(f3,u),i)(f)}function u(f){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(f)}}function xN(t,e,i){let r=0;return n;function n(s){return(s===87||s===119)&&r<3?(r++,t.consume(s),n):s===46&&r===3?(t.consume(s),o):i(s)}function o(s){return s===null?i(s):e(s)}}function vN(t,e,i){let r,n,o;return s;function s(c){return c===46||c===95?t.check(h3,l,a)(c):c===null||ws(c)||Na(c)||c!==45&&N0(c)?l(c):(o=!0,t.consume(c),s)}function a(c){return c===95?r=!0:(n=r,r=void 0),t.consume(c),s}function l(c){return n||r||!o?i(c):e(c)}}function wN(t,e){let i=0,r=0;return n;function n(s){return s===40?(i++,t.consume(s),n):s===41&&r0&&!i&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}var xhe=To(new RegExp("\\p{P}","u")),vhe=To(/[A-Za-z]/),whe=To(/[\dA-Za-z]/),khe=To(/[#-'*+\--9=?A-Z^-~]/);var She=To(/\d/),The=To(/[\dA-Fa-f]/),Ehe=To(/[!-/:-@[-`{-~]/);function b3(t){return t!==null&&t<-2}function Tc(t){return t!==null&&(t<0||t===32)}function Ec(t){return t===-2||t===-1||t===32}var Che=To(/\s/);function To(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Cc(t,e,i,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Ec(l)?(t.enter(i),a(l)):e(l)}function a(l){return Ec(l)&&o++999||f===93&&!s||f===null||f===91||Tc(f))return i(f);if(f===93){t.exit("chunkString");let d=t.exit("gfmFootnoteCallString");return n.includes(Fh(r.sliceSerialize(d)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):i(f)}return Tc(f)||(s=!0),o++,t.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(t.consume(f),o++,c):c(f)}}function QN(t,e,i){let r=this,n=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(g){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):i(g)}function u(g){if(s>999||g===93&&!a||g===null||g===91||Tc(g))return i(g);if(g===93){t.exit("chunkString");let x=t.exit("gfmFootnoteDefinitionLabelString");return o=Fh(r.sliceSerialize(x)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),d}return Tc(g)||(a=!0),s++,t.consume(g),g===92?f:u}function f(g){return g===91||g===92||g===93?(t.consume(g),s++,u):u(g)}function d(g){return g===58?(t.enter("definitionMarker"),t.consume(g),t.exit("definitionMarker"),n.includes(o)||n.push(o),Cc(t,p,"gfmFootnoteDefinitionWhitespace")):i(g)}function p(g){return e(g)}}function AN(t,e,i){return t.check(j0,e,t.attempt(EN,e,i))}function $N(t){t.exit("gfmFootnoteDefinition")}function XN(t,e,i){let r=this;return Cc(t,n,"gfmFootnoteDefinitionIndent",5);function n(o){let s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):i(o)}}function Hh(t,e,i,r){let n=t.length,o=0,s;if(e<0?e=-e>n?0:n+e:e=e>n?n:e,i=i>0?i:0,r.length<1e4)s=Array.from(r),s.unshift(e,i),t.splice(...s);else for(i&&t.splice(e,i);o-1&&t.test(String.fromCharCode(i))}}function W0(t){if(t===null||y3(t)||v3(t))return 1;if(x3(t))return 2}function w3(t,e,i){let r=[],n=-1;for(;++n1?l(g):(s.consume(g),f++,p);if(f<2&&!i)return l(g);let S=s.exit("strikethroughSequenceTemporary"),w=W0(g);return S._open=!w||w===2&&!!x,S._close=!x||x===2&&!!w,a(g)}}}var sde=Co(new RegExp("\\p{P}","u")),ade=Co(/[A-Za-z]/),lde=Co(/[\dA-Za-z]/),cde=Co(/[#-'*+\--9=?A-Z^-~]/);var ude=Co(/\d/),fde=Co(/[\dA-Fa-f]/),hde=Co(/[!-/:-@[-`{-~]/);function Pc(t){return t!==null&&t<-2}function Z0(t){return t!==null&&(t<0||t===32)}function Qn(t){return t===-2||t===-1||t===32}var dde=Co(/\s/);function Co(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Ma(t,e,i,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Qn(l)?(t.enter(i),a(l)):e(l)}function a(l){return Qn(l)&&o++0;)i-=1,r.push(e.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),e.length=this.map[i][0];r.push([...e]),e.length=0;let n=r.pop();for(;n;)e.push(...n),n=r.pop();this.map.length=0}};function IN(t,e,i,r){let n=0;if(!(i===0&&r.length===0)){for(;n-1;){let de=r.events[ie][1].type;if(de==="lineEnding"||de==="linePrefix")ie--;else break}let ue=ie>-1?r.events[ie][1].type:null,re=ue==="tableHead"||ue==="tableRow"?A:l;return re===A&&r.parser.lazy[r.now().line]?i(U):re(U)}function l(U){return t.enter("tableHead"),t.enter("tableRow"),c(U)}function c(U){return U===124||(s=!0,o+=1),u(U)}function u(U){return U===null?i(U):Pc(U)?o>1?(o=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(U),t.exit("lineEnding"),p):i(U):Qn(U)?Ma(t,u,"whitespace")(U):(o+=1,s&&(s=!1,n+=1),U===124?(t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),s=!0,u):(t.enter("data"),f(U)))}function f(U){return U===null||U===124||Z0(U)?(t.exit("data"),u(U)):(t.consume(U),U===92?d:f)}function d(U){return U===92||U===124?(t.consume(U),f):f(U)}function p(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(U):(t.enter("tableDelimiterRow"),s=!1,Qn(U)?Ma(t,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):g(U))}function g(U){return U===45||U===58?S(U):U===124?(s=!0,t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),x):_(U)}function x(U){return Qn(U)?Ma(t,S,"whitespace")(U):S(U)}function S(U){return U===58?(o+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(U),t.exit("tableDelimiterMarker"),w):U===45?(o+=1,w(U)):U===null||Pc(U)?I(U):_(U)}function w(U){return U===45?(t.enter("tableDelimiterFiller"),T(U)):_(U)}function T(U){return U===45?(t.consume(U),T):U===58?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(U),t.exit("tableDelimiterMarker"),$):(t.exit("tableDelimiterFiller"),$(U))}function $(U){return Qn(U)?Ma(t,I,"whitespace")(U):I(U)}function I(U){return U===124?g(U):U===null||Pc(U)?!s||n!==o?_(U):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(U)):_(U)}function _(U){return i(U)}function A(U){return t.enter("tableRow"),q(U)}function q(U){return U===124?(t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),q):U===null||Pc(U)?(t.exit("tableRow"),e(U)):Qn(U)?Ma(t,q,"whitespace")(U):(t.enter("data"),le(U))}function le(U){return U===null||U===124||Z0(U)?(t.exit("data"),q(U)):(t.consume(U),U===92?F:le)}function F(U){return U===92||U===124?(t.consume(U),le):le(U)}}function NN(t,e){let i=-1,r=!0,n=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,c,u,f,d=new Gh;for(;++ii[2]+1){let g=i[2]+1,x=i[3]-i[2]-1;t.add(g,x,[])}}t.add(i[3]+1,0,[["exit",f,e]])}return n!==void 0&&(o.end=Object.assign({},Ua(e.events,n)),t.add(n,0,[["exit",o,e]]),o=void 0),o}function S3(t,e,i,r,n){let o=[],s=Ua(e.events,i);n&&(n.end=Object.assign({},s),o.push(["exit",n,e])),r.end=Object.assign({},s),o.push(["exit",r,e]),t.add(i+1,0,o)}function Ua(t,e){let i=t[e],r=i[0]==="enter"?"start":"end";return i[1][r]}var Ede=Po(new RegExp("\\p{P}","u")),Cde=Po(/[A-Za-z]/),Pde=Po(/[\dA-Za-z]/),_de=Po(/[#-'*+\--9=?A-Z^-~]/);var Qde=Po(/\d/),Ade=Po(/[\dA-Fa-f]/),$de=Po(/[!-/:-@[-`{-~]/);function T3(t){return t!==null&&t<-2}function E3(t){return t!==null&&(t<0||t===32)}function _c(t){return t===-2||t===-1||t===32}var Xde=Po(/\s/);function Po(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function C3(t,e,i,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return _c(l)?(t.enter(i),a(l)):e(l)}function a(l){return _c(l)&&o++-1&&t.test(String.fromCharCode(i))}}function Qc(t,e,i,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return G0(l)?(t.enter(i),a(l)):e(l)}function a(l){return G0(l)&&o++-1&&t.test(String.fromCharCode(i))}}function Qc(t,e,i,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return G0(l)?(t.enter(i),a(l)):e(l)}function a(l){return G0(l)&&o++-1&&t.test(String.fromCharCode(i))}}function fr(t){let e=[],i=-1,r=0,n=0;for(;++i55295&&o<57344){let a=t.charCodeAt(i+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),n=1):s="\uFFFD"}else s=String.fromCharCode(o);s&&(e.push(t.slice(r,i),encodeURIComponent(s)),r=i+n+1,s=""),n&&(i+=n,n=0)}return e.join("")+t.slice(r)}function D3(t,e){let i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(e.identifier).toUpperCase(),n=fr(r.toLowerCase()),o=t.footnoteOrder.indexOf(r),s,a=t.footnoteCounts.get(r);a===void 0?(a=0,t.footnoteOrder.push(r),s=t.footnoteOrder.length):s=o+1,a+=1,t.footnoteCounts.set(r,a);let l={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+n,id:i+"fnref-"+n+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};t.patch(e,l);let c={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,c),t.applyData(e,c)}function M3(t,e){let i={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function N3(t,e){if(t.options.allowDangerousHtml){let i={type:"raw",value:e.value};return t.patch(e,i),t.applyData(e,i)}}function td(t,e){let i=e.referenceType,r="]";if(i==="collapsed"?r+="[]":i==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];let n=t.all(e),o=n[0];o&&o.type==="text"?o.value="["+o.value:n.unshift({type:"text",value:"["});let s=n[n.length-1];return s&&s.type==="text"?s.value+=r:n.push({type:"text",value:r}),n}function U3(t,e){let i=String(e.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return td(t,e);let n={src:fr(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(n.title=r.title);let o={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,o),t.applyData(e,o)}function z3(t,e){let i={src:fr(e.url)};e.alt!==null&&e.alt!==void 0&&(i.alt=e.alt),e.title!==null&&e.title!==void 0&&(i.title=e.title);let r={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,r),t.applyData(e,r)}function j3(t,e){let i={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,i);let r={type:"element",tagName:"code",properties:{},children:[i]};return t.patch(e,r),t.applyData(e,r)}function q3(t,e){let i=String(e.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return td(t,e);let n={href:fr(r.url||"")};r.title!==null&&r.title!==void 0&&(n.title=r.title);let o={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,o),t.applyData(e,o)}function W3(t,e){let i={href:fr(e.url)};e.title!==null&&e.title!==void 0&&(i.title=e.title);let r={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function B3(t,e,i){let r=t.all(e),n=i?VM(i):Z3(e),o={},s=[];if(typeof e.checked=="boolean"){let u=r[0],f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a-1&&t.test(String.fromCharCode(i))}}function fr(t){let e=[],i=-1,r=0,n=0;for(;++i55295&&o<57344){let a=t.charCodeAt(i+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),n=1):s="\uFFFD"}else s=String.fromCharCode(o);s&&(e.push(t.slice(r,i),encodeURIComponent(s)),r=i+n+1,s=""),n&&(i+=n,n=0)}return e.join("")+t.slice(r)}function D3(t,e){let i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(e.identifier).toUpperCase(),n=fr(r.toLowerCase()),o=t.footnoteOrder.indexOf(r),s,a=t.footnoteCounts.get(r);a===void 0?(a=0,t.footnoteOrder.push(r),s=t.footnoteOrder.length):s=o+1,a+=1,t.footnoteCounts.set(r,a);let l={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+n,id:i+"fnref-"+n+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};t.patch(e,l);let c={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,c),t.applyData(e,c)}function N3(t,e){let i={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function M3(t,e){if(t.options.allowDangerousHtml){let i={type:"raw",value:e.value};return t.patch(e,i),t.applyData(e,i)}}function td(t,e){let i=e.referenceType,r="]";if(i==="collapsed"?r+="[]":i==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];let n=t.all(e),o=n[0];o&&o.type==="text"?o.value="["+o.value:n.unshift({type:"text",value:"["});let s=n[n.length-1];return s&&s.type==="text"?s.value+=r:n.push({type:"text",value:r}),n}function U3(t,e){let i=String(e.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return td(t,e);let n={src:fr(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(n.title=r.title);let o={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,o),t.applyData(e,o)}function z3(t,e){let i={src:fr(e.url)};e.alt!==null&&e.alt!==void 0&&(i.alt=e.alt),e.title!==null&&e.title!==void 0&&(i.title=e.title);let r={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,r),t.applyData(e,r)}function j3(t,e){let i={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,i);let r={type:"element",tagName:"code",properties:{},children:[i]};return t.patch(e,r),t.applyData(e,r)}function q3(t,e){let i=String(e.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return td(t,e);let n={href:fr(r.url||"")};r.title!==null&&r.title!==void 0&&(n.title=r.title);let o={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,o),t.applyData(e,o)}function W3(t,e){let i={href:fr(e.url)};e.title!==null&&e.title!==void 0&&(i.title=e.title);let r={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function B3(t,e,i){let r=t.all(e),n=i?YN(i):Z3(e),o={},s=[];if(typeof e.checked=="boolean"){let u=r[0],f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a1:e}function V3(t,e){let i={},r=t.all(e),n=-1;for(typeof e.start=="number"&&e.start!==1&&(i.start=e.start);++n0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Ac(t){let e=hr(t),i=Ss(t);if(e&&i)return{start:e,end:i}}function K3(t,e){let i=t.all(e),r=i.shift(),n=[];if(r){let s={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(e.children[0],s),n.push(s)}if(i.length>0){let s={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},a=hr(e.children[1]),l=Ss(e.children[e.children.length-1]);a&&l&&(s.position={start:a,end:l}),n.push(s)}let o={type:"element",tagName:"table",properties:{},children:t.wrap(n,!0)};return t.patch(e,o),t.applyData(e,o)}function J3(t,e,i){let r=i?i.children:void 0,o=(r?r.indexOf(e):1)===0?"th":"td",s=i&&i.type==="table"?i.align:void 0,a=s?s.length:e.children.length,l=-1,c=[];for(;++l0,!0),r[0]),n=r.index+r[0].length,r=i.exec(e);return o.push(t4(e.slice(n),n>0,!1)),o.join("")}function t4(t,e,i){let r=0,n=t.length;if(e){let o=t.codePointAt(r);for(;o===9||o===32;)r++,o=t.codePointAt(r)}if(i){let o=t.codePointAt(n-1);for(;o===9||o===32;)n--,o=t.codePointAt(n-1)}return n>r?t.slice(r,n):""}function r4(t,e){let i={type:"text",value:i4(String(e.value))};return t.patch(e,i),t.applyData(e,i)}function n4(t,e){let i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,i),t.applyData(e,i)}var o4={blockquote:$3,break:X3,code:R3,delete:L3,emphasis:I3,footnoteReference:D3,heading:M3,html:N3,imageReference:U3,image:z3,inlineCode:j3,linkReference:q3,link:W3,listItem:B3,list:V3,paragraph:Y3,root:F3,strong:H3,table:K3,tableCell:e4,tableRow:J3,text:r4,thematicBreak:n4,toml:id,yaml:id,definition:id,footnoteDefinition:id};function id(){}var s4=typeof self=="object"?self:globalThis,YM=(t,e)=>{let i=(n,o)=>(t.set(o,n),n),r=n=>{if(t.has(n))return t.get(n);let[o,s]=e[n];switch(o){case 0:case-1:return i(s,n);case 1:{let a=i([],n);for(let l of s)a.push(r(l));return a}case 2:{let a=i({},n);for(let[l,c]of s)a[r(l)]=r(c);return a}case 3:return i(new Date(s),n);case 4:{let{source:a,flags:l}=s;return i(new RegExp(a,l),n)}case 5:{let a=i(new Map,n);for(let[l,c]of s)a.set(r(l),r(c));return a}case 6:{let a=i(new Set,n);for(let l of s)a.add(r(l));return a}case 7:{let{name:a,message:l}=s;return i(new s4[a](l),n)}case 8:return i(BigInt(s),n);case"BigInt":return i(Object(BigInt(s)),n)}return i(new s4[o](s),n)};return r},rb=t=>YM(new Map,t)(0);var za="",{toString:FM}={},{keys:HM}=Object,Lc=t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let i=FM.call(t).slice(8,-1);switch(i){case"Array":return[1,za];case"Object":return[2,za];case"Date":return[3,za];case"RegExp":return[4,za];case"Map":return[5,za];case"Set":return[6,za]}return i.includes("Array")?[1,i]:i.includes("Error")?[7,i]:[2,i]},ad=([t,e])=>t===0&&(e==="function"||e==="symbol"),GM=(t,e,i,r)=>{let n=(s,a)=>{let l=r.push(s)-1;return i.set(a,l),l},o=s=>{if(i.has(s))return i.get(s);let[a,l]=Lc(s);switch(a){case 0:{let u=s;switch(l){case"bigint":a=8,u=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return n([-1],s)}return n([a,u],s)}case 1:{if(l)return n([l,[...s]],s);let u=[],f=n([a,u],s);for(let d of s)u.push(o(d));return f}case 2:{if(l)switch(l){case"BigInt":return n([l,s.toString()],s);case"Boolean":case"Number":case"String":return n([l,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());let u=[],f=n([a,u],s);for(let d of HM(s))(t||!ad(Lc(s[d])))&&u.push([o(d),o(s[d])]);return f}case 3:return n([a,s.toISOString()],s);case 4:{let{source:u,flags:f}=s;return n([a,{source:u,flags:f}],s)}case 5:{let u=[],f=n([a,u],s);for(let[d,p]of s)(t||!(ad(Lc(d))||ad(Lc(p))))&&u.push([o(d),o(p)]);return f}case 6:{let u=[],f=n([a,u],s);for(let d of s)(t||!ad(Lc(d)))&&u.push(o(d));return f}}let{message:c}=s;return n([a,{name:l,message:c}],s)};return o},nb=(t,{json:e,lossy:i}={})=>{let r=[];return GM(!(e||i),!!e,new Map,r)(t),r};var Ar=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?rb(nb(t,e)):structuredClone(t):(t,e)=>rb(nb(t,e));function KM(t,e){let i=[{type:"text",value:"\u21A9"}];return e>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),i}function JM(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function a4(t){let e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||KM,r=t.options.footnoteBackLabel||JM,n=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",s=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[],l=-1;for(;++l0&&g.push({type:"text",value:" "});let T=typeof i=="string"?i:i(l,p);typeof T=="string"&&(T={type:"text",value:T}),g.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}let S=u[u.length-1];if(S&&S.type==="element"&&S.tagName==="p"){let T=S.children[S.children.length-1];T&&T.type==="text"?T.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...g)}else u.push(...g);let w={type:"element",tagName:"li",properties:{id:e+"fn-"+d},children:t.wrap(u,!0)};t.patch(c,w),a.push(w)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:Ce(H({},Ar(s)),{id:"footnote-label"}),children:[{type:"text",value:n}]},{type:"text",value:` +`});let c={type:"element",tagName:"li",properties:o,children:s};return t.patch(e,c),t.applyData(e,c)}function YN(t){let e=!1;if(t.type==="list"){e=t.spread||!1;let i=t.children,r=-1;for(;!e&&++r1:e}function V3(t,e){let i={},r=t.all(e),n=-1;for(typeof e.start=="number"&&e.start!==1&&(i.start=e.start);++n0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Ac(t){let e=hr(t),i=Ss(t);if(e&&i)return{start:e,end:i}}function K3(t,e){let i=t.all(e),r=i.shift(),n=[];if(r){let s={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(e.children[0],s),n.push(s)}if(i.length>0){let s={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},a=hr(e.children[1]),l=Ss(e.children[e.children.length-1]);a&&l&&(s.position={start:a,end:l}),n.push(s)}let o={type:"element",tagName:"table",properties:{},children:t.wrap(n,!0)};return t.patch(e,o),t.applyData(e,o)}function J3(t,e,i){let r=i?i.children:void 0,o=(r?r.indexOf(e):1)===0?"th":"td",s=i&&i.type==="table"?i.align:void 0,a=s?s.length:e.children.length,l=-1,c=[];for(;++l0,!0),r[0]),n=r.index+r[0].length,r=i.exec(e);return o.push(t4(e.slice(n),n>0,!1)),o.join("")}function t4(t,e,i){let r=0,n=t.length;if(e){let o=t.codePointAt(r);for(;o===9||o===32;)r++,o=t.codePointAt(r)}if(i){let o=t.codePointAt(n-1);for(;o===9||o===32;)n--,o=t.codePointAt(n-1)}return n>r?t.slice(r,n):""}function r4(t,e){let i={type:"text",value:i4(String(e.value))};return t.patch(e,i),t.applyData(e,i)}function n4(t,e){let i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,i),t.applyData(e,i)}var o4={blockquote:$3,break:X3,code:R3,delete:L3,emphasis:I3,footnoteReference:D3,heading:N3,html:M3,imageReference:U3,image:z3,inlineCode:j3,linkReference:q3,link:W3,listItem:B3,list:V3,paragraph:Y3,root:F3,strong:H3,table:K3,tableCell:e4,tableRow:J3,text:r4,thematicBreak:n4,toml:id,yaml:id,definition:id,footnoteDefinition:id};function id(){}var s4=typeof self=="object"?self:globalThis,FN=(t,e)=>{let i=(n,o)=>(t.set(o,n),n),r=n=>{if(t.has(n))return t.get(n);let[o,s]=e[n];switch(o){case 0:case-1:return i(s,n);case 1:{let a=i([],n);for(let l of s)a.push(r(l));return a}case 2:{let a=i({},n);for(let[l,c]of s)a[r(l)]=r(c);return a}case 3:return i(new Date(s),n);case 4:{let{source:a,flags:l}=s;return i(new RegExp(a,l),n)}case 5:{let a=i(new Map,n);for(let[l,c]of s)a.set(r(l),r(c));return a}case 6:{let a=i(new Set,n);for(let l of s)a.add(r(l));return a}case 7:{let{name:a,message:l}=s;return i(new s4[a](l),n)}case 8:return i(BigInt(s),n);case"BigInt":return i(Object(BigInt(s)),n)}return i(new s4[o](s),n)};return r},rb=t=>FN(new Map,t)(0);var za="",{toString:HN}={},{keys:GN}=Object,Lc=t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let i=HN.call(t).slice(8,-1);switch(i){case"Array":return[1,za];case"Object":return[2,za];case"Date":return[3,za];case"RegExp":return[4,za];case"Map":return[5,za];case"Set":return[6,za]}return i.includes("Array")?[1,i]:i.includes("Error")?[7,i]:[2,i]},ad=([t,e])=>t===0&&(e==="function"||e==="symbol"),KN=(t,e,i,r)=>{let n=(s,a)=>{let l=r.push(s)-1;return i.set(a,l),l},o=s=>{if(i.has(s))return i.get(s);let[a,l]=Lc(s);switch(a){case 0:{let u=s;switch(l){case"bigint":a=8,u=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return n([-1],s)}return n([a,u],s)}case 1:{if(l)return n([l,[...s]],s);let u=[],f=n([a,u],s);for(let d of s)u.push(o(d));return f}case 2:{if(l)switch(l){case"BigInt":return n([l,s.toString()],s);case"Boolean":case"Number":case"String":return n([l,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());let u=[],f=n([a,u],s);for(let d of GN(s))(t||!ad(Lc(s[d])))&&u.push([o(d),o(s[d])]);return f}case 3:return n([a,s.toISOString()],s);case 4:{let{source:u,flags:f}=s;return n([a,{source:u,flags:f}],s)}case 5:{let u=[],f=n([a,u],s);for(let[d,p]of s)(t||!(ad(Lc(d))||ad(Lc(p))))&&u.push([o(d),o(p)]);return f}case 6:{let u=[],f=n([a,u],s);for(let d of s)(t||!ad(Lc(d)))&&u.push(o(d));return f}}let{message:c}=s;return n([a,{name:l,message:c}],s)};return o},nb=(t,{json:e,lossy:i}={})=>{let r=[];return KN(!(e||i),!!e,new Map,r)(t),r};var Ar=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?rb(nb(t,e)):structuredClone(t):(t,e)=>rb(nb(t,e));function JN(t,e){let i=[{type:"text",value:"\u21A9"}];return e>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),i}function eM(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function a4(t){let e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||JN,r=t.options.footnoteBackLabel||eM,n=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",s=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[],l=-1;for(;++l0&&g.push({type:"text",value:" "});let T=typeof i=="string"?i:i(l,p);typeof T=="string"&&(T={type:"text",value:T}),g.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}let S=u[u.length-1];if(S&&S.type==="element"&&S.tagName==="p"){let T=S.children[S.children.length-1];T&&T.type==="text"?T.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...g)}else u.push(...g);let w={type:"element",tagName:"li",properties:{id:e+"fn-"+d},children:t.wrap(u,!0)};t.patch(c,w),a.push(w)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:Ce(H({},Ar(s)),{id:"footnote-label"}),children:[{type:"text",value:n}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:t.wrap(a,!0)},{type:"text",value:` -`}]}}var ob={}.hasOwnProperty,eN={};function c4(t,e){let i=e||eN,r=new Map,n=new Map,o=new Map,s=H(H({},o4),i.handlers),a={all:c,applyData:iN,definitionById:r,footnoteById:n,footnoteCounts:o,footnoteOrder:[],handlers:s,one:l,options:i,patch:tN,wrap:nN};return mi(t,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){let f=u.type==="definition"?r:n,d=String(u.identifier).toUpperCase();f.has(d)||f.set(d,u)}}),a;function l(u,f){let d=u.type,p=a.handlers[d];if(ob.call(a.handlers,d)&&p)return p(a,u,f);if(a.options.passThrough&&a.options.passThrough.includes(d)){if("children"in u){let x=u,{children:S}=x,w=pi(x,["children"]),T=Ar(w);return T.children=a.all(u),T}return Ar(u)}return(a.options.unknownHandler||rN)(a,u,f)}function c(u){let f=[];if("children"in u){let d=u.children,p=-1;for(;++p0&&i.push({type:"text",value:` `}),i}function l4(t){let e=0,i=t.charCodeAt(e);for(;i===9||i===32;)e++,i=t.charCodeAt(e);return t.slice(e)}function ld(t,e){let i=c4(t,e),r=i.one(t,void 0),n=a4(i),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return n&&("children"in o,o.children.push({type:"text",value:` -`},n)),o}function cd(t,e){return t&&"run"in t?async function(i,r){let n=ld(i,H({file:r},e));await t.run(n,r)}:function(i,r){return ld(i,H({file:r},e||t))}}var $n=class{constructor(e,i,r){this.property=e,this.normal=i,r&&(this.space=r)}};$n.prototype.property={};$n.prototype.normal={};$n.prototype.space=null;function sb(t,e){let i={},r={},n=-1;for(;++nDe,booleanish:()=>$t,commaOrSpaceSeparated:()=>Di,commaSeparated:()=>Ao,number:()=>Oe,overloadedBoolean:()=>ab,spaceSeparated:()=>lt});var oN=0,De=Ts(),$t=Ts(),ab=Ts(),Oe=Ts(),lt=Ts(),Ao=Ts(),Di=Ts();function Ts(){return 2**++oN}var lb=Object.keys(Ic),Es=class extends gi{constructor(e,i,r,n){let o=-1;if(super(e,i),u4(this,"space",n),typeof r=="number")for(;++o4&&i.slice(0,4)==="data"&&aN.test(e)){if(e.charAt(4)==="-"){let o=e.slice(5).replace(d4,uN);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=e.slice(4);if(!d4.test(o)){let s=o.replace(lN,cN);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}n=Es}return new n(r,e)}function cN(t){return"-"+t.toLowerCase()}function uN(t){return t.charAt(1).toUpperCase()}var Ln=sb([ub,cb,fb,hb,f4],"html"),pr=sb([ub,cb,fb,hb,h4],"svg");function db(t){let e=[],i=String(t||""),r=i.indexOf(","),n=0,o=!1;for(;!o;){r===-1&&(r=i.length,o=!0);let s=i.slice(n,r).trim();(s||!o)&&e.push(s),n=r+1,r=i.indexOf(",",n)}return e}function hd(t,e){let i=e||{};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}var p4=/[#.]/g;function pb(t,e){let i=t||"",r={},n=0,o,s;for(;n-1&&oo)return{line:s+1,column:o-(s>0?i[s-1]:0)+1,offset:o}}}function n(o){let s=o&&o.line,a=o&&o.column;if(typeof s=="number"&&typeof a=="number"&&!Number.isNaN(s)&&!Number.isNaN(a)&&s-1 in i){let l=(i[s-2]||0)+a-1||0;if(l>-1&&l=55296&&t<=57343}function v4(t){return t>=56320&&t<=57343}function w4(t,e){return(t-55296)*1024+9216+e}function gd(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function bd(t){return t>=64976&&t<=65007||PN.has(t)}var J;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comment",t.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",t.eofInDoctype="eof-in-doctype",t.nestedComment="nested-comment",t.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",t.eofInComment="eof-in-comment",t.incorrectlyClosedComment="incorrectly-closed-comment",t.eofInCdata="eof-in-cdata",t.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",t.nullCharacterReference="null-character-reference",t.surrogateCharacterReference="surrogate-character-reference",t.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",t.controlCharacterReference="control-character-reference",t.noncharacterCharacterReference="noncharacter-character-reference",t.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",t.missingDoctypeName="missing-doctype-name",t.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",t.duplicateAttribute="duplicate-attribute",t.nonConformingDoctype="non-conforming-doctype",t.missingDoctype="missing-doctype",t.misplacedDoctype="misplaced-doctype",t.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",t.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",t.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",t.openElementsLeftAfterEof="open-elements-left-after-eof",t.abandonedHeadElementChild="abandoned-head-element-child",t.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",t.nestedNoscriptInHead="nested-noscript-in-head",t.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(J=J||(J={}));var QN=65536,yd=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=QN,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){let{line:i,col:r,offset:n}=this;return{code:e,startLine:i,endLine:i,startCol:r,endCol:r,startOffset:n,endOffset:n}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let i=this.html.charCodeAt(this.pos+1);if(v4(i))return this.pos++,this._addGap(),w4(e,i)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Q.EOF;return this._err(J.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,i){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=i}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,i){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(i)return this.html.startsWith(e,this.pos);for(let r=0;r=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Q.EOF;let r=this.html.charCodeAt(i);return r===Q.CARRIAGE_RETURN?Q.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Q.EOF;let e=this.html.charCodeAt(this.pos);return e===Q.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,Q.LINE_FEED):e===Q.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,md(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===Q.LINE_FEED||e===Q.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){gd(e)?this._err(J.controlCharacterInInputStream):bd(e)&&this._err(J.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.posYe,getTokenAttr:()=>Uc});var Ye;(function(t){t[t.CHARACTER=0]="CHARACTER",t[t.NULL_CHARACTER=1]="NULL_CHARACTER",t[t.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",t[t.START_TAG=3]="START_TAG",t[t.END_TAG=4]="END_TAG",t[t.COMMENT=5]="COMMENT",t[t.DOCTYPE=6]="DOCTYPE",t[t.EOF=7]="EOF",t[t.HIBERNATION=8]="HIBERNATION"})(Ye=Ye||(Ye={}));function Uc(t,e){for(let i=t.attrs.length-1;i>=0;i--)if(t.attrs[i].name===e)return t.attrs[i].value;return null}var rn=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(t=>t.charCodeAt(0)));var k4=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(t=>t.charCodeAt(0)));var Sb,AN=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Tb=(Sb=String.fromCodePoint)!==null&&Sb!==void 0?Sb:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function Eb(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=AN.get(t))!==null&&e!==void 0?e:t}var Jt;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(Jt||(Jt={}));var $N=32,$r;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})($r||($r={}));function Cb(t){return t>=Jt.ZERO&&t<=Jt.NINE}function XN(t){return t>=Jt.UPPER_A&&t<=Jt.UPPER_F||t>=Jt.LOWER_A&&t<=Jt.LOWER_F}function RN(t){return t>=Jt.UPPER_A&&t<=Jt.UPPER_Z||t>=Jt.LOWER_A&&t<=Jt.LOWER_Z||Cb(t)}function LN(t){return t===Jt.EQUALS||RN(t)}var Kt;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Kt||(Kt={}));var Cs;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Cs||(Cs={}));var Pb=class{constructor(e,i,r){this.decodeTree=e,this.emitCodePoint=i,this.errors=r,this.state=Kt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Cs.Strict}startEntity(e){this.decodeMode=e,this.state=Kt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,i){switch(this.state){case Kt.EntityStart:return e.charCodeAt(i)===Jt.NUM?(this.state=Kt.NumericStart,this.consumed+=1,this.stateNumericStart(e,i+1)):(this.state=Kt.NamedEntity,this.stateNamedEntity(e,i));case Kt.NumericStart:return this.stateNumericStart(e,i);case Kt.NumericDecimal:return this.stateNumericDecimal(e,i);case Kt.NumericHex:return this.stateNumericHex(e,i);case Kt.NamedEntity:return this.stateNamedEntity(e,i)}}stateNumericStart(e,i){return i>=e.length?-1:(e.charCodeAt(i)|$N)===Jt.LOWER_X?(this.state=Kt.NumericHex,this.consumed+=1,this.stateNumericHex(e,i+1)):(this.state=Kt.NumericDecimal,this.stateNumericDecimal(e,i))}addToNumericResult(e,i,r,n){if(i!==r){let o=r-i;this.result=this.result*Math.pow(n,o)+parseInt(e.substr(i,o),n),this.consumed+=o}}stateNumericHex(e,i){let r=i;for(;i>14;for(;i>14,o!==0){if(s===Jt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Cs.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:i,decodeTree:r}=this,n=(r[i]&$r.VALUE_LENGTH)>>14;return this.emitNamedEntityData(i,n,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,i,r){let{decodeTree:n}=this;return this.emitCodePoint(i===1?n[e]&~$r.VALUE_LENGTH:n[e+1],r),i===3&&this.emitCodePoint(n[e+2],r),r}end(){var e;switch(this.state){case Kt.NamedEntity:return this.result!==0&&(this.decodeMode!==Cs.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Kt.NumericDecimal:return this.emitNumericEntity(0,2);case Kt.NumericHex:return this.emitNumericEntity(0,3);case Kt.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Kt.EntityStart:return 0}}};function S4(t){let e="",i=new Pb(t,r=>e+=Tb(r));return function(n,o){let s=0,a=0;for(;(a=n.indexOf("&",a))>=0;){e+=n.slice(s,a),i.startEntity(o);let c=i.write(n,a+1);if(c<0){s=a+i.end();break}s=a+c,a=c===0?s+1:s}let l=e+n.slice(s);return e="",l}}function _b(t,e,i,r){let n=(e&$r.BRANCH_LENGTH)>>7,o=e&$r.JUMP_TABLE;if(n===0)return o!==0&&r===o?i:-1;if(o){let l=r-o;return l<0||l>=n?-1:t[i+l]-1}let s=i,a=s+n-1;for(;s<=a;){let l=s+a>>>1,c=t[l];if(cr)a=l-1;else return t[l+n]}return-1}var d0e=S4(rn),p0e=S4(k4);var Wa={};Jl(Wa,{ATTRS:()=>Xr,DOCUMENT_MODE:()=>si,NS:()=>se,SPECIAL_ELEMENTS:()=>Qb,TAG_ID:()=>m,TAG_NAMES:()=>Z,getTagID:()=>$o,hasUnescapedText:()=>T4,isNumberedHeader:()=>zc});var se;(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.MATHML="http://www.w3.org/1998/Math/MathML",t.SVG="http://www.w3.org/2000/svg",t.XLINK="http://www.w3.org/1999/xlink",t.XML="http://www.w3.org/XML/1998/namespace",t.XMLNS="http://www.w3.org/2000/xmlns/"})(se=se||(se={}));var Xr;(function(t){t.TYPE="type",t.ACTION="action",t.ENCODING="encoding",t.PROMPT="prompt",t.NAME="name",t.COLOR="color",t.FACE="face",t.SIZE="size"})(Xr=Xr||(Xr={}));var si;(function(t){t.NO_QUIRKS="no-quirks",t.QUIRKS="quirks",t.LIMITED_QUIRKS="limited-quirks"})(si=si||(si={}));var Z;(function(t){t.A="a",t.ADDRESS="address",t.ANNOTATION_XML="annotation-xml",t.APPLET="applet",t.AREA="area",t.ARTICLE="article",t.ASIDE="aside",t.B="b",t.BASE="base",t.BASEFONT="basefont",t.BGSOUND="bgsound",t.BIG="big",t.BLOCKQUOTE="blockquote",t.BODY="body",t.BR="br",t.BUTTON="button",t.CAPTION="caption",t.CENTER="center",t.CODE="code",t.COL="col",t.COLGROUP="colgroup",t.DD="dd",t.DESC="desc",t.DETAILS="details",t.DIALOG="dialog",t.DIR="dir",t.DIV="div",t.DL="dl",t.DT="dt",t.EM="em",t.EMBED="embed",t.FIELDSET="fieldset",t.FIGCAPTION="figcaption",t.FIGURE="figure",t.FONT="font",t.FOOTER="footer",t.FOREIGN_OBJECT="foreignObject",t.FORM="form",t.FRAME="frame",t.FRAMESET="frameset",t.H1="h1",t.H2="h2",t.H3="h3",t.H4="h4",t.H5="h5",t.H6="h6",t.HEAD="head",t.HEADER="header",t.HGROUP="hgroup",t.HR="hr",t.HTML="html",t.I="i",t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.KEYGEN="keygen",t.LABEL="label",t.LI="li",t.LINK="link",t.LISTING="listing",t.MAIN="main",t.MALIGNMARK="malignmark",t.MARQUEE="marquee",t.MATH="math",t.MENU="menu",t.META="meta",t.MGLYPH="mglyph",t.MI="mi",t.MO="mo",t.MN="mn",t.MS="ms",t.MTEXT="mtext",t.NAV="nav",t.NOBR="nobr",t.NOFRAMES="noframes",t.NOEMBED="noembed",t.NOSCRIPT="noscript",t.OBJECT="object",t.OL="ol",t.OPTGROUP="optgroup",t.OPTION="option",t.P="p",t.PARAM="param",t.PLAINTEXT="plaintext",t.PRE="pre",t.RB="rb",t.RP="rp",t.RT="rt",t.RTC="rtc",t.RUBY="ruby",t.S="s",t.SCRIPT="script",t.SECTION="section",t.SELECT="select",t.SOURCE="source",t.SMALL="small",t.SPAN="span",t.STRIKE="strike",t.STRONG="strong",t.STYLE="style",t.SUB="sub",t.SUMMARY="summary",t.SUP="sup",t.TABLE="table",t.TBODY="tbody",t.TEMPLATE="template",t.TEXTAREA="textarea",t.TFOOT="tfoot",t.TD="td",t.TH="th",t.THEAD="thead",t.TITLE="title",t.TR="tr",t.TRACK="track",t.TT="tt",t.U="u",t.UL="ul",t.SVG="svg",t.VAR="var",t.WBR="wbr",t.XMP="xmp"})(Z=Z||(Z={}));var m;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A=1]="A",t[t.ADDRESS=2]="ADDRESS",t[t.ANNOTATION_XML=3]="ANNOTATION_XML",t[t.APPLET=4]="APPLET",t[t.AREA=5]="AREA",t[t.ARTICLE=6]="ARTICLE",t[t.ASIDE=7]="ASIDE",t[t.B=8]="B",t[t.BASE=9]="BASE",t[t.BASEFONT=10]="BASEFONT",t[t.BGSOUND=11]="BGSOUND",t[t.BIG=12]="BIG",t[t.BLOCKQUOTE=13]="BLOCKQUOTE",t[t.BODY=14]="BODY",t[t.BR=15]="BR",t[t.BUTTON=16]="BUTTON",t[t.CAPTION=17]="CAPTION",t[t.CENTER=18]="CENTER",t[t.CODE=19]="CODE",t[t.COL=20]="COL",t[t.COLGROUP=21]="COLGROUP",t[t.DD=22]="DD",t[t.DESC=23]="DESC",t[t.DETAILS=24]="DETAILS",t[t.DIALOG=25]="DIALOG",t[t.DIR=26]="DIR",t[t.DIV=27]="DIV",t[t.DL=28]="DL",t[t.DT=29]="DT",t[t.EM=30]="EM",t[t.EMBED=31]="EMBED",t[t.FIELDSET=32]="FIELDSET",t[t.FIGCAPTION=33]="FIGCAPTION",t[t.FIGURE=34]="FIGURE",t[t.FONT=35]="FONT",t[t.FOOTER=36]="FOOTER",t[t.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",t[t.FORM=38]="FORM",t[t.FRAME=39]="FRAME",t[t.FRAMESET=40]="FRAMESET",t[t.H1=41]="H1",t[t.H2=42]="H2",t[t.H3=43]="H3",t[t.H4=44]="H4",t[t.H5=45]="H5",t[t.H6=46]="H6",t[t.HEAD=47]="HEAD",t[t.HEADER=48]="HEADER",t[t.HGROUP=49]="HGROUP",t[t.HR=50]="HR",t[t.HTML=51]="HTML",t[t.I=52]="I",t[t.IMG=53]="IMG",t[t.IMAGE=54]="IMAGE",t[t.INPUT=55]="INPUT",t[t.IFRAME=56]="IFRAME",t[t.KEYGEN=57]="KEYGEN",t[t.LABEL=58]="LABEL",t[t.LI=59]="LI",t[t.LINK=60]="LINK",t[t.LISTING=61]="LISTING",t[t.MAIN=62]="MAIN",t[t.MALIGNMARK=63]="MALIGNMARK",t[t.MARQUEE=64]="MARQUEE",t[t.MATH=65]="MATH",t[t.MENU=66]="MENU",t[t.META=67]="META",t[t.MGLYPH=68]="MGLYPH",t[t.MI=69]="MI",t[t.MO=70]="MO",t[t.MN=71]="MN",t[t.MS=72]="MS",t[t.MTEXT=73]="MTEXT",t[t.NAV=74]="NAV",t[t.NOBR=75]="NOBR",t[t.NOFRAMES=76]="NOFRAMES",t[t.NOEMBED=77]="NOEMBED",t[t.NOSCRIPT=78]="NOSCRIPT",t[t.OBJECT=79]="OBJECT",t[t.OL=80]="OL",t[t.OPTGROUP=81]="OPTGROUP",t[t.OPTION=82]="OPTION",t[t.P=83]="P",t[t.PARAM=84]="PARAM",t[t.PLAINTEXT=85]="PLAINTEXT",t[t.PRE=86]="PRE",t[t.RB=87]="RB",t[t.RP=88]="RP",t[t.RT=89]="RT",t[t.RTC=90]="RTC",t[t.RUBY=91]="RUBY",t[t.S=92]="S",t[t.SCRIPT=93]="SCRIPT",t[t.SECTION=94]="SECTION",t[t.SELECT=95]="SELECT",t[t.SOURCE=96]="SOURCE",t[t.SMALL=97]="SMALL",t[t.SPAN=98]="SPAN",t[t.STRIKE=99]="STRIKE",t[t.STRONG=100]="STRONG",t[t.STYLE=101]="STYLE",t[t.SUB=102]="SUB",t[t.SUMMARY=103]="SUMMARY",t[t.SUP=104]="SUP",t[t.TABLE=105]="TABLE",t[t.TBODY=106]="TBODY",t[t.TEMPLATE=107]="TEMPLATE",t[t.TEXTAREA=108]="TEXTAREA",t[t.TFOOT=109]="TFOOT",t[t.TD=110]="TD",t[t.TH=111]="TH",t[t.THEAD=112]="THEAD",t[t.TITLE=113]="TITLE",t[t.TR=114]="TR",t[t.TRACK=115]="TRACK",t[t.TT=116]="TT",t[t.U=117]="U",t[t.UL=118]="UL",t[t.SVG=119]="SVG",t[t.VAR=120]="VAR",t[t.WBR=121]="WBR",t[t.XMP=122]="XMP"})(m=m||(m={}));var IN=new Map([[Z.A,m.A],[Z.ADDRESS,m.ADDRESS],[Z.ANNOTATION_XML,m.ANNOTATION_XML],[Z.APPLET,m.APPLET],[Z.AREA,m.AREA],[Z.ARTICLE,m.ARTICLE],[Z.ASIDE,m.ASIDE],[Z.B,m.B],[Z.BASE,m.BASE],[Z.BASEFONT,m.BASEFONT],[Z.BGSOUND,m.BGSOUND],[Z.BIG,m.BIG],[Z.BLOCKQUOTE,m.BLOCKQUOTE],[Z.BODY,m.BODY],[Z.BR,m.BR],[Z.BUTTON,m.BUTTON],[Z.CAPTION,m.CAPTION],[Z.CENTER,m.CENTER],[Z.CODE,m.CODE],[Z.COL,m.COL],[Z.COLGROUP,m.COLGROUP],[Z.DD,m.DD],[Z.DESC,m.DESC],[Z.DETAILS,m.DETAILS],[Z.DIALOG,m.DIALOG],[Z.DIR,m.DIR],[Z.DIV,m.DIV],[Z.DL,m.DL],[Z.DT,m.DT],[Z.EM,m.EM],[Z.EMBED,m.EMBED],[Z.FIELDSET,m.FIELDSET],[Z.FIGCAPTION,m.FIGCAPTION],[Z.FIGURE,m.FIGURE],[Z.FONT,m.FONT],[Z.FOOTER,m.FOOTER],[Z.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[Z.FORM,m.FORM],[Z.FRAME,m.FRAME],[Z.FRAMESET,m.FRAMESET],[Z.H1,m.H1],[Z.H2,m.H2],[Z.H3,m.H3],[Z.H4,m.H4],[Z.H5,m.H5],[Z.H6,m.H6],[Z.HEAD,m.HEAD],[Z.HEADER,m.HEADER],[Z.HGROUP,m.HGROUP],[Z.HR,m.HR],[Z.HTML,m.HTML],[Z.I,m.I],[Z.IMG,m.IMG],[Z.IMAGE,m.IMAGE],[Z.INPUT,m.INPUT],[Z.IFRAME,m.IFRAME],[Z.KEYGEN,m.KEYGEN],[Z.LABEL,m.LABEL],[Z.LI,m.LI],[Z.LINK,m.LINK],[Z.LISTING,m.LISTING],[Z.MAIN,m.MAIN],[Z.MALIGNMARK,m.MALIGNMARK],[Z.MARQUEE,m.MARQUEE],[Z.MATH,m.MATH],[Z.MENU,m.MENU],[Z.META,m.META],[Z.MGLYPH,m.MGLYPH],[Z.MI,m.MI],[Z.MO,m.MO],[Z.MN,m.MN],[Z.MS,m.MS],[Z.MTEXT,m.MTEXT],[Z.NAV,m.NAV],[Z.NOBR,m.NOBR],[Z.NOFRAMES,m.NOFRAMES],[Z.NOEMBED,m.NOEMBED],[Z.NOSCRIPT,m.NOSCRIPT],[Z.OBJECT,m.OBJECT],[Z.OL,m.OL],[Z.OPTGROUP,m.OPTGROUP],[Z.OPTION,m.OPTION],[Z.P,m.P],[Z.PARAM,m.PARAM],[Z.PLAINTEXT,m.PLAINTEXT],[Z.PRE,m.PRE],[Z.RB,m.RB],[Z.RP,m.RP],[Z.RT,m.RT],[Z.RTC,m.RTC],[Z.RUBY,m.RUBY],[Z.S,m.S],[Z.SCRIPT,m.SCRIPT],[Z.SECTION,m.SECTION],[Z.SELECT,m.SELECT],[Z.SOURCE,m.SOURCE],[Z.SMALL,m.SMALL],[Z.SPAN,m.SPAN],[Z.STRIKE,m.STRIKE],[Z.STRONG,m.STRONG],[Z.STYLE,m.STYLE],[Z.SUB,m.SUB],[Z.SUMMARY,m.SUMMARY],[Z.SUP,m.SUP],[Z.TABLE,m.TABLE],[Z.TBODY,m.TBODY],[Z.TEMPLATE,m.TEMPLATE],[Z.TEXTAREA,m.TEXTAREA],[Z.TFOOT,m.TFOOT],[Z.TD,m.TD],[Z.TH,m.TH],[Z.THEAD,m.THEAD],[Z.TITLE,m.TITLE],[Z.TR,m.TR],[Z.TRACK,m.TRACK],[Z.TT,m.TT],[Z.U,m.U],[Z.UL,m.UL],[Z.SVG,m.SVG],[Z.VAR,m.VAR],[Z.WBR,m.WBR],[Z.XMP,m.XMP]]);function $o(t){var e;return(e=IN.get(t))!==null&&e!==void 0?e:m.UNKNOWN}var pe=m,Qb={[se.HTML]:new Set([pe.ADDRESS,pe.APPLET,pe.AREA,pe.ARTICLE,pe.ASIDE,pe.BASE,pe.BASEFONT,pe.BGSOUND,pe.BLOCKQUOTE,pe.BODY,pe.BR,pe.BUTTON,pe.CAPTION,pe.CENTER,pe.COL,pe.COLGROUP,pe.DD,pe.DETAILS,pe.DIR,pe.DIV,pe.DL,pe.DT,pe.EMBED,pe.FIELDSET,pe.FIGCAPTION,pe.FIGURE,pe.FOOTER,pe.FORM,pe.FRAME,pe.FRAMESET,pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6,pe.HEAD,pe.HEADER,pe.HGROUP,pe.HR,pe.HTML,pe.IFRAME,pe.IMG,pe.INPUT,pe.LI,pe.LINK,pe.LISTING,pe.MAIN,pe.MARQUEE,pe.MENU,pe.META,pe.NAV,pe.NOEMBED,pe.NOFRAMES,pe.NOSCRIPT,pe.OBJECT,pe.OL,pe.P,pe.PARAM,pe.PLAINTEXT,pe.PRE,pe.SCRIPT,pe.SECTION,pe.SELECT,pe.SOURCE,pe.STYLE,pe.SUMMARY,pe.TABLE,pe.TBODY,pe.TD,pe.TEMPLATE,pe.TEXTAREA,pe.TFOOT,pe.TH,pe.THEAD,pe.TITLE,pe.TR,pe.TRACK,pe.UL,pe.WBR,pe.XMP]),[se.MATHML]:new Set([pe.MI,pe.MO,pe.MN,pe.MS,pe.MTEXT,pe.ANNOTATION_XML]),[se.SVG]:new Set([pe.TITLE,pe.FOREIGN_OBJECT,pe.DESC]),[se.XLINK]:new Set,[se.XML]:new Set,[se.XMLNS]:new Set};function zc(t){return t===pe.H1||t===pe.H2||t===pe.H3||t===pe.H4||t===pe.H5||t===pe.H6}var DN=new Set([Z.STYLE,Z.SCRIPT,Z.XMP,Z.IFRAME,Z.NOEMBED,Z.NOFRAMES,Z.PLAINTEXT]);function T4(t,e){return DN.has(t)||e&&t===Z.NOSCRIPT}var MN=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),L;(function(t){t[t.DATA=0]="DATA",t[t.RCDATA=1]="RCDATA",t[t.RAWTEXT=2]="RAWTEXT",t[t.SCRIPT_DATA=3]="SCRIPT_DATA",t[t.PLAINTEXT=4]="PLAINTEXT",t[t.TAG_OPEN=5]="TAG_OPEN",t[t.END_TAG_OPEN=6]="END_TAG_OPEN",t[t.TAG_NAME=7]="TAG_NAME",t[t.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",t[t.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",t[t.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",t[t.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",t[t.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",t[t.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",t[t.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",t[t.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",t[t.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",t[t.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",t[t.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",t[t.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",t[t.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",t[t.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",t[t.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",t[t.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",t[t.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",t[t.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",t[t.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",t[t.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",t[t.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",t[t.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",t[t.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",t[t.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",t[t.BOGUS_COMMENT=40]="BOGUS_COMMENT",t[t.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",t[t.COMMENT_START=42]="COMMENT_START",t[t.COMMENT_START_DASH=43]="COMMENT_START_DASH",t[t.COMMENT=44]="COMMENT",t[t.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",t[t.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",t[t.COMMENT_END_DASH=49]="COMMENT_END_DASH",t[t.COMMENT_END=50]="COMMENT_END",t[t.COMMENT_END_BANG=51]="COMMENT_END_BANG",t[t.DOCTYPE=52]="DOCTYPE",t[t.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",t[t.DOCTYPE_NAME=54]="DOCTYPE_NAME",t[t.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",t[t.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",t[t.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",t[t.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",t[t.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",t[t.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",t[t.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",t[t.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",t[t.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",t[t.CDATA_SECTION=68]="CDATA_SECTION",t[t.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",t[t.CDATA_SECTION_END=70]="CDATA_SECTION_END",t[t.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",t[t.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",t[t.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",t[t.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",t[t.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",t[t.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",t[t.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",t[t.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(L||(L={}));var vt={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function qc(t){return t>=Q.DIGIT_0&&t<=Q.DIGIT_9}function jc(t){return t>=Q.LATIN_CAPITAL_A&&t<=Q.LATIN_CAPITAL_Z}function NN(t){return t>=Q.LATIN_SMALL_A&&t<=Q.LATIN_SMALL_Z}function Xo(t){return NN(t)||jc(t)}function Ab(t){return Xo(t)||qc(t)}function C4(t){return t>=Q.LATIN_CAPITAL_A&&t<=Q.LATIN_CAPITAL_F}function P4(t){return t>=Q.LATIN_SMALL_A&&t<=Q.LATIN_SMALL_F}function UN(t){return qc(t)||C4(t)||P4(t)}function xd(t){return t+32}function _4(t){return t===Q.SPACE||t===Q.LINE_FEED||t===Q.TABULATION||t===Q.FORM_FEED}function zN(t){return t===Q.EQUALS_SIGN||Ab(t)}function E4(t){return _4(t)||t===Q.SOLIDUS||t===Q.GREATER_THAN_SIGN}var Wc=class{constructor(e,i){this.options=e,this.handler=i,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=L.DATA,this.returnState=L.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new yd(i),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var i,r;(r=(i=this.handler).onParseError)===null||r===void 0||r.call(i,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e==null||e())}write(e,i,r){this.active=!0,this.preprocessor.write(e,i),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,i){this.state=e,this._callState(i)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let i=0;i0&&this._err(J.endTagWithAttributes),e.selfClosing&&this._err(J.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Ye.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ye.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ye.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Ye.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,i){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==e)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=i;return}this._createCharacterToken(e,i)}_emitCodePoint(e){let i=_4(e)?Ye.WHITESPACE_CHARACTER:e===Q.NULL?Ye.NULL_CHARACTER:Ye.CHARACTER;this._appendCharToCurrentCharacterToken(i,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Ye.CHARACTER,e)}_matchNamedCharacterReference(e){let i=null,r=0,n=!1;for(let o=0,s=rn[0];o>=0&&(o=_b(rn,s,o+1,e),!(o<0));e=this._consume()){r+=1,s=rn[o];let a=s&$r.VALUE_LENGTH;if(a){let l=(a>>14)-1;if(e!==Q.SEMICOLON&&this._isCharacterReferenceInAttribute()&&zN(this.preprocessor.peek(1))?(i=[Q.AMPERSAND],o+=l):(i=l===0?[rn[o]&~$r.VALUE_LENGTH]:l===1?[rn[++o]]:[rn[++o],rn[++o]],r=0,n=e!==Q.SEMICOLON),l===0){this._consume();break}}}return this._unconsume(r),n&&!this.preprocessor.endOfChunkHit&&this._err(J.missingSemicolonAfterCharacterReference),this._unconsume(1),i}_isCharacterReferenceInAttribute(){return this.returnState===L.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case L.DATA:{this._stateData(e);break}case L.RCDATA:{this._stateRcdata(e);break}case L.RAWTEXT:{this._stateRawtext(e);break}case L.SCRIPT_DATA:{this._stateScriptData(e);break}case L.PLAINTEXT:{this._statePlaintext(e);break}case L.TAG_OPEN:{this._stateTagOpen(e);break}case L.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case L.TAG_NAME:{this._stateTagName(e);break}case L.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case L.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case L.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case L.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case L.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case L.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case L.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case L.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case L.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case L.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case L.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case L.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case L.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case L.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case L.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case L.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case L.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case L.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case L.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case L.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case L.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case L.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case L.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case L.BOGUS_COMMENT:{this._stateBogusComment(e);break}case L.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case L.COMMENT_START:{this._stateCommentStart(e);break}case L.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case L.COMMENT:{this._stateComment(e);break}case L.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case L.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case L.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case L.COMMENT_END:{this._stateCommentEnd(e);break}case L.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case L.DOCTYPE:{this._stateDoctype(e);break}case L.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case L.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case L.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case L.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case L.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case L.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case L.CDATA_SECTION:{this._stateCdataSection(e);break}case L.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case L.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case L.CHARACTER_REFERENCE:{this._stateCharacterReference(e);break}case L.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(e);break}case L.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}case L.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(e);break}case L.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(e);break}case L.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(e);break}case L.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(e);break}case L.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Q.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case Q.AMPERSAND:{this.returnState=L.DATA,this.state=L.CHARACTER_REFERENCE;break}case Q.NULL:{this._err(J.unexpectedNullCharacter),this._emitCodePoint(e);break}case Q.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Q.AMPERSAND:{this.returnState=L.RCDATA,this.state=L.CHARACTER_REFERENCE;break}case Q.LESS_THAN_SIGN:{this.state=L.RCDATA_LESS_THAN_SIGN;break}case Q.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(mt);break}case Q.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Q.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case Q.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(mt);break}case Q.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Q.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case Q.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(mt);break}case Q.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Q.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(mt);break}case Q.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Xo(e))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(e);else switch(e){case Q.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case Q.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case Q.QUESTION_MARK:{this._err(J.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(e);break}case Q.EOF:{this._err(J.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Xo(e))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(e);else switch(e){case Q.GREATER_THAN_SIGN:{this._err(J.missingEndTagName),this.state=L.DATA;break}case Q.EOF:{this._err(J.eofBeforeTagName),this._emitChars("");break}case Q.NULL:{this._err(J.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(mt);break}case Q.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Q.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Xo(e)?(this._emitChars("<"),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Xo(e)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break}case Q.NULL:{this._err(J.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(mt);break}case Q.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Q.SOLIDUS?(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Pi.SCRIPT,!1)&&E4(this.preprocessor.peek(Pi.SCRIPT.length))){this._emitCodePoint(e);for(let i=0;i1114111)this._err(J.characterReferenceOutsideUnicodeRange),this.charRefCode=Q.REPLACEMENT_CHARACTER;else if(md(this.charRefCode))this._err(J.surrogateCharacterReference),this.charRefCode=Q.REPLACEMENT_CHARACTER;else if(bd(this.charRefCode))this._err(J.noncharacterCharacterReference);else if(gd(this.charRefCode)||this.charRefCode===Q.CARRIAGE_RETURN){this._err(J.controlCharacterReference);let i=MN.get(this.charRefCode);i!==void 0&&(this.charRefCode=i)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}};var A4=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),Q4=new Set([...A4,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),vd=new Map([[m.APPLET,se.HTML],[m.CAPTION,se.HTML],[m.HTML,se.HTML],[m.MARQUEE,se.HTML],[m.OBJECT,se.HTML],[m.TABLE,se.HTML],[m.TD,se.HTML],[m.TEMPLATE,se.HTML],[m.TH,se.HTML],[m.ANNOTATION_XML,se.MATHML],[m.MI,se.MATHML],[m.MN,se.MATHML],[m.MO,se.MATHML],[m.MS,se.MATHML],[m.MTEXT,se.MATHML],[m.DESC,se.SVG],[m.FOREIGN_OBJECT,se.SVG],[m.TITLE,se.SVG]]),jN=[m.H1,m.H2,m.H3,m.H4,m.H5,m.H6],qN=[m.TR,m.TEMPLATE,m.HTML],WN=[m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML],BN=[m.TABLE,m.TEMPLATE,m.HTML],ZN=[m.TD,m.TH],wd=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,i,r){this.treeAdapter=i,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=m.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===se.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,i){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=i,this.currentTagId=i,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,i,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,i){let r=this._indexOf(e);this.items[r]=i,r===this.stackTop&&(this.current=i)}insertAfter(e,i,r){let n=this._indexOf(e)+1;this.items.splice(n,0,i),this.tagIDs.splice(n,0,r),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(e){let i=this.stackTop+1;do i=this.tagIDs.lastIndexOf(e,i-1);while(i>0&&this.treeAdapter.getNamespaceURI(this.items[i])!==se.HTML);this.shortenToLength(i<0?0:i)}shortenToLength(e){for(;this.stackTop>=e;){let i=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(i,this.stackTop=0;r--)if(e.includes(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===i)return r;return-1}clearBackTo(e,i){let r=this._indexOfTagNames(e,i);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(BN,se.HTML)}clearBackToTableBodyContext(){this.clearBackTo(WN,se.HTML)}clearBackToTableRowContext(){this.clearBackTo(qN,se.HTML)}remove(e){let i=this._indexOf(e);i>=0&&(i===this.stackTop?this.pop():(this.items.splice(i,1),this.tagIDs.splice(i,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===m.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let i=this._indexOf(e)-1;return i>=0?this.items[i]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===m.HTML}hasInScope(e){for(let i=this.stackTop;i>=0;i--){let r=this.tagIDs[i],n=this.treeAdapter.getNamespaceURI(this.items[i]);if(r===e&&n===se.HTML)return!0;if(vd.get(r)===n)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let i=this.tagIDs[e],r=this.treeAdapter.getNamespaceURI(this.items[e]);if(zc(i)&&r===se.HTML)return!0;if(vd.get(i)===r)return!1}return!0}hasInListItemScope(e){for(let i=this.stackTop;i>=0;i--){let r=this.tagIDs[i],n=this.treeAdapter.getNamespaceURI(this.items[i]);if(r===e&&n===se.HTML)return!0;if((r===m.UL||r===m.OL)&&n===se.HTML||vd.get(r)===n)return!1}return!0}hasInButtonScope(e){for(let i=this.stackTop;i>=0;i--){let r=this.tagIDs[i],n=this.treeAdapter.getNamespaceURI(this.items[i]);if(r===e&&n===se.HTML)return!0;if(r===m.BUTTON&&n===se.HTML||vd.get(r)===n)return!1}return!0}hasInTableScope(e){for(let i=this.stackTop;i>=0;i--){let r=this.tagIDs[i];if(this.treeAdapter.getNamespaceURI(this.items[i])===se.HTML){if(r===e)return!0;if(r===m.TABLE||r===m.TEMPLATE||r===m.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){let i=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===se.HTML){if(i===m.TBODY||i===m.THEAD||i===m.TFOOT)return!0;if(i===m.TABLE||i===m.HTML)return!1}}return!0}hasInSelectScope(e){for(let i=this.stackTop;i>=0;i--){let r=this.tagIDs[i];if(this.treeAdapter.getNamespaceURI(this.items[i])===se.HTML){if(r===e)return!0;if(r!==m.OPTION&&r!==m.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;A4.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Q4.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&Q4.has(this.currentTagId);)this.pop()}};var Or;(function(t){t[t.Marker=0]="Marker",t[t.Element=1]="Element"})(Or=Or||(Or={}));var $4={type:Or.Marker},kd=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,i){let r=[],n=i.length,o=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let a=0;a[s.name,s.value])),o=0;for(let s=0;sn.get(l.name)===l.value)&&(o+=1,o>=3&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift($4)}pushElement(e,i){this._ensureNoahArkCondition(e),this.entries.unshift({type:Or.Element,element:e,token:i})}insertElementAfterBookmark(e,i){let r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Or.Element,element:e,token:i})}removeEntry(e){let i=this.entries.indexOf(e);i>=0&&this.entries.splice(i,1)}clearToLastMarker(){let e=this.entries.indexOf($4);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){let i=this.entries.find(r=>r.type===Or.Marker||this.treeAdapter.getTagName(r.element)===e);return i&&i.type===Or.Element?i:null}getElementEntry(e){return this.entries.find(i=>i.type===Or.Element&&i.element===e)}};function X4(t){return{nodeName:"#text",value:t,parentNode:null}}var Dn={createDocument(){return{nodeName:"#document",mode:si.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(t,e,i){return{nodeName:t,tagName:t,attrs:i,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(t){return{nodeName:"#comment",data:t,parentNode:null}},appendChild(t,e){t.childNodes.push(e),e.parentNode=t},insertBefore(t,e,i){let r=t.childNodes.indexOf(i);t.childNodes.splice(r,0,e),e.parentNode=t},setTemplateContent(t,e){t.content=e},getTemplateContent(t){return t.content},setDocumentType(t,e,i,r){let n=t.childNodes.find(o=>o.nodeName==="#documentType");if(n)n.name=e,n.publicId=i,n.systemId=r;else{let o={nodeName:"#documentType",name:e,publicId:i,systemId:r,parentNode:null};Dn.appendChild(t,o)}},setDocumentMode(t,e){t.mode=e},getDocumentMode(t){return t.mode},detachNode(t){if(t.parentNode){let e=t.parentNode.childNodes.indexOf(t);t.parentNode.childNodes.splice(e,1),t.parentNode=null}},insertText(t,e){if(t.childNodes.length>0){let i=t.childNodes[t.childNodes.length-1];if(Dn.isTextNode(i)){i.value+=e;return}}Dn.appendChild(t,X4(e))},insertTextBefore(t,e,i){let r=t.childNodes[t.childNodes.indexOf(i)-1];r&&Dn.isTextNode(r)?r.value+=e:Dn.insertBefore(t,X4(e),i)},adoptAttributes(t,e){let i=new Set(t.attrs.map(r=>r.name));for(let r=0;rt.startsWith(i))}function M4(t){return t.name===L4&&t.publicId===null&&(t.systemId===null||t.systemId===VN)}function N4(t){if(t.name!==L4)return si.QUIRKS;let{systemId:e}=t;if(e&&e.toLowerCase()===YN)return si.QUIRKS;let{publicId:i}=t;if(i!==null){if(i=i.toLowerCase(),HN.has(i))return si.QUIRKS;let r=e===null?FN:I4;if(R4(i,r))return si.QUIRKS;if(r=e===null?D4:GN,R4(i,r))return si.LIMITED_QUIRKS}return si.NO_QUIRKS}var Ed={};Jl(Ed,{SVG_TAG_NAMES_ADJUSTMENT_MAP:()=>z4,adjustTokenMathMLAttrs:()=>Sd,adjustTokenSVGAttrs:()=>Td,adjustTokenSVGTagName:()=>Xb,adjustTokenXMLAttrs:()=>Bc,causesExit:()=>$b,isIntegrationPoint:()=>Rb});var U4={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},JN="definitionurl",eU="definitionURL",tU=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(t=>[t.toLowerCase(),t])),iU=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:se.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:se.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:se.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:se.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:se.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:se.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:se.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:se.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:se.XML}],["xml:space",{prefix:"xml",name:"space",namespace:se.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:se.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:se.XMLNS}]]),z4=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(t=>[t.toLowerCase(),t])),rU=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function $b(t){let e=t.tagID;return e===m.FONT&&t.attrs.some(({name:r})=>r===Xr.COLOR||r===Xr.SIZE||r===Xr.FACE)||rU.has(e)}function Sd(t){for(let e=0;e0&&this._setContextModes(e,i)}onItemPop(e,i){var r,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(n=(r=this.treeAdapter).onItemPop)===null||n===void 0||n.call(r,e,this.openElements.current),i){let o,s;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,s=this.fragmentContextID):{current:o,currentTagId:s}=this.openElements,this._setContextModes(o,s)}}_setContextModes(e,i){let r=e===this.document||this.treeAdapter.getNamespaceURI(e)===se.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(i,e)}_switchToTextParsing(e,i){this._insertElement(e,se.HTML),this.tokenizer.state=i,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=vt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Z.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==se.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=vt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=vt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=vt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=vt.PLAINTEXT;break}default:}}_setDocumentType(e){let i=e.name||"",r=e.publicId||"",n=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,i,r,n),e.location){let s=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));s&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}}_attachElementToTree(e,i){if(this.options.sourceCodeLocationInfo){let r=i&&Ce(H({},i),{startTag:i});this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,e)}}_appendElement(e,i){let r=this.treeAdapter.createElement(e.tagName,i,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,i){let r=this.treeAdapter.createElement(e.tagName,i,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,i){let r=this.treeAdapter.createElement(e,se.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,i)}_insertTemplate(e){let i=this.treeAdapter.createElement(e.tagName,se.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(i,r),this._attachElementToTree(i,e.location),this.openElements.push(i,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(Z.HTML,se.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,m.HTML)}_appendCommentNode(e,i){let r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(i,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let i,r;if(this._shouldFosterParentOnInsertion()?({parent:i,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(i,e.chars,r):this.treeAdapter.insertText(i,e.chars)):(i=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(i,e.chars)),!e.location)return;let n=this.treeAdapter.getChildNodes(i),o=r?n.lastIndexOf(r):n.length,s=n[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){let{endLine:l,endCol:c,endOffset:u}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:c,endOffset:u})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}_adoptNodes(e,i){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(i,r)}_setEndLocation(e,i){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&i.location){let r=i.location,n=this.treeAdapter.getTagName(e),o=i.type===Ye.END_TAG&&n===i.tagName?{endTag:H({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,o)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let i,r;return this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,r=this.fragmentContextID):{current:i,currentTagId:r}=this.openElements,e.tagID===m.SVG&&this.treeAdapter.getTagName(i)===Z.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(i)===se.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===m.MGLYPH||e.tagID===m.MALIGNMARK)&&!this._isIntegrationPoint(r,i,se.HTML)}_processToken(e){switch(e.type){case Ye.CHARACTER:{this.onCharacter(e);break}case Ye.NULL_CHARACTER:{this.onNullCharacter(e);break}case Ye.COMMENT:{this.onComment(e);break}case Ye.DOCTYPE:{this.onDoctype(e);break}case Ye.START_TAG:{this._processStartTag(e);break}case Ye.END_TAG:{this.onEndTag(e);break}case Ye.EOF:{this.onEof(e);break}case Ye.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,i,r){let n=this.treeAdapter.getNamespaceURI(i),o=this.treeAdapter.getAttrList(i);return Rb(e,n,o,r)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let i=this.activeFormattingElements.entries.findIndex(n=>n.type===Or.Marker||this.openElements.contains(n.element)),r=i<0?e-1:i-1;for(let n=r;n>=0;n--){let o=this.activeFormattingElements.entries[n];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case m.TR:{this.insertionMode=M.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=M.IN_TABLE;return}case m.BODY:{this.insertionMode=M.IN_BODY;return}case m.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(e);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case m.TD:case m.TH:{if(e>0){this.insertionMode=M.IN_CELL;return}break}case m.HEAD:{if(e>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let i=e-1;i>0;i--){let r=this.openElements.tagIDs[i];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(e){return B4.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let i=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(i)===se.HTML)return{parent:this.treeAdapter.getTemplateContent(i),beforeElement:null};break}case m.TABLE:{let r=this.treeAdapter.getParentNode(i);return r?{parent:r,beforeElement:i}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let i=this._findFosterParentingLocation();i.beforeElement?this.treeAdapter.insertBefore(i.parent,e,i.beforeElement):this.treeAdapter.appendChild(i.parent,e)}_isSpecialElement(e,i){let r=this.treeAdapter.getNamespaceURI(e);return Qb[r].has(i)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Nz(this,e);return}switch(this.insertionMode){case M.INITIAL:{Zc(this,e);break}case M.BEFORE_HTML:{Yc(this,e);break}case M.BEFORE_HEAD:{Fc(this,e);break}case M.IN_HEAD:{Hc(this,e);break}case M.IN_HEAD_NO_SCRIPT:{Gc(this,e);break}case M.AFTER_HEAD:{Kc(this,e);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{V4(this,e);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Lb(this,e);break}case M.IN_TABLE_TEXT:{J4(this,e);break}case M.IN_COLUMN_GROUP:{Pd(this,e);break}case M.AFTER_BODY:{_d(this,e);break}case M.AFTER_AFTER_BODY:{Cd(this,e);break}default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Mz(this,e);return}switch(this.insertionMode){case M.INITIAL:{Zc(this,e);break}case M.BEFORE_HTML:{Yc(this,e);break}case M.BEFORE_HEAD:{Fc(this,e);break}case M.IN_HEAD:{Hc(this,e);break}case M.IN_HEAD_NO_SCRIPT:{Gc(this,e);break}case M.AFTER_HEAD:{Kc(this,e);break}case M.TEXT:{this._insertCharacters(e);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Lb(this,e);break}case M.IN_COLUMN_GROUP:{Pd(this,e);break}case M.AFTER_BODY:{_d(this,e);break}case M.AFTER_AFTER_BODY:{Cd(this,e);break}default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ib(this,e);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{Ib(this,e);break}case M.IN_TABLE_TEXT:{Vc(this,e);break}case M.AFTER_BODY:{mU(this,e);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{gU(this,e);break}default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{bU(this,e);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(e,J.misplacedDoctype);break}case M.IN_TABLE_TEXT:{Vc(this,e);break}default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,J.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?Uz(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case M.INITIAL:{Zc(this,e);break}case M.BEFORE_HTML:{yU(this,e);break}case M.BEFORE_HEAD:{vU(this,e);break}case M.IN_HEAD:{Rr(this,e);break}case M.IN_HEAD_NO_SCRIPT:{SU(this,e);break}case M.AFTER_HEAD:{EU(this,e);break}case M.IN_BODY:{bi(this,e);break}case M.IN_TABLE:{Ba(this,e);break}case M.IN_TABLE_TEXT:{Vc(this,e);break}case M.IN_CAPTION:{wz(this,e);break}case M.IN_COLUMN_GROUP:{Ub(this,e);break}case M.IN_TABLE_BODY:{$d(this,e);break}case M.IN_ROW:{Xd(this,e);break}case M.IN_CELL:{Tz(this,e);break}case M.IN_SELECT:{iE(this,e);break}case M.IN_SELECT_IN_TABLE:{Cz(this,e);break}case M.IN_TEMPLATE:{_z(this,e);break}case M.AFTER_BODY:{Az(this,e);break}case M.IN_FRAMESET:{$z(this,e);break}case M.AFTER_FRAMESET:{Rz(this,e);break}case M.AFTER_AFTER_BODY:{Iz(this,e);break}case M.AFTER_AFTER_FRAMESET:{Dz(this,e);break}default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?zz(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case M.INITIAL:{Zc(this,e);break}case M.BEFORE_HTML:{xU(this,e);break}case M.BEFORE_HEAD:{wU(this,e);break}case M.IN_HEAD:{kU(this,e);break}case M.IN_HEAD_NO_SCRIPT:{TU(this,e);break}case M.AFTER_HEAD:{CU(this,e);break}case M.IN_BODY:{Ad(this,e);break}case M.TEXT:{hz(this,e);break}case M.IN_TABLE:{Jc(this,e);break}case M.IN_TABLE_TEXT:{Vc(this,e);break}case M.IN_CAPTION:{kz(this,e);break}case M.IN_COLUMN_GROUP:{Sz(this,e);break}case M.IN_TABLE_BODY:{Db(this,e);break}case M.IN_ROW:{tE(this,e);break}case M.IN_CELL:{Ez(this,e);break}case M.IN_SELECT:{rE(this,e);break}case M.IN_SELECT_IN_TABLE:{Pz(this,e);break}case M.IN_TEMPLATE:{Qz(this,e);break}case M.AFTER_BODY:{oE(this,e);break}case M.IN_FRAMESET:{Xz(this,e);break}case M.AFTER_FRAMESET:{Lz(this,e);break}case M.AFTER_AFTER_BODY:{Cd(this,e);break}default:}}onEof(e){switch(this.insertionMode){case M.INITIAL:{Zc(this,e);break}case M.BEFORE_HTML:{Yc(this,e);break}case M.BEFORE_HEAD:{Fc(this,e);break}case M.IN_HEAD:{Hc(this,e);break}case M.IN_HEAD_NO_SCRIPT:{Gc(this,e);break}case M.AFTER_HEAD:{Kc(this,e);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{G4(this,e);break}case M.TEXT:{dz(this,e);break}case M.IN_TABLE_TEXT:{Vc(this,e);break}case M.IN_TEMPLATE:{nE(this,e);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{Nb(this,e);break}default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Q.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(e);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{Z4(this,e);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Lb(this,e);break}case M.IN_TABLE_TEXT:{K4(this,e);break}default:}}};function uU(t,e){let i=t.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return i?t.openElements.contains(i.element)?t.openElements.hasInScope(e.tagID)||(i=null):(t.activeFormattingElements.removeEntry(i),i=null):H4(t,e),i}function fU(t,e){let i=null,r=t.openElements.stackTop;for(;r>=0;r--){let n=t.openElements.items[r];if(n===e.element)break;t._isSpecialElement(n,t.openElements.tagIDs[r])&&(i=n)}return i||(t.openElements.shortenToLength(r<0?0:r),t.activeFormattingElements.removeEntry(e)),i}function hU(t,e,i){let r=e,n=t.openElements.getCommonAncestor(e);for(let o=0,s=n;s!==i;o++,s=n){n=t.openElements.getCommonAncestor(s);let a=t.activeFormattingElements.getElementEntry(s),l=a&&o>=lU;!a||l?(l&&t.activeFormattingElements.removeEntry(a),t.openElements.remove(s)):(s=dU(t,a),r===e&&(t.activeFormattingElements.bookmark=a),t.treeAdapter.detachNode(r),t.treeAdapter.appendChild(s,r),r=s)}return r}function dU(t,e){let i=t.treeAdapter.getNamespaceURI(e.element),r=t.treeAdapter.createElement(e.token.tagName,i,e.token.attrs);return t.openElements.replace(e.element,r),e.element=r,r}function pU(t,e,i){let r=t.treeAdapter.getTagName(e),n=$o(r);if(t._isElementCausesFosterParenting(n))t._fosterParentElement(i);else{let o=t.treeAdapter.getNamespaceURI(e);n===m.TEMPLATE&&o===se.HTML&&(e=t.treeAdapter.getTemplateContent(e)),t.treeAdapter.appendChild(e,i)}}function OU(t,e,i){let r=t.treeAdapter.getNamespaceURI(i.element),{token:n}=i,o=t.treeAdapter.createElement(n.tagName,r,n.attrs);t._adoptNodes(e,o),t.treeAdapter.appendChild(e,o),t.activeFormattingElements.insertElementAfterBookmark(o,n),t.activeFormattingElements.removeEntry(i),t.openElements.remove(i.element),t.openElements.insertAfter(e,o,n.tagID)}function Mb(t,e){for(let i=0;i=i;r--)t._setEndLocation(t.openElements.items[r],e);if(!t.fragmentContext&&t.openElements.stackTop>=0){let r=t.openElements.items[0],n=t.treeAdapter.getNodeSourceCodeLocation(r);if(n&&!n.endTag&&(t._setEndLocation(r,e),t.openElements.stackTop>=1)){let o=t.openElements.items[1],s=t.treeAdapter.getNodeSourceCodeLocation(o);s&&!s.endTag&&t._setEndLocation(o,e)}}}}function bU(t,e){t._setDocumentType(e);let i=e.forceQuirks?si.QUIRKS:N4(e);M4(e)||t._err(e,J.nonConformingDoctype),t.treeAdapter.setDocumentMode(t.document,i),t.insertionMode=M.BEFORE_HTML}function Zc(t,e){t._err(e,J.missingDoctype,!0),t.treeAdapter.setDocumentMode(t.document,si.QUIRKS),t.insertionMode=M.BEFORE_HTML,t._processToken(e)}function yU(t,e){e.tagID===m.HTML?(t._insertElement(e,se.HTML),t.insertionMode=M.BEFORE_HEAD):Yc(t,e)}function xU(t,e){let i=e.tagID;(i===m.HTML||i===m.HEAD||i===m.BODY||i===m.BR)&&Yc(t,e)}function Yc(t,e){t._insertFakeRootElement(),t.insertionMode=M.BEFORE_HEAD,t._processToken(e)}function vU(t,e){switch(e.tagID){case m.HTML:{bi(t,e);break}case m.HEAD:{t._insertElement(e,se.HTML),t.headElement=t.openElements.current,t.insertionMode=M.IN_HEAD;break}default:Fc(t,e)}}function wU(t,e){let i=e.tagID;i===m.HEAD||i===m.BODY||i===m.HTML||i===m.BR?Fc(t,e):t._err(e,J.endTagWithoutMatchingOpenElement)}function Fc(t,e){t._insertFakeElement(Z.HEAD,m.HEAD),t.headElement=t.openElements.current,t.insertionMode=M.IN_HEAD,t._processToken(e)}function Rr(t,e){switch(e.tagID){case m.HTML:{bi(t,e);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{t._appendElement(e,se.HTML),e.ackSelfClosing=!0;break}case m.TITLE:{t._switchToTextParsing(e,vt.RCDATA);break}case m.NOSCRIPT:{t.options.scriptingEnabled?t._switchToTextParsing(e,vt.RAWTEXT):(t._insertElement(e,se.HTML),t.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{t._switchToTextParsing(e,vt.RAWTEXT);break}case m.SCRIPT:{t._switchToTextParsing(e,vt.SCRIPT_DATA);break}case m.TEMPLATE:{t._insertTemplate(e),t.activeFormattingElements.insertMarker(),t.framesetOk=!1,t.insertionMode=M.IN_TEMPLATE,t.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case m.HEAD:{t._err(e,J.misplacedStartTagForHeadElement);break}default:Hc(t,e)}}function kU(t,e){switch(e.tagID){case m.HEAD:{t.openElements.pop(),t.insertionMode=M.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Hc(t,e);break}case m.TEMPLATE:{Ps(t,e);break}default:t._err(e,J.endTagWithoutMatchingOpenElement)}}function Ps(t,e){t.openElements.tmplCount>0?(t.openElements.generateImpliedEndTagsThoroughly(),t.openElements.currentTagId!==m.TEMPLATE&&t._err(e,J.closingOfElementWithOpenChildElements),t.openElements.popUntilTagNamePopped(m.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode()):t._err(e,J.endTagWithoutMatchingOpenElement)}function Hc(t,e){t.openElements.pop(),t.insertionMode=M.AFTER_HEAD,t._processToken(e)}function SU(t,e){switch(e.tagID){case m.HTML:{bi(t,e);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{Rr(t,e);break}case m.NOSCRIPT:{t._err(e,J.nestedNoscriptInHead);break}default:Gc(t,e)}}function TU(t,e){switch(e.tagID){case m.NOSCRIPT:{t.openElements.pop(),t.insertionMode=M.IN_HEAD;break}case m.BR:{Gc(t,e);break}default:t._err(e,J.endTagWithoutMatchingOpenElement)}}function Gc(t,e){let i=e.type===Ye.EOF?J.openElementsLeftAfterEof:J.disallowedContentInNoscriptInHead;t._err(e,i),t.openElements.pop(),t.insertionMode=M.IN_HEAD,t._processToken(e)}function EU(t,e){switch(e.tagID){case m.HTML:{bi(t,e);break}case m.BODY:{t._insertElement(e,se.HTML),t.framesetOk=!1,t.insertionMode=M.IN_BODY;break}case m.FRAMESET:{t._insertElement(e,se.HTML),t.insertionMode=M.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{t._err(e,J.abandonedHeadElementChild),t.openElements.push(t.headElement,m.HEAD),Rr(t,e),t.openElements.remove(t.headElement);break}case m.HEAD:{t._err(e,J.misplacedStartTagForHeadElement);break}default:Kc(t,e)}}function CU(t,e){switch(e.tagID){case m.BODY:case m.HTML:case m.BR:{Kc(t,e);break}case m.TEMPLATE:{Ps(t,e);break}default:t._err(e,J.endTagWithoutMatchingOpenElement)}}function Kc(t,e){t._insertFakeElement(Z.BODY,m.BODY),t.insertionMode=M.IN_BODY,Qd(t,e)}function Qd(t,e){switch(e.type){case Ye.CHARACTER:{V4(t,e);break}case Ye.WHITESPACE_CHARACTER:{Z4(t,e);break}case Ye.COMMENT:{Ib(t,e);break}case Ye.START_TAG:{bi(t,e);break}case Ye.END_TAG:{Ad(t,e);break}case Ye.EOF:{G4(t,e);break}default:}}function Z4(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e)}function V4(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e),t.framesetOk=!1}function PU(t,e){t.openElements.tmplCount===0&&t.treeAdapter.adoptAttributes(t.openElements.items[0],e.attrs)}function _U(t,e){let i=t.openElements.tryPeekProperlyNestedBodyElement();i&&t.openElements.tmplCount===0&&(t.framesetOk=!1,t.treeAdapter.adoptAttributes(i,e.attrs))}function QU(t,e){let i=t.openElements.tryPeekProperlyNestedBodyElement();t.framesetOk&&i&&(t.treeAdapter.detachNode(i),t.openElements.popAllUpToHtmlElement(),t._insertElement(e,se.HTML),t.insertionMode=M.IN_FRAMESET)}function AU(t,e){t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._insertElement(e,se.HTML)}function $U(t,e){t.openElements.hasInButtonScope(m.P)&&t._closePElement(),zc(t.openElements.currentTagId)&&t.openElements.pop(),t._insertElement(e,se.HTML)}function XU(t,e){t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._insertElement(e,se.HTML),t.skipNextNewLine=!0,t.framesetOk=!1}function RU(t,e){let i=t.openElements.tmplCount>0;(!t.formElement||i)&&(t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._insertElement(e,se.HTML),i||(t.formElement=t.openElements.current))}function LU(t,e){t.framesetOk=!1;let i=e.tagID;for(let r=t.openElements.stackTop;r>=0;r--){let n=t.openElements.tagIDs[r];if(i===m.LI&&n===m.LI||(i===m.DD||i===m.DT)&&(n===m.DD||n===m.DT)){t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.popUntilTagNamePopped(n);break}if(n!==m.ADDRESS&&n!==m.DIV&&n!==m.P&&t._isSpecialElement(t.openElements.items[r],n))break}t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._insertElement(e,se.HTML)}function IU(t,e){t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._insertElement(e,se.HTML),t.tokenizer.state=vt.PLAINTEXT}function DU(t,e){t.openElements.hasInScope(m.BUTTON)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(m.BUTTON)),t._reconstructActiveFormattingElements(),t._insertElement(e,se.HTML),t.framesetOk=!1}function MU(t,e){let i=t.activeFormattingElements.getElementEntryInScopeWithTagName(Z.A);i&&(Mb(t,e),t.openElements.remove(i.element),t.activeFormattingElements.removeEntry(i)),t._reconstructActiveFormattingElements(),t._insertElement(e,se.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function NU(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,se.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function UU(t,e){t._reconstructActiveFormattingElements(),t.openElements.hasInScope(m.NOBR)&&(Mb(t,e),t._reconstructActiveFormattingElements()),t._insertElement(e,se.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function zU(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,se.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1}function jU(t,e){t.treeAdapter.getDocumentMode(t.document)!==si.QUIRKS&&t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._insertElement(e,se.HTML),t.framesetOk=!1,t.insertionMode=M.IN_TABLE}function Y4(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,se.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function F4(t){let e=Uc(t,Xr.TYPE);return e!=null&&e.toLowerCase()===sU}function qU(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,se.HTML),F4(e)||(t.framesetOk=!1),e.ackSelfClosing=!0}function WU(t,e){t._appendElement(e,se.HTML),e.ackSelfClosing=!0}function BU(t,e){t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._appendElement(e,se.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function ZU(t,e){e.tagName=Z.IMG,e.tagID=m.IMG,Y4(t,e)}function VU(t,e){t._insertElement(e,se.HTML),t.skipNextNewLine=!0,t.tokenizer.state=vt.RCDATA,t.originalInsertionMode=t.insertionMode,t.framesetOk=!1,t.insertionMode=M.TEXT}function YU(t,e){t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._reconstructActiveFormattingElements(),t.framesetOk=!1,t._switchToTextParsing(e,vt.RAWTEXT)}function FU(t,e){t.framesetOk=!1,t._switchToTextParsing(e,vt.RAWTEXT)}function q4(t,e){t._switchToTextParsing(e,vt.RAWTEXT)}function HU(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,se.HTML),t.framesetOk=!1,t.insertionMode=t.insertionMode===M.IN_TABLE||t.insertionMode===M.IN_CAPTION||t.insertionMode===M.IN_TABLE_BODY||t.insertionMode===M.IN_ROW||t.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function GU(t,e){t.openElements.currentTagId===m.OPTION&&t.openElements.pop(),t._reconstructActiveFormattingElements(),t._insertElement(e,se.HTML)}function KU(t,e){t.openElements.hasInScope(m.RUBY)&&t.openElements.generateImpliedEndTags(),t._insertElement(e,se.HTML)}function JU(t,e){t.openElements.hasInScope(m.RUBY)&&t.openElements.generateImpliedEndTagsWithExclusion(m.RTC),t._insertElement(e,se.HTML)}function ez(t,e){t._reconstructActiveFormattingElements(),Sd(e),Bc(e),e.selfClosing?t._appendElement(e,se.MATHML):t._insertElement(e,se.MATHML),e.ackSelfClosing=!0}function tz(t,e){t._reconstructActiveFormattingElements(),Td(e),Bc(e),e.selfClosing?t._appendElement(e,se.SVG):t._insertElement(e,se.SVG),e.ackSelfClosing=!0}function W4(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,se.HTML)}function bi(t,e){switch(e.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{NU(t,e);break}case m.A:{MU(t,e);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{$U(t,e);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{AU(t,e);break}case m.LI:case m.DD:case m.DT:{LU(t,e);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{Y4(t,e);break}case m.HR:{BU(t,e);break}case m.RB:case m.RTC:{KU(t,e);break}case m.RT:case m.RP:{JU(t,e);break}case m.PRE:case m.LISTING:{XU(t,e);break}case m.XMP:{YU(t,e);break}case m.SVG:{tz(t,e);break}case m.HTML:{PU(t,e);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{Rr(t,e);break}case m.BODY:{_U(t,e);break}case m.FORM:{RU(t,e);break}case m.NOBR:{UU(t,e);break}case m.MATH:{ez(t,e);break}case m.TABLE:{jU(t,e);break}case m.INPUT:{qU(t,e);break}case m.PARAM:case m.TRACK:case m.SOURCE:{WU(t,e);break}case m.IMAGE:{ZU(t,e);break}case m.BUTTON:{DU(t,e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{zU(t,e);break}case m.IFRAME:{FU(t,e);break}case m.SELECT:{HU(t,e);break}case m.OPTION:case m.OPTGROUP:{GU(t,e);break}case m.NOEMBED:{q4(t,e);break}case m.FRAMESET:{QU(t,e);break}case m.TEXTAREA:{VU(t,e);break}case m.NOSCRIPT:{t.options.scriptingEnabled?q4(t,e):W4(t,e);break}case m.PLAINTEXT:{IU(t,e);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:W4(t,e)}}function iz(t,e){if(t.openElements.hasInScope(m.BODY)&&(t.insertionMode=M.AFTER_BODY,t.options.sourceCodeLocationInfo)){let i=t.openElements.tryPeekProperlyNestedBodyElement();i&&t._setEndLocation(i,e)}}function rz(t,e){t.openElements.hasInScope(m.BODY)&&(t.insertionMode=M.AFTER_BODY,oE(t,e))}function nz(t,e){let i=e.tagID;t.openElements.hasInScope(i)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(i))}function oz(t){let e=t.openElements.tmplCount>0,{formElement:i}=t;e||(t.formElement=null),(i||e)&&t.openElements.hasInScope(m.FORM)&&(t.openElements.generateImpliedEndTags(),e?t.openElements.popUntilTagNamePopped(m.FORM):i&&t.openElements.remove(i))}function sz(t){t.openElements.hasInButtonScope(m.P)||t._insertFakeElement(Z.P,m.P),t._closePElement()}function az(t){t.openElements.hasInListItemScope(m.LI)&&(t.openElements.generateImpliedEndTagsWithExclusion(m.LI),t.openElements.popUntilTagNamePopped(m.LI))}function lz(t,e){let i=e.tagID;t.openElements.hasInScope(i)&&(t.openElements.generateImpliedEndTagsWithExclusion(i),t.openElements.popUntilTagNamePopped(i))}function cz(t){t.openElements.hasNumberedHeaderInScope()&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilNumberedHeaderPopped())}function uz(t,e){let i=e.tagID;t.openElements.hasInScope(i)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(i),t.activeFormattingElements.clearToLastMarker())}function fz(t){t._reconstructActiveFormattingElements(),t._insertFakeElement(Z.BR,m.BR),t.openElements.pop(),t.framesetOk=!1}function H4(t,e){let i=e.tagName,r=e.tagID;for(let n=t.openElements.stackTop;n>0;n--){let o=t.openElements.items[n],s=t.openElements.tagIDs[n];if(r===s&&(r!==m.UNKNOWN||t.treeAdapter.getTagName(o)===i)){t.openElements.generateImpliedEndTagsWithExclusion(r),t.openElements.stackTop>=n&&t.openElements.shortenToLength(n);break}if(t._isSpecialElement(o,s))break}}function Ad(t,e){switch(e.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{Mb(t,e);break}case m.P:{sz(t);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{nz(t,e);break}case m.LI:{az(t);break}case m.DD:case m.DT:{lz(t,e);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{cz(t);break}case m.BR:{fz(t);break}case m.BODY:{iz(t,e);break}case m.HTML:{rz(t,e);break}case m.FORM:{oz(t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{uz(t,e);break}case m.TEMPLATE:{Ps(t,e);break}default:H4(t,e)}}function G4(t,e){t.tmplInsertionModeStack.length>0?nE(t,e):Nb(t,e)}function hz(t,e){var i;e.tagID===m.SCRIPT&&((i=t.scriptHandler)===null||i===void 0||i.call(t,t.openElements.current)),t.openElements.pop(),t.insertionMode=t.originalInsertionMode}function dz(t,e){t._err(e,J.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(e)}function Lb(t,e){if(B4.has(t.openElements.currentTagId))switch(t.pendingCharacterTokens.length=0,t.hasNonWhitespacePendingCharacterToken=!1,t.originalInsertionMode=t.insertionMode,t.insertionMode=M.IN_TABLE_TEXT,e.type){case Ye.CHARACTER:{J4(t,e);break}case Ye.WHITESPACE_CHARACTER:{K4(t,e);break}}else eu(t,e)}function pz(t,e){t.openElements.clearBackToTableContext(),t.activeFormattingElements.insertMarker(),t._insertElement(e,se.HTML),t.insertionMode=M.IN_CAPTION}function Oz(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,se.HTML),t.insertionMode=M.IN_COLUMN_GROUP}function mz(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(Z.COLGROUP,m.COLGROUP),t.insertionMode=M.IN_COLUMN_GROUP,Ub(t,e)}function gz(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,se.HTML),t.insertionMode=M.IN_TABLE_BODY}function bz(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(Z.TBODY,m.TBODY),t.insertionMode=M.IN_TABLE_BODY,$d(t,e)}function yz(t,e){t.openElements.hasInTableScope(m.TABLE)&&(t.openElements.popUntilTagNamePopped(m.TABLE),t._resetInsertionMode(),t._processStartTag(e))}function xz(t,e){F4(e)?t._appendElement(e,se.HTML):eu(t,e),e.ackSelfClosing=!0}function vz(t,e){!t.formElement&&t.openElements.tmplCount===0&&(t._insertElement(e,se.HTML),t.formElement=t.openElements.current,t.openElements.pop())}function Ba(t,e){switch(e.tagID){case m.TD:case m.TH:case m.TR:{bz(t,e);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{Rr(t,e);break}case m.COL:{mz(t,e);break}case m.FORM:{vz(t,e);break}case m.TABLE:{yz(t,e);break}case m.TBODY:case m.TFOOT:case m.THEAD:{gz(t,e);break}case m.INPUT:{xz(t,e);break}case m.CAPTION:{pz(t,e);break}case m.COLGROUP:{Oz(t,e);break}default:eu(t,e)}}function Jc(t,e){switch(e.tagID){case m.TABLE:{t.openElements.hasInTableScope(m.TABLE)&&(t.openElements.popUntilTagNamePopped(m.TABLE),t._resetInsertionMode());break}case m.TEMPLATE:{Ps(t,e);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:eu(t,e)}}function eu(t,e){let i=t.fosterParentingEnabled;t.fosterParentingEnabled=!0,Qd(t,e),t.fosterParentingEnabled=i}function K4(t,e){t.pendingCharacterTokens.push(e)}function J4(t,e){t.pendingCharacterTokens.push(e),t.hasNonWhitespacePendingCharacterToken=!0}function Vc(t,e){let i=0;if(t.hasNonWhitespacePendingCharacterToken)for(;i0&&t.openElements.currentTagId===m.OPTION&&t.openElements.tagIDs[t.openElements.stackTop-1]===m.OPTGROUP&&t.openElements.pop(),t.openElements.currentTagId===m.OPTGROUP&&t.openElements.pop();break}case m.OPTION:{t.openElements.currentTagId===m.OPTION&&t.openElements.pop();break}case m.SELECT:{t.openElements.hasInSelectScope(m.SELECT)&&(t.openElements.popUntilTagNamePopped(m.SELECT),t._resetInsertionMode());break}case m.TEMPLATE:{Ps(t,e);break}default:}}function Cz(t,e){let i=e.tagID;i===m.CAPTION||i===m.TABLE||i===m.TBODY||i===m.TFOOT||i===m.THEAD||i===m.TR||i===m.TD||i===m.TH?(t.openElements.popUntilTagNamePopped(m.SELECT),t._resetInsertionMode(),t._processStartTag(e)):iE(t,e)}function Pz(t,e){let i=e.tagID;i===m.CAPTION||i===m.TABLE||i===m.TBODY||i===m.TFOOT||i===m.THEAD||i===m.TR||i===m.TD||i===m.TH?t.openElements.hasInTableScope(i)&&(t.openElements.popUntilTagNamePopped(m.SELECT),t._resetInsertionMode(),t.onEndTag(e)):rE(t,e)}function _z(t,e){switch(e.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{Rr(t,e);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{t.tmplInsertionModeStack[0]=M.IN_TABLE,t.insertionMode=M.IN_TABLE,Ba(t,e);break}case m.COL:{t.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,t.insertionMode=M.IN_COLUMN_GROUP,Ub(t,e);break}case m.TR:{t.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,t.insertionMode=M.IN_TABLE_BODY,$d(t,e);break}case m.TD:case m.TH:{t.tmplInsertionModeStack[0]=M.IN_ROW,t.insertionMode=M.IN_ROW,Xd(t,e);break}default:t.tmplInsertionModeStack[0]=M.IN_BODY,t.insertionMode=M.IN_BODY,bi(t,e)}}function Qz(t,e){e.tagID===m.TEMPLATE&&Ps(t,e)}function nE(t,e){t.openElements.tmplCount>0?(t.openElements.popUntilTagNamePopped(m.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode(),t.onEof(e)):Nb(t,e)}function Az(t,e){e.tagID===m.HTML?bi(t,e):_d(t,e)}function oE(t,e){var i;if(e.tagID===m.HTML){if(t.fragmentContext||(t.insertionMode=M.AFTER_AFTER_BODY),t.options.sourceCodeLocationInfo&&t.openElements.tagIDs[0]===m.HTML){t._setEndLocation(t.openElements.items[0],e);let r=t.openElements.items[1];r&&!(!((i=t.treeAdapter.getNodeSourceCodeLocation(r))===null||i===void 0)&&i.endTag)&&t._setEndLocation(r,e)}}else _d(t,e)}function _d(t,e){t.insertionMode=M.IN_BODY,Qd(t,e)}function $z(t,e){switch(e.tagID){case m.HTML:{bi(t,e);break}case m.FRAMESET:{t._insertElement(e,se.HTML);break}case m.FRAME:{t._appendElement(e,se.HTML),e.ackSelfClosing=!0;break}case m.NOFRAMES:{Rr(t,e);break}default:}}function Xz(t,e){e.tagID===m.FRAMESET&&!t.openElements.isRootHtmlElementCurrent()&&(t.openElements.pop(),!t.fragmentContext&&t.openElements.currentTagId!==m.FRAMESET&&(t.insertionMode=M.AFTER_FRAMESET))}function Rz(t,e){switch(e.tagID){case m.HTML:{bi(t,e);break}case m.NOFRAMES:{Rr(t,e);break}default:}}function Lz(t,e){e.tagID===m.HTML&&(t.insertionMode=M.AFTER_AFTER_FRAMESET)}function Iz(t,e){e.tagID===m.HTML?bi(t,e):Cd(t,e)}function Cd(t,e){t.insertionMode=M.IN_BODY,Qd(t,e)}function Dz(t,e){switch(e.tagID){case m.HTML:{bi(t,e);break}case m.NOFRAMES:{Rr(t,e);break}default:}}function Mz(t,e){e.chars=mt,t._insertCharacters(e)}function Nz(t,e){t._insertCharacters(e),t.framesetOk=!1}function sE(t){for(;t.treeAdapter.getNamespaceURI(t.openElements.current)!==se.HTML&&!t._isIntegrationPoint(t.openElements.currentTagId,t.openElements.current);)t.openElements.pop()}function Uz(t,e){if($b(e))sE(t),t._startTagOutsideForeignContent(e);else{let i=t._getAdjustedCurrentElement(),r=t.treeAdapter.getNamespaceURI(i);r===se.MATHML?Sd(e):r===se.SVG&&(Xb(e),Td(e)),Bc(e),e.selfClosing?t._appendElement(e,r):t._insertElement(e,r),e.ackSelfClosing=!0}}function zz(t,e){if(e.tagID===m.P||e.tagID===m.BR){sE(t),t._endTagOutsideForeignContent(e);return}for(let i=t.openElements.stackTop;i>0;i--){let r=t.openElements.items[i];if(t.treeAdapter.getNamespaceURI(r)===se.HTML){t._endTagOutsideForeignContent(e);break}let n=t.treeAdapter.getTagName(r);if(n.toLowerCase()===e.tagName){e.tagName=n,t.openElements.shortenToLength(i);break}}}var jz=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),z0e=String.prototype.codePointAt!=null?(t,e)=>t.codePointAt(e):(t,e)=>(t.charCodeAt(e)&64512)===55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e);function zb(t,e){return function(r){let n,o=0,s="";for(;n=t.exec(r);)o!==n.index&&(s+=r.substring(o,n.index)),s+=e.get(n[0].charCodeAt(0)),o=n.index+1;return s+r.substring(o)}}var j0e=zb(/[&<>'"]/g,jz),qz=zb(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Wz=zb(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var V0e=new Set([Z.AREA,Z.BASE,Z.BASEFONT,Z.BGSOUND,Z.BR,Z.COL,Z.EMBED,Z.FRAME,Z.HR,Z.IMG,Z.INPUT,Z.KEYGEN,Z.LINK,Z.META,Z.PARAM,Z.SOURCE,Z.TRACK,Z.WBR]);function aE(t,e){return Mn.parse(t,e)}function lE(t,e,i){typeof t=="string"&&(i=e,e=t,t=null);let r=Mn.getFragmentParser(t,i);return r.tokenizer.write(e,!0),r.getFragment()}var Bz=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),cE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Rd(t,e){let i=tj(t),r=Ra("type",{handlers:{root:Zz,element:Vz,text:Yz,comment:fE,doctype:Fz,raw:Gz},unknown:Kz}),n={parser:i?new Mn(cE):Mn.getFragmentParser(void 0,cE),handle(a){r(a,n)},stitches:!1,options:e||{}};r(t,n),Za(n,hr());let o=i?n.parser.document:n.parser.getFragment(),s=Nc(o,{file:n.options.file});return n.stitches&&mi(s,"comment",function(a,l,c){let u=a;if(u.value.stitch&&c&&l!==void 0){let f=c.children;return f[l]=u.value.stitch,l}}),s.type==="root"&&s.children.length===1&&s.children[0].type===t.type?s.children[0]:s}function uE(t,e){let i=-1;if(t)for(;++ic&&(c=u):u&&(c!==void 0&&c>-1&&l.push(` -`.repeat(c)||" "),c=-1,l.push(u))}return l.join("")}function wE(t,e,i){return t.type==="element"?mj(t,e,i):t.type==="text"?i.whitespace==="normal"?kE(t,i):gj(t):[]}function mj(t,e,i){let r=SE(t,i),n=t.children||[],o=-1,s=[];if(Oj(t))return s;let a,l;for(Wb(t)||xE(t)&&Id(e,t,xE)?l=` -`:pj(t)?(a=2,l=2):vE(t)&&(a=1,l=1);++o`",url:!1},abruptClosingOfEmptyComment:{reason:"Unexpected abruptly closed empty comment",description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:"Unexpected abruptly closed public identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:"Unexpected abruptly closed system identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:"Unexpected non-digit at start of numeric character reference",description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:"Unexpected CDATA section in HTML",description:"Unexpected `` in ``",description:"Unexpected text character `%c`. Only use text in `