AndroidCatVodSpider/json/js/douban.js

2 lines
557 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var e,t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},r={xml:!1,decodeEntities:!0},i={_useHtmlParser2:!0,xmlMode:!0};function s(e){return null!=e&&e.xml?"boolean"==typeof e.xml?i:n(n({},i),e.xml):null!=e?e:void 0}!function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(e=e||{});const a=e.Root,o=e.Text,c=e.Directive,l=e.Comment,u=e.Script,h=e.Style,f=e.Tag,p=e.CDATA,d=e.Doctype;let m=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return D(this,e)}},E=class extends m{constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},T=class extends E{constructor(){super(...arguments),this.type=e.Text}get nodeType(){return 3}},_=class extends E{constructor(){super(...arguments),this.type=e.Comment}get nodeType(){return 8}},g=class extends E{constructor(t,n){super(n),this.name=t,this.type=e.Directive}get nodeType(){return 1}},A=class extends m{constructor(e){super(),this.children=e}get firstChild(){var e;return null!=(e=this.children[0])?e:null}get lastChild(){return 0<this.children.length?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},y=class extends A{constructor(){super(...arguments),this.type=e.CDATA}get nodeType(){return 4}},v=class extends A{constructor(){super(...arguments),this.type=e.Root}get nodeType(){return 9}},S=class extends A{constructor(t,n,r=[],i=("script"===t?e.Script:"style"===t?e.Style:e.Tag)){super(r),this.name=t,this.attribs=n,this.type=i}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map((e=>{var t;return{name:e,value:this.attribs[e],namespace:null==(t=this["x-attribsNamespace"])?void 0:t[e],prefix:null==(t=this["x-attribsPrefix"])?void 0:t[e]}}))}};function N(t){return t.type===e.Tag||t.type===e.Script||t.type===e.Style}function I(t){return t.type===e.CDATA}function b(t){return t.type===e.Text}function C(t){return t.type===e.Comment}function O(t){return t.type===e.Directive}function k(t){return t.type===e.Root}function R(e){return Object.prototype.hasOwnProperty.call(e,"children")}function D(e,t=!1){let n;if(b(e))n=new T(e.data);else if(C(e))n=new _(e.data);else if(N(e)){const r=t?L(e.children):[],i=new S(e.name,{...e.attribs},r);r.forEach((e=>e.parent=i)),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]={...e["x-attribsPrefix"]}),n=i}else if(I(e)){const r=t?L(e.children):[],i=new y(r);r.forEach((e=>e.parent=i)),n=i}else if(k(e)){const r=t?L(e.children):[],i=new v(r);r.forEach((e=>e.parent=i)),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),n=i}else{if(!O(e))throw new Error("Not implemented yet: "+e.type);{const t=new g(e.name,e.data);null!=e["x-name"]&&(t["x-name"]=e["x-name"],t["x-publicId"]=e["x-publicId"],t["x-systemId"]=e["x-systemId"]),n=t}}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function L(e){var t=e.map((e=>D(e,!0)));for(let e=1;e<t.length;e++)t[e].prev=t[e-1],t[e-1].next=t[e];return t}const w={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};let M=class{constructor(e,t,n){this.dom=[],this.root=new v(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=w),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:w,this.elementCB=null!=n?n:null}onparserinit(e){this.parser=e}onreset(){this.dom=[],this.root=new v(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(e){this.handleCallback(e)}onclosetag(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)}onopentag(t,n){var r=this.options.xmlMode?e.Tag:void 0;t=new S(t,n,void 0,r);this.addNode(t),this.tagStack.push(t)}ontext(t){var n=this.lastNode;if(n&&n.type===e.Text)n.data+=t,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{const e=new T(t);this.addNode(e),this.lastNode=e}}oncomment(t){this.lastNode&&this.lastNode.type===e.Comment?this.lastNode.data+=t:(t=new _(t),this.addNode(t),this.lastNode=t)}oncommentend(){this.lastNode=null}oncdatastart(){var e=new T(""),t=new y([e]);this.addNode(t),e.parent=t,this.lastNode=e}oncdataend(){this.lastNode=null}onprocessinginstruction(e,t){e=new g(e,t),this.addNode(e)}handleCallback(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e}addNode(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&((e.prev=n).next=e),e.parent=t,this.lastNode=null}};const x=/["&'<>$\x80-\uFFFF]/g,P=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),B=null!=String.prototype.codePointAt?(e,t)=>e.codePointAt(t):(e,t)=>55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function F(e){let t,n="",r=0;for(;null!==(t=x.exec(e));){var i=t.index,s=e.charCodeAt(i),a=P.get(s);r=void 0!==a?(n+=e.substring(r,i)+a,i+1):(n+=`${e.substring(r,i)}&#x${B(e,i).toString(16)};`,x.lastIndex+=Number(55296==(64512&s)))}return n+e.substr(r)}function U(e,t){return function(n){let r,i=0,s="";for(;r=e.exec(n);)i!==r.index&&(s+=n.substring(i,r.index)),s+=t.get(r[0].charCodeAt(0)),i=r.index+1;return s+n.substring(i)}}const H=U(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),G=U(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),X=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e]))),j=new Map(["definitionURL","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((e=>[e.toLowerCase(),e]))),Y=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function q(e){return e.replace(/"/g,"&quot;")}const V=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function $(e,t={}){var n="length"in e?e:[e];let r="";for(let e=0;e<n.length;e++)r+=K(n[e],t);return r}function K(e,t){switch(e.type){case a:return $(e.children,t);case d:case c:return`<${e.data}>`;case l:return`\x3c!--${e.data}--\x3e`;case p:return`<![CDATA[${e.children[0].data}]]>`;case u:case h:case f:return function(e,t){!(t="foreign"===t.xmlMode&&(e.name=null!=(r=X.get(e.name))?r:e.name,e.parent)&&W.has(e.parent.name)?{...t,xmlMode:!1}:t).xmlMode&&z.has(e.name)&&(t={...t,xmlMode:"foreign"});let n="<"+e.name;var r=function(e,t){var n;if(e){const r=!1===(null!=(n=t.encodeEntities)?n:t.decodeEntities)?q:t.xmlMode||"utf8"!==t.encodeEntities?F:H;return Object.keys(e).map((n=>{var i,s=null!=(s=e[n])?s:"";return"foreign"===t.xmlMode&&(n=null!=(i=j.get(n))?i:n),t.emptyAttrs||t.xmlMode||""!==s?`${n}="${r(s)}"`:n})).join(" ")}}(e.attribs,t);return r&&(n+=" "+r),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&V.has(e.name))?(t.xmlMode||(n+=" "),n+="/>"):(n+=">",0<e.children.length&&(n+=$(e.children,t)),!t.xmlMode&&V.has(e.name)||(n+=`</${e.name}>`)),n}(e,t);case o:return function(e,t){var n,r=e.data||"";return!1===(null!=(n=t.encodeEntities)?n:t.decodeEntities)||!t.xmlMode&&e.parent&&Y.has(e.parent.name)?r:(t.xmlMode||"utf8"!==t.encodeEntities?F:G)(r)}(e,t)}}const W=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),z=new Set(["svg","math"]);function Q(e,t){return $(e,t)}function J(e){return Array.isArray(e)?e.map(J).join(""):R(e)&&!C(e)?J(e.children):b(e)?e.data:""}function Z(t){return Array.isArray(t)?t.map(Z).join(""):R(t)&&(t.type===e.Tag||I(t))?Z(t.children):b(t)?t.data:""}function ee(e){return R(e)?e.children:[]}function te(e){return e.parent||null}function ne(e){var t=te(e);if(null!=t)return ee(t);var n=[e];let{prev:r,next:i}=e;for(;null!=r;)n.unshift(r),({prev:r}=r);for(;null!=i;)n.push(i),({next:i}=i);return n}function re(e){let t=e.next;for(;null!==t&&!N(t);)({next:t}=t);return t}function ie(e){let t=e.prev;for(;null!==t&&!N(t);)({prev:t}=t);return t}function se(e){var t,n;e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent&&0<=(n=(t=e.parent.children).lastIndexOf(e))&&t.splice(n,1),e.next=null,e.prev=null,e.parent=null}function ae(e,t,n=!0,r=1/0){return oe(e,Array.isArray(t)?t:[t],n,r)}function oe(e,t,n,r){for(var i=[],s=[t],a=[0];;)if(a[0]>=s[0].length){if(1===a.length)return i;s.shift(),a.shift()}else{const t=s[0][a[0]++];if(e(t)&&(i.push(t),--r<=0))return i;n&&R(t)&&0<t.children.length&&(a.unshift(0),s.unshift(t.children))}}function ce(e,t,n=!0){let r=null;for(let s=0;s<t.length&&!r;s++){var i=t[s];N(i)&&(e(i)?r=i:n&&0<i.children.length&&(r=ce(e,i.children,!0)))}return r}const le={tag_name:e=>"function"==typeof e?t=>N(t)&&e(t.name):"*"===e?N:t=>N(t)&&t.name===e,tag_type:e=>"function"==typeof e?t=>e(t.type):t=>t.type===e,tag_contains:e=>"function"==typeof e?t=>b(t)&&e(t.data):t=>b(t)&&t.data===e};function ue(e,t){return"function"==typeof t?n=>N(n)&&t(n.attribs[e]):n=>N(n)&&n.attribs[e]===t}function he(e,t){return n=>e(n)||t(n)}function fe(e){var t=Object.keys(e).map((t=>{var n=e[t];return Object.prototype.hasOwnProperty.call(le,t)?le[t](n):ue(t,n)}));return 0===t.length?null:t.reduce(he)}function pe(e,t,n=!0,r=1/0){return ae(le.tag_name(e),t,n,r)}function de(e,n){var r=[],i=[];if(e===n)return 0;let s=R(e)?e:e.parent;for(;s;)r.unshift(s),s=s.parent;for(s=R(n)?n:n.parent;s;)i.unshift(s),s=s.parent;var a,o,c,l,u=Math.min(r.length,i.length);let h=0;for(;h<u&&r[h]===i[h];)h++;return 0===h?t.DISCONNECTED:(o=(a=r[h-1]).children,c=r[h],l=i[h],o.indexOf(c)>o.indexOf(l)?a===n?t.FOLLOWING|t.CONTAINED_BY:t.FOLLOWING:a===e?t.PRECEDING|t.CONTAINS:t.PRECEDING)}function me(e){return(e=e.filter(((e,t,n)=>!n.includes(e,t+1)))).sort(((e,n)=>(e=de(e,n))&t.PRECEDING?-1:e&t.FOLLOWING?1:0)),e}!function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(t=t||{});const Ee=["url","type","lang"],Te=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function _e(e){return pe("media:content",e).map((e=>{var t=e.attribs,n={medium:t.medium,isDefault:!!t.isDefault};for(const e of Ee)t[e]&&(n[e]=t[e]);for(const e of Te)t[e]&&(n[e]=parseInt(t[e],10));return t.expression&&(n.expression=t.expression),n}))}function ge(e,t){return pe(e,t,!0,1)[0]}function Ae(e,t,n=!1){return J(pe(e,t,n,1)).trim()}function ye(e,t,n,r,i=!1){(n=Ae(n,r,i))&&(e[t]=n)}function ve(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}var Se=Object.freeze({__proto__:null,isTag:N,isCDATA:I,isText:b,isComment:C,isDocument:k,hasChildren:R,getOuterHTML:Q,getInnerHTML:function(e,t){return R(e)?e.children.map((e=>Q(e,t))).join(""):""},getText:function e(t){return Array.isArray(t)?t.map(e).join(""):N(t)?"br"===t.name?"\n":e(t.children):I(t)?e(t.children):b(t)?t.data:""},textContent:J,innerText:Z,getChildren:ee,getParent:te,getSiblings:ne,getAttributeValue:function(e,t){return null==(e=e.attribs)?void 0:e[t]},hasAttrib:function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},getName:function(e){return e.name},nextElementSibling:re,prevElementSibling:ie,removeElement:se,replaceElement:function(e,t){const n=t.prev=e.prev;n&&(n.next=t);var r=t.next=e.next;if(r&&(r.prev=t),r=t.parent=e.parent){const n=r.children;n[n.lastIndexOf(e)]=t,e.parent=null}},appendChild:function(e,t){se(t),t.next=null,1<(t.parent=e).children.push(t)?((e=e.children[e.children.length-2]).next=t).prev=e:t.prev=null},append:function(e,t){se(t);var n=e.parent,r=e.next;if(t.next=r,((t.prev=e).next=t).parent=n,r){if(r.prev=t,n){const e=n.children;e.splice(e.lastIndexOf(r),0,t)}}else n&&n.children.push(t)},prependChild:function(e,t){se(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)?((e=e.children[1]).prev=t).next=e:t.next=null},prepend:function(e,t){se(t);var n,r=e.parent;r&&(n=r.children).splice(n.indexOf(e),0,t),e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,(t.next=e).prev=t},filter:ae,find:oe,findOneChild:function(e,t){return t.find(e)},findOne:ce,existsOne:function e(t,n){return n.some((n=>N(n)&&(t(n)||e(t,n.children))))},findAll:function(e,t){for(var n=[],r=[t],i=[0];;)if(i[0]>=r[0].length){if(1===r.length)return n;r.shift(),i.shift()}else{const t=r[0][i[0]++];N(t)&&(e(t)&&n.push(t),0<t.children.length)&&(i.unshift(0),r.unshift(t.children))}},testElement:function(e,t){return!(e=fe(e))||e(t)},getElements:function(e,t,n,r=1/0){return(e=fe(e))?ae(e,t,n,r):[]},getElementById:function(e,t,n=!0){return Array.isArray(t)||(t=[t]),ce(ue("id",e),t,n)},getElementsByTagName:pe,getElementsByTagType:function(e,t,n=!0,r=1/0){return ae(le.tag_type(e),t,n,r)},removeSubsets:function(e){let t=e.length;for(;0<=--t;){var n=e[t];if(0<t&&0<=e.lastIndexOf(n,t-1))e.splice(t,1);else for(let r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e},get DocumentPosition(){return t},compareDocumentPosition:de,uniqueSort:me,getFeed:function(e){return(e=ge(ve,e))?("feed"===e.name?function(e){var t={type:"atom",items:pe("entry",e=e.children).map((e=>{var t={media:_e(e=e.children)},n=(ye(t,"id","id",e),ye(t,"title","title",e),null==(n=ge("link",e))?void 0:n.attribs.href);return n&&(t.link=n),(n=Ae("summary",e)||Ae("content",e))&&(t.description=n),(n=Ae("updated",e))&&(t.pubDate=new Date(n)),t}))},n=(ye(t,"id","id",e),ye(t,"title","title",e),null==(n=ge("link",e))?void 0:n.attribs.href);return n&&(t.link=n),ye(t,"description","subtitle",e),(n=Ae("updated",e))&&(t.updated=new Date(n)),ye(t,"author","email",e,!0),t}:function(e){var t=null!=(t=null==(t=ge("channel",e.children))?void 0:t.children)?t:[],n=(e={type:e.name.substr(0,3),id:"",items:pe("item",e.children).map((e=>{var t={media:_e(e=e.children)};return ye(t,"id","guid",e),ye(t,"title","title",e),ye(t,"link","link",e),ye(t,"description","description",e),(e=Ae("pubDate",e)||Ae("dc:date",e))&&(t.pubDate=new Date(e)),t}))},ye(e,"title","title",t),ye(e,"link","link",t),ye(e,"description","description",t),Ae("lastBuildDate",t));return n&&(e.updated=new Date(n)),ye(e,"author","managingEditor",t,!0),e})(e):null}}),Ne=function(){return(Ne=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Ie(e,t,n){return e?e(null!=t?t:e._root.children,null,void 0,n).toString():""}function be(e){for(var t=e||(this?this.root():[]),n="",r=0;r<t.length;r++)n+=J(t[r]);return n}function Ce(e,t){if(t!==e)for(var n=t;n&&n!==n.parent;)if((n=n.parent)===e)return!0;return!1}function Oe(e){if(!Array.isArray(e)){if("object"!=typeof e||!Object.prototype.hasOwnProperty.call(e,"length")||"number"!=typeof e.length||e.length<0)return!1;for(var t=0;t<e.length;t++)if(!(t in e))return!1}return!0}var ke,Re=Object.freeze({__proto__:null,html:function(e,t){return Ie(this,function(e){return!("object"!=typeof e||null==e||"length"in e||"type"in e)}(e)?void(t=e):e,Ne(Ne(Ne({},r),null==this?void 0:this._options),s(null!=t?t:{})))},xml:function(e){return Ie(this,e,Ne(Ne({},this._options),{xmlMode:!0}))},text:be,parseHTML:function(e,t,n){return void 0===n&&(n="boolean"==typeof t&&t),e&&"string"==typeof e?("boolean"==typeof t&&(n=t),t=this.load(e,r,!1),n||t("script").remove(),t.root()[0].children.slice()):null},root:function(){return this(this._root)},contains:Ce,merge:function(e,t){if(Oe(e)&&Oe(t)){for(var n=e.length,r=+t.length,i=0;i<r;i++)e[n++]=t[i];return e.length=n,e}}});function De(e){return null!=e.cheerio}function Le(e,t){for(var n=e.length,r=0;r<n;r++)t(e[r],r);return e}function we(e){e="length"in e?Array.prototype.map.call(e,(function(e){return D(e,!0)})):[D(e,!0)];var t=new v(e);return e.forEach((function(e){e.parent=t})),e}function Me(e){var t,n=e.indexOf("<");return!(n<0||n>e.length-3)&&((t=e.charCodeAt(n+1))>=ke.LowerA&&t<=ke.LowerZ||t>=ke.UpperA&&t<=ke.UpperZ||t===ke.Exclamation)&&e.includes(">",n+2)}!function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"}(ke=ke||{});var xe=Object.prototype.hasOwnProperty,Pe=/\s+/,Be="data-",Fe={null:null,true:!0,false:!1},Ue=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,He=/^{[^]*}$|^\[[^]*]$/;function Ge(e,t,n){if(e&&N(e))return null==e.attribs&&(e.attribs={}),t?xe.call(e.attribs,t)?!n&&Ue.test(t)?t:e.attribs[t]:"option"===e.name&&"value"===t?be(e.children):"input"!==e.name||"radio"!==e.attribs.type&&"checkbox"!==e.attribs.type||"value"!==t?void 0:"on":e.attribs}function Xe(e,t,n){null===n?$e(e,t):e.attribs[t]="".concat(n)}function je(e,t,n){return t in e?e[t]:!n&&Ue.test(t)?void 0!==Ge(e,t,!1):Ge(e,t,n)}function Ye(e,t,n,r){t in e?e[t]=n:Xe(e,t,!r&&Ue.test(t)?n?"":null:"".concat(n))}function qe(e,t,n){null==e.data&&(e.data={}),"object"==typeof t?Object.assign(e.data,t):"string"==typeof t&&void 0!==n&&(e.data[t]=n)}function Ve(e,t){for(var n,r,i=null==t?(n=Object.keys(e.attribs).filter((function(e){return e.startsWith(Be)}))).map((function(e){return e.slice(5).replace(/[_.-](\w|$)/g,(function(e,t){return t.toUpperCase()}))})):(n=[Be+t.replace(/[A-Z]/g,"-$&").toLowerCase()],[t]),s=0;s<n.length;++s){var a=n[s],o=i[s];if(xe.call(e.attribs,a)&&!xe.call(e.data,o)){if(r=e.attribs[a],xe.call(Fe,r))r=Fe[r];else if(r===String(Number(r)))r=Number(r);else if(He.test(r))try{r=JSON.parse(r)}catch(e){}e.data[o]=r}}return null==t?e.data:r}function $e(e,t){e.attribs&&xe.call(e.attribs,t)&&delete e.attribs[t]}function Ke(e){return e?e.trim().split(Pe):[]}var We,ze,Qe=Object.freeze({__proto__:null,attr:function(e,t){if("object"!=typeof e&&void 0===t)return 1<arguments.length?this:Ge(this[0],e,this.options.xmlMode);if("function"!=typeof t)return Le(this,(function(n){N(n)&&("object"==typeof e?Object.keys(e).forEach((function(t){var r=e[t];Xe(n,t,r)})):Xe(n,e,t))}));if("string"!=typeof e)throw new Error("Bad combination of arguments.");return Le(this,(function(n,r){N(n)&&Xe(n,e,t.call(n,r,n.attribs[e]))}))},prop:function(e,t){var n=this;if("string"==typeof e&&void 0===t){var r=this[0];if(!r||!N(r))return;switch(e){case"style":var i=this.css(),s=Object.keys(i);return s.forEach((function(e,t){i[t]=e})),i.length=s.length,i;case"tagName":case"nodeName":return r.name.toUpperCase();case"href":case"src":return s=null==(s=r.attribs)?void 0:s[e],"undefined"==typeof URL||("href"!==e||"a"!==r.tagName&&"link"!==r.name)&&("src"!==e||"img"!==r.tagName&&"iframe"!==r.tagName&&"audio"!==r.tagName&&"video"!==r.tagName&&"source"!==r.tagName)||void 0===s||!this.options.baseURI?s:new URL(s,this.options.baseURI).href;case"innerText":return Z(r);case"textContent":return J(r);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return je(r,e,this.options.xmlMode)}}if("object"==typeof e||void 0!==t){if("function"!=typeof t)return Le(this,(function(r){N(r)&&("object"==typeof e?Object.keys(e).forEach((function(t){var i=e[t];Ye(r,t,i,n.options.xmlMode)})):Ye(r,e,t,n.options.xmlMode))}));if("object"==typeof e)throw new Error("Bad combination of arguments.");return Le(this,(function(r,i){N(r)&&Ye(r,e,t.call(r,i,je(r,e,n.options.xmlMode)),n.options.xmlMode)}))}},data:function(e,t){var n=this[0];if(n&&N(n))return null==n.data&&(n.data={}),e?"object"==typeof e||void 0!==t?(Le(this,(function(n){N(n)&&("object"==typeof e?qe(n,e):qe(n,e,t))})),this):xe.call(n.data,e)?n.data[e]:Ve(n,e):Ve(n)},val:function(e){var t=0===arguments.length,n=this[0];if(!n||!N(n))return t?void 0:this;switch(n.name){case"textarea":return this.text(e);case"select":var r=this.find("option:selected");if(t)return this.attr("multiple")?r.toArray().map((function(e){return be(e.children)})):r.attr("value");if(null!=this.attr("multiple")||"object"!=typeof e){this.find("option").removeAttr("selected");for(var i="object"!=typeof e?[e]:e,s=0;s<i.length;s++)this.find('option[value="'.concat(i[s],'"]')).attr("selected","")}return this;case"input":case"option":return t?this.attr("value"):this.attr("value",e)}},removeAttr:function(e){for(var t=Ke(e),n=this,r=0;r<t.length;r++)!function(e){Le(n,(function(n){N(n)&&$e(n,t[e])}))}(r);return this},hasClass:function(e){return this.toArray().some((function(t){var n=N(t)&&t.attribs.class,r=-1;if(n&&e.length)for(;-1<(r=n.indexOf(e,r+1));){var i=r+e.length;if((0===r||Pe.test(n[r-1]))&&(i===n.length||Pe.test(n[i])))return!0}return!1}))},addClass:function e(t){if("function"==typeof t)return Le(this,(function(n,r){var i;N(n)&&(i=n.attribs.class||"",e.call([n],t.call(n,r,i)))}));if(t&&"string"==typeof t)for(var n=t.split(Pe),r=this.length,i=0;i<r;i++){var s=this[i];if(N(s)){var a=Ge(s,"class",!1);if(a){for(var o=" ".concat(a," "),c=0;c<n.length;c++){var l="".concat(n[c]," ");o.includes(" ".concat(l))||(o+=l)}Xe(s,"class",o.trim())}else Xe(s,"class",n.join(" ").trim())}}return this},removeClass:function e(t){var n,r,i;return"function"==typeof t?Le(this,(function(n,r){N(n)&&e.call([n],t.call(n,r,n.attribs.class||""))})):(n=Ke(t),r=n.length,i=0===arguments.length,Le(this,(function(e){if(N(e))if(i)e.attribs.class="";else{for(var t=Ke(e.attribs.class),s=!1,a=0;a<r;a++){var o=t.indexOf(n[a]);0<=o&&(t.splice(o,1),s=!0,a--)}s&&(e.attribs.class=t.join(" "))}})))},toggleClass:function e(t,n){if("function"==typeof t)return Le(this,(function(r,i){N(r)&&e.call([r],t.call(r,i,r.attribs.class||"",n),n)}));if(t&&"string"==typeof t)for(var r=t.split(Pe),i=r.length,s="boolean"==typeof n?n?1:-1:0,a=this.length,o=0;o<a;o++){var c=this[o];if(N(c)){for(var l=Ke(c.attribs.class),u=0;u<i;u++){var h=l.indexOf(r[u]);0<=s&&h<0?l.push(r[u]):s<=0&&0<=h&&l.splice(h,1)}c.attribs.class=l.join(" ")}}return this}});!function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"}(We=We||{}),function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"}(ze=ze||{});const Je=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,Ze=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,et=new Map([[126,ze.Element],[94,ze.Start],[36,ze.End],[42,ze.Any],[33,ze.Not],[124,ze.Hyphen]]),tt=new Set(["has","not","matches","is","where","host","host-context"]);function nt(e){switch(e.type){case We.Adjacent:case We.Child:case We.Descendant:case We.Parent:case We.Sibling:case We.ColumnCombinator:return!0;default:return!1}}const rt=new Set(["contains","icontains"]);function it(e,t,n){var r=parseInt(t,16)-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}function st(e){return e.replace(Ze,it)}function at(e){return 39===e||34===e}function ot(e){return 32===e||9===e||10===e||12===e||13===e}function ct(e){var t=[],n=lt(t,""+e,0);if(n<e.length)throw new Error("Unmatched selector: "+e.slice(n));return t}function lt(e,t,n){let r=[];function i(e){var r=t.slice(n+e).match(Je);if(r)return[r]=r,n+=e+r.length,st(r);throw new Error("Expected name, found "+t.slice(n))}function s(e){for(n+=e;n<t.length&&ot(t.charCodeAt(n));)n++}function a(){var e=n+=1;let r=1;for(;0<r&&n<t.length;n++)40!==t.charCodeAt(n)||o(n)?41!==t.charCodeAt(n)||o(n)||r--:r++;if(r)throw new Error("Parenthesis not matched");return st(t.slice(e,n-1))}function o(e){let n=0;for(;92===t.charCodeAt(--e);)n++;return!(1&~n)}function c(){if(0<r.length&&nt(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function l(e){0<r.length&&r[r.length-1].type===We.Descendant?r[r.length-1].type=e:(c(),r.push({type:e}))}function u(e,t){r.push({type:We.Attribute,name:e,action:t,value:i(1),namespace:null,ignoreCase:"quirks"})}function h(){if(r.length&&r[r.length-1].type===We.Descendant&&r.pop(),0===r.length)throw new Error("Empty sub-selector");e.push(r)}if(s(0),t.length!==n){e:for(;n<t.length;){const e=t.charCodeAt(n);switch(e){case 32:case 9:case 10:case 12:case 13:0!==r.length&&r[0].type===We.Descendant||(c(),r.push({type:We.Descendant})),s(1);break;case 62:l(We.Child),s(1);break;case 60:l(We.Parent),s(1);break;case 126:l(We.Sibling),s(1);break;case 43:l(We.Adjacent),s(1);break;case 46:u("class",ze.Element);break;case 35:u("id",ze.Equals);break;case 91:{let e,a=(s(1),null),c=(124===t.charCodeAt(n)?e=i(1):t.startsWith("*|",n)?(a="*",e=i(2)):(e=i(0),124===t.charCodeAt(n)&&61!==t.charCodeAt(n+1)&&(a=e,e=i(1))),s(0),ze.Exists);const l=et.get(t.charCodeAt(n));if(l){if(c=l,61!==t.charCodeAt(n+1))throw new Error("Expected `=`");s(2)}else 61===t.charCodeAt(n)&&(c=ze.Equals,s(1));let u="",h=null;if("exists"!==c){if(at(t.charCodeAt(n))){const e=t.charCodeAt(n);let r=n+1;for(;r<t.length&&(t.charCodeAt(r)!==e||o(r));)r+=1;if(t.charCodeAt(r)!==e)throw new Error("Attribute value didn't end");u=st(t.slice(n+1,r)),n=r+1}else{const e=n;for(;n<t.length&&(!ot(t.charCodeAt(n))&&93!==t.charCodeAt(n)||o(n));)n+=1;u=st(t.slice(e,n))}s(0);const e=32|t.charCodeAt(n);115==e?(h=!1,s(1)):105==e&&(h=!0,s(1))}if(93!==t.charCodeAt(n))throw new Error("Attribute selector didn't terminate");n+=1;var f={type:We.Attribute,name:e,action:c,value:u,namespace:a,ignoreCase:h};r.push(f);break}case 58:{if(58===t.charCodeAt(n+1)){r.push({type:We.PseudoElement,name:i(2).toLowerCase(),data:40===t.charCodeAt(n)?a():null});continue}const e=i(1).toLowerCase();let s=null;if(40===t.charCodeAt(n))if(tt.has(e)){if(at(t.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${e} cannot be quoted`);if(s=[],n=lt(s,t,n+1),41!==t.charCodeAt(n))throw new Error(`Missing closing parenthesis in :${e} (${t})`);n+=1}else{if(s=a(),rt.has(e)){const e=s.charCodeAt(0);e===s.charCodeAt(s.length-1)&&at(e)&&(s=s.slice(1,-1))}s=st(s)}r.push({type:We.Pseudo,name:e,data:s});break}case 44:h(),r=[],s(1);break;default:if(t.startsWith("/*",n)){const e=t.indexOf("*/",n+2);if(e<0)throw new Error("Comment was not terminated");n=e+2,0===r.length&&s(0)}else{let a,o=null;if(42===e)n+=1,a="*";else if(124===e){if(a="",124===t.charCodeAt(n+1)){l(We.ColumnCombinator),s(2);break}}else{if(!Je.test(t.slice(n)))break e;a=i(0)}124===t.charCodeAt(n)&&124!==t.charCodeAt(n+1)&&(o=a,42===t.charCodeAt(n+1)?(a="*",n+=2):a=i(1)),r.push("*"===a?{type:We.Universal,namespace:o}:{type:We.Tag,name:a,namespace:o})}}}h()}return n}var ut,ht={trueFunc:function(){return!0},falseFunc:function(){return!1}},ft=ht.trueFunc;const pt=new Map([[We.Universal,50],[We.Tag,30],[We.Attribute,1],[We.Pseudo,0]]);function dt(e){return!pt.has(e.type)}const mt=new Map([[ze.Exists,10],[ze.Equals,8],[ze.Not,7],[ze.Start,6],[ze.End,6],[ze.Any,5]]);function Et(e){var t=e.map(Tt);for(let r=1;r<e.length;r++){var n=t[r];if(!(n<0))for(let i=r-1;0<=i&&n<t[i];i--){const r=e[i+1];e[i+1]=e[i],e[i]=r,t[i+1]=t[i],t[i]=n}}}function Tt(e){var t;let n=null!=(t=pt.get(e.type))?t:-1;return e.type===We.Attribute?(n=null!=(t=mt.get(e.action))?t:4,e.action===ze.Equals&&"id"===e.name&&(n=9),e.ignoreCase&&(n>>=1)):e.type===We.Pseudo&&(e.data?"has"===e.name||"contains"===e.name?n=0:Array.isArray(e.data)?(n=Math.min(...e.data.map((e=>Math.min(...e.map(Tt))))))<0&&(n=0):n=2:n=3),n}const _t=/[-[\]{}()*+?.,\\^$|#\s]/g;function gt(e){return e.replace(_t,"\\$&")}const At=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function yt(e,t){return"boolean"==typeof e.ignoreCase?e.ignoreCase:"quirks"===e.ignoreCase?!!t.quirksMode:!t.xmlMode&&At.has(e.name)}const vt={equals(e,t,n){const r=n.adapter,i=t.name;let s=t.value;return yt(t,n)?(s=s.toLowerCase(),t=>{var n=r.getAttributeValue(t,i);return null!=n&&n.length===s.length&&n.toLowerCase()===s&&e(t)}):t=>r.getAttributeValue(t,i)===s&&e(t)},hyphen(e,t,n){const r=n.adapter,i=t.name;let s=t.value;const a=s.length;return yt(t,n)?(s=s.toLowerCase(),function(t){var n=r.getAttributeValue(t,i);return null!=n&&(n.length===a||"-"===n.charAt(a))&&n.substr(0,a).toLowerCase()===s&&e(t)}):function(t){var n=r.getAttributeValue(t,i);return null!=n&&(n.length===a||"-"===n.charAt(a))&&n.substr(0,a)===s&&e(t)}},element(e,t,n){const r=n.adapter,{name:i,value:s}=t;if(/\s/.test(s))return ht.falseFunc;const a=new RegExp(`(?:^|\\s)${gt(s)}(?:$|\\s)`,yt(t,n)?"i":"");return function(t){var n=r.getAttributeValue(t,i);return null!=n&&n.length>=s.length&&a.test(n)&&e(t)}},exists:(e,{name:t},{adapter:n})=>r=>n.hasAttrib(r,t)&&e(r),start(e,t,n){const r=n.adapter,i=t.name;let s=t.value;const a=s.length;return 0===a?ht.falseFunc:yt(t,n)?(s=s.toLowerCase(),t=>{var n=r.getAttributeValue(t,i);return null!=n&&n.length>=a&&n.substr(0,a).toLowerCase()===s&&e(t)}):t=>{var n;return!(null==(n=r.getAttributeValue(t,i))||!n.startsWith(s))&&e(t)}},end(e,t,n){const r=n.adapter,i=t.name;let s=t.value;const a=-s.length;return 0==a?ht.falseFunc:yt(t,n)?(s=s.toLowerCase(),t=>{var n;return(null==(n=r.getAttributeValue(t,i))?void 0:n.substr(a).toLowerCase())===s&&e(t)}):t=>{var n;return!(null==(n=r.getAttributeValue(t,i))||!n.endsWith(s))&&e(t)}},any(e,t,n){const r=n.adapter,{name:i,value:s}=t;if(""===s)return ht.falseFunc;if(yt(t,n)){const t=new RegExp(gt(s),"i");return function(n){var a=r.getAttributeValue(n,i);return null!=a&&a.length>=s.length&&t.test(a)&&e(n)}}return t=>{var n;return!(null==(n=r.getAttributeValue(t,i))||!n.includes(s))&&e(t)}},not(e,t,n){const r=n.adapter,i=t.name;let s=t.value;return""===s?t=>!!r.getAttributeValue(t,i)&&e(t):yt(t,n)?(s=s.toLowerCase(),t=>{var n=r.getAttributeValue(t,i);return(null==n||n.length!==s.length||n.toLowerCase()!==s)&&e(t)}):t=>r.getAttributeValue(t,i)!==s&&e(t)}},St=new Set([9,10,12,13,32]),Nt="0".charCodeAt(0),It="9".charCodeAt(0);function bt(e){return function(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return ht.falseFunc;if(-1===t)return e=>e<=n;if(0===t)return e=>e===n;if(1===t)return n<0?ht.trueFunc:e=>e>=n;const r=Math.abs(t),i=(n%r+r)%r;return 1<t?e=>e>=n&&e%r==i:e=>e<=n&&e%r==i}(function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];let t=0,n=0,r=s(),i=a();if(t<e.length&&"n"===e.charAt(t)&&(t++,n=r*(null!=i?i:1),o(),t<e.length?(r=s(),o(),i=a()):r=i=0),null===i||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*i];function s(){return"-"===e.charAt(t)?(t++,-1):("+"===e.charAt(t)&&t++,1)}function a(){var n=t;let r=0;for(;t<e.length&&e.charCodeAt(t)>=Nt&&e.charCodeAt(t)<=It;)r=10*r+(e.charCodeAt(t)-Nt),t++;return t===n?null:r}function o(){for(;t<e.length&&St.has(e.charCodeAt(t));)t++}}(e))}function Ct(e,t){return n=>{var r=t.getParent(n);return null!=r&&t.isTag(r)&&e(n)}}const Ot={contains:(e,t,{adapter:n})=>function(r){return e(r)&&n.getText(r).includes(t)},icontains(e,t,{adapter:n}){const r=t.toLowerCase();return function(t){return e(t)&&n.getText(t).toLowerCase().includes(r)}},"nth-child"(e,t,{adapter:n,equals:r}){const i=bt(t);return i===ht.falseFunc?ht.falseFunc:i===ht.trueFunc?Ct(e,n):function(t){var s=n.getSiblings(t);let a=0;for(let e=0;e<s.length&&!r(t,s[e]);e++)n.isTag(s[e])&&a++;return i(a)&&e(t)}},"nth-last-child"(e,t,{adapter:n,equals:r}){const i=bt(t);return i===ht.falseFunc?ht.falseFunc:i===ht.trueFunc?Ct(e,n):function(t){var s=n.getSiblings(t);let a=0;for(let e=s.length-1;0<=e&&!r(t,s[e]);e--)n.isTag(s[e])&&a++;return i(a)&&e(t)}},"nth-of-type"(e,t,{adapter:n,equals:r}){const i=bt(t);return i===ht.falseFunc?ht.falseFunc:i===ht.trueFunc?Ct(e,n):function(t){var s=n.getSiblings(t);let a=0;for(let e=0;e<s.length;e++){const i=s[e];if(r(t,i))break;n.isTag(i)&&n.getName(i)===n.getName(t)&&a++}return i(a)&&e(t)}},"nth-last-of-type"(e,t,{adapter:n,equals:r}){const i=bt(t);return i===ht.falseFunc?ht.falseFunc:i===ht.trueFunc?Ct(e,n):function(t){var s=n.getSiblings(t);let a=0;for(let e=s.length-1;0<=e;e--){const i=s[e];if(r(t,i))break;n.isTag(i)&&n.getName(i)===n.getName(t)&&a++}return i(a)&&e(t)}},root:(e,t,{adapter:n})=>t=>{var r=n.getParent(t);return(null==r||!n.isTag(r))&&e(t)},scope(e,t,n,r){const i=n.equals;return r&&0!==r.length?1===r.length?t=>i(r[0],t)&&e(t):t=>r.includes(t)&&e(t):Ot.root(e,t,n)},hover:kt("isHovered"),visited:kt("isVisited"),active:kt("isActive")};function kt(e){return function(t,n,{adapter:r}){const i=r[e];return"function"!=typeof i?ht.falseFunc:function(e){return i(e)&&t(e)}}}const Rt={empty:(e,{adapter:t})=>!t.getChildren(e).some((e=>t.isTag(e)||""!==t.getText(e))),"first-child"(e,{adapter:t,equals:n}){var r;return t.prevElementSibling?null==t.prevElementSibling(e):null!=(r=t.getSiblings(e).find((e=>t.isTag(e))))&&n(e,r)},"last-child"(e,{adapter:t,equals:n}){var r=t.getSiblings(e);for(let i=r.length-1;0<=i;i--){if(n(e,r[i]))return!0;if(t.isTag(r[i]))break}return!1},"first-of-type"(e,{adapter:t,equals:n}){var r=t.getSiblings(e),i=t.getName(e);for(let a=0;a<r.length;a++){var s=r[a];if(n(e,s))return!0;if(t.isTag(s)&&t.getName(s)===i)break}return!1},"last-of-type"(e,{adapter:t,equals:n}){var r=t.getSiblings(e),i=t.getName(e);for(let a=r.length-1;0<=a;a--){var s=r[a];if(n(e,s))return!0;if(t.isTag(s)&&t.getName(s)===i)break}return!1},"only-of-type"(e,{adapter:t,equals:n}){const r=t.getName(e);return t.getSiblings(e).every((i=>n(e,i)||!t.isTag(i)||t.getName(i)!==r))},"only-child":(e,{adapter:t,equals:n})=>t.getSiblings(e).every((r=>n(e,r)||!t.isTag(r)))};function Dt(e,t,n,r){if(null===n){if(e.length>r)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===r)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const Lt={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},wt={};function Mt(e,t){var n=t.getSiblings(e);return n.length<=1||(e=n.indexOf(e))<0||e===n.length-1?[]:n.slice(e+1).filter(t.isTag)}function xt(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const Pt=(e,t,n,r,i)=>{const s=i(t,xt(n),r);return s===ht.trueFunc?e:s===ht.falseFunc?ht.falseFunc:t=>s(t)&&e(t)},Bt={is:Pt,matches:Pt,where:Pt,not(e,t,n,r,i){const s=i(t,xt(n),r);return s===ht.falseFunc?e:s===ht.trueFunc?ht.falseFunc:t=>!s(t)&&e(t)},has(e,t,n,r,i){const s=n.adapter,a=xt(n),o=(a.relativeSelector=!0,t.some((e=>e.some(dt)))?[wt]:void 0),c=i(t,a,o);if(c===ht.falseFunc)return ht.falseFunc;const l=function(e,t){return e===ht.falseFunc?ht.falseFunc:n=>t.isTag(n)&&e(n)}(c,s);if(o&&c!==ht.trueFunc){const{shouldTestNextSiblings:t=!1}=c;return n=>{if(!e(n))return!1;o[0]=n;var r=s.getChildren(n);n=t?[...r,...Mt(n,s)]:r;return s.existsOne(l,n)}}return t=>e(t)&&s.existsOne(l,s.getChildren(t))}};function Ft(e,t){return(e=t.getParent(e))&&t.isTag(e)?e:null}function Ut(e){return e.type===We.Pseudo&&("scope"===e.name||Array.isArray(e.data)&&e.data.some((e=>e.some(Ut))))}const Ht={type:We.Descendant},Gt={type:"_flexibleDescendant"},Xt={type:We.Pseudo,name:"scope",data:null};function jt(e,t){return t===ht.falseFunc||e===ht.trueFunc?e:e===ht.falseFunc||t===ht.trueFunc?t:function(n){return e(n)||t(n)}}const Yt=(e,t)=>e===t,qt={adapter:Se,equals:Yt},Vt=(ut=function e(t,n,r){t.forEach(Et),r=null!=(o=n.context)?o:r;const i=Array.isArray(r),s=r&&(Array.isArray(r)?r:[r]);if(!1!==n.relativeSelector)!function(e,{adapter:t},n){var r=!(null==n||!n.every((e=>{var n=t.isTag(e)&&t.getParent(e);return e===wt||n&&t.isTag(n)})));for(const t of e){if(!(0<t.length&&dt(t[0])&&t[0].type!==We.Descendant)){if(!r||t.some(Ut))continue;t.unshift(Ht)}t.unshift(Xt)}}(t,n,s);else if(t.some((e=>0<e.length&&dt(e[0]))))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let a=!1;var o=t.map((t=>{if(2<=t.length){const[e,n]=t;e.type===We.Pseudo&&"scope"===e.name&&(i&&n.type===We.Descendant?t[1]=Gt:n.type!==We.Adjacent&&n.type!==We.Sibling||(a=!0))}return function(t,n,r){return t.reduce(((t,i)=>t===ht.falseFunc?ht.falseFunc:function(e,t,n,r,i){const{adapter:s,equals:a}=n;switch(t.type){case We.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case We.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case We.Attribute:if(null!=t.namespace)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(t.name=t.name.toLowerCase()),vt[t.action](e,t,n);case We.Pseudo:return function(e,t,n,r,i){const{name:s,data:a}=t;if(Array.isArray(a)){if(s in Bt)return Bt[s](e,a,n,r,i);throw new Error(`Unknown pseudo-class :${s}(${a})`)}const o=null==(t=n.pseudos)?void 0:t[s],c="string"==typeof o?o:Lt[s];if("string"==typeof c){if(null!=a)throw new Error(`Pseudo ${s} doesn't have any arguments`);const t=ct(c);return Bt.is(e,t,n,r,i)}if("function"==typeof o)return Dt(o,s,a,1),t=>o(t,a)&&e(t);if(s in Ot)return Ot[s](e,a,n,r);if(s in Rt){const t=Rt[s];return Dt(t,s,a,2),r=>t(r,n,a)&&e(r)}throw new Error("Unknown pseudo-class :"+s)}(e,t,n,r,i);case We.Tag:{if(null!=t.namespace)throw new Error("Namespaced tag names are not yet supported by css-select");let r=t.name;return n.xmlMode&&!n.lowerCaseTags||(r=r.toLowerCase()),function(t){return s.getName(t)===r&&e(t)}}case We.Descendant:{if(!1===n.cacheResults||"undefined"==typeof WeakSet)return function(t){let n=t;for(;n=Ft(n,s);)if(e(n))return!0;return!1};const t=new WeakSet;return function(n){let r=n;for(;r=Ft(r,s);)if(!t.has(r)){if(s.isTag(r)&&e(r))return!0;t.add(r)}return!1}}case"_flexibleDescendant":return function(t){let n=t;do{if(e(n))return!0}while(n=Ft(n,s));return!1};case We.Parent:return function(t){return s.getChildren(t).some((t=>s.isTag(t)&&e(t)))};case We.Child:return function(t){return null!=(t=s.getParent(t))&&s.isTag(t)&&e(t)};case We.Sibling:return function(t){var n=s.getSiblings(t);for(let i=0;i<n.length;i++){var r=n[i];if(a(t,r))break;if(s.isTag(r)&&e(r))return!0}return!1};case We.Adjacent:return s.prevElementSibling?function(t){return null!=(t=s.prevElementSibling(t))&&e(t)}:function(t){var n=s.getSiblings(t);let r;for(let e=0;e<n.length;e++){var i=n[e];if(a(t,i))break;s.isTag(i)&&(r=i)}return!!r&&e(r)};case We.Universal:if(null!=t.namespace&&"*"!==t.namespace)throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}(t,i,n,r,e)),null!=(t=n.rootFunc)?t:ht.trueFunc)}(t,n,s)})).reduce(jt,ht.falseFunc);return o.shouldTestNextSiblings=a,o},function(e,t,n){return t=function(e){var t;return null==(e=null!=e?e:qt).adapter&&(e.adapter=Se),null==e.equals&&(e.equals=null!=(t=null==(t=e.adapter)?void 0:t.equals)?t:Yt),e}(t),ut(e,t,n)});function $t(e,t,n=!1){return n&&(e=function(e,t){const n=Array.isArray(e)?e.slice(0):[e],r=n.length;for(let e=0;e<r;e++){const r=Mt(n[e],t);n.push(...r)}return n}(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}const Kt=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function Wt(e){return"pseudo"===e.type&&(!!Kt.has(e.name)||!("not"!==e.name||!Array.isArray(e.data))&&e.data.some((e=>e.some(Wt))))}function zt(e){var t=[],n=[];for(const r of e)(r.some(Wt)?t:n).push(r);return[n,t]}const Qt={type:We.Universal,namespace:null},Jt={type:We.Pseudo,name:"scope",data:null};function Zt(e,t,n={}){return en([e],t,n)}function en(e,t,n={}){var r;return"function"==typeof t?e.some(t):([t,r]=zt(ct(t)),0<t.length&&e.some(Vt(t,n))||r.some((t=>0<rn(t,e,n).length)))}function tn(e,t,n={}){return nn(ct(e),t,n)}function nn(e,t,n){if(0===t.length)return[];const[r,i]=zt(e);let s;if(r.length){const e=cn(t,r,n);if(0===i.length)return e;e.length&&(s=new Set(e))}for(let e=0;e<i.length&&(null==s?void 0:s.size)!==t.length;e++){const r=i[e],o=s?t.filter((e=>N(e)&&!s.has(e))):t;if(0===o.length)break;var a=rn(r,t,n);if(a.length)if(s)a.forEach((e=>s.add(e)));else{if(e===i.length-1)return a;s=new Set(a)}}return void 0!==s?s.size===t.length?t:t.filter((e=>s.has(e))):[]}function rn(e,t,n){var r,i;return e.some(nt)?(r=null!=(r=n.root)?r:function(e){for(;e.parent;)e=e.parent;return e}(t[0]),i={...n,context:t,relativeSelector:!1},e.push(Jt),sn(r,e,i,!0,t.length)):sn(t,e,n,!1,t.length)}function sn(e,t,n,r,i){var s=t.findIndex(Wt),a=t.slice(0,s),o=t[s],c=t.length-1===s?i:1/0;if(0===(c=function(e,t,n){var r=null!=t?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(r)?0<=r?r+1:1/0:0;case"lt":return isFinite(r)?0<=r?Math.min(r,n):1/0:0;case"gt":return isFinite(r)?1/0:0;case"odd":return 2*n;case"even":return 2*n-1;case"last":case"not":return 1/0}}(o.name,o.data,c)))return[];r=(0!==a.length||Array.isArray(e)?0===a.length?(Array.isArray(e)?e:[e]).filter(N):r||a.some(nt)?an(e,[a],n,c):cn(e,[a],n):ee(e).filter(N)).slice(0,c);let l=function(e,t,n,r){var i="string"==typeof n?parseInt(n,10):NaN;switch(e){case"first":case"lt":return t;case"last":return 0<t.length?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(i)&&Math.abs(i)<t.length?[i<0?t[t.length+i]:t[i]]:[];case"gt":return isFinite(i)?t.slice(i+1):[];case"even":return t.filter(((e,t)=>t%2==0));case"odd":return t.filter(((e,t)=>t%2==1));case"not":{const e=new Set(nn(n,t,r));return t.filter((t=>!e.has(t)))}}}(o.name,r,o.data,n);if(0===l.length||t.length===s+1)return l;if(e=(a=t.slice(s+1)).some(nt)){if(nt(a[0])){const e=a[0].type;e!==We.Sibling&&e!==We.Adjacent||(l=$t(l,Se,!0)),a.unshift(Qt)}n={...n,relativeSelector:!1,rootFunc:e=>l.includes(e)}}else n.rootFunc&&n.rootFunc!==ft&&(n={...n,rootFunc:ft});return a.some(Wt)?sn(l,a,n,!1,i):e?an(l,[a],n,i):cn(l,[a],n)}function an(e,t,n,r){return on(e,Vt(t,n,e),r)}function on(e,t,n=1/0){return oe((e=>N(e)&&t(e)),$t(e,Se,t.shouldTestNextSiblings),!0,n)}function cn(e,t,n){return 0===(e=(Array.isArray(e)?e:[e]).filter(N)).length||(t=Vt(t,n))===ft?e:e.filter(t)}var ln=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},un=/^\s*[~+]/;function hn(e){return function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return function(r){var i=e(t,this);return r&&(i=On(i,r,this.options.xmlMode,null==(r=this._root)?void 0:r[0])),this._make(1<this.length&&1<i.length?n.reduce((function(e,t){return t(e)}),i):i)}}}var fn=hn((function(e,t){for(var n,r=[],i=0;i<t.length;i++){var s=e(t[i]);r.push(s)}return(n=new Array).concat.apply(n,r)})),pn=hn((function(e,t){for(var n=[],r=0;r<t.length;r++){var i=e(t[r]);null!==i&&n.push(i)}return n}));function dn(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=null,i=hn((function(e,t){var n=[];return Le(t,(function(t){for(var i;(i=e(t))&&(null==r||!r(i,n.length));t=i)n.push(i)})),n})).apply(void 0,ln([e],t,!1));return function(e,t){var n=this;r="string"==typeof e?function(t){return Zt(t,e,n.options)}:e?Cn(e):null,t=i.call(this,t);return r=null,t}}function mn(e){return Array.from(new Set(e))}var En=pn((function(e){return(e=e.parent)&&!k(e)?e:null}),mn),Tn=fn((function(e){for(var t=[];e.parent&&!k(e.parent);)t.push(e.parent),e=e.parent;return t}),me,(function(e){return e.reverse()})),_n=dn((function(e){return(e=e.parent)&&!k(e)?e:null}),me,(function(e){return e.reverse()})),gn=pn((function(e){return re(e)})),An=fn((function(e){for(var t=[];e.next;)N(e=e.next)&&t.push(e);return t}),mn),yn=dn((function(e){return re(e)}),mn),vn=pn((function(e){return ie(e)})),Sn=fn((function(e){for(var t=[];e.prev;)N(e=e.prev)&&t.push(e);return t}),mn),Nn=dn((function(e){return ie(e)}),mn),In=fn((function(e){return ne(e).filter((function(t){return N(t)&&t!==e}))}),me),bn=fn((function(e){return ee(e).filter(N)}),mn);function Cn(e){return"function"==typeof e?function(t,n){return e.call(t,n,t)}:De(e)?function(t){return Array.prototype.includes.call(e,t)}:function(t){return e===t}}function On(e,t,n,r){return"string"==typeof t?tn(t,e,{xmlMode:n,root:r}):e.filter(Cn(t))}var kn=Object.freeze({__proto__:null,find:function(e){var t,n,r;return e?(t=this.toArray(),"string"!=typeof e?(n=De(e)?e.toArray():[e],this._make(n.filter((function(e){return t.some((function(t){return Ce(t,e)}))})))):(n=un.test(e)?t:this.children().toArray(),r={context:t,root:null==(r=this._root)?void 0:r[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode},this._make(function(e,t,n){var r;return"function"==typeof e?on(t,e):([e,r]=zt(ct(e)),r=r.map((e=>sn(t,e,n,!0,1/0))),e.length&&r.push(an(t,e,n,1/0)),0===r.length?[]:1===r.length?r[0]:me(r.reduce(((e,t)=>[...e,...t]))))}(e,n,r)))):this._make([])},parent:En,parents:Tn,parentsUntil:_n,closest:function(e){var t,n,r,i=[];return e&&(n={xmlMode:this.options.xmlMode,root:null==(t=this._root)?void 0:t[0]},r="string"==typeof e?function(t){return Zt(t,e,n)}:Cn(e),Le(this,(function(e){for(;e&&N(e);){if(r(e,0)){i.includes(e)||i.push(e);break}e=e.parent}}))),this._make(i)},next:gn,nextAll:An,nextUntil:yn,prev:vn,prevAll:Sn,prevUntil:Nn,siblings:In,children:bn,contents:function(){var e=this.toArray().reduce((function(e,t){return R(t)?e.concat(t.children):e}),[]);return this._make(e)},each:function(e){for(var t=0,n=this.length;t<n&&!1!==e.call(this[t],t,this[t]);)++t;return this},map:function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n];null!=(r=e.call(r,n,r))&&(t=t.concat(r))}return this._make(t)},filter:function(e){return this._make(On(this.toArray(),e,this.options.xmlMode,null==(e=this._root)?void 0:e[0]))},filterArray:On,is:function(e){var t=this.toArray();return"string"==typeof e?en(t.filter(N),e,this.options):!!e&&t.some(Cn(e))},not:function(e){var t,n,r=this.toArray();r="string"==typeof e?(t=new Set(tn(e,r,this.options)),r.filter((function(e){return!t.has(e)}))):(n=Cn(e),r.filter((function(e,t){return!n(e,t)})));return this._make(r)},has:function(e){var t=this;return this.filter("string"==typeof e?":has(".concat(e,")"):function(n,r){return 0<t._make(r).find(e).length})},first:function(){return 1<this.length?this._make(this[0]):this},last:function(){return 0<this.length?this._make(this[this.length-1]):this},eq:function(e){return 0==(e=+e)&&this.length<=1?this:(e<0&&(e=this.length+e),this._make(null!=(e=this[e])?e:[]))},get:function(e){return null==e?this.toArray():this[e<0?this.length+e:e]},toArray:function(){return Array.prototype.slice.call(this)},index:function(e){var t;e=null==e?(t=this.parent().children(),this[0]):"string"==typeof e?(t=this._make(e),this[0]):(t=this,De(e)?e[0]:e);return Array.prototype.indexOf.call(t,e)},slice:function(e,t){return this._make(Array.prototype.slice.call(this,e,t))},end:function(){var e;return null!=(e=this.prevObject)?e:this._make([])},add:function(e,t){return e=this._make(e,t),t=me(ln(ln([],this.get(),!0),e.get(),!0)),this._make(t)},addBack:function(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}});function Rn(e,t){var n=Array.isArray(e)?e:[e];t?t.children=n:t=null;for(var r=0;r<n.length;r++){var i=n[r];i.parent&&i.parent.children!==n&&se(i),t?(i.prev=n[r-1]||null,i.next=n[r+1]||null):i.prev=i.next=null,i.parent=t}return t}function Dn(e){return function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=this.length-1;return Le(this,(function(r,s){var a;R(r)&&(a="function"==typeof n[0]?n[0].call(r,s,t._render(r.children)):n,a=t._makeDomArray(a,s<i),e(a,r.children,r))}))}}function Ln(e,t,n,r,i){for(var s=function(e,t){for(var n,r=0,i=t.length;r<i;r++)!n&&r in t||((n=n||Array.prototype.slice.call(t,0,r))[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}([t,n],r),a=0===t?null:e[t-1],o=t+n>=e.length?null:e[t+n],c=0;c<r.length;++c){var l,u=r[c],h=u.parent;h&&-1<(l=h.children.indexOf(u))&&(h.children.splice(l,1),i===h)&&l<t&&s[0]--,u.parent=i,u.prev&&(u.prev.next=null!=(h=u.next)?h:null),u.next&&(u.next.prev=null!=(l=u.prev)?l:null),u.prev=0===c?a:r[c-1],u.next=c===r.length-1?o:r[c+1]}return a&&(a.next=r[0]),o&&(o.prev=r[r.length-1]),e.splice.apply(e,s)}var wn=Dn((function(e,t,n){Ln(t,t.length,0,e,n)})),Mn=Dn((function(e,t,n){Ln(t,0,0,e,n)}));function xn(e){return function(t){for(var n=this.length-1,r=this.parents().last(),i=0;i<this.length;i++){var s=this[i],a="function"==typeof t?t.call(s,i,s):"string"!=typeof t||Me(t)?t:r.find(t).clone();if((a=this._makeDomArray(a,i<n)[0])&&R(a)){for(var o=a,c=0;c<o.children.length;){var l=o.children[c];N(l)?(o=l,c=0):c++}e(s,o,[a])}}return this}}var Pn=xn((function(e,t,n){var r,i,s=e.parent;s&&(i=(r=s.children).indexOf(e),Rn([e],t),Ln(r,i,0,n,s))})),Bn=xn((function(e,t,n){R(e)&&(Rn(e.children,t),Rn(n,e))})),Fn=Object.freeze({__proto__:null,_makeDomArray:function(e,t){var n=this;return null==e?[]:De(e)?t?we(e.get()):e.get():Array.isArray(e)?e.reduce((function(e,r){return e.concat(n._makeDomArray(r,t))}),[]):"string"==typeof e?this._parse(e,this.options,!1,null).children:t?we([e]):[e]},appendTo:function(e){return(De(e)?e:this._make(e)).append(this),this},prependTo:function(e){return(De(e)?e:this._make(e)).prepend(this),this},append:wn,prepend:Mn,wrap:Pn,wrapInner:Bn,unwrap:function(e){var t=this;return this.parent(e).not("body").each((function(e,n){t._make(n).replaceWith(n.children)})),this},wrapAll:function(e){var t=this[0];if(t){for(var n=this._make("function"==typeof e?e.call(t,0,t):e).insertBefore(t),r=void 0,i=0;i<n.length;i++)"tag"===n[i].type&&(r=n[i]);for(var s=0;r&&s<r.children.length;){var a=r.children[s];"tag"===a.type?(r=a,s=0):s++}r&&this._make(r).append(this)}return this},after:function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.length-1;return Le(this,(function(n,i){var s,a,o=n.parent;R(n)&&o&&((a=(s=o.children).indexOf(n))<0||(n="function"==typeof t[0]?t[0].call(n,i,e._render(n.children)):t,Ln(s,a+1,0,e._makeDomArray(n,i<r),o)))}))},insertAfter:function(e){var t=this,n=("string"==typeof e&&(e=this._make(e)),this.remove(),[]);return this._makeDomArray(e).forEach((function(e){var r,i=t.clone().toArray(),s=e.parent;!s||(e=(r=s.children).indexOf(e))<0||(Ln(r,e+1,0,i,s),n.push.apply(n,i))})),this._make(n)},before:function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.length-1;return Le(this,(function(n,i){var s,a,o=n.parent;R(n)&&o&&((a=(s=o.children).indexOf(n))<0||(n="function"==typeof t[0]?t[0].call(n,i,e._render(n.children)):t,Ln(s,a,0,e._makeDomArray(n,i<r),o)))}))},insertBefore:function(e){var t=this,n=(e=this._make(e),this.remove(),[]);return Le(e,(function(e){var r,i=t.clone().toArray(),s=e.parent;!s||(e=(r=s.children).indexOf(e))<0||(Ln(r,e,0,i,s),n.push.apply(n,i))})),this._make(n)},remove:function(e){return Le(e?this.filter(e):this,(function(e){se(e),e.prev=e.next=e.parent=null})),this},replaceWith:function(e){var t=this;return Le(this,(function(n,r){var i,s,a=n.parent;a&&(i=a.children,r="function"==typeof e?e.call(n,r,n):e,Rn(r=t._makeDomArray(r),null),s=i.indexOf(n),Ln(i,s,1,r,a),r.includes(n)||(n.parent=n.prev=n.next=null))}))},empty:function(){return Le(this,(function(e){R(e)&&(e.children.forEach((function(e){e.next=e.prev=e.parent=null})),e.children.length=0)}))},html:function(e){var t,n=this;return void 0===e?(t=this[0])&&R(t)?this._render(t.children):null:Le(this,(function(t){R(t)&&(t.children.forEach((function(e){e.next=e.prev=e.parent=null})),Rn(De(e)?e.toArray():n._parse("".concat(e),n.options,!1,t).children,t))}))},toString:function(){return this._render(this)},text:function(e){var t=this;return void 0===e?be(this):Le(this,"function"==typeof e?function(n,r){return t._make(n).text(e.call(n,r,be([n])))}:function(t){R(t)&&(t.children.forEach((function(e){e.next=e.prev=e.parent=null})),Rn(new T("".concat(e)),t))})},clone:function(){return this._make(we(this.get()))}});function Un(e,t,n,r){var i,s;"string"==typeof t?(i=Hn(e),""===(r="function"==typeof n?n.call(e,r,i[t]):n)?delete i[t]:null!=r&&(i[t]=r),e.attribs.style=(s=i,Object.keys(s).reduce((function(e,t){return"".concat(e).concat(e?" ":"").concat(t,": ").concat(s[t],";")}),""))):"object"==typeof t&&Object.keys(t).forEach((function(n,r){Un(e,n,t[n],r)}))}function Hn(e,t){var n,r;if(e&&N(e))return n=function(e){if(!(e=(e||"").trim()))return{};for(var t,n={},r=0,i=e.split(";");r<i.length;r++){var s,a=i[r],o=a.indexOf(":");o<1||o===a.length-1?0<(s=a.trimEnd()).length&&void 0!==t&&(n[t]+=";".concat(s)):n[t=a.slice(0,o).trim()]=a.slice(o+1).trim()}return n}(e.attribs.style),"string"==typeof t?n[t]:Array.isArray(t)?(r={},t.forEach((function(e){null!=n[e]&&(r[e]=n[e])})),r):n}var Gn,Xn,jn,Yn=Object.freeze({__proto__:null,css:function(e,t){return null!=e&&null!=t||"object"==typeof e&&!Array.isArray(e)?Le(this,(function(n,r){N(n)&&Un(n,e,t,r)})):0!==this.length?Hn(this[0],e):void 0}}),qn="input,select,textarea,keygen",Vn=/%20/g,$n=/\r?\n/g,Kn=Object.freeze({__proto__:null,serialize:function(){return this.serializeArray().map((function(e){return"".concat(encodeURIComponent(e.name),"=").concat(encodeURIComponent(e.value))})).join("&").replace(Vn,"+")},serializeArray:function(){var e=this;return this.map((function(t,n){var r=e._make(n);return(N(n)&&"form"===n.name?r.find(qn):r.filter(qn)).toArray()})).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((function(t,n){var r=(n=e._make(n)).attr("name");n=null!=(n=n.val())?n:"";return Array.isArray(n)?n.map((function(e){return{name:r,value:e.replace($n,"\r\n")}})):{name:r,value:n.replace($n,"\r\n")}})).toArray()}}),Wn=function(e,t,n){if(this.length=0,this.options=n,this._root=t,e){for(var r=0;r<e.length;r++)this[r]=e[r];this.length=e.length}},zn=(Wn.prototype.cheerio="[cheerio object]",Wn.prototype.splice=Array.prototype.splice,Wn.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(Wn.prototype,Qe,kn,Fn,Yn,Kn),function(e,t){return(zn=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)}),Qn=function(){return(Qn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};const Jn=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Zn="<22>",er=(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",e[e.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_F=102]="LATIN_SMALL_F",e[e.LATIN_SMALL_X=120]="LATIN_SMALL_X",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",e[e.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(Gn=Gn||{}),"--"),tr="[CDATA[",nr="doctype",rr="script";function ir(e){return 55296<=e&&e<=57343}function sr(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&1<=e&&e<=31||127<=e&&e<=159}function ar(e){return 64976<=e&&e<=65007||Jn.has(e)}!function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"}(Xn=Xn||{});class or{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=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){var{line:t,col:n,offset:r}=this;return{code:e,startLine:t,endLine:t,startCol:n,endCol:n,startOffset:r,endOffset:r}}_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){var t=this.html.charCodeAt(this.pos+1);if(56320<=t&&t<=57343)return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Gn.EOF;return this._err(Xn.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,t){0<this.html.length?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((32|this.html.charCodeAt(this.pos+t))!==e.charCodeAt(t))return!1;return!0}peek(e){return(e=this.pos+e)>=this.html.length?(this.endOfChunkHit=!this.lastChunkWritten,Gn.EOF):(e=this.html.charCodeAt(e))===Gn.CARRIAGE_RETURN?Gn.LINE_FEED:e}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,Gn.EOF;let e=this.html.charCodeAt(this.pos);return e===Gn.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,Gn.LINE_FEED):e===Gn.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ir(e)&&(e=this._processSurrogate(e)),null===this.handler.onParseError||31<e&&e<127||e===Gn.LINE_FEED||e===Gn.CARRIAGE_RETURN||159<e&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){sr(e)?this._err(Xn.controlCharacterInInputStream):ar(e)&&this._err(Xn.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}function cr(e,t){for(let n=e.attrs.length-1;0<=n;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}!function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"}(jn=jn||{});var lr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ur(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fr(e,t){return e(t={exports:{}},t.exports),t.exports}var pr=fr((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎸᏄϨrrowƀ;BDᅐᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ\0ᚕ᚛ᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsuᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ拔;櫙artint;樍Āao⁕Ācsα‰‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0耻¾䂾;慗;慜5;慘ƶ⁌\0;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚ;檒;檥;檤ȀEaes;扩pĀ;p℣檊rox»Ā;q檈Ā;qim;拧pf;쀀𝕘Āci⅃r;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❶❼➅➇ròࢨorneòarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;efभ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛òðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬Āet;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ëĀ;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓pĀ;sᆴ㑵;쀀⊔uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;h㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊;쀀⫋setneqĀ;q㦏㦒쀀⊋;쀀⫌Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})))})),dr=(hr(pr),fr((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})))}))),mr=(hr(dr),fr((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var n,r=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]]);function i(e){var t;return 55296<=e&&e<=57343||1114111<e?65533:null!=(t=r.get(e))?t:e}t.fromCodePoint=null!=(n=String.fromCodePoint)?n:function(e){var t="";return 65535<e&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+String.fromCharCode(e)},t.replaceCodePoint=i,t.default=function(e){return(0,t.fromCodePoint)(i(e))}}))),Er=(hr(mr),mr.replaceCodePoint,mr.fromCodePoint,pr),Tr=dr,_r=mr,gr=fr((function(e,t){var n=lr&&lr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]}),r=lr&&lr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=lr&&lr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t},s=lr&&lr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},a=(Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0,s(Er)),o=(s=(t.htmlDecodeTree=a.default,s(Tr)),t.xmlDecodeTree=s.default,i(_r));t.decodeCodePoint=o.default;var c,l,u,h,f=_r;function p(e){return e>=c.ZERO&&e<=c.NINE}Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return f.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return f.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(c={}),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(l=t.BinTrieFlags||(t.BinTrieFlags={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(u={}),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(h=t.DecodingMode||(t.DecodingMode={}));var d=function(){function e(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=u.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=h.Strict}return e.prototype.startEntity=function(e){this.decodeMode=e,this.state=u.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},e.prototype.write=function(e,t){switch(this.state){case u.EntityStart:return e.charCodeAt(t)===c.NUM?(this.state=u.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=u.NamedEntity,this.stateNamedEntity(e,t));case u.NumericStart:return this.stateNumericStart(e,t);case u.NumericDecimal:return this.stateNumericDecimal(e,t);case u.NumericHex:return this.stateNumericHex(e,t);case u.NamedEntity:return this.stateNamedEntity(e,t)}},e.prototype.stateNumericStart=function(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===c.LOWER_X?(this.state=u.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=u.NumericDecimal,this.stateNumericDecimal(e,t))},e.prototype.addToNumericResult=function(e,t,n,r){t!==n&&(n-=t,this.result=this.result*Math.pow(r,n)+parseInt(e.substr(t,n),r),this.consumed+=n)},e.prototype.stateNumericHex=function(e,t){for(var n=t;t<e.length;){var r=e.charCodeAt(t);if(!(p(r)||r>=c.UPPER_A&&r<=c.UPPER_F||c.LOWER_A<=r&&r<=c.LOWER_F))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3);t+=1}return this.addToNumericResult(e,n,t,16),-1},e.prototype.stateNumericDecimal=function(e,t){for(var n=t;t<e.length;){var r=e.charCodeAt(t);if(!p(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1},e.prototype.emitNumericEntity=function(e,t){if(this.consumed<=t)return null!=(t=this.errors)&&t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===c.SEMI)this.consumed+=1;else if(this.decodeMode===h.Strict)return 0;return this.emitCodePoint((0,o.replaceCodePoint)(this.result),this.consumed),this.errors&&(e!==c.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed},e.prototype.stateNamedEntity=function(e,t){for(var n=this.decodeTree,r=n[this.treeIndex],i=(r&l.VALUE_LENGTH)>>14;t<e.length;t++,this.excess++){var s=e.charCodeAt(t);if(this.treeIndex=E(n,r,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return 0===this.result||this.decodeMode===h.Attribute&&(0===i||s===c.EQUALS||function(e){return c.UPPER_A<=e&&e<=c.UPPER_Z||c.LOWER_A<=e&&e<=c.LOWER_Z||p(e)}(s))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((r=n[this.treeIndex])&l.VALUE_LENGTH)>>14)){if(s===c.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==h.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},e.prototype.emitNotTerminatedNamedEntity=function(){var e=this.result,t=(this.decodeTree[e]&l.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,t,this.consumed),null!=(e=this.errors)&&e.missingSemicolonAfterCharacterReference(),this.consumed},e.prototype.emitNamedEntityData=function(e,t,n){var r=this.decodeTree;return this.emitCodePoint(1===t?r[e]&~l.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n},e.prototype.end=function(){var e;switch(this.state){case u.NamedEntity:return 0===this.result||this.decodeMode===h.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case u.NumericDecimal:return this.emitNumericEntity(0,2);case u.NumericHex:return this.emitNumericEntity(0,3);case u.NumericStart:return null!=(e=this.errors)&&e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case u.EntityStart:return 0}},e}();function m(e){var t="",n=new d(e,(function(e){return t+=(0,o.fromCodePoint)(e)}));return function(e,r){for(var i=0,s=0;0<=(s=e.indexOf("&",s));){t+=e.slice(i,s),n.startEntity(r);var a=n.write(e,s+1);if(a<0){i=s+n.end();break}i=s+a,s=0===a?i+1:i}var o=t+e.slice(i);return t="",o}}function E(e,t,n,r){var i=(t&l.BRANCH_LENGTH)>>7;t&=l.JUMP_TABLE;if(0==i)return 0!=t&&r===t?n:-1;if(t)return(t=r-t)<0||i<=t?-1:e[n+t]-1;for(var s=n,a=s+i-1;s<=a;){var o=s+a>>>1,c=e[o];if(c<r)s=1+o;else{if(!(r<c))return e[o+i];a=o-1}}return-1}t.EntityDecoder=d,t.determineBranch=E;var T=m(a.default),_=m(s.default);t.decodeHTML=function(e,t){return void 0===t&&(t=h.Legacy),T(e,t)},t.decodeHTMLAttribute=function(e){return T(e,h.Attribute)},t.decodeHTMLStrict=function(e){return T(e,h.Strict)},t.decodeXML=function(e){return _(e,h.Strict)}})),Ar=(hr(gr),gr.decodeXML,gr.decodeHTMLStrict,gr.decodeHTMLAttribute,gr.decodeHTML,gr.determineBranch),yr=(gr.EntityDecoder,gr.DecodingMode,gr.BinTrieFlags),vr=gr.fromCodePoint,Sr=gr.replaceCodePoint;gr.decodeCodePoint;var Nr,Ir,br,Cr,Or,kr,Rr,Dr,Lr=gr.xmlDecodeTree,wr=gr.htmlDecodeTree;!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"}(Nr=Nr||{}),function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"}(Ir=Ir||{}),function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"}(br=br||{}),function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"}(Cr=Cr||{}),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SECTION=94]="SECTION",e[e.SELECT=95]="SELECT",e[e.SOURCE=96]="SOURCE",e[e.SMALL=97]="SMALL",e[e.SPAN=98]="SPAN",e[e.STRIKE=99]="STRIKE",e[e.STRONG=100]="STRONG",e[e.STYLE=101]="STYLE",e[e.SUB=102]="SUB",e[e.SUMMARY=103]="SUMMARY",e[e.SUP=104]="SUP",e[e.TABLE=105]="TABLE",e[e.TBODY=106]="TBODY",e[e.TEMPLATE=107]="TEMPLATE",e[e.TEXTAREA=108]="TEXTAREA",e[e.TFOOT=109]="TFOOT",e[e.TD=110]="TD",e[e.TH=111]="TH",e[e.THEAD=112]="THEAD",e[e.TITLE=113]="TITLE",e[e.TR=114]="TR",e[e.TRACK=115]="TRACK",e[e.TT=116]="TT",e[e.U=117]="U",e[e.UL=118]="UL",e[e.SVG=119]="SVG",e[e.VAR=120]="VAR",e[e.WBR=121]="WBR",e[e.XMP=122]="XMP"}(Or=Or||{});const Mr=new Map([[Cr.A,Or.A],[Cr.ADDRESS,Or.ADDRESS],[Cr.ANNOTATION_XML,Or.ANNOTATION_XML],[Cr.APPLET,Or.APPLET],[Cr.AREA,Or.AREA],[Cr.ARTICLE,Or.ARTICLE],[Cr.ASIDE,Or.ASIDE],[Cr.B,Or.B],[Cr.BASE,Or.BASE],[Cr.BASEFONT,Or.BASEFONT],[Cr.BGSOUND,Or.BGSOUND],[Cr.BIG,Or.BIG],[Cr.BLOCKQUOTE,Or.BLOCKQUOTE],[Cr.BODY,Or.BODY],[Cr.BR,Or.BR],[Cr.BUTTON,Or.BUTTON],[Cr.CAPTION,Or.CAPTION],[Cr.CENTER,Or.CENTER],[Cr.CODE,Or.CODE],[Cr.COL,Or.COL],[Cr.COLGROUP,Or.COLGROUP],[Cr.DD,Or.DD],[Cr.DESC,Or.DESC],[Cr.DETAILS,Or.DETAILS],[Cr.DIALOG,Or.DIALOG],[Cr.DIR,Or.DIR],[Cr.DIV,Or.DIV],[Cr.DL,Or.DL],[Cr.DT,Or.DT],[Cr.EM,Or.EM],[Cr.EMBED,Or.EMBED],[Cr.FIELDSET,Or.FIELDSET],[Cr.FIGCAPTION,Or.FIGCAPTION],[Cr.FIGURE,Or.FIGURE],[Cr.FONT,Or.FONT],[Cr.FOOTER,Or.FOOTER],[Cr.FOREIGN_OBJECT,Or.FOREIGN_OBJECT],[Cr.FORM,Or.FORM],[Cr.FRAME,Or.FRAME],[Cr.FRAMESET,Or.FRAMESET],[Cr.H1,Or.H1],[Cr.H2,Or.H2],[Cr.H3,Or.H3],[Cr.H4,Or.H4],[Cr.H5,Or.H5],[Cr.H6,Or.H6],[Cr.HEAD,Or.HEAD],[Cr.HEADER,Or.HEADER],[Cr.HGROUP,Or.HGROUP],[Cr.HR,Or.HR],[Cr.HTML,Or.HTML],[Cr.I,Or.I],[Cr.IMG,Or.IMG],[Cr.IMAGE,Or.IMAGE],[Cr.INPUT,Or.INPUT],[Cr.IFRAME,Or.IFRAME],[Cr.KEYGEN,Or.KEYGEN],[Cr.LABEL,Or.LABEL],[Cr.LI,Or.LI],[Cr.LINK,Or.LINK],[Cr.LISTING,Or.LISTING],[Cr.MAIN,Or.MAIN],[Cr.MALIGNMARK,Or.MALIGNMARK],[Cr.MARQUEE,Or.MARQUEE],[Cr.MATH,Or.MATH],[Cr.MENU,Or.MENU],[Cr.META,Or.META],[Cr.MGLYPH,Or.MGLYPH],[Cr.MI,Or.MI],[Cr.MO,Or.MO],[Cr.MN,Or.MN],[Cr.MS,Or.MS],[Cr.MTEXT,Or.MTEXT],[Cr.NAV,Or.NAV],[Cr.NOBR,Or.NOBR],[Cr.NOFRAMES,Or.NOFRAMES],[Cr.NOEMBED,Or.NOEMBED],[Cr.NOSCRIPT,Or.NOSCRIPT],[Cr.OBJECT,Or.OBJECT],[Cr.OL,Or.OL],[Cr.OPTGROUP,Or.OPTGROUP],[Cr.OPTION,Or.OPTION],[Cr.P,Or.P],[Cr.PARAM,Or.PARAM],[Cr.PLAINTEXT,Or.PLAINTEXT],[Cr.PRE,Or.PRE],[Cr.RB,Or.RB],[Cr.RP,Or.RP],[Cr.RT,Or.RT],[Cr.RTC,Or.RTC],[Cr.RUBY,Or.RUBY],[Cr.S,Or.S],[Cr.SCRIPT,Or.SCRIPT],[Cr.SECTION,Or.SECTION],[Cr.SELECT,Or.SELECT],[Cr.SOURCE,Or.SOURCE],[Cr.SMALL,Or.SMALL],[Cr.SPAN,Or.SPAN],[Cr.STRIKE,Or.STRIKE],[Cr.STRONG,Or.STRONG],[Cr.STYLE,Or.STYLE],[Cr.SUB,Or.SUB],[Cr.SUMMARY,Or.SUMMARY],[Cr.SUP,Or.SUP],[Cr.TABLE,Or.TABLE],[Cr.TBODY,Or.TBODY],[Cr.TEMPLATE,Or.TEMPLATE],[Cr.TEXTAREA,Or.TEXTAREA],[Cr.TFOOT,Or.TFOOT],[Cr.TD,Or.TD],[Cr.TH,Or.TH],[Cr.THEAD,Or.THEAD],[Cr.TITLE,Or.TITLE],[Cr.TR,Or.TR],[Cr.TRACK,Or.TRACK],[Cr.TT,Or.TT],[Cr.U,Or.U],[Cr.UL,Or.UL],[Cr.SVG,Or.SVG],[Cr.VAR,Or.VAR],[Cr.WBR,Or.WBR],[Cr.XMP,Or.XMP]]);function xr(e){return null!=(e=Mr.get(e))?e:Or.UNKNOWN}const Pr=Or,Br={[Nr.HTML]:new Set([Pr.ADDRESS,Pr.APPLET,Pr.AREA,Pr.ARTICLE,Pr.ASIDE,Pr.BASE,Pr.BASEFONT,Pr.BGSOUND,Pr.BLOCKQUOTE,Pr.BODY,Pr.BR,Pr.BUTTON,Pr.CAPTION,Pr.CENTER,Pr.COL,Pr.COLGROUP,Pr.DD,Pr.DETAILS,Pr.DIR,Pr.DIV,Pr.DL,Pr.DT,Pr.EMBED,Pr.FIELDSET,Pr.FIGCAPTION,Pr.FIGURE,Pr.FOOTER,Pr.FORM,Pr.FRAME,Pr.FRAMESET,Pr.H1,Pr.H2,Pr.H3,Pr.H4,Pr.H5,Pr.H6,Pr.HEAD,Pr.HEADER,Pr.HGROUP,Pr.HR,Pr.HTML,Pr.IFRAME,Pr.IMG,Pr.INPUT,Pr.LI,Pr.LINK,Pr.LISTING,Pr.MAIN,Pr.MARQUEE,Pr.MENU,Pr.META,Pr.NAV,Pr.NOEMBED,Pr.NOFRAMES,Pr.NOSCRIPT,Pr.OBJECT,Pr.OL,Pr.P,Pr.PARAM,Pr.PLAINTEXT,Pr.PRE,Pr.SCRIPT,Pr.SECTION,Pr.SELECT,Pr.SOURCE,Pr.STYLE,Pr.SUMMARY,Pr.TABLE,Pr.TBODY,Pr.TD,Pr.TEMPLATE,Pr.TEXTAREA,Pr.TFOOT,Pr.TH,Pr.THEAD,Pr.TITLE,Pr.TR,Pr.TRACK,Pr.UL,Pr.WBR,Pr.XMP]),[Nr.MATHML]:new Set([Pr.MI,Pr.MO,Pr.MN,Pr.MS,Pr.MTEXT,Pr.ANNOTATION_XML]),[Nr.SVG]:new Set([Pr.TITLE,Pr.FOREIGN_OBJECT,Pr.DESC]),[Nr.XLINK]:new Set,[Nr.XML]:new Set,[Nr.XMLNS]:new Set};function Fr(e){return e===Pr.H1||e===Pr.H2||e===Pr.H3||e===Pr.H4||e===Pr.H5||e===Pr.H6}const Ur=new Set([Cr.STYLE,Cr.SCRIPT,Cr.XMP,Cr.IFRAME,Cr.NOEMBED,Cr.NOFRAMES,Cr.PLAINTEXT]),Hr=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]]),Gr=(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"}(kr=kr||{}),{DATA:kr.DATA,RCDATA:kr.RCDATA,RAWTEXT:kr.RAWTEXT,SCRIPT_DATA:kr.SCRIPT_DATA,PLAINTEXT:kr.PLAINTEXT,CDATA_SECTION:kr.CDATA_SECTION});function Xr(e){return e>=Gn.DIGIT_0&&e<=Gn.DIGIT_9}function jr(e){return e>=Gn.LATIN_CAPITAL_A&&e<=Gn.LATIN_CAPITAL_Z}function Yr(e){return function(e){return e>=Gn.LATIN_SMALL_A&&e<=Gn.LATIN_SMALL_Z}(e)||jr(e)}function qr(e){return Yr(e)||Xr(e)}function Vr(e){return e>=Gn.LATIN_CAPITAL_A&&e<=Gn.LATIN_CAPITAL_F}function $r(e){return e>=Gn.LATIN_SMALL_A&&e<=Gn.LATIN_SMALL_F}function Kr(e){return e+32}function Wr(e){return e===Gn.SPACE||e===Gn.LINE_FEED||e===Gn.TABULATION||e===Gn.FORM_FEED}function zr(e){return Wr(e)||e===Gn.SOLIDUS||e===Gn.GREATER_THAN_SIGN}class Qr{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=kr.DATA,this.returnState=kr.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new or(t),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var t,n;null!=(n=(t=this.handler).onParseError)&&n.call(t,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;var 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)||null==e||e()}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!(!this.preprocessor.endOfChunkHit||(this._unconsume(this.consumedAfterSnapshot),this.active=!1))}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,t){this.state=e,this._callState(t)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:jn.START_TAG,tagName:"",tagID:Or.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:jn.END_TAG,tagName:"",tagID:Or.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:jn.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:jn.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t=this.currentToken;null===cr(t,this.currentAttr.name)?(t.attrs.push(this.currentAttr),t.location&&this.currentLocation&&((null!=(e=(t=t.location).attrs)?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue())):this._err(Xn.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){var e=this.currentToken;this.prepareToken(e),e.tagID=xr(e.tagName),e.type===jn.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(0<e.attrs.length&&this._err(Xn.endTagWithAttributes),e.selfClosing&&this._err(Xn.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 jn.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case jn.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case jn.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){var e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:jn.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){var t=Wr(e)?jn.WHITESPACE_CHARACTER:e===Gn.NULL?jn.NULL_CHARACTER:jn.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(jn.CHARACTER,e)}_matchNamedCharacterReference(e){let t=null,n=0,r=!1;for(let s=0,a=wr[0];0<=s&&!((s=Ar(wr,a,s+1,e))<0);e=this._consume()){n+=1;var i=(a=wr[s])&yr.VALUE_LENGTH;if(i){const a=(i>>14)-1;if(e!==Gn.SEMICOLON&&this._isCharacterReferenceInAttribute()&&((i=this.preprocessor.peek(1))===Gn.EQUALS_SIGN||qr(i))?(t=[Gn.AMPERSAND],s+=a):(t=0==a?[wr[s]&~yr.VALUE_LENGTH]:1==a?[wr[++s]]:[wr[++s],wr[++s]],n=0,r=e!==Gn.SEMICOLON),0==a){this._consume();break}}}return this._unconsume(n),r&&!this.preprocessor.endOfChunkHit&&this._err(Xn.missingSemicolonAfterCharacterReference),this._unconsume(1),t}_isCharacterReferenceInAttribute(){return this.returnState===kr.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===kr.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===kr.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case kr.DATA:this._stateData(e);break;case kr.RCDATA:this._stateRcdata(e);break;case kr.RAWTEXT:this._stateRawtext(e);break;case kr.SCRIPT_DATA:this._stateScriptData(e);break;case kr.PLAINTEXT:this._statePlaintext(e);break;case kr.TAG_OPEN:this._stateTagOpen(e);break;case kr.END_TAG_OPEN:this._stateEndTagOpen(e);break;case kr.TAG_NAME:this._stateTagName(e);break;case kr.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case kr.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case kr.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case kr.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case kr.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case kr.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case kr.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case kr.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case kr.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case kr.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case kr.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case kr.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case kr.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case kr.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case kr.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case kr.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case kr.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case kr.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case kr.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case kr.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case kr.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case kr.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case kr.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case kr.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case kr.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case kr.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case kr.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case kr.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case kr.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case kr.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case kr.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case kr.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case kr.BOGUS_COMMENT:this._stateBogusComment(e);break;case kr.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case kr.COMMENT_START:this._stateCommentStart(e);break;case kr.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case kr.COMMENT:this._stateComment(e);break;case kr.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case kr.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case kr.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case kr.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case kr.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case kr.COMMENT_END:this._stateCommentEnd(e);break;case kr.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case kr.DOCTYPE:this._stateDoctype(e);break;case kr.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case kr.DOCTYPE_NAME:this._stateDoctypeName(e);break;case kr.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case kr.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case kr.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case kr.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case kr.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case kr.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case kr.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case kr.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case kr.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case kr.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case kr.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case kr.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case kr.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case kr.CDATA_SECTION:this._stateCdataSection(e);break;case kr.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case kr.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case kr.CHARACTER_REFERENCE:this._stateCharacterReference(e);break;case kr.NAMED_CHARACTER_REFERENCE:this._stateNamedCharacterReference(e);break;case kr.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;case kr.NUMERIC_CHARACTER_REFERENCE:this._stateNumericCharacterReference(e);break;case kr.HEXADEMICAL_CHARACTER_REFERENCE_START:this._stateHexademicalCharacterReferenceStart(e);break;case kr.HEXADEMICAL_CHARACTER_REFERENCE:this._stateHexademicalCharacterReference(e);break;case kr.DECIMAL_CHARACTER_REFERENCE:this._stateDecimalCharacterReference(e);break;case kr.NUMERIC_CHARACTER_REFERENCE_END:this._stateNumericCharacterReferenceEnd(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Gn.LESS_THAN_SIGN:this.state=kr.TAG_OPEN;break;case Gn.AMPERSAND:this.returnState=kr.DATA,this.state=kr.CHARACTER_REFERENCE;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this._emitCodePoint(e);break;case Gn.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Gn.AMPERSAND:this.returnState=kr.RCDATA,this.state=kr.CHARACTER_REFERENCE;break;case Gn.LESS_THAN_SIGN:this.state=kr.RCDATA_LESS_THAN_SIGN;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this._emitChars(Zn);break;case Gn.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Gn.LESS_THAN_SIGN:this.state=kr.RAWTEXT_LESS_THAN_SIGN;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this._emitChars(Zn);break;case Gn.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Gn.LESS_THAN_SIGN:this.state=kr.SCRIPT_DATA_LESS_THAN_SIGN;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this._emitChars(Zn);break;case Gn.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this._emitChars(Zn);break;case Gn.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Yr(e))this._createStartTagToken(),this.state=kr.TAG_NAME,this._stateTagName(e);else switch(e){case Gn.EXCLAMATION_MARK:this.state=kr.MARKUP_DECLARATION_OPEN;break;case Gn.SOLIDUS:this.state=kr.END_TAG_OPEN;break;case Gn.QUESTION_MARK:this._err(Xn.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=kr.BOGUS_COMMENT,this._stateBogusComment(e);break;case Gn.EOF:this._err(Xn.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(Xn.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=kr.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Yr(e))this._createEndTagToken(),this.state=kr.TAG_NAME,this._stateTagName(e);else switch(e){case Gn.GREATER_THAN_SIGN:this._err(Xn.missingEndTagName),this.state=kr.DATA;break;case Gn.EOF:this._err(Xn.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(Xn.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=kr.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){var t=this.currentToken;switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:this.state=kr.BEFORE_ATTRIBUTE_NAME;break;case Gn.SOLIDUS:this.state=kr.SELF_CLOSING_START_TAG;break;case Gn.GREATER_THAN_SIGN:this.state=kr.DATA,this.emitCurrentTagToken();break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),t.tagName+=Zn;break;case Gn.EOF:this._err(Xn.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(jr(e)?Kr(e):e)}}_stateRcdataLessThanSign(e){e===Gn.SOLIDUS?this.state=kr.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=kr.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Yr(e)?(this.state=kr.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=kr.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();switch(this._createEndTagToken(),this.currentToken.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=kr.BEFORE_ATTRIBUTE_NAME,!1;case Gn.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=kr.SELF_CLOSING_START_TAG,!1;case Gn.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=kr.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=kr.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===Gn.SOLIDUS?this.state=kr.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=kr.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Yr(e)?(this.state=kr.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=kr.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=kr.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case Gn.SOLIDUS:this.state=kr.SCRIPT_DATA_END_TAG_OPEN;break;case Gn.EXCLAMATION_MARK:this.state=kr.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=kr.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Yr(e)?(this.state=kr.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=kr.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=kr.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===Gn.HYPHEN_MINUS?(this.state=kr.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=kr.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===Gn.HYPHEN_MINUS?(this.state=kr.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=kr.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case Gn.HYPHEN_MINUS:this.state=kr.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case Gn.LESS_THAN_SIGN:this.state=kr.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this._emitChars(Zn);break;case Gn.EOF:this._err(Xn.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case Gn.HYPHEN_MINUS:this.state=kr.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case Gn.LESS_THAN_SIGN:this.state=kr.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this.state=kr.SCRIPT_DATA_ESCAPED,this._emitChars(Zn);break;case Gn.EOF:this._err(Xn.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=kr.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case Gn.HYPHEN_MINUS:this._emitChars("-");break;case Gn.LESS_THAN_SIGN:this.state=kr.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Gn.GREATER_THAN_SIGN:this.state=kr.SCRIPT_DATA,this._emitChars(">");break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this.state=kr.SCRIPT_DATA_ESCAPED,this._emitChars(Zn);break;case Gn.EOF:this._err(Xn.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=kr.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Gn.SOLIDUS?this.state=kr.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Yr(e)?(this._emitChars("<"),this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=kr.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Yr(e)?(this.state=kr.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=kr.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=kr.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(rr,!1)&&zr(this.preprocessor.peek(6))){this._emitCodePoint(e);for(let e=0;e<6;e++)this._emitCodePoint(this._consume());this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=kr.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case Gn.HYPHEN_MINUS:this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case Gn.LESS_THAN_SIGN:this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this._emitChars(Zn);break;case Gn.EOF:this._err(Xn.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case Gn.HYPHEN_MINUS:this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case Gn.LESS_THAN_SIGN:this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Zn);break;case Gn.EOF:this._err(Xn.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case Gn.HYPHEN_MINUS:this._emitChars("-");break;case Gn.LESS_THAN_SIGN:this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Gn.GREATER_THAN_SIGN:this.state=kr.SCRIPT_DATA,this._emitChars(">");break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Zn);break;case Gn.EOF:this._err(Xn.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Gn.SOLIDUS?(this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(rr,!1)&&zr(this.preprocessor.peek(6))){this._emitCodePoint(e);for(let e=0;e<6;e++)this._emitCodePoint(this._consume());this.state=kr.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=kr.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:break;case Gn.SOLIDUS:case Gn.GREATER_THAN_SIGN:case Gn.EOF:this.state=kr.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Gn.EQUALS_SIGN:this._err(Xn.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=kr.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=kr.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:case Gn.SOLIDUS:case Gn.GREATER_THAN_SIGN:case Gn.EOF:this._leaveAttrName(),this.state=kr.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Gn.EQUALS_SIGN:this._leaveAttrName(),this.state=kr.BEFORE_ATTRIBUTE_VALUE;break;case Gn.QUOTATION_MARK:case Gn.APOSTROPHE:case Gn.LESS_THAN_SIGN:this._err(Xn.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this.currentAttr.name+=Zn;break;default:this.currentAttr.name+=String.fromCodePoint(jr(e)?Kr(e):e)}}_stateAfterAttributeName(e){switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:break;case Gn.SOLIDUS:this.state=kr.SELF_CLOSING_START_TAG;break;case Gn.EQUALS_SIGN:this.state=kr.BEFORE_ATTRIBUTE_VALUE;break;case Gn.GREATER_THAN_SIGN:this.state=kr.DATA,this.emitCurrentTagToken();break;case Gn.EOF:this._err(Xn.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=kr.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:break;case Gn.QUOTATION_MARK:this.state=kr.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case Gn.APOSTROPHE:this.state=kr.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case Gn.GREATER_THAN_SIGN:this._err(Xn.missingAttributeValue),this.state=kr.DATA,this.emitCurrentTagToken();break;default:this.state=kr.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case Gn.QUOTATION_MARK:this.state=kr.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Gn.AMPERSAND:this.returnState=kr.ATTRIBUTE_VALUE_DOUBLE_QUOTED,this.state=kr.CHARACTER_REFERENCE;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this.currentAttr.value+=Zn;break;case Gn.EOF:this._err(Xn.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case Gn.APOSTROPHE:this.state=kr.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Gn.AMPERSAND:this.returnState=kr.ATTRIBUTE_VALUE_SINGLE_QUOTED,this.state=kr.CHARACTER_REFERENCE;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this.currentAttr.value+=Zn;break;case Gn.EOF:this._err(Xn.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:this._leaveAttrValue(),this.state=kr.BEFORE_ATTRIBUTE_NAME;break;case Gn.AMPERSAND:this.returnState=kr.ATTRIBUTE_VALUE_UNQUOTED,this.state=kr.CHARACTER_REFERENCE;break;case Gn.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=kr.DATA,this.emitCurrentTagToken();break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this.currentAttr.value+=Zn;break;case Gn.QUOTATION_MARK:case Gn.APOSTROPHE:case Gn.LESS_THAN_SIGN:case Gn.EQUALS_SIGN:case Gn.GRAVE_ACCENT:this._err(Xn.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case Gn.EOF:this._err(Xn.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:this._leaveAttrValue(),this.state=kr.BEFORE_ATTRIBUTE_NAME;break;case Gn.SOLIDUS:this._leaveAttrValue(),this.state=kr.SELF_CLOSING_START_TAG;break;case Gn.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=kr.DATA,this.emitCurrentTagToken();break;case Gn.EOF:this._err(Xn.eofInTag),this._emitEOFToken();break;default:this._err(Xn.missingWhitespaceBetweenAttributes),this.state=kr.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case Gn.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=kr.DATA,this.emitCurrentTagToken();break;case Gn.EOF:this._err(Xn.eofInTag),this._emitEOFToken();break;default:this._err(Xn.unexpectedSolidusInTag),this.state=kr.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){var t=this.currentToken;switch(e){case Gn.GREATER_THAN_SIGN:this.state=kr.DATA,this.emitCurrentComment(t);break;case Gn.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),t.data+=Zn;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(er,!0)?(this._createCommentToken(er.length+1),this.state=kr.COMMENT_START):this._consumeSequenceIfMatch(nr,!1)?(this.currentLocation=this.getCurrentLocation(8),this.state=kr.DOCTYPE):this._consumeSequenceIfMatch(tr,!0)?this.inForeignNode?this.state=kr.CDATA_SECTION:(this._err(Xn.cdataInHtmlContent),this._createCommentToken(8),this.currentToken.data="[CDATA[",this.state=kr.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Xn.incorrectlyOpenedComment),this._createCommentToken(2),this.state=kr.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case Gn.HYPHEN_MINUS:this.state=kr.COMMENT_START_DASH;break;case Gn.GREATER_THAN_SIGN:{this._err(Xn.abruptClosingOfEmptyComment),this.state=kr.DATA;const e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=kr.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){var t=this.currentToken;switch(e){case Gn.HYPHEN_MINUS:this.state=kr.COMMENT_END;break;case Gn.GREATER_THAN_SIGN:this._err(Xn.abruptClosingOfEmptyComment),this.state=kr.DATA,this.emitCurrentComment(t);break;case Gn.EOF:this._err(Xn.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=kr.COMMENT,this._stateComment(e)}}_stateComment(e){var t=this.currentToken;switch(e){case Gn.HYPHEN_MINUS:this.state=kr.COMMENT_END_DASH;break;case Gn.LESS_THAN_SIGN:t.data+="<",this.state=kr.COMMENT_LESS_THAN_SIGN;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),t.data+=Zn;break;case Gn.EOF:this._err(Xn.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){var t=this.currentToken;switch(e){case Gn.EXCLAMATION_MARK:t.data+="!",this.state=kr.COMMENT_LESS_THAN_SIGN_BANG;break;case Gn.LESS_THAN_SIGN:t.data+="<";break;default:this.state=kr.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===Gn.HYPHEN_MINUS?this.state=kr.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=kr.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===Gn.HYPHEN_MINUS?this.state=kr.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=kr.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==Gn.GREATER_THAN_SIGN&&e!==Gn.EOF&&this._err(Xn.nestedComment),this.state=kr.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){var t=this.currentToken;switch(e){case Gn.HYPHEN_MINUS:this.state=kr.COMMENT_END;break;case Gn.EOF:this._err(Xn.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=kr.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){var t=this.currentToken;switch(e){case Gn.GREATER_THAN_SIGN:this.state=kr.DATA,this.emitCurrentComment(t);break;case Gn.EXCLAMATION_MARK:this.state=kr.COMMENT_END_BANG;break;case Gn.HYPHEN_MINUS:t.data+="-";break;case Gn.EOF:this._err(Xn.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=kr.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){var t=this.currentToken;switch(e){case Gn.HYPHEN_MINUS:t.data+="--!",this.state=kr.COMMENT_END_DASH;break;case Gn.GREATER_THAN_SIGN:this._err(Xn.incorrectlyClosedComment),this.state=kr.DATA,this.emitCurrentComment(t);break;case Gn.EOF:this._err(Xn.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=kr.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:this.state=kr.BEFORE_DOCTYPE_NAME;break;case Gn.GREATER_THAN_SIGN:this.state=kr.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case Gn.EOF:{this._err(Xn.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(Xn.missingWhitespaceBeforeDoctypeName),this.state=kr.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(jr(e))this._createDoctypeToken(String.fromCharCode(Kr(e))),this.state=kr.DOCTYPE_NAME;else switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),this._createDoctypeToken(Zn),this.state=kr.DOCTYPE_NAME;break;case Gn.GREATER_THAN_SIGN:{this._err(Xn.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=kr.DATA;break}case Gn.EOF:{this._err(Xn.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=kr.DOCTYPE_NAME}}_stateDoctypeName(e){var t=this.currentToken;switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:this.state=kr.AFTER_DOCTYPE_NAME;break;case Gn.GREATER_THAN_SIGN:this.state=kr.DATA,this.emitCurrentDoctype(t);break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),t.name+=Zn;break;case Gn.EOF:this._err(Xn.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(jr(e)?Kr(e):e)}}_stateAfterDoctypeName(e){var t=this.currentToken;switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:break;case Gn.GREATER_THAN_SIGN:this.state=kr.DATA,this.emitCurrentDoctype(t);break;case Gn.EOF:this._err(Xn.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch("public",!1)?this.state=kr.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch("system",!1)?this.state=kr.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Xn.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=kr.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){var t=this.currentToken;switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:this.state=kr.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case Gn.QUOTATION_MARK:this._err(Xn.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=kr.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Gn.APOSTROPHE:this._err(Xn.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=kr.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Gn.GREATER_THAN_SIGN:this._err(Xn.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=kr.DATA,this.emitCurrentDoctype(t);break;case Gn.EOF:this._err(Xn.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Xn.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=kr.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){var t=this.currentToken;switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:break;case Gn.QUOTATION_MARK:t.publicId="",this.state=kr.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Gn.APOSTROPHE:t.publicId="",this.state=kr.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Gn.GREATER_THAN_SIGN:this._err(Xn.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=kr.DATA,this.emitCurrentDoctype(t);break;case Gn.EOF:this._err(Xn.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Xn.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=kr.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){var t=this.currentToken;switch(e){case Gn.QUOTATION_MARK:this.state=kr.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),t.publicId+=Zn;break;case Gn.GREATER_THAN_SIGN:this._err(Xn.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=kr.DATA;break;case Gn.EOF:this._err(Xn.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){var t=this.currentToken;switch(e){case Gn.APOSTROPHE:this.state=kr.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),t.publicId+=Zn;break;case Gn.GREATER_THAN_SIGN:this._err(Xn.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=kr.DATA;break;case Gn.EOF:this._err(Xn.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){var t=this.currentToken;switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:this.state=kr.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case Gn.GREATER_THAN_SIGN:this.state=kr.DATA,this.emitCurrentDoctype(t);break;case Gn.QUOTATION_MARK:this._err(Xn.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=kr.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Gn.APOSTROPHE:this._err(Xn.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=kr.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Gn.EOF:this._err(Xn.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Xn.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=kr.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){var t=this.currentToken;switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:break;case Gn.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=kr.DATA;break;case Gn.QUOTATION_MARK:t.systemId="",this.state=kr.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Gn.APOSTROPHE:t.systemId="",this.state=kr.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Gn.EOF:this._err(Xn.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Xn.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=kr.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){var t=this.currentToken;switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:this.state=kr.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case Gn.QUOTATION_MARK:this._err(Xn.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=kr.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Gn.APOSTROPHE:this._err(Xn.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=kr.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Gn.GREATER_THAN_SIGN:this._err(Xn.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=kr.DATA,this.emitCurrentDoctype(t);break;case Gn.EOF:this._err(Xn.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Xn.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=kr.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){var t=this.currentToken;switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:break;case Gn.QUOTATION_MARK:t.systemId="",this.state=kr.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Gn.APOSTROPHE:t.systemId="",this.state=kr.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Gn.GREATER_THAN_SIGN:this._err(Xn.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=kr.DATA,this.emitCurrentDoctype(t);break;case Gn.EOF:this._err(Xn.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Xn.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=kr.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){var t=this.currentToken;switch(e){case Gn.QUOTATION_MARK:this.state=kr.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),t.systemId+=Zn;break;case Gn.GREATER_THAN_SIGN:this._err(Xn.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=kr.DATA;break;case Gn.EOF:this._err(Xn.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){var t=this.currentToken;switch(e){case Gn.APOSTROPHE:this.state=kr.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter),t.systemId+=Zn;break;case Gn.GREATER_THAN_SIGN:this._err(Xn.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=kr.DATA;break;case Gn.EOF:this._err(Xn.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){var t=this.currentToken;switch(e){case Gn.SPACE:case Gn.LINE_FEED:case Gn.TABULATION:case Gn.FORM_FEED:break;case Gn.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=kr.DATA;break;case Gn.EOF:this._err(Xn.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Xn.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=kr.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){var t=this.currentToken;switch(e){case Gn.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=kr.DATA;break;case Gn.NULL:this._err(Xn.unexpectedNullCharacter);break;case Gn.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case Gn.RIGHT_SQUARE_BRACKET:this.state=kr.CDATA_SECTION_BRACKET;break;case Gn.EOF:this._err(Xn.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===Gn.RIGHT_SQUARE_BRACKET?this.state=kr.CDATA_SECTION_END:(this._emitChars("]"),this.state=kr.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case Gn.GREATER_THAN_SIGN:this.state=kr.DATA;break;case Gn.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=kr.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(e){e===Gn.NUMBER_SIGN?this.state=kr.NUMERIC_CHARACTER_REFERENCE:qr(e)?(this.state=kr.NAMED_CHARACTER_REFERENCE,this._stateNamedCharacterReference(e)):(this._flushCodePointConsumedAsCharacterReference(Gn.AMPERSAND),this._reconsumeInState(this.returnState,e))}_stateNamedCharacterReference(e){var t=this._matchNamedCharacterReference(e);if(!this._ensureHibernation())if(t){for(let e=0;e<t.length;e++)this._flushCodePointConsumedAsCharacterReference(t[e]);this.state=this.returnState}else this._flushCodePointConsumedAsCharacterReference(Gn.AMPERSAND),this.state=kr.AMBIGUOUS_AMPERSAND}_stateAmbiguousAmpersand(e){qr(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===Gn.SEMICOLON&&this._err(Xn.unknownNamedCharacterReference),this._reconsumeInState(this.returnState,e))}_stateNumericCharacterReference(e){this.charRefCode=0,e===Gn.LATIN_SMALL_X||e===Gn.LATIN_CAPITAL_X?this.state=kr.HEXADEMICAL_CHARACTER_REFERENCE_START:Xr(e)?(this.state=kr.DECIMAL_CHARACTER_REFERENCE,this._stateDecimalCharacterReference(e)):(this._err(Xn.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(Gn.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(Gn.NUMBER_SIGN),this._reconsumeInState(this.returnState,e))}_stateHexademicalCharacterReferenceStart(e){!function(e){return Xr(e)||Vr(e)||$r(e)}(e)?(this._err(Xn.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(Gn.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(Gn.NUMBER_SIGN),this._unconsume(2),this.state=this.returnState):(this.state=kr.HEXADEMICAL_CHARACTER_REFERENCE,this._stateHexademicalCharacterReference(e))}_stateHexademicalCharacterReference(e){Vr(e)?this.charRefCode=16*this.charRefCode+e-55:$r(e)?this.charRefCode=16*this.charRefCode+e-87:Xr(e)?this.charRefCode=16*this.charRefCode+e-48:e===Gn.SEMICOLON?this.state=kr.NUMERIC_CHARACTER_REFERENCE_END:(this._err(Xn.missingSemicolonAfterCharacterReference),this.state=kr.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateDecimalCharacterReference(e){Xr(e)?this.charRefCode=10*this.charRefCode+e-48:e===Gn.SEMICOLON?this.state=kr.NUMERIC_CHARACTER_REFERENCE_END:(this._err(Xn.missingSemicolonAfterCharacterReference),this.state=kr.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateNumericCharacterReferenceEnd(e){if(this.charRefCode===Gn.NULL)this._err(Xn.nullCharacterReference),this.charRefCode=Gn.REPLACEMENT_CHARACTER;else if(1114111<this.charRefCode)this._err(Xn.characterReferenceOutsideUnicodeRange),this.charRefCode=Gn.REPLACEMENT_CHARACTER;else if(ir(this.charRefCode))this._err(Xn.surrogateCharacterReference),this.charRefCode=Gn.REPLACEMENT_CHARACTER;else if(ar(this.charRefCode))this._err(Xn.noncharacterCharacterReference);else if(sr(this.charRefCode)||this.charRefCode===Gn.CARRIAGE_RETURN){this._err(Xn.controlCharacterReference);const e=Hr.get(this.charRefCode);void 0!==e&&(this.charRefCode=e)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}}const Jr=new Set([Or.DD,Or.DT,Or.LI,Or.OPTGROUP,Or.OPTION,Or.P,Or.RB,Or.RP,Or.RT,Or.RTC]),Zr=new Set([...Jr,Or.CAPTION,Or.COLGROUP,Or.TBODY,Or.TD,Or.TFOOT,Or.TH,Or.THEAD,Or.TR]),ei=new Map([[Or.APPLET,Nr.HTML],[Or.CAPTION,Nr.HTML],[Or.HTML,Nr.HTML],[Or.MARQUEE,Nr.HTML],[Or.OBJECT,Nr.HTML],[Or.TABLE,Nr.HTML],[Or.TD,Nr.HTML],[Or.TEMPLATE,Nr.HTML],[Or.TH,Nr.HTML],[Or.ANNOTATION_XML,Nr.MATHML],[Or.MI,Nr.MATHML],[Or.MN,Nr.MATHML],[Or.MO,Nr.MATHML],[Or.MS,Nr.MATHML],[Or.MTEXT,Nr.MATHML],[Or.DESC,Nr.SVG],[Or.FOREIGN_OBJECT,Nr.SVG],[Or.TITLE,Nr.SVG]]),ti=[Or.H1,Or.H2,Or.H3,Or.H4,Or.H5,Or.H6],ni=[Or.TR,Or.TEMPLATE,Or.HTML],ri=[Or.TBODY,Or.TFOOT,Or.THEAD,Or.TEMPLATE,Or.HTML],ii=[Or.TABLE,Or.TEMPLATE,Or.HTML],si=[Or.TD,Or.TH];class ai{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=Or.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===Or.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Nr.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){var e=this.current;0<this.tmplCount&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){e=this._indexOf(e),this.items[e]=t,e===this.stackTop&&(this.current=t)}insertAfter(e,t,n){e=this._indexOf(e)+1,this.items.splice(e,0,t),this.tagIDs.splice(e,0,n),this.stackTop++,e===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,e===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;for(;0<(t=this.tagIDs.lastIndexOf(e,t-1))&&this.treeAdapter.getNamespaceURI(this.items[t])!==Nr.HTML;);this.shortenToLength(t<0?0:t)}shortenToLength(e){for(;this.stackTop>=e;){var t=this.current;0<this.tmplCount&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){e=this._indexOf(e),this.shortenToLength(e<0?0:e)}popUntilPopped(e,t){e=this._indexOfTagNames(e,t),this.shortenToLength(e<0?0:e)}popUntilNumberedHeaderPopped(){this.popUntilPopped(ti,Nr.HTML)}popUntilTableCellPopped(){this.popUntilPopped(si,Nr.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;0<=n;n--)if(e.includes(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){e=this._indexOfTagNames(e,t),this.shortenToLength(e+1)}clearBackToTableContext(){this.clearBackTo(ii,Nr.HTML)}clearBackToTableBodyContext(){this.clearBackTo(ri,Nr.HTML)}clearBackToTableRowContext(){this.clearBackTo(ni,Nr.HTML)}remove(e){var t=this._indexOf(e);0<=t&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return 1<=this.stackTop&&this.tagIDs[1]===Or.BODY?this.items[1]:null}contains(e){return-1<this._indexOf(e)}getCommonAncestor(e){return 0<=(e=this._indexOf(e)-1)?this.items[e]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===Or.HTML}hasInScope(e){for(let r=this.stackTop;0<=r;r--){var t=this.tagIDs[r],n=this.treeAdapter.getNamespaceURI(this.items[r]);if(t===e&&n===Nr.HTML)return!0;if(ei.get(t)===n)return!1}return!0}hasNumberedHeaderInScope(){for(let n=this.stackTop;0<=n;n--){var e=this.tagIDs[n],t=this.treeAdapter.getNamespaceURI(this.items[n]);if(Fr(e)&&t===Nr.HTML)return!0;if(ei.get(e)===t)return!1}return!0}hasInListItemScope(e){for(let r=this.stackTop;0<=r;r--){var t=this.tagIDs[r],n=this.treeAdapter.getNamespaceURI(this.items[r]);if(t===e&&n===Nr.HTML)return!0;if((t===Or.UL||t===Or.OL)&&n===Nr.HTML||ei.get(t)===n)return!1}return!0}hasInButtonScope(e){for(let r=this.stackTop;0<=r;r--){var t=this.tagIDs[r],n=this.treeAdapter.getNamespaceURI(this.items[r]);if(t===e&&n===Nr.HTML)return!0;if(t===Or.BUTTON&&n===Nr.HTML||ei.get(t)===n)return!1}return!0}hasInTableScope(e){for(let n=this.stackTop;0<=n;n--){var t=this.tagIDs[n];if(this.treeAdapter.getNamespaceURI(this.items[n])===Nr.HTML){if(t===e)return!0;if(t===Or.TABLE||t===Or.TEMPLATE||t===Or.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;0<=t;t--){var e=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===Nr.HTML){if(e===Or.TBODY||e===Or.THEAD||e===Or.TFOOT)return!0;if(e===Or.TABLE||e===Or.HTML)return!1}}return!0}hasInSelectScope(e){for(let n=this.stackTop;0<=n;n--){var t=this.tagIDs[n];if(this.treeAdapter.getNamespaceURI(this.items[n])===Nr.HTML){if(t===e)return!0;if(t!==Or.OPTION&&t!==Or.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;Jr.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Zr.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&Zr.has(this.currentTagId);)this.pop()}}!function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"}(Rr=Rr||{});const oi={type:Rr.Marker};class ci{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){var n=[],r=t.length,i=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){const t=this.entries[e];if(t.type===Rr.Marker)break;var a=t.element;if(this.treeAdapter.getTagName(a)===i&&this.treeAdapter.getNamespaceURI(a)===s){const t=this.treeAdapter.getAttrList(a);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(!(this.entries.length<3)){var t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(!(n.length<3)){const e=new Map(t.map((e=>[e.name,e.value])));let r=0;for(let t=0;t<n.length;t++){const i=n[t];i.attrs.every((t=>e.get(t.name)===t.value))&&3<=(r+=1)&&this.entries.splice(i.idx,1)}}}}insertMarker(){this.entries.unshift(oi)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Rr.Element,element:e,token:t})}insertElementAfterBookmark(e,t){var n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Rr.Element,element:e,token:t})}removeEntry(e){0<=(e=this.entries.indexOf(e))&&this.entries.splice(e,1)}clearToLastMarker(){var e=this.entries.indexOf(oi);0<=e?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){var t=this.entries.find((t=>t.type===Rr.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===Rr.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===Rr.Element&&t.element===e))}}function li(e){return{nodeName:"#text",value:e,parentNode:null}}const ui={createDocument:()=>({nodeName:"#document",mode:br.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){n=e.childNodes.indexOf(n),e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,t,n,r){const i=e.childNodes.find((e=>"#documentType"===e.nodeName));if(i)i.name=t,i.publicId=n,i.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};ui.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){var t;e.parentNode&&(t=e.parentNode.childNodes.indexOf(e),e.parentNode.childNodes.splice(t,1),e.parentNode=null)},insertText(e,t){if(0<e.childNodes.length){var n=e.childNodes[e.childNodes.length-1];if(ui.isTextNode(n))return void(n.value+=t)}ui.appendChild(e,li(t))},insertTextBefore(e,t,n){var r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ui.isTextNode(r)?r.value+=t:ui.insertBefore(e,li(t),n)},adoptAttributes(e,t){var n=new Set(e.attrs.map((e=>e.name)));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},hi="html",fi=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],pi=[...fi,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],di=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),mi=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Ei=[...mi,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ti(e,t){return t.some((t=>e.startsWith(t)))}const _i="text/html",gi="application/xhtml+xml",Ai="definitionurl",yi="definitionURL",vi=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((e=>[e.toLowerCase(),e]))),Si=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Nr.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Nr.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Nr.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Nr.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Nr.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Nr.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Nr.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:Nr.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:Nr.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Nr.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Nr.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Nr.XMLNS}]]),Ni=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((e=>[e.toLowerCase(),e]))),Ii=new Set([Or.B,Or.BIG,Or.BLOCKQUOTE,Or.BODY,Or.BR,Or.CENTER,Or.CODE,Or.DD,Or.DIV,Or.DL,Or.DT,Or.EM,Or.EMBED,Or.H1,Or.H2,Or.H3,Or.H4,Or.H5,Or.H6,Or.HEAD,Or.HR,Or.I,Or.IMG,Or.LI,Or.LISTING,Or.MENU,Or.META,Or.NOBR,Or.OL,Or.P,Or.PRE,Or.RUBY,Or.S,Or.SMALL,Or.SPAN,Or.STRONG,Or.STRIKE,Or.SUB,Or.SUP,Or.TABLE,Or.TT,Or.U,Or.UL,Or.VAR]);function bi(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Ai){e.attrs[t].name=yi;break}}function Ci(e){for(let n=0;n<e.attrs.length;n++){var t=vi.get(e.attrs[n].name);null!=t&&(e.attrs[n].name=t)}}function Oi(e){for(let n=0;n<e.attrs.length;n++){var t=Si.get(e.attrs[n].name);t&&(e.attrs[n].prefix=t.prefix,e.attrs[n].name=t.name,e.attrs[n].namespace=t.namespace)}}const ki="hidden",Ri=8,Di=3,Li=(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"}(Dr=Dr||{}),{startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1}),wi=new Set([Or.TABLE,Or.TBODY,Or.TFOOT,Or.THEAD,Or.TR]),Mi={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ui,onParseError:null};class xi{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Dr.INITIAL,this.originalInsertionMode=Dr.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Mi,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new Qr(this.options,this),this.activeFormattingElements=new ci(this.treeAdapter),this.fragmentContextID=n?xr(this.treeAdapter.getTagName(n)):Or.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new ai(this.document,this.treeAdapter,this)}static parse(e,t){return(t=new this(t)).tokenizer.write(e,!0),t.document}static getFragmentParser(e,t){t={...Mi,...t};var n=(null==e&&(e=t.treeAdapter.createElement(Cr.TEMPLATE,Nr.HTML,[])),t.treeAdapter.createElement("documentmock",Nr.HTML,[]));return(t=new this(t,n,e)).fragmentContextID===Or.TEMPLATE&&t.tmplInsertionModeStack.unshift(Dr.IN_TEMPLATE),t._initTokenizerForFragmentParsing(),t._insertFakeRootElement(),t._resetInsertionMode(),t._findFormInFragmentContext(),t}getFragment(){var e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){this.onParseError&&(t={code:t,startLine:(e=null!=(t=e.location)?t:Li).startLine,startCol:e.startCol,startOffset:e.startOffset,endLine:n?e.startLine:e.endLine,endCol:n?e.startCol:e.endCol,endOffset:n?e.startOffset:e.endOffset},this.onParseError(t))}onItemPush(e,t,n){var r,i;null!=(i=(r=this.treeAdapter).onItemPush)&&i.call(r,e),n&&0<this.openElements.stackTop&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null!=(r=(n=this.treeAdapter).onItemPop)&&r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){var n=e===this.document||this.treeAdapter.getNamespaceURI(e)===Nr.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,Nr.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Dr.TEXT}switchToPlaintextParsing(){this.insertionMode=Dr.TEXT,this.originalInsertionMode=Dr.IN_BODY,this.tokenizer.state=Gr.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Cr.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===Nr.HTML)switch(this.fragmentContextID){case Or.TITLE:case Or.TEXTAREA:this.tokenizer.state=Gr.RCDATA;break;case Or.STYLE:case Or.XMP:case Or.IFRAME:case Or.NOEMBED:case Or.NOFRAMES:case Or.NOSCRIPT:this.tokenizer.state=Gr.RAWTEXT;break;case Or.SCRIPT:this.tokenizer.state=Gr.SCRIPT_DATA;break;case Or.PLAINTEXT:this.tokenizer.state=Gr.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo&&(t=t&&{...t,startTag:t},this.treeAdapter.setNodeSourceCodeLocation(e,t)),this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){t=this.treeAdapter.createElement(e.tagName,t,e.attrs),this._attachElementToTree(t,e.location)}_insertElement(e,t){t=this.treeAdapter.createElement(e.tagName,t,e.attrs),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID)}_insertFakeElement(e,t){e=this.treeAdapter.createElement(e,Nr.HTML,[]),this._attachElementToTree(e,null),this.openElements.push(e,t)}_insertTemplate(e){var t=this.treeAdapter.createElement(e.tagName,Nr.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){var e=this.treeAdapter.createElement(Cr.HTML,Nr.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,Or.HTML)}_appendCommentNode(e,t){var n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),e.location){var r=this.treeAdapter.getChildNodes(t),i=n?r.lastIndexOf(n):r.length;i=r[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){var n,r;this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location&&(n=t.location,r=this.treeAdapter.getTagName(e),r=t.type===jn.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset},this.treeAdapter.updateNodeSourceCodeLocation(e,r))}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==Or.SVG||this.treeAdapter.getTagName(t)!==Cr.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==Nr.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===Or.MGLYPH||e.tagID===Or.MALIGNMARK)&&!this._isIntegrationPoint(n,t,Nr.HTML))}_processToken(e){switch(e.type){case jn.CHARACTER:this.onCharacter(e);break;case jn.NULL_CHARACTER:this.onNullCharacter(e);break;case jn.COMMENT:this.onComment(e);break;case jn.DOCTYPE:this.onDoctype(e);break;case jn.START_TAG:this._processStartTag(e);break;case jn.END_TAG:this.onEndTag(e);break;case jn.EOF:this.onEof(e);break;case jn.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return function(e,t,n,r){return(!r||r===Nr.HTML)&&function(e,t,n){if(t===Nr.MATHML&&e===Or.ANNOTATION_XML)for(let e=0;e<n.length;e++)if(n[e].name===Ir.ENCODING){const t=n[e].value.toLowerCase();return t===_i||t===gi}return t===Nr.SVG&&(e===Or.FOREIGN_OBJECT||e===Or.DESC||e===Or.TITLE)}(e,t,n)||(!r||r===Nr.MATHML)&&function(e,t){return t===Nr.MATHML&&(e===Or.MI||e===Or.MO||e===Or.MN||e===Or.MS||e===Or.MTEXT)}(e,t)}(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){var t=this.activeFormattingElements.entries.findIndex((e=>e.type===Rr.Marker||this.openElements.contains(e.element)));for(let n=t<0?e-1:t-1;0<=n;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Dr.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(Or.P),this.openElements.popUntilTagNamePopped(Or.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;0<=e;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case Or.TR:return void(this.insertionMode=Dr.IN_ROW);case Or.TBODY:case Or.THEAD:case Or.TFOOT:return void(this.insertionMode=Dr.IN_TABLE_BODY);case Or.CAPTION:return void(this.insertionMode=Dr.IN_CAPTION);case Or.COLGROUP:return void(this.insertionMode=Dr.IN_COLUMN_GROUP);case Or.TABLE:return void(this.insertionMode=Dr.IN_TABLE);case Or.BODY:return void(this.insertionMode=Dr.IN_BODY);case Or.FRAMESET:return void(this.insertionMode=Dr.IN_FRAMESET);case Or.SELECT:return void this._resetInsertionModeForSelect(e);case Or.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case Or.HTML:return void(this.insertionMode=this.headElement?Dr.AFTER_HEAD:Dr.BEFORE_HEAD);case Or.TD:case Or.TH:if(0<e)return void(this.insertionMode=Dr.IN_CELL);break;case Or.HEAD:if(0<e)return void(this.insertionMode=Dr.IN_HEAD)}this.insertionMode=Dr.IN_BODY}_resetInsertionModeForSelect(e){if(0<e)for(let t=e-1;0<t;t--){const e=this.openElements.tagIDs[t];if(e===Or.TEMPLATE)break;if(e===Or.TABLE)return void(this.insertionMode=Dr.IN_SELECT_IN_TABLE)}this.insertionMode=Dr.IN_SELECT}_isElementCausesFosterParenting(e){return wi.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let n=this.openElements.stackTop;0<=n;n--){var e=this.openElements.items[n];switch(this.openElements.tagIDs[n]){case Or.TEMPLATE:if(this.treeAdapter.getNamespaceURI(e)===Nr.HTML)return{parent:this.treeAdapter.getTemplateContent(e),beforeElement:null};break;case Or.TABLE:var t=this.treeAdapter.getParentNode(e);return t?{parent:t,beforeElement:e}:{parent:this.openElements.items[n-1],beforeElement:null}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){var t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return e=this.treeAdapter.getNamespaceURI(e),Br[e].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case Dr.INITIAL:qi(this,e);break;case Dr.BEFORE_HTML:Vi(this,e);break;case Dr.BEFORE_HEAD:$i(this,e);break;case Dr.IN_HEAD:zi(this,e);break;case Dr.IN_HEAD_NO_SCRIPT:Qi(this,e);break;case Dr.AFTER_HEAD:Ji(this,e);break;case Dr.IN_BODY:case Dr.IN_CAPTION:case Dr.IN_CELL:case Dr.IN_TEMPLATE:ts(this,e);break;case Dr.TEXT:case Dr.IN_SELECT:case Dr.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Dr.IN_TABLE:case Dr.IN_TABLE_BODY:case Dr.IN_ROW:us(this,e);break;case Dr.IN_TABLE_TEXT:ms(this,e);break;case Dr.IN_COLUMN_GROUP:gs(this,e);break;case Dr.AFTER_BODY:Os(this,e);break;case Dr.AFTER_AFTER_BODY:ks(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=Zn,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case Dr.INITIAL:qi(this,e);break;case Dr.BEFORE_HTML:Vi(this,e);break;case Dr.BEFORE_HEAD:$i(this,e);break;case Dr.IN_HEAD:zi(this,e);break;case Dr.IN_HEAD_NO_SCRIPT:Qi(this,e);break;case Dr.AFTER_HEAD:Ji(this,e);break;case Dr.TEXT:this._insertCharacters(e);break;case Dr.IN_TABLE:case Dr.IN_TABLE_BODY:case Dr.IN_ROW:us(this,e);break;case Dr.IN_COLUMN_GROUP:gs(this,e);break;case Dr.AFTER_BODY:Os(this,e);break;case Dr.AFTER_AFTER_BODY:ks(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)ji(this,e);else switch(this.insertionMode){case Dr.INITIAL:case Dr.BEFORE_HTML:case Dr.BEFORE_HEAD:case Dr.IN_HEAD:case Dr.IN_HEAD_NO_SCRIPT:case Dr.AFTER_HEAD:case Dr.IN_BODY:case Dr.IN_TABLE:case Dr.IN_CAPTION:case Dr.IN_COLUMN_GROUP:case Dr.IN_TABLE_BODY:case Dr.IN_ROW:case Dr.IN_CELL:case Dr.IN_SELECT:case Dr.IN_SELECT_IN_TABLE:case Dr.IN_TEMPLATE:case Dr.IN_FRAMESET:case Dr.AFTER_FRAMESET:ji(this,e);break;case Dr.IN_TABLE_TEXT:Es(this,e);break;case Dr.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case Dr.AFTER_AFTER_BODY:case Dr.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Dr.INITIAL:!function(e,t){e._setDocumentType(t);var n=t.forceQuirks?br.QUIRKS:function(e){if(e.name!==hi)return br.QUIRKS;var t=e.systemId;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return br.QUIRKS;let n=e.publicId;if(null!==n){if(n=n.toLowerCase(),di.has(n))return br.QUIRKS;let e=null===t?pi:fi;if(Ti(n,e))return br.QUIRKS;if(e=null===t?mi:Ei,Ti(n,e))return br.LIMITED_QUIRKS}return br.NO_QUIRKS}(t);!function(e){return e.name===hi&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)}(t)&&e._err(t,Xn.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Dr.BEFORE_HTML}(this,e);break;case Dr.BEFORE_HEAD:case Dr.IN_HEAD:case Dr.IN_HEAD_NO_SCRIPT:case Dr.AFTER_HEAD:this._err(e,Xn.misplacedDoctype);break;case Dr.IN_TABLE_TEXT:Es(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Xn.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){var n;!function(e){var t=e.tagID;return t===Or.FONT&&e.attrs.some((({name:e})=>e===Ir.COLOR||e===Ir.SIZE||e===Ir.FACE))||Ii.has(t)}(t)?(n=e._getAdjustedCurrentElement(),(n=e.treeAdapter.getNamespaceURI(n))===Nr.MATHML?bi(t):n===Nr.SVG&&(function(e){var t=Ni.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=xr(e.tagName))}(t),Ci(t)),Oi(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0):(Rs(e),e._startTagOutsideForeignContent(t))}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Dr.INITIAL:qi(this,e);break;case Dr.BEFORE_HTML:!function(e,t){t.tagID===Or.HTML?(e._insertElement(t,Nr.HTML),e.insertionMode=Dr.BEFORE_HEAD):Vi(e,t)}(this,e);break;case Dr.BEFORE_HEAD:!function(e,t){switch(t.tagID){case Or.HTML:as(e,t);break;case Or.HEAD:e._insertElement(t,Nr.HTML),e.headElement=e.openElements.current,e.insertionMode=Dr.IN_HEAD;break;default:$i(e,t)}}(this,e);break;case Dr.IN_HEAD:Ki(this,e);break;case Dr.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case Or.HTML:as(e,t);break;case Or.BASEFONT:case Or.BGSOUND:case Or.HEAD:case Or.LINK:case Or.META:case Or.NOFRAMES:case Or.STYLE:Ki(e,t);break;case Or.NOSCRIPT:e._err(t,Xn.nestedNoscriptInHead);break;default:Qi(e,t)}}(this,e);break;case Dr.AFTER_HEAD:!function(e,t){switch(t.tagID){case Or.HTML:as(e,t);break;case Or.BODY:e._insertElement(t,Nr.HTML),e.framesetOk=!1,e.insertionMode=Dr.IN_BODY;break;case Or.FRAMESET:e._insertElement(t,Nr.HTML),e.insertionMode=Dr.IN_FRAMESET;break;case Or.BASE:case Or.BASEFONT:case Or.BGSOUND:case Or.LINK:case Or.META:case Or.NOFRAMES:case Or.SCRIPT:case Or.STYLE:case Or.TEMPLATE:case Or.TITLE:e._err(t,Xn.abandonedHeadElementChild),e.openElements.push(e.headElement,Or.HEAD),Ki(e,t),e.openElements.remove(e.headElement);break;case Or.HEAD:e._err(t,Xn.misplacedStartTagForHeadElement);break;default:Ji(e,t)}}(this,e);break;case Dr.IN_BODY:as(this,e);break;case Dr.IN_TABLE:hs(this,e);break;case Dr.IN_TABLE_TEXT:Es(this,e);break;case Dr.IN_CAPTION:!function(e,t){var n=t.tagID;Ts.has(n)?e.openElements.hasInTableScope(Or.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Or.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Dr.IN_TABLE,hs(e,t)):as(e,t)}(this,e);break;case Dr.IN_COLUMN_GROUP:_s(this,e);break;case Dr.IN_TABLE_BODY:As(this,e);break;case Dr.IN_ROW:vs(this,e);break;case Dr.IN_CELL:!function(e,t){var n=t.tagID;Ts.has(n)?(e.openElements.hasInTableScope(Or.TD)||e.openElements.hasInTableScope(Or.TH))&&(e._closeTableCell(),vs(e,t)):as(e,t)}(this,e);break;case Dr.IN_SELECT:Ns(this,e);break;case Dr.IN_SELECT_IN_TABLE:!function(e,t){var n=t.tagID;n===Or.CAPTION||n===Or.TABLE||n===Or.TBODY||n===Or.TFOOT||n===Or.THEAD||n===Or.TR||n===Or.TD||n===Or.TH?(e.openElements.popUntilTagNamePopped(Or.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ns(e,t)}(this,e);break;case Dr.IN_TEMPLATE:!function(e,t){switch(t.tagID){case Or.BASE:case Or.BASEFONT:case Or.BGSOUND:case Or.LINK:case Or.META:case Or.NOFRAMES:case Or.SCRIPT:case Or.STYLE:case Or.TEMPLATE:case Or.TITLE:Ki(e,t);break;case Or.CAPTION:case Or.COLGROUP:case Or.TBODY:case Or.TFOOT:case Or.THEAD:e.tmplInsertionModeStack[0]=Dr.IN_TABLE,e.insertionMode=Dr.IN_TABLE,hs(e,t);break;case Or.COL:e.tmplInsertionModeStack[0]=Dr.IN_COLUMN_GROUP,e.insertionMode=Dr.IN_COLUMN_GROUP,_s(e,t);break;case Or.TR:e.tmplInsertionModeStack[0]=Dr.IN_TABLE_BODY,e.insertionMode=Dr.IN_TABLE_BODY,As(e,t);break;case Or.TD:case Or.TH:e.tmplInsertionModeStack[0]=Dr.IN_ROW,e.insertionMode=Dr.IN_ROW,vs(e,t);break;default:e.tmplInsertionModeStack[0]=Dr.IN_BODY,e.insertionMode=Dr.IN_BODY,as(e,t)}}(this,e);break;case Dr.AFTER_BODY:!function(e,t){(t.tagID===Or.HTML?as:Os)(e,t)}(this,e);break;case Dr.IN_FRAMESET:!function(e,t){switch(t.tagID){case Or.HTML:as(e,t);break;case Or.FRAMESET:e._insertElement(t,Nr.HTML);break;case Or.FRAME:e._appendElement(t,Nr.HTML),t.ackSelfClosing=!0;break;case Or.NOFRAMES:Ki(e,t)}}(this,e);break;case Dr.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case Or.HTML:as(e,t);break;case Or.NOFRAMES:Ki(e,t)}}(this,e);break;case Dr.AFTER_AFTER_BODY:!function(e,t){(t.tagID===Or.HTML?as:ks)(e,t)}(this,e);break;case Dr.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case Or.HTML:as(e,t);break;case Or.NOFRAMES:Ki(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===Or.P||t.tagID===Or.BR)return Rs(e),e._endTagOutsideForeignContent(t);for(let r=e.openElements.stackTop;0<r;r--){var n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===Nr.HTML){e._endTagOutsideForeignContent(t);break}if((n=e.treeAdapter.getTagName(n)).toLowerCase()===t.tagName){t.tagName=n,e.openElements.shortenToLength(r);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Dr.INITIAL:qi(this,e);break;case Dr.BEFORE_HTML:!function(e,t){var n=t.tagID;n!==Or.HTML&&n!==Or.HEAD&&n!==Or.BODY&&n!==Or.BR||Vi(e,t)}(this,e);break;case Dr.BEFORE_HEAD:!function(e,t){var n=t.tagID;n===Or.HEAD||n===Or.BODY||n===Or.HTML||n===Or.BR?$i(e,t):e._err(t,Xn.endTagWithoutMatchingOpenElement)}(this,e);break;case Dr.IN_HEAD:!function(e,t){switch(t.tagID){case Or.HEAD:e.openElements.pop(),e.insertionMode=Dr.AFTER_HEAD;break;case Or.BODY:case Or.BR:case Or.HTML:zi(e,t);break;case Or.TEMPLATE:Wi(e,t);break;default:e._err(t,Xn.endTagWithoutMatchingOpenElement)}}(this,e);break;case Dr.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case Or.NOSCRIPT:e.openElements.pop(),e.insertionMode=Dr.IN_HEAD;break;case Or.BR:Qi(e,t);break;default:e._err(t,Xn.endTagWithoutMatchingOpenElement)}}(this,e);break;case Dr.AFTER_HEAD:!function(e,t){switch(t.tagID){case Or.BODY:case Or.HTML:case Or.BR:Ji(e,t);break;case Or.TEMPLATE:Wi(e,t);break;default:e._err(t,Xn.endTagWithoutMatchingOpenElement)}}(this,e);break;case Dr.IN_BODY:cs(this,e);break;case Dr.TEXT:!function(e,t){t.tagID===Or.SCRIPT&&null!=(t=e.scriptHandler)&&t.call(e,e.openElements.current),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case Dr.IN_TABLE:fs(this,e);break;case Dr.IN_TABLE_TEXT:Es(this,e);break;case Dr.IN_CAPTION:!function(e,t){var n=t.tagID;switch(n){case Or.CAPTION:case Or.TABLE:e.openElements.hasInTableScope(Or.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Or.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Dr.IN_TABLE,n===Or.TABLE)&&fs(e,t);break;case Or.BODY:case Or.COL:case Or.COLGROUP:case Or.HTML:case Or.TBODY:case Or.TD:case Or.TFOOT:case Or.TH:case Or.THEAD:case Or.TR:break;default:cs(e,t)}}(this,e);break;case Dr.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case Or.COLGROUP:e.openElements.currentTagId===Or.COLGROUP&&(e.openElements.pop(),e.insertionMode=Dr.IN_TABLE);break;case Or.TEMPLATE:Wi(e,t);break;case Or.COL:break;default:gs(e,t)}}(this,e);break;case Dr.IN_TABLE_BODY:ys(this,e);break;case Dr.IN_ROW:Ss(this,e);break;case Dr.IN_CELL:!function(e,t){var n=t.tagID;switch(n){case Or.TD:case Or.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Dr.IN_ROW);break;case Or.TABLE:case Or.TBODY:case Or.TFOOT:case Or.THEAD:case Or.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Ss(e,t));break;case Or.BODY:case Or.CAPTION:case Or.COL:case Or.COLGROUP:case Or.HTML:break;default:cs(e,t)}}(this,e);break;case Dr.IN_SELECT:Is(this,e);break;case Dr.IN_SELECT_IN_TABLE:!function(e,t){var n=t.tagID;n===Or.CAPTION||n===Or.TABLE||n===Or.TBODY||n===Or.TFOOT||n===Or.THEAD||n===Or.TR||n===Or.TD||n===Or.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(Or.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Is(e,t)}(this,e);break;case Dr.IN_TEMPLATE:!function(e,t){t.tagID===Or.TEMPLATE&&Wi(e,t)}(this,e);break;case Dr.AFTER_BODY:Cs(this,e);break;case Dr.IN_FRAMESET:!function(e,t){t.tagID!==Or.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext)||e.openElements.currentTagId===Or.FRAMESET||(e.insertionMode=Dr.AFTER_FRAMESET)}(this,e);break;case Dr.AFTER_FRAMESET:!function(e,t){t.tagID===Or.HTML&&(e.insertionMode=Dr.AFTER_AFTER_FRAMESET)}(this,e);break;case Dr.AFTER_AFTER_BODY:ks(this,e)}}onEof(e){switch(this.insertionMode){case Dr.INITIAL:qi(this,e);break;case Dr.BEFORE_HTML:Vi(this,e);break;case Dr.BEFORE_HEAD:$i(this,e);break;case Dr.IN_HEAD:zi(this,e);break;case Dr.IN_HEAD_NO_SCRIPT:Qi(this,e);break;case Dr.AFTER_HEAD:Ji(this,e);break;case Dr.IN_BODY:case Dr.IN_TABLE:case Dr.IN_CAPTION:case Dr.IN_COLUMN_GROUP:case Dr.IN_TABLE_BODY:case Dr.IN_ROW:case Dr.IN_CELL:case Dr.IN_SELECT:case Dr.IN_SELECT_IN_TABLE:ls(this,e);break;case Dr.TEXT:!function(e,t){e._err(t,Xn.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case Dr.IN_TABLE_TEXT:Es(this,e);break;case Dr.IN_TEMPLATE:bs(this,e);break;case Dr.AFTER_BODY:case Dr.IN_FRAMESET:case Dr.AFTER_FRAMESET:case Dr.AFTER_AFTER_BODY:case Dr.AFTER_AFTER_FRAMESET:Yi(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Gn.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case Dr.IN_HEAD:case Dr.IN_HEAD_NO_SCRIPT:case Dr.AFTER_HEAD:case Dr.TEXT:case Dr.IN_COLUMN_GROUP:case Dr.IN_SELECT:case Dr.IN_SELECT_IN_TABLE:case Dr.IN_FRAMESET:case Dr.AFTER_FRAMESET:this._insertCharacters(e);break;case Dr.IN_BODY:case Dr.IN_CAPTION:case Dr.IN_CELL:case Dr.IN_TEMPLATE:case Dr.AFTER_BODY:case Dr.AFTER_AFTER_BODY:case Dr.AFTER_AFTER_FRAMESET:es(this,e);break;case Dr.IN_TABLE:case Dr.IN_TABLE_BODY:case Dr.IN_ROW:us(this,e);break;case Dr.IN_TABLE_TEXT:ds(this,e)}}}function Pi(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):os(e,t),n}function Bi(e,t){let n=null,r=e.openElements.stackTop;for(;0<=r;r--){var i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function Fi(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const n=e.activeFormattingElements.getElementEntry(a),o=n&&s>=Di;!n||o?(o&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(a)):(a=Ui(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function Ui(e,t){var n=e.treeAdapter.getNamespaceURI(t.element);n=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n}function Hi(e,t,n){var r,i=xr(e.treeAdapter.getTagName(t));e._isElementCausesFosterParenting(i)?e._fosterParentElement(n):(r=e.treeAdapter.getNamespaceURI(t),i===Or.TEMPLATE&&r===Nr.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n))}function Gi(e,t,n){var r=e.treeAdapter.getNamespaceURI(n.element),i=n.token;r=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,r),e.treeAdapter.appendChild(t,r),e.activeFormattingElements.insertElementAfterBookmark(r,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,r,i.tagID)}function Xi(e,t){for(let s=0;s<Ri;s++){const s=Pi(e,t);if(!s)break;var n=Bi(e,s);if(!n)break;e.activeFormattingElements.bookmark=s;var r=Fi(e,n,s.element),i=e.openElements.getCommonAncestor(s.element);e.treeAdapter.detachNode(r),i&&Hi(e,i,r),Gi(e,n,s)}}function ji(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Yi(e,t){if(e.stopped=!0,t.location){var n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&0<=e.openElements.stackTop){const n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),1<=e.openElements.stackTop)){const n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function qi(e,t){e._err(t,Xn.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,br.QUIRKS),e.insertionMode=Dr.BEFORE_HTML,e._processToken(t)}function Vi(e,t){e._insertFakeRootElement(),e.insertionMode=Dr.BEFORE_HEAD,e._processToken(t)}function $i(e,t){e._insertFakeElement(Cr.HEAD,Or.HEAD),e.headElement=e.openElements.current,e.insertionMode=Dr.IN_HEAD,e._processToken(t)}function Ki(e,t){switch(t.tagID){case Or.HTML:as(e,t);break;case Or.BASE:case Or.BASEFONT:case Or.BGSOUND:case Or.LINK:case Or.META:e._appendElement(t,Nr.HTML),t.ackSelfClosing=!0;break;case Or.TITLE:e._switchToTextParsing(t,Gr.RCDATA);break;case Or.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Gr.RAWTEXT):(e._insertElement(t,Nr.HTML),e.insertionMode=Dr.IN_HEAD_NO_SCRIPT);break;case Or.NOFRAMES:case Or.STYLE:e._switchToTextParsing(t,Gr.RAWTEXT);break;case Or.SCRIPT:e._switchToTextParsing(t,Gr.SCRIPT_DATA);break;case Or.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Dr.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Dr.IN_TEMPLATE);break;case Or.HEAD:e._err(t,Xn.misplacedStartTagForHeadElement);break;default:zi(e,t)}}function Wi(e,t){0<e.openElements.tmplCount?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==Or.TEMPLATE&&e._err(t,Xn.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(Or.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Xn.endTagWithoutMatchingOpenElement)}function zi(e,t){e.openElements.pop(),e.insertionMode=Dr.AFTER_HEAD,e._processToken(t)}function Qi(e,t){var n=t.type===jn.EOF?Xn.openElementsLeftAfterEof:Xn.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Dr.IN_HEAD,e._processToken(t)}function Ji(e,t){e._insertFakeElement(Cr.BODY,Or.BODY),e.insertionMode=Dr.IN_BODY,Zi(e,t)}function Zi(e,t){switch(t.type){case jn.CHARACTER:ts(e,t);break;case jn.WHITESPACE_CHARACTER:es(e,t);break;case jn.COMMENT:ji(e,t);break;case jn.START_TAG:as(e,t);break;case jn.END_TAG:cs(e,t);break;case jn.EOF:ls(e,t)}}function es(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ts(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function ns(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Nr.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function rs(e){return null!=(e=cr(e,Ir.TYPE))&&e.toLowerCase()===ki}function is(e,t){e._switchToTextParsing(t,Gr.RAWTEXT)}function ss(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Nr.HTML)}function as(e,t){switch(t.tagID){case Or.I:case Or.S:case Or.B:case Or.U:case Or.EM:case Or.TT:case Or.BIG:case Or.CODE:case Or.FONT:case Or.SMALL:case Or.STRIKE:case Or.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Nr.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Or.A:!function(e,t){var n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Cr.A);n&&(Xi(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Nr.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Or.H1:case Or.H2:case Or.H3:case Or.H4:case Or.H5:case Or.H6:!function(e,t){e.openElements.hasInButtonScope(Or.P)&&e._closePElement(),Fr(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Nr.HTML)}(e,t);break;case Or.P:case Or.DL:case Or.OL:case Or.UL:case Or.DIV:case Or.DIR:case Or.NAV:case Or.MAIN:case Or.MENU:case Or.ASIDE:case Or.CENTER:case Or.FIGURE:case Or.FOOTER:case Or.HEADER:case Or.HGROUP:case Or.DIALOG:case Or.DETAILS:case Or.ADDRESS:case Or.ARTICLE:case Or.SECTION:case Or.SUMMARY:case Or.FIELDSET:case Or.BLOCKQUOTE:case Or.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(Or.P)&&e._closePElement(),e._insertElement(t,Nr.HTML)}(e,t);break;case Or.LI:case Or.DD:case Or.DT:!function(e,t){e.framesetOk=!1;var n=t.tagID;for(let t=e.openElements.stackTop;0<=t;t--){var r=e.openElements.tagIDs[t];if(n===Or.LI&&r===Or.LI||(n===Or.DD||n===Or.DT)&&(r===Or.DD||r===Or.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==Or.ADDRESS&&r!==Or.DIV&&r!==Or.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(Or.P)&&e._closePElement(),e._insertElement(t,Nr.HTML)}(e,t);break;case Or.BR:case Or.IMG:case Or.WBR:case Or.AREA:case Or.EMBED:case Or.KEYGEN:ns(e,t);break;case Or.HR:!function(e,t){e.openElements.hasInButtonScope(Or.P)&&e._closePElement(),e._appendElement(t,Nr.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case Or.RB:case Or.RTC:!function(e,t){e.openElements.hasInScope(Or.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Nr.HTML)}(e,t);break;case Or.RT:case Or.RP:!function(e,t){e.openElements.hasInScope(Or.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(Or.RTC),e._insertElement(t,Nr.HTML)}(e,t);break;case Or.PRE:case Or.LISTING:!function(e,t){e.openElements.hasInButtonScope(Or.P)&&e._closePElement(),e._insertElement(t,Nr.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case Or.XMP:!function(e,t){e.openElements.hasInButtonScope(Or.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Gr.RAWTEXT)}(e,t);break;case Or.SVG:!function(e,t){e._reconstructActiveFormattingElements(),Ci(t),Oi(t),t.selfClosing?e._appendElement(t,Nr.SVG):e._insertElement(t,Nr.SVG),t.ackSelfClosing=!0}(e,t);break;case Or.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case Or.BASE:case Or.LINK:case Or.META:case Or.STYLE:case Or.TITLE:case Or.SCRIPT:case Or.BGSOUND:case Or.BASEFONT:case Or.TEMPLATE:Ki(e,t);break;case Or.BODY:!function(e,t){var n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case Or.FORM:!function(e,t){var n=0<e.openElements.tmplCount;e.formElement&&!n||(e.openElements.hasInButtonScope(Or.P)&&e._closePElement(),e._insertElement(t,Nr.HTML),n)||(e.formElement=e.openElements.current)}(e,t);break;case Or.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(Or.NOBR)&&(Xi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Nr.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Or.MATH:!function(e,t){e._reconstructActiveFormattingElements(),bi(t),Oi(t),t.selfClosing?e._appendElement(t,Nr.MATHML):e._insertElement(t,Nr.MATHML),t.ackSelfClosing=!0}(e,t);break;case Or.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==br.QUIRKS&&e.openElements.hasInButtonScope(Or.P)&&e._closePElement(),e._insertElement(t,Nr.HTML),e.framesetOk=!1,e.insertionMode=Dr.IN_TABLE}(e,t);break;case Or.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Nr.HTML),rs(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case Or.PARAM:case Or.TRACK:case Or.SOURCE:!function(e,t){e._appendElement(t,Nr.HTML),t.ackSelfClosing=!0}(e,t);break;case Or.IMAGE:!function(e,t){t.tagName=Cr.IMG,t.tagID=Or.IMG,ns(e,t)}(e,t);break;case Or.BUTTON:!function(e,t){e.openElements.hasInScope(Or.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Or.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Nr.HTML),e.framesetOk=!1}(e,t);break;case Or.APPLET:case Or.OBJECT:case Or.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Nr.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case Or.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Gr.RAWTEXT)}(e,t);break;case Or.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Nr.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Dr.IN_TABLE||e.insertionMode===Dr.IN_CAPTION||e.insertionMode===Dr.IN_TABLE_BODY||e.insertionMode===Dr.IN_ROW||e.insertionMode===Dr.IN_CELL?Dr.IN_SELECT_IN_TABLE:Dr.IN_SELECT}(e,t);break;case Or.OPTION:case Or.OPTGROUP:!function(e,t){e.openElements.currentTagId===Or.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Nr.HTML)}(e,t);break;case Or.NOEMBED:is(e,t);break;case Or.FRAMESET:!function(e,t){var n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Nr.HTML),e.insertionMode=Dr.IN_FRAMESET)}(e,t);break;case Or.TEXTAREA:!function(e,t){e._insertElement(t,Nr.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Gr.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Dr.TEXT}(e,t);break;case Or.NOSCRIPT:(e.options.scriptingEnabled?is:ss)(e,t);break;case Or.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(Or.P)&&e._closePElement(),e._insertElement(t,Nr.HTML),e.tokenizer.state=Gr.PLAINTEXT}(e,t);break;case Or.COL:case Or.TH:case Or.TD:case Or.TR:case Or.HEAD:case Or.FRAME:case Or.TBODY:case Or.TFOOT:case Or.THEAD:case Or.CAPTION:case Or.COLGROUP:break;default:ss(e,t)}}function os(e,t){var n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;0<t;t--){var i=e.openElements.items[t],s=e.openElements.tagIDs[t];if(r===s&&(r!==Or.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,s))break}}function cs(e,t){switch(t.tagID){case Or.A:case Or.B:case Or.I:case Or.S:case Or.U:case Or.EM:case Or.TT:case Or.BIG:case Or.CODE:case Or.FONT:case Or.NOBR:case Or.SMALL:case Or.STRIKE:case Or.STRONG:Xi(e,t);break;case Or.P:!function(e){e.openElements.hasInButtonScope(Or.P)||e._insertFakeElement(Cr.P,Or.P),e._closePElement()}(e);break;case Or.DL:case Or.UL:case Or.OL:case Or.DIR:case Or.DIV:case Or.NAV:case Or.PRE:case Or.MAIN:case Or.MENU:case Or.ASIDE:case Or.BUTTON:case Or.CENTER:case Or.FIGURE:case Or.FOOTER:case Or.HEADER:case Or.HGROUP:case Or.DIALOG:case Or.ADDRESS:case Or.ARTICLE:case Or.DETAILS:case Or.SECTION:case Or.SUMMARY:case Or.LISTING:case Or.FIELDSET:case Or.BLOCKQUOTE:case Or.FIGCAPTION:!function(e,t){t=t.tagID,e.openElements.hasInScope(t)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(t))}(e,t);break;case Or.LI:!function(e){e.openElements.hasInListItemScope(Or.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(Or.LI),e.openElements.popUntilTagNamePopped(Or.LI))}(e);break;case Or.DD:case Or.DT:!function(e,t){t=t.tagID,e.openElements.hasInScope(t)&&(e.openElements.generateImpliedEndTagsWithExclusion(t),e.openElements.popUntilTagNamePopped(t))}(e,t);break;case Or.H1:case Or.H2:case Or.H3:case Or.H4:case Or.H5:case Or.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case Or.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Cr.BR,Or.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case Or.BODY:!function(e,t){var n;e.openElements.hasInScope(Or.BODY)&&(e.insertionMode=Dr.AFTER_BODY,e.options.sourceCodeLocationInfo)&&(n=e.openElements.tryPeekProperlyNestedBodyElement())&&e._setEndLocation(n,t)}(e,t);break;case Or.HTML:!function(e,t){e.openElements.hasInScope(Or.BODY)&&(e.insertionMode=Dr.AFTER_BODY,Cs(e,t))}(e,t);break;case Or.FORM:!function(e){var t=0<e.openElements.tmplCount,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(Or.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(Or.FORM):n&&e.openElements.remove(n))}(e);break;case Or.APPLET:case Or.OBJECT:case Or.MARQUEE:!function(e,t){t=t.tagID,e.openElements.hasInScope(t)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(t),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case Or.TEMPLATE:Wi(e,t);break;default:os(e,t)}}function ls(e,t){(0<e.tmplInsertionModeStack.length?bs:Yi)(e,t)}function us(e,t){if(wi.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Dr.IN_TABLE_TEXT,t.type){case jn.CHARACTER:ms(e,t);break;case jn.WHITESPACE_CHARACTER:ds(e,t)}else ps(e,t)}function hs(e,t){switch(t.tagID){case Or.TD:case Or.TH:case Or.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Cr.TBODY,Or.TBODY),e.insertionMode=Dr.IN_TABLE_BODY,As(e,t)}(e,t);break;case Or.STYLE:case Or.SCRIPT:case Or.TEMPLATE:Ki(e,t);break;case Or.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Cr.COLGROUP,Or.COLGROUP),e.insertionMode=Dr.IN_COLUMN_GROUP,_s(e,t)}(e,t);break;case Or.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,Nr.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case Or.TABLE:!function(e,t){e.openElements.hasInTableScope(Or.TABLE)&&(e.openElements.popUntilTagNamePopped(Or.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case Or.TBODY:case Or.TFOOT:case Or.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Nr.HTML),e.insertionMode=Dr.IN_TABLE_BODY}(e,t);break;case Or.INPUT:!function(e,t){rs(t)?e._appendElement(t,Nr.HTML):ps(e,t),t.ackSelfClosing=!0}(e,t);break;case Or.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Nr.HTML),e.insertionMode=Dr.IN_CAPTION}(e,t);break;case Or.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Nr.HTML),e.insertionMode=Dr.IN_COLUMN_GROUP}(e,t);break;default:ps(e,t)}}function fs(e,t){switch(t.tagID){case Or.TABLE:e.openElements.hasInTableScope(Or.TABLE)&&(e.openElements.popUntilTagNamePopped(Or.TABLE),e._resetInsertionMode());break;case Or.TEMPLATE:Wi(e,t);break;case Or.BODY:case Or.CAPTION:case Or.COL:case Or.COLGROUP:case Or.HTML:case Or.TBODY:case Or.TD:case Or.TFOOT:case Or.TH:case Or.THEAD:case Or.TR:break;default:ps(e,t)}}function ps(e,t){var n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Zi(e,t),e.fosterParentingEnabled=n}function ds(e,t){e.pendingCharacterTokens.push(t)}function ms(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Es(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ps(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ts=new Set([Or.CAPTION,Or.COL,Or.COLGROUP,Or.TBODY,Or.TD,Or.TFOOT,Or.TH,Or.THEAD,Or.TR]);function _s(e,t){switch(t.tagID){case Or.HTML:as(e,t);break;case Or.COL:e._appendElement(t,Nr.HTML),t.ackSelfClosing=!0;break;case Or.TEMPLATE:Ki(e,t);break;default:gs(e,t)}}function gs(e,t){e.openElements.currentTagId===Or.COLGROUP&&(e.openElements.pop(),e.insertionMode=Dr.IN_TABLE,e._processToken(t))}function As(e,t){switch(t.tagID){case Or.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Nr.HTML),e.insertionMode=Dr.IN_ROW;break;case Or.TH:case Or.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Cr.TR,Or.TR),e.insertionMode=Dr.IN_ROW,vs(e,t);break;case Or.CAPTION:case Or.COL:case Or.COLGROUP:case Or.TBODY:case Or.TFOOT:case Or.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Dr.IN_TABLE,hs(e,t));break;default:hs(e,t)}}function ys(e,t){var n=t.tagID;switch(t.tagID){case Or.TBODY:case Or.TFOOT:case Or.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Dr.IN_TABLE);break;case Or.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Dr.IN_TABLE,fs(e,t));break;case Or.BODY:case Or.CAPTION:case Or.COL:case Or.COLGROUP:case Or.HTML:case Or.TD:case Or.TH:case Or.TR:break;default:fs(e,t)}}function vs(e,t){switch(t.tagID){case Or.TH:case Or.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,Nr.HTML),e.insertionMode=Dr.IN_CELL,e.activeFormattingElements.insertMarker();break;case Or.CAPTION:case Or.COL:case Or.COLGROUP:case Or.TBODY:case Or.TFOOT:case Or.THEAD:case Or.TR:e.openElements.hasInTableScope(Or.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Dr.IN_TABLE_BODY,As(e,t));break;default:hs(e,t)}}function Ss(e,t){switch(t.tagID){case Or.TR:e.openElements.hasInTableScope(Or.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Dr.IN_TABLE_BODY);break;case Or.TABLE:e.openElements.hasInTableScope(Or.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Dr.IN_TABLE_BODY,ys(e,t));break;case Or.TBODY:case Or.TFOOT:case Or.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(Or.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Dr.IN_TABLE_BODY,ys(e,t));break;case Or.BODY:case Or.CAPTION:case Or.COL:case Or.COLGROUP:case Or.HTML:case Or.TD:case Or.TH:break;default:fs(e,t)}}function Ns(e,t){switch(t.tagID){case Or.HTML:as(e,t);break;case Or.OPTION:e.openElements.currentTagId===Or.OPTION&&e.openElements.pop(),e._insertElement(t,Nr.HTML);break;case Or.OPTGROUP:e.openElements.currentTagId===Or.OPTION&&e.openElements.pop(),e.openElements.currentTagId===Or.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Nr.HTML);break;case Or.INPUT:case Or.KEYGEN:case Or.TEXTAREA:case Or.SELECT:e.openElements.hasInSelectScope(Or.SELECT)&&(e.openElements.popUntilTagNamePopped(Or.SELECT),e._resetInsertionMode(),t.tagID!==Or.SELECT)&&e._processStartTag(t);break;case Or.SCRIPT:case Or.TEMPLATE:Ki(e,t)}}function Is(e,t){switch(t.tagID){case Or.OPTGROUP:0<e.openElements.stackTop&&e.openElements.currentTagId===Or.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===Or.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===Or.OPTGROUP&&e.openElements.pop();break;case Or.OPTION:e.openElements.currentTagId===Or.OPTION&&e.openElements.pop();break;case Or.SELECT:e.openElements.hasInSelectScope(Or.SELECT)&&(e.openElements.popUntilTagNamePopped(Or.SELECT),e._resetInsertionMode());break;case Or.TEMPLATE:Wi(e,t)}}function bs(e,t){0<e.openElements.tmplCount?(e.openElements.popUntilTagNamePopped(Or.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Yi(e,t)}function Cs(e,t){var n,r;t.tagID===Or.HTML?(e.fragmentContext||(e.insertionMode=Dr.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===Or.HTML&&(e._setEndLocation(e.openElements.items[0],t),!(r=e.openElements.items[1])||null!=(n=e.treeAdapter.getNodeSourceCodeLocation(r))&&n.endTag||e._setEndLocation(r,t))):Os(e,t)}function Os(e,t){e.insertionMode=Dr.IN_BODY,Zi(e,t)}function ks(e,t){e.insertionMode=Dr.IN_BODY,Zi(e,t)}function Rs(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Nr.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}var Ds=fr((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var n=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]);function r(e){for(var r="",i=0;null!==(s=t.xmlReplacer.exec(e));){var s=s.index,a=e.charCodeAt(s),o=n.get(a);i=void 0!==o?(r+=e.substring(i,s)+o,s+1):(r+="".concat(e.substring(i,s),"&#x").concat((0,t.getCodePoint)(e,s).toString(16),";"),t.xmlReplacer.lastIndex+=Number(55296==(64512&a)))}return r+e.substr(i)}function i(e,t){return function(n){for(var r,i=0,s="";r=e.exec(n);)i!==r.index&&(s+=n.substring(i,r.index)),s+=t.get(r[0].charCodeAt(0)),i=r.index+1;return s+n.substring(i)}}t.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},t.encodeXML=r,t.escape=r,t.escapeUTF8=i(/[&<>'"]/g,n),t.escapeAttribute=i(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),t.escapeText=i(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]))})),Ls=(hr(Ds),Ds.escapeText),ws=Ds.escapeAttribute;Ds.escapeUTF8,Ds.escape,Ds.encodeXML,Ds.getCodePoint,Ds.xmlReplacer;const Ms=new Set([Cr.AREA,Cr.BASE,Cr.BASEFONT,Cr.BGSOUND,Cr.BR,Cr.COL,Cr.EMBED,Cr.FRAME,Cr.HR,Cr.IMG,Cr.INPUT,Cr.KEYGEN,Cr.LINK,Cr.META,Cr.PARAM,Cr.SOURCE,Cr.TRACK,Cr.WBR]),xs={treeAdapter:ui,scriptingEnabled:!0};function Ps(e,t){return Bs(e,{...xs,...t})}function Bs(e,t){return t.treeAdapter.isElementNode(e)?function(e,t){var n=t.treeAdapter.getTagName(e);return`<${n}${function(e,{treeAdapter:t}){let n="";for(const r of t.getAttrList(e)){if(n+=" ",r.namespace)switch(r.namespace){case Nr.XML:n+="xml:"+r.name;break;case Nr.XMLNS:"xmlns"!==r.name&&(n+="xmlns:"),n+=r.name;break;case Nr.XLINK:n+="xlink:"+r.name;break;default:n+=r.prefix+":"+r.name}else n+=r.name;n+=`="${ws(r.value)}"`}return n}(e,t)}>`+(function(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===Nr.HTML&&Ms.has(t.treeAdapter.getTagName(e))}(e,t)?"":function(e,t){let n="";e=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===Cr.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===Nr.HTML?t.treeAdapter.getTemplateContent(e):e;var r=t.treeAdapter.getChildNodes(e);if(r)for(const e of r)n+=Bs(e,t);return n}(e,t)+`</${n}>`)}(e,t):t.treeAdapter.isTextNode(e)?function(e,t){var n=t.treeAdapter,r=n.getTextNodeContent(e),i=(e=n.getParentNode(e))&&n.isElementNode(e)&&n.getTagName(e);return i&&n.getNamespaceURI(e)===Nr.HTML&&(n=i,e=t.scriptingEnabled,Ur.has(n)||e&&n===Cr.NOSCRIPT)?r:Ls(r)}(e,t):t.treeAdapter.isCommentNode(e)?function(e,{treeAdapter:t}){return`\x3c!--${t.getCommentNodeContent(e)}--\x3e`}(e,t):t.treeAdapter.isDocumentTypeNode(e)?function(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}(e,t):""}function Fs(e){return new T(e)}function Us(e){var t=e.includes('"')?"'":'"';return t+e+t}const Hs={isCommentNode:C,isElementNode:N,isTextNode:b,createDocument(){var e=new v([]);return e["x-mode"]=br.NO_QUIRKS,e},createDocumentFragment:()=>new v([]),createElement(e,t,n){var r=Object.create(null),i=Object.create(null),s=Object.create(null);for(let e=0;e<n.length;e++){const t=n[e].name;r[t]=n[e].value,i[t]=n[e].namespace,s[t]=n[e].prefix}return(e=new S(e,r,[])).namespace=t,e["x-attribsNamespace"]=i,e["x-attribsPrefix"]=s,e},createCommentNode:e=>new _(e),appendChild(e,t){var n=e.children[e.children.length-1];n&&((n.next=t).prev=n),e.children.push(t),t.parent=e},insertBefore(e,t,n){var r=e.children.indexOf(n),i=n.prev;i&&((i.next=t).prev=i),(n.prev=t).next=n,e.children.splice(r,0,t),t.parent=e},setTemplateContent(e,t){Hs.appendChild(e,t)},getTemplateContent:e=>e.children[0],setDocumentType(e,t,n,r){var i=function(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=" PUBLIC "+Us(t):n&&(r+=" SYSTEM"),n&&(r+=" "+Us(n)),r}(t,n,r);let s=e.children.find((e=>O(e)&&"!doctype"===e.name));s?s.data=null!=i?i:null:(s=new g("!doctype",i),Hs.appendChild(e,s)),s["x-name"]=null!=t?t:void 0,s["x-publicId"]=null!=n?n:void 0,s["x-systemId"]=null!=r?r:void 0},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode:e=>e["x-mode"],detachNode(e){var t,n,r;e.parent&&(t=e.parent.children.indexOf(e),({prev:n,next:r}=e),e.prev=null,e.next=null,n&&(n.next=r),r&&(r.prev=n),e.parent.children.splice(t,1),e.parent=null)},insertText(e,t){var n=e.children[e.children.length-1];n&&b(n)?n.data+=t:Hs.appendChild(e,Fs(t))},insertTextBefore(e,t,n){var r=e.children[e.children.indexOf(n)-1];r&&b(r)?r.data+=t:Hs.insertBefore(e,Fs(t),n)},adoptAttributes(e,t){for(let r=0;r<t.length;r++){var n=t[r].name;void 0===e.attribs[n]&&(e.attribs[n]=t[r].value,e["x-attribsNamespace"][n]=t[r].namespace,e["x-attribsPrefix"][n]=t[r].prefix)}},getFirstChild:e=>e.children[0],getChildNodes:e=>e.children,getParentNode:e=>e.parent,getAttrList:e=>e.attributes,getTagName:e=>e.name,getNamespaceURI:e=>e.namespace,getTextNodeContent:e=>e.data,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>null!=(e=e["x-name"])?e:"",getDocumentTypeNodePublicId:e=>null!=(e=e["x-publicId"])?e:"",getDocumentTypeNodeSystemId:e=>null!=(e=e["x-systemId"])?e:"",isDocumentTypeNode:e=>O(e)&&"!doctype"===e.name,setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){null!=t.endOffset&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};var Gs=function(e,t,n){if(2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};var Xs,js,Ys,qs={treeAdapter:Hs};function Vs(e){return e===Xs.Space||e===Xs.NewLine||e===Xs.Tab||e===Xs.FormFeed||e===Xs.CarriageReturn}function $s(e){return e===Xs.Slash||e===Xs.Gt||Vs(e)}function Ks(e){return e>=Xs.Zero&&e<=Xs.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(Xs=Xs||{}),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(js=js||{}),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(Ys=Ys||{});const Ws={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])};class zs{constructor({xmlMode:e=!1,decodeEntities:t=!0},n){this.cbs=n,this.state=js.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=js.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=e,this.decodeEntities=t,this.entityTrie=e?Lr:wr}reset(){this.state=js.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=js.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}getIndex(){return this.index}getSectionStart(){return this.sectionStart}stateText(e){e===Xs.Lt||!this.decodeEntities&&this.fastForwardTo(Xs.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=js.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===Xs.Amp&&(this.state=js.BeforeEntity)}stateSpecialStartSequence(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?$s(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=js.InTagName,this.stateInTagName(e)}stateInSpecialTag(e){if(this.sequenceIndex===this.currentSequence.length){if(e===Xs.Gt||Vs(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart<t){const e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}return this.isSpecial=!1,this.sectionStart=2+t,void this.stateInClosingTagName(e)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===Ws.TitleEnd?this.decodeEntities&&e===Xs.Amp&&(this.state=js.BeforeEntity):this.fastForwardTo(Xs.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=Number(e===Xs.Lt)}stateCDATASequence(e){e===Ws.Cdata[this.sequenceIndex]?++this.sequenceIndex===Ws.Cdata.length&&(this.state=js.InCommentLike,this.currentSequence=Ws.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=js.InDeclaration,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===e)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Ws.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=js.Text):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(e){return this.xmlMode?!$s(e):function(e){return e>=Xs.LowerA&&e<=Xs.LowerZ||e>=Xs.UpperA&&e<=Xs.UpperZ}(e)}startSpecial(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=js.SpecialStartSequence}stateBeforeTagName(e){var t;e===Xs.ExclamationMark?(this.state=js.BeforeDeclaration,this.sectionStart=this.index+1):e===Xs.Questionmark?(this.state=js.InProcessingInstruction,this.sectionStart=this.index+1):this.isTagStartChar(e)?(t=32|e,this.sectionStart=this.index,this.xmlMode||t!==Ws.TitleEnd[2]?this.state=this.xmlMode||t!==Ws.ScriptEnd[2]?js.InTagName:js.BeforeSpecialS:this.startSpecial(Ws.TitleEnd,3)):e===Xs.Slash?this.state=js.BeforeClosingTagName:(this.state=js.Text,this.stateText(e))}stateInTagName(e){$s(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=js.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateBeforeClosingTagName(e){Vs(e)||(e===Xs.Gt?this.state=js.Text:(this.state=this.isTagStartChar(e)?js.InClosingTagName:js.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(e){e!==Xs.Gt&&!Vs(e)||(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=js.AfterClosingTagName,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){e!==Xs.Gt&&!this.fastForwardTo(Xs.Gt)||(this.state=js.Text,this.baseState=js.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(e){e===Xs.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=js.InSpecialTag,this.sequenceIndex=0):this.state=js.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===Xs.Slash?this.state=js.InSelfClosingTag:Vs(e)||(this.state=js.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(e){e===Xs.Gt?(this.cbs.onselfclosingtag(this.index),this.state=js.Text,this.baseState=js.Text,this.sectionStart=this.index+1,this.isSpecial=!1):Vs(e)||(this.state=js.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateInAttributeName(e){e!==Xs.Eq&&!$s(e)||(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=js.AfterAttributeName,this.stateAfterAttributeName(e))}stateAfterAttributeName(e){e===Xs.Eq?this.state=js.BeforeAttributeValue:e===Xs.Slash||e===Xs.Gt?(this.cbs.onattribend(Ys.NoValue,this.index),this.state=js.BeforeAttributeName,this.stateBeforeAttributeName(e)):Vs(e)||(this.cbs.onattribend(Ys.NoValue,this.index),this.state=js.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(e){e===Xs.DoubleQuote?(this.state=js.InAttributeValueDq,this.sectionStart=this.index+1):e===Xs.SingleQuote?(this.state=js.InAttributeValueSq,this.sectionStart=this.index+1):Vs(e)||(this.sectionStart=this.index,this.state=js.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))}handleInAttributeValue(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===Xs.DoubleQuote?Ys.Double:Ys.Single,this.index),this.state=js.BeforeAttributeName):this.decodeEntities&&e===Xs.Amp&&(this.baseState=this.state,this.state=js.BeforeEntity)}stateInAttributeValueDoubleQuotes(e){this.handleInAttributeValue(e,Xs.DoubleQuote)}stateInAttributeValueSingleQuotes(e){this.handleInAttributeValue(e,Xs.SingleQuote)}stateInAttributeValueNoQuotes(e){Vs(e)||e===Xs.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Ys.Unquoted,this.index),this.state=js.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===Xs.Amp&&(this.baseState=this.state,this.state=js.BeforeEntity)}stateBeforeDeclaration(e){e===Xs.OpeningSquareBracket?(this.state=js.CDATASequence,this.sequenceIndex=0):this.state=e===Xs.Dash?js.BeforeComment:js.InDeclaration}stateInDeclaration(e){e!==Xs.Gt&&!this.fastForwardTo(Xs.Gt)||(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=js.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){e!==Xs.Gt&&!this.fastForwardTo(Xs.Gt)||(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=js.Text,this.sectionStart=this.index+1)}stateBeforeComment(e){e===Xs.Dash?(this.state=js.InCommentLike,this.currentSequence=Ws.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=js.InDeclaration}stateInSpecialComment(e){e!==Xs.Gt&&!this.fastForwardTo(Xs.Gt)||(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=js.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){var t=32|e;t===Ws.ScriptEnd[3]?this.startSpecial(Ws.ScriptEnd,4):t===Ws.StyleEnd[3]?this.startSpecial(Ws.StyleEnd,4):(this.state=js.InTagName,this.stateInTagName(e))}stateBeforeEntity(e){this.entityExcess=1,this.entityResult=0,e===Xs.Number?this.state=js.BeforeNumericEntity:e!==Xs.Amp&&(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=js.InNamedEntity,this.stateInNamedEntity(e))}stateInNamedEntity(e){if(this.entityExcess+=1,this.trieIndex=Ar(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)this.emitNamedEntity(),this.index--;else{this.trieCurrent=this.entityTrie[this.trieIndex];var t=this.trieCurrent&yr.VALUE_LENGTH;if(t)if(t=(t>>14)-1,this.allowLegacyEntity()||e===Xs.Semi){const e=this.index-this.entityExcess+1;e>this.sectionStart&&this.emitPartial(this.sectionStart,e),this.entityResult=this.trieIndex,this.trieIndex+=t,this.entityExcess=0,this.sectionStart=this.index+1,0==t&&this.emitNamedEntity()}else this.trieIndex+=t}}emitNamedEntity(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&yr.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~yr.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}stateBeforeNumericEntity(e){(32|e)===Xs.LowerX?(this.entityExcess++,this.state=js.InHexEntity):(this.state=js.InNumericEntity,this.stateInNumericEntity(e))}emitNumericEntity(e){var t=this.index-this.entityExcess-1;2+t+Number(this.state===js.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint(Sr(this.entityResult))),this.state=this.baseState}stateInNumericEntity(e){e===Xs.Semi?this.emitNumericEntity(!0):Ks(e)?(this.entityResult=10*this.entityResult+(e-Xs.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}stateInHexEntity(e){e===Xs.Semi?this.emitNumericEntity(!0):Ks(e)?(this.entityResult=16*this.entityResult+(e-Xs.Zero),this.entityExcess++):function(e){return e>=Xs.UpperA&&e<=Xs.UpperF||e>=Xs.LowerA&&e<=Xs.LowerF}(e)?(this.entityResult=16*this.entityResult+((32|e)-Xs.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}allowLegacyEntity(){return!this.xmlMode&&(this.baseState===js.Text||this.baseState===js.InSpecialTag)}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===js.Text||this.state===js.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==js.InAttributeValueDq&&this.state!==js.InAttributeValueSq&&this.state!==js.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){var e=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case js.Text:this.stateText(e);break;case js.SpecialStartSequence:this.stateSpecialStartSequence(e);break;case js.InSpecialTag:this.stateInSpecialTag(e);break;case js.CDATASequence:this.stateCDATASequence(e);break;case js.InAttributeValueDq:this.stateInAttributeValueDoubleQuotes(e);break;case js.InAttributeName:this.stateInAttributeName(e);break;case js.InCommentLike:this.stateInCommentLike(e);break;case js.InSpecialComment:this.stateInSpecialComment(e);break;case js.BeforeAttributeName:this.stateBeforeAttributeName(e);break;case js.InTagName:this.stateInTagName(e);break;case js.InClosingTagName:this.stateInClosingTagName(e);break;case js.BeforeTagName:this.stateBeforeTagName(e);break;case js.AfterAttributeName:this.stateAfterAttributeName(e);break;case js.InAttributeValueSq:this.stateInAttributeValueSingleQuotes(e);break;case js.BeforeAttributeValue:this.stateBeforeAttributeValue(e);break;case js.BeforeClosingTagName:this.stateBeforeClosingTagName(e);break;case js.AfterClosingTagName:this.stateAfterClosingTagName(e);break;case js.BeforeSpecialS:this.stateBeforeSpecialS(e);break;case js.InAttributeValueNq:this.stateInAttributeValueNoQuotes(e);break;case js.InSelfClosingTag:this.stateInSelfClosingTag(e);break;case js.InDeclaration:this.stateInDeclaration(e);break;case js.BeforeDeclaration:this.stateBeforeDeclaration(e);break;case js.BeforeComment:this.stateBeforeComment(e);break;case js.InProcessingInstruction:this.stateInProcessingInstruction(e);break;case js.InNamedEntity:this.stateInNamedEntity(e);break;case js.BeforeEntity:this.stateBeforeEntity(e);break;case js.InHexEntity:this.stateInHexEntity(e);break;case js.InNumericEntity:this.stateInNumericEntity(e);break;default:this.stateBeforeNumericEntity(e)}this.index++}this.cleanup()}finish(){this.state===js.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){var e=this.buffer.length+this.offset;this.state===js.InCommentLike?this.currentSequence===Ws.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===js.InNumericEntity&&this.allowLegacyEntity()||this.state===js.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state!==js.InTagName&&this.state!==js.BeforeAttributeName&&this.state!==js.BeforeAttributeValue&&this.state!==js.AfterAttributeName&&this.state!==js.InAttributeName&&this.state!==js.InAttributeValueSq&&this.state!==js.InAttributeValueDq&&this.state!==js.InAttributeValueNq&&this.state!==js.InClosingTagName&&this.cbs.ontext(this.sectionStart,e)}emitPartial(e,t){this.baseState!==js.Text&&this.baseState!==js.InSpecialTag?this.cbs.onattribdata(e,t):this.cbs.ontext(e,t)}emitCodePoint(e){this.baseState!==js.Text&&this.baseState!==js.InSpecialTag?this.cbs.onattribentity(e):this.cbs.ontextentity(e)}}const Qs=new Set(["input","option","optgroup","select","button","datalist","textarea"]),Js=new Set(["p"]),Zs=new Set(["thead","tbody"]),ea=new Set(["dd","dt"]),ta=new Set(["rt","rp"]),na=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",Js],["h1",Js],["h2",Js],["h3",Js],["h4",Js],["h5",Js],["h6",Js],["select",Qs],["input",Qs],["output",Qs],["button",Qs],["datalist",Qs],["textarea",Qs],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",ea],["dt",ea],["address",Js],["article",Js],["aside",Js],["blockquote",Js],["details",Js],["div",Js],["dl",Js],["fieldset",Js],["figcaption",Js],["figure",Js],["footer",Js],["form",Js],["header",Js],["hr",Js],["main",Js],["nav",Js],["ol",Js],["pre",Js],["section",Js],["table",Js],["ul",Js],["rt",ta],["rp",ta],["tbody",Zs],["tfoot",Zs]]),ra=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),ia=new Set(["math","svg"]),sa=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),aa=/\s|\//;class oa{constructor(e,t={}){this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!=(e=t.lowerCaseTags)?e:!t.xmlMode,this.lowerCaseAttributeNames=null!=(e=t.lowerCaseAttributeNames)?e:!t.xmlMode,this.tokenizer=new(null!=(e=t.Tokenizer)?e:zs)(this.options,this),null!=(e=(t=this.cbs).onparserinit)&&e.call(t,this)}ontext(e,t){var n,r;e=this.getSlice(e,t);this.endIndex=t-1,null!=(r=(n=this.cbs).ontext)&&r.call(n,e),this.startIndex=t}ontextentity(e){var t,n,r=this.tokenizer.getSectionStart();this.endIndex=r-1,null!=(n=(t=this.cbs).ontext)&&n.call(t,vr(e)),this.startIndex=r}isVoidElement(e){return!this.options.xmlMode&&ra.has(e)}onopentagname(e,t){this.endIndex=t;let n=this.getSlice(e,t);this.lowerCaseTagNames&&(n=n.toLowerCase()),this.emitOpenTag(n)}emitOpenTag(e){this.openTagStart=this.startIndex,this.tagname=e;var t,n,r,i,s=!this.options.xmlMode&&na.get(e);if(s)for(;0<this.stack.length&&s.has(this.stack[this.stack.length-1]);){const e=this.stack.pop();null!=(n=(t=this.cbs).onclosetag)&&n.call(t,e,!0)}this.isVoidElement(e)||(this.stack.push(e),ia.has(e)?this.foreignContext.push(!0):sa.has(e)&&this.foreignContext.push(!1)),null!=(i=(r=this.cbs).onopentagname)&&i.call(r,e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){var t,n;this.startIndex=this.openTagStart,this.attribs&&(null!=(n=(t=this.cbs).onopentag)&&n.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,t){var n;this.endIndex=t;let r=this.getSlice(e,t);if(this.lowerCaseTagNames&&(r=r.toLowerCase()),(ia.has(r)||sa.has(r))&&this.foreignContext.pop(),this.isVoidElement(r))this.options.xmlMode||"br"!==r||(null!=(n=(e=this.cbs).onopentagname)&&n.call(e,"br"),null!=(e=(n=this.cbs).onopentag)&&e.call(n,"br",{},!0),null==(n=(e=this.cbs).onclosetag))||n.call(e,"br",!1);else{const e=this.stack.lastIndexOf(r);if(-1!==e)if(this.cbs.onclosetag){let t=this.stack.length-e;for(;t--;)this.cbs.onclosetag(this.stack.pop(),0!==t)}else this.stack.length=e;else this.options.xmlMode||"p"!==r||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1}onselfclosingtag(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)}closeCurrentTag(e){var t,n,r=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===r&&(null!=(n=(t=this.cbs).onclosetag)&&n.call(t,r,!e),this.stack.pop())}onattribname(e,t){this.startIndex=e,e=this.getSlice(e,t),this.attribname=this.lowerCaseAttributeNames?e.toLowerCase():e}onattribdata(e,t){this.attribvalue+=this.getSlice(e,t)}onattribentity(e){this.attribvalue+=vr(e)}onattribend(e,t){var n;this.endIndex=t,null!=(n=(t=this.cbs).onattribute)&&n.call(t,this.attribname,this.attribvalue,e===Ys.Double?'"':e===Ys.Single?"'":e===Ys.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(e){var t=e.search(aa);let n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames?n.toLowerCase():n}ondeclaration(e,t){this.endIndex=t;var n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){const e=this.getInstructionName(n);this.cbs.onprocessinginstruction("!"+e,"!"+n)}this.startIndex=t+1}onprocessinginstruction(e,t){this.endIndex=t;var n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){const e=this.getInstructionName(n);this.cbs.onprocessinginstruction("?"+e,"?"+n)}this.startIndex=t+1}oncomment(e,t,n){var r,i;this.endIndex=t,null!=(r=(i=this.cbs).oncomment)&&r.call(i,this.getSlice(e,t-n)),null!=(i=(r=this.cbs).oncommentend)&&i.call(r),this.startIndex=t+1}oncdata(e,t,n){this.endIndex=t;var r;e=this.getSlice(e,t-n);this.options.xmlMode||this.options.recognizeCDATA?(null!=(r=(n=this.cbs).oncdatastart)&&r.call(n),null!=(n=(r=this.cbs).ontext)&&n.call(r,e),null!=(r=(n=this.cbs).oncdataend)&&r.call(n)):(null!=(n=(r=this.cbs).oncomment)&&n.call(r,`[CDATA[${e}]]`),null!=(r=(n=this.cbs).oncommentend)&&r.call(n)),this.startIndex=t+1}onend(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let e=this.stack.length;0<e;this.cbs.onclosetag(this.stack[--e],!0));}null!=(t=(e=this.cbs).onend)&&t.call(e)}reset(){var e,t;null!=(e=(t=this.cbs).onreset)&&e.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null!=(t=(e=this.cbs).onparserinit)&&t.call(e,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(e){this.reset(),this.end(e)}getSlice(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let n=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);for(;t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,t-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){var t,n;this.ended?null!=(n=(t=this.cbs).onerror)&&n.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))}end(e){var t,n;this.ended?null!=(n=(t=this.cbs).onerror)&&n.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(e){this.write(e)}done(e){this.end(e)}}var ca,la="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function ua(e){if(Object.keys)return Object.keys(e);var t,n=[];for(t in e)n.push(t);return n}function ha(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)}function fa(){try{return Object.defineProperty({},"_",{}),function(e,t,n){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:n})}}catch(e){return function(e,t,n){e[t]=n}}}var pa=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function da(){}function ma(e){if(!(this instanceof ma))return new ma(e);this.code=e}function Ea(e){var t;return function(e){return e instanceof da}(e)?e:(t=new da,"object"==typeof e&&ha(ua(e),(function(n){t[n]=e[n]})),t)}da.prototype={},ma.prototype.runInContext=function(e){var t,n,r,i,s;if(e instanceof da)return la.document?((t=la.document.createElement("iframe")).style||(t.style={}),t.style.display="none",la.document.body.appendChild(t),r=(n=t.contentWindow).eval,s=n.execScript,!r&&s&&(s.call(n,"null"),r=n.eval),ha(ua(e),(function(t){n[t]=e[t]})),ha(pa,(function(t){e[t]&&(n[t]=e[t])})),i=ua(n),s=r.call(n,this.code),ha(ua(n),(function(t){(t in e||-1===function(e,t){if(Ta)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}(i,t))&&(e[t]=n[t])})),ha(pa,(function(t){var r;t in e||(r=n[t],(ca="function"!=typeof ca?fa:ca)(e,t,r))})),la.document.body.removeChild(t),s):function(e,t){var n=ua(la);return n.push("with (this.__ctx__){return eval(this.__code__)}"),Function.apply(null,n).apply({__code__:e,__ctx__:t})}(this.code,e);throw new TypeError("needs a 'context' argument.")},ma.prototype.runInThisContext=function(){return new Function("code","return eval(code);").call(la,this.code)},ma.prototype.runInNewContext=function(e){var t=Ea(e),n=this.runInContext(t);return e&&ha(ua(t),(function(n){e[n]=t[n]})),n};var Ta=[].indexOf,_a=fr((function(e){var t=Array.prototype,n=Object.prototype,r={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;"},i=/[&"'<>]/g,s=e.exports={};function a(e,t){return n.hasOwnProperty.call(e,t)}function o(e){return r[e]}function c(e,t,n){var r,i,s,a,o;return e instanceof Error&&(e=(i=e).name+": "+i.message),Object.setPrototypeOf?(r=new Error(e),Object.setPrototypeOf(r,c.prototype)):(r=this,Object.defineProperty(r,"message",{enumerable:!1,writable:!0,value:e})),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),a=i?(s=Object.getOwnPropertyDescriptor(i,"stack"))&&(s.get||function(){return s.value})||function(){return i.stack}:(o=new Error(e).stack,function(){return o}),Object.defineProperty(r,"stack",{get:function(){return a.call(r)}}),Object.defineProperty(r,"cause",{value:i}),r.lineno=t,r.colno=n,r.firstUpdate=!0,r.Update=function(e){return e="("+(e||"unknown path")+")",this.firstUpdate&&(this.lineno&&this.colno?e+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(e+=" [Line "+this.lineno+"]")),e+="\n ",this.firstUpdate&&(e+=" "),this.message=e+(this.message||""),this.firstUpdate=!1,this},r}function l(e){return"[object Function]"===n.toString.call(e)}function u(e){return"[object Array]"===n.toString.call(e)}function h(e){return"[object String]"===n.toString.call(e)}function f(e){return"[object Object]"===n.toString.call(e)}function p(e){var t=function(e){return e?"string"==typeof e?e.split("."):[e]:[]}(e);return function(e){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(!a(n,i))return;n=n[i]}return n}}function d(e){return Array.prototype.slice.call(e)}function m(e,t,n){return Array.prototype.indexOf.call(e||[],t,n)}function E(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n}s.hasOwnProp=a,s._prettifyError=function(e,t,n){return(n=n.Update?n:new s.TemplateError(n)).Update(e),t||(e=n,(n=new Error(e.message)).name=e.name),n},Object.setPrototypeOf?Object.setPrototypeOf(c.prototype,Error.prototype):c.prototype=Object.create(Error.prototype,{constructor:{value:c}}),s.TemplateError=c,s.escape=function(e){return e.replace(i,o)},s.isFunction=l,s.isArray=u,s.isString=h,s.isObject=f,s.getAttrGetter=p,s.groupBy=function(e,t,n){for(var r={},i=l(t)?t:p(t),s=0;s<e.length;s++){var a=e[s],o=i(a,s);if(void 0===o&&!0===n)throw new TypeError('groupby: attribute "'+t+'" resolved to undefined');(r[o]||(r[o]=[])).push(a)}return r},s.toArray=d,s.without=function(e){var t=[];if(e)for(var n=e.length,r=d(arguments).slice(1),i=-1;++i<n;)-1===m(r,e[i])&&t.push(e[i]);return t},s.repeat=function(e,t){for(var n="",r=0;r<t;r++)n+=e;return n},s.each=function(e,n,r){if(null!=e)if(t.forEach&&e.forEach===t.forEach)e.forEach(n,r);else if(e.length===+e.length)for(var i=0,s=e.length;i<s;i++)n.call(r,e[i],i,e)},s.map=function(e,n){var r=[];if(null!=e){if(t.map&&e.map===t.map)return e.map(n);for(var i=0;i<e.length;i++)r[r.length]=n(e[i],i);e.length===+e.length&&(r.length=e.length)}return r},s.asyncIter=function(e,t,n){var r=-1;!function i(){++r<e.length?t(e[r],r,i,n):n()}()},s.asyncFor=function(e,t,n){var r=E(e||{}),i=r.length,s=-1;!function a(){var o=r[++s];s<i?t(o,e[o],s,i,a):n()}()},s.indexOf=m,s.keys=E,s._entries=function(e){return E(e).map((function(t){return[t,e[t]]}))},s._values=function(e){return E(e).map((function(t){return e[t]}))},s._assign=s.extend=function(e,t){return e=e||{},E(t).forEach((function(n){e[n]=t[n]})),e},s.inOperator=function(e,t){if(u(t)||h(t))return-1!==t.indexOf(e);if(f(t))return e in t;throw new Error('Cannot use "in" operator to search for "'+e+'" in unexpected types.')}}));function ga(){throw new Error("setTimeout has not been defined")}function Aa(){throw new Error("clearTimeout has not been defined")}var ya=ga,va=Aa;function Sa(e){if(ya===setTimeout)return setTimeout(e,0);if((ya===ga||!ya)&&setTimeout)return(ya=setTimeout)(e,0);try{return ya(e,0)}catch(t){try{return ya.call(null,e,0)}catch(t){return ya.call(this,e,0)}}}"function"==typeof la.setTimeout&&(ya=setTimeout),"function"==typeof la.clearTimeout&&(va=clearTimeout);var Na,Ia=[],ba=!1,Ca=-1;function Oa(){ba&&Na&&(ba=!1,Na.length?Ia=Na.concat(Ia):Ca=-1,Ia.length)&&ka()}function ka(){if(!ba){var e=Sa(Oa);ba=!0;for(var t=Ia.length;t;){for(Na=Ia,Ia=[];++Ca<t;)Na&&Na[Ca].run();Ca=-1,t=Ia.length}Na=null,ba=!1,function(e){if(va===clearTimeout)return clearTimeout(e);if((va===Aa||!va)&&clearTimeout)return(va=clearTimeout)(e);try{va(e)}catch(t){try{return va.call(null,e)}catch(t){return va.call(this,e)}}}(e)}}function Ra(e,t){this.fun=e,this.array=t}function Da(){}Ra.prototype.run=function(){this.fun.apply(null,this.array)};var La=Da,wa=Da,Ma=Da,xa=Da,Pa=Da,Ba=Da,Fa=Da,Ua=la.performance||{},Ha=Ua.now||Ua.mozNow||Ua.msNow||Ua.oNow||Ua.webkitNow||function(){return(new Date).getTime()},Ga=new Date,Xa={nextTick:function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Ia.push(new Ra(e,t)),1!==Ia.length||ba||Sa(ka)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:La,addListener:wa,once:Ma,off:xa,removeListener:Pa,removeAllListeners:Ba,emit:Fa,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Ha.call(Ua),n=Math.floor(t);t=Math.floor(t%1*1e9);return e&&(n-=e[0],(t-=e[1])<0)&&(n--,t+=1e9),[n,t]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Ga)/1e3}};function ja(){}function Ya(){Ya.init.call(this)}function qa(e){return void 0===e._maxListeners?Ya.defaultMaxListeners:e._maxListeners}function Va(e,t,n,r){var i,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');return(i=e._events)?(i.newListener&&(e.emit("newListener",t,n.listener||n),i=e._events),s=i[t]):(i=e._events=new ja,e._eventsCount=0),s?("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),!s.warned&&(r=qa(e))&&0<r&&s.length>r&&(s.warned=!0,(r=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",r.emitter=e,r.type=t,r.count=s.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(r))):(s=i[t]=n,++e._eventsCount),e}function $a(e,t,n){var r=!1;function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}return i.listener=n,i}function Ka(e){var t=this._events;if(t){if("function"==typeof(t=t[e]))return 1;if(t)return t.length}return 0}function Wa(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}function za(){var e;Ya.call(this),this.__emitError=(e=this,function(t){e.emit("error",t)})}function Qa(){return new za}ja.prototype=Object.create(null),(Ya.EventEmitter=Ya).usingDomains=!1,Ya.prototype.domain=void 0,Ya.prototype._events=void 0,Ya.prototype._maxListeners=void 0,Ya.defaultMaxListeners=10,Ya.init=function(){this.domain=null,Ya.usingDomains&&(void 0).active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new ja,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ya.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},Ya.prototype.getMaxListeners=function(){return qa(this)},Ya.prototype.emit=function(e){var t,n,r,i,s,a="error"===e;if(s=this._events)a=a&&null==s.error;else if(!a)return!1;if(o=this.domain,a){if(a=arguments[1],o)return(a=a||new Error('Uncaught, unspecified "error" event')).domainEmitter=this,a.domain=o,a.domainThrown=!1,o.emit("error",a),!1;if(a instanceof Error)throw a;var o=new Error('Uncaught, unspecified "error" event. ('+a+")");throw o.context=a,o}if(!(t=s[e]))return!1;var c="function"==typeof t;switch(n=arguments.length){case 1:!function(e,t){if(c)e.call(t);else for(var n=e.length,r=Wa(e,n),i=0;i<n;++i)r[i].call(t)}(t,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,s=Wa(e,i),a=0;a<i;++a)s[a].call(n,r)}(t,c,this,arguments[1]);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var s=e.length,a=Wa(e,s),o=0;o<s;++o)a[o].call(n,r,i)}(t,c,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,i,s){if(t)e.call(n,r,i,s);else for(var a=e.length,o=Wa(e,a),c=0;c<a;++c)o[c].call(n,r,i,s)}(t,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(r=new Array(n-1),i=1;i<n;i++)r[i-1]=arguments[i];!function(e,t,n){if(c)e.apply(t,n);else for(var r=e.length,i=Wa(e,r),s=0;s<r;++s)i[s].apply(t,n)}(t,this,r)}return!0},Ya.prototype.addListener=function(e,t){return Va(this,e,t,!1)},Ya.prototype.on=Ya.prototype.addListener,Ya.prototype.prependListener=function(e,t){return Va(this,e,t,!0)},Ya.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,$a(this,e,t)),this},Ya.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,$a(this,e,t)),this},Ya.prototype.removeListener=function(e,t){var n,r,i,s,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if((r=this._events)&&(n=r[e]))if(n===t||n.listener&&n.listener===t)0==--this._eventsCount?this._events=new ja:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,s=n.length;0<s--;)if(n[s]===t||n[s].listener&&n[s].listener===t){a=n[s].listener,i=s;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new ja,this;delete r[e]}else!function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(n,i);r.removeListener&&this.emit("removeListener",e,a||t)}return this},Ya.prototype.removeAllListeners=function(e){var t,n;if(n=this._events)if(n.removeListener){if(0===arguments.length){for(var r,i=Object.keys(n),s=0;s<i.length;++s)"removeListener"!==(r=i[s])&&this.removeAllListeners(r);this.removeAllListeners("removeListener"),this._events=new ja,this._eventsCount=0}else if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)for(;this.removeListener(e,t[t.length-1]),t[0];);}else 0===arguments.length?(this._events=new ja,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new ja:delete n[e]);return this},Ya.prototype.listeners=function(e){var t=this._events;return(t=t&&t[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(t):[]},Ya.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Ka.call(e,t)},Ya.prototype.listenerCount=Ka,Ya.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]},("function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){function n(){}e.super_=t,n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e})(za,Ya),za.prototype.add=function(e){e.on("error",this.__emitError)},za.prototype.remove=function(e){e.removeListener("error",this.__emitError)},za.prototype.bind=function(e){var t=this.__emitError;return function(){var n=Array.prototype.slice.call(arguments);try{e.apply(null,n)}catch(e){t(e)}}},za.prototype.intercept=function(e){var t=this.__emitError;return function(n){if(n)t(n);else{var r=Array.prototype.slice.call(arguments,1);try{e.apply(null,r)}catch(n){t(n)}}}},za.prototype.run=function(e){var t=this.__emitError;try{e()}catch(e){t(e)}return this},za.prototype.dispose=function(){return this.removeAllListeners(),this},za.prototype.enter=za.prototype.exit=function(){return this};var Ja,Za={Domain:za,createDomain:Qa,create:Qa},eo="function"==typeof setImmediate,to=no;function no(e){ro.length||(co(),io=!0),ro[ro.length]=e}var ro=[],io=!1,so=0,ao=1024;function oo(){for(;so<ro.length;){var e=so;if(so+=1,ro[e].call(),ao<so){for(var t=0,n=ro.length-so;t<n;t++)ro[t]=ro[t+so];ro.length-=so,so=0}}ro.length=0,so=0,io=!1}function co(){var e=Xa.domain;e&&((Ja=Ja||Za).active=Xa.domain=null),io&&eo?setImmediate(oo):Xa.nextTick(oo),e&&(Ja.active=Xa.domain=e)}no.requestFlush=co;var lo=[];function uo(){this.task=null,this.domain=null}uo.prototype.call=function(){this.domain&&this.domain.enter();var e=!0;try{this.task.call(),e=!1,this.domain&&this.domain.exit()}finally{e&&to.requestFlush(),this.task=null,this.domain=null,lo.push(this)}};var ho=fr((function(e){function t(){var e=Array.prototype.slice.call(arguments);"function"==typeof e[0]&&e[0].apply(null,e.splice(1))}function n(e){"function"==typeof setImmediate?setImmediate(e):void 0!==Xa&&Xa.nextTick?Xa.nextTick(e):setTimeout(e,0)}function r(e,r,i){var a,o=i?n:t;return r=r||function(){},s(e)?e.length?void(a=function(e){return function(t){var n,i;t?(r.apply(null,arguments),r=function(){}):(n=Array.prototype.slice.call(arguments,1),(i=e.next())?n.push(a(i)):n.push(r),o((function(){e.apply(null,n)})))}})(function(e){var t=function(n){function r(){return e.length&&e[n].apply(null,arguments),r.next()}return r.next=function(){return n<e.length-1?t(n+1):null},r};return t(0)}(e))():r():(i=new Error("First argument to waterfall must be an array of functions"),r(i))}var i=lr,s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};e.exports?e.exports=r:i.waterfall=r})),fo=" \n\t\r ",po="()[]{}%*-+~/#,:|.<>=!",mo="string",Eo="whitespace",To="data",_o="block-start",go="block-end",Ao="variable-start",yo="variable-end",vo="comment",So="left-paren",No="right-paren",Io="left-bracket",bo="right-bracket",Co="left-curly",Oo="right-curly",ko="operator",Ro="comma",Do="colon",Lo="tilde",wo="pipe",Mo="float",xo="boolean",Po="none",Bo="symbol",Fo="regex";function Uo(e,t,n,r){return{type:e,value:t,lineno:n,colno:r}}var Ho=function(){function e(e,t){this.str=e,this.index=0,this.len=e.length,this.lineno=0,this.colno=0,this.in_code=!1,e=(t=t||{}).tags||{},this.tags={BLOCK_START:e.blockStart||"{%",BLOCK_END:e.blockEnd||"%}",VARIABLE_START:e.variableStart||"{{",VARIABLE_END:e.variableEnd||"}}",COMMENT_START:e.commentStart||"{#",COMMENT_END:e.commentEnd||"#}"},this.trimBlocks=!!t.trimBlocks,this.lstripBlocks=!!t.lstripBlocks}var t=e.prototype;return t.nextToken=function(){var e=this.lineno,t=this.colno;if(this.in_code){var n=this.current();if(this.isFinished())return null;if('"'===n||"'"===n)return Uo(mo,this._parseString(n),e,t);if(h=this._extract(fo))return Uo(Eo,h,e,t);if(h=(h=this._extractString(this.tags.BLOCK_END))||this._extractString("-"+this.tags.BLOCK_END))return this.in_code=!1,this.trimBlocks&&("\n"===(n=this.current())?this.forward():"\r"===n&&(this.forward(),"\n"===(n=this.current())?this.forward():this.back())),Uo(go,h,e,t);if(h=(h=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,Uo(yo,h,e,t);if("r"===n&&"/"===this.str.charAt(this.index+1)){this.forwardN(2);for(var r="";!this.isFinished();){if("/"===this.current()&&"\\"!==this.previous()){this.forward();break}r+=this.current(),this.forward()}for(var i=["g","i","m","y"],s="";!this.isFinished()&&-1!==i.indexOf(this.current());)s+=this.current(),this.forward();return Uo(Fo,{body:r,flags:s},e,t)}if(-1!==po.indexOf(n)){this.forward();var a,o=["==","===","!=","!==","<=",">=","//","**"],c=n+this.current();switch(-1!==_a.indexOf(o,c)&&(this.forward(),-1!==_a.indexOf(o,(n=c)+this.current()))&&(n=c+this.current(),this.forward()),n){case"(":a=So;break;case")":a=No;break;case"[":a=Io;break;case"]":a=bo;break;case"{":a=Co;break;case"}":a=Oo;break;case",":a=Ro;break;case":":a=Do;break;case"~":a=Lo;break;case"|":a=wo;break;default:a=ko}return Uo(a,n,e,t)}if((h=this._extractUntil(fo+po)).match(/^[-+]?[0-9]+$/))return"."===this.current()?(this.forward(),o=this._extract("0123456789"),Uo(Mo,h+"."+o,e,t)):Uo("int",h,e,t);if(h.match(/^(true|false)$/))return Uo(xo,h,e,t);if("none"===h)return Uo(Po,h,e,t);if("null"===h)return Uo(Po,h,e,t);if(h)return Uo(Bo,h,e,t);throw new Error("Unexpected value while parsing: "+h)}var l,u=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if(h=(h=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,Uo(_o,h,e,t);if(h=(h=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,Uo(Ao,h,e,t);var h="",f=!1;for(this._matches(this.tags.COMMENT_START)&&(f=!0,h=this._extractString(this.tags.COMMENT_START));null!==(l=this._extractUntil(u));){if(h+=l,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!f){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=h.length){var p=h.slice(-this.colno);if(/^\s+$/.test(p)&&!(h=h.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!f)throw new Error("unexpected end of comment");h+=this._extractString(this.tags.COMMENT_END);break}h+=this.current(),this.forward()}if(null===l&&f)throw new Error("expected end of comment, got end of file");return Uo(f?vo:To,h,e,t)},t._parseString=function(e){this.forward();for(var t="";!this.isFinished()&&this.current()!==e;){var n=this.current();if("\\"===n)switch(this.forward(),this.current()){case"n":t+="\n";break;case"t":t+="\t";break;case"r":t+="\r";break;default:t+=this.current()}else t+=n;this.forward()}return this.forward(),t},t._matches=function(e){return this.index+e.length>this.len?null:this.str.slice(this.index,this.index+e.length)===e},t._extractString=function(e){return this._matches(e)?(this.forwardN(e.length),e):null},t._extractUntil=function(e){return this._extractMatching(!0,e||"")},t._extract=function(e){return this._extractMatching(!1,e)},t._extractMatching=function(e,t){if(this.isFinished())return null;var n=t.indexOf(this.current());if(e&&-1===n||!e&&-1!==n){var r=this.current();this.forward();for(var i=t.indexOf(this.current());(e&&-1===i||!e&&-1!==i)&&!this.isFinished();)r+=this.current(),this.forward(),i=t.indexOf(this.current());return r}return""},t._extractRegex=function(e){return(e=this.currentStr().match(e))?(this.forwardN(e[0].length),e):null},t.isFinished=function(){return this.index>=this.len},t.forwardN=function(e){for(var t=0;t<e;t++)this.forward()},t.forward=function(){this.index++,"\n"===this.previous()?(this.lineno++,this.colno=0):this.colno++},t.backN=function(e){for(var t=0;t<e;t++)this.back()},t.back=function(){var e;this.index--,"\n"===this.current()?(this.lineno--,e=this.src.lastIndexOf("\n",this.index-1),this.colno=-1===e?this.index:this.index-e):this.colno--},t.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},t.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},t.previous=function(){return this.str.charAt(this.index-1)},e}(),Go={lex:function(e,t){return new Ho(e,t)},TOKEN_STRING:mo,TOKEN_WHITESPACE:Eo,TOKEN_DATA:To,TOKEN_BLOCK_START:_o,TOKEN_BLOCK_END:go,TOKEN_VARIABLE_START:Ao,TOKEN_VARIABLE_END:yo,TOKEN_COMMENT:vo,TOKEN_LEFT_PAREN:So,TOKEN_RIGHT_PAREN:No,TOKEN_LEFT_BRACKET:Io,TOKEN_RIGHT_BRACKET:bo,TOKEN_LEFT_CURLY:Co,TOKEN_RIGHT_CURLY:Oo,TOKEN_OPERATOR:ko,TOKEN_COMMA:Ro,TOKEN_COLON:Do,TOKEN_TILDE:Lo,TOKEN_PIPE:wo,TOKEN_INT:"int",TOKEN_FLOAT:Mo,TOKEN_BOOLEAN:xo,TOKEN_NONE:Po,TOKEN_SYMBOL:Bo,TOKEN_SPECIAL:"special",TOKEN_REGEX:Fo};function Xo(e,t,n){return t&&function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,"symbol"==typeof(n=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!=typeof(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))?n:String(n),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jo(e,t){e.prototype=Object.create(t.prototype),Yo(e.prototype.constructor=e,t)}function Yo(e,t){return(Yo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function qo(e,t,n){n=n||{},_a.keys(n).forEach((function(t){n[t]=function(e,t){return"function"!=typeof e||"function"!=typeof t?t:function(){var n=this.parent,r=(this.parent=e,t.apply(this,arguments));return this.parent=n,r}}(e.prototype[t],n[t])}));var r=function(e){function n(){return e.apply(this,arguments)||this}return jo(n,e),Xo(n,[{key:"typename",get:function(){return t}}]),n}(e);return _a._assign(r.prototype,n),r}var Vo=function(){function e(){this.init.apply(this,arguments)}return e.prototype.init=function(){},e.extend=function(e,t){return"object"==typeof e&&(t=e,e="anonymous"),qo(this,e,t)},Xo(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(),$o=function(e){function t(){var t;return(t=e.call(this)||this).init.apply(t,arguments),t}return jo(t,e),t.prototype.init=function(){},t.extend=function(e,t){return"object"==typeof e&&(t=e,e="anonymous"),qo(this,e,t)},Xo(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(Ya),Ko={Obj:Vo,EmitterObj:$o};function Wo(e,t,n){return t&&function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,"symbol"==typeof(n=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!=typeof(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))?n:String(n),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zo(e,t){e.prototype=Object.create(t.prototype),Qo(e.prototype.constructor=e,t)}function Qo(e,t){return(Qo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Jo(e,t,n){e instanceof t&&n.push(e),e instanceof Zo&&e.findAll(t,n)}var Zo=function(e){function t(){return e.apply(this,arguments)||this}zo(t,e);var n=t.prototype;return n.init=function(e,t){for(var n=arguments,r=this,i=arguments.length,s=new Array(2<i?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];this.lineno=e,this.colno=t,this.fields.forEach((function(e,t){r[e]=t=void 0===(t=n[t+2])?null:t}))},n.findAll=function(e,t){var n=this;return t=t||[],this instanceof tc?this.children.forEach((function(n){return Jo(n,e,t)})):this.fields.forEach((function(r){return Jo(n[r],e,t)})),t},n.iterFields=function(e){var t=this;this.fields.forEach((function(n){e(t[n],n)}))},t}(Ko.Obj),ec=function(e){function t(){return e.apply(this,arguments)||this}return zo(t,e),Wo(t,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),t}(Zo),tc=function(e){function t(){return e.apply(this,arguments)||this}zo(t,e);var n=t.prototype;return n.init=function(t,n,r){e.prototype.init.call(this,t,n,r||[])},n.addChild=function(e){this.children.push(e)},Wo(t,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),t}(Zo),nc=tc.extend("Root"),rc=ec.extend("Literal"),ic=ec.extend("Symbol"),sc=tc.extend("Group"),ac=tc.extend("Array"),oc=Zo.extend("Pair",{fields:["key","value"]}),cc=tc.extend("Dict"),lc=Zo.extend("LookupVal",{fields:["target","val"]}),uc=Zo.extend("If",{fields:["cond","body","else_"]}),hc=uc.extend("IfAsync"),fc=Zo.extend("InlineIf",{fields:["cond","body","else_"]}),pc=Zo.extend("For",{fields:["arr","name","body","else_"]}),dc=pc.extend("AsyncEach"),mc=pc.extend("AsyncAll"),Ec=Zo.extend("Macro",{fields:["name","args","body"]}),Tc=Ec.extend("Caller"),_c=Zo.extend("Import",{fields:["template","target","withContext"]}),gc=function(e){function t(){return e.apply(this,arguments)||this}return zo(t,e),t.prototype.init=function(t,n,r,i,s){e.prototype.init.call(this,t,n,r,i||new tc,s)},Wo(t,[{key:"typename",get:function(){return"FromImport"}},{key:"fields",get:function(){return["template","names","withContext"]}}]),t}(Zo),Ac=Zo.extend("FunCall",{fields:["name","args"]}),yc=Ac.extend("Filter"),vc=yc.extend("FilterAsync",{fields:["name","args","symbol"]}),Sc=cc.extend("KeywordArgs"),Nc=Zo.extend("Block",{fields:["name","body"]}),Ic=Zo.extend("Super",{fields:["blockName","symbol"]}),bc=Zo.extend("TemplateRef",{fields:["template"]}).extend("Extends"),Cc=Zo.extend("Include",{fields:["template","ignoreMissing"]}),Oc=Zo.extend("Set",{fields:["targets","value"]}),kc=Zo.extend("Switch",{fields:["expr","cases","default"]}),Rc=Zo.extend("Case",{fields:["cond","body"]}),Dc=tc.extend("Output"),Lc=Zo.extend("Capture",{fields:["body"]}),wc=rc.extend("TemplateData"),Mc=Zo.extend("UnaryOp",{fields:["target"]}),xc=Zo.extend("BinOp",{fields:["left","right"]}),Pc=xc.extend("In"),Bc=xc.extend("Is"),Fc=xc.extend("Or"),Uc=xc.extend("And"),Hc=Mc.extend("Not"),Gc=xc.extend("Add"),Xc=xc.extend("Concat"),jc=xc.extend("Sub"),Yc=xc.extend("Mul"),qc=xc.extend("Div"),Vc=xc.extend("FloorDiv"),$c=xc.extend("Mod"),Kc=xc.extend("Pow"),Wc=Mc.extend("Neg"),zc=Mc.extend("Pos"),Qc=Zo.extend("Compare",{fields:["expr","ops"]}),Jc=Zo.extend("CompareOperand",{fields:["expr","type"]}),Zc=Zo.extend("CallExtension",{init:function(e,t,n,r){this.parent(),this.extName=e.__name||e,this.prop=t,this.args=n||new tc,this.contentArgs=r||[],this.autoescape=e.autoescape},fields:["extName","prop","args","contentArgs"]}),el=Zc.extend("CallExtensionAsync");function tl(e,t,n){var r=e.split("\n");r.forEach((function(e,i){e&&(n&&0<i||!n)&&process.stdout.write(" ".repeat(t)),i=i===r.length-1?"":"\n",process.stdout.write(e+i)}))}var nl={Node:Zo,Root:nc,NodeList:tc,Value:ec,Literal:rc,Symbol:ic,Group:sc,Array:ac,Pair:oc,Dict:cc,Output:Dc,Capture:Lc,TemplateData:wc,If:uc,IfAsync:hc,InlineIf:fc,For:pc,AsyncEach:dc,AsyncAll:mc,Macro:Ec,Caller:Tc,Import:_c,FromImport:gc,FunCall:Ac,Filter:yc,FilterAsync:vc,KeywordArgs:Sc,Block:Nc,Super:Ic,Extends:bc,Include:Cc,Set:Oc,Switch:kc,Case:Rc,LookupVal:lc,BinOp:xc,In:Pc,Is:Bc,Or:Fc,And:Uc,Not:Hc,Add:Gc,Concat:Xc,Sub:jc,Mul:Yc,Div:qc,FloorDiv:Vc,Mod:$c,Pow:Kc,Neg:Wc,Pos:zc,Compare:Qc,CompareOperand:Jc,CallExtension:Zc,CallExtensionAsync:el,printNodes:function e(t,n){var r,i;n=n||0,tl(t.typename+": ",n),t instanceof tc?(tl("\n"),t.children.forEach((function(t){e(t,n+2)}))):t instanceof Zc?(tl(t.extName+"."+t.prop+"\n"),t.args&&e(t.args,n+2),t.contentArgs&&t.contentArgs.forEach((function(t){e(t,n+2)}))):(r=[],i=null,t.iterFields((function(e,t){e instanceof Zo?r.push([t,e]):(i=i||{})[t]=e})),i?tl(JSON.stringify(i,null,2)+"\n",null,!0):tl("\n"),r.forEach((function(t){var r=t[0];t=t[1];tl("["+r+"] =>",n+2),e(t,n+4)})))}};function rl(e,t){return(rl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}nl.Node,nl.Root,nl.NodeList,nl.Value,nl.Literal,nl.Group,nl.Pair,nl.Dict,nl.Output,nl.Capture,nl.TemplateData,nl.If,nl.IfAsync,nl.InlineIf,nl.For,nl.AsyncEach,nl.AsyncAll,nl.Macro,nl.Caller,nl.Import,nl.FromImport,nl.FunCall,nl.Filter,nl.FilterAsync,nl.KeywordArgs,nl.Block,nl.Super,nl.Extends,nl.Include,nl.Switch,nl.Case,nl.LookupVal,nl.BinOp,nl.In,nl.Is,nl.Or,nl.And,nl.Not,nl.Add,nl.Concat,nl.Sub,nl.Mul,nl.Div,nl.FloorDiv,nl.Mod,nl.Pow,nl.Neg,nl.Pos,nl.Compare,nl.CompareOperand,nl.CallExtension,nl.CallExtensionAsync,nl.printNodes;var il=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),rl(r.prototype.constructor=r,t);var r=n.prototype;return r.init=function(e){this.tokens=e,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},r.nextToken=function(e){var t;if(this.peeked){if(e||this.peeked.type!==Go.TOKEN_WHITESPACE)return t=this.peeked,this.peeked=null,t;this.peeked=null}if(t=this.tokens.nextToken(),!e)for(;t&&t.type===Go.TOKEN_WHITESPACE;)t=this.tokens.nextToken();return t},r.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},r.pushToken=function(e){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=e},r.error=function(e,t,n){var r;return void 0!==t&&void 0!==n||(t=(r=this.peekToken()||{}).lineno,n=r.colno),void 0!==t&&(t+=1),void 0!==n&&(n+=1),new _a.TemplateError(e,t,n)},r.fail=function(e,t,n){throw this.error(e,t,n)},r.skip=function(e){var t=this.nextToken();return!(!t||t.type!==e)||(this.pushToken(t),!1)},r.expect=function(e){var t=this.nextToken();return t.type!==e&&this.fail("expected "+e+", got "+t.type,t.lineno,t.colno),t},r.skipValue=function(e,t){var n=this.nextToken();return!(!n||n.type!==e||n.value!==t)||(this.pushToken(n),!1)},r.skipSymbol=function(e){return this.skipValue(Go.TOKEN_SYMBOL,e)},r.advanceAfterBlockEnd=function(e){var t;return e||((t=this.peekToken())||this.fail("unexpected end of file"),t.type!==Go.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),e=this.nextToken().value),(t=this.nextToken())&&t.type===Go.TOKEN_BLOCK_END?"-"===t.value.charAt(0)&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+e+" statement"),t},r.advanceAfterVariableEnd=function(){var e=this.nextToken();e&&e.type===Go.TOKEN_VARIABLE_END?this.dropLeadingWhitespace="-"===e.value.charAt(e.value.length-this.tokens.tags.VARIABLE_END.length-1):(this.pushToken(e),this.fail("expected variable end"))},r.parseFor=function(){var e,t,n=this.peekToken();if(this.skipSymbol("for")?(e=new nl.For(n.lineno,n.colno),t="endfor"):this.skipSymbol("asyncEach")?(e=new nl.AsyncEach(n.lineno,n.colno),t="endeach"):this.skipSymbol("asyncAll")?(e=new nl.AsyncAll(n.lineno,n.colno),t="endall"):this.fail("parseFor: expected for{Async}",n.lineno,n.colno),e.name=this.parsePrimary(),e.name instanceof nl.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Go.TOKEN_COMMA){var r=e.name;for(e.name=new nl.Array(r.lineno,r.colno),e.name.addChild(r);this.skip(Go.TOKEN_COMMA);){var i=this.parsePrimary();e.name.addChild(i)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',n.lineno,n.colno),e.arr=this.parseExpression(),this.advanceAfterBlockEnd(n.value),e.body=this.parseUntilBlocks(t,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),e.else_=this.parseUntilBlocks(t)),this.advanceAfterBlockEnd(),e},r.parseMacro=function(){var e=this.peekToken(),t=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),n=this.parseSignature();t=new nl.Macro(e.lineno,e.colno,t,n);return this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),t},r.parseCall=function(){var e=this.peekToken(),t=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new nl.NodeList),n=this.parsePrimary(),r=(this.advanceAfterBlockEnd(e.value),this.parseUntilBlocks("endcall")),i=(this.advanceAfterBlockEnd(),new nl.Symbol(e.lineno,e.colno,"caller"));t=new nl.Caller(e.lineno,e.colno,i,t,r);return(r=n.args.children)[r.length-1]instanceof nl.KeywordArgs||r.push(new nl.KeywordArgs),r[r.length-1].addChild(new nl.Pair(e.lineno,e.colno,i,t)),new nl.Output(e.lineno,e.colno,[n])},r.parseWithContext=function(){var e=this.peekToken(),t=null;return this.skipSymbol("with")?t=!0:this.skipSymbol("without")&&(t=!1),null===t||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",e.lineno,e.colno),t},r.parseImport=function(){var e=this.peekToken(),t=(this.skipSymbol("import")||this.fail("parseImport: expected import",e.lineno,e.colno),this.parseExpression()),n=(this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword',e.lineno,e.colno),this.parseExpression()),r=this.parseWithContext();t=new nl.Import(e.lineno,e.colno,t,n,r);return this.advanceAfterBlockEnd(e.value),t},r.parseFrom=function(){var e=this.peekToken(),t=(this.skipSymbol("from")||this.fail("parseFrom: expected from"),this.parseExpression());this.skipSymbol("import")||this.fail("parseFrom: expected import",e.lineno,e.colno);for(var n,r=new nl.NodeList;;){var i,s=this.peekToken();if(s.type===Go.TOKEN_BLOCK_END){r.children.length||this.fail("parseFrom: Expected at least one import name",e.lineno,e.colno),"-"===s.value.charAt(0)&&(this.dropLeadingWhitespace=!0),this.nextToken();break}0<r.children.length&&!this.skip(Go.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",e.lineno,e.colno),"_"===(s=this.parsePrimary()).value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",s.lineno,s.colno),this.skipSymbol("as")?(i=this.parsePrimary(),r.addChild(new nl.Pair(s.lineno,s.colno,s,i))):r.addChild(s),n=this.parseWithContext()}return new nl.FromImport(e.lineno,e.colno,t,r,n)},r.parseBlock=function(){var e=this.peekToken(),t=(this.skipSymbol("block")||this.fail("parseBlock: expected block",e.lineno,e.colno),new nl.Block(e.lineno,e.colno));return t.name=this.parsePrimary(),t.name instanceof nl.Symbol||this.fail("parseBlock: variable name expected",e.lineno,e.colno),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(t.name.value),(e=this.peekToken())||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(e.value),t},r.parseExtends=function(){var e="extends",t=this.peekToken();return this.skipSymbol(e)||this.fail("parseTemplateRef: expected "+e),(e=new nl.Extends(t.lineno,t.colno)).template=this.parseExpression(),this.advanceAfterBlockEnd(t.value),e},r.parseInclude=function(){var e="include",t=this.peekToken();return this.skipSymbol(e)||this.fail("parseInclude: expected "+e),(e=new nl.Include(t.lineno,t.colno)).template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(e.ignoreMissing=!0),this.advanceAfterBlockEnd(t.value),e},r.parseIf=function(){var e,t=this.peekToken();switch(this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?e=new nl.If(t.lineno,t.colno):this.skipSymbol("ifAsync")?e=new nl.IfAsync(t.lineno,t.colno):this.fail("parseIf: expected if, elif, or elseif",t.lineno,t.colno),e.cond=this.parseExpression(),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("elif","elseif","else","endif"),(t=this.peekToken())&&t.value){case"elseif":case"elif":e.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),e.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":e.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return e},r.parseSet=function(){var e=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",e.lineno,e.colno);for(var t,n=new nl.Set(e.lineno,e.colno,[]);(t=this.parsePrimary())&&(n.targets.push(t),this.skip(Go.TOKEN_COMMA)););return this.skipValue(Go.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(e.value)):this.skip(Go.TOKEN_BLOCK_END)?(n.body=new nl.Capture(e.lineno,e.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",e.lineno,e.colno),n},r.parseSwitch=function(){var e="switch",t="endswitch",n="case",r="default",i=this.peekToken(),s=(this.skipSymbol(e)||this.skipSymbol(n)||this.skipSymbol(r)||this.fail('parseSwitch: expected "switch," "case" or "default"',i.lineno,i.colno),this.parseExpression());this.advanceAfterBlockEnd(e),this.parseUntilBlocks(n,r,t);var a,o=this.peekToken(),c=[];do{this.skipSymbol(n);var l=this.parseExpression(),u=(this.advanceAfterBlockEnd(e),this.parseUntilBlocks(n,r,t))}while(c.push(new nl.Case(o.line,o.col,l,u)),(o=this.peekToken())&&o.value===n);switch(o.value){case r:this.advanceAfterBlockEnd(),a=this.parseUntilBlocks(t),this.advanceAfterBlockEnd();break;case t:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new nl.Switch(i.lineno,i.colno,s,c,a)},r.parseStatement=function(){var e=this.peekToken();if(e.type!==Go.TOKEN_SYMBOL&&this.fail("tag name expected",e.lineno,e.colno),this.breakOnBlocks&&-1!==_a.indexOf(this.breakOnBlocks,e.value))return null;switch(e.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var t=0;t<this.extensions.length;t++){var n=this.extensions[t];if(-1!==_a.indexOf(n.tags||[],e.value))return n.parse(this,nl,Go)}this.fail("unknown block tag: "+e.value,e.lineno,e.colno)}},r.parseRaw=function(e){for(var t="end"+(e=e||"raw"),n=new RegExp("([\\s\\S]*?){%\\s*("+e+"|"+t+")\\s*(?=%})%}"),r=1,i="",s=this.advanceAfterBlockEnd();(c=this.tokens._extractRegex(n))&&0<r;){var a=c[0],o=c[1],c=c[2];c===e?r+=1:c===t&&--r,0===r?(i+=o,this.tokens.backN(a.length-o.length)):i+=a}return new nl.Output(s.lineno,s.colno,[new nl.TemplateData(s.lineno,s.colno,i)])},r.parsePostfix=function(e){for(var t,n=this.peekToken();n;){if(n.type===Go.TOKEN_LEFT_PAREN)e=new nl.FunCall(n.lineno,n.colno,e,this.parseSignature());else if(n.type===Go.TOKEN_LEFT_BRACKET)1<(t=this.parseAggregate()).children.length&&this.fail("invalid index"),e=new nl.LookupVal(n.lineno,n.colno,e,t.children[0]);else{if(n.type!==Go.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var r=this.nextToken();r.type!==Go.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),t=new nl.Literal(r.lineno,r.colno,r.value),e=new nl.LookupVal(n.lineno,n.colno,e,t)}n=this.peekToken()}return e},r.parseExpression=function(){return this.parseInlineIf()},r.parseInlineIf=function(){var e,t,n=this.parseOr();return this.skipSymbol("if")&&(e=this.parseOr(),t=n,(n=new nl.InlineIf(n.lineno,n.colno)).body=t,n.cond=e,this.skipSymbol("else")?n.else_=this.parseOr():n.else_=null),n},r.parseOr=function(){for(var e=this.parseAnd();this.skipSymbol("or");){var t=this.parseAnd();e=new nl.Or(e.lineno,e.colno,e,t)}return e},r.parseAnd=function(){for(var e=this.parseNot();this.skipSymbol("and");){var t=this.parseNot();e=new nl.And(e.lineno,e.colno,e,t)}return e},r.parseNot=function(){var e=this.peekToken();return this.skipSymbol("not")?new nl.Not(e.lineno,e.colno,this.parseNot()):this.parseIn()},r.parseIn=function(){for(var e=this.parseIs();;){var t=this.nextToken();if(!t)break;var n=t.type===Go.TOKEN_SYMBOL&&"not"===t.value;if(n||this.pushToken(t),!this.skipSymbol("in")){n&&this.pushToken(t);break}t=this.parseIs(),e=new nl.In(e.lineno,e.colno,e,t),n&&(e=new nl.Not(e.lineno,e.colno,e))}return e},r.parseIs=function(){var e,t,n=this.parseCompare();return this.skipSymbol("is")&&(e=this.skipSymbol("not"),t=this.parseCompare(),n=new nl.Is(n.lineno,n.colno,n,t),e)?new nl.Not(n.lineno,n.colno,n):n},r.parseCompare=function(){for(var e=["==","===","!=","!==","<",">","<=",">="],t=this.parseConcat(),n=[];;){var r=this.nextToken();if(!r)break;if(-1===e.indexOf(r.value)){this.pushToken(r);break}n.push(new nl.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return n.length?new nl.Compare(n[0].lineno,n[0].colno,t,n):t},r.parseConcat=function(){for(var e=this.parseAdd();this.skipValue(Go.TOKEN_TILDE,"~");){var t=this.parseAdd();e=new nl.Concat(e.lineno,e.colno,e,t)}return e},r.parseAdd=function(){for(var e=this.parseSub();this.skipValue(Go.TOKEN_OPERATOR,"+");){var t=this.parseSub();e=new nl.Add(e.lineno,e.colno,e,t)}return e},r.parseSub=function(){for(var e=this.parseMul();this.skipValue(Go.TOKEN_OPERATOR,"-");){var t=this.parseMul();e=new nl.Sub(e.lineno,e.colno,e,t)}return e},r.parseMul=function(){for(var e=this.parseDiv();this.skipValue(Go.TOKEN_OPERATOR,"*");){var t=this.parseDiv();e=new nl.Mul(e.lineno,e.colno,e,t)}return e},r.parseDiv=function(){for(var e=this.parseFloorDiv();this.skipValue(Go.TOKEN_OPERATOR,"/");){var t=this.parseFloorDiv();e=new nl.Div(e.lineno,e.colno,e,t)}return e},r.parseFloorDiv=function(){for(var e=this.parseMod();this.skipValue(Go.TOKEN_OPERATOR,"//");){var t=this.parseMod();e=new nl.FloorDiv(e.lineno,e.colno,e,t)}return e},r.parseMod=function(){for(var e=this.parsePow();this.skipValue(Go.TOKEN_OPERATOR,"%");){var t=this.parsePow();e=new nl.Mod(e.lineno,e.colno,e,t)}return e},r.parsePow=function(){for(var e=this.parseUnary();this.skipValue(Go.TOKEN_OPERATOR,"**");){var t=this.parseUnary();e=new nl.Pow(e.lineno,e.colno,e,t)}return e},r.parseUnary=function(e){var t=this.peekToken();t=this.skipValue(Go.TOKEN_OPERATOR,"-")?new nl.Neg(t.lineno,t.colno,this.parseUnary(!0)):this.skipValue(Go.TOKEN_OPERATOR,"+")?new nl.Pos(t.lineno,t.colno,this.parseUnary(!0)):this.parsePrimary();return e?t:this.parseFilter(t)},r.parsePrimary=function(e){var t,n=this.nextToken();if(n?n.type===Go.TOKEN_STRING?t=n.value:n.type===Go.TOKEN_INT?t=parseInt(n.value,10):n.type===Go.TOKEN_FLOAT?t=parseFloat(n.value):n.type===Go.TOKEN_BOOLEAN?"true"===n.value?t=!0:"false"===n.value?t=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===Go.TOKEN_NONE?t=null:n.type===Go.TOKEN_REGEX&&(t=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),t=void 0!==t?new nl.Literal(n.lineno,n.colno,t):n.type===Go.TOKEN_SYMBOL?new nl.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),this.parseAggregate()),t=e?t:this.parsePostfix(t))return t;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},r.parseFilterName=function(){for(var e=this.expect(Go.TOKEN_SYMBOL),t=e.value;this.skipValue(Go.TOKEN_OPERATOR,".");)t+="."+this.expect(Go.TOKEN_SYMBOL).value;return new nl.Symbol(e.lineno,e.colno,t)},r.parseFilterArgs=function(e){return this.peekToken().type===Go.TOKEN_LEFT_PAREN?this.parsePostfix(e).args.children:[]},r.parseFilter=function(e){for(;this.skip(Go.TOKEN_PIPE);){var t=this.parseFilterName();e=new nl.Filter(t.lineno,t.colno,t,new nl.NodeList(t.lineno,t.colno,[e].concat(this.parseFilterArgs(e))))}return e},r.parseFilterStatement=function(){var e=this.peekToken(),t=(this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter"),this.parseFilterName()),n=this.parseFilterArgs(t);this.advanceAfterBlockEnd(e.value),e=new nl.Capture(t.lineno,t.colno,this.parseUntilBlocks("endfilter")),this.advanceAfterBlockEnd(),e=new nl.Filter(t.lineno,t.colno,t,new nl.NodeList(t.lineno,t.colno,[e].concat(n)));return new nl.Output(t.lineno,t.colno,[e])},r.parseAggregate=function(){var e,t=this.nextToken();switch(t.type){case Go.TOKEN_LEFT_PAREN:e=new nl.Group(t.lineno,t.colno);break;case Go.TOKEN_LEFT_BRACKET:e=new nl.Array(t.lineno,t.colno);break;case Go.TOKEN_LEFT_CURLY:e=new nl.Dict(t.lineno,t.colno);break;default:return null}for(;;){var n,r=this.peekToken().type;if(r===Go.TOKEN_RIGHT_PAREN||r===Go.TOKEN_RIGHT_BRACKET||r===Go.TOKEN_RIGHT_CURLY){this.nextToken();break}0<e.children.length&&(this.skip(Go.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",t.lineno,t.colno)),e instanceof nl.Dict?(r=this.parsePrimary(),this.skip(Go.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",t.lineno,t.colno),n=this.parseExpression(),e.addChild(new nl.Pair(r.lineno,r.colno,r,n))):(r=this.parseExpression(),e.addChild(r))}return e},r.parseSignature=function(e,t){var n=this.peekToken();if(!t&&n.type!==Go.TOKEN_LEFT_PAREN){if(e)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===Go.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var r,i=new nl.NodeList(n.lineno,n.colno),s=new nl.KeywordArgs(n.lineno,n.colno),a=!1;;){if(n=this.peekToken(),!t&&n.type===Go.TOKEN_RIGHT_PAREN){this.nextToken();break}if(t&&n.type===Go.TOKEN_BLOCK_END)break;a&&!this.skip(Go.TOKEN_COMMA)?this.fail("parseSignature: expected comma after expression",n.lineno,n.colno):(r=this.parseExpression(),this.skipValue(Go.TOKEN_OPERATOR,"=")?s.addChild(new nl.Pair(r.lineno,r.colno,r,this.parseExpression())):i.addChild(r)),a=!0}return s.children.length&&i.addChild(s),i},r.parseUntilBlocks=function(){for(var e=this.breakOnBlocks,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this.breakOnBlocks=n;var i=this.parse();return this.breakOnBlocks=e,i},r.parseNodes=function(){for(var e,t=[];e=this.nextToken();)if(e.type===Go.TOKEN_DATA){var n=e.value,r=this.peekToken(),i=r&&r.value;this.dropLeadingWhitespace&&(n=n.replace(/^\s*/,""),this.dropLeadingWhitespace=!1),r&&(r.type===Go.TOKEN_BLOCK_START&&"-"===i.charAt(i.length-1)||r.type===Go.TOKEN_VARIABLE_START&&"-"===i.charAt(this.tokens.tags.VARIABLE_START.length)||r.type===Go.TOKEN_COMMENT&&"-"===i.charAt(this.tokens.tags.COMMENT_START.length))&&(n=n.replace(/\s*$/,"")),t.push(new nl.Output(e.lineno,e.colno,[new nl.TemplateData(e.lineno,e.colno,n)]))}else if(e.type===Go.TOKEN_BLOCK_START){if(this.dropLeadingWhitespace=!1,!(r=this.parseStatement()))break;t.push(r)}else e.type===Go.TOKEN_VARIABLE_START?(i=this.parseExpression(),this.dropLeadingWhitespace=!1,this.advanceAfterVariableEnd(),t.push(new nl.Output(e.lineno,e.colno,[i]))):e.type===Go.TOKEN_COMMENT?this.dropLeadingWhitespace="-"===e.value.charAt(e.value.length-this.tokens.tags.COMMENT_END.length-1):this.fail("Unexpected token at top-level: "+e.type,e.lineno,e.colno);return t},r.parse=function(){return new nl.NodeList(0,0,this.parseNodes())},r.parseAsRoot=function(){return new nl.Root(0,0,this.parseNodes())},n}(Ko.Obj),sl=function(e,t,n){return e=new il(Go.lex(e,n)),void 0!==t&&(e.extensions=t),e.parseAsRoot()},al=0;function ol(){return"hole_"+al++}function cl(e,t){for(var n=null,r=0;r<e.length;r++){var i=t(e[r]);i!==e[r]&&((n=n||e.slice())[r]=i)}return n||e}function ll(e,t,n){if(!(e instanceof nl.Node))return e;if(!n){var r=t(e);if(r&&r!==e)return r}var i;return e instanceof nl.NodeList?(r=cl(e.children,(function(e){return ll(e,t,n)})))!==e.children&&(e=new nl[e.typename](e.lineno,e.colno,r)):e instanceof nl.CallExtension?(r=ll(e.args,t,n),i=cl(e.contentArgs,(function(e){return ll(e,t,n)})),r===e.args&&i===e.contentArgs||(e=new nl[e.typename](e.extName,e.prop,r,i))):(i=cl(r=e.fields.map((function(t){return e[t]})),(function(e){return ll(e,t,n)})))!==r&&(e=new nl[e.typename](e.lineno,e.colno),i.forEach((function(t,n){e[e.fields[n]]=t}))),n&&t(e)||e}function ul(e,t){return ll(e,t,!0)}function hl(e,t,n){var r=[],i=ul(n?e[n]:e,(function(e){var n;return e instanceof nl.Block?e:((e instanceof nl.Filter&&-1!==_a.indexOf(t,e.name.value)||e instanceof nl.CallExtensionAsync)&&(n=new nl.Symbol(e.lineno,e.colno,ol()),r.push(new nl.FilterAsync(e.lineno,e.colno,e.name,e.args,n))),n)}));return n?e[n]=i:e=i,r.length?(r.push(e),new nl.NodeList(e.lineno,e.colno,r)):e}var fl=function(e,t){return function(e,t){return function(e){return ul(e,(function(e){if(e instanceof nl.If||e instanceof nl.For){var t=!1;if(ll(e,(function(e){if(e instanceof nl.FilterAsync||e instanceof nl.IfAsync||e instanceof nl.AsyncEach||e instanceof nl.AsyncAll||e instanceof nl.CallExtensionAsync)return t=!0,e})),t)return e instanceof nl.If?new nl.IfAsync(e.lineno,e.colno,e.cond,e.body,e.else_):e instanceof nl.For&&!(e instanceof nl.AsyncAll)?new nl.AsyncEach(e.lineno,e.colno,e.arr,e.name,e.body,e.else_):void 0}}))}(function(e){return ll(e,(function(e){var t,n;e instanceof nl.Block&&(t=!1,n=ol(),e.body=ll(e.body,(function(e){if(e instanceof nl.FunCall&&"super"===e.name.value)return t=!0,new nl.Symbol(e.lineno,e.colno,n)})),t)&&e.body.children.unshift(new nl.Super(0,0,e.name,new nl.Symbol(0,0,n)))}))}(function(e,t){return ul(e,(function(e){return e instanceof nl.Output?hl(e,t):e instanceof nl.Set?hl(e,t,"value"):e instanceof nl.For?hl(e,t,"arr"):e instanceof nl.If?hl(e,t,"cond"):e instanceof nl.CallExtension?hl(e,t,"args"):void 0}))}(e,t)))}(e,t||[])},pl=Array.from,dl="function"==typeof Symbol&&Symbol.iterator&&"function"==typeof pl,ml=function(){function e(e,t){this.variables=Object.create(null),this.parent=e,this.topLevel=!1,this.isolateWrites=t}var t=e.prototype;return t.set=function(e,t,n){var r=e.split("."),i=this.variables,s=this;if(n&&(s=this.resolve(r[0],!0)))s.set(e,t);else{for(var a=0;a<r.length-1;a++){var o=r[a];i[o]||(i[o]={}),i=i[o]}i[r[r.length-1]]=t}},t.get=function(e){return void 0!==(e=this.variables[e])?e:null},t.lookup=function(e){var t=this.parent,n=this.variables[e];return void 0!==n?n:t&&t.lookup(e)},t.resolve=function(e,t){return t=t&&this.isolateWrites?void 0:this.parent,void 0!==this.variables[e]?this:t&&t.resolve(e)},t.push=function(t){return new e(this,t)},t.pop=function(){return this.parent},e}();function El(e){return e&&Object.prototype.hasOwnProperty.call(e,"__keywords")}function Tl(e){var t=e.length;return 0===t?0:El(e[t-1])?t-1:t}function _l(e){if("string"!=typeof e)return e;this.val=e,this.val=e,Object.defineProperty(this,"length",{writable:!0,configurable:!0,value:e.length})}_l.prototype=Object.create(String.prototype,{length:{writable:!0,configurable:!0,value:0}}),_l.prototype.valueOf=function(){return this.val},_l.prototype.toString=function(){return this.val};var gl={Frame:ml,makeMacro:function(e,t,n){return function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var a=Tl(i),o=function(){var e=i.length;return e&&El(e=i[e-1])?e:{}}();if(a>e.length)c=i.slice(0,e.length),i.slice(c.length,a).forEach((function(e,n){n<t.length&&(o[t[n]]=e)})),c.push(o);else if(a<e.length){for(var c=i.slice(0,a),l=a;l<e.length;l++){var u=e[l];c.push(o[u]),delete o[u]}c.push(o)}else c=i;return n.apply(this,c)}},makeKeywordArgs:function(e){return e.__keywords=!0,e},numArgs:Tl,suppressValue:function(e,t){return e=null!=e?e:"",!t||e instanceof _l?e:_a.escape(e.toString())},ensureDefined:function(e,t,n){if(null==e)throw new _a.TemplateError("attempted to output null or undefined value",t+1,n+1);return e},memberLookup:function(e,t){if(null!=e)return"function"==typeof e[t]?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e[t].apply(e,r)}:e[t]},contextOrFrameLookup:function(e,t,n){return void 0!==(t=t.lookup(n))?t:e.lookup(n)},callWrap:function(e,t,n,r){if(!e)throw new Error("Unable to call `"+t+"`, which is undefined or falsey");if("function"!=typeof e)throw new Error("Unable to call `"+t+"`, which is not a function");return e.apply(n,r)},handleError:function(e,t,n){return e.lineno?e:new _a.TemplateError(e,t,n)},isArray:_a.isArray,keys:_a.keys,SafeString:_l,copySafeness:function(e,t){return e instanceof _l?new _l(t):t.toString()},markSafe:function(e){var t=typeof e;return"string"==t?new _l(e):"function"!=t?e:function(t){var n=e.apply(this,arguments);return"string"==typeof n?new _l(n):n}},asyncEach:function(e,t,n,r){var i;_a.isArray(e)?(i=e.length,_a.asyncIter(e,(function(e,r,s){switch(t){case 1:n(e,r,i,s);break;case 2:n(e[0],e[1],r,i,s);break;case 3:n(e[0],e[1],e[2],r,i,s);break;default:e.push(r,i,s),n.apply(this,e)}}),r)):_a.asyncFor(e,(function(e,t,r,i,s){n(e,t,r,i,s)}),r)},asyncAll:function(e,t,n,r){var i=0;function s(e,t){i++,u[e]=t,i===l&&r(null,u.join(""))}if(_a.isArray(e))if(l=e.length,u=new Array(l),0===l)r(null,"");else for(var a=0;a<e.length;a++){var o=e[a];switch(t){case 1:n(o,a,l,s);break;case 2:n(o[0],o[1],a,l,s);break;case 3:n(o[0],o[1],o[2],a,l,s);break;default:o.push(a,l,s),n.apply(this,o)}}else{var c=_a.keys(e||{}),l=c.length,u=new Array(l);if(0===l)r(null,"");else for(var h=0;h<c.length;h++){var f=c[h];n(f,e[f],h,l,s)}}},inOperator:_a.inOperator,fromIterator:function(e){return"object"==typeof e&&null!==e&&!_a.isArray(e)&&dl&&Symbol.iterator in e?pl(e):e}};function Al(e,t){return(Al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var yl=_a.TemplateError,vl=gl.Frame,Sl={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},Nl=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),Al(r.prototype.constructor=r,t);var r=n.prototype;return r.init=function(e,t){this.templateName=e,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=t},r.fail=function(e,t,n){throw void 0!==t&&(t+=1),void 0!==n&&(n+=1),new yl(e,t,n)},r._pushBuffer=function(){var e=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=e,this._emit("var "+this.buffer+' = "";'),e},r._popBuffer=function(){this.buffer=this.bufferStack.pop()},r._emit=function(e){this.codebuf.push(e)},r._emitLine=function(e){this._emit(e+"\n")},r._emitLines=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach((function(t){return e._emitLine(t)}))},r._emitFuncBegin=function(e,t){this.buffer="output",this._scopeClosers="",this._emitLine("function "+t+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+e.lineno+";"),this._emitLine("var colno = "+e.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},r._emitFuncEnd=function(e){e||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},r._addScopeLevel=function(){this._scopeClosers+="})"},r._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},r._withScopedSyntax=function(e){var t=this._scopeClosers;this._scopeClosers="",e.call(this),this._closeScopeLevels(),this._scopeClosers=t},r._makeCallback=function(e){var t=this._tmpid();return"function("+t+(e?","+e:"")+") {\nif("+t+") { cb("+t+"); return; }"},r._tmpid=function(){return this.lastId++,"t_"+this.lastId},r._templateName=function(){return null==this.templateName?"undefined":JSON.stringify(this.templateName)},r._compileChildren=function(e,t){var n=this;e.children.forEach((function(e){n.compile(e,t)}))},r._compileAggregate=function(e,t,n,r){var i=this;n&&this._emit(n),e.children.forEach((function(e,n){0<n&&i._emit(","),i.compile(e,t)})),r&&this._emit(r)},r._compileExpression=function(e,t){this.assertType(e,nl.Literal,nl.Symbol,nl.Group,nl.Array,nl.Dict,nl.FunCall,nl.Caller,nl.Filter,nl.LookupVal,nl.Compare,nl.InlineIf,nl.In,nl.Is,nl.And,nl.Or,nl.Not,nl.Add,nl.Concat,nl.Sub,nl.Mul,nl.Div,nl.FloorDiv,nl.Mod,nl.Pow,nl.Neg,nl.Pos,nl.Compare,nl.NodeList),this.compile(e,t)},r.assertType=function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.some((function(t){return e instanceof t}))||this.fail("assertType: invalid type: "+e.typename,e.lineno,e.colno)},r.compileCallExtension=function(e,t,n){var r=this,i=e.args,s=e.contentArgs,a="boolean"!=typeof e.autoescape||e.autoescape;n||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+e.extName+'")["'+e.prop+'"]('),this._emit("context"),(i||s)&&this._emit(","),i&&(i instanceof nl.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),i.children.forEach((function(e,n){r._compileExpression(e,t),n===i.children.length-1&&!s.length||r._emit(",")}))),s.length&&s.forEach((function(e,n){var i;0<n&&r._emit(","),e?(r._emitLine("function(cb) {"),r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),i=r._pushBuffer(),r._withScopedSyntax((function(){r.compile(e,t),r._emitLine("cb(null, "+i+");")})),r._popBuffer(),r._emitLine("return "+i+";"),r._emitLine("}")):r._emit("null")})),n?(e=this._tmpid(),this._emitLine(", "+this._makeCallback(e)),this._emitLine(this.buffer+" += runtime.suppressValue("+e+", "+a+" && env.opts.autoescape);"),this._addScopeLevel()):(this._emit(")"),this._emit(", "+a+" && env.opts.autoescape);\n"))},r.compileCallExtensionAsync=function(e,t){this.compileCallExtension(e,t,!0)},r.compileNodeList=function(e,t){this._compileChildren(e,t)},r.compileLiteral=function(e){var t;"string"==typeof e.value?(t=(t=(t=(t=(t=(t=e.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+t+'"')):null===e.value?this._emit("null"):this._emit(e.value.toString())},r.compileSymbol=function(e,t){e=e.value,(t=t.lookup(e))?this._emit(t):this._emit('runtime.contextOrFrameLookup(context, frame, "'+e+'")')},r.compileGroup=function(e,t){this._compileAggregate(e,t,"(",")")},r.compileArray=function(e,t){this._compileAggregate(e,t,"[","]")},r.compileDict=function(e,t){this._compileAggregate(e,t,"{","}")},r.compilePair=function(e,t){var n=e.key;e=e.value;n instanceof nl.Symbol?n=new nl.Literal(n.lineno,n.colno,n.value):n instanceof nl.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,t),this._emit(": "),this._compileExpression(e,t)},r.compileInlineIf=function(e,t){this._emit("("),this.compile(e.cond,t),this._emit("?"),this.compile(e.body,t),this._emit(":"),null!==e.else_?this.compile(e.else_,t):this._emit('""'),this._emit(")")},r.compileIn=function(e,t){this._emit("runtime.inOperator("),this.compile(e.left,t),this._emit(","),this.compile(e.right,t),this._emit(")")},r.compileIs=function(e,t){var n=(e.right.name||e.right).value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(e.left,t),e.right.args&&(this._emit(","),this.compile(e.right.args,t)),this._emit(") === true")},r._binOpEmitter=function(e,t,n){this.compile(e.left,t),this._emit(n),this.compile(e.right,t)},r.compileOr=function(e,t){return this._binOpEmitter(e,t," || ")},r.compileAnd=function(e,t){return this._binOpEmitter(e,t," && ")},r.compileAdd=function(e,t){return this._binOpEmitter(e,t," + ")},r.compileConcat=function(e,t){return this._binOpEmitter(e,t,' + "" + ')},r.compileSub=function(e,t){return this._binOpEmitter(e,t," - ")},r.compileMul=function(e,t){return this._binOpEmitter(e,t," * ")},r.compileDiv=function(e,t){return this._binOpEmitter(e,t," / ")},r.compileMod=function(e,t){return this._binOpEmitter(e,t," % ")},r.compileNot=function(e,t){this._emit("!"),this.compile(e.target,t)},r.compileFloorDiv=function(e,t){this._emit("Math.floor("),this.compile(e.left,t),this._emit(" / "),this.compile(e.right,t),this._emit(")")},r.compilePow=function(e,t){this._emit("Math.pow("),this.compile(e.left,t),this._emit(", "),this.compile(e.right,t),this._emit(")")},r.compileNeg=function(e,t){this._emit("-"),this.compile(e.target,t)},r.compilePos=function(e,t){this._emit("+"),this.compile(e.target,t)},r.compileCompare=function(e,t){var n=this;this.compile(e.expr,t),e.ops.forEach((function(e){n._emit(" "+Sl[e.type]+" "),n.compile(e.expr,t)}))},r.compileLookupVal=function(e,t){this._emit("runtime.memberLookup(("),this._compileExpression(e.target,t),this._emit("),"),this._compileExpression(e.val,t),this._emit(")")},r._getNodeName=function(e){switch(e.typename){case"Symbol":return e.value;case"FunCall":return"the return value of ("+this._getNodeName(e.name)+")";case"LookupVal":return this._getNodeName(e.target)+'["'+this._getNodeName(e.val)+'"]';case"Literal":return e.value.toString();default:return"--expression--"}},r.compileFunCall=function(e,t){this._emit("(lineno = "+e.lineno+", colno = "+e.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(e.name,t),this._emit(', "'+this._getNodeName(e.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(e.args,t,"[","])"),this._emit(")")},r.compileFilter=function(e,t){var n=e.name;this.assertType(n,nl.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emit(")")},r.compileFilterAsync=function(e,t){var n=e.name,r=e.symbol.value;this.assertType(n,nl.Symbol),t.set(r,r),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emitLine(", "+this._makeCallback(r)),this._addScopeLevel()},r.compileKeywordArgs=function(e,t){this._emit("runtime.makeKeywordArgs("),this.compileDict(e,t),this._emit(")")},r.compileSet=function(e,t){var n=this,r=[];e.targets.forEach((function(e){e=e.value,null==(e=t.lookup(e))&&(e=n._tmpid(),n._emitLine("var "+e+";")),r.push(e)})),e.value?(this._emit(r.join(" = ")+" = "),this._compileExpression(e.value,t)):(this._emit(r.join(" = ")+" = "),this.compile(e.body,t)),this._emitLine(";"),e.targets.forEach((function(e,t){e=e.value,n._emitLine('frame.set("'+e+'", '+(t=r[t])+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+e+'", '+t+");"),n._emitLine("}"),"_"!==e.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+e+'", '+t+");"),n._emitLine("}"))}))},r.compileSwitch=function(e,t){var n=this;this._emit("switch ("),this.compile(e.expr,t),this._emit(") {"),e.cases.forEach((function(e,r){n._emit("case "),n.compile(e.cond,t),n._emit(": "),n.compile(e.body,t),e.body.children.length&&n._emitLine("break;")})),e.default&&(this._emit("default:"),this.compile(e.default,t)),this._emit("}")},r.compileIf=function(e,t,n){var r=this;this._emit("if("),this._compileExpression(e.cond,t),this._emitLine(") {"),this._withScopedSyntax((function(){r.compile(e.body,t),n&&r._emit("cb()")})),e.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax((function(){r.compile(e.else_,t),n&&r._emit("cb()")}))):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},r.compileIfAsync=function(e,t){this._emit("(function(cb) {"),this.compileIf(e,t,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},r._emitLoopBindings=function(e,t,n,r){var i=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:r+" - "+n},{name:"revindex0",val:r+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+r+" - 1"},{name:"length",val:r}].forEach((function(e){i._emitLine('frame.set("loop.'+e.name+'", '+e.val+");")}))},r.compileFor=function(e,t){var n,r,i,s,a=this,o=this._tmpid(),c=this._tmpid(),l=this._tmpid();t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+l+" = "),this._compileExpression(e.arr,t),this._emitLine(";"),this._emit("if("+l+") {"),this._emitLine(l+" = runtime.fromIterator("+l+");"),e.name instanceof nl.Array?(this._emitLine("var "+o+";"),this._emitLine("if(runtime.isArray("+l+")) {"),this._emitLine("var "+c+" = "+l+".length;"),this._emitLine("for("+o+"=0; "+o+" < "+l+".length; "+o+"++) {"),e.name.children.forEach((function(n,r){var i=a._tmpid();a._emitLine("var "+i+" = "+l+"["+o+"]["+r+"];"),a._emitLine('frame.set("'+n+'", '+l+"["+o+"]["+r+"]);"),t.set(e.name.children[r].value,i)})),this._emitLoopBindings(e,l,o,c),this._withScopedSyntax((function(){a.compile(e.body,t)})),this._emitLine("}"),this._emitLine("} else {"),s=(n=e.name.children)[0],n=n[1],r=this._tmpid(),i=this._tmpid(),t.set(s.value,r),t.set(n.value,i),this._emitLine(o+" = -1;"),this._emitLine("var "+c+" = runtime.keys("+l+").length;"),this._emitLine("for(var "+r+" in "+l+") {"),this._emitLine(o+"++;"),this._emitLine("var "+i+" = "+l+"["+r+"];"),this._emitLine('frame.set("'+s.value+'", '+r+");"),this._emitLine('frame.set("'+n.value+'", '+i+");"),this._emitLoopBindings(e,l,o,c),this._withScopedSyntax((function(){a.compile(e.body,t)})),this._emitLine("}")):(s=this._tmpid(),t.set(e.name.value,s),this._emitLine("var "+c+" = "+l+".length;"),this._emitLine("for(var "+o+"=0; "+o+" < "+l+".length; "+o+"++) {"),this._emitLine("var "+s+" = "+l+"["+o+"];"),this._emitLine('frame.set("'+e.name.value+'", '+s+");"),this._emitLoopBindings(e,l,o,c),this._withScopedSyntax((function(){a.compile(e.body,t)}))),this._emitLine("}"),this._emitLine("}"),e.else_&&(this._emitLine("if (!"+c+") {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r._compileAsyncLoop=function(e,t,n){var r,i=this,s=this._tmpid(),a=this._tmpid(),o=this._tmpid(),c=n?"asyncAll":"asyncEach";t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+o+" = runtime.fromIterator("),this._compileExpression(e.arr,t),this._emitLine(");"),e.name instanceof nl.Array?(r=e.name.children.length,this._emit("runtime."+c+"("+o+", "+r+", function("),e.name.children.forEach((function(e){i._emit(e.value+",")})),this._emit(s+","+a+",next) {"),e.name.children.forEach((function(e){e=e.value,t.set(e,e),i._emitLine('frame.set("'+e+'", '+e+");")}))):(r=e.name.value,this._emitLine("runtime."+c+"("+o+", 1, function("+r+", "+s+", "+a+",next) {"),this._emitLine('frame.set("'+r+'", '+r+");"),t.set(r,r)),this._emitLoopBindings(e,o,s,a),this._withScopedSyntax((function(){var r;n&&(r=i._pushBuffer()),i.compile(e.body,t),i._emitLine("next("+s+(r?","+r:"")+");"),n&&i._popBuffer()})),c=this._tmpid();this._emitLine("}, "+this._makeCallback(c)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+c+";"),e.else_&&(this._emitLine("if (!"+o+".length) {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r.compileAsyncEach=function(e,t){this._compileAsyncLoop(e,t)},r.compileAsyncAll=function(e,t){this._compileAsyncLoop(e,t,!0)},r._compileMacro=function(e,t){var n=this,r=[],i=null,s="macro_"+this._tmpid(),a=void 0!==t,o=(e.args.children.forEach((function(t,s){s===e.args.children.length-1&&t instanceof nl.Dict?i=t:(n.assertType(t,nl.Symbol),r.push(t))})),[].concat(r.map((function(e){return"l_"+e.value})),["kwargs"])),c=r.map((function(e){return'"'+e.value+'"'})),l=(i&&i.children||[]).map((function(e){return'"'+e.key.value+'"'})),u=a?t.push(!0):new vl;this._emitLines("var "+s+" = runtime.makeMacro(","["+c.join(", ")+"], ","["+l.join(", ")+"], ","function ("+o.join(", ")+") {","var callerFrame = frame;","frame = "+(a?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach((function(e){n._emitLine('frame.set("'+e.value+'", l_'+e.value+");"),u.set(e.value,"l_"+e.value)})),i&&i.children.forEach((function(e){var t=e.key.value;n._emit('frame.set("'+t+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+t+'")'),n._emit(' ? kwargs["'+t+'"] : '),n._compileExpression(e.value,u),n._emit(");")})),t=this._pushBuffer();return this._withScopedSyntax((function(){n.compile(e.body,u)})),this._emitLine("frame = "+(a?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+t+");"),this._emitLine("});"),this._popBuffer(),s},r.compileMacro=function(e,t){var n=this._compileMacro(e),r=e.name.value;t.set(r,n),t.parent?this._emitLine('frame.set("'+r+'", '+n+");"):("_"!==e.name.value.charAt(0)&&this._emitLine('context.addExport("'+r+'");'),this._emitLine('context.setVariable("'+r+'", '+n+");"))},r.compileCaller=function(e,t){this._emit("(function (){"),e=this._compileMacro(e,t),this._emit("return "+e+";})()")},r._compileGetTemplate=function(e,t,n,r){var i=this._tmpid(),s=this._templateName(),a=this._makeCallback(i);n=n?"true":"false",r=r?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(e.template,t),this._emitLine(", "+n+", "+s+", "+r+", "+a),i},r.compileImport=function(e,t){var n=e.target.value,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),t.set(n,r),t.parent?this._emitLine('frame.set("'+n+'", '+r+");"):this._emitLine('context.setVariable("'+n+'", '+r+");")},r.compileFromImport=function(e,t){var n=this,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),e.names.children.forEach((function(e){var i,s=n._tmpid();e=e instanceof nl.Pair?(i=e.key.value,e.value.value):i=e.value;n._emitLine("if(Object.prototype.hasOwnProperty.call("+r+', "'+i+'")) {'),n._emitLine("var "+s+" = "+r+"."+i+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+i+"'\")); return;"),n._emitLine("}"),t.set(e,s),t.parent?n._emitLine('frame.set("'+e+'", '+s+");"):n._emitLine('context.setVariable("'+e+'", '+s+");")}))},r.compileBlock=function(e){var t=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+e.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(t)),this._emitLine(this.buffer+" += "+t+";"),this._addScopeLevel()},r.compileSuper=function(e,t){var n=e.blockName.value,r=(e=e.symbol.value,this._makeCallback(e));this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+r),this._emitLine(e+" = runtime.markSafe("+e+");"),this._addScopeLevel(),t.set(e,e)},r.compileExtends=function(e,t){var n=this._tmpid();e=this._compileGetTemplate(e,t,!0,!1);this._emitLine("parentTemplate = "+e),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},r.compileInclude=function(e,t){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {"),t=this._compileGetTemplate(e,t,!1,e.ignoreMissing),this._emitLine("callback(null,"+t+");});"),this._emitLine("});"),e=this._tmpid(),this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(e)),this._emitLine("callback(null,"+e+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},r.compileTemplateData=function(e,t){this.compileLiteral(e,t)},r.compileCapture=function(e,t){var n=this,r=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax((function(){n.compile(e.body,t)})),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=r},r.compileOutput=function(e,t){var n=this;e.children.forEach((function(r){r instanceof nl.TemplateData?r.value&&(n._emit(n.buffer+" += "),n.compileLiteral(r,t),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(r,t),n.throwOnUndefined&&n._emit(","+e.lineno+","+e.colno+")"),n._emit(", env.opts.autoescape);\n"))}))},r.compileRoot=function(e,t){var n=this,r=(t&&this.fail("compileRoot: root node can't have frame"),t=new vl,this._emitFuncBegin(e,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(e,t),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0,[]);(t=e.findAll(nl.Block)).forEach((function(e,t){var i=e.name.value;if(-1!==r.indexOf(i))throw new Error('Block "'+i+'" defined more than once.');r.push(i),n._emitFuncBegin(e,"b_"+i),i=new vl,n._emitLine("var frame = frame.push(true);"),n.compile(e.body,i),n._emitFuncEnd()})),this._emitLine("return {"),t.forEach((function(e,t){e="b_"+e.name.value,n._emitLine(e+": "+e+",")})),this._emitLine("root: root\n};")},r.compile=function(e,t){var n=this["compile"+e.typename];n?n.call(this,e,t):this.fail("compile: Cannot compile node: "+e.typename,e.lineno,e.colno)},r.getCode=function(){return this.codebuf.join("")},n}(Ko.Obj),Il=function(e,t,n,r,i){var s=new Nl(r,(i=void 0===i?{}:i).throwOnUndefined);e=(n||[]).map((function(e){return e.preprocess})).filter((function(e){return!!e})).reduce((function(e,t){return t(e)}),e);return s.compile(fl(sl(e,n,i),t,r)),s.getCode()},bl=fr((function(e){function t(e,t){return null==e||!1===e?t:e}function n(e){return e!=e}function r(e){var n=(e=t(e,"")).toLowerCase();return gl.copySafeness(e,n.charAt(0).toUpperCase()+n.slice(1))}function i(e){if(_a.isString(e))return e.split("");if(_a.isObject(e))return _a._entries(e||{}).map((function(e){return{key:e[0],value:e[1]}}));if(_a.isArray(e))return e;throw new _a.TemplateError("list filter: type not iterable")}function s(e){return function(t,n,r){var i=this,s=i.env.getTest(n=void 0===n?"truthy":n);return _a.toArray(t).filter((function(t){return s.call(i,t,r)===e}))}}function a(e){return gl.copySafeness(e,e.replace(/^\s*|\s*$/g,""))}(e=e.exports={}).abs=Math.abs,e.batch=function(e,t,n){for(var r=[],i=[],s=0;s<e.length;s++)s%t==0&&i.length&&(r.push(i),i=[]),i.push(e[s]);if(i.length){if(n)for(s=i.length;s<t;s++)i.push(n);r.push(i)}return r},e.capitalize=r,e.center=function(e,n){var r;return(e=t(e,"")).length>=(n=n||80)?e:(n-=e.length,r=_a.repeat(" ",n/2-n%2),n=_a.repeat(" ",n/2),gl.copySafeness(e,r+e+n))},e.default=function(e,t,n){return n?e||t:void 0!==e?e:t},e.dictsort=function(e,t,n){if(!_a.isObject(e))throw new _a.TemplateError("dictsort filter: val must be an object");var r,i,s=[];for(i in e)s.push([i,e[i]]);if(void 0===n||"key"===n)r=0;else{if("value"!==n)throw new _a.TemplateError("dictsort filter: You can only sort by either key or value");r=1}return s.sort((function(e,n){return e=e[r],n=n[r],t||(_a.isString(e)&&(e=e.toUpperCase()),_a.isString(n)&&(n=n.toUpperCase())),n<e?1:e===n?0:-1})),s},e.dump=function(e,t){return JSON.stringify(e,null,t)},e.escape=function(e){return e instanceof gl.SafeString?e:gl.markSafe(_a.escape((e=null==e?"":e).toString()))},e.safe=function(e){return e instanceof gl.SafeString?e:gl.markSafe((e=null==e?"":e).toString())},e.first=function(e){return e[0]},e.forceescape=function(e){return gl.markSafe(_a.escape((e=null==e?"":e).toString()))},e.groupby=function(e,t){return _a.groupBy(e,t,this.env.opts.throwOnUndefined)},e.indent=function(e,n,r){if(""===(e=t(e,"")))return"";n=n||4;var i=e.split("\n"),s=_a.repeat(" ",n);n=i.map((function(e,t){return 0!==t||r?""+s+e:e})).join("\n");return gl.copySafeness(e,n)},e.join=function(e,t,n){return t=t||"",(e=n?_a.map(e,(function(e){return e[n]})):e).join(t)},e.last=function(e){return e[e.length-1]},e.length=function(e){return void 0!==(e=t(e,""))?"function"==typeof Map&&e instanceof Map||"function"==typeof Set&&e instanceof Set?e.size:(!_a.isObject(e)||e instanceof gl.SafeString?e:_a.keys(e)).length:0},e.list=i,e.lower=function(e){return(e=t(e,"")).toLowerCase()},e.nl2br=function(e){return null==e?"":gl.copySafeness(e,e.replace(/\r\n|\n/g,"<br />\n"))},e.random=function(e){return e[Math.floor(Math.random()*e.length)]},e.reject=s(!1),e.rejectattr=function(e,t){return e.filter((function(e){return!e[t]}))},e.select=s(!0),e.selectattr=function(e,t){return e.filter((function(e){return!!e[t]}))},e.replace=function(e,t,n,r){var i=e;if(t instanceof RegExp)return e.replace(t,n);void 0===r&&(r=-1);var s="";if("number"==typeof t)t=""+t;else if("string"!=typeof t)return e;if("string"!=typeof(e="number"==typeof e?""+e:e)&&!(e instanceof gl.SafeString))return e;if(""===t)return s=n+e.split("").join(n)+n,gl.copySafeness(e,s);var a=e.indexOf(t);if(0===r||-1===a)return e;for(var o=0,c=0;-1<a&&(-1===r||c<r);)s+=e.substring(o,a)+n,o=a+t.length,c++,a=e.indexOf(t,o);return o<e.length&&(s+=e.substring(o)),gl.copySafeness(i,s)},e.reverse=function(e){var t;return(t=_a.isString(e)?i(e):_a.map(e,(function(e){return e}))).reverse(),_a.isString(e)?gl.copySafeness(e,t.join("")):t},e.round=function(e,t,n){return t=t||0,t=Math.pow(10,t),("ceil"===n?Math.ceil:"floor"===n?Math.floor:Math.round)(e*t)/t},e.slice=function(e,t,n){for(var r=Math.floor(e.length/t),i=e.length%t,s=[],a=0,o=0;o<t;o++){var c=a+o*r;o<i&&a++,c=e.slice(c,a+(o+1)*r),n&&i<=o&&c.push(n),s.push(c)}return s},e.sum=function(e,t,n){return(n=void 0===n?0:n)+(e=t?_a.map(e,(function(e){return e[t]})):e).reduce((function(e,t){return e+t}),0)},e.sort=gl.makeMacro(["value","reverse","case_sensitive","attribute"],[],(function(e,t,n,r){var i=this,s=(e=_a.map(e,(function(e){return e})),_a.getAttrGetter(r));return e.sort((function(e,a){if(e=r?s(e):e,a=r?s(a):a,i.env.opts.throwOnUndefined&&r&&(void 0===e||void 0===a))throw new TypeError('sort: attribute "'+r+'" resolved to undefined');return!n&&_a.isString(e)&&_a.isString(a)&&(e=e.toLowerCase(),a=a.toLowerCase()),e<a?t?1:-1:a<e?t?-1:1:0})),e})),e.string=function(e){return gl.copySafeness(e,e)},e.striptags=function(e,n){var r=a((e=t(e,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,""));n=n?r.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):r.replace(/\s+/gi," ");return gl.copySafeness(e,n)},e.title=function(e){var n=(e=t(e,"")).split(" ").map(r);return gl.copySafeness(e,n.join(" "))},e.trim=a,e.truncate=function(e,n,r,i){var s=e;return(e=t(e,"")).length<=(n=n||255)?e:(e=r?e.substring(0,n):(-1===(r=e.lastIndexOf(" ",n))&&(r=n),e.substring(0,r)),gl.copySafeness(s,e+=null!=i?i:"..."))},e.upper=function(e){return(e=t(e,"")).toUpperCase()},e.urlencode=function(e){var t=encodeURIComponent;return _a.isString(e)?t(e):(_a.isArray(e)?e:_a._entries(e)).map((function(e){var n=e[0];e=e[1];return t(n)+"="+t(e)})).join("&")};var o=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,c=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,l=/^https?:\/\/.*$/,u=/^www\./,h=/\.(?:org|net|com)(?:\:|\/|$)/,f=(e.urlize=function(e,t,r){n(t)&&(t=1/0);var i=!0===r?' rel="nofollow"':"";return e.split(/(\s+)/).filter((function(e){return e&&e.length})).map((function(e){var n=e.match(o),r=(n=n?n[1]:e).substr(0,t);return l.test(n)?'<a href="'+n+'"'+i+">"+r+"</a>":u.test(n)?'<a href="http://'+n+'"'+i+">"+r+"</a>":c.test(n)?'<a href="mailto:'+n+'">'+n+"</a>":h.test(n)?'<a href="http://'+n+'"'+i+">"+r+"</a>":e})).join("")},e.wordcount=function(e){return(e=(e=t(e,""))?e.match(/\w+/g):null)?e.length:null},e.float=function(e,t){return n(e=parseFloat(e))?t:e},gl.makeMacro(["value","default","base"],[],(function(e,t,r){return void 0===r&&(r=10),n(e=parseInt(e,r))?t:e})));e.int=f,e.d=e.default,e.e=e.escape})),Cl={};function Ol(e,t){for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;)e.unshift("..");return e}var kl=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Rl=function(e){return kl.exec(e).slice(1)};function Dl(){for(var e="",t=!1,n=arguments.length-1;-1<=n&&!t;n--){var r=0<=n?arguments[n]:"/";if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");r&&(e=r+"/"+e,t="/"===r.charAt(0))}return(t?"/":"")+Ol(xl(e.split("/"),(function(e){return!!e})),!t).join("/")||"."}function Ll(e){var t=wl(e),n="/"===Pl(e,-1);return(e=(e=Ol(xl(e.split("/"),(function(e){return!!e})),!t).join("/"))||t?e:".")&&n&&(e+="/"),(t?"/":"")+e}function wl(e){return"/"===e.charAt(0)}var Ml={extname:function(e){return Rl(e)[3]},basename:function(e,t){return e=Rl(e)[2],t&&e.substr(-1*t.length)===t?e.substr(0,e.length-t.length):e},dirname:function(e){var t=(e=Rl(e))[0];e=e[1];return t||e?t+(e&&e.substr(0,e.length-1)):"."},sep:"/",delimiter:":",relative:function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;0<=n&&""===e[n];n--);return n<t?[]:e.slice(t,n-t+1)}e=Dl(e).substr(1),t=Dl(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),s=Math.min(r.length,i.length),a=s,o=0;o<s;o++)if(r[o]!==i[o]){a=o;break}var c=[];for(o=a;o<r.length;o++)c.push("..");return(c=c.concat(i.slice(a))).join("/")},join:function(){return Ll(xl(Array.prototype.slice.call(arguments,0),(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},isAbsolute:wl,normalize:Ll,resolve:Dl};function xl(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var Pl="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)};function Bl(e,t){return(Bl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Fl=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),Bl(r.prototype.constructor=r,t);var r=n.prototype;return r.resolve=function(e,t){return Ml.resolve(Ml.dirname(e),t)},r.isRelative=function(e){return 0===e.indexOf("./")||0===e.indexOf("../")},n}(Ko.EmitterObj);function Ul(e,t){return(Ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Hl=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this).precompiled=t||{},n}return n=e,(t=r).prototype=Object.create(n.prototype),Ul(t.prototype.constructor=t,n),r.prototype.getSource=function(e){return this.precompiled[e]?{src:{type:"code",obj:this.precompiled[e]},path:e}:null},r}(Fl);function Gl(e,t){e.prototype=Object.create(t.prototype),Xl(e.prototype.constructor=e,t)}function Xl(e,t){return(Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var jl=Hl,Yl=function(e){function t(t,n){var r=e.call(this)||this;return"boolean"==typeof n&&console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"),n=n||{},r.pathsToNames={},r.noCache=!!n.noCache,t?(t=Array.isArray(t)?t:[t],r.searchPaths=t.map(Ml.normalize)):r.searchPaths=["."],n.watch,r}return Gl(t,e),t.prototype.getSource=function(e){for(var t=null,n=this.searchPaths,r=0;r<n.length;r++){var i=Ml.resolve(n[r]),s=Ml.resolve(n[r],e);if(0===s.indexOf(i)&&Cl.existsSync(s)){t=s;break}}if(!t)return null;this.pathsToNames[t]=e;var a={src:Cl.readFileSync(t,"utf-8"),path:t,noCache:this.noCache};return this.emit("load",e,a),a},t}(Fl),ql={FileSystemLoader:Yl,PrecompiledLoader:jl,NodeResolveLoader:function(e){function t(t){var n;return t=t||{},(n=e.call(this)||this).pathsToNames={},n.noCache=!!t.noCache,t.watch,n}return Gl(t,e),t.prototype.getSource=function(e){if(/^\.?\.?(\/|\\)/.test(e))return null;if(/^[A-Z]:/.test(e))return null;try{t=ur.resolve(e)}catch(e){return null}this.pathsToNames[t]=e;var t={src:Cl.readFileSync(t,"utf-8"),path:t,noCache:this.noCache};return this.emit("load",e,t),t},t}(Fl)},Vl=fr((function(e,t){var n=gl.SafeString;t.callable=function(e){return"function"==typeof e},t.defined=function(e){return void 0!==e},t.divisibleby=function(e,t){return e%t==0},t.escaped=function(e){return e instanceof n},t.equalto=function(e,t){return e===t},t.eq=t.equalto,t.sameas=t.equalto,t.even=function(e){return e%2==0},t.falsy=function(e){return!e},t.ge=function(e,t){return t<=e},t.greaterthan=function(e,t){return t<e},t.gt=t.greaterthan,t.le=function(e,t){return e<=t},t.lessthan=function(e,t){return e<t},t.lt=t.lessthan,t.lower=function(e){return e.toLowerCase()===e},t.ne=function(e,t){return e!==t},t.null=function(e){return null===e},t.number=function(e){return"number"==typeof e},t.odd=function(e){return e%2==1},t.string=function(e){return"string"==typeof e},t.truthy=function(e){return!!e},t.undefined=function(e){return void 0===e},t.upper=function(e){return e.toUpperCase()===e},t.iterable=function(e){return"undefined"!=typeof Symbol?!!e[Symbol.iterator]:Array.isArray(e)||"string"==typeof e},t.mapping=function(e){var t=null!=e&&"object"==typeof e&&!Array.isArray(e);return Set?t&&!(e instanceof Set):t}})),$l=(Vl.callable,Vl.defined,Vl.divisibleby,Vl.escaped,Vl.equalto,Vl.eq,Vl.sameas,Vl.even,Vl.falsy,Vl.ge,Vl.greaterthan,Vl.gt,Vl.le,Vl.lessthan,Vl.lt,Vl.lower,Vl.ne,Vl.number,Vl.odd,Vl.string,Vl.truthy,Vl.undefined,Vl.upper,Vl.iterable,Vl.mapping,function(){return{range:function(e,t,n){var r=[];if(0<(n=void 0===t?(t=e,e=0,1):n||1))for(var i=e;i<t;i+=n)r.push(i);else for(var s=e;t<s;s+=n)r.push(s);return r},cycler:function(){return e=Array.prototype.slice.call(arguments),t=-1,{current:null,reset:function(){t=-1,this.current=null},next:function(){return++t>=e.length&&(t=0),this.current=e[t],this.current}};var e,t},joiner:function(e){e=e||",";var t=!0;return function(){var n=t?"":e;return t=!1,n}}}});function Kl(e,t){e.prototype=Object.create(t.prototype),Wl(e.prototype.constructor=e,t)}function Wl(e,t){return(Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var zl=ql.FileSystemLoader,Ql=ql.WebLoader,Jl=ql.PrecompiledLoader,Zl=Ko.Obj,eu=gl.handleError,tu=gl.Frame;function nu(e,t,n){!function(e){var t=lo.length?lo.pop():new uo;t.task=e,t.domain=Xa.domain,to(t)}((function(){e(t,n)}))}var ru={type:"code",obj:{root:function(e,t,n,r,i){try{i(null,"")}catch(e){i(eu(e,null,null))}}}},iu=function(e){function t(){return e.apply(this,arguments)||this}Kl(t,e);var n=t.prototype;return n.init=function(e,t){var n=this;t=this.opts=t||{},this.opts.dev=!!t.dev,this.opts.autoescape=null==t.autoescape||t.autoescape,this.opts.throwOnUndefined=!!t.throwOnUndefined,this.opts.trimBlocks=!!t.trimBlocks,this.opts.lstripBlocks=!!t.lstripBlocks,this.loaders=[],e?this.loaders=_a.isArray(e)?e:[e]:zl?this.loaders=[new zl("views")]:Ql&&(this.loaders=[new Ql("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new Jl(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=$l(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],_a._entries(bl).forEach((function(e){var t=e[0];e=e[1];return n.addFilter(t,e)})),_a._entries(Vl).forEach((function(e){var t=e[0];e=e[1];return n.addTest(t,e)}))},n._initLoaders=function(){var e=this;this.loaders.forEach((function(t){t.cache={},"function"==typeof t.on&&(t.on("update",(function(n,r){t.cache[n]=null,e.emit("update",n,r,t)})),t.on("load",(function(n,r){e.emit("load",n,r,t)})))}))},n.invalidateCache=function(){this.loaders.forEach((function(e){e.cache={}}))},n.addExtension=function(e,t){return t.__name=e,this.extensions[e]=t,this.extensionsList.push(t),this},n.removeExtension=function(e){var t=this.getExtension(e);t&&(this.extensionsList=_a.without(this.extensionsList,t),delete this.extensions[e])},n.getExtension=function(e){return this.extensions[e]},n.hasExtension=function(e){return!!this.extensions[e]},n.addGlobal=function(e,t){return this.globals[e]=t,this},n.getGlobal=function(e){if(void 0===this.globals[e])throw new Error("global not found: "+e);return this.globals[e]},n.addFilter=function(e,t,n){return n&&this.asyncFilters.push(e),this.filters[e]=t,this},n.getFilter=function(e){if(this.filters[e])return this.filters[e];throw new Error("filter not found: "+e)},n.addTest=function(e,t){return this.tests[e]=t,this},n.getTest=function(e){if(this.tests[e])return this.tests[e];throw new Error("test not found: "+e)},n.resolveTemplate=function(e,t,n){return e.isRelative&&t&&e.isRelative(n)&&e.resolve?e.resolve(t,n):n},n.getTemplate=function(e,t,n,r,i){var s,a=this,o=this,c=null;if(e&&e.raw&&(e=e.raw),_a.isFunction(n)&&(i=n,n=null,t=t||!1),_a.isFunction(t)&&(i=t,t=!1),e instanceof au)c=e;else{if("string"!=typeof e)throw new Error("template names must be a string: "+e);for(var l=0;l<this.loaders.length;l++){var u=this.loaders[l];if(c=u.cache[this.resolveTemplate(u,n,e)])break}}return c?(t&&c.compile(),i?void i(null,c):c):(_a.asyncIter(this.loaders,(function(t,r,i,s){function a(e,n){e?s(e):n?(n.loader=t,s(null,n)):i()}e=o.resolveTemplate(t,n,e),t.async?t.getSource(e,a):a(null,t.getSource(e))}),(function(n,o){if(n=o||n||r?n:new Error("template not found: "+e)){if(i)return void i(n);throw n}var c;o?(c=new au(o.src,a,o.path,t),o.noCache||(o.loader.cache[e]=c)):c=new au(ru,a,"",t),i?i(null,c):s=c})),s)},n.express=function(e){return function(e,t){function n(e,t){if(this.name=e,this.path=e,this.defaultEngine=t.defaultEngine,this.ext=Ml.extname(e),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(t,n){e.render(this.name,t,n)},t.set("view",n),t.set("nunjucksEnv",e),e}(this,e)},n.render=function(e,t,n){_a.isFunction(t)&&(n=t,t=null);var r=null;return this.getTemplate(e,(function(e,i){if(e&&n)nu(n,e);else{if(e)throw e;r=i.render(t,n)}})),r},n.renderString=function(e,t,n,r){return _a.isFunction(n)&&(r=n,n={}),new au(e,this,(n=n||{}).path).render(t,r)},n.waterfall=function(e,t,n){return ho(e,t,n)},t}(Ko.EmitterObj),su=function(e){function t(){return e.apply(this,arguments)||this}Kl(t,e);var n=t.prototype;return n.init=function(e,t,n){var r=this;this.env=n||new iu,this.ctx=_a.extend({},e),this.blocks={},this.exported=[],_a.keys(t).forEach((function(e){r.addBlock(e,t[e])}))},n.lookup=function(e){return(e in this.env.globals&&!(e in this.ctx)?this.env.globals:this.ctx)[e]},n.setVariable=function(e,t){this.ctx[e]=t},n.getVariables=function(){return this.ctx},n.addBlock=function(e,t){return this.blocks[e]=this.blocks[e]||[],this.blocks[e].push(t),this},n.getBlock=function(e){if(this.blocks[e])return this.blocks[e][0];throw new Error('unknown block "'+e+'"')},n.getSuper=function(e,t,n,r,i,s){n=_a.indexOf(this.blocks[t]||[],n);var a=this.blocks[t][n+1];if(-1===n||!a)throw new Error('no super block available for "'+t+'"');a(e,this,r,i,s)},n.addExport=function(e){this.exported.push(e)},n.getExported=function(){var e=this,t={};return this.exported.forEach((function(n){t[n]=e.ctx[n]})),t},t}(Zl),au=function(e){function t(){return e.apply(this,arguments)||this}Kl(t,e);var n=t.prototype;return n.init=function(e,t,n,r){if(this.env=t||new iu,_a.isObject(e))switch(e.type){case"code":this.tmplProps=e.obj;break;case"string":this.tmplStr=e.obj;break;default:throw new Error("Unexpected template object type "+e.type+"; expected 'code', or 'string'")}else{if(!_a.isString(e))throw new Error("src must be a string or an object describing the source");this.tmplStr=e}if(this.path=n,r)try{this._compile()}catch(e){throw _a._prettifyError(this.path,this.env.opts.dev,e)}else this.compiled=!1},n.render=function(e,t,n){var r=this,i=("function"==typeof e?(n=e,e={}):"function"==typeof t&&(n=t,t=null),!t);try{this.compile()}catch(e){var s=_a._prettifyError(this.path,this.env.opts.dev,e);if(n)return nu(n,s);throw s}s=new su(e||{},this.blocks,this.env);var a=((t=t?t.push(!0):new tu).topLevel=!0,null),o=!1;return this.rootRenderFunc(this.env,s,t,gl,(function(e,t){if(!o||!n||void 0===t)if(e&&(e=_a._prettifyError(r.path,r.env.opts.dev,e),o=!0),n)i?nu(n,e,t):n(e,t);else{if(e)throw e;a=t}})),a},n.getExported=function(e,t,n){"function"==typeof e&&(n=e,e={}),"function"==typeof t&&(n=t,t=null);try{this.compile()}catch(e){if(n)return n(e);throw e}(t=t?t.push():new tu).topLevel=!0;var r=new su(e||{},this.blocks,this.env);this.rootRenderFunc(this.env,r,t,gl,(function(e){e?n(e,null):n(null,r.getExported())}))},n.compile=function(){this.compiled||this._compile()},n._compile=function(){var e=this.tmplProps||(e=Il(this.tmplStr,this.env.asyncFilters,this.env.extensionsList,this.path,this.env.opts),new Function(e)());this.blocks=this._getBlocks(e),this.rootRenderFunc=e.root,this.compiled=!0},n._getBlocks=function(e){var t={};return _a.keys(e).forEach((function(n){"b_"===n.slice(0,2)&&(t[n.slice(2)]=e[n])})),t},t}(Zl);_a._prettifyError;const ou=6e4,cu=36e5,lu="millisecond",uu="second",hu="minute",fu="hour",pu="day",du="week",mu="month",Eu="quarter",Tu="year",_u="date",gu="Invalid Date",Au=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,yu=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;var vu={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:e=>{var t=["th","st","nd","rd"],n=e%100;return`[${e}${t[(n-20)%10]||t[n]||t[0]}]`}};const Su=(e,t,n)=>{var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},Nu=(e,t)=>{var n,r,i;return e.date()<t.date()?-Nu(t,e):(n=12*(t.year()-e.year())+(t.month()-e.month()),i=t-(r=e.clone().add(n,mu))<0,e=e.clone().add(n+(i?-1:1),mu),+(-(n+(t-r)/(i?r-e:e-r))||0))};var Iu={s:Su,z:e=>{e=-e.utcOffset();var t=Math.abs(e),n=Math.floor(t/60);t%=60;return(e<=0?"+":"-")+Su(n,2,"0")+":"+Su(t,2,"0")},m:Nu,a:e=>e<0?Math.ceil(e)||0:Math.floor(e),p:e=>({M:mu,y:Tu,w:du,d:pu,D:_u,h:fu,m:hu,s:uu,ms:lu,Q:Eu}[e]||String(e||"").toLowerCase().replace(/s$/,"")),u:e=>void 0===e};let bu="en";const Cu={},Ou=(Cu[bu]=vu,e=>e instanceof Lu),ku=(e,t,n)=>{let r;if(!e)return bu;if("string"==typeof e){const n=e.toLowerCase();if(Cu[n]&&(r=n),t&&(Cu[n]=t,r=n),t=e.split("-"),!r&&1<t.length)return ku(t[0])}else{const t=e.name;Cu[t]=e,r=t}return!n&&r&&(bu=r),r||!n&&bu},Ru=function(e,t){var n;return Ou(e)?e.clone():((n="object"==typeof t?t:{}).date=e,n.args=arguments,new Lu(n))},Du=Iu;Du.l=ku,Du.i=Ou,Du.w=(e,t)=>Ru(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset});class Lu{constructor(e){this.$L=ku(e.locale,null,!0),this.parse(e)}parse(e){this.$d=(e=>{const{date:t,utc:n}=e;if(null===t)return new Date(NaN);if(Du.u(t))return new Date;if(!(t instanceof Date||"string"!=typeof t||/Z$/i.test(t))){const e=t.match(Au);if(e){const t=e[2]-1||0,r=(e[7]||"0").substring(0,3);return n?new Date(Date.UTC(e[1],t,e[3]||1,e[4]||0,e[5]||0,e[6]||0,r)):new Date(e[1],t,e[3]||1,e[4]||0,e[5]||0,e[6]||0,r)}}return new Date(t)})(e),this.$x=e.x||{},this.init()}init(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()}$utils(){return Du}isValid(){return!(this.$d.toString()===gu)}isSame(e,t){return e=Ru(e),this.startOf(t)<=e&&e<=this.endOf(t)}isAfter(e,t){return Ru(e)<this.startOf(t)}isBefore(e,t){return this.endOf(t)<Ru(e)}$g(e,t,n){return Du.u(e)?this[t]:this.set(n,e)}unix(){return Math.floor(this.valueOf()/1e3)}valueOf(){return this.$d.getTime()}startOf(e,t){const n=!!Du.u(t)||t,r=Du.p(e),i=(e,t)=>(t=Du.w(this.$u?Date.UTC(this.$y,t,e):new Date(this.$y,t,e),this),n?t:t.endOf(pu)),s=(e,t)=>Du.w(this.toDate()[e].apply(this.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),this),{$W:a,$M:o,$D:c}=this,l="set"+(this.$u?"UTC":"");switch(r){case Tu:return n?i(1,0):i(31,11);case mu:return n?i(1,o):i(0,o+1);case du:{const e=this.$locale().weekStart||0,t=(a<e?a+7:a)-e;return i(n?c-t:c+(6-t),o)}case pu:case _u:return s(l+"Hours",0);case fu:return s(l+"Minutes",1);case hu:return s(l+"Seconds",2);case uu:return s(l+"Milliseconds",3);default:return this.clone()}}endOf(e){return this.startOf(e,!1)}$set(e,t){e=Du.p(e);var n="set"+(this.$u?"UTC":"");n={[pu]:n+"Date",[_u]:n+"Date",[mu]:n+"Month",[Tu]:n+"FullYear",[fu]:n+"Hours",[hu]:n+"Minutes",[uu]:n+"Seconds",[lu]:n+"Milliseconds"}[e],t=e===pu?this.$D+(t-this.$W):t;if(e===mu||e===Tu){const e=this.clone().set(_u,1);e.$d[n](t),e.init(),this.$d=e.set(_u,Math.min(this.$D,e.daysInMonth())).$d}else n&&this.$d[n](t);return this.init(),this}set(e,t){return this.clone().$set(e,t)}get(e){return this[Du.p(e)]()}add(e,t){e=Number(e);var n=t=>{var n=Ru(this);return Du.w(n.date(n.date()+Math.round(t*e)),this)};return(t=Du.p(t))===mu?this.set(mu,this.$M+e):t===Tu?this.set(Tu,this.$y+e):t===pu?n(1):t===du?n(7):(n={[hu]:ou,[fu]:cu,[uu]:1e3}[t]||1,t=this.$d.getTime()+e*n,Du.w(t,this))}subtract(e,t){return this.add(-1*e,t)}format(e){var t=this.$locale();if(!this.isValid())return t.invalidDate||gu;const n=e||"YYYY-MM-DDTHH:mm:ssZ",r=Du.z(this),{$H:i,$m:s,$M:a}=this,{weekdays:o,months:c,meridiem:l}=t,u=(e,t,r,i)=>e&&(e[t]||e(this,n))||r[t].slice(0,i),h=e=>Du.s(i%12||12,e,"0"),f=l||((e,t,n)=>(e=e<12?"AM":"PM",n?e.toLowerCase():e)),p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:Du.s(a+1,2,"0"),MMM:u(t.monthsShort,a,c,3),MMMM:u(c,a),D:this.$D,DD:Du.s(this.$D,2,"0"),d:String(this.$W),dd:u(t.weekdaysMin,this.$W,o,2),ddd:u(t.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(i),HH:Du.s(i,2,"0"),h:h(1),hh:h(2),a:f(i,s,!0),A:f(i,s,!1),m:String(s),mm:Du.s(s,2,"0"),s:String(this.$s),ss:Du.s(this.$s,2,"0"),SSS:Du.s(this.$ms,3,"0"),Z:r};return n.replace(yu,((e,t)=>t||p[e]||r.replace(":","")))}utcOffset(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)}diff(e,t,n){t=Du.p(t);var r=((e=Ru(e)).utcOffset()-this.utcOffset())*ou,i=this-e;e=Du.m(this,e),e={[Tu]:e/12,[mu]:e,[Eu]:e/3,[du]:(i-r)/6048e5,[pu]:(i-r)/864e5,[fu]:i/cu,[hu]:i/ou,[uu]:i/1e3}[t]||i;return n?e:Du.a(e)}daysInMonth(){return this.endOf(mu).$D}$locale(){return Cu[this.$L]}locale(e,t){var n;return e?(n=this.clone(),(e=ku(e,t,!0))&&(n.$L=e),n):this.$L}clone(){return Du.w(this.$d,this)}toDate(){return new Date(this.valueOf())}toJSON(){return this.isValid()?this.toISOString():null}toISOString(){return this.$d.toISOString()}toString(){return this.$d.toUTCString()}}const wu=Lu.prototype;Ru.prototype=wu,[["$ms",lu],["$s",uu],["$m",hu],["$H",fu],["$W",pu],["$M",mu],["$y",Tu],["$D",_u]].forEach((e=>{wu[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),Ru.extend=(e,t)=>(e.$i||(e(t,Lu,Ru),e.$i=!0),Ru),Ru.locale=ku,Ru.isDayjs=Ou,Ru.unix=e=>Ru(1e3*e),Ru.en=Cu[bu],Ru.Ls=Cu,Ru.p={};var Mu=fr((function(e){function t(e){return e&&(e=e.toString().replace(i.pluses,"%20"),e=decodeURIComponent(e)),e}function n(e){var n,r,s,a,o,c,l,u=[];if(null!=e&&""!==e)for(l=(r=(e=(n=0)===e.indexOf("?")?e.substring(1):e).toString().split(i.query_separator)).length;n<l;n++)0!==(a=(s=r[n]).indexOf("="))&&(o=t(s.substring(0,a)),c=t(s.substring(a+1)),u.push(-1===a?[s,null]:[o,c]));return u}function r(e){this.uriParts=function(e){var t=i.uri_parser.exec(e||""),n={};return["source","protocol","authority","userInfo","user","password","host","port","isColonUri","relative","path","directory","file","query","anchor"].forEach((function(e,r){n[e]=t[r]||""})),n}(e),this.queryPairs=n(this.uriParts.query),this.hasAuthorityPrefixUserPref=null}var i={starts_with_slashes:/^\/+/,ends_with_slashes:/\/+$/,pluses:/\+/g,query_separator:/[&;]/,uri_parser:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*)(?::([^:@\/]*))?)?@)?(\[[0-9a-fA-F:.]+\]|[^:\/?#]*)(?::(\d+|(?=:)))?(:)?)((((?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/};Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var n,r;if(null==this)throw new TypeError(" this is null or not defined");var i,s=Object(this),a=s.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(1<arguments.length&&(n=t),r=0;r<a;)r in s&&(i=s[r],e.call(n,i,r,s)),r++}),["protocol","userInfo","host","port","path","anchor"].forEach((function(e){r.prototype[e]=function(t){return void 0!==t&&(this.uriParts[e]=t),this.uriParts[e]}})),r.prototype.hasAuthorityPrefix=function(e){return void 0!==e&&(this.hasAuthorityPrefixUserPref=e),null===this.hasAuthorityPrefixUserPref?-1!==this.uriParts.source.indexOf("//"):this.hasAuthorityPrefixUserPref},r.prototype.isColonUri=function(e){if(void 0===e)return!!this.uriParts.isColonUri;this.uriParts.isColonUri=!!e},r.prototype.query=function(e,t){var r,i,s,a="",o=void 0===t||t;for(void 0!==e&&(this.queryPairs=n(e)),r=0,s=this.queryPairs.length;r<s;r++)i=this.queryPairs[r],0<a.length&&(a+="&"),null===i[1]?a+=i[0]:(a=a+i[0]+"=",void 0!==i[1]&&(a+=o?encodeURIComponent(i[1]):i[1]));return 0<a.length?"?"+a:a},r.prototype.getQueryParamValue=function(e){for(var t,n=0,r=this.queryPairs.length;n<r;n++)if(e===(t=this.queryPairs[n])[0])return t[1]},r.prototype.getQueryParamValues=function(e){for(var t,n=[],r=0,i=this.queryPairs.length;r<i;r++)e===(t=this.queryPairs[r])[0]&&n.push(t[1]);return n},r.prototype.deleteQueryParam=function(e,n){for(var r,i,s,a=[],o=0,c=this.queryPairs.length;o<c;o++)i=t((r=this.queryPairs[o])[0])===t(e),s=r[1]===n,(1!==arguments.length||i)&&(2!==arguments.length||i&&s)||a.push(r);return this.queryPairs=a,this},r.prototype.addQueryParam=function(e,t,n){return 3===arguments.length&&-1!==n?(n=Math.min(n,this.queryPairs.length),this.queryPairs.splice(n,0,[e,t])):0<arguments.length&&this.queryPairs.push([e,t]),this},r.prototype.hasQueryParam=function(e){for(var t=this.queryPairs.length,n=0;n<t;n++)if(this.queryPairs[n][0]==e)return!0;return!1},r.prototype.replaceQueryParam=function(e,n,r){var i,s,a=-1,o=this.queryPairs.length;if(3===arguments.length){for(i=0;i<o;i++)if(t((s=this.queryPairs[i])[0])===t(e)&&decodeURIComponent(s[1])===t(r)){a=i;break}0<=a&&this.deleteQueryParam(e,t(r)).addQueryParam(e,n,a)}else{for(i=0;i<o;i++)if(t((s=this.queryPairs[i])[0])===t(e)){a=i;break}this.deleteQueryParam(e),this.addQueryParam(e,n,a)}return this},["protocol","hasAuthorityPrefix","isColonUri","userInfo","host","port","path","query","anchor"].forEach((function(e){var t="set"+e.charAt(0).toUpperCase()+e.slice(1);r.prototype[t]=function(t){return this[e](t),this}})),r.prototype.scheme=function(){var e="";return this.protocol()?(e+=this.protocol(),this.protocol().indexOf(":")!==this.protocol().length-1&&(e+=":"),e+="//"):this.hasAuthorityPrefix()&&this.host()&&(e+="//"),e},r.prototype.origin=function(){var e=this.scheme();return this.userInfo()&&this.host()&&(e+=this.userInfo(),this.userInfo().indexOf("@")!==this.userInfo().length-1)&&(e+="@"),this.host()&&(e+=this.host(),this.port()||this.path()&&this.path().substr(0,1).match(/[0-9]/))&&(e+=":"+this.port()),e},r.prototype.addTrailingSlash=function(){var e=this.path()||"";return"/"!==e.substr(-1)&&this.path(e+"/"),this},r.prototype.toString=function(e){var t,n=this.origin();return this.isColonUri()?this.path()&&(n+=":"+this.path()):this.path()?(t=this.path(),i.ends_with_slashes.test(n)||i.starts_with_slashes.test(t)?(n&&n.replace(i.ends_with_slashes,"/"),t=t.replace(i.starts_with_slashes,"/")):n+="/",n+=t):this.host()&&(this.query(void 0,e).toString()||this.anchor())&&(n+="/"),this.query(void 0,e).toString()&&(n+=this.query(void 0,e).toString()),this.anchor()&&(0!==this.anchor().indexOf("#")&&(n+="#"),n+=this.anchor()),n},r.prototype.clone=function(){return new r(this.toString())},e.exports=r})),xu=fr((function(e,t){(function(){var n,r="Expected a function",i="__lodash_hash_undefined__",s="__lodash_placeholder__",a=32,o=128,c=1/0,l=9007199254740991,u=NaN,h=4294967295,f=[["ary",o],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",256]],p="[object Arguments]",d="[object Array]",m="[object Boolean]",E="[object Date]",T="[object Error]",_="[object Function]",g="[object GeneratorFunction]",A="[object Map]",y="[object Number]",v="[object Object]",S="[object Promise]",N="[object RegExp]",I="[object Set]",b="[object String]",C="[object Symbol]",O="[object WeakMap]",k="[object ArrayBuffer]",R="[object DataView]",D="[object Float32Array]",L="[object Float64Array]",w="[object Int8Array]",M="[object Int16Array]",x="[object Int32Array]",P="[object Uint8Array]",B="[object Uint8ClampedArray]",F="[object Uint16Array]",U="[object Uint32Array]",H=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,X=/(__e\(.*?\)|\b__t\)) \+\n'';/g,j=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,q=RegExp(j.source),V=RegExp(Y.source),$=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,J=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,ee=RegExp(Z.source),te=/^\s+/,ne=/\s/,re=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ie=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ae=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,oe=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,le=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ue=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,pe=/^\[object .+?Constructor\]$/,de=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,Ee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Te=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,ge="\\ud800-\\udfff",Ae="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ye="\\u2700-\\u27bf",ve="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\ufe0e\\ufe0f",Ne="["+ge+"]",Ie="["+(Le="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000")+"]",be="["+Ae+"]",Ce="["+ye+"]",Oe="["+(ze="a-z\\xdf-\\xf6\\xf8-\\xff")+"]",ke="[\\ud800-\\udbff][\\udc00-\\udfff]",Re="\\u200d",De="(?:"+Oe+"|"+(Le="[^"+ge+Le+"\\d+"+ye+ze+ve+"]")+")",Le="(?:"+(ve="["+ve+"]")+"|"+Le+")",we="(?:['](?:d|ll|m|re|s|t|ve))?",Me="(?:['](?:D|LL|M|RE|S|T|VE))?",xe=(xe="["+Se+"]?")+(Pe="(?:"+be+"|"+(ye="\\ud83c[\\udffb-\\udfff]")+")?")+"(?:"+Re+"(?:"+[ze="[^"+ge+"]",Qe="(?:\\ud83c[\\udde6-\\uddff]){2}",ke].join("|")+")"+xe+Pe+")*",Pe="(?:"+[Ce,Qe,ke].join("|")+")"+xe,Be=(Ce="(?:"+[ze+be+"?",be,Qe,ke,Ne].join("|")+")",RegExp("[']","g")),Fe=RegExp(be,"g"),Ue=RegExp(ye+"(?="+ye+")|"+Ce+xe,"g"),He=RegExp([ve+"?"+Oe+"+"+we+"(?="+[Ie,ve,"$"].join("|")+")",Le+"+"+Me+"(?="+[Ie,ve+De,"$"].join("|")+")",ve+"?"+De+"+"+we,ve+"+"+Me,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",Pe].join("|"),"g"),Ge=RegExp("["+Re+ge+Ae+Se+"]"),Xe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,je=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ye=-1,qe={},Ve=(qe[D]=qe[L]=qe[w]=qe[M]=qe[x]=qe[P]=qe[B]=qe[F]=qe[U]=!0,qe[p]=qe[d]=qe[k]=qe[m]=qe[R]=qe[E]=qe[T]=qe[_]=qe[A]=qe[y]=qe[v]=qe[N]=qe[I]=qe[b]=qe[O]=!1,{}),$e=(Ve[p]=Ve[d]=Ve[k]=Ve[R]=Ve[m]=Ve[E]=Ve[D]=Ve[L]=Ve[w]=Ve[M]=Ve[x]=Ve[A]=Ve[y]=Ve[v]=Ve[N]=Ve[I]=Ve[b]=Ve[C]=Ve[P]=Ve[B]=Ve[F]=Ve[U]=!0,Ve[T]=Ve[_]=Ve[O]=!1,{"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"}),Ke=parseFloat,We=parseInt,ze="object"==typeof lr&&lr&&lr.Object===Object&&lr,Qe="object"==typeof self&&self&&self.Object===Object&&self,Je=ze||Qe||Function("return this")(),Ze=(ke=t&&!t.nodeType&&t)&&e&&!e.nodeType&&e,et=Ze&&Ze.exports===ke,tt=et&&ze.process,nt=(Ne=function(){try{return Ze&&Ze.require&&Ze.require("util").types||tt&&tt.binding&&tt.binding("util")}catch(e){}}())&&Ne.isArrayBuffer,rt=Ne&&Ne.isDate,it=Ne&&Ne.isMap,st=Ne&&Ne.isRegExp,at=Ne&&Ne.isSet,ot=Ne&&Ne.isTypedArray;function ct(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function lt(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i<s;){var a=e[i];t(r,a,n(a),e)}return r}function ut(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ht(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ft(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var a=e[n];t(a,n,e)&&(s[i++]=a)}return s}function pt(e,t){return!(null==e||!e.length)&&-1<St(e,t,0)}function dt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function mt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Et(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Tt(e,t,n,r){var i=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function _t(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function gt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var At=Ct("length");function yt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function vt(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function St(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):vt(e,It,n)}function Nt(e,t,n,r){for(var i=n-1,s=e.length;++i<s;)if(r(e[i],t))return i;return-1}function It(e){return e!=e}function bt(e,t){var n=null==e?0:e.length;return n?Rt(e,t)/n:u}function Ct(e){return function(t){return null==t?n:t[e]}}function Ot(e){return function(t){return null==e?n:e[t]}}function kt(e,t,n,r,i){return i(e,(function(e,i,s){n=r?(r=!1,e):t(n,e,i,s)})),n}function Rt(e,t){for(var r,i=-1,s=e.length;++i<s;){var a=t(e[i]);a!==n&&(r=r===n?a:r+a)}return r}function Dt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Lt(e){return e&&e.slice(0,Kt(e)+1).replace(te,"")}function wt(e){return function(t){return e(t)}}function Mt(e,t){return mt(t,(function(t){return e[t]}))}function xt(e,t){return e.has(t)}function Pt(e,t){for(var n=-1,r=e.length;++n<r&&-1<St(t,e[n],0););return n}function Bt(e,t){for(var n=e.length;n--&&-1<St(t,e[n],0););return n}var Ft=Ot({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ut=Ot({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Ht(e){return"\\"+$e[e]}function Gt(e){return Ge.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function jt(e,t){return function(n){return e(t(n))}}function Yt(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n];o!==t&&o!==s||(e[n]=s,a[i++]=n)}return a}function qt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Vt(e){return(Gt(e)?function(e){for(var t=Ue.lastIndex=0;Ue.test(e);)++t;return t}:At)(e)}function $t(e){return Gt(e)?function(e){return e.match(Ue)||[]}(e):e.split("")}function Kt(e){for(var t=e.length;t--&&ne.test(e.charAt(t)););return t}var Wt=Ot({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),zt=function e(t){var ne=(t=null==t?Je:zt.defaults(Je.Object(),t,zt.pick(Je,je))).Array,ge=t.Date,Ae=t.Error,ye=t.Function,ve=t.Math,Se=t.Object,Ne=t.RegExp,Ie=t.String,be=t.TypeError,Ce=ne.prototype,Oe=ye.prototype,ke=Se.prototype,Re=t["__core-js_shared__"],De=Oe.toString,Le=ke.hasOwnProperty,we=0,Me=(Oe=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||""))?"Symbol(src)_1."+Oe:"",xe=ke.toString,Pe=De.call(Se),Ue=Je._,Ge=Ne("^"+De.call(Le).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$e=(Oe=et?t.Buffer:n,t.Symbol),ze=t.Uint8Array,Qe=Oe?Oe.allocUnsafe:n,Ze=jt(Se.getPrototypeOf,Se),tt=Se.create,At=ke.propertyIsEnumerable,Ot=Ce.splice,Qt=$e?$e.isConcatSpreadable:n,Jt=$e?$e.iterator:n,Zt=$e?$e.toStringTag:n,en=function(){try{var e=Vi(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),tn=t.clearTimeout!==Je.clearTimeout&&t.clearTimeout,nn=ge&&ge.now!==Je.Date.now&&ge.now,rn=t.setTimeout!==Je.setTimeout&&t.setTimeout,sn=ve.ceil,an=ve.floor,on=Se.getOwnPropertySymbols,cn=(Oe=Oe?Oe.isBuffer:n,t.isFinite),ln=Ce.join,un=jt(Se.keys,Se),hn=ve.max,fn=ve.min,pn=ge.now,dn=t.parseInt,mn=ve.random,En=Ce.reverse,Tn=(ge=Vi(t,"DataView"),Vi(t,"Map")),_n=Vi(t,"Promise"),gn=Vi(t,"Set"),An=(t=Vi(t,"WeakMap"),Vi(Se,"create")),yn=t&&new t,vn={},Sn=_s(ge),Nn=_s(Tn),In=_s(_n),bn=_s(gn),Cn=_s(t),On=($e=$e?$e.prototype:n)?$e.valueOf:n,kn=$e?$e.toString:n;function Rn(e){if(Ia(e)&&!ma(e)&&!(e instanceof Mn)){if(e instanceof wn)return e;if(Le.call(e,"__wrapped__"))return gs(e)}return new wn(e)}var Dn=function(){function e(){}return function(t){return Na(t)?tt?tt(t):(e.prototype=t,t=new e,e.prototype=n,t):{}}}();function Ln(){}function wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Mn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function xn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Bn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Bn;++t<n;)this.add(e[t])}function Un(e){e=this.__data__=new Pn(e),this.size=e.size}function Hn(e,t){var n,r=ma(e),i=!r&&da(e),s=!r&&!i&&ga(e),a=!r&&!i&&!s&&wa(e),o=r||i||s||a,c=o?Dt(e.length,Ie):[],l=c.length;for(n in e)!t&&!Le.call(e,n)||o&&("length"==n||s&&("offset"==n||"parent"==n)||a&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||Zi(n,l))||c.push(n);return c}function Gn(e){var t=e.length;return t?e[Mr(0,t-1)]:n}function Xn(e,t,r){(r===n||ha(e[t],r))&&(r!==n||t in e)||$n(e,t,r)}function jn(e,t,r){var i=e[t];Le.call(e,t)&&ha(i,r)&&(r!==n||t in e)||$n(e,t,r)}function Yn(e,t){for(var n=e.length;n--;)if(ha(e[n][0],t))return n;return-1}function qn(e,t,n,r){return er(e,(function(e,i,s){t(r,e,n(e),s)})),r}function Vn(e,t){return e&&hi(t,to(t),e)}function $n(e,t,n){"__proto__"==t&&en?en(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Kn(e,t){for(var r=-1,i=t.length,s=ne(i),a=null==e;++r<i;)s[r]=a?n:za(e,t[r]);return s}function Wn(e,t,r){return e!=e||(r!==n&&(e=e<=r?e:r),t===n)||t<=e?e:t}function zn(e,t,r,i,s,a){var o,c=1&t,l=2&t,u=4&t;if((o=r?s?r(e,i,s,a):r(e):o)===n){if(!Na(e))return e;if(i=ma(e)){if(o=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Le.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!c)return ui(e,o)}else{var h=Wi(e),f=h==_||h==g;if(ga(e))return ii(e,c);if(h==v||h==p||f&&!s){if(o=l||f?{}:Qi(e),!c)return l?function(e,t){return hi(e,Ki(e),t)}(e,function(e,t){return e&&hi(t,no(t),e)}(o,e)):function(e,t){return hi(e,$i(e),t)}(e,Vn(o,e))}else{if(!Ve[h])return s?e:{};o=function(e,t){var n=e.constructor;switch(h){case k:return si(e);case m:case E:return new n(+e);case R:return function(e,n){return n=t?si(e.buffer):e.buffer,new e.constructor(n,e.byteOffset,e.byteLength)}(e);case D:case L:case w:case M:case x:case P:case B:case F:case U:return ai(e,t);case A:return new n;case y:case b:return new n(e);case N:return function(e){var t=new e.constructor(e.source,ue.exec(e));return t.lastIndex=e.lastIndex,t}(e);case I:return new n;case C:return On?Se(On.call(e)):{}}}(e,c)}}if(f=(a=a||new Un).get(e))return f;a.set(e,o),Ra(e)?e.forEach((function(n){o.add(zn(n,t,r,n,e,a))})):ba(e)&&e.forEach((function(n,i){o.set(i,zn(n,t,r,i,e,a))}));var d=i?n:(u?l?Ui:Fi:l?no:to)(e);ut(d||e,(function(n,i){d&&(n=e[i=n]),jn(o,i,zn(n,t,r,i,e,a))}))}return o}function Qn(e,t,r){var i=r.length;if(null==e)return!i;for(e=Se(e);i--;){var s=r[i],a=t[s],o=e[s];if(o===n&&!(s in e)||!a(o))return!1}return!0}function Jn(e,t,i){if("function"!=typeof e)throw new be(r);return hs((function(){e.apply(n,i)}),t)}function Zn(e,t,n,r){var i=-1,s=pt,a=!0,o=e.length,c=[],l=t.length;if(o){n&&(t=mt(t,wt(n))),r?(s=dt,a=!1):200<=t.length&&(s=xt,a=!1,t=new Fn(t));e:for(;++i<o;){var u=e[i],h=null==n?u:n(u);u=r||0!==u?u:0;if(a&&h==h){for(var f=l;f--;)if(t[f]===h)continue e;c.push(u)}else s(t,h,r)||c.push(u)}}return c}Rn.templateSettings={escape:$,evaluate:K,interpolate:W,variable:"",imports:{_:Rn}},(Rn.prototype=Ln.prototype).constructor=Rn,(wn.prototype=Dn(Ln.prototype)).constructor=wn,(Mn.prototype=Dn(Ln.prototype)).constructor=Mn,xn.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},xn.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},xn.prototype.get=function(e){var t,r=this.__data__;return An?(t=r[e])===i?n:t:Le.call(r,e)?r[e]:n},xn.prototype.has=function(e){var t=this.__data__;return An?t[e]!==n:Le.call(t,e)},xn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=An&&t===n?i:t,this},Pn.prototype.clear=function(){this.__data__=[],this.size=0},Pn.prototype.delete=function(e){var t=this.__data__;return!((e=Yn(t,e))<0||(e==t.length-1?t.pop():Ot.call(t,e,1),--this.size,0))},Pn.prototype.get=function(e){var t=this.__data__;return(e=Yn(t,e))<0?n:t[e][1]},Pn.prototype.has=function(e){return-1<Yn(this.__data__,e)},Pn.prototype.set=function(e,t){var n=this.__data__,r=Yn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Bn.prototype.clear=function(){this.size=0,this.__data__={hash:new xn,map:new(Tn||Pn),string:new xn}},Bn.prototype.delete=function(e){return e=Yi(this,e).delete(e),this.size-=e?1:0,e},Bn.prototype.get=function(e){return Yi(this,e).get(e)},Bn.prototype.has=function(e){return Yi(this,e).has(e)},Bn.prototype.set=function(e,t){var n=Yi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Fn.prototype.add=Fn.prototype.push=function(e){return this.__data__.set(e,i),this},Fn.prototype.has=function(e){return this.__data__.has(e)},Un.prototype.clear=function(){this.__data__=new Pn,this.size=0},Un.prototype.delete=function(e){var t=this.__data__;e=t.delete(e);return this.size=t.size,e},Un.prototype.get=function(e){return this.__data__.get(e)},Un.prototype.has=function(e){return this.__data__.has(e)},Un.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Pn){var r=n.__data__;if(!Tn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bn(r)}return n.set(e,t),this.size=n.size,this};var er=di(or),tr=di(cr,!0);function nr(e,t,r){for(var i=-1,s=e.length;++i<s;){var a,o,c=e[i],l=t(c);null!=l&&(a===n?l==l&&!La(l):r(l,a))&&(a=l,o=c)}return o}function rr(e,t){var n=[];return er(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function ir(e,t,n,r,i){var s=-1,a=e.length;for(n=n||Ji,i=i||[];++s<a;){var o=e[s];0<t&&n(o)?1<t?ir(o,t-1,n,r,i):Et(i,o):r||(i[i.length]=o)}return i}var sr=mi(),ar=mi(!0);function or(e,t){return e&&sr(e,t,to)}function cr(e,t){return e&&ar(e,t,to)}function lr(e,t){return ft(t,(function(t){return ya(e[t])}))}function ur(e,t){for(var r=0,i=(t=ei(t,e)).length;null!=e&&r<i;)e=e[Ts(t[r++])];return r&&r==i?e:n}function hr(e,t,n){return t=t(e),ma(e)?t:Et(t,n(e))}function fr(e){return null==e?e===n?"[object Undefined]":"[object Null]":(Zt&&Zt in Se(e)?function(e){var t=Le.call(e,Zt),r=e[Zt];try{e[Zt]=n;var i=!0}catch(e){}var s=xe.call(e);return i&&(t?e[Zt]=r:delete e[Zt]),s}:function(e){return xe.call(e)})(e)}function pr(e,t){return t<e}function dr(e,t){return null!=e&&Le.call(e,t)}function mr(e,t){return null!=e&&t in Se(e)}function Er(e,t,r){for(var i=r?dt:pt,s=e[0].length,a=e.length,o=a,c=ne(a),l=1/0,u=[];o--;){var h=e[o];o&&t&&(h=mt(h,wt(t))),l=fn(h.length,l),c[o]=!r&&(t||120<=s&&120<=h.length)?new Fn(o&&h):n}h=e[0];var f=-1,p=c[0];e:for(;++f<s&&u.length<l;){var d=h[f],m=t?t(d):d;d=r||0!==d?d:0;if(!(p?xt(p,m):i(u,m,r))){for(o=a;--o;){var E=c[o];if(!(E?xt(E,m):i(e[o],m,r)))continue e}p&&p.push(m),u.push(d)}}return u}function Tr(e,t,r){return null==(t=null==(e=cs(e,t=ei(t,e)))?e:e[Ts(Ns(t))])?n:ct(t,e,r)}function _r(e){return Ia(e)&&fr(e)==p}function gr(e,t,r,i,s){return e===t||(null==e||null==t||!Ia(e)&&!Ia(t)?e!=e&&t!=t:function(e,t,r,i,s,a){var o=ma(e),c=ma(t),l=o?d:Wi(e),u=(c=c?d:Wi(t),(l=l==p?v:l)==v),h=(c=c==p?v:c)==v;if((c=l==c)&&ga(e)){if(!ga(t))return!1;u=!(o=!0)}return c&&!u?(a=a||new Un,o||wa(e)?Pi(e,t,r,i,s,a):function(e,t,n,r,i,s,a){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!s(new ze(e),new ze(t)));case m:case E:case y:return ha(+e,+t);case T:return e.name==t.name&&e.message==t.message;case N:case b:return e==t+"";case A:var o=Xt;case I:var c;o=o||qt;return!!(e.size==t.size||1&r)&&((c=a.get(e))?c==t:(r|=2,a.set(e,t),c=Pi(o(e),o(t),r,i,s,a),a.delete(e),c));case C:if(On)return On.call(e)==On.call(t)}return!1}(e,t,l,r,i,s,a)):1&r||(o=u&&Le.call(e,"__wrapped__"),l=h&&Le.call(t,"__wrapped__"),!o&&!l)?c&&function(e,t,r,i,s,a){var o=1&r,c=Fi(e),l=c.length;if(l!=Fi(t).length&&!o)return!1;for(var u=l;u--;){var h=c[u];if(!(o?h in t:Le.call(t,h)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;for(var d=!0,m=(a.set(e,t),a.set(t,e),o);++u<l;){var E,T=e[h=c[u]],_=t[h];if(!((E=i?o?i(_,T,h,t,e,a):i(T,_,h,e,t,a):E)===n?T===_||s(T,_,r,i,a):E)){d=!1;break}m=m||"constructor"==h}return d&&!m&&(f=e.constructor)!=(p=t.constructor)&&"constructor"in e&&"constructor"in t&&!("function"==typeof f&&f instanceof f&&"function"==typeof p&&p instanceof p)&&(d=!1),a.delete(e),a.delete(t),d}(e,t,r,i,s,a=a||new Un):s(o?e.value():e,l?t.value():t,r,i,a=a||new Un)}(e,t,r,i,gr,s))}function Ar(e,t,r,i){var s=r.length,a=s,o=!i;if(null==e)return!a;for(e=Se(e);s--;){var c=r[s];if(o&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<a;){var l=(c=r[s])[0],u=e[l],h=c[1];if(o&&c[2]){if(u===n&&!(l in e))return!1}else{var f,p=new Un;if(!((f=i?i(u,h,l,e,t,p):f)===n?gr(h,u,3,i,p):f))return!1}}return!0}function yr(e){return!(!Na(e)||function(e){return Me&&Me in e}(e))&&(ya(e)?Ge:pe).test(_s(e))}function vr(e){return"function"==typeof e?e:null==e?Oo:"object"==typeof e?ma(e)?Cr(e[0],e[1]):br(e):Bo(e)}function Sr(e){if(!is(e))return un(e);var t,n=[];for(t in Se(e))Le.call(e,t)&&"constructor"!=t&&n.push(t);return n}function Nr(e,t){return e<t}function Ir(e,t){var n=-1,r=Ta(e)?ne(e.length):[];return er(e,(function(e,i,s){r[++n]=t(e,i,s)})),r}function br(e){var t=qi(e);return 1==t.length&&t[0][2]?as(t[0][0],t[0][1]):function(n){return n===e||Ar(n,e,t)}}function Cr(e,t){return ts(e)&&ss(t)?as(Ts(e),t):function(r){var i=za(r,e);return i===n&&i===t?Qa(r,e):gr(t,i,3)}}function Or(e,t,r,i,s){e!==t&&sr(t,(function(a,o){var c;s=s||new Un,Na(a)?function(e,t,r,i,s,a,o){var c,l,u,h=ls(e,r),f=ls(t,r),p=o.get(f);p||((t=(p=a?a(h,f,r+"",e,t,o):n)===n)&&(l=!(c=ma(f))&&ga(f),u=!c&&!l&&wa(f),p=f,c||l||u?p=ma(h)?h:_a(h)?ui(h):l?ii(f,!(t=!1)):u?ai(f,!(t=!1)):[]:Oa(f)||da(f)?da(p=h)?p=Ga(h):Na(h)&&!ya(h)||(p=Qi(f)):t=!1),t&&(o.set(f,p),s(p,f,i,a,o),o.delete(f))),Xn(e,r,p)}(e,t,o,r,Or,i,s):(c=i?i(ls(e,o),a,o+"",e,t,s):n,Xn(e,o,c===n?a:c))}),no)}function kr(e,t){var r=e.length;if(r)return Zi(t+=t<0?r:0,r)?e[t]:n}function Rr(e,t,n){t=t.length?mt(t,(function(e){return ma(e)?function(t){return ur(t,1===e.length?e[0]:e)}:e})):[Oo];var r=-1;return t=mt(t,wt(ji())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Ir(e,(function(e,n,i){return{criteria:mt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,s=t.criteria,a=i.length,o=n.length;++r<a;){var c=oi(i[r],s[r]);if(c)return o<=r?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Dr(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var a=t[r],o=ur(e,a);n(o,a)&&Br(s,ei(a,e),o)}return s}function Lr(e,t,n,r){var i=r?Nt:St,s=-1,a=t.length,o=e;for(e===t&&(t=ui(t)),n&&(o=mt(e,wt(n)));++s<a;)for(var c=0,l=t[s],u=n?n(l):l;-1<(c=i(o,u,c,r));)o!==e&&Ot.call(o,c,1),Ot.call(e,c,1);return e}function wr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i,s=t[n];n!=r&&s===i||(Zi(i=s)?Ot.call(e,s,1):Vr(e,s))}}function Mr(e,t){return e+an(mn()*(t-e+1))}function xr(e,t){var n="";if(!(!e||t<1||l<t))for(;t%2&&(n+=e),(t=an(t/2))&&(e+=e),t;);return n}function Pr(e,t){return fs(os(e,t,Oo),e+"")}function Br(e,t,r,i){if(Na(e))for(var s=-1,a=(t=ei(t,e)).length,o=a-1,c=e;null!=c&&++s<a;){var l,u=Ts(t[s]),h=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;jn(c,u,h=s!=o&&(l=c[u],(h=i?i(l,u,c):n)===n)?Na(l)?l:Zi(t[s+1])?[]:{}:h),c=c[u]}return e}var Fr=yn?function(e,t){return yn.set(e,t),e}:Oo;$e=en?function(e,t){return en(e,"toString",{configurable:!0,enumerable:!1,value:Io(t),writable:!0})}:Oo;function Ur(e,t,n){var r=-1,i=e.length;(n=i<n?i:n)<0&&(n+=i),i=n<(t=t<0?i<-t?0:i+t:t)?0:n-t>>>0,t>>>=0;for(var s=ne(i);++r<i;)s[r]=e[r+t];return s}function Hr(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var s=r+i>>>1,a=e[s];null!==a&&!La(a)&&(n?a<=t:a<t)?r=1+s:i=s}return i}return Gr(e,t,Oo,n)}function Gr(e,t,r,i){var s=0,a=null==e?0:e.length;if(0===a)return 0;for(var o=(t=r(t))!=t,c=null===t,l=La(t),u=t===n;s<a;){var h=an((s+a)/2),f=r(e[h]),p=f!==n,d=null===f,m=f==f,E=La(f);(o?i||m:u?m&&(i||p):c?m&&p&&(i||!d):l?m&&p&&!d&&(i||!E):!d&&!E&&(i?f<=t:f<t))?s=h+1:a=h}return fn(a,4294967294)}function Xr(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var a,o=e[n],c=t?t(o):o;n&&ha(c,a)||(a=c,s[i++]=0===o?0:o)}return s}function jr(e){return"number"==typeof e?e:La(e)?u:+e}function Yr(e){var t;return"string"==typeof e?e:ma(e)?mt(e,Yr)+"":La(e)?kn?kn.call(e):"":"0"==(t=e+"")&&1/e==-1/0?"-0":t}function qr(e,t,n){var r=-1,i=pt,s=e.length,a=!0,o=[],c=o;if(n)a=!1,i=dt;else if(200<=s){var l=t?null:Ri(e);if(l)return qt(l);a=!1,i=xt,c=new Fn}else c=t?[]:o;e:for(;++r<s;){var u=e[r],h=t?t(u):u;u=n||0!==u?u:0;if(a&&h==h){for(var f=c.length;f--;)if(c[f]===h)continue e;t&&c.push(h),o.push(u)}else i(c,h,n)||(c!==o&&c.push(h),o.push(u))}return o}function Vr(e,t){return null==(e=cs(e,t=ei(t,e)))||delete e[Ts(Ns(t))]}function $r(e,t,n,r){return Br(e,t,n(ur(e,t)),r)}function Kr(e,t,n,r){for(var i=e.length,s=r?i:-1;(r?s--:++s<i)&&t(e[s],s,e););return n?Ur(e,r?0:s,r?s+1:i):Ur(e,r?s+1:0,r?i:s)}function Wr(e,t){var n=e;return Tt(t,(function(e,t){return t.func.apply(t.thisArg,Et([e],t.args))}),e instanceof Mn?e.value():n)}function zr(e,t,n){var r=e.length;if(r<2)return r?qr(e[0]):[];for(var i=-1,s=ne(r);++i<r;)for(var a=e[i],o=-1;++o<r;)o!=i&&(s[i]=Zn(s[i]||a,e[o],t,n));return qr(ir(s,1),t,n)}function Qr(e,t,r){for(var i=-1,s=e.length,a=t.length,o={};++i<s;){var c=i<a?t[i]:n;r(o,e[i],c)}return o}function Jr(e){return _a(e)?e:[]}function Zr(e){return"function"==typeof e?e:Oo}function ei(e,t){return ma(e)?e:ts(e,t)?[e]:Es(Xa(e))}var ti=Pr;function ni(e,t,r){var i=e.length;return r=r===n?i:r,!t&&i<=r?e:Ur(e,t,r)}var ri=tn||function(e){return Je.clearTimeout(e)};function ii(e,t){return t?e.slice():(t=e.length,t=Qe?Qe(t):new e.constructor(t),e.copy(t),t)}function si(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function ai(e,t){return t=t?si(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.length)}function oi(e,t){if(e!==t){var r=e!==n,i=null===e,s=e==e,a=La(e),o=t!==n,c=null===t,l=t==t,u=La(t);if(!c&&!u&&!a&&t<e||a&&o&&l&&!c&&!u||i&&o&&l||!r&&l||!s)return 1;if(!i&&!a&&!u&&e<t||u&&r&&s&&!i&&!a||c&&r&&s||!o&&s||!l)return-1}return 0}function ci(e,t,n,r){for(var i=-1,s=e.length,a=n.length,o=-1,c=t.length,l=hn(s-a,0),u=ne(c+l),h=!r;++o<c;)u[o]=t[o];for(;++i<a;)(h||i<s)&&(u[n[i]]=e[i]);for(;l--;)u[o++]=e[i++];return u}function li(e,t,n,r){for(var i=-1,s=e.length,a=-1,o=n.length,c=-1,l=t.length,u=hn(s-o,0),h=ne(u+l),f=!r;++i<u;)h[i]=e[i];for(var p=i;++c<l;)h[p+c]=t[c];for(;++a<o;)(f||i<s)&&(h[p+n[a]]=e[i++]);return h}function ui(e,t){var n=-1,r=e.length;for(t=t||ne(r);++n<r;)t[n]=e[n];return t}function hi(e,t,r,i){var s=!r;r=r||{};for(var a=-1,o=t.length;++a<o;){var c=t[a],l=i?i(r[c],e[c],c,r,e):n;(s?$n:jn)(r,c,l===n?e[c]:l)}return r}function fi(e,t){return function(n,r){var i=ma(n)?lt:qn,s=t?t():{};return i(n,e,ji(r,2),s)}}function pi(e){return Pr((function(t,r){var i=-1,s=r.length,a=1<s?r[s-1]:n,o=2<s?r[2]:n;a=3<e.length&&"function"==typeof a?(s--,a):n;for(o&&es(r[0],r[1],o)&&(a=s<3?n:a,s=1),t=Se(t);++i<s;){var c=r[i];c&&e(t,c,i,a)}return t}))}function di(e,t){return function(n,r){if(null!=n){if(!Ta(n))return e(n,r);for(var i=n.length,s=t?i:-1,a=Se(n);(t?s--:++s<i)&&!1!==r(a[s],s,a););}return n}}function mi(e){return function(t,n,r){for(var i=-1,s=Se(t),a=r(t),o=a.length;o--;){var c=a[e?o:++i];if(!1===n(s[c],c,s))break}return t}}function Ei(e){return function(t){var r=(i=Gt(t=Xa(t))?$t(t):n)?i[0]:t.charAt(0),i=i?ni(i,1).join(""):t.slice(1);return r[e]()+i}}function Ti(e){return function(t){return Tt(vo(po(t).replace(Be,"")),e,"")}}function _i(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Dn(e.prototype),r=e.apply(n,t);return Na(r)?r:n}}function gi(e){return function(t,r,i){var s,a=Se(t);return Ta(t)||(s=ji(r,3),t=to(t),r=function(e){return s(a[e],e,a)}),-1<(r=e(t,r,i))?a[s?t[r]:r]:n}}function Ai(e){return Bi((function(t){var i=t.length,s=i,a=wn.prototype.thru;for(e&&t.reverse();s--;){var o=t[s];if("function"!=typeof o)throw new be(r);a&&!u&&"wrapper"==Gi(o)&&(u=new wn([],!0))}for(s=u?s:i;++s<i;)var c=Gi(o=t[s]),l="wrapper"==c?Hi(o):n,u=l&&ns(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[Gi(l[0])].apply(u,l[3]):1==o.length&&ns(o)?u[c]():u.thru(o);return function(){var e=arguments,n=e[0];if(u&&1==e.length&&ma(n))return u.plant(n).value();for(var r=0,s=i?t[r].apply(this,e):n;++r<i;)s=t[r].call(this,s);return s}}))}function yi(e,t,r,i,s,a,c,l,u,h){var f=t&o,p=1&t,d=2&t,m=24&t,E=512&t,T=d?n:_i(e);return function o(){for(var _,g,A=arguments.length,y=ne(A),v=A;v--;)y[v]=arguments[v];return m&&(g=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(y,_=Xi(o))),i&&(y=ci(y,i,s,m)),a&&(y=li(y,a,c,m)),A-=g,m&&A<h?(g=Yt(y,_),Oi(e,t,yi,o.placeholder,r,y,g,l,u,h-A)):(_=p?r:this,g=d?_[e]:e,A=y.length,l?y=function(e,t){for(var r=e.length,i=fn(t.length,r),s=ui(e);i--;){var a=t[i];e[i]=Zi(a,r)?s[a]:n}return e}(y,l):E&&1<A&&y.reverse(),f&&u<A&&(y.length=u),(g=this&&this!==Je&&this instanceof o?T||_i(g):g).apply(_,y))}}function vi(e,t){return function(n,r){return function(e,t,n,r){return or(e,(function(e,i,s){t(r,n(e),i,s)})),r}(n,e,t(r),{})}}function Si(e,t){return function(r,i){var s;if(r===n&&i===n)return t;if(r!==n&&(s=r),i!==n){if(s===n)return i;i=("string"==typeof r||"string"==typeof i?(r=Yr(r),Yr):(r=jr(r),jr))(i),s=e(r,i)}return s}}function Ni(e){return Bi((function(t){return t=mt(t,wt(ji())),Pr((function(n){var r=this;return e(t,(function(e){return ct(e,r,n)}))}))}))}function Ii(e,t){var r=(t=t===n?" ":Yr(t)).length;return r<2?r?xr(t,e):t:(r=xr(t,sn(e/Vt(t))),Gt(t)?ni($t(r),0,e).join(""):r.slice(0,e))}function bi(e){return function(t,r,i){return i&&"number"!=typeof i&&es(t,r,i)&&(r=i=n),t=Ba(t),r===n?(r=t,t=0):r=Ba(r),function(e,t,n,r){for(var i=-1,s=hn(sn((t-e)/(n||1)),0),a=ne(s);s--;)a[r?s:++i]=e,e+=n;return a}(t,r,i=i===n?t<r?1:-1:Ba(i),e)}}function Ci(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Ha(t),n=Ha(n)),e(t,n)}}function Oi(e,t,r,i,s,o,c,l,u,h){var f=8&t;4&(t=(t|(f?a:64))&~(f?64:a))||(t&=-4),s=[e,t,s,f?o:n,f?c:n,f?n:o,f?n:c,l,u,h],o=r.apply(n,s);return ns(e)&&us(o,s),o.placeholder=i,ps(o,e,t)}function ki(e){var t=ve[e];return function(e,n){var r;return e=Ha(e),(n=null==n?0:fn(Fa(n),292))&&cn(e)?(r=(Xa(e)+"e").split("e"),+((r=(Xa(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))):t(e)}}var Ri=gn&&1/qt(new gn([,-0]))[1]==c?function(e){return new gn(e)}:wo;function Di(e){return function(t){var n=Wi(t);return n==A?Xt(t):n==I?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return mt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Li(e,t,i,c,l,u,h,f){var p,d,m,E=2&t;if(E||"function"==typeof e)return(p=c?c.length:0)||(t&=-97,c=l=n),h=h===n?h:hn(Fa(h),0),f=f===n?f:Fa(f),p-=l?l.length:0,64&t&&(m=c,d=l,c=l=n),m=[e,t,i,c,l,m,d,u,h,f],(d=E?n:Hi(e))&&function(e,t){var n,r=e[1],i=t[1],a=r|i,c=i==o&&8==r||i==o&&256==r&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==r;(a<131||c)&&(1&i&&(e[2]=t[2],a|=1&r?0:4),(c=t[3])&&(n=e[3],e[3]=n?ci(n,c,t[4]):c,e[4]=n?Yt(e[3],s):t[4]),(c=t[5])&&(n=e[5],e[5]=n?li(n,c,t[6]):c,e[6]=n?Yt(e[5],s):t[6]),(c=t[7])&&(e[7]=c),i&o&&(e[8]=null==e[8]?t[8]:fn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=a)}(m,d),e=m[0],t=m[1],i=m[2],c=m[3],l=m[4],!(f=m[9]=m[9]===n?E?0:e.length:hn(m[9]-p,0))&&24&t&&(t&=-25),u=t&&1!=t?8==t||16==t?function(e,t,r){var i=_i(e);return function s(){for(var a=arguments.length,o=ne(a),c=a,l=Xi(s);c--;)o[c]=arguments[c];return(a-=(l=a<3&&o[0]!==l&&o[a-1]!==l?[]:Yt(o,l)).length)<r?Oi(e,t,yi,s.placeholder,n,o,l,n,n,r-a):ct(this&&this!==Je&&this instanceof s?i:e,this,o)}}(e,t,f):t!=a&&33!=t||l.length?yi.apply(n,m):function(e,t,n,r){var i=1&t,s=_i(e);return function t(){for(var a=-1,o=arguments.length,c=-1,l=r.length,u=ne(l+o),h=this&&this!==Je&&this instanceof t?s:e;++c<l;)u[c]=r[c];for(;o--;)u[c++]=arguments[++a];return ct(h,i?n:this,u)}}(e,t,i,c):function(e,t,n){var r=1&t,i=_i(e);return function t(){return(this&&this!==Je&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,i),ps((d?Fr:us)(u,m),e,t);throw new be(r)}function wi(e,t,r,i){return e===n||ha(e,ke[r])&&!Le.call(i,r)?t:e}function Mi(e,t,r,i,s,a){return Na(e)&&Na(t)&&(a.set(t,e),Or(e,t,n,Mi,a),a.delete(t)),e}function xi(e){return Oa(e)?n:e}function Pi(e,t,r,i,s,a){var o=1&r,c=e.length;if(c!=(l=t.length)&&!(o&&c<l))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var h=-1,f=!0,p=2&r?new Fn:n;for(a.set(e,t),a.set(t,e);++h<c;){var d,m=e[h],E=t[h];if((d=i?o?i(E,m,h,t,e,a):i(m,E,h,e,t,a):d)!==n){if(d)continue;f=!1;break}if(p){if(!gt(t,(function(e,t){return!xt(p,t)&&(m===e||s(m,e,r,i,a))&&p.push(t)}))){f=!1;break}}else if(m!==E&&!s(m,E,r,i,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function Bi(e){return fs(os(e,n,vs),e+"")}function Fi(e){return hr(e,to,$i)}function Ui(e){return hr(e,no,Ki)}var Hi=yn?function(e){return yn.get(e)}:wo;function Gi(e){for(var t=e.name+"",n=vn[t],r=Le.call(vn,t)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==e)return i.name}return t}function Xi(e){return(Le.call(Rn,"placeholder")?Rn:e).placeholder}function ji(){var e=(e=Rn.iteratee||ko)===ko?vr:e;return arguments.length?e(arguments[0],arguments[1]):e}function Yi(e,t){var n;e=e.__data__;return("string"==(n=typeof t)||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?e["string"==typeof t?"string":"hash"]:e.map}function qi(e){for(var t=to(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ss(i)]}return t}function Vi(e,t){return yr(e=function(e,t){return null==e?n:e[t]}(e,t))?e:n}var $i=on?function(e){return null==e?[]:(e=Se(e),ft(on(e),(function(t){return At.call(e,t)})))}:Ho,Ki=on?function(e){for(var t=[];e;)Et(t,$i(e)),e=Ze(e);return t}:Ho,Wi=fr;function zi(e,t,n){for(var r=-1,i=(t=ei(t,e)).length,s=!1;++r<i;){var a=Ts(t[r]);if(!(s=null!=e&&n(e,a)))break;e=e[a]}return s||++r!=i?s:!!(i=null==e?0:e.length)&&Sa(i)&&Zi(a,i)&&(ma(e)||da(e))}function Qi(e){return"function"!=typeof e.constructor||is(e)?{}:Dn(Ze(e))}function Ji(e){return ma(e)||da(e)||!!(Qt&&e&&e[Qt])}function Zi(e,t){var n=typeof e;return!!(t=null==t?l:t)&&("number"==n||"symbol"!=n&&me.test(e))&&-1<e&&e%1==0&&e<t}function es(e,t,n){var r;return!!Na(n)&&!!("number"==(r=typeof t)?Ta(n)&&Zi(t,n.length):"string"==r&&t in n)&&ha(n[t],e)}function ts(e,t){var n;return!ma(e)&&("number"==(n=typeof e)||"symbol"==n||"boolean"==n||null==e||La(e)||Q.test(e)||!z.test(e)||null!=t&&e in Se(t))}function ns(e){var t=Gi(e),n=Rn[t];return"function"==typeof n&&t in Mn.prototype&&(e===n||(t=Hi(n))&&e===t[0])}(ge&&Wi(new ge(new ArrayBuffer(1)))!=R||Tn&&Wi(new Tn)!=A||_n&&Wi(_n.resolve())!=S||gn&&Wi(new gn)!=I||t&&Wi(new t)!=O)&&(Wi=function(e){var t=fr(e);if(e=(e=t==v?e.constructor:n)?_s(e):"")switch(e){case Sn:return R;case Nn:return A;case In:return S;case bn:return I;case Cn:return O}return t});var rs=Re?ya:Go;function is(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ke)}function ss(e){return e==e&&!Na(e)}function as(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in Se(r))}}function os(e,t,r){return t=hn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=hn(n.length-t,0),a=ne(s);++i<s;)a[i]=n[t+i];i=-1;for(var o=ne(t+1);++i<t;)o[i]=n[i];return o[t]=r(a),ct(e,this,o)}}function cs(e,t){return t.length<2?e:ur(e,Ur(t,0,-1))}function ls(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var us=ds(Fr),hs=rn||function(e,t){return Je.setTimeout(e,t)},fs=ds($e);function ps(e,t,n){var r=t+"";return fs(e,function(e,t){var n,r=t.length;return r?(t[n=r-1]=(1<r?"& ":"")+t[n],t=t.join(2<r?", ":" "),e.replace(re,"{\n/* [wrapped with "+t+"] */\n")):e}(r,function(e,t){return ut(f,(function(n){var r="_."+n[0];t&n[1]&&!pt(e,r)&&e.push(r)})),e.sort()}(function(){var e=r.match(ie);return e?e[1].split(se):[]}(),n)))}function ds(e){var t=0,r=0;return function(){var i=pn(),s=16-(i-r);if(r=i,0<s){if(800<=++t)return arguments[0]}else t=0;return e.apply(n,arguments)}}function ms(e,t){var r=-1,i=e.length,s=i-1;for(t=t===n?i:t;++r<t;){var a=Mr(r,s),o=e[a];e[a]=e[r],e[r]=o}return e.length=t,e}var Es=function(){var e=aa((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(J,(function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)})),t}),(function(e){return 500===t.size&&t.clear(),e})),t=e.cache;return e}();function Ts(e){var t;return"string"==typeof e||La(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}function _s(e){if(null!=e){try{return De.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function gs(e){var t;return e instanceof Mn?e.clone():((t=new wn(e.__wrapped__,e.__chain__)).__actions__=ui(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t)}function As(e,t,n){var r=null==e?0:e.length;return r?((n=null==n?0:Fa(n))<0&&(n=hn(r+n,0)),vt(e,ji(t,3),n)):-1}function ys(e,t,r){var i,s=null==e?0:e.length;return s?(i=s-1,r!==n&&(i=Fa(r),i=r<0?hn(s+i,0):fn(i,s-1)),vt(e,ji(t,3),i,!0)):-1}function vs(e){return null!=e&&e.length?ir(e,1):[]}function Ss(e){return e&&e.length?e[0]:n}function Ns(e){var t=null==e?0:e.length;return t?e[t-1]:n}function Is(e,t){return e&&e.length&&t&&t.length?Lr(e,t):e}tn=Pr((function(e,t){return _a(e)?Zn(e,ir(t,1,_a,!0)):[]})),ge=Pr((function(e,t){var r=Ns(t);return _a(r)&&(r=n),_a(e)?Zn(e,ir(t,1,_a,!0),ji(r,2)):[]})),_n=Pr((function(e,t){var r=Ns(t);return _a(r)&&(r=n),_a(e)?Zn(e,ir(t,1,_a,!0),n,r):[]})),t=Pr((function(e){var t=mt(e,Jr);return t.length&&t[0]===e[0]?Er(t):[]})),Re=Pr((function(e){var t=Ns(e),r=mt(e,Jr);return t===Ns(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Er(r,ji(t,2)):[]})),rn=Pr((function(e){var t=Ns(e),r=mt(e,Jr);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Er(r,n,t):[]})),$e=Pr(Is);var bs=Bi((function(e,t){var n=null==e?0:e.length,r=Kn(e,t);return wr(e,mt(t,(function(e){return Zi(e,n)?+e:e})).sort(oi)),r}));function Cs(e){return null==e?e:En.call(e)}var Os=Pr((function(e){return qr(ir(e,1,_a,!0))})),ks=Pr((function(e){var t=Ns(e);return _a(t)&&(t=n),qr(ir(e,1,_a,!0),ji(t,2))})),Rs=Pr((function(e){var t="function"==typeof(t=Ns(e))?t:n;return qr(ir(e,1,_a,!0),n,t)}));function Ds(e){var t;return e&&e.length?(t=0,e=ft(e,(function(e){if(_a(e))return t=hn(e.length,t),!0})),Dt(t,(function(t){return mt(e,Ct(t))}))):[]}function Ls(e,t){return e&&e.length?(e=Ds(e),null==t?e:mt(e,(function(e){return ct(t,n,e)}))):[]}var ws=Pr((function(e,t){return _a(e)?Zn(e,t):[]})),Ms=Pr((function(e){return zr(ft(e,_a))})),xs=Pr((function(e){var t=Ns(e);return _a(t)&&(t=n),zr(ft(e,_a),ji(t,2))})),Ps=Pr((function(e){var t="function"==typeof(t=Ns(e))?t:n;return zr(ft(e,_a),n,t)})),Bs=Pr(Ds),Fs=Pr((function(e){var t="function"==typeof(t=1<(t=e.length)?e[t-1]:n)?(e.pop(),t):n;return Ls(e,t)}));function Us(e){return(e=Rn(e)).__chain__=!0,e}function Hs(e,t){return t(e)}var Gs=Bi((function(e){function t(t){return Kn(t,e)}var r=e.length,i=r?e[0]:0,s=this.__wrapped__;return!(1<r||this.__actions__.length)&&s instanceof Mn&&Zi(i)?((s=s.slice(i,+i+(r?1:0))).__actions__.push({func:Hs,args:[t],thisArg:n}),new wn(s,this.__chain__).thru((function(e){return r&&!e.length&&e.push(n),e}))):this.thru(t)})),Xs=fi((function(e,t,n){Le.call(e,n)?++e[n]:$n(e,n,1)})),js=gi(As),Ys=gi(ys);function qs(e,t){return(ma(e)?ut:er)(e,ji(t,3))}function Vs(e,t){return(ma(e)?function(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}:tr)(e,ji(t,3))}var $s=fi((function(e,t,n){Le.call(e,n)?e[n].push(t):$n(e,n,[t])})),Ks=Pr((function(e,t,n){var r=-1,i="function"==typeof t,s=Ta(e)?ne(e.length):[];return er(e,(function(e){s[++r]=i?ct(t,e,n):Tr(e,t,n)})),s})),Ws=fi((function(e,t,n){$n(e,n,t)}));function zs(e,t){return(ma(e)?mt:Ir)(e,ji(t,3))}var Qs=fi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Js=Pr((function(e,t){var n;return null==e?[]:(1<(n=t.length)&&es(e,t[0],t[1])?t=[]:2<n&&es(t[0],t[1],t[2])&&(t=[t[0]]),Rr(e,ir(t,1),[]))})),Zs=nn||function(){return Je.Date.now()};function ea(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Li(e,o,n,n,n,n,t)}function ta(e,t){var i;if("function"!=typeof t)throw new be(r);return e=Fa(e),function(){return 0<--e&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var na=Pr((function(e,t,n){var r,i=1;return n.length&&(r=Yt(n,Xi(na)),i|=a),Li(e,i,t,n,r)})),ra=Pr((function(e,t,n){var r,i=3;return n.length&&(r=Yt(n,Xi(ra)),i|=a),Li(t,i,e,n,r)}));function ia(e,t,i){var s,a,o,c,l,u,h=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new be(r);function m(t){var r=s,i=a;return s=a=n,h=t,c=e.apply(i,r)}function E(e){var r=e-u;return u===n||t<=r||r<0||p&&o<=e-h}function T(){var e=Zs();if(E(e))return _(e);l=hs(T,function(e){var n=t-(e-u);return p?fn(n,o-(e-h)):n}(e))}function _(e){return l=n,d&&s?m(e):(s=a=n,c)}function g(){var e=Zs(),r=E(e);if(s=arguments,a=this,u=e,r){if(l===n)return function(e){return h=e,l=hs(T,t),f?m(e):c}(u);if(p)return ri(l),l=hs(T,t),m(u)}return l===n&&(l=hs(T,t)),c}return t=Ha(t)||0,Na(i)&&(f=!!i.leading,o=(p="maxWait"in i)?hn(Ha(i.maxWait)||0,t):o,d="trailing"in i?!!i.trailing:d),g.cancel=function(){l!==n&&ri(l),h=0,s=u=a=l=n},g.flush=function(){return l===n?c:_(Zs())},g}nn=Pr((function(e,t){return Jn(e,1,t)}));var sa=Pr((function(e,t,n){return Jn(e,Ha(t)||0,n)}));function aa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new be(r);function n(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;return s.has(i)?s.get(i):(r=e.apply(this,r),n.cache=s.set(i,r)||s,r)}return n.cache=new(aa.Cache||Bn),n}function oa(e){if("function"!=typeof e)throw new be(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}aa.Cache=Bn;ti=ti((function(e,t){var n=(t=1==t.length&&ma(t[0])?mt(t[0],wt(ji())):mt(ir(t,1),wt(ji()))).length;return Pr((function(r){for(var i=-1,s=fn(r.length,n);++i<s;)r[i]=t[i].call(this,r[i]);return ct(e,this,r)}))}));var ca=Pr((function(e,t){var r=Yt(t,Xi(ca));return Li(e,a,n,t,r)})),la=Pr((function(e,t){var r=Yt(t,Xi(la));return Li(e,64,n,t,r)})),ua=Bi((function(e,t){return Li(e,256,n,n,n,t)}));function ha(e,t){return e===t||e!=e&&t!=t}var fa=Ci(pr),pa=Ci((function(e,t){return t<=e})),da=_r(function(){return arguments}())?_r:function(e){return Ia(e)&&Le.call(e,"callee")&&!At.call(e,"callee")},ma=ne.isArray,Ea=nt?wt(nt):function(e){return Ia(e)&&fr(e)==k};function Ta(e){return null!=e&&Sa(e.length)&&!ya(e)}function _a(e){return Ia(e)&&Ta(e)}var ga=Oe||Go;Oe=rt?wt(rt):function(e){return Ia(e)&&fr(e)==E};function Aa(e){var t;return!!Ia(e)&&((t=fr(e))==T||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Oa(e))}function ya(e){return!!Na(e)&&((e=fr(e))==_||e==g||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function va(e){return"number"==typeof e&&e==Fa(e)}function Sa(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=l}function Na(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ia(e){return null!=e&&"object"==typeof e}var ba=it?wt(it):function(e){return Ia(e)&&Wi(e)==A};function Ca(e){return"number"==typeof e||Ia(e)&&fr(e)==y}function Oa(e){return!(!Ia(e)||fr(e)!=v)&&(null===(e=Ze(e))||"function"==typeof(e=Le.call(e,"constructor")&&e.constructor)&&e instanceof e&&De.call(e)==Pe)}var ka=st?wt(st):function(e){return Ia(e)&&fr(e)==N},Ra=at?wt(at):function(e){return Ia(e)&&Wi(e)==I};function Da(e){return"string"==typeof e||!ma(e)&&Ia(e)&&fr(e)==b}function La(e){return"symbol"==typeof e||Ia(e)&&fr(e)==C}var wa=ot?wt(ot):function(e){return Ia(e)&&Sa(e.length)&&!!qe[fr(e)]},Ma=Ci(Nr),xa=Ci((function(e,t){return e<=t}));function Pa(e){var t;return e?Ta(e)?(Da(e)?$t:ui)(e):Jt&&e[Jt]?function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Jt]()):((t=Wi(e))==A?Xt:t==I?qt:uo)(e):[]}function Ba(e){return e?(e=Ha(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Fa(e){var t=(e=Ba(e))%1;return e==e?t?e-t:e:0}function Ua(e){return e?Wn(Fa(e),0,h):0}function Ha(e){if("number"==typeof e)return e;if(La(e))return u;if("string"!=typeof(e=Na(e)?Na(t="function"==typeof e.valueOf?e.valueOf():e)?t+"":t:e))return 0===e?e:+e;e=Lt(e);var t=fe.test(e);return t||de.test(e)?We(e.slice(2),t?2:8):he.test(e)?u:+e}function Ga(e){return hi(e,no(e))}function Xa(e){return null==e?"":Yr(e)}var ja=pi((function(e,t){if(is(t)||Ta(t))hi(t,to(t),e);else for(var n in t)Le.call(t,n)&&jn(e,n,t[n])})),Ya=pi((function(e,t){hi(t,no(t),e)})),qa=pi((function(e,t,n,r){hi(t,no(t),e,r)})),Va=pi((function(e,t,n,r){hi(t,to(t),e,r)})),$a=Bi(Kn),Ka=Pr((function(e,t){e=Se(e);var r=-1,i=t.length,s=2<i?t[2]:n;for(s&&es(t[0],t[1],s)&&(i=1);++r<i;)for(var a=t[r],o=no(a),c=-1,l=o.length;++c<l;){var u=o[c],h=e[u];(h===n||ha(h,ke[u])&&!Le.call(e,u))&&(e[u]=a[u])}return e})),Wa=Pr((function(e){return e.push(n,Mi),ct(io,n,e)}));function za(e,t,r){return(e=null==e?n:ur(e,t))===n?r:e}function Qa(e,t){return null!=e&&zi(e,t,mr)}var Ja=vi((function(e,t,n){e[t=null!=t&&"function"!=typeof t.toString?xe.call(t):t]=n}),Io(Oo)),Za=vi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xe.call(t)),Le.call(e,t)?e[t].push(n):e[t]=[n]}),ji),eo=Pr(Tr);function to(e){return(Ta(e)?Hn:Sr)(e)}function no(e){return Ta(e)?Hn(e,!0):function(e){if(!Na(e))return function(e){var t=[];if(null!=e)for(var n in Se(e))t.push(n);return t}(e);var t,n=is(e),r=[];for(t in e)("constructor"!=t||!n&&Le.call(e,t))&&r.push(t);return r}(e)}var ro=pi((function(e,t,n){Or(e,t,n)})),io=pi((function(e,t,n,r){Or(e,t,n,r)})),so=Bi((function(e,t){var n={};if(null!=e){var r=!1;t=mt(t,(function(t){return t=ei(t,e),r=r||1<t.length,t})),hi(e,Ui(e),n),r&&(n=zn(n,7,xi));for(var i=t.length;i--;)Vr(n,t[i])}return n})),ao=Bi((function(e,t){return null==e?{}:function(e,t){return Dr(e,t,(function(t,n){return Qa(e,n)}))}(e,t)}));function oo(e,t){var n;return null==e?{}:(n=mt(Ui(e),(function(e){return[e]})),t=ji(t),Dr(e,n,(function(e,n){return t(e,n[0])})))}var co=Di(to),lo=Di(no);function uo(e){return null==e?[]:Mt(e,to(e))}var ho=Ti((function(e,t,n){return t=t.toLowerCase(),e+(n?fo(t):t)}));function fo(e){return yo(Xa(e).toLowerCase())}function po(e){return(e=Xa(e))&&e.replace(Ee,Ft).replace(Fe,"")}var mo=Ti((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Eo=Ti((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),To=Ei("toLowerCase"),_o=Ti((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),go=Ti((function(e,t,n){return e+(n?" ":"")+yo(t)})),Ao=Ti((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),yo=Ei("toUpperCase");function vo(e,t,r){return e=Xa(e),(t=r?n:t)===n?(function(e){return Xe.test(e)}(e)?function(e){return e.match(He)||[]}:function(e){return e.match(ae)||[]})(e):e.match(t)||[]}var So=Pr((function(e,t){try{return ct(e,n,t)}catch(e){return Aa(e)?e:new Ae(e)}})),No=Bi((function(e,t){return ut(t,(function(t){t=Ts(t),$n(e,t,na(e[t],e))})),e}));function Io(e){return function(){return e}}var bo=Ai(),Co=Ai(!0);function Oo(e){return e}function ko(e){return vr("function"==typeof e?e:zn(e,1))}var Ro=Pr((function(e,t){return function(n){return Tr(n,e,t)}})),Do=Pr((function(e,t){return function(n){return Tr(e,n,t)}}));function Lo(e,t,n){var r=to(t),i=lr(t,r),s=(null!=n||Na(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=lr(t,to(t))),!(Na(n)&&"chain"in n&&!n.chain)),a=ya(e);return ut(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t,n=this.__chain__;return s||n?(((t=e(this.__wrapped__)).__actions__=ui(this.__actions__)).push({func:r,args:arguments,thisArg:e}),t.__chain__=n,t):r.apply(e,Et([this.value()],arguments))})})),e}function wo(){}var Mo=Ni(mt),xo=Ni(ht),Po=Ni(gt);function Bo(e){return ts(e)?Ct(Ts(e)):function(e){return function(t){return ur(t,e)}}(e)}var Fo=bi(),Uo=bi(!0);function Ho(){return[]}function Go(){return!1}var Xo,jo=Si((function(e,t){return e+t}),0),Yo=ki("ceil"),qo=Si((function(e,t){return e/t}),1),Vo=ki("floor"),$o=Si((function(e,t){return e*t}),1),Ko=ki("round"),Wo=Si((function(e,t){return e-t}),0);return Rn.after=function(e,t){if("function"!=typeof t)throw new be(r);return e=Fa(e),function(){if(--e<1)return t.apply(this,arguments)}},Rn.ary=ea,Rn.assign=ja,Rn.assignIn=Ya,Rn.assignInWith=qa,Rn.assignWith=Va,Rn.at=$a,Rn.before=ta,Rn.bind=na,Rn.bindAll=No,Rn.bindKey=ra,Rn.castArray=function(){var e;return arguments.length?ma(e=arguments[0])?e:[e]:[]},Rn.chain=Us,Rn.chunk=function(e,t,r){t=(r?es(e,t,r):t===n)?1:hn(Fa(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,a=0,o=ne(sn(i/t));s<i;)o[a++]=Ur(e,s,s+=t);return o},Rn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var s=e[t];s&&(i[r++]=s)}return i},Rn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ne(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Et(ma(n)?ui(n):[n],ir(t,1))},Rn.cond=function(e){var t=null==e?0:e.length,n=ji();return e=t?mt(e,(function(e){if("function"!=typeof e[1])throw new be(r);return[n(e[0]),e[1]]})):[],Pr((function(n){for(var r=-1;++r<t;){var i=e[r];if(ct(i[0],this,n))return ct(i[1],this,n)}}))},Rn.conforms=function(e){return function(e){var t=to(e);return function(n){return Qn(n,e,t)}}(zn(e,1))},Rn.constant=Io,Rn.countBy=Xs,Rn.create=function(e,t){return e=Dn(e),null==t?e:Vn(e,t)},Rn.curry=function e(t,r,i){return(t=Li(t,8,n,n,n,n,n,r=i?n:r)).placeholder=e.placeholder,t},Rn.curryRight=function e(t,r,i){return(t=Li(t,16,n,n,n,n,n,r=i?n:r)).placeholder=e.placeholder,t},Rn.debounce=ia,Rn.defaults=Ka,Rn.defaultsDeep=Wa,Rn.defer=nn,Rn.delay=sa,Rn.difference=tn,Rn.differenceBy=ge,Rn.differenceWith=_n,Rn.drop=function(e,t,r){var i=null==e?0:e.length;return i?Ur(e,(t=r||t===n?1:Fa(t))<0?0:t,i):[]},Rn.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?Ur(e,0,(t=i-(r||t===n?1:Fa(t)))<0?0:t):[]},Rn.dropRightWhile=function(e,t){return e&&e.length?Kr(e,ji(t,3),!0,!0):[]},Rn.dropWhile=function(e,t){return e&&e.length?Kr(e,ji(t,3),!0):[]},Rn.fill=function(e,t,r,i){var s=null==e?0:e.length;return s?(r&&"number"!=typeof r&&es(e,t,r)&&(r=0,i=s),function(e,t,r,i){var s=e.length;for((r=Fa(r))<0&&(r=s<-r?0:s+r),(i=i===n||s<i?s:Fa(i))<0&&(i+=s),i=i<r?0:Ua(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},Rn.filter=function(e,t){return(ma(e)?ft:rr)(e,ji(t,3))},Rn.flatMap=function(e,t){return ir(zs(e,t),1)},Rn.flatMapDeep=function(e,t){return ir(zs(e,t),c)},Rn.flatMapDepth=function(e,t,r){return r=r===n?1:Fa(r),ir(zs(e,t),r)},Rn.flatten=vs,Rn.flattenDeep=function(e){return null!=e&&e.length?ir(e,c):[]},Rn.flattenDepth=function(e,t){return null!=e&&e.length?ir(e,t=t===n?1:Fa(t)):[]},Rn.flip=function(e){return Li(e,512)},Rn.flow=bo,Rn.flowRight=Co,Rn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Rn.functions=function(e){return null==e?[]:lr(e,to(e))},Rn.functionsIn=function(e){return null==e?[]:lr(e,no(e))},Rn.groupBy=$s,Rn.initial=function(e){return null!=e&&e.length?Ur(e,0,-1):[]},Rn.intersection=t,Rn.intersectionBy=Re,Rn.intersectionWith=rn,Rn.invert=Ja,Rn.invertBy=Za,Rn.invokeMap=Ks,Rn.iteratee=ko,Rn.keyBy=Ws,Rn.keys=to,Rn.keysIn=no,Rn.map=zs,Rn.mapKeys=function(e,t){var n={};return t=ji(t,3),or(e,(function(e,r,i){$n(n,t(e,r,i),e)})),n},Rn.mapValues=function(e,t){var n={};return t=ji(t,3),or(e,(function(e,r,i){$n(n,r,t(e,r,i))})),n},Rn.matches=function(e){return br(zn(e,1))},Rn.matchesProperty=function(e,t){return Cr(e,zn(t,1))},Rn.memoize=aa,Rn.merge=ro,Rn.mergeWith=io,Rn.method=Ro,Rn.methodOf=Do,Rn.mixin=Lo,Rn.negate=oa,Rn.nthArg=function(e){return e=Fa(e),Pr((function(t){return kr(t,e)}))},Rn.omit=so,Rn.omitBy=function(e,t){return oo(e,oa(ji(t)))},Rn.once=function(e){return ta(2,e)},Rn.orderBy=function(e,t,r,i){return null==e?[]:Rr(e,t=ma(t)?t:null==t?[]:[t],r=ma(r=i?n:r)?r:null==r?[]:[r])},Rn.over=Mo,Rn.overArgs=ti,Rn.overEvery=xo,Rn.overSome=Po,Rn.partial=ca,Rn.partialRight=la,Rn.partition=Qs,Rn.pick=ao,Rn.pickBy=oo,Rn.property=Bo,Rn.propertyOf=function(e){return function(t){return null==e?n:ur(e,t)}},Rn.pull=$e,Rn.pullAll=Is,Rn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Lr(e,t,ji(n,2)):e},Rn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Lr(e,t,n,r):e},Rn.pullAt=bs,Rn.range=Fo,Rn.rangeRight=Uo,Rn.rearg=ua,Rn.reject=function(e,t){return(ma(e)?ft:rr)(e,oa(ji(t,3)))},Rn.remove=function(e,t){var n=[];if(e&&e.length){var r=-1,i=[],s=e.length;for(t=ji(t,3);++r<s;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}wr(e,i)}return n},Rn.rest=function(e,t){if("function"!=typeof e)throw new be(r);return Pr(e,t=t===n?t:Fa(t))},Rn.reverse=Cs,Rn.sampleSize=function(e,t,r){return t=(r?es(e,t,r):t===n)?1:Fa(t),(ma(e)?function(e,t){return ms(ui(e),Wn(t,0,e.length))}:function(e,t){return ms(e=uo(e),Wn(t,0,e.length))})(e,t)},Rn.set=function(e,t,n){return null==e?e:Br(e,t,n)},Rn.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Br(e,t,r,i)},Rn.shuffle=function(e){return(ma(e)?function(e){return ms(ui(e))}:function(e){return ms(uo(e))})(e)},Rn.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r=r&&"number"!=typeof r&&es(e,t,r)?(t=0,i):(t=null==t?0:Fa(t),r===n?i:Fa(r)),Ur(e,t,r)):[]},Rn.sortBy=Js,Rn.sortedUniq=function(e){return e&&e.length?Xr(e):[]},Rn.sortedUniqBy=function(e,t){return e&&e.length?Xr(e,ji(t,2)):[]},Rn.split=function(e,t,r){return r&&"number"!=typeof r&&es(e,t,r)&&(t=r=n),(r=r===n?h:r>>>0)?(e=Xa(e))&&("string"==typeof t||null!=t&&!ka(t))&&!(t=Yr(t))&&Gt(e)?ni($t(e),0,r):e.split(t,r):[]},Rn.spread=function(e,t){if("function"!=typeof e)throw new be(r);return t=null==t?0:hn(Fa(t),0),Pr((function(n){var r=n[t];n=ni(n,0,t);return r&&Et(n,r),ct(e,this,n)}))},Rn.tail=function(e){var t=null==e?0:e.length;return t?Ur(e,1,t):[]},Rn.take=function(e,t,r){return e&&e.length?Ur(e,0,(t=r||t===n?1:Fa(t))<0?0:t):[]},Rn.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?Ur(e,(t=i-(r||t===n?1:Fa(t)))<0?0:t,i):[]},Rn.takeRightWhile=function(e,t){return e&&e.length?Kr(e,ji(t,3),!1,!0):[]},Rn.takeWhile=function(e,t){return e&&e.length?Kr(e,ji(t,3)):[]},Rn.tap=function(e,t){return t(e),e},Rn.throttle=function(e,t,n){var i=!0,s=!0;if("function"!=typeof e)throw new be(r);return Na(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),ia(e,t,{leading:i,maxWait:t,trailing:s})},Rn.thru=Hs,Rn.toArray=Pa,Rn.toPairs=co,Rn.toPairsIn=lo,Rn.toPath=function(e){return ma(e)?mt(e,Ts):La(e)?[e]:ui(Es(Xa(e)))},Rn.toPlainObject=Ga,Rn.transform=function(e,t,n){var r,i=ma(e),s=i||ga(e)||wa(e);return t=ji(t,4),null==n&&(r=e&&e.constructor,n=s?i?new r:[]:Na(e)&&ya(r)?Dn(Ze(e)):{}),(s?ut:or)(e,(function(e,r,i){return t(n,e,r,i)})),n},Rn.unary=function(e){return ea(e,1)},Rn.union=Os,Rn.unionBy=ks,Rn.unionWith=Rs,Rn.uniq=function(e){return e&&e.length?qr(e):[]},Rn.uniqBy=function(e,t){return e&&e.length?qr(e,ji(t,2)):[]},Rn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?qr(e,n,t):[]},Rn.unset=function(e,t){return null==e||Vr(e,t)},Rn.unzip=Ds,Rn.unzipWith=Ls,Rn.update=function(e,t,n){return null==e?e:$r(e,t,Zr(n))},Rn.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:$r(e,t,Zr(r),i)},Rn.values=uo,Rn.valuesIn=function(e){return null==e?[]:Mt(e,no(e))},Rn.without=ws,Rn.words=vo,Rn.wrap=function(e,t){return ca(Zr(t),e)},Rn.xor=Ms,Rn.xorBy=xs,Rn.xorWith=Ps,Rn.zip=Bs,Rn.zipObject=function(e,t){return Qr(e||[],t||[],jn)},Rn.zipObjectDeep=function(e,t){return Qr(e||[],t||[],Br)},Rn.zipWith=Fs,Rn.entries=co,Rn.entriesIn=lo,Rn.extend=Ya,Rn.extendWith=qa,Lo(Rn,Rn),Rn.add=jo,Rn.attempt=So,Rn.camelCase=ho,Rn.capitalize=fo,Rn.ceil=Yo,Rn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=Ha(r))==r?r:0),t!==n&&(t=(t=Ha(t))==t?t:0),Wn(Ha(e),t,r)},Rn.clone=function(e){return zn(e,4)},Rn.cloneDeep=function(e){return zn(e,5)},Rn.cloneDeepWith=function(e,t){return zn(e,5,t="function"==typeof t?t:n)},Rn.cloneWith=function(e,t){return zn(e,4,t="function"==typeof t?t:n)},Rn.conformsTo=function(e,t){return null==t||Qn(e,t,to(t))},Rn.deburr=po,Rn.defaultTo=function(e,t){return null==e||e!=e?t:e},Rn.divide=qo,Rn.endsWith=function(e,t,r){e=Xa(e),t=Yr(t);var i=e.length;i=r=r===n?i:Wn(Fa(r),0,i);return 0<=(r-=t.length)&&e.slice(r,i)==t},Rn.eq=ha,Rn.escape=function(e){return(e=Xa(e))&&V.test(e)?e.replace(Y,Ut):e},Rn.escapeRegExp=function(e){return(e=Xa(e))&&ee.test(e)?e.replace(Z,"\\$&"):e},Rn.every=function(e,t,r){return(ma(e)?ht:function(e,t){var n=!0;return er(e,(function(e,r,i){return n=!!t(e,r,i)})),n})(e,ji(t=r&&es(e,t,r)?n:t,3))},Rn.find=js,Rn.findIndex=As,Rn.findKey=function(e,t){return yt(e,ji(t,3),or)},Rn.findLast=Ys,Rn.findLastIndex=ys,Rn.findLastKey=function(e,t){return yt(e,ji(t,3),cr)},Rn.floor=Vo,Rn.forEach=qs,Rn.forEachRight=Vs,Rn.forIn=function(e,t){return null==e?e:sr(e,ji(t,3),no)},Rn.forInRight=function(e,t){return null==e?e:ar(e,ji(t,3),no)},Rn.forOwn=function(e,t){return e&&or(e,ji(t,3))},Rn.forOwnRight=function(e,t){return e&&cr(e,ji(t,3))},Rn.get=za,Rn.gt=fa,Rn.gte=pa,Rn.has=function(e,t){return null!=e&&zi(e,t,dr)},Rn.hasIn=Qa,Rn.head=Ss,Rn.identity=Oo,Rn.includes=function(e,t,n,r){return e=Ta(e)?e:uo(e),n=n&&!r?Fa(n):0,r=e.length,n<0&&(n=hn(r+n,0)),Da(e)?n<=r&&-1<e.indexOf(t,n):!!r&&-1<St(e,t,n)},Rn.indexOf=function(e,t,n){var r=null==e?0:e.length;return r?St(e,t,e=(e=null==n?0:Fa(n))<0?hn(r+e,0):e):-1},Rn.inRange=function(e,t,r){return t=Ba(t),r===n?(r=t,t=0):r=Ba(r),function(e,t,n){return e>=fn(t,n)&&e<hn(t,n)}(e=Ha(e),t,r)},Rn.invoke=eo,Rn.isArguments=da,Rn.isArray=ma,Rn.isArrayBuffer=Ea,Rn.isArrayLike=Ta,Rn.isArrayLikeObject=_a,Rn.isBoolean=function(e){return!0===e||!1===e||Ia(e)&&fr(e)==m},Rn.isBuffer=ga,Rn.isDate=Oe,Rn.isElement=function(e){return Ia(e)&&1===e.nodeType&&!Oa(e)},Rn.isEmpty=function(e){if(null!=e){if(Ta(e)&&(ma(e)||"string"==typeof e||"function"==typeof e.splice||ga(e)||wa(e)||da(e)))return!e.length;var t,n=Wi(e);if(n==A||n==I)return!e.size;if(is(e))return!Sr(e).length;for(t in e)if(Le.call(e,t))return!1}return!0},Rn.isEqual=function(e,t){return gr(e,t)},Rn.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?gr(e,t,n,r):!!i},Rn.isError=Aa,Rn.isFinite=function(e){return"number"==typeof e&&cn(e)},Rn.isFunction=ya,Rn.isInteger=va,Rn.isLength=Sa,Rn.isMap=ba,Rn.isMatch=function(e,t){return e===t||Ar(e,t,qi(t))},Rn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Ar(e,t,qi(t),r)},Rn.isNaN=function(e){return Ca(e)&&e!=+e},Rn.isNative=function(e){if(rs(e))throw new Ae("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yr(e)},Rn.isNil=function(e){return null==e},Rn.isNull=function(e){return null===e},Rn.isNumber=Ca,Rn.isObject=Na,Rn.isObjectLike=Ia,Rn.isPlainObject=Oa,Rn.isRegExp=ka,Rn.isSafeInteger=function(e){return va(e)&&-9007199254740991<=e&&e<=l},Rn.isSet=Ra,Rn.isString=Da,Rn.isSymbol=La,Rn.isTypedArray=wa,Rn.isUndefined=function(e){return e===n},Rn.isWeakMap=function(e){return Ia(e)&&Wi(e)==O},Rn.isWeakSet=function(e){return Ia(e)&&"[object WeakSet]"==fr(e)},Rn.join=function(e,t){return null==e?"":ln.call(e,t)},Rn.kebabCase=mo,Rn.last=Ns,Rn.lastIndexOf=function(e,t,r){var i,s=null==e?0:e.length;return s?(i=s,r!==n&&(i=(i=Fa(r))<0?hn(s+i,0):fn(i,s-1)),t==t?function(e,t){for(var n=i+1;n--;)if(e[n]===t)return n;return n}(e,t):vt(e,It,i,!0)):-1},Rn.lowerCase=Eo,Rn.lowerFirst=To,Rn.lt=Ma,Rn.lte=xa,Rn.max=function(e){return e&&e.length?nr(e,Oo,pr):n},Rn.maxBy=function(e,t){return e&&e.length?nr(e,ji(t,2),pr):n},Rn.mean=function(e){return bt(e,Oo)},Rn.meanBy=function(e,t){return bt(e,ji(t,2))},Rn.min=function(e){return e&&e.length?nr(e,Oo,Nr):n},Rn.minBy=function(e,t){return e&&e.length?nr(e,ji(t,2),Nr):n},Rn.stubArray=Ho,Rn.stubFalse=Go,Rn.stubObject=function(){return{}},Rn.stubString=function(){return""},Rn.stubTrue=function(){return!0},Rn.multiply=$o,Rn.nth=function(e,t){return e&&e.length?kr(e,Fa(t)):n},Rn.noConflict=function(){return Je._===this&&(Je._=Ue),this},Rn.noop=wo,Rn.now=Zs,Rn.pad=function(e,t,n){e=Xa(e);var r=(t=Fa(t))?Vt(e):0;return!t||t<=r?e:Ii(an(t=(t-r)/2),n)+e+Ii(sn(t),n)},Rn.padEnd=function(e,t,n){e=Xa(e);var r=(t=Fa(t))?Vt(e):0;return t&&r<t?e+Ii(t-r,n):e},Rn.padStart=function(e,t,n){e=Xa(e);var r=(t=Fa(t))?Vt(e):0;return t&&r<t?Ii(t-r,n)+e:e},Rn.parseInt=function(e,t,n){return t=n||null==t?0:t&&+t,dn(Xa(e).replace(te,""),t||0)},Rn.random=function(e,t,r){var i;return r&&"boolean"!=typeof r&&es(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=Ba(e),t===n?(t=e,e=0):t=Ba(t)),t<e&&(i=e,e=t,t=i),r||e%1||t%1?(i=mn(),fn(e+i*(t-e+Ke("1e-"+((i+"").length-1))),t)):Mr(e,t)},Rn.reduce=function(e,t,n){var r=ma(e)?Tt:kt,i=arguments.length<3;return r(e,ji(t,4),n,i,er)},Rn.reduceRight=function(e,t,n){var r=ma(e)?_t:kt,i=arguments.length<3;return r(e,ji(t,4),n,i,tr)},Rn.repeat=function(e,t,r){return t=(r?es(e,t,r):t===n)?1:Fa(t),xr(Xa(e),t)},Rn.replace=function(){var e=arguments,t=Xa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Rn.result=function(e,t,r){var i=-1,s=(t=ei(t,e)).length;for(s||(s=1,e=n);++i<s;){var a=null==e?n:e[Ts(t[i])];a===n&&(i=s,a=r),e=ya(a)?a.call(e):a}return e},Rn.round=Ko,Rn.runInContext=e,Rn.sample=function(e){return(ma(e)?Gn:function(e){return Gn(uo(e))})(e)},Rn.size=function(e){var t;return null==e?0:Ta(e)?Da(e)?Vt(e):e.length:(t=Wi(e))==A||t==I?e.size:Sr(e).length},Rn.snakeCase=_o,Rn.some=function(e,t,r){return(ma(e)?gt:function(e,t){var n;return er(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n})(e,ji(t=r&&es(e,t,r)?n:t,3))},Rn.sortedIndex=function(e,t){return Hr(e,t)},Rn.sortedIndexBy=function(e,t,n){return Gr(e,t,ji(n,2))},Rn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Hr(e,t);if(r<n&&ha(e[r],t))return r}return-1},Rn.sortedLastIndex=function(e,t){return Hr(e,t,!0)},Rn.sortedLastIndexBy=function(e,t,n){return Gr(e,t,ji(n,2),!0)},Rn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Hr(e,t,!0)-1;if(ha(e[n],t))return n}return-1},Rn.startCase=go,Rn.startsWith=function(e,t,n){return e=Xa(e),n=null==n?0:Wn(Fa(n),0,e.length),t=Yr(t),e.slice(n,n+t.length)==t},Rn.subtract=Wo,Rn.sum=function(e){return e&&e.length?Rt(e,Oo):0},Rn.sumBy=function(e,t){return e&&e.length?Rt(e,ji(t,2)):0},Rn.template=function(e,t,r){var i=Rn.templateSettings;r&&es(e,t,r)&&(t=n),e=Xa(e),t=qa({},t,i,wi);var s,a,o=to(r=qa({},t.imports,i.imports,wi)),c=Mt(r,o),l=0,u=(i=t.interpolate||Te,"__p += '"),h=(r=Ne((t.escape||Te).source+"|"+i.source+"|"+(i===W?le:Te).source+"|"+(t.evaluate||Te).source+"|$","g"),"//# sourceURL="+(Le.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ye+"]")+"\n");if(e.replace(r,(function(t,n,r,i,o,c){return r=r||i,u+=e.slice(l,c).replace(_e,Ht),n&&(s=!0,u+="' +\n__e("+n+") +\n'"),o&&(a=!0,u+="';\n"+o+";\n__p += '"),r&&(u+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),u+="';\n",i=Le.call(t,"variable")&&t.variable){if(oe.test(i))throw new Ae("Invalid `variable` option passed into `_.template`")}else u="with (obj) {\n"+u+"\n}\n";if(u=(a?u.replace(H,""):u).replace(G,"$1").replace(X,"$1;"),u="function("+(i||"obj")+") {\n"+(i?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+u+"return __p\n}",(r=So((function(){return ye(o,h+"return "+u).apply(n,c)}))).source=u,Aa(r))throw r;return r},Rn.times=function(e,t){if((e=Fa(e))<1||l<e)return[];var n=h,r=fn(e,h);for(t=ji(t),e-=h,r=Dt(r,t);++n<e;)t(n);return r},Rn.toFinite=Ba,Rn.toInteger=Fa,Rn.toLength=Ua,Rn.toLower=function(e){return Xa(e).toLowerCase()},Rn.toNumber=Ha,Rn.toSafeInteger=function(e){return e?Wn(Fa(e),-9007199254740991,l):0===e?e:0},Rn.toString=Xa,Rn.toUpper=function(e){return Xa(e).toUpperCase()},Rn.trim=function(e,t,r){return(e=Xa(e))&&(r||t===n)?Lt(e):e&&(t=Yr(t))?ni(r=$t(e),Pt(r,t=$t(t)),Bt(r,t)+1).join(""):e},Rn.trimEnd=function(e,t,r){return(e=Xa(e))&&(r||t===n)?e.slice(0,Kt(e)+1):e&&(t=Yr(t))?ni(r=$t(e),0,Bt(r,$t(t))+1).join(""):e},Rn.trimStart=function(e,t,r){return(e=Xa(e))&&(r||t===n)?e.replace(te,""):e&&(t=Yr(t))?ni(r=$t(e),Pt(r,$t(t))).join(""):e},Rn.truncate=function(e,t){var r,i=30,s="...";Na(t)&&(r="separator"in t?t.separator:r,i="length"in t?Fa(t.length):i,s="omission"in t?Yr(t.omission):s),t=(e=Xa(e)).length;if((t=Gt(e)?(a=$t(e)).length:t)<=i)return e;if((t=i-Vt(s))<1)return s;var a;i=a?ni(a,0,t).join(""):e.slice(0,t);if(r!==n)if(a&&(t+=i.length-t),ka(r)){if(e.slice(t).search(r)){var o,c=i;for((r=r.global?r:Ne(r.source,Xa(ue.exec(r))+"g")).lastIndex=0;o=r.exec(c);)var l=o.index;i=i.slice(0,l===n?t:l)}}else e.indexOf(Yr(r),t)!=t&&-1<(a=i.lastIndexOf(r))&&(i=i.slice(0,a));return i+s},Rn.unescape=function(e){return(e=Xa(e))&&q.test(e)?e.replace(j,Wt):e},Rn.uniqueId=function(e){var t=++we;return Xa(e)+t},Rn.upperCase=Ao,Rn.upperFirst=yo,Rn.each=qs,Rn.eachRight=Vs,Rn.first=Ss,Lo(Rn,(Xo={},or(Rn,(function(e,t){Le.call(Rn.prototype,t)||(Xo[t]=e)})),Xo),{chain:!1}),Rn.VERSION="4.17.21",ut(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Rn[e].placeholder=Rn})),ut(["drop","take"],(function(e,t){Mn.prototype[e]=function(r){r=r===n?1:hn(Fa(r),0);var i=this.__filtered__&&!t?new Mn(this):this.clone();return i.__filtered__?i.__takeCount__=fn(r,i.__takeCount__):i.__views__.push({size:fn(r,h),type:e+(i.__dir__<0?"Right":"")}),i},Mn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),ut(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Mn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ji(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),ut(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Mn.prototype[e]=function(){return this[n](1).value()[0]}})),ut(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Mn.prototype[e]=function(){return this.__filtered__?new Mn(this):this[n](1)}})),Mn.prototype.compact=function(){return this.filter(Oo)},Mn.prototype.find=function(e){return this.filter(e).head()},Mn.prototype.findLast=function(e){return this.reverse().find(e)},Mn.prototype.invokeMap=Pr((function(e,t){return"function"==typeof e?new Mn(this):this.map((function(n){return Tr(n,e,t)}))})),Mn.prototype.reject=function(e){return this.filter(oa(ji(e)))},Mn.prototype.slice=function(e,t){e=Fa(e);var r=this;return r.__filtered__&&(0<e||t<0)?new Mn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n?(t=Fa(t))<0?r.dropRight(-t):r.take(t-e):r)},Mn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Mn.prototype.toArray=function(){return this.take(h)},or(Mn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=Rn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);s&&(Rn.prototype[t]=function(){function t(e){return e=s.apply(Rn,Et([e],l)),i&&p?e[0]:e}var o,c=this.__wrapped__,l=i?[1]:arguments,u=c instanceof Mn,h=l[0],f=u||ma(c),p=(f&&r&&"function"==typeof h&&1!=h.length&&(u=f=!1),this.__chain__),d=(h=!!this.__actions__.length,a&&!p);u=u&&!h;return!a&&f?(c=u?c:new Mn(this),(o=e.apply(c,l)).__actions__.push({func:Hs,args:[t],thisArg:n}),new wn(o,p)):d&&u?e.apply(this,l):(o=this.thru(t),d?i?o.value()[0]:o.value():o)})})),ut(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ce[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Rn.prototype[e]=function(){var e,i=arguments;return r&&!this.__chain__?(e=this.value(),t.apply(ma(e)?e:[],i)):this[n]((function(e){return t.apply(ma(e)?e:[],i)}))}})),or(Mn.prototype,(function(e,t){var n,r=Rn[t];r&&(n=r.name+"",Le.call(vn,n)||(vn[n]=[]),vn[n].push({name:t,func:r}))})),vn[yi(n,2).name]=[{name:"wrapper",func:n}],Mn.prototype.clone=function(){var e=new Mn(this.__wrapped__);return e.__actions__=ui(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ui(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ui(this.__views__),e},Mn.prototype.reverse=function(){var e;return this.__filtered__?((e=new Mn(this)).__dir__=-1,e.__filtered__=!0):(e=this.clone()).__dir__*=-1,e},Mn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=ma(e),r=t<0,i=n?e.length:0,s=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],a=s.size;switch(s.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=fn(t,e+a);break;case"takeRight":e=hn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=s.start,o=(s=s.end)-a,c=r?s:a-1,l=this.__iteratees__,u=l.length,h=0,f=fn(o,this.__takeCount__);if(!n||!r&&i==o&&f==o)return Wr(e,this.__actions__);var p=[];e:for(;o--&&h<f;){for(var d=-1,m=e[c+=t];++d<u;){var E=(T=l[d]).iteratee,T=T.type;E=E(m);if(2==T)m=E;else if(!E){if(1==T)continue e;break e}}p[h++]=m}return p},Rn.prototype.at=Gs,Rn.prototype.chain=function(){return Us(this)},Rn.prototype.commit=function(){return new wn(this.value(),this.__chain__)},Rn.prototype.next=function(){this.__values__===n&&(this.__values__=Pa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Rn.prototype.plant=function(e){for(var t,r=this;r instanceof Ln;){var i=gs(r),s=(i.__index__=0,i.__values__=n,t?s.__wrapped__=i:t=i,i);r=r.__wrapped__}return s.__wrapped__=e,t},Rn.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof Mn?((e=(e=this.__actions__.length?new Mn(this):e).reverse()).__actions__.push({func:Hs,args:[Cs],thisArg:n}),new wn(e,this.__chain__)):this.thru(Cs)},Rn.prototype.toJSON=Rn.prototype.valueOf=Rn.prototype.value=function(){return Wr(this.__wrapped__,this.__actions__)},Rn.prototype.first=Rn.prototype.head,Jt&&(Rn.prototype[Jt]=function(){return this}),Rn}();Ze?((Ze.exports=zt)._=zt,ke._=zt):Je._=zt}).call(lr)})),Pu=fr((function(e,t){e.exports=function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),!(t=!(t=!(t="undefined"!=typeof globalThis&&globalThis.crypto?globalThis.crypto:t)&&"undefined"!=typeof window&&window.msCrypto?window.msCrypto:t)&&void 0!==lr&&lr.crypto?lr.crypto:t))try{t=Cl}catch(e){}function n(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")}var r=Object.create||function(){function e(){}return function(t){return e.prototype=t,t=new e,e.prototype=null,t}}(),i={},s=i.lib={},a=s.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=s.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var s=0;s<i;s++){var a=n[s>>>2]>>>24-s%4*8&255;t[r+s>>>2]|=a<<24-(r+s)%4*8}else for(var o=0;o<i;o+=4)t[r+o>>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new o.init(t,e)}}),c=i.enc={},l=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var s=t[i>>>2]>>>24-i%4*8&255;r.push((s>>>4).toString(16)),r.push((15&s).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new o.init(n,t/2)}},u=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var s=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(s))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new o.init(n,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},f=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,s=r.sigBytes,a=this.blockSize,c=s/(4*a),l=(t?e.ceil(c):e.max((0|c)-this._minBufferSize,0))*a;t=e.min(4*l,s);if(l){for(var u=0;u<l;u+=a)this._doProcessBlock(i,u);n=i.splice(0,l),r.sigBytes-=t}return new o.init(n,t)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),p=(s.Hasher=f.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new p.HMAC.init(e,n).finalize(t)}}}),i.algo={});return i}(Math)})),Bu=(fr((function(e,t){var n,r,i;e.exports=(i=(e=Pu).lib,n=i.Base,r=i.WordArray,(i=e.x64={}).Word=n.extend({init:function(e,t){this.high=e,this.low=t}}),i.WordArray=n.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],i=0;i<t;i++){var s=e[i];n.push(s.high),n.push(s.low)}return r.create(n,this.sigBytes)},clone:function(){for(var e=n.clone.call(this),t=e.words=this.words.slice(0),r=t.length,i=0;i<r;i++)t[i]=t[i].clone();return e}}),e)})),fr((function(e,t){var n;e.exports=(n=Pu,function(){var e,t;"function"==typeof ArrayBuffer&&(e=n.lib.WordArray,t=e.init,(e.init=function(e){if((e=(e=e instanceof ArrayBuffer?new Uint8Array(e):e)instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e)instanceof Uint8Array){for(var n=e.byteLength,r=[],i=0;i<n;i++)r[i>>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)}).prototype=e)}(),n.lib.WordArray)})),fr((function(e,t){var n;e.exports=(n=Pu,function(){var e=n.lib.WordArray,t=n.enc;function r(e){return e<<8&4278255360|e>>>8&16711935}t.Utf16=t.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i+=2){var s=t[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(s))}return r.join("")},parse:function(t){for(var n=t.length,r=[],i=0;i<n;i++)r[i>>>1]|=t.charCodeAt(i)<<16-i%2*16;return e.create(r,2*n)}},t.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],s=0;s<n;s+=2){var a=r(t[s>>>2]>>>16-s%4*8&65535);i.push(String.fromCharCode(a))}return i.join("")},parse:function(t){for(var n=t.length,i=[],s=0;s<n;s++)i[s>>>1]|=r(t.charCodeAt(s)<<16-s%2*16);return e.create(i,2*n)}}}(),n.enc.Utf16)})),fr((function(e,t){var n;e.exports=(n=Pu,function(){var e=n,t=e.lib.WordArray;function r(e,n,r){for(var i,s=[],a=0,o=0;o<n;o++)o%4&&(i=r[e.charCodeAt(o-1)]<<o%4*2|r[e.charCodeAt(o)]>>>6-o%4*2,s[a>>>2]|=i<<24-a%4*8,a++);return t.create(s,a)}e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],s=0;s<n;s+=3)for(var a=(t[s>>>2]>>>24-s%4*8&255)<<16|(t[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|t[s+2>>>2]>>>24-(s+2)%4*8&255,o=0;o<4&&s+.75*o<n;o++)i.push(r.charAt(a>>>6*(3-o)&63));var c=r.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,n=this._map;if(!(i=this._reverseMap))for(var i=this._reverseMap=[],s=0;s<n.length;s++)i[n.charCodeAt(s)]=s;var a=n.charAt(64);return a&&-1!==(a=e.indexOf(a))&&(t=a),r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),n.enc.Base64)})),fr((function(e,t){var n;e.exports=(n=Pu,function(){var e=n,t=e.lib.WordArray;function r(e,n,r){for(var i,s=[],a=0,o=0;o<n;o++)o%4&&(i=r[e.charCodeAt(o-1)]<<o%4*2|r[e.charCodeAt(o)]>>>6-o%4*2,s[a>>>2]|=i<<24-a%4*8,a++);return t.create(s,a)}e.enc.Base64url={stringify:function(e,t=!0){var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var s=[],a=0;a<r;a+=3)for(var o=(n[a>>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,c=0;c<4&&a+.75*c<r;c++)s.push(i.charAt(o>>>6*(3-c)&63));var l=i.charAt(64);if(l)for(;s.length%4;)s.push(l);return s.join("")},parse:function(e,t=!0){var n=e.length,i=t?this._safe_map:this._map;if(!(s=this._reverseMap))for(var s=this._reverseMap=[],a=0;a<i.length;a++)s[i.charCodeAt(a)]=a;return(t=i.charAt(64))&&-1!==(t=e.indexOf(t))&&(n=t),r(e,n,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),n.enc.Base64url)})),fr((function(e,t){var n;e.exports=(n=Pu,function(e){var t=n,r=(s=t.lib).WordArray,i=s.Hasher,s=t.algo,a=[];(function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0})(),s=s.MD5=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var s=this._hash.words,h=e[t+0],f=e[t+1],p=e[t+2],d=e[t+3],m=e[t+4],E=e[t+5],T=e[t+6],_=e[t+7],g=e[t+8],A=e[t+9],y=e[t+10],v=e[t+11],S=e[t+12],N=e[t+13],I=e[t+14],b=e[t+15],C=o(s[0],R=s[1],k=s[2],O=s[3],h,7,a[0]),O=o(O,C,R,k,f,12,a[1]),k=o(k,O,C,R,p,17,a[2]),R=o(R,k,O,C,d,22,a[3]);C=o(C,R,k,O,m,7,a[4]),O=o(O,C,R,k,E,12,a[5]),k=o(k,O,C,R,T,17,a[6]),R=o(R,k,O,C,_,22,a[7]);C=o(C,R,k,O,g,7,a[8]),O=o(O,C,R,k,A,12,a[9]),k=o(k,O,C,R,y,17,a[10]),R=o(R,k,O,C,v,22,a[11]),C=o(C,R,k,O,S,7,a[12]),O=o(O,C,R,k,N,12,a[13]),k=o(k,O,C,R,I,17,a[14]),C=c(C,R=o(R,k,O,C,b,22,a[15]),k,O,f,5,a[16]),O=c(O,C,R,k,T,9,a[17]),k=c(k,O,C,R,v,14,a[18]),R=c(R,k,O,C,h,20,a[19]),C=c(C,R,k,O,E,5,a[20]),O=c(O,C,R,k,y,9,a[21]),k=c(k,O,C,R,b,14,a[22]),R=c(R,k,O,C,m,20,a[23]),C=c(C,R,k,O,A,5,a[24]),O=c(O,C,R,k,I,9,a[25]),k=c(k,O,C,R,d,14,a[26]),R=c(R,k,O,C,g,20,a[27]),C=c(C,R,k,O,N,5,a[28]),O=c(O,C,R,k,p,9,a[29]),k=c(k,O,C,R,_,14,a[30]),C=l(C,R=c(R,k,O,C,S,20,a[31]),k,O,E,4,a[32]),O=l(O,C,R,k,g,11,a[33]),k=l(k,O,C,R,v,16,a[34]),R=l(R,k,O,C,I,23,a[35]),C=l(C,R,k,O,f,4,a[36]),O=l(O,C,R,k,m,11,a[37]),k=l(k,O,C,R,_,16,a[38]),R=l(R,k,O,C,y,23,a[39]),C=l(C,R,k,O,N,4,a[40]),O=l(O,C,R,k,h,11,a[41]),k=l(k,O,C,R,d,16,a[42]),R=l(R,k,O,C,T,23,a[43]),C=l(C,R,k,O,A,4,a[44]),O=l(O,C,R,k,S,11,a[45]),k=l(k,O,C,R,b,16,a[46]),C=u(C,R=l(R,k,O,C,p,23,a[47]),k,O,h,6,a[48]),O=u(O,C,R,k,_,10,a[49]),k=u(k,O,C,R,I,15,a[50]),R=u(R,k,O,C,E,21,a[51]),C=u(C,R,k,O,S,6,a[52]),O=u(O,C,R,k,d,10,a[53]),k=u(k,O,C,R,y,15,a[54]),R=u(R,k,O,C,f,21,a[55]),C=u(C,R,k,O,g,6,a[56]),O=u(O,C,R,k,b,10,a[57]),k=u(k,O,C,R,T,15,a[58]),R=u(R,k,O,C,N,21,a[59]),C=u(C,R,k,O,m,6,a[60]),O=u(O,C,R,k,v,10,a[61]),k=u(k,O,C,R,p,15,a[62]),R=u(R,k,O,C,A,21,a[63]),s[0]=s[0]+C|0,s[1]=s[1]+R|0,s[2]=s[2]+k|0,s[3]=s[3]+O|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes,s=(n[i>>>5]|=128<<24-i%32,e.floor(r/4294967296));n[15+(64+i>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[14+(64+i>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(n.length+1),this._process();for(var a=(s=this._hash).words,o=0;o<4;o++){var c=a[o];a[o]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return s},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function o(e,t,n,r,i,s,a){return((e=e+(t&n|~t&r)+i+a)<<s|e>>>32-s)+t}function c(e,t,n,r,i,s,a){return((e=e+(t&r|n&~r)+i+a)<<s|e>>>32-s)+t}function l(e,t,n,r,i,s,a){return((e=e+(t^n^r)+i+a)<<s|e>>>32-s)+t}function u(e,t,n,r,i,s,a){return((e=e+(n^(t|~r))+i+a)<<s|e>>>32-s)+t}t.MD5=i._createHelper(s),t.HmacMD5=i._createHmacHelper(s)}(Math),n.MD5)})),fr((function(e,t){var n;e.exports=(n=Pu,function(){var e=n,t=(i=e.lib).WordArray,r=i.Hasher,i=e.algo,s=[];i=i.SHA1=r.extend({_doReset:function(){this._hash=new t.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],c=n[4],l=0;l<80;l++){s[l]=l<16?0|e[t+l]:(u=s[l-3]^s[l-8]^s[l-14]^s[l-16])<<1|u>>>31;var u=(r<<5|r>>>27)+c+s[l];u+=l<20?1518500249+(i&a|~i&o):l<40?1859775393+(i^a^o):l<60?(i&a|i&o|a&o)-1894007588:(i^a^o)-899497514,c=o,o=a,a=i<<30|i>>>2,i=r,r=u}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(64+r>>>9<<4)]=Math.floor(n/4294967296),t[15+(64+r>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=r._createHelper(i),e.HmacSHA1=r._createHmacHelper(i)}(),n.SHA1)})),fr((function(e,t){var n;e.exports=(n=Pu,function(e){var t=n,r=(s=t.lib).WordArray,i=s.Hasher,s=t.algo,a=[],o=[],c=(function(){function t(e){return 4294967296*(e-(0|e))|0}for(var n=2,r=0;r<64;)!function(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return;return 1}(n)||(r<8&&(a[r]=t(e.pow(n,.5))),o[r]=t(e.pow(n,1/3)),r++),n++}(),[]);s=s.SHA256=i.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],l=n[4],u=n[5],h=n[6],f=n[7],p=0;p<64;p++){c[p]=p<16?0|e[t+p]:(((d=c[p-15])<<25|d>>>7)^(d<<14|d>>>18)^d>>>3)+c[p-7]+(((d=c[p-2])<<15|d>>>17)^(d<<13|d>>>19)^d>>>10)+c[p-16];var d=r&i^r&s^i&s,m=f+((l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25))+(l&u^~l&h)+o[p]+c[p];f=h,h=u,u=l,l=a+m|0,a=s,s=i,i=r,r=m+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+d)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+l|0,n[5]=n[5]+u|0,n[6]=n[6]+h|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(64+i>>>9<<4)]=e.floor(r/4294967296),n[15+(64+i>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(s),t.HmacSHA256=i._createHmacHelper(s)}(Math),n.SHA256)})),fr((function(e,t){var n,r,i,s;e.exports=(r=(n=e=Pu).lib.WordArray,s=n.algo,i=s.SHA256,s=s.SHA224=i.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}}),n.SHA224=i._createHelper(s),n.HmacSHA224=i._createHmacHelper(s),e.SHA224)})),fr((function(e,t){var n;e.exports=(n=Pu,function(){var e=n,t=e.lib.Hasher,r=(s=e.x64).Word,i=s.WordArray,s=e.algo;function a(){return r.create.apply(r,arguments)}var o=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],c=[];(function(){for(var e=0;e<80;e++)c[e]=a()})(),s=s.SHA512=t.extend({_doReset:function(){this._hash=new i.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=(h=this._hash.words)[0],r=h[1],i=h[2],s=h[3],a=h[4],l=h[5],u=h[6],h=h[7],f=n.high,p=n.low,d=r.high,m=r.low,E=i.high,T=i.low,_=s.high,g=s.low,A=a.high,y=a.low,v=l.high,S=l.low,N=u.high,I=u.low,b=h.high,C=h.low,O=f,k=p,R=d,D=m,L=E,w=T,M=_,x=g,P=A,B=y,F=v,U=S,H=N,G=I,X=b,j=C,Y=0;Y<80;Y++){var q,V,$=c[Y];Y<16?(V=$.high=0|e[t+2*Y],q=$.low=0|e[t+2*Y+1]):(Q=(Z=c[Y-15]).high,Z=Z.low,z=(W=c[Y-2]).high,W=W.low,V=(V=(V=((Q>>>1|Z<<31)^(Q>>>8|Z<<24)^Q>>>7)+(J=c[Y-7]).high+((q=(Z=(Z>>>1|Q<<31)^(Z>>>8|Q<<24)^(Z>>>7|Q<<25))+J.low)>>>0<Z>>>0?1:0))+((z>>>19|W<<13)^(z<<3|W>>>29)^z>>>6)+((q+=Q=(W>>>19|z<<13)^(W<<3|z>>>29)^(W>>>6|z<<26))>>>0<Q>>>0?1:0))+(J=c[Y-16]).high+((q+=Z=J.low)>>>0<Z>>>0?1:0),$.high=V,$.low=q);var K,W=P&F^~P&H,z=B&U^~B&G,Q=O&R^O&L^R&L,J=(k>>>28|O<<4)^(k<<30|O>>>2)^(k<<25|O>>>7),Z=o[Y],ee=($=Z.high,Z.low),te=X+((P>>>14|B<<18)^(P>>>18|B<<14)^(P<<23|B>>>9))+((K=j+((B>>>14|P<<18)^(B>>>18|P<<14)^(B<<23|P>>>9)))>>>0<j>>>0?1:0),ne=J+(k&D^k&w^D&w);X=H,j=G,H=F,G=U,F=P,U=B,P=M+(te=te+W+((K+=z)>>>0<z>>>0?1:0)+$+((K+=ee)>>>0<ee>>>0?1:0)+V+((K+=q)>>>0<q>>>0?1:0))+((B=x+K|0)>>>0<x>>>0?1:0)|0,M=L,x=w,L=R,w=D,R=O,D=k,O=te+(((O>>>28|k<<4)^(O<<30|k>>>2)^(O<<25|k>>>7))+Q+(ne>>>0<J>>>0?1:0))+((k=K+ne|0)>>>0<K>>>0?1:0)|0}p=n.low=p+k,n.high=f+O+(p>>>0<k>>>0?1:0),m=r.low=m+D,r.high=d+R+(m>>>0<D>>>0?1:0),T=i.low=T+w,i.high=E+L+(T>>>0<w>>>0?1:0),g=s.low=g+x,s.high=_+M+(g>>>0<x>>>0?1:0),y=a.low=y+B,a.high=A+P+(y>>>0<B>>>0?1:0),S=l.low=S+U,l.high=v+F+(S>>>0<U>>>0?1:0),I=u.low=I+G,u.high=N+H+(I>>>0<G>>>0?1:0),C=h.low=C+j,h.high=b+X+(C>>>0<j>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(128+r>>>10<<5)]=Math.floor(n/4294967296),t[31+(128+r>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(s),e.HmacSHA512=t._createHmacHelper(s)}(),n.SHA512)})),fr((function(e,t){var n,r,i,s,a;e.exports=(a=(n=e=Pu).x64,r=a.Word,i=a.WordArray,a=n.algo,s=a.SHA512,a=a.SHA384=s.extend({_doReset:function(){this._hash=new i.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var e=s._doFinalize.call(this);return e.sigBytes-=16,e}}),n.SHA384=s._createHelper(a),n.HmacSHA384=s._createHmacHelper(a),e.SHA384)})),fr((function(e,t){var n;e.exports=(n=Pu,function(e){var t=n,r=(a=t.lib).WordArray,i=a.Hasher,s=t.x64.Word,a=t.algo,o=[],c=[],l=[],u=(function(){for(var e=1,t=0,n=0;n<24;n++){o[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,a=0;a<24;a++){for(var u,h=0,f=0,p=0;p<7;p++)1&i&&((u=(1<<p)-1)<32?f^=1<<u:h^=1<<u-32),128&i?i=i<<1^113:i<<=1;l[a]=s.create(h,f)}}(),[]);(function(){for(var e=0;e<25;e++)u[e]=s.create()})(),a=a.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var s=e[t+2*i],a=e[t+2*i+1];s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8);(b=n[i]).high^=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),b.low^=s}for(var h=0;h<24;h++){for(var f=0;f<5;f++){for(var p=0,d=0,m=0;m<5;m++)p^=(b=n[f+5*m]).high,d^=b.low;var E=u[f];E.high=p,E.low=d}for(f=0;f<5;f++){var T=u[(f+4)%5],_=(g=u[(f+1)%5]).high,g=g.low;for(p=T.high^(_<<1|g>>>31),d=T.low^(g<<1|_>>>31),m=0;m<5;m++)(b=n[f+5*m]).high^=p,b.low^=d}for(var A=1;A<25;A++){var y=(b=n[A]).high,v=b.low,S=o[A];d=S<32?(p=y<<S|v>>>32-S,v<<S|y>>>32-S):(p=v<<S-32|y>>>64-S,y<<S-32|v>>>64-S),(y=u[c[A]]).high=p,y.low=d}var N=u[0],I=n[0];for(N.high=I.high,N.low=I.low,f=0;f<5;f++)for(m=0;m<5;m++){var b=n[A=f+5*m],C=u[A],O=u[(f+1)%5+5*m],k=u[(f+2)%5+5*m];b.high=C.high^~O.high&k.high,b.low=C.low^~O.low&k.low}(b=n[0]).high^=(N=l[h]).high,b.low^=N.low}},_doFinalize:function(){var t=this._data,n=t.words,i=(this._nDataBytes,8*t.sigBytes),s=32*this.blockSize;n[i>>>5]|=1<<24-i%32,n[(e.ceil((1+i)/s)*s>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,o=(i=this.cfg.outputLength/8)/8,c=[],l=0;l<o;l++){var u=(h=a[l]).high,h=h.low;u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8);c.push(16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)),c.push(u)}return new r.init(c,i)},clone:function(){for(var e=i.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=i._createHelper(a),t.HmacSHA3=i._createHmacHelper(a)}(Math),n.SHA3)})),fr((function(e,t){var n;e.exports=(n=Pu,function(){var e=n,t=(i=e.lib).WordArray,r=i.Hasher,i=e.algo,s=t.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),a=t.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),o=t.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=t.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),l=t.create([0,1518500249,1859775393,2400959708,2840853838]),u=t.create([1352829926,1548603684,1836072691,2053994217,0]);i=i.RIPEMD160=r.extend({_doReset:function(){this._hash=t.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var d,m,E,T,_,g,A=this._hash.words,y=l.words,v=u.words,S=s.words,N=a.words,I=o.words,b=c.words,C=d=A[0],O=m=A[1],k=E=A[2],R=T=A[3],D=_=A[4];for(n=0;n<80;n+=1)g=(g=p(g=(g=d+e[t+S[n]]|0)+(n<16?(m^E^T)+y[0]:n<32?h(m,E,T)+y[1]:n<48?((m|~E)^T)+y[2]:n<64?f(m,E,T)+y[3]:(m^(E|~T))+y[4])|0,I[n]))+_|0,d=_,_=T,T=p(E,10),E=m,m=g,g=(g=p(g=(g=C+e[t+N[n]]|0)+(n<16?(O^(k|~R))+v[0]:n<32?f(O,k,R)+v[1]:n<48?((O|~k)^R)+v[2]:n<64?h(O,k,R)+v[3]:(O^k^R)+v[4])|0,b[n]))+D|0,C=D,D=R,R=p(k,10),k=O,O=g;g=A[1]+E+R|0,A[1]=A[2]+T+D|0,A[2]=A[3]+_+C|0,A[3]=A[4]+d+O|0,A[4]=A[0]+m+k|0,A[0]=g},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(64+r>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=(r=this._hash).words,s=0;s<5;s++){var a=i[s];i[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return r},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,n){return e&t|~e&n}function f(e,t,n){return e&n|t&~n}function p(e,t){return e<<t|e>>>32-t}e.RIPEMD160=r._createHelper(i),e.HmacRIPEMD160=r._createHmacHelper(i)}(),n.RIPEMD160)})),fr((function(e,t){var n;e.exports=(e=Pu.lib.Base,n=Pu.enc.Utf8,void(Pu.algo.HMAC=e.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,i=4*r;(t=t.sigBytes>i?e.finalize(t):t).clamp();e=this._oKey=t.clone(),t=this._iKey=t.clone();for(var s=e.words,a=t.words,o=0;o<r;o++)s[o]^=1549556828,a[o]^=909522486;e.sigBytes=t.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;e=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(e))}})))})),fr((function(e,t){var n,r,i,s,a,o,c;e.exports=(r=(s=(n=e=Pu).lib).Base,i=s.WordArray,a=(s=n.algo).SHA1,o=s.HMAC,c=s.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=o.create(n.hasher,e),s=i.create(),a=i.create([1]),c=s.words,l=a.words,u=n.keySize,h=n.iterations;c.length<u;){var f=r.update(t).finalize(a);r.reset();for(var p=f.words,d=p.length,m=f,E=1;E<h;E++){m=r.finalize(m),r.reset();for(var T=m.words,_=0;_<d;_++)p[_]^=T[_]}s.concat(f),l[0]++}return s.sigBytes=4*u,s}}),n.PBKDF2=function(e,t,n){return c.create(n).compute(e,t)},e.PBKDF2)})),fr((function(e,t){var n,r,i,s,a,o;e.exports=(r=(s=(n=e=Pu).lib).Base,i=s.WordArray,a=(s=n.algo).MD5,o=s.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,s=r.hasher.create(),a=i.create(),o=a.words,c=r.keySize,l=r.iterations;o.length<c;){n&&s.update(n),n=s.update(e).finalize(t),s.reset();for(var u=1;u<l;u++)n=s.finalize(n),s.reset();a.concat(n)}return a.sigBytes=4*c,a}}),n.EvpKDF=function(e,t,n){return o.create(n).compute(e,t)},e.EvpKDF)})),fr((function(e,t){var n;e.exports=void((n=Pu).lib.Cipher||function(){var e=n,t=e.lib,r=t.Base,i=t.WordArray,s=t.BufferedBlockAlgorithm,a=((l=e.enc).Utf8,l.Base64),o=e.algo.EvpKDF,c=t.Cipher=s.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,n,r){return m(n).encrypt(e,t,n,r)},decrypt:function(t,n,r){return m(n).decrypt(e,t,n,r)}}}}),l=(t.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),e.mode={}),u=t.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=(l=l.CBC=function(){var e=u.extend();function t(e,t,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var s=0;s<n;s++)e[t+s]^=r[s]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize;t.call(this,e,n,i),r.encryptBlock(e,n),this._prevBlock=e.slice(n,n+i)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,s=e.slice(n,n+i);r.decryptBlock(e,n),t.call(this,e,n,i),this._prevBlock=s}}),e}(),(e.pad={}).Pkcs7={pad:function(e,t){for(var n=(t*=4)-e.sigBytes%t,r=n<<24|n<<16|n<<8|n,s=[],a=0;a<n;a+=4)s.push(r);t=i.create(s,n),e.concat(t)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}}),f=(t.BlockCipher=c.extend({cfg:c.cfg.extend({mode:l,padding:h}),reset:function(){c.reset.call(this);var e,t=(n=this.cfg).iv,n=n.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,t&&t.words):(this._mode=e.call(n,this,t&&t.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),t.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),p=(l=(e.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?i.create([1398893684,1701076831]).concat(e).concat(t):t).toString(a)},parse:function(e){var t,n=(e=a.parse(e)).words;return 1398893684==n[0]&&1701076831==n[1]&&(t=i.create(n.slice(2,4)),n.splice(0,4),e.sigBytes-=16),f.create({ciphertext:e,salt:t})}},t.SerializableCipher=r.extend({cfg:r.extend({format:l}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);t=(i=e.createEncryptor(n,r)).finalize(t);var i=i.cfg;return f.create({ciphertext:t,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}})),d=(h=(e.kdf={}).OpenSSL={execute:function(e,t,n,r){return r=r||i.random(8),e=o.create({keySize:t+n}).compute(e,r),n=i.create(e.words.slice(t),4*n),e.sigBytes=4*t,f.create({key:e,iv:n,salt:r})}},t.PasswordBasedCipher=p.extend({cfg:p.cfg.extend({kdf:h}),encrypt:function(e,t,n,r){return n=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize),r.iv=n.iv,(e=p.encrypt.call(this,e,t,n.key,r)).mixIn(n),e},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt),r.iv=n.iv,p.decrypt.call(this,e,t,n.key,r)}}));function m(e){return"string"==typeof e?d:p}}())})),fr((function(e,t){var n;e.exports=((n=Pu).mode.CFB=function(){var e=n.lib.BlockCipherMode.extend();function t(e,t,n,r){var i,s=this._iv;s?(i=s.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a<n;a++)e[t+a]^=i[a]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize;t.call(this,e,n,i,r),this._prevBlock=e.slice(n,n+i)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,s=e.slice(n,n+i);t.call(this,e,n,i,r),this._prevBlock=s}}),e}(),n.mode.CFB)})),fr((function(e,t){var n,r;e.exports=((e=Pu).mode.CTR=(r=(n=e.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,s=this._counter,a=(i&&(s=this._counter=i.slice(0),this._iv=void 0),s.slice(0));n.encryptBlock(a,0),s[r-1]=s[r-1]+1|0;for(var o=0;o<r;o++)e[t+o]^=a[o]}}),n.Decryptor=r,n),e.mode.CTR)})),fr((function(e,t){var n;e.exports=((n=Pu).mode.CTRGladman=function(){var e=n.lib.BlockCipherMode.extend();function t(e){var t,n,r;return 255&~(e>>24)?e+=1<<24:(n=e>>8&255,r=255&e,255==(t=e>>16&255)?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e=(e+=t<<16)+(n<<8)+r),e}function r(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}var i=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,s=this._iv,a=this._counter,o=(s&&(a=this._counter=s.slice(0),this._iv=void 0),r(a),a.slice(0));n.encryptBlock(o,0);for(var c=0;c<i;c++)e[t+c]^=o[c]}});return e.Decryptor=i,e}(),n.mode.CTRGladman)})),fr((function(e,t){var n,r;e.exports=((e=Pu).mode.OFB=(r=(n=e.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,s=this._keystream;i&&(s=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(s,0);for(var a=0;a<r;a++)e[t+a]^=s[a]}}),n.Decryptor=r,n),e.mode.OFB)})),fr((function(e,t){var n;e.exports=((e=Pu).mode.ECB=((n=e.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),n.Decryptor=n.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),n),e.mode.ECB)})),fr((function(e,t){e.exports=(Pu.pad.AnsiX923={pad:function(e,t){var n=(n=e.sigBytes)+(t=(t*=4)-n%t)-1;e.clamp(),e.words[n>>>2]|=t<<24-n%4*8,e.sigBytes+=t},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},Pu.pad.Ansix923)})),fr((function(e,t){var n;e.exports=((n=Pu).pad.Iso10126={pad:function(e,t){t=(t*=4)-e.sigBytes%t,e.concat(n.lib.WordArray.random(t-1)).concat(n.lib.WordArray.create([t<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)})),fr((function(e,t){var n;e.exports=((n=Pu).pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)})),fr((function(e,t){e.exports=(Pu.pad.ZeroPadding={pad:function(e,t){t*=4,e.clamp(),e.sigBytes+=t-(e.sigBytes%t||t)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;0<=n;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},Pu.pad.ZeroPadding)})),fr((function(e,t){e.exports=(Pu.pad.NoPadding={pad:function(){},unpad:function(){}},Pu.pad.NoPadding)})),fr((function(e,t){var n,r;e.exports=(n=(e=Pu).lib.CipherParams,r=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){return e=r.parse(e),n.create({ciphertext:e})}},e.format.Hex)})),fr((function(e,t){var n;e.exports=(n=Pu,function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],s=[],a=[],o=[],c=[],l=[],u=[],h=[],f=[],p=[],d=(function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var d=r^r<<1^r<<2^r<<3^r<<4,m=(i[n]=d=d>>>8^255&d^99,e[s[d]=n]),E=e[m],T=e[E],_=257*e[d]^16843008*d;a[n]=_<<24|_>>>8,o[n]=_<<16|_>>>16,c[n]=_<<8|_>>>24,l[n]=_,u[d]=(_=16843009*T^65537*E^257*m^16843008*n)<<24|_>>>8,h[d]=_<<16|_>>>16,f[d]=_<<8|_>>>24,p[d]=_,n?(n=m^e[e[e[T^m]]],r^=e[e[r]]):n=r=1}}(),[0,1,2,4,8,16,32,64,128,27,54]);r=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*(1+(this._nRounds=6+n)),s=this._keySchedule=[],a=0;a<r;a++)a<n?s[a]=t[a]:(l=s[a-1],a%n?6<n&&a%n==4&&(l=i[l>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l]):(l=i[(l=l<<8|l>>>24)>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l],l^=d[a/n|0]<<24),s[a]=s[a-n]^l);for(var o=this._invKeySchedule=[],c=0;c<r;c++){a=r-c;var l=c%4?s[a]:s[a-4];o[c]=c<4||a<=4?l:u[i[l>>>24]]^h[i[l>>>16&255]]^f[i[l>>>8&255]]^p[i[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,o,c,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,h,f,p,s),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,s,a,o){for(var c=this._nRounds,l=e[t]^n[0],u=e[t+1]^n[1],h=e[t+2]^n[2],f=e[t+3]^n[3],p=4,d=1;d<c;d++){var m=r[l>>>24]^i[u>>>16&255]^s[h>>>8&255]^a[255&f]^n[p++],E=r[u>>>24]^i[h>>>16&255]^s[f>>>8&255]^a[255&l]^n[p++],T=r[h>>>24]^i[f>>>16&255]^s[l>>>8&255]^a[255&u]^n[p++],_=r[f>>>24]^i[l>>>16&255]^s[u>>>8&255]^a[255&h]^n[p++];l=m,u=E,h=T,f=_}m=(o[l>>>24]<<24|o[u>>>16&255]<<16|o[h>>>8&255]<<8|o[255&f])^n[p++],E=(o[u>>>24]<<24|o[h>>>16&255]<<16|o[f>>>8&255]<<8|o[255&l])^n[p++],T=(o[h>>>24]<<24|o[f>>>16&255]<<16|o[l>>>8&255]<<8|o[255&u])^n[p++],_=(o[f>>>24]<<24|o[l>>>16&255]<<16|o[u>>>8&255]<<8|o[255&h])^n[p++],e[t]=m,e[t+1]=E,e[t+2]=T,e[t+3]=_},keySize:8});e.AES=t._createHelper(r)}(),n.AES)})),fr((function(e,t){var n;e.exports=(n=Pu,function(){var e=n,t=(r=e.lib).WordArray,r=r.BlockCipher,i=e.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],o=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=i.DES=r.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=s[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],c=0;c<16;c++){var l=i[c]=[],u=o[c];for(n=0;n<24;n++)l[n/6|0]|=t[(a[n]-1+u)%28]<<31-n%6,l[4+(n/6|0)]|=t[28+(a[n+24]-1+u)%28]<<31-n%6;for(l[0]=l[0]<<1|l[0]>>>31,n=1;n<7;n++)l[n]=l[n]>>>4*(n-1)+3;l[7]=l[7]<<5|l[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],s=this._lBlock,a=this._rBlock,o=0,u=0;u<8;u++)o|=c[u][((a^i[u])&l[u])>>>0];this._lBlock=a,this._rBlock=s^o}var p=this._lBlock;this._lBlock=this._rBlock,this._rBlock=p,h.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){t=(this._lBlock>>>e^this._rBlock)&t,this._rBlock^=t,this._lBlock^=t<<e}function f(e,t){t=(this._rBlock>>>e^this._lBlock)&t,this._lBlock^=t,this._rBlock^=t<<e}e.DES=r._createHelper(u),i=i.TripleDES=r.extend({_doReset:function(){if(2!==(r=this._key.words).length&&4!==r.length&&r.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var e=r.slice(0,2),n=r.length<4?r.slice(0,2):r.slice(2,4),r=r.length<6?r.slice(0,2):r.slice(4,6);this._des1=u.createEncryptor(t.create(e)),this._des2=u.createEncryptor(t.create(n)),this._des3=u.createEncryptor(t.create(r))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2}),e.TripleDES=r._createHelper(i)}(),n.TripleDES)})),fr((function(e,t){var n;e.exports=(n=Pu,function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=r.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var s=0;i<256;i++){var a=t[(a=i%n)>>>2]>>>24-a%4*8&255;s=(s+r[i]+a)%256,a=r[i];r[i]=r[s],r[s]=a}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=s.call(this)},keySize:8,ivSize:0});function s(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var s=e[t];e[t]=e[n],e[n]=s,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i),r=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;0<e;e--)s.call(this)}}),e.RC4Drop=t._createHelper(r)}(),n.RC4)})),fr((function(e,t){var n;e.exports=(n=Pu,function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],s=[],a=[];r=r.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(n=this._b=0;n<4;n++)o.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var s=(t=t.words)[0],a=(s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8))>>>16|4294901760&(t=16711935&((t=t[1])<<8|t>>>24)|4278255360&(t<<24|t>>>8)),c=t<<16|65535&s;for(i[0]^=s,i[1]^=a,i[2]^=t,i[3]^=c,i[4]^=s,i[5]^=a,i[6]^=t,i[7]^=c,n=0;n<4;n++)o.call(this)}},_doProcessBlock:function(e,t){var n=this._X;o.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function o(){for(var e=this._X,t=this._C,n=0;n<8;n++)s[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<s[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<s[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<s[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<s[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<s[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<s[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<s[6]>>>0?1:0)|0,this._b=t[7]>>>0<s[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,o=r>>>16;a[n]=((i*i>>>17)+i*o>>>15)+o*o^((4294901760&r)*r|0)+((65535&r)*r|0)}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(r)}(),n.Rabbit)})),fr((function(e,t){var n;e.exports=(n=Pu,function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],s=[],a=[];r=r.RabbitLegacy=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]],i=this._b=0;i<4;i++)o.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var s=(t=16711935&((t=(e=t.words)[0])<<8|t>>>24)|4278255360&(t<<24|t>>>8))>>>16|4294901760&(e=16711935&((e=e[1])<<8|e>>>24)|4278255360&(e<<24|e>>>8)),a=e<<16|65535&t;for(r[0]^=t,r[1]^=s,r[2]^=e,r[3]^=a,r[4]^=t,r[5]^=s,r[6]^=e,r[7]^=a,i=0;i<4;i++)o.call(this)}},_doProcessBlock:function(e,t){var n=this._X;o.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function o(){for(var e=this._X,t=this._C,n=0;n<8;n++)s[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<s[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<s[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<s[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<s[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<s[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<s[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<s[6]>>>0?1:0)|0,this._b=t[7]>>>0<s[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,o=r>>>16;a[n]=((i*i>>>17)+i*o>>>15)+o*o^((4294901760&r)*r|0)+((65535&r)*r|0)}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(r)}(),n.RabbitLegacy)})),fr((function(e,t){e.exports=Pu}))),Fu=function(e){return function t(n,i,a){if(void 0===a&&(a=!0),null==n)throw new Error("cheerio.load() expects a string");var o=Qn(Qn({},r),s(i)),c=e(n,o,a,null),l=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}zn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(n,t),n.prototype._make=function(e,t){return(e=u(e,t)).prevObject=this,e},n.prototype._parse=function(t,n,r,i){return e(t,n,r,i)},n.prototype._render=function(e){return function(e,t){return t.xmlMode||t._useHtmlParser2?$(e,t):function(e){for(var t,n=("length"in e?e:[e]),r=0;r<n.length;r+=1)k(i=n[r])&&(t=Array.prototype.splice).call.apply(t,Gs([n,r,1],i.children,!1));var i,s="";for(r=0;r<n.length;r+=1)s+=Ps(i=n[r],qs);return s}(e)}(e,this.options)},n}(Wn);function u(t,n,r,i){if(void 0===r&&(r=c),t&&De(t))return t;if(i=Qn(Qn({},o),s(i)),(r=De(r="string"==typeof r?[e(r,i,!1,null)]:"length"in r?r:[r])?r:new l(r,null,i))._root=r,!t)return new l(void 0,r,i);var a="string"==typeof t&&Me(t)?e(t,i,!1,null).children:t.name||"root"===t.type||"text"===t.type||"comment"===t.type?[t]:Array.isArray(t)?t:void 0,u=new l(a,r,i);if(a)return u;if("string"!=typeof t)throw new Error("Unexpected type of selector");return a=t,(t=n?"string"==typeof n?Me(n)?new l([e(n,i,!1,null)],r,i):(a="".concat(n," ").concat(a),r):De(n)?n:new l(Array.isArray(n)?n:[n],r,i):r)?t.find(a):u}return Object.assign(u,Re,{load:t,_root:c,_options:o,fn:l.prototype,prototype:l.prototype}),u}}((function(e,t,n,r){return"string"==typeof(e="undefined"!=typeof Buffer&&Buffer.isBuffer(e)?e.toString():e)?function(e,t,n,r){return t.xmlMode||t._useHtmlParser2?function(e,t){var n=new M(void 0,t);return new oa(n,t).end(e),n.root}(e,t):function(e,t,n,r){return t={scriptingEnabled:"boolean"!=typeof t.scriptingEnabled||t.scriptingEnabled,treeAdapter:Hs,sourceCodeLocationInfo:t.sourceCodeLocationInfo},n?function(e,t){return xi.parse(e,t)}(e,t):function(e,t,n){return"string"==typeof e&&(n=t,t=e,e=null),(e=xi.getFragmentParser(e,n)).tokenizer.write(t,!0),e.getFragment()}(r,e,t)}(e,t,n,r)}(e,t,n,r):(t=e,!Array.isArray(t)&&k(t)?t:(Rn(t,n=new v([])),n))})),Uu=Mu,Hu=xu,Gu=Bu;Fu([]);const Xu=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}];Xu.forEach((({encodings:e})=>{e.forEach((e=>{e.labels.forEach((e=>{}))}))})),Xu.forEach((({heading:e,encodings:t})=>{"Legacy single-byte encodings"==e&&t.forEach((e=>{e.name.toLowerCase()}))}));let ju="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36",Yu="https://gh.con.sh/https://raw.githubusercontent.com/jadehh/TV/js";function qu(e=null,t=!1){let n=[];if(null!==e)for(const r of Object.keys(e))t?n.push(`${r}=${encodeURIComponent(e[r])}`):n.push(`${r}=${e[r]}`);return n.join("&")}function Vu(e){const t=(new Date).getTime();for(;(new Date).getTime()-t<1e3*e;);}function $u(e){return Gu.enc.Utf8.stringify(Gu.enc.Base64.parse(e))}function Ku(e,t){if(!e||!t)return{length:0,sequence:"",offset:0};for(var n="",r=e.length,i=t.length,s=new Array(r),a=0,o=0,c=0;c<r;c++){for(var l=new Array(i),u=0;u<i;u++)l[u]=0;s[c]=l}var h=null;for(c=0;c<r;c++)for(u=0;u<i;u++)e[c]!==t[u]?s[c][u]=0:(s[c][u]=0===c||0===u?1:1+s[c-1][u-1],s[c][u]>a&&(a=s[c][u],o===(h=c-s[c][u]+1)?n+=e[c]:(o=h,n="",n+=e.substr(o,c+1-o))));return{length:a,sequence:n,offset:h}}class Wu{constructor(){this.vod_id="",this.vod_name="",this.vod_pic=Yu+"/resources/ali.jpg",this.vod_remarks=""}to_dict(){return JSON.stringify(this)}load_dic(e){let t=JSON.parse(e);for(let e in t)this[e]=t[e]}load_data(e){for(let t in JSON.parse(this.to_dict()))this[t]=e[t]}}class zu extends Wu{constructor(){super(),this.type_name="",this.vod_year="",this.vod_area="",this.vod_actor="",this.vod_director="",this.vod_content="",this.vod_play_from="",this.vod_play_url=""}to_short(){let e=new Wu;return e.load_dic(this.to_dict()),e}load_dic(e){let t=JSON.parse(e);for(let e in JSON.parse(this.to_dict()))this[e]=t[e]}}const Qu=["DEBUG","INFO","WARNING","ERROR"];class Ju{constructor(e,t="DEBUG"){this.app_name=e,this.level=t,this.level_index=Qu.indexOf(t)}format(e,t){let n=80;switch(e){case"INFO":n+=1;break;case"WARNING":n-=2}return t.length<n&&(t=(n-t.length)%2==0?"#".repeat(Math.floor((n-t.length)/2))+t+"#".repeat(Math.floor((n-t.length)/2)):"#".repeat(Math.floor((n-t.length)/2))+t+"#".repeat(Math.floor((n-t.length)/2)+1)),t}getTime(){const e=new Date;return e.toLocaleDateString().replace(/\//g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,t,n){return n&&(t=this.format(e,t)),`${this.getTime()} - ${this.app_name} - ${e}: ${t}`}async log(e){console.debug(e),await local.set("log",this.getTime(),e)}async info(e,t=!1){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,t))}async warning(e,t=!1){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,t))}async error(e,t=!1){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,t))}async debug(e,t=!1){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,t))}}let Zu={};function eh(e){if(Zu.strictMode)throw e;Zu.silent||console.error(e.message)}function th(e,...t){for(const[n,r]of t.entries())r||eh(new Error(`${e} : Failed at [${n}]`))}function nh(...e){for(const[t,[n,r]]of e.entries())n&&(r||eh(new Error(`Conditional Assert : Failed at [${t}]`)))}function rh(...e){for(const[t,n]of e.entries())void 0===n&&eh(new Error(`Param Check : Failed at [${t}]`))}function ih(...e){for(const[t,[n,r]]of e.entries())n&&void 0===r&&eh(new Error(`Conditional Param Check : Failed at [${t}]`))}function sh(e){eh(new Error(`Invalid Playlist : ${e}`))}function ah(e,t=10){if("number"==typeof e)return e;const n=10===t?Number.parseFloat(e):Number.parseInt(e,t);return Number.isNaN(n)?0:n}function oh(e){(e.startsWith("0x")||e.startsWith("0X"))&&(e=e.slice(2));const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)t[n/2]=ah(e.slice(n,n+2),16);return t}function ch(e,t=0,n=e.length){n<=t&&eh(new Error(`end must be larger than start : start=${t}, end=${n}`));const r=[];for(let i=t;i<n;i++)r.push(`0${(255&e[i]).toString(16).toUpperCase()}`.slice(-2));return`0x${r.join("")}`}function lh(e,t,n=0){let r=-1;for(let i=0,s=0;i<e.length;i++)if(e[i]===t){if(s++===n)return[e.slice(0,i),e.slice(i+1)];r=i}return-1!==r?[e.slice(0,r),e.slice(r+1)]:[e]}function uh(e){const t=[];let n=!1;for(const r of e)"-"!==r&&"_"!==r?n?(t.push(r.toUpperCase()),n=!1):t.push(r.toLowerCase()):n=!0;return t.join("")}function hh(e){return`${e.getUTCFullYear()}-${("0"+(e.getUTCMonth()+1)).slice(-2)}-${("0"+e.getUTCDate()).slice(-2)}T${("0"+e.getUTCHours()).slice(-2)}:${("0"+e.getUTCMinutes()).slice(-2)}:${("0"+e.getUTCSeconds()).slice(-2)}.${("00"+e.getUTCMilliseconds()).slice(-3)}Z`}function fh(){return Object.assign({},Zu)}function ph(e,t){t=Math.trunc(t)||0;const n=e.length>>>0;if(t<0&&(t=n+t),!(t<0||t>=n))return e[t]}class dh{constructor({type:e,uri:t,groupId:n,language:r,assocLanguage:i,name:s,isDefault:a,autoselect:o,forced:c,instreamId:l,characteristics:u,channels:h}){rh(e,n,s),nh(["SUBTITLES"===e,t],["CLOSED-CAPTIONS"===e,l],["CLOSED-CAPTIONS"===e,!t],[c,"SUBTITLES"===e]),this.type=e,this.uri=t,this.groupId=n,this.language=r,this.assocLanguage=i,this.name=s,this.isDefault=a,this.autoselect=o,this.forced=c,this.instreamId=l,this.characteristics=u,this.channels=h}}class mh{constructor({uri:e,isIFrameOnly:t=!1,bandwidth:n,averageBandwidth:r,score:i,codecs:s,resolution:a,frameRate:o,hdcpLevel:c,allowedCpc:l,videoRange:u,stableVariantId:h,programId:f,audio:p=[],video:d=[],subtitles:m=[],closedCaptions:E=[],currentRenditions:T={audio:0,video:0,subtitles:0,closedCaptions:0}}){rh(e,n),this.uri=e,this.isIFrameOnly=t,this.bandwidth=n,this.averageBandwidth=r,this.score=i,this.codecs=s,this.resolution=a,this.frameRate=o,this.hdcpLevel=c,this.allowedCpc=l,this.videoRange=u,this.stableVariantId=h,this.programId=f,this.audio=p,this.video=d,this.subtitles=m,this.closedCaptions=E,this.currentRenditions=T}}class Eh{constructor({id:e,value:t,uri:n,language:r}){rh(e,t||n),th("SessionData cannot have both value and uri, shoud be either.",!(t&&n)),this.id=e,this.value=t,this.uri=n,this.language=r}}class Th{constructor({method:e,uri:t,iv:n,format:r,formatVersion:i}){rh(e),ih(["NONE"!==e,t]),nh(["NONE"===e,!(t||n||r||i)]),this.method=e,this.uri=t,this.iv=n,this.format=r,this.formatVersion=i}}class _h{constructor({hint:e=!1,uri:t,mimeType:n,byterange:r}){rh(t),this.hint=e,this.uri=t,this.mimeType=n,this.byterange=r}}class gh{constructor({id:e,classId:t,start:n,end:r,duration:i,plannedDuration:s,endOnNext:a,attributes:o={}}){rh(e),ih([!0===a,t]),nh([r,n],[r,n<=r],[i,i>=0],[s,s>=0]),this.id=e,this.classId=t,this.start=n,this.end=r,this.duration=i,this.plannedDuration=s,this.endOnNext=a,this.attributes=o}}class Ah{constructor({type:e,duration:t,tagName:n,value:r}){rh(e),ih(["OUT"===e,t]),ih(["RAW"===e,n]),this.type=e,this.duration=t,this.tagName=n,this.value=r}}class yh{constructor(e){rh(e),this.type=e}}class vh extends yh{constructor({isMasterPlaylist:e,uri:t,version:n,independentSegments:r=!1,start:i,source:s}){super("playlist"),rh(e),this.isMasterPlaylist=e,this.uri=t,this.version=n,this.independentSegments=r,this.start=i,this.source=s}}class Sh extends vh{constructor(e={}){super(Object.assign(Object.assign({},e),{isMasterPlaylist:!0}));const{variants:t=[],currentVariant:n,sessionDataList:r=[],sessionKeyList:i=[]}=e;this.variants=t,this.currentVariant=n,this.sessionDataList=r,this.sessionKeyList=i}}class Nh extends vh{constructor(e={}){super(Object.assign(Object.assign({},e),{isMasterPlaylist:!1}));const{targetDuration:t,mediaSequenceBase:n=0,discontinuitySequenceBase:r=0,endlist:i=!1,playlistType:s,isIFrame:a,segments:o=[],prefetchSegments:c=[],lowLatencyCompatibility:l,partTargetDuration:u,renditionReports:h=[],skip:f=0,hash:p}=e;this.targetDuration=t,this.mediaSequenceBase=n,this.discontinuitySequenceBase=r,this.endlist=i,this.playlistType=s,this.isIFrame=a,this.segments=o,this.prefetchSegments=c,this.lowLatencyCompatibility=l,this.partTargetDuration=u,this.renditionReports=h,this.skip=f,this.hash=p}}class Ih extends yh{constructor({uri:e,mimeType:t,data:n,duration:r,title:i,byterange:s,discontinuity:a,mediaSequenceNumber:o=0,discontinuitySequence:c=0,key:l,map:u,programDateTime:h,dateRange:f,markers:p=[],parts:d=[]}){super("segment"),this.uri=e,this.mimeType=t,this.data=n,this.duration=r,this.title=i,this.byterange=s,this.discontinuity=a,this.mediaSequenceNumber=o,this.discontinuitySequence=c,this.key=l,this.map=u,this.programDateTime=h,this.dateRange=f,this.markers=p,this.parts=d}}class bh extends yh{constructor({hint:e=!1,uri:t,duration:n,independent:r,byterange:i,gap:s}){super("part"),rh(t),this.hint=e,this.uri=t,this.duration=n,this.independent=r,this.duration=n,this.byterange=i,this.gap=s}}class Ch extends yh{constructor({uri:e,discontinuity:t,mediaSequenceNumber:n=0,discontinuitySequence:r=0,key:i}){super("prefetch"),rh(e),this.uri=e,this.discontinuity=t,this.mediaSequenceNumber=n,this.discontinuitySequence=r,this.key=i}}class Oh{constructor({uri:e,lastMSN:t,lastPart:n}){rh(e),this.uri=e,this.lastMSN=t,this.lastPart=n}}function kh(e){return function(e,t=" "){return e?(e=e.trim()," "===t||(e.startsWith(t)&&(e=e.slice(1)),e.endsWith(t)&&(e=e.slice(0,-1))),e):e}(e,'"')}function Rh(e){const t=lh(e,",");return{duration:ah(t[0]),title:decodeURIComponent(escape(t[1]))}}function Dh(e){const t=lh(e,"@");return{length:ah(t[0]),offset:t[1]?ah(t[1]):-1}}function Lh(e){const t=lh(e,"x");return{width:ah(t[0]),height:ah(t[1])}}function wh(e){const t="ALLOWED-CPC: Each entry must consit of KEYFORMAT and Content Protection Configuration",n=e.split(",");0===n.length&&sh(t);const r=[];for(const e of n){const[n,i]=lh(e,":");n&&i?r.push({format:n,cpcList:i.split("/")}):sh(t)}return r}function Mh(e){const t=oh(e);return 16!==t.length&&sh("IV must be a 128-bit unsigned integer"),t}function xh(e,t){t.IV&&e.compatibleVersion<2&&(e.compatibleVersion=2),(t.KEYFORMAT||t.KEYFORMATVERSIONS)&&e.compatibleVersion<5&&(e.compatibleVersion=5)}function Ph(e){const t={};for(const r of function(e){const t=[];let n=!0,r=0;const i=[];for(let s=0;s<e.length;s++){const a=e[s];n&&","===a?(t.push(e.slice(r,s).trim()),r=s+1):'"'!==a&&"'"!==a||(n?(i.push(a),n=!1):a===ph(i,-1)?(i.pop(),n=!0):i.push(a))}return t.push(e.slice(r).trim()),t}(e)){const[e,i]=lh(r,"="),s=kh(i);switch(e){case"URI":t[e]=s;break;case"START-DATE":case"END-DATE":t[e]=new Date(s);break;case"IV":t[e]=Mh(s);break;case"BYTERANGE":t[e]=Dh(s);break;case"RESOLUTION":t[e]=Lh(s);break;case"ALLOWED-CPC":t[e]=wh(s);break;case"END-ON-NEXT":case"DEFAULT":case"AUTOSELECT":case"FORCED":case"PRECISE":case"CAN-BLOCK-RELOAD":case"INDEPENDENT":case"GAP":t[e]="YES"===s;break;case"DURATION":case"PLANNED-DURATION":case"BANDWIDTH":case"AVERAGE-BANDWIDTH":case"FRAME-RATE":case"TIME-OFFSET":case"CAN-SKIP-UNTIL":case"HOLD-BACK":case"PART-HOLD-BACK":case"PART-TARGET":case"BYTERANGE-START":case"BYTERANGE-LENGTH":case"LAST-MSN":case"LAST-PART":case"SKIPPED-SEGMENTS":case"SCORE":case"PROGRAM-ID":t[e]=ah(s);break;default:e.startsWith("SCTE35-")?t[e]=oh(s):e.startsWith("X-")?t[e]=(n=i).startsWith('"')?kh(n):n.startsWith("0x")||n.startsWith("0X")?oh(n):ah(n):("VIDEO-RANGE"===e&&"SDR"!==s&&"HLG"!==s&&"PQ"!==s&&sh(`VIDEO-RANGE: unknown value "${s}"`),t[e]=s)}}var n;return t}function Bh(){sh("The file contains both media and master playlist tags.")}function Fh(e,t,n){const r=function({attributes:e}){return new dh({type:e.TYPE,uri:e.URI,groupId:e["GROUP-ID"],language:e.LANGUAGE,assocLanguage:e["ASSOC-LANGUAGE"],name:e.NAME,isDefault:e.DEFAULT,autoselect:e.AUTOSELECT,forced:e.FORCED,instreamId:e["INSTREAM-ID"],characteristics:e.CHARACTERISTICS,channels:e.CHANNELS})}(t),i=e[uh(n)],s=function(e,t){let n=!1;for(const r of e){if(r.name===t.name)return"All EXT-X-MEDIA tags in the same Group MUST have different NAME attributes.";r.isDefault&&(n=!0)}return n&&t.isDefault?"EXT-X-MEDIA A Group MUST NOT have more than one member with a DEFAULT attribute of YES.":""}(i,r);s&&sh(s),i.push(r),r.isDefault&&(e.currentRenditions[uh(n)]=i.length-1)}function Uh(e,t,n,r,i){const s=new mh({uri:n,bandwidth:t.BANDWIDTH,averageBandwidth:t["AVERAGE-BANDWIDTH"],score:t.SCORE,codecs:t.CODECS,resolution:t.RESOLUTION,frameRate:t["FRAME-RATE"],hdcpLevel:t["HDCP-LEVEL"],allowedCpc:t["ALLOWED-CPC"],videoRange:t["VIDEO-RANGE"],stableVariantId:t["STABLE-VARIANT-ID"],programId:t["PROGRAM-ID"]});for(const n of e)if("EXT-X-MEDIA"===n.name){const e=n.attributes,r=e.TYPE;if(r&&e["GROUP-ID"]||sh("EXT-X-MEDIA TYPE attribute is REQUIRED."),t[r]===e["GROUP-ID"]&&(Fh(s,n,r),"CLOSED-CAPTIONS"===r))for(const{instreamId:e}of s.closedCaptions)if(e&&e.startsWith("SERVICE")&&i.compatibleVersion<7){i.compatibleVersion=7;break}}return function(e,t,n){for(const r of["AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS"])"CLOSED-CAPTIONS"===r&&"NONE"===e[r]?(n.isClosedCaptionsNone=!0,t.closedCaptions=[]):e[r]&&!t[uh(r)].some((t=>t.groupId===e[r]))&&sh(`${r} attribute MUST match the value of the GROUP-ID attribute of an EXT-X-MEDIA tag whose TYPE attribute is ${r}.`)}(t,s,i),s.isIFrameOnly=r,s}function Hh(e,t){if(e.method!==t.method)return!1;if(e.uri!==t.uri)return!1;if(e.iv){if(!t.iv)return!1;if(e.iv.length!==t.iv.length)return!1;for(let n=0;n<e.iv.length;n++)if(e.iv[n]!==t.iv[n])return!1}else if(t.iv)return!1;return e.format===t.format&&e.formatVersion===t.formatVersion}function Gh(e,t,n,r,i,s,a){const o=new Ih({uri:t,mediaSequenceNumber:i,discontinuitySequence:s});let c=!1,l=!1;for(let t=n;t<=r;t++){const{name:n,value:r,attributes:i}=e[t];if("EXTINF"===n)!Number.isInteger(r.duration)&&a.compatibleVersion<3&&(a.compatibleVersion=3),Math.round(r.duration)>a.targetDuration&&sh("EXTINF duration, when rounded to the nearest integer, MUST be less than or equal to the target duration"),o.duration=r.duration,o.title=r.title;else if("EXT-X-BYTERANGE"===n)a.compatibleVersion<4&&(a.compatibleVersion=4),o.byterange=r;else if("EXT-X-DISCONTINUITY"===n)o.parts.length>0&&sh("EXT-X-DISCONTINUITY must appear before the first EXT-X-PART tag of the Parent Segment."),o.discontinuity=!0;else if("EXT-X-KEY"===n)o.parts.length>0&&sh("EXT-X-KEY must appear before the first EXT-X-PART tag of the Parent Segment."),xh(a,i),o.key=new Th({method:i.METHOD,uri:i.URI,iv:i.IV,format:i.KEYFORMAT,formatVersion:i.KEYFORMATVERSIONS});else if("EXT-X-MAP"===n)o.parts.length>0&&sh("EXT-X-MAP must appear before the first EXT-X-PART tag of the Parent Segment."),a.compatibleVersion<5&&(a.compatibleVersion=5),a.hasMap=!0,o.map=new _h({uri:i.URI,byterange:i.BYTERANGE});else if("EXT-X-PROGRAM-DATE-TIME"===n)o.programDateTime=r;else if("EXT-X-DATERANGE"===n){const e={};for(const t of Object.keys(i))(t.startsWith("SCTE35-")||t.startsWith("X-"))&&(e[t]=i[t]);o.dateRange=new gh({id:i.ID,classId:i.CLASS,start:i["START-DATE"],end:i["END-DATE"],duration:i.DURATION,plannedDuration:i["PLANNED-DURATION"],endOnNext:i["END-ON-NEXT"],attributes:e})}else if("EXT-X-CUE-OUT"===n)o.markers.push(new Ah({type:"OUT",duration:i&&i.DURATION||r}));else if("EXT-X-CUE-IN"===n)o.markers.push(new Ah({type:"IN"}));else if("EXT-X-CUE-OUT-CONT"===n||"EXT-X-CUE"===n||"EXT-OATCLS-SCTE35"===n||"EXT-X-ASSET"===n||"EXT-X-SCTE35"===n)o.markers.push(new Ah({type:"RAW",tagName:n,value:r}));else if("EXT-X-PRELOAD-HINT"!==n||i.TYPE)if("EXT-X-PRELOAD-HINT"===n&&"PART"===i.TYPE&&l)sh("Servers should not add more than one EXT-X-PRELOAD-HINT tag with the same TYPE attribute to a Playlist.");else if("EXT-X-PART"!==n&&"EXT-X-PRELOAD-HINT"!==n||i.URI){if("EXT-X-PRELOAD-HINT"===n&&"MAP"===i.TYPE)c&&sh("Servers should not add more than one EXT-X-PRELOAD-HINT tag with the same TYPE attribute to a Playlist."),c=!0,a.hasMap=!0,o.map=new _h({hint:!0,uri:i.URI,byterange:{length:i["BYTERANGE-LENGTH"],offset:i["BYTERANGE-START"]||0}});else if("EXT-X-PART"===n||"EXT-X-PRELOAD-HINT"===n&&"PART"===i.TYPE){"EXT-X-PART"!==n||i.DURATION||sh("EXT-X-PART: DURATION attribute is mandatory"),"EXT-X-PRELOAD-HINT"===n&&(l=!0);const e=new bh({hint:"EXT-X-PRELOAD-HINT"===n,uri:i.URI,byterange:"EXT-X-PART"===n?i.BYTERANGE:{length:i["BYTERANGE-LENGTH"],offset:i["BYTERANGE-START"]||0},duration:i.DURATION,independent:i.INDEPENDENT,gap:i.GAP});o.parts.push(e)}}else sh("EXT-X-PART / EXT-X-PRELOAD-HINT: URI attribute is mandatory");else sh("EXT-X-PRELOAD-HINT: TYPE attribute is mandatory")}return o}function Xh(e,t,n,r,i,s,a){const o=new Ch({uri:t,mediaSequenceNumber:i,discontinuitySequence:s});for(let t=n;t<=r;t++){const{name:n,attributes:r}=e[t];"EXTINF"===n?sh("A prefetch segment must not be advertised with an EXTINF tag."):"EXT-X-DISCONTINUITY"===n?sh("A prefetch segment must not be advertised with an EXT-X-DISCONTINUITY tag."):"EXT-X-PREFETCH-DISCONTINUITY"===n?o.discontinuity=!0:"EXT-X-KEY"===n?(xh(a,r),o.key=new Th({method:r.METHOD,uri:r.URI,iv:r.IV,format:r.KEYFORMAT,formatVersion:r.KEYFORMATVERSIONS})):"EXT-X-MAP"===n&&sh("Prefetch segments must not be advertised with an EXT-X-MAP tag.")}return o}function jh(e,t,n,r,i){const{discontinuity:s,key:a,map:o,byterange:c,uri:l}=t;if(s&&(t.discontinuitySequence=n+1),a||(t.key=r),o||(t.map=i),c&&-1===c.offset){const{segments:t}=e;if(t.length>0){const e=ph(t,-1);e.byterange&&e.uri===l?c.offset=e.byterange.offset+e.byterange.length:sh("If offset of EXT-X-BYTERANGE is not present, a previous Media Segment MUST be a sub-range of the same media resource")}else sh("If offset of EXT-X-BYTERANGE is not present, a previous Media Segment MUST appear in the Playlist file")}return e.segments.push(t),[t.discontinuitySequence,t.key,t.map]}function Yh(e,t){const[n,r]=function(e){const t=e.indexOf(":");return-1===t?[e.slice(1).trim(),null]:[e.slice(1,t).trim(),e.slice(t+1).trim()]}(e),i=function(e){switch(e){case"EXTM3U":case"EXT-X-VERSION":return"Basic";case"EXTINF":case"EXT-X-BYTERANGE":case"EXT-X-DISCONTINUITY":case"EXT-X-PREFETCH-DISCONTINUITY":case"EXT-X-KEY":case"EXT-X-MAP":case"EXT-X-PROGRAM-DATE-TIME":case"EXT-X-DATERANGE":case"EXT-X-CUE-OUT":case"EXT-X-CUE-IN":case"EXT-X-CUE-OUT-CONT":case"EXT-X-CUE":case"EXT-OATCLS-SCTE35":case"EXT-X-ASSET":case"EXT-X-SCTE35":case"EXT-X-PART":case"EXT-X-PRELOAD-HINT":return"Segment";case"EXT-X-TARGETDURATION":case"EXT-X-MEDIA-SEQUENCE":case"EXT-X-DISCONTINUITY-SEQUENCE":case"EXT-X-ENDLIST":case"EXT-X-PLAYLIST-TYPE":case"EXT-X-I-FRAMES-ONLY":case"EXT-X-SERVER-CONTROL":case"EXT-X-PART-INF":case"EXT-X-PREFETCH":case"EXT-X-RENDITION-REPORT":case"EXT-X-SKIP":return"MediaPlaylist";case"EXT-X-MEDIA":case"EXT-X-STREAM-INF":case"EXT-X-I-FRAME-STREAM-INF":case"EXT-X-SESSION-DATA":case"EXT-X-SESSION-KEY":return"MasterPlaylist";case"EXT-X-INDEPENDENT-SEGMENTS":case"EXT-X-START":return"MediaorMasterPlaylist";default:return"Unknown"}}(n);if(function(e,t){if("Segment"===e||"MediaPlaylist"===e)return void 0===t.isMasterPlaylist?void(t.isMasterPlaylist=!1):void(t.isMasterPlaylist&&Bh());if("MasterPlaylist"===e){if(void 0===t.isMasterPlaylist)return void(t.isMasterPlaylist=!0);!1===t.isMasterPlaylist&&Bh()}}(i,t),"Unknown"===i)return null;"MediaPlaylist"===i&&"EXT-X-RENDITION-REPORT"!==n&&"EXT-X-PREFETCH"!==n&&(t.hash[n]&&sh("There MUST NOT be more than one Media Playlist tag of each type in any Media Playlist"),t.hash[n]=!0);const[s,a]=function(e,t){switch(e){case"EXTM3U":case"EXT-X-DISCONTINUITY":case"EXT-X-ENDLIST":case"EXT-X-I-FRAMES-ONLY":case"EXT-X-INDEPENDENT-SEGMENTS":case"EXT-X-CUE-IN":return[null,null];case"EXT-X-VERSION":case"EXT-X-TARGETDURATION":case"EXT-X-MEDIA-SEQUENCE":case"EXT-X-DISCONTINUITY-SEQUENCE":return[ah(t),null];case"EXT-X-CUE-OUT":return Number.isNaN(Number(t))?[null,Ph(t)]:[ah(t),null];case"EXT-X-KEY":case"EXT-X-MAP":case"EXT-X-DATERANGE":case"EXT-X-MEDIA":case"EXT-X-STREAM-INF":case"EXT-X-I-FRAME-STREAM-INF":case"EXT-X-SESSION-DATA":case"EXT-X-SESSION-KEY":case"EXT-X-START":case"EXT-X-SERVER-CONTROL":case"EXT-X-PART-INF":case"EXT-X-PART":case"EXT-X-PRELOAD-HINT":case"EXT-X-RENDITION-REPORT":case"EXT-X-SKIP":return[null,Ph(t)];case"EXTINF":return[Rh(t),null];case"EXT-X-BYTERANGE":return[Dh(t),null];case"EXT-X-PROGRAM-DATE-TIME":return[new Date(t),null];default:return[t,null]}}(n,r);return{name:n,category:i,value:s,attributes:a}}function qh(e,t){let n;return t.isMasterPlaylist?n=function(e,t){const n=new Sh;let r=!1;for(const[i,{name:s,value:a,attributes:o}]of e.entries())if("EXT-X-VERSION"===s)n.version=a;else if("EXT-X-STREAM-INF"===s){const s=e[i+1];("string"!=typeof s||s.startsWith("#EXT"))&&sh("EXT-X-STREAM-INF must be followed by a URI line");const a=Uh(e,o,s,!1,t);a&&("number"==typeof a.score&&(r=!0,a.score<0&&sh("SCORE attribute on EXT-X-STREAM-INF must be positive decimal-floating-point number.")),n.variants.push(a))}else if("EXT-X-I-FRAME-STREAM-INF"===s){const r=Uh(e,o,o.URI,!0,t);r&&n.variants.push(r)}else if("EXT-X-SESSION-DATA"===s){const e=new Eh({id:o["DATA-ID"],value:o.VALUE,uri:o.URI,language:o.LANGUAGE});n.sessionDataList.some((t=>t.id===e.id&&t.language===e.language))&&sh("A Playlist MUST NOT contain more than one EXT-X-SESSION-DATA tag with the same DATA-ID attribute and the same LANGUAGE attribute."),n.sessionDataList.push(e)}else if("EXT-X-SESSION-KEY"===s){"NONE"===o.METHOD&&sh("EXT-X-SESSION-KEY: The value of the METHOD attribute MUST NOT be NONE");const e=new Th({method:o.METHOD,uri:o.URI,iv:o.IV,format:o.KEYFORMAT,formatVersion:o.KEYFORMATVERSIONS});n.sessionKeyList.some((t=>Hh(t,e)))&&sh("A Master Playlist MUST NOT contain more than one EXT-X-SESSION-KEY tag with the same METHOD, URI, IV, KEYFORMAT, and KEYFORMATVERSIONS attribute values."),xh(t,o),n.sessionKeyList.push(e)}else"EXT-X-INDEPENDENT-SEGMENTS"===s?(n.independentSegments&&sh("EXT-X-INDEPENDENT-SEGMENTS tag MUST NOT appear more than once in a Playlist"),n.independentSegments=!0):"EXT-X-START"===s&&(n.start&&sh("EXT-X-START tag MUST NOT appear more than once in a Playlist"),"number"!=typeof o["TIME-OFFSET"]&&sh("EXT-X-START: TIME-OFFSET attribute is REQUIRED"),n.start={offset:o["TIME-OFFSET"],precise:o.PRECISE||!1});if(r)for(const e of n.variants)"number"!=typeof e.score&&sh("If any Variant Stream contains the SCORE attribute, then all Variant Streams in the Master Playlist SHOULD have a SCORE attribute");if(t.isClosedCaptionsNone)for(const e of n.variants)e.closedCaptions.length>0&&sh("If there is a variant with CLOSED-CAPTIONS attribute of NONE, all EXT-X-STREAM-INF tags MUST have this attribute with a value of NONE");return n}(e,t):(n=function(e,t){var n;const r=new Nh;let i=-1,s=0,a=!1,o=!1,c=0,l=null,u=null,h=!1;for(const[n,f]of e.entries()){const{name:p,value:d,attributes:m,category:E}=f;if("Segment"!==E){if("EXT-X-VERSION"===p)void 0===r.version?r.version=d:sh("A Playlist file MUST NOT contain more than one EXT-X-VERSION tag.");else if("EXT-X-TARGETDURATION"===p)r.targetDuration=t.targetDuration=d;else if("EXT-X-MEDIA-SEQUENCE"===p)r.segments.length>0&&sh("The EXT-X-MEDIA-SEQUENCE tag MUST appear before the first Media Segment in the Playlist."),r.mediaSequenceBase=s=d;else if("EXT-X-DISCONTINUITY-SEQUENCE"===p)r.segments.length>0&&sh("The EXT-X-DISCONTINUITY-SEQUENCE tag MUST appear before the first Media Segment in the Playlist."),a&&sh("The EXT-X-DISCONTINUITY-SEQUENCE tag MUST appear before any EXT-X-DISCONTINUITY tag."),r.discontinuitySequenceBase=c=d;else if("EXT-X-ENDLIST"===p)r.endlist=!0;else if("EXT-X-PLAYLIST-TYPE"===p)r.playlistType=d;else if("EXT-X-I-FRAMES-ONLY"===p)t.compatibleVersion<4&&(t.compatibleVersion=4),r.isIFrame=!0;else if("EXT-X-INDEPENDENT-SEGMENTS"===p)r.independentSegments&&sh("EXT-X-INDEPENDENT-SEGMENTS tag MUST NOT appear more than once in a Playlist"),r.independentSegments=!0;else if("EXT-X-START"===p)r.start&&sh("EXT-X-START tag MUST NOT appear more than once in a Playlist"),"number"!=typeof m["TIME-OFFSET"]&&sh("EXT-X-START: TIME-OFFSET attribute is REQUIRED"),r.start={offset:m["TIME-OFFSET"],precise:m.PRECISE||!1};else if("EXT-X-SERVER-CONTROL"===p)m["CAN-BLOCK-RELOAD"]||sh("EXT-X-SERVER-CONTROL: CAN-BLOCK-RELOAD=YES is mandatory for Low-Latency HLS"),r.lowLatencyCompatibility={canBlockReload:m["CAN-BLOCK-RELOAD"],canSkipUntil:m["CAN-SKIP-UNTIL"],holdBack:m["HOLD-BACK"],partHoldBack:m["PART-HOLD-BACK"]};else if("EXT-X-PART-INF"===p)m["PART-TARGET"]||sh("EXT-X-PART-INF: PART-TARGET attribute is mandatory"),r.partTargetDuration=m["PART-TARGET"];else if("EXT-X-RENDITION-REPORT"===p)m.URI||sh("EXT-X-RENDITION-REPORT: URI attribute is mandatory"),0===m.URI.search(/^[a-z]+:/)&&sh("EXT-X-RENDITION-REPORT: URI must be relative to the playlist uri"),r.renditionReports.push(new Oh({uri:m.URI,lastMSN:m["LAST-MSN"],lastPart:m["LAST-PART"]}));else if("EXT-X-SKIP"===p)m["SKIPPED-SEGMENTS"]||sh("EXT-X-SKIP: SKIPPED-SEGMENTS attribute is mandatory"),t.compatibleVersion<9&&(t.compatibleVersion=9),r.skip=m["SKIPPED-SEGMENTS"],s+=r.skip;else if("EXT-X-PREFETCH"===p){const a=Xh(e,d,-1===i?n:i,n-1,s++,c,t);a&&(a.discontinuity&&(a.discontinuitySequence++,c=a.discontinuitySequence),a.key?l=a.key:a.key=l,r.prefetchSegments.push(a)),o=!0,i=-1}else if("string"==typeof f){-1===i&&sh("A URI line is not preceded by any segment tags"),r.targetDuration||sh("The EXT-X-TARGETDURATION tag is REQUIRED"),o&&sh("These segments must appear after all complete segments.");const a=Gh(e,f,i,n-1,s++,c,t);a&&([c,l,u]=jh(r,a,c,l,u),!h&&a.parts.length>0&&(h=!0)),i=-1}}else-1===i&&(i=n),"EXT-X-DISCONTINUITY"===p&&(a=!0)}if(-1!==i){const a=Gh(e,"",i,e.length-1,s++,c,t);if(a){const{parts:e}=a;e.length>0&&!r.endlist&&!(null===(n=ph(e,-1))||void 0===n?void 0:n.hint)&&sh("If the Playlist contains EXT-X-PART tags and does not contain an EXT-X-ENDLIST tag, the Playlist must contain an EXT-X-PRELOAD-HINT tag with a TYPE=PART attribute"),jh(r,a,l,u),!h&&a.parts.length>0&&(h=!0)}}return function(e){const t=new Map,n=new Map;let r=!1,i=!1;for(let s=e.length-1;s>=0;s--){const{programDateTime:a,dateRange:o}=e[s];if(a&&(i=!0),o&&o.start){r=!0,o.endOnNext&&(o.end||o.duration)&&sh("An EXT-X-DATERANGE tag with an END-ON-NEXT=YES attribute MUST NOT contain DURATION or END-DATE attributes.");const e=o.start.getTime(),i=o.duration||0;o.end&&o.duration&&e+1e3*i!==o.end.getTime()&&sh("END-DATE MUST be equal to the value of the START-DATE attribute plus the value of the DURATION"),o.endOnNext&&(o.end=t.get(o.classId)),t.set(o.classId,o.start);const s=o.end?o.end.getTime():o.start.getTime()+1e3*(o.duration||0),a=n.get(o.classId);if(a){for(const t of a)(t.start<=e&&t.end>e||t.start>=e&&t.start<s)&&sh("DATERANGE tags with the same CLASS should not overlap");a.push({start:e,end:s})}else o.classId&&n.set(o.classId,[{start:e,end:s}])}}r&&!i&&sh("If a Playlist contains an EXT-X-DATERANGE tag, it MUST also contain at least one EXT-X-PROGRAM-DATE-TIME tag.")}(r.segments),r.lowLatencyCompatibility&&function({lowLatencyCompatibility:e,targetDuration:t,partTargetDuration:n,segments:r,renditionReports:i},s){const{canSkipUntil:a,holdBack:o,partHoldBack:c}=e;if(a<6*t&&sh("The Skip Boundary must be at least six times the EXT-X-TARGETDURATION."),o<3*t&&sh("HOLD-BACK must be at least three times the EXT-X-TARGETDURATION."),s){void 0===n&&sh("EXT-X-PART-INF is required if a Playlist contains one or more EXT-X-PART tags"),void 0===c&&sh("EXT-X-PART: PART-HOLD-BACK attribute is mandatory"),c<n&&sh("PART-HOLD-BACK must be at least PART-TARGET");for(const[e,{parts:t}]of r.entries()){t.length>0&&e<r.length-3&&sh("Remove EXT-X-PART tags from the Playlist after they are greater than three target durations from the end of the Playlist.");for(const[e,{duration:r}]of t.entries())void 0!==r&&(r>n&&sh("PART-TARGET is the maximum duration of any Partial Segment"),e<t.length-1&&r<.85*n&&sh("All Partial Segments except the last part of a segment must have a duration of at least 85% of PART-TARGET"))}}for(const e of i){const t=r.at(-1);null!==e.lastMSN&&void 0!==e.lastMSN||(e.lastMSN=t.mediaSequenceNumber),(null===e.lastPart||void 0===e.lastPart)&&t.parts.length>0&&(e.lastPart=t.parts.length-1)}}(r,h),r}(e,t),!n.isIFrame&&t.hasMap&&t.compatibleVersion<6&&(t.compatibleVersion=6)),t.compatibleVersion>1&&(!n.version||n.version<t.compatibleVersion)&&sh(`EXT-X-VERSION needs to be ${t.compatibleVersion} or higher.`),n}const Vh=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-STREAM-INF","#EXT-X-CUE-OUT","#EXT-X-CUE-IN","#EXT-X-KEY","#EXT-X-MAP"],$h=["#EXT-X-MEDIA"];class Kh extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(const t of e)if(t.startsWith("#"))if(Vh.some((e=>t.startsWith(e))))super.push(t);else{if(this.includes(t)){if($h.some((e=>t.startsWith(e))))continue;sh(`Redundant item (${t})`)}super.push(t)}else super.push(t);return this.length}}function Wh(e,t){let n=1e3;t&&(n=Math.pow(10,t));const r=Math.round(e*n)/n;return t?r.toFixed(t):r}function zh(e){const t=[`DATA-ID="${e.id}"`];return e.language&&t.push(`LANGUAGE="${e.language}"`),e.value?t.push(`VALUE="${e.value}"`):e.uri&&t.push(`URI="${e.uri}"`),`#EXT-X-SESSION-DATA:${t.join(",")}`}function Qh(e,t){const n=t?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",r=[`METHOD=${e.method}`];return e.uri&&r.push(`URI="${e.uri}"`),e.iv&&(16!==e.iv.length&&sh("IV must be a 128-bit unsigned integer"),r.push(`IV=${ch(e.iv)}`)),e.format&&r.push(`KEYFORMAT="${e.format}"`),e.formatVersion&&r.push(`KEYFORMATVERSIONS="${e.formatVersion}"`),`${n}:${r.join(",")}`}function Jh(e,t){const n=t.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",r=[`BANDWIDTH=${t.bandwidth}`];if(t.averageBandwidth&&r.push(`AVERAGE-BANDWIDTH=${t.averageBandwidth}`),t.isIFrameOnly&&r.push(`URI="${t.uri}"`),t.codecs&&r.push(`CODECS="${t.codecs}"`),t.resolution&&r.push(`RESOLUTION=${t.resolution.width}x${t.resolution.height}`),t.frameRate&&r.push(`FRAME-RATE=${Wh(t.frameRate,3)}`),t.hdcpLevel&&r.push(`HDCP-LEVEL=${t.hdcpLevel}`),t.audio.length>0){r.push(`AUDIO="${t.audio[0].groupId}"`);for(const n of t.audio)e.push(Zh(n))}if(t.video.length>0){r.push(`VIDEO="${t.video[0].groupId}"`);for(const n of t.video)e.push(Zh(n))}if(t.subtitles.length>0){r.push(`SUBTITLES="${t.subtitles[0].groupId}"`);for(const n of t.subtitles)e.push(Zh(n))}if(fh().allowClosedCaptionsNone&&0===t.closedCaptions.length)r.push("CLOSED-CAPTIONS=NONE");else if(t.closedCaptions.length>0){r.push(`CLOSED-CAPTIONS="${t.closedCaptions[0].groupId}"`);for(const n of t.closedCaptions)e.push(Zh(n))}if(t.score&&r.push(`SCORE=${t.score}`),t.allowedCpc){const e=[];for(const{format:n,cpcList:r}of t.allowedCpc)e.push(`${n}:${r.join("/")}`);r.push(`ALLOWED-CPC="${e.join(",")}"`)}t.videoRange&&r.push(`VIDEO-RANGE=${t.videoRange}`),t.stableVariantId&&r.push(`STABLE-VARIANT-ID="${t.stableVariantId}"`),t.programId&&r.push(`PROGRAM-ID=${t.programId}`),e.push(`${n}:${r.join(",")}`),t.isIFrameOnly||e.push(`${t.uri}`)}function Zh(e){const t=[`TYPE=${e.type}`,`GROUP-ID="${e.groupId}"`,`NAME="${e.name}"`];return void 0!==e.isDefault&&t.push("DEFAULT="+(e.isDefault?"YES":"NO")),void 0!==e.autoselect&&t.push("AUTOSELECT="+(e.autoselect?"YES":"NO")),void 0!==e.forced&&t.push("FORCED="+(e.forced?"YES":"NO")),e.language&&t.push(`LANGUAGE="${e.language}"`),e.assocLanguage&&t.push(`ASSOC-LANGUAGE="${e.assocLanguage}"`),e.instreamId&&t.push(`INSTREAM-ID="${e.instreamId}"`),e.characteristics&&t.push(`CHARACTERISTICS="${e.characteristics}"`),e.channels&&t.push(`CHANNELS="${e.channels}"`),e.uri&&t.push(`URI="${e.uri}"`),`#EXT-X-MEDIA:${t.join(",")}`}function ef(e,t,n,r,i=1,s=null){let a=!1,o="";if(t.discontinuity&&e.push("#EXT-X-DISCONTINUITY"),t.key){const r=Qh(t.key);r!==n&&(e.push(r),n=r)}if(t.map){const n=function(e){const t=[`URI="${e.uri}"`];return e.byterange&&t.push(`BYTERANGE="${tf(e.byterange)}"`),`#EXT-X-MAP:${t.join(",")}`}(t.map);n!==r&&(e.push(n),r=n)}if(t.programDateTime&&e.push(`#EXT-X-PROGRAM-DATE-TIME:${hh(t.programDateTime)}`),t.dateRange&&e.push(function(e){const t=[`ID="${e.id}"`];e.start&&t.push(`START-DATE="${hh(e.start)}"`),e.end&&t.push(`END-DATE="${hh(e.end)}"`),e.duration&&t.push(`DURATION=${e.duration}`),e.plannedDuration&&t.push(`PLANNED-DURATION=${e.plannedDuration}`),e.classId&&t.push(`CLASS="${e.classId}"`),e.endOnNext&&t.push("END-ON-NEXT=YES");for(const n of Object.keys(e.attributes))n.startsWith("X-")?"number"==typeof e.attributes[n]?t.push(`${n}=${e.attributes[n]}`):t.push(`${n}="${e.attributes[n]}"`):n.startsWith("SCTE35-")&&t.push(`${n}=${ch(e.attributes[n])}`);return`#EXT-X-DATERANGE:${t.join(",")}`}(t.dateRange)),t.markers.length>0&&(o=function(e,t){let n="";for(const r of t)if("OUT"===r.type)n="OUT",e.push(`#EXT-X-CUE-OUT:DURATION=${r.duration}`);else if("IN"===r.type)n="IN",e.push("#EXT-X-CUE-IN");else if("RAW"===r.type){const t=r.value?`:${r.value}`:"";e.push(`#${r.tagName}${t}`)}return n}(e,t.markers)),t.parts.length>0&&(a=function(e,t){let n=!1;for(const r of t)if(r.hint){const t=[];if(t.push("TYPE=PART",`URI="${r.uri}"`),r.byterange){const{offset:e,length:n}=r.byterange;t.push(`BYTERANGE-START=${e}`),n&&t.push(`BYTERANGE-LENGTH=${n}`)}e.push(`#EXT-X-PRELOAD-HINT:${t.join(",")}`),n=!0}else{const t=[];t.push(`DURATION=${r.duration}`,`URI="${r.uri}"`),r.byterange&&t.push(`BYTERANGE=${tf(r.byterange)}`),r.independent&&t.push("INDEPENDENT=YES"),r.gap&&t.push("GAP=YES"),e.push(`#EXT-X-PART:${t.join(",")}`)}return n}(e,t.parts)),a)return[n,r];const c=i<3?Math.round(t.duration):Wh(t.duration,function(e){const t=e.toString(10),n=t.indexOf(".");return-1===n?0:t.length-n-1}(t.duration));return e.push(`#EXTINF:${c},${unescape(encodeURIComponent(t.title||""))}`),t.byterange&&e.push(`#EXT-X-BYTERANGE:${tf(t.byterange)}`),null!=s?Array.prototype.push.call(e,s(t)):Array.prototype.push.call(e,`${t.uri}`),[n,r,o]}function tf({offset:e,length:t}){return`${t}@${e}`}function nf(e,t=null){rh(e),th("Not a playlist","playlist"===e.type);const n=new Kh(e.uri);return n.push("#EXTM3U"),e.version&&n.push(`#EXT-X-VERSION:${e.version}`),e.independentSegments&&n.push("#EXT-X-INDEPENDENT-SEGMENTS"),e.start&&n.push(`#EXT-X-START:TIME-OFFSET=${Wh(e.start.offset)}${e.start.precise?",PRECISE=YES":""}`),e.isMasterPlaylist?function(e,t){for(const n of t.sessionDataList)e.push(zh(n));for(const n of t.sessionKeyList)e.push(Qh(n,!0));for(const n of t.variants)Jh(e,n)}(n,e):function(e,t,n=null){let r="",i="",s=!1;if(t.targetDuration&&e.push(`#EXT-X-TARGETDURATION:${t.targetDuration}`),t.lowLatencyCompatibility){const{canBlockReload:n,canSkipUntil:r,holdBack:i,partHoldBack:s}=t.lowLatencyCompatibility,a=[];a.push("CAN-BLOCK-RELOAD="+(n?"YES":"NO")),void 0!==r&&a.push(`CAN-SKIP-UNTIL=${r}`),void 0!==i&&a.push(`HOLD-BACK=${i}`),void 0!==s&&a.push(`PART-HOLD-BACK=${s}`),e.push(`#EXT-X-SERVER-CONTROL:${a.join(",")}`)}t.partTargetDuration&&e.push(`#EXT-X-PART-INF:PART-TARGET=${t.partTargetDuration}`),t.mediaSequenceBase&&e.push(`#EXT-X-MEDIA-SEQUENCE:${t.mediaSequenceBase}`),t.discontinuitySequenceBase&&e.push(`#EXT-X-DISCONTINUITY-SEQUENCE:${t.discontinuitySequenceBase}`),t.playlistType&&e.push(`#EXT-X-PLAYLIST-TYPE:${t.playlistType}`),t.isIFrame&&e.push("#EXT-X-I-FRAMES-ONLY"),t.skip>0&&e.push(`#EXT-X-SKIP:SKIPPED-SEGMENTS=${t.skip}`);for(const a of t.segments){let o="";[r,i,o]=ef(e,a,r,i,t.version,n),"OUT"===o?s=!0:"IN"===o&&s&&(s=!1)}"VOD"===t.playlistType&&s&&e.push("#EXT-X-CUE-IN"),t.prefetchSegments.length>2&&sh("The server must deliver no more than two prefetch segments");for(const n of t.prefetchSegments)n.discontinuity&&e.push("#EXT-X-PREFETCH-DISCONTINUITY"),e.push(`#EXT-X-PREFETCH:${n.uri}`);t.endlist&&e.push("#EXT-X-ENDLIST");for(const n of t.renditionReports){const t=[];t.push(`URI="${n.uri}"`,`LAST-MSN=${n.lastMSN}`),void 0!==n.lastPart&&t.push(`LAST-PART=${n.lastPart}`),e.push(`#EXT-X-RENDITION-REPORT:${t.join(",")}`)}}(n,e,t),n.join("\n")}const rf="hls_cache",sf=[],af={},of={},cf={};let lf="";function uf(e,t){if(sf.push(e),af[e]=t,sf.length>5){!function(e){delete af[e],delete sf[e],new JSFile(rf+"/"+e).delete()}(sf.shift())}}async function hf(e,t){const n=md5X(e);if(af[n])return af[n];let r={},i=e;for(;r=await req(i,{headers:t,redirect:0}),r.headers.location;)i=r.headers.location;if(200==r.code){const e=function(e,t){if(t.variants)for(const n of t.variants)n.uri.startsWith("http")||(n.uri=df(e,n.uri));if(t.segments)for(const n of t.segments)n.uri.startsWith("http")||(n.uri=df(e,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=df(e,n.key.uri));return t}(i,function(e){const t={version:void 0,isMasterPlaylist:void 0,hasMap:!1,targetDuration:0,compatibleVersion:1,isClosedCaptionsNone:!1,hash:{}},n=function(e,t){const n=[];for(const r of e.split("\n")){const e=r.trim();if(e)if(e.startsWith("#")){if(e.startsWith("#EXT")){const r=Yh(e,t);r&&n.push(r)}}else n.push(e)}return 0!==n.length&&"EXTM3U"===n[0].name||sh("The EXTM3U tag MUST be the first line."),n}(e,t),r=qh(n,t);return r.source=e,r}(r.content));return uf(n,{code:r.code,plist:e,key:n,headers:r.headers}),af[n]}return{}}async function ff(e,t,n){if(!af[e])return{};const r=af[e].plist.segments;let i=!cf[e];if(i){cf[e]={};for(const t of r){const n=md5X(t.uri+t.mediaSequenceNumber.toString());cf[e][n]={file:rf+"/"+e+"/"+n,uri:t.uri,key:n,index:t.mediaSequenceNumber,order:t.mediaSequenceNumber,state:-1,read:!1}}}for(const n in cf[e]){const i=cf[e][n];i.index>=t?i.order=i.index-t:i.order=r.length-t+i.index}i&&async function(e,t,n){lf&&lf!=e&&delete of[lf];lf=e,of[e]=!0;for(let r=0;r<t&&of[e];r++)new Promise((function(t,r){!async function r(){if(!of[e])return void t();const i=Hu.pickBy(cf[e],(function(e){return-1==e.state})),s=Hu.minBy(Object.values(i),(function(e){return e.order}));s?(await pf(e,s,n),setTimeout(r,5)):t()}()}))}(e,5,n);const s=r[t],a=md5X(s.uri+s.mediaSequenceNumber.toString()),o=cf[e][a];if(1==o.state||-1==o.state){const e=new JSFile(o.file);if(await e.exist())return o.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:e};o.state=-1}if(-1==o.state&&pf(e,o,n),0==o.state){var c=new JSProxyStream;c.head(200,{connection:"close","content-type":"video/mp2t"});let e=0;return o.read=!0,new Promise((async function(t,n){const r=new JSFile(o.file+".dl");await r.open("r"),async function n(){const i=await r.size();if(i>e){var s=await r.read(i-e,e);await c.write(s),e=i}if(1==o.state||o.state<0)return c.done(),await r.close(),await r.delete(),o.read=!1,void t();setTimeout(n,5)}()})),{buffer:3,content:c}}}async function pf(e,t,n){if(t.state>=0)return;if(!of[e])return;if(t.state=0,await new JSFile(t.file).exist())return void(t.state=1);const r=new JSFile(t.file+".dl");await r.open("w");const i=await req(t.uri,{buffer:3,headers:n,stream:r,timeout:[5e3,1e4]});if(i.error||i.code>=300)return await r.close(),t.read||await r.delete(),void(t.state=-1);await r.close(),t.read?await r.copy(t.file):await r.move(t.file),t.state=1}function df(e,t){var n=e.split("/"),r=t.split("/");n.pop();for(var i=0;i<r.length;i++)"."!=r[i]&&(".."==r[i]?n.pop():n.push(r[i]));return n.join("/")}class mf{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new Ju(this.getAppName(),"DEBUG")}getAppName(){return"弹幕"}getHeader(){return{"User-Agent":ju,Referer:this.siteUrl+"/"}}async reconnnect(e,t,n,r,i,s){return await this.jadeLog.error("请求失败,请检查url:"+e+",两秒后重试"),Vu(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,t,n,r,i,s)):(await this.jadeLog.error("请求失败,重连失败"),null)}async getResponse(e,t,n,r,i,s,a){return void 0!==a.headers.location?r?(await this.jadeLog.debug(`返回重定向连接:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,t,n,r,i,s):a.content.length>0?(this.reconnectTimes=0,i?{cookie:a.headers["set-cookie"],content:a.content}:a.content):1===s?(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`请求失败,请求url为:${e},回复内容为:${JSON.stringify(a)}`),await this.reconnnect(e,t,n,r,i,s))}async fetch(e,t,n,r=!1,i=!1,s=0){let a=qu(t),o=e;Hu.isEmpty(a)||(o=e+"?"+a);let c,l=new Uu(o);return c=await req(l.toString(),{method:"get",headers:n,buffer:s,data:null}),201===c.code||200===c.code||302===c.code||301===c.code||i?await this.getResponse(e,t,n,r,i,s,c):(await this.jadeLog.error(`请求失败,失败原因为:状态码出错,请求url为:${l},回复内容为:${JSON.stringify(c)}`),await this.reconnnect(e,t,n,r,i,s))}async getHtml(e=this.siteUrl,t=this.getHeader()){let n=await this.fetch(e,null,t);if(!Hu.isEmpty(n))return Fu(n);await this.jadeLog.error("html获取失败",!0)}async parseVodShortListFromJson(e,t){for(const n of e.pageComponentList)if(void 0!==n.commonData){let e=new zu,r=n.commonData;if(e.type_name=r.feature,void 0!==r.notice&&(e.vod_actor=r.notice.replaceAll("演员:","").replaceAll(" ","")),void 0!==r.director&&(e.vod_director=r.director.replaceAll("导演:","").replaceAll(" ","")),"电影"===t.type_name?e.vod_id=r.leftButtonDTO.action.value:e.vod_id=r.showId,e.vod_name=r.titleDTO.displayName,e.vod_name===t.vod_name||e.type_name.indexOf(t.vod_year)>-1||e.type_name.indexOf(t.type_name)>-1||e.vod_director===t.vod_director)return await this.jadeLog.debug(`匹配视频网站成功,名称为:${e.vod_name},类型为:${e.type_name},导演为:${e.vod_director}`,!0),e}return await this.jadeLog.warning("没有匹配到弹幕网站"),null}async parseVodUrlFromJsonByEpisodeId(e,t){for(const r of e.serisesList)if(n=t.episodeId,!isNaN(parseInt(n))&&parseInt(t.episodeId).toString()===r.displayName)return r.action.value;var n;return await this.jadeLog.error("没有找到匹配的集数"),""}async downloadDanmu(e){let t=await req(e,{headers:this.getHeader()});if(200===t.code){let e=function(e){let t=[];return Array.from(e.danmuku).forEach((e=>{let n=Number(e[0]),r=e[4];t.push(`<d p="${n},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${r}]]></d>`)})),String.raw`<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>52175602</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>`+t.join("")+"</i>"}(JSON.parse(t.content)),n={do:"set",key:"danmu",value:e};return await req("http://127.0.0.1:9978/cache",{method:"post",data:n,postType:"form-data"}),"http://127.0.0.1:9978/cache?do=get&key=danmu"}return this.jadeLog.error(`弹幕请求失败,返回结果为:${JSON.stringify(t)}`),""}async search(e,t){let n={pg:"1",keyword:e.vod_name},r=JSON.parse(await this.fetch(this.siteUrl+"/api/search",n,this.getHeader())),i=await this.parseVodShortListFromJson(r,e);return Hu.isEmpty(i)?"":await this.getVideoUrl(i.vod_id,t)}async getVideoUrl(e,t){let n="";if(!Hu.isEmpty(e)){if(e.startsWith("http"))n=e;else{let r={appScene:"show_episode",showIds:e},i=JSON.parse(await this.fetch(this.siteUrl+"/api/search",r,this.getHeader()));n=await this.parseVodUrlFromJsonByEpisodeId(i,t)}if(!Hu.isEmpty(n))return await this.jadeLog.debug(`弹幕视频播放连接为:${n}`),await this.downloadDanmu("https://dmku.thefilehosting.com/?ac=dm&url="+n)}return n}async getDammu(e,t){return await this.search(e,t)}}const Ef="Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",Tf="76917ccccd4441c39457a04f6084fb2f";function _f(){const e={};return e["User-Agent"]=Ef,e.Referer="https://www.aliyundrive.com/",e}class gf{constructor(){this.driveId="",this.userId="",this.tokenType="",this.accessToken="",this.refreshToken=""}static objectFrom(e){if(Hu.isEmpty(e))return new gf;let t=JSON.parse(e),n=new gf;return n.driveId=t.default_drive_id,n.userId=t.user_id,n.tokenType=t.token_type,n.accessToken=t.access_token,n.refreshToken=t.refresh_token,n}getDriveId(){return Hu.isEmpty(this.driveId)?"":this.driveId}getUserId(){return Hu.isEmpty(this.userId)?"":this.userId}getTokenType(){return Hu.isEmpty(this.tokenType)?"":this.tokenType}getAccessToken(){return Hu.isEmpty(this.accessToken)?"":this.accessToken}getRefreshToken(){return Hu.isEmpty(this.refreshToken)?"":this.refreshToken}setRefreshToken(e){this.refreshToken=e}getAuthorization(){return this.getTokenType()+" "+this.getAccessToken()}isAuthed(){return this.getTokenType().length>0&&this.getAccessToken().length>0}clean(){return this.refreshToken="",this.accessToken="",this}async save(){return await local.set("ali","aliyundrive_user",this.toString()),this}toString(){return JSON.stringify(this.toDict())}toDict(){return{default_drive_id:this.getDriveId(),user_id:this.getUserId(),token_type:this.getTokenType(),access_token:this.getAccessToken(),refresh_token:this.getRefreshToken()}}}class Af{constructor(){this.tokenType="",this.accessToken="",this.refreshToken=""}static objectFrom(e){if(Hu.isEmpty(e))return new Af;let t=JSON.parse(e),n=new Af;return n.tokenType=t.token_type,n.accessToken=t.access_token,n.refreshToken=t.refresh_token,n}getTokenType(){return Hu.isEmpty(this.tokenType)?"":this.tokenType}getAccessToken(){return Hu.isEmpty(this.accessToken)?"":this.accessToken}getRefreshToken(){return Hu.isEmpty(this.refreshToken)?"":this.refreshToken}getAuthorization(){return this.getTokenType()+" "+this.getAccessToken()}clean(){return this.refreshToken="",this.accessToken="",this}async save(){return await local.set("ali","aliyundrive_oauth",this.toString()),this}toString(){return JSON.stringify(this.toDict())}toDict(){return{token_type:this.getTokenType(),access_token:this.getAccessToken(),refresh_token:this.getRefreshToken()}}}class yf{constructor(){this.defaultDriveId="",this.resourceDriveId="",this.backupDriveId=""}static objectFrom(e){if(Hu.isEmpty(e))return new yf;let t=JSON.parse(e),n=new yf;return n.defaultDriveId=t.default_drive_id,n.resourceDriveId=t.resource_drive_id,n.backupDriveId=t.backup_drive_id,n}getDefaultDriveId(){return Hu.isEmpty(this.defaultDriveId)?"":this.defaultDriveId}getResourceDriveId(){return Hu.isEmpty(this.resourceDriveId)?"":this.resourceDriveId}getBackupDriveId(){return Hu.isEmpty(this.backupDriveId)?"":this.backupDriveId}clean(){return this.defaultDriveId="",this.backupDriveId="",this.resourceDriveId="",this}async save(){return await local.set("ali","aliyundrive_drive",this.toString()),this}toString(){const e={default_drive_id:this.getDefaultDriveId(),resource_drive_id:this.getResourceDriveId(),backup_drive_id:this.getBackupDriveId()};return JSON.stringify(e)}}class vf{constructor(){this.redirectUri=""}static objectFrom(e){if(Hu.isEmpty(e))return new vf;let t=JSON.parse(e),n=new vf;return n.redirectUri=t.redirectUri,n}getRedirectUri(){return Hu.isEmpty(this.redirectUri)?"":this.redirectUri}getCode(){return this.getRedirectUri().split("code=")[1]}}async function Sf(e,t,n){return t["Content-Type"]="application/json",await req(e,{headers:n,method:"post",data:t})}let Nf="",If=new Af,bf=new gf,Cf=new yf,Of="TV",kf=new Ju("阿里云盘","INFO");async function Rf(){let e=await async function(){return await local.get("ali","aliyundrive_user")}();bf=gf.objectFrom(e),Hu.isEmpty(bf.getRefreshToken())?await kf.error("读取用户缓存失败",!0):await kf.info("读取用户缓存成功",!0);let t=await async function(){return await local.get("ali","aliyundrive_oauth")}();If=Af.objectFrom(t),Hu.isEmpty(If.getAccessToken())?await kf.error("读取授权失败",!0):await kf.info("读取授权成功",!0),await kf.info("阿里Api初始化完成")}async function Df(){await async function(){let e=await async function(){let e=await Hf(),t={drive_id:e,parent_file_id:"root",limit:100,order_by:"updated_at",order_direction:"DESC"},n=await xf("openFile/list",t,!0),r=JSON.parse(n);if(Hu.isEmpty(r.items))return!1;for(const e of r.items)if(e.name===Of)return e.file_id;return!1}();if(e)return await kf.info("文件夹存在,无需重新创建"),e;await kf.debug("文件夹不存在,重新创建文件夹");let t={check_name_mode:"refuse",drive_id:await Hf(),name:Of,parent_file_id:"root",type:"folder"},n=await xf("openFile/create",t,!0),r=JSON.parse(n);if(Hu.isEmpty(r.drive_id))return await kf.error(`创建文件夹失败,失败原因为:${n}`),null;return await kf.info("创建文件夹成功",!0),r.file_id}()}function Lf(e){return e.indexOf("TooManyRequests")>-1?(Vu(1),{code:429,content:e}):e.indexOf("AccessTokenInvalid")>-1?{code:400,content:e}:e.indexOf("AccessTokenExpired")>-1?{code:401,content:e}:e.indexOf("BadRequest")>-1?{code:402,content:e}:e.indexOf("NotFound.File")>-1||e.indexOf("ForbiddenFileInTheRecycleBin")>-1?{code:403,content:e}:e.indexOf("user not allowed access drive")>-1?{code:404,content:e}:e.indexOf("ForbiddenNoPermission.File")>-1?{code:500,content:e}:e.indexOf("InvalidParameter.ToParentFileId")>-1?{code:501,content:e}:e.indexOf("NotFound.ParentFileId")>-1?{code:502,content:e}:e.indexOf("The resource drive has exceeded the limit. File size exceeded drive capacity")>-1||e.indexOf("The resource drive has exceeded the limit. File size exceeded drive capacity")>-1?{code:503,content:e}:{code:200,content:e}}async function wf(e,t){let n="https://api-cf.nn.ci/alist/ali_open/"+e,r=(await Sf(n,t,_f())).content;return await async function(e){return e.indexOf("Too Many Requests")>-1&&(await If.clean().save(),!0)}(r)?(await kf.error(`Alist授权Token失败,失败原因为:太多请求,失败详情为:${r}`),!1):(If=await Af.objectFrom(r).save(),!0)}async function Mf(e,t,n,r){e=e.startsWith("https")?e:"https://api.aliyundrive.com/"+e;let i=await Sf(e,t,function(e){const t={};return t["x-share-token"]=e,t["X-Canary"]="client=Android,app=adrive,version=v4.3.1",bf.isAuthed()&&(t.authorization=bf.getAuthorization()),t}(n));return await kf.debug(`正在请求需要阿里登录的url:${e},参数为:${JSON.stringify(t)}`),i=Lf(i.content),r&&400===i.code?(await kf.error("登录阿里云盘失败,失败原因为:登录Token无效,准备重新授权,失败详情:"+i.content),await Bf(""),await Mf(e,t,n,!1)):(await kf.debug(`完成请求需要阿里登录的url:${e},参数为:${JSON.stringify(t)},请求结果为${i.content}`),i.content)}async function xf(e,t,n){e=e.startsWith("https")?e:"https://open.aliyundrive.com/adrive/v1.0/"+e,await kf.debug(`正在请求需要阿里授权的url:${e},参数为:${JSON.stringify(t)}`);let r=function(){const e={};return e.authorization=If.getAuthorization(),e}(),i=await Sf(e,t,r);if(i=Lf(i.content),n&&(400===i.code||401===i.code||429===i.code||402===i.code||403===i.code||404===i.code)){if(400===i.code)await kf.error("阿里授权失败,失败原因为:授权Token无效,准备重新授权,失败详情:"+i.content),await Pf();else if(401===i.code)await kf.error("阿里授权失败,失败原因为:授权Token失效,准备重新授权,失败详情:"+i.content),await Pf();else{if(402===i.code)return await kf.error("阿里授权失败,失败原因为:授权Token失效,准备重新授权,失败详情:"+i.content),await xf(e,t,!0);if(403===i.code)return await kf.error("阿里授权失败,失败原因为:没有找到缓存文件,失败详情:"+i.content),await async function(){await local.set("file","file_id",JSON.stringify({}))}(),"retry";if(404===i.code)return await kf.error("阿里授权失败,失败原因为:用户没有权限"+i.content),await xf(e,t,!0);if(429===i.code)return await kf.error(`正在请求需要阿里授权的url:${e},请求过于频繁,稍后重试,10分钟后再重试`),Vu(600),await xf(e,t,!0)}return await xf(e,t,!1)}return await kf.debug(`完成请求需要阿里授权的url:${e},参数为:${JSON.stringify(t)},请求结果为:${JSON.stringify(i)}`),i.content}async function Pf(){await If.clean().save(),await Uf()}async function Bf(e){try{if(Hu.isEmpty(bf.getAccessToken())||bf.getRefreshToken()!==e){let e={};e.refresh_token=bf.getRefreshToken(),e.grant_type="refresh_token",await kf.info(`准备登录阿里云盘,登录Token为:${bf.getRefreshToken()}`);let t=await async function(e,t){return e=e.startsWith("https")?e:"https://api.aliyundrive.com/"+e,(await Sf(e,t,_f())).content}("https://auth.aliyundrive.com/v2/account/token",e);t.indexOf("InvalidParameter.RefreshToken")>1||Hu.isEmpty(t)?Hu.isEmpty(t)?await kf.error(`登录阿里云盘失败,登录Token为:${bf.getRefreshToken()},失败原因为:检查Token是否正确`):await kf.error(`登录阿里云盘失败,登录Token为:${bf.getRefreshToken()},失败原因为:检查Token是否正确,返回结果为:${t}`):(await kf.info(`登录阿里云盘成功,登录Token为:${bf.getRefreshToken()}`),bf=await gf.objectFrom(t).save())}else await kf.info(`阿里云盘已登录,无需重复登录,登录Token为:${bf.getRefreshToken()}`);return!0}catch(e){return await kf.error(`登录阿里云盘失败,登录Token为:${bf.getRefreshToken()},失败原因为:${e}`),await bf.clean().save(),!0}}async function Ff(){try{let e={authorize:1,scope:"user:base,file:all:read,file:all:write"},t="https://open.aliyundrive.com/oauth/users/authorize?client_id="+Tf+"&redirect_uri=https://alist.nn.ci/tool/aliyundrive/callback&scope=user:base,file:all:read,file:all:write&state=";await kf.debug(`正在请求获取阿里授权码的url:${t},参数为:${e}`);let n=await Mf(t,e,Nf,!0);if(await kf.debug(`完成请求获取阿里授权码的url:${t},参数为:${e},返回值为:${n}`),!(Hu.isEmpty(n)||n.indexOf("AccessTokenInvalid")>-1))return await kf.info(`请求获取阿里授权码成功,返回值为:${n}`),await async function(e){try{let t={};return t.code=e,t.grant_type="authorization_code",await wf("code",t)}catch(e){return await If.clean().save(),!1}}(vf.objectFrom(n).getCode());Hu.isEmpty(n)?await kf.error("请求获取阿里授权码失败,失败原因为:还未登录"):await kf.error(`请求获取阿里授权码失败,失败原因为:还未登录,失败详情为:${n}`)}catch(e){return await kf.error(`请求获取阿里授权失败,失败原因为:${e}`),!1}}async function Uf(){try{if(Hu.isEmpty(If.getRefreshToken()))return await Ff();if(Hu.isEmpty(If.getAccessToken())){let e={grant_type:"refresh_token"};return e.refresh_token=If.getRefreshToken(),await wf("token",e)}return!0}catch(e){return await kf.error("刷新授权Token失败,失败原因为:"+e),await If.clean().save(),!1}}async function Hf(){if(Hu.isEmpty(bf.getDriveId())){return(await async function(){if(!Hu.isEmpty(Cf)&&!Hu.isEmpty(Cf.default_drive_id))return Cf;let e=await xf("user/getDriveInfo",{},!0),t=JSON.parse(e);return Cf={default_drive_id:t.default_drive_id,resource_drive_id:t.resource_drive_id,backup_drive_id:t.backup_drive_id},Cf}()).resource_drive_id}return bf.getDriveId()}const Gf=new Ju("阿里云盘");async function Xf(e){await Rf(),await async function(e){bf.setRefreshToken(e),await Bf(e),await Uf()}(e),await Df(),await Gf.info("阿里云盘初始化完成",!0)}class jf{constructor(){this.fileId="",this.shareId="",this.shareToken="",this.shareFileToken="",this.seriesId="",this.name="",this.type="",this.formatType="",this.size="",this.parent="",this.shareData=null,this.shareIndex=0,this.lastUpdateAt=0}static objectFrom(e,t,n){let r=new jf;return r.fileId=null==typeof e.fid?"":e.fid,r.shareId=t,r.shareToken=null==typeof e.stoken?"":e.stoken,r.shareFileToken=null==typeof e.share_fid_token?"":e.share_fid_token,r.seriesId=null==typeof e.series_id?"":e.series_id,r.name=null==typeof e.file_name?"":e.file_name,r.type=null==typeof e.obj_category?"":e.obj_category,r.formatType=null==typeof e.format_type?"":e.format_type,r.size=null==typeof e.size?"":e.size,r.parent=null==typeof e.pdir_fid?"":e.pdir_fid,r.lastUpdateAt=null==typeof e.last_update_at?"":e.last_update_at,r.shareIndex=n,r}getFileExtension(){return this.name.split(".").slice(-1)[0]}getFileId(){return Hu.isEmpty(this.fileId)?"":this.fileId}getName(){return Hu.isEmpty(this.name)?"":this.name}getParent(){return Hu.isEmpty(this.parent)?"":"["+this.parent+"]"}getSize(){return 0===this.size?"":"["+(((e=this.size)<=0?"":e>1099511627776?(e/=1099511627776).toFixed(2)+"TB":e>1073741824?(e/=1073741824).toFixed(2)+"GB":e>1048576?(e/=1048576).toFixed(2)+"MB":(e/=1024).toFixed(2)+"KB")+"]");var e}getShareIndex(){return this.shareIndex}getDisplayName(e){let t=this.getName();if("电视剧"===e){let e=["4k","4K"];t=t.replaceAll("."+this.getFileExtension(),""),t=t.replaceAll(" ","").replaceAll(" ","");for(const n of e)t=t.replaceAll(n,"");t=function(e,t){let n=e.exec(t);return null!==n&&n.length>=1&&n.length>=1?n[1]:t}(/\.S01E(.*?)\./,t);const n=t.match(/\d+/g);!Hu.isEmpty(n)&&n.length>0&&(t=n[0])}return t+" "+this.getSize()}getEpisodeUrl(e){return this.getDisplayName(e)+"$"+this.getFileId()+"++"+this.shareFileToken+"++"+this.shareId+"++"+this.shareToken}}const Yf=new Ju("夸克云盘"),qf=new class{constructor(){this.apiUrl="https://drive-pc.quark.cn/1/clouddrive/",this.cookie="",this.ckey="",this.shareTokenCache={},this.pr="pr=ucpro&fr=pc",this.subtitleExts=[".srt",".ass",".scc",".stl",".ttml"],this.saveFileIdCaches={},this.saveDirId=null,this.saveDirName="TV",this.isVip=!1}async initQuark(e){this.ckey=Gu.enc.Hex.stringify(Gu.MD5(e)).toString(),this.cookie=e,this.isVip=await this.getVip()}getHeaders(){return{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) quark-cloud-drive/2.5.20 Chrome/100.0.4896.160 Electron/18.3.5.4-b478491100 Safari/537.36 Channel/pckk_other_ch",Referer:"https://pan.quark.cn/","Content-Type":"application/json",Cookie:this.cookie,Host:"drive-pc.quark.cn"}}async api(e,t,n,r){const i=n||3;let s=await req(this.apiUrl+e,{method:r||"post",data:t,headers:this.getHeaders()});if(s.headers["set-cookie"]){const e=[s.headers["set-cookie"]].join(";;;").match(/__puus=([^;]+)/);e&&this.cookie.match(/__puus=([^;]+)/)[1]!=e[1]&&(this.cookie=this.cookie.replace(/__puus=[^;]+/,`__puus=${e[1]}`))}return 200!==s.code&&i>0?(Vu(1),await this.api(e,t,i-1)):JSON.parse(s.content)||{}}getShareData(e){let t=/https:\/\/pan\.quark\.cn\/s\/([^\\|#/]+)/.exec(e);return t?{shareId:t[1],folderId:"0"}:null}async getVip(){return"EXP_SVIP"===(await this.api("member?pr=ucpro&fr=pc&uc_param_str=&fetch_subscribe=true&_ch=home&fetch_identity=true",null,null,"get")).data.member_type}getPlayFormatList(){return this.isVip?["4K","超清","高清","普画"]:["普画"]}getPlayFormtQuarkList(){return this.isVip?["4k","2k","super","high","normal","low"]:["low"]}async getShareToken(e){if(!this.shareTokenCache[e.shareId]){delete this.shareTokenCache[e.shareId];const t=await this.api(`share/sharepage/token?${this.pr}`,{pwd_id:e.shareId,passcode:e.sharePwd||""});t.data&&t.data.stoken&&(this.shareTokenCache[e.shareId]=t.data)}}async listFile(e,t,n,r,i,s,a){a=a||1;const o=await this.api(`share/sharepage/detail?${this.pr}&pwd_id=${i}&stoken=${encodeURIComponent(this.shareTokenCache[i].stoken)}&pdir_fid=${s}&force=0&_page=${a}&_size=200&_sort=file_type:asc,file_name:asc`,null,null,"get");if(!o.data)return[];const c=o.data.list;if(!c)return[];const l=[];for(const i of c)if(!0===i.dir)l.push(i);else if(!0===i.file&&"video"===i.obj_category){if(i.size<5242880)continue;i.stoken=this.shareTokenCache[t.shareId].stoken,n.push(jf.objectFrom(i,t.shareId,e))}else"file"===i.type&&this.subtitleExts.some((e=>i.file_name.endsWith(e)))&&r.push(jf.objectFrom(i,t,e));if(a<Math.ceil(o.metadata._total/200)){const o=await this.listFile(e,t.shareId,n,r,i,s,a+1);for(const e of o)c.push(e)}for(const s of l){const a=await this.listFile(e,t,n,r,i,s.fid);for(const e of a)c.push(e)}return c}findBestLCS(e,t){const n=[];let r=0;for(let i=0;i<t.length;i++){const s=Ku(e.name,t[i].name);n.push({target:t[i],lcs:s}),s.length>n[r].lcs.length&&(r=i)}return{allLCS:n,bestMatch:n[r],bestMatchIndex:r}}async getFilesByShareUrl(e,t,n,r){const i="string"==typeof t?this.getShareData(t):t;return i?(await this.getShareToken(i),this.shareTokenCache[i.shareId]?(await this.listFile(e,i,n,r,i.shareId,i.folderId),void(r.length>0&&n.forEach((e=>{var t=this.findBestLCS(e,r);t.bestMatch&&(e.subtitle=t.bestMatch.target)})))):[]):[]}clean(){const e=Object.keys(this.saveFileIdCaches);for(const t of e)delete this.saveFileIdCaches[t]}async clearSaveDir(){const e=await this.api(`file/sort?${this.pr}&pdir_fid=${this.saveDirId}&_page=1&_size=200&_sort=file_type:asc,updated_at:desc`,{},{},"get");e.data&&e.data.list&&e.data.list.length>0&&await this.api(`file/delete?${this.pr}`,{action_type:2,filelist:e.data.list.map((e=>e.fid)),exclude_fids:[]})}async createSaveDir(e){if(this.saveDirId)return void(e&&await this.clearSaveDir());const t=await this.api(`file/sort?${this.pr}&pdir_fid=0&_page=1&_size=200&_sort=file_type:asc,updated_at:desc`,{},{},"get");if(t.data&&t.data.list)for(const e of t.data.list)if(e.file_name===this.saveDirName){this.saveDirId=e.fid,await this.clearSaveDir();break}if(!this.saveDirId){const e=await this.api(`file?${this.pr}`,{pdir_fid:"0",file_name:this.saveDirName,dir_path:"",dir_init_lock:!1});e.data&&e.data.fid&&(this.saveDirId=e.data.fid)}}async save(e,t,n,r,i){if(await this.createSaveDir(i),i&&this.clean(),!this.saveDirId)return null;if(!t&&(await this.getShareToken({shareId:e}),!this.shareTokenCache[e]))return null;const s=await this.api(`share/sharepage/save?${this.pr}`,{fid_list:[n],fid_token_list:[r],to_pdir_fid:this.saveDirId,pwd_id:e,stoken:t||this.shareTokenCache[e].stoken,pdir_fid:"0",scene:"link"});if(s.data&&s.data.task_id){let e=0;for(;;){const t=await this.api(`task?${this.pr}&task_id=${s.data.task_id}&retry_index=${e}`,{},{},"get");if(t.data&&t.data.save_as&&t.data.save_as.save_as_top_fids&&t.data.save_as.save_as_top_fids.length>0)return t.data.save_as.save_as_top_fids[0];if(e++,e>2)break;Vu(1)}}return!1}async getLiveTranscoding(e,t,n,r,i){if(!this.saveFileIdCaches[n]){const i=await this.save(e,t,n,r,!0);if(!i)return null;this.saveFileIdCaches[n]=i}const s=await this.api(`file/v2/play?${this.pr}`,{fid:this.saveFileIdCaches[n],resolutions:"normal,low,high,super,2k,4k",supports:"fmp4"});if(s.data&&s.data.video_list){let e=i.split("-").slice(-1)[0],t=function(e,t){const n=e.map(((e,t)=>t)).filter((n=>e[n]===t));return n}(this.getPlayFormatList(),e),n=this.getPlayFormtQuarkList()[t];for(const e of s.data.video_list)if(e.resolution===n)return e.video_info.url;return s.data.video_list[t].video_info.url}return null}async getDownload(e,t,n,r,i){if(!this.saveFileIdCaches[n]){const s=await this.save(e,t,n,r,i);if(!s)return null;this.saveFileIdCaches[n]=s}const s=await this.api(`file/download?${this.pr}&uc_param_str=`,{fids:[this.saveFileIdCaches[n]]});return s.data?s.data[0]:null}};async function Vf(e){Xf(e.aliToken),async function(e){qf.initQuark(e),await Yf.info(`夸克云盘初始化完成,Cookie为:${e}`,!0)}(e.quarkCookie)}class $f{constructor(){this.class=[],this.list=[],this.filters=[],this.header={"User-Agent":ju},this.format="",this.danmaku="",this.url="",this.subs=[],this.parse=0,this.jx=0,this.page=0,this.pagecount=0,this.limit=0,this.total=0,this.extra={}}get(){return new $f}home(e,t,n){return JSON.stringify({class:e,list:t,filters:n})}homeVod(e){return JSON.stringify({page:this.page,list:e,pagecount:this.page,total:this.page})}category(e,t,n,r,i){return JSON.stringify({page:parseInt(t),pagecount:n,limit:r,total:i,list:e})}search(e){return JSON.stringify({list:e,page:this.page,pagecount:this.pagecount,total:this.total})}detail(e){return JSON.stringify({list:[e]})}play(e){return Hu.isEmpty(this.danmaku)?JSON.stringify({url:e,parse:this.parse,header:this.header,format:this.format,subs:this.subs,extra:this.extra,jx:this.jx}):JSON.stringify({url:e,parse:this.parse,header:this.header,format:this.format,subs:this.subs,danmaku:this.danmaku,extra:this.extra,jx:this.jx})}playTxt(e){return e}errorCategory(e){let t=new Wu;return t.vod_name="错误:打开无效",t.vod_id="error",t.vod_pic=Yu+"/resources/error.png",t.vod_remarks=e,JSON.stringify({page:parseInt(0),pagecount:0,limit:0,total:0,list:[t]})}setClass(e){return this.class=e,this}setVod(e){return"object"==typeof e&&Array.isArray(e)?this.list=e:void 0!==e&&(this.list=[e]),this}setFilters(e){return this.filters=e,this}setHeader(e){return this.header=e,this}setParse(e){return this.parse=e,this}setJx(){return this.jx=1,this}setUrl(e){return this.url=e,this}danmu(e){return this.danmaku=e,this}setFormat(e){return this.format=e,this}setSubs(e){return this.subs=e,this}dash(){return this.format="application/dash+xml",this}m3u8(){return this.format="application/x-mpegURL",this}rtsp(){return this.format="application/x-rtsp",this}octet(){return this.format="application/octet-stream",this}setPage(e,t,n,r){return this.page=e,this.limit=n,this.total=r,this.pagecount=t,this}toString(){return JSON.stringify(this)}}class Kf{constructor(){this.siteKey="",this.siteType=0,this.jadeLog=new Ju(this.getAppName(),"DEBUG"),this.classes=[],this.filterObj={},this.result=new $f,this.catOpenStatus=!0,this.danmuStaus=!1,this.reconnectTimes=0,this.maxReconnectTimes=5,this.siteUrl="",this.vodList=[],this.homeVodList=[],this.count=0,this.limit=0,this.total=0,this.page=0,this.vodDetail=new zu,this.playUrl="",this.header={},this.remove18=!1,this.type_id_18=0,this.type_name_18="伦理片",this.episodeObj={},this.danmuUrl="",this.cfgObj={}}async reconnnect(e,t,n,r,i,s){return await this.jadeLog.error("请求失败,请检查url:"+e+",两秒后重试"),Vu(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,t,n,r,i,s)):(await this.jadeLog.error("请求失败,重连失败"),null)}getClassIdList(){let e=[];for(const t of this.classes)e.push(t.type_id);return e}getTypeDic(e,t){return{type_name:e,type_id:t}}getFliterDic(e,t){return{n:e,v:t}}async getHtml(e=this.siteUrl,t=!1,n=this.getHeader()){let r=await this.fetch(e,null,n,!1,!1,0,t);if(!Hu.isEmpty(r))return Fu(r);await this.jadeLog.error("html获取失败",!0)}getClassNameList(){let e=[];for(const t of this.classes)e.push(t.type_name);return e}async postReconnect(e,t,n,r,i){return await this.jadeLog.error("请求失败,请检查url:"+e+",两秒后重试"),Vu(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.post(e,t,n,r,i)):(await this.jadeLog.error("请求失败,重连失败"),null)}getHeader(){return{"User-Agent":ju,Referer:this.siteUrl+"/"}}async getResponse(e,t,n,r,i,s,a,o){return void 0!==a.headers.location?r?(await this.jadeLog.debug(`返回重定向连接:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,t,n,r,i,s,o):a.content.length>0?(this.reconnectTimes=0,i?{cookie:a.headers["set-cookie"],content:a.content}:a.content):1===s?(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`请求失败,请求url为:${e},回复内容为:${JSON.stringify(a)}`),await this.reconnnect(e,t,n,r,i,s,o))}async fetch(e,t,n,r=!1,i=!1,s=0,a=!1){let o=qu(t),c=e;Hu.isEmpty(o)||(c=e+"?"+o);let l,u=new Uu(c);return l=r?await req(u.toString(),{method:"get",headers:n,buffer:s,data:null,redirect:2,proxy:a}):await req(u.toString(),{method:"get",headers:n,buffer:s,data:null,proxy:a,timeout:1e4}),200===l.code||302===l.code||301===l.code||i?await this.getResponse(e,t,n,r,i,s,l,a):(await this.jadeLog.error(`请求失败,失败原因为:状态码出错,请求url为:${u},回复内容为:${JSON.stringify(l)}`),await this.reconnnect(e,t,n,r,i,s,l,a))}async redirect(e){}async post(e,t,n,r="form",i=0){let s=new Uu(e),a=await req(s.toString(),{method:"post",headers:n,data:t,postType:r,buffer:i});return 200===a.code||void 0===a.code||302===a.code?void 0!==a.headers.location?await this.redirect(a):Hu.isEmpty(a.content)?await this.postReconnect(e,t,n,r,i):(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`请求失败,请求url为:${e},回复内容为${JSON.stringify(a)}`),await this.postReconnect(e,t,n,r,i))}getName(){return"🍥┃基础┃🍥"}getAppName(){return"基础"}getJSName(){return"base"}getType(){return 3}async parseVodShortListFromDoc(e){}async parseVodShortListFromJson(e){}parseVodShortFromElement(e,t){}async parseVodShortListFromDocByCategory(e){}async getFilter(e){}async setClasses(){}async setFilterObj(){}async parseVodShortListFromDocBySearch(e){return[]}async parseVodDetailFromDoc(e){}async parseVodDetailfromJson(e){}async parseVodPlayFromUrl(e,t){}async parseVodPlayFromDoc(e,t){}async SpiderInit(e){try{this.siteKey=e.skey,this.siteType=parseInt(e.stype.toString());let t=null;"string"==typeof e.ext?(await this.jadeLog.info(`读取配置文件,ext为:${e.ext}`),t=JSON.parse(e.ext)):"object"==typeof e.ext?(await this.jadeLog.info(`读取配置文件,所有参数为:${JSON.stringify(e)}`),await this.jadeLog.info(`读取配置文件,ext为:${JSON.stringify(e.ext)}`),t=e.ext):await this.jadeLog.error("不支持的数据类型,数据类型为"+typeof e.ext);let n=t.box;return t.CatOpenStatus="CatOpen"===n,t}catch(e){return await this.jadeLog.error("初始化失败,失败原因为:"+e.message),{token:null,CatOpenStatus:!1,code:0}}}async initCloud(e){await Vf(e)}async spiderInit(){}async init(e){this.danmuSpider=new mf,this.cfgObj=await this.SpiderInit(e),await this.jadeLog.debug(`初始化参数为:${JSON.stringify(e)}`),this.catOpenStatus=this.cfgObj.CatOpenStatus,this.danmuStaus=this.cfgObj.danmu??this.danmuStaus;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("读取缓存列表和二级菜单成功"):(await this.jadeLog.warning("读取缓存列表和二级菜单失败"),await this.writeFilterAndClasses())}catch(e){await local.set(this.siteKey,"classes",JSON.stringify([])),await local.set(this.siteKey,"filterObj",JSON.stringify({})),await this.jadeLog.error("读取缓存失败,失败原因为:"+e)}this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"img/",{}),this.douBanjsBase=await js2Proxy(!0,this.siteType,this.siteKey,"douban/",{}),this.baseProxy=await js2Proxy(!0,this.siteType,this.siteKey,"img/",this.getHeader()),this.videoProxy=await js2Proxy(!0,this.siteType,this.siteKey,"m3u8/",{}),this.detailProxy=await js2Proxy(!0,this.siteType,this.siteKey,"detail/",this.getHeader())}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0||(await local.set(this.siteKey,"classes",JSON.stringify([])),await local.set(this.siteKey,"filterObj",JSON.stringify({})),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"最近更新",type_id:"最近更新"}),await this.setClasses(),await this.setFilterObj(),await local.set(this.siteKey,"classes",JSON.stringify(this.classes)),await local.set(this.siteKey,"filterObj",JSON.stringify(this.filterObj))}async getClassesCache(){let e=await local.get(this.siteKey,"classes");return Hu.isEmpty(e)?this.classes:JSON.parse(e)}async getFiletObjCache(){let e=await local.get(this.siteKey,"filterObj");return Hu.isEmpty(e)?this.filterObj:JSON.parse(e)}async setHome(e){}async home(e){return this.vodList=[],await this.jadeLog.info("正在解析首页类别",!0),await this.setHome(e),await this.jadeLog.debug(`首页类别内容为:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("首页类别解析完成",!0),this.result.home(this.classes,[],this.filterObj)}async setHomeVod(){}async homeVod(){return await this.jadeLog.info("正在解析首页内容",!0),await this.setHomeVod(),await this.jadeLog.debug(`首页内容为:${this.result.homeVod(this.homeVodList)}`),await this.jadeLog.info("首页内容解析完成",!0),this.result.homeVod(this.homeVodList)}async setCategory(e,t,n,r){}async category(e,t,n,r){if(this.page=parseInt(t),await this.jadeLog.info(`正在解析分类页面,tid = ${e},pg = ${t},filter = ${n},extend = ${JSON.stringify(r)}`),"最近更新"===e)return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(e,t,n,r),await this.jadeLog.debug(`分类页面内容为:${this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}`),await this.jadeLog.info("分类页面解析完成",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(e){await this.jadeLog.error(`分类页解析失败,失败原因为:${e}`)}}async setDetail(e){}setEpisodeCache(){let e={vodDetail:this.vodDetail.to_dict()},t=this.vodDetail.vod_play_url.split("$$$");for(const n of t){let t=n.split("#");for(const n of t){let t=n.split("$")[0].split(" ")[0],r=n.split("$")[1],i=t.match(/\d+/g);null!==i&&i.length>0&&(t=i[0]),e[r]={episodeName:t,episodeId:t}}}return e}async detail(e){this.vodDetail=new zu,await this.jadeLog.info(`正在获取详情页面,id为:${e}`);try{return await this.setDetail(e),await this.jadeLog.debug(`详情页面内容为:${this.result.detail(this.vodDetail)}`),await this.jadeLog.info("详情页面解析完成",!0),this.vodDetail.vod_id=e,3===this.siteType&&(this.episodeObj=this.setEpisodeCache()),this.result.detail(this.vodDetail)}catch(e){await this.jadeLog.error("详情界面获取失败,失败原因为:"+e)}}async setPlay(e,t,n){this.playUrl=t}async setDanmu(e){await this.jadeLog.debug(`${JSON.stringify(this.episodeObj)}`);let t=this.episodeObj[e],n=JSON.parse(this.episodeObj.vodDetail);return delete n.vod_content,delete n.vod_play_from,delete n.vod_play_url,delete n.vod_pic,await this.jadeLog.debug(`正在加载弹幕,视频详情为:${JSON.stringify(n)},集数:${JSON.stringify(this.episodeObj[e])}`),await this.danmuSpider.getDammu(n,t)}async play(e,t,n){await this.jadeLog.info(`正在解析播放页面,flag:${e},id:${t},flags:${n}`,!0);try{let r;if(await this.setPlay(e,t,n),void 0!==this.playUrl.content)r=this.result.playTxt(this.playUrl);else if(this.danmuStaus&&!this.catOpenStatus)if(Hu.isEmpty(this.danmuUrl)){let e;try{e=await this.setDanmu(t)}catch(e){await this.jadeLog.error(`弹幕加载失败,失败原因为:${e}`)}r=this.result.danmu(e).play(this.playUrl)}else await this.jadeLog.debug("播放详情页面有弹幕,所以不需要再查找弹幕"),r=this.result.danmu(this.danmuUrl).play(this.playUrl);else await this.jadeLog.debug("不需要加载弹幕",!0),r=this.result.play(this.playUrl);return await this.jadeLog.info("播放页面解析完成",!0),await this.jadeLog.debug(`播放页面内容为:${r}`),r}catch(e){await this.jadeLog.error("解析播放页面出错,失败原因为:"+e)}}async setSearch(e,t){}async search(e,t){return this.vodList=[],await this.jadeLog.info(`正在解析搜索页面,关键词为 = ${e},quick = ${t}`),await this.setSearch(e,t,1),0===this.vodList.length&&e.indexOf(" ")>-1&&(await this.jadeLog.debug(`搜索关键词为:${e},其中有空格,去除空格在搜索一次`),await this.search(e.replaceAll(" ","").replaceAll("\ufeff",""),t)),await this.jadeLog.debug(`搜索页面内容为:${this.result.search(this.vodList)}`),await this.jadeLog.info("搜索页面解析完成",!0),this.result.search(this.vodList)}async getImg(e,t){let n,r=t.Proxy;Hu.isEmpty(t)&&(t={Referer:e,"User-Agent":ju}),n=await req(e,{buffer:2,headers:t,proxy:r});try{return $u(n.content),r?await this.jadeLog.error(`使用VPN代理,图片地址为:${e},headers:${JSON.stringify(t)},代理失败,准备重连,输出内容为:${JSON.stringify(n)}`):await this.jadeLog.error(`使用普通代理,图片地址为:${e},headers:${JSON.stringify(t)},代理失败,准备重连,输出内容为:${JSON.stringify(n)}`),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.getImg(e,t)):{code:500,headers:t,content:"加载失败"}}catch(e){return await this.jadeLog.debug("图片代理成功",!0),this.reconnectTimes=0,n}}async proxy(e,t){await this.jadeLog.debug(`正在设置反向代理 segments = ${e.join(",")},headers = ${JSON.stringify(t)}`);let n=e[0],r=$u(e[1]);if(await this.jadeLog.debug(`反向代理参数为:${r}`),"img"===n){await this.jadeLog.debug("通过代理获取图片",!0);let i=await this.getImg(r,t);return JSON.stringify({code:i.code,buffer:2,content:i.content,headers:i.headers})}if("douban"!==n){if("m3u8"===n){let s;return s=Hu.isEmpty(t)?await this.fetch(r,null,{Referer:r,"User-Agent":ju},!1,!1,2):await this.fetch(r,null,t,!1,!1,2),await this.jadeLog.debug(`m3u8返回内容为:${$u(s)}`),Hu.isEmpty(s)?JSON.stringify({code:500,buffer:2,content:s,headers:{}}):JSON.stringify({code:200,buffer:2,content:s,headers:{}})}if("hls"===n){function a(e,t){let n={};return e.headers["content-length"]?Object.assign(n,e.headers,{"content-length":t.length.toString()}):Object.assign(n,e.headers),delete n["transfer-encoding"],"gzip"==n["content-encoding"]&&delete n["content-encoding"],n}const o=await hf(r,t);if(o.variants){const c=nf(o.plist);return{code:o.code,content:c,headers:a(o,c)}}{const l=nf(o.plist,(e=>js2Proxy(!1,this.siteType,this.siteKey,"ts/"+encodeURIComponent(o.key+"/"+e.mediaSequenceNumber.toString()),t)));return{code:o.code,content:l,headers:a(o,l)}}}if("ts"===n){const u=r.split("/"),h=u[0],f=parseInt(u[1]);return await ff(h,f,t)}if("detail"===n){let p=await this.getHtml(this.siteUrl+r),d=await this.parseVodDetailFromDoc(p),m=await this.getImg(d.vod_pic,t);return JSON.stringify({code:m.code,buffer:2,content:m.content,headers:m.headers})}return JSON.stringify({code:500,content:""})}{let E=await this.doubanSearch(r);if(null!==E){let T,_=E[0].vod_pic;return T=Hu.isEmpty(t)?await req(_,{buffer:2,headers:{Referer:_,"User-Agent":ju}}):await req(_,{buffer:2,headers:t}),JSON.stringify({code:T.code,buffer:2,content:T.content,headers:T.headers})}}}getSearchHeader(){const e=["api-client/1 com.douban.frodo/7.22.0.beta9(231) Android/23 product/Mate 40 vendor/HUAWEI model/Mate 40 brand/HUAWEI rom/android network/wifi platform/AndroidPad","api-client/1 com.douban.frodo/7.18.0(230) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.1.0(205) Android/29 product/perseus vendor/Xiaomi model/Mi MIX 3 rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.3.0(207) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1"];return{"User-Agent":e[Math.floor(Math.random()*e.length)]}}async parseDoubanVodShortListFromJson(e){let t=[];for(const n of e){let e=new Wu;e.vod_id="msearch:"+n.id,void 0===n.title?e.vod_name=n.target.title:e.vod_name=n.title,void 0===n.pic?e.vod_pic=n.target.cover_url:e.vod_pic=n.pic.normal,void 0===n.rating?e.vod_remarks="评分:"+n.target.rating.value.toString():e.vod_remarks="评分:"+n.rating.value.toString(),t.push(e)}return t}sign(e,t,n="GET"){let r="%2F"+e.split("/").slice(3).join("%2F"),i=[n.toLocaleUpperCase(),r,t.toString()].join("&");return CryptoJS.HmacSHA1(i,"bf7dddc7c9cfe6f7").toString(CryptoJS.enc.Base64)}async doubanSearch(e){try{let t="0dad551ec0f84ed02907ff5c42e8ec70",n="https://frodo.douban.com/api/v2"+"/search/movie",r=new Date,i=r.getFullYear().toString()+(r.getMonth()+1).toString()+r.getDate().toString(),s={_sig:this.sign(n,i),_ts:i,apiKey:t,count:20,os_rom:"android",q:encodeURIComponent(e),start:0},a=await this.fetch(n,s,this.getSearchHeader());if(!Hu.isEmpty(a)){let e=JSON.parse(a);return await this.jadeLog.debug(`豆瓣搜索结果:${a}`),await this.parseDoubanVodShortListFromJson(e.items)}return null}catch(e){await this.jadeLog.error("反向代理出错,失败原因为:"+e)}}}let Wf=new class extends Kf{constructor(){super(),this.siteUrl="https://frodo.douban.com/api/v2",this.apiKey="0ac44ae016490db2204ce0a042db2916",this.UserAgents=["api-client/1 com.douban.frodo/7.22.0.beta9(231) Android/23 product/Mate 40 vendor/HUAWEI model/Mate 40 brand/HUAWEI rom/android network/wifi platform/AndroidPad","api-client/1 com.douban.frodo/7.18.0(230) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.1.0(205) Android/29 product/perseus vendor/Xiaomi model/Mi MIX 3 rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.3.0(207) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1"]}getHeader(){return{Host:"frodo.douban.com",Connection:"Keep-Alive",Referer:"https://servicewechat.com/wx2f9b06c1de1ccfca/84/page-frame.html","User-Agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat"}}getSearchHeader(){let e=Math.floor(Math.random()*this.UserAgents.length);return{"User-Agent":this.UserAgents[e]}}getName(){return"🍥┃豆瓣┃🍥"}getAppName(){return"豆瓣"}getJSName(){return"douban"}getType(){return 3}async setClasses(){let e=[{type_name:"热门电影",type_id:"hot_gaia"},{type_name:"热播剧集",type_id:"tv_hot"},{type_name:"热播综艺",type_id:"show_hot"},{type_name:"电影筛选",type_id:"movie"},{type_name:"电视筛选",type_id:"tv"},{type_name:"电影榜单",type_id:"rank_list_movie"},{type_name:"电视剧榜单",type_id:"rank_list_tv"}];for(const t of e)this.classes.push({type_name:t.type_name,type_id:t.type_id})}async setFilterObj(){this.filterObj={hot_gaia:[{key:"sort",name:"排序",value:[{n:"热度",v:"recommend"},{n:"最新",v:"time"},{n:"评分",v:"rank"}]},{key:"area",name:"地区",value:[{n:"全部",v:"全部"},{n:"华语",v:"华语"},{n:"欧美",v:"欧美"},{n:"韩国",v:"韩国"},{n:"日本",v:"日本"}]}],tv_hot:[{key:"type",name:"分类",value:[{n:"综合",v:"tv_hot"},{n:"国产剧",v:"tv_domestic"},{n:"欧美剧",v:"tv_american"},{n:"日剧",v:"tv_japanese"},{n:"韩剧",v:"tv_korean"},{n:"动画",v:"tv_animation"}]}],show_hot:[{key:"type",name:"分类",value:[{n:"综合",v:"show_hot"},{n:"国内",v:"show_domestic"},{n:"国外",v:"show_foreign"}]}],movie:[{key:"类型",name:"类型",value:[{n:"全部类型",v:""},{n:"喜剧",v:"喜剧"},{n:"爱情",v:"爱情"},{n:"动作",v:"动作"},{n:"科幻",v:"科幻"},{n:"动画",v:"动画"},{n:"悬疑",v:"悬疑"},{n:"犯罪",v:"犯罪"},{n:"惊悚",v:"惊悚"},{n:"冒险",v:"冒险"},{n:"音乐",v:"音乐"},{n:"历史",v:"历史"},{n:"奇幻",v:"奇幻"},{n:"恐怖",v:"恐怖"},{n:"战争",v:"战争"},{n:"传记",v:"传记"},{n:"歌舞",v:"歌舞"},{n:"武侠",v:"武侠"},{n:"情色",v:"情色"},{n:"灾难",v:"灾难"},{n:"西部",v:"西部"},{n:"纪录片",v:"纪录片"},{n:"短片",v:"短片"}]},{key:"地区",name:"地区",value:[{n:"全部地区",v:""},{n:"华语",v:"华语"},{n:"欧美",v:"欧美"},{n:"韩国",v:"韩国"},{n:"日本",v:"日本"},{n:"中国大陆",v:"中国大陆"},{n:"美国",v:"美国"},{n:"中国香港",v:"中国香港"},{n:"中国台湾",v:"中国台湾"},{n:"英国",v:"英国"},{n:"法国",v:"法国"},{n:"德国",v:"德国"},{n:"意大利",v:"意大利"},{n:"西班牙",v:"西班牙"},{n:"印度",v:"印度"},{n:"泰国",v:"泰国"},{n:"俄罗斯",v:"俄罗斯"},{n:"加拿大",v:"加拿大"},{n:"澳大利亚",v:"澳大利亚"},{n:"爱尔兰",v:"爱尔兰"},{n:"瑞典",v:"瑞典"},{n:"巴西",v:"巴西"},{n:"丹麦",v:"丹麦"}]},{key:"sort",name:"排序",value:[{n:"近期热度",v:"T"},{n:"首映时间",v:"R"},{n:"高分优先",v:"S"}]},{key:"年代",name:"年代",value:[{n:"全部年代",v:""},{n:"2023",v:"2023"},{n:"2022",v:"2022"},{n:"2021",v:"2021"},{n:"2020",v:"2020"},{n:"2019",v:"2019"},{n:"2010年代",v:"2010年代"},{n:"2000年代",v:"2000年代"},{n:"90年代",v:"90年代"},{n:"80年代",v:"80年代"},{n:"70年代",v:"70年代"},{n:"60年代",v:"60年代"},{n:"更早",v:"更早"}]}],tv:[{key:"类型",name:"类型",value:[{n:"不限",v:""},{n:"电视剧",v:"电视剧"},{n:"综艺",v:"综艺"}]},{key:"电视剧形式",name:"电视剧形式",value:[{n:"不限",v:""},{n:"喜剧",v:"喜剧"},{n:"爱情",v:"爱情"},{n:"悬疑",v:"悬疑"},{n:"动画",v:"动画"},{n:"武侠",v:"武侠"},{n:"古装",v:"古装"},{n:"家庭",v:"家庭"},{n:"犯罪",v:"犯罪"},{n:"科幻",v:"科幻"},{n:"恐怖",v:"恐怖"},{n:"历史",v:"历史"},{n:"战争",v:"战争"},{n:"动作",v:"动作"},{n:"冒险",v:"冒险"},{n:"传记",v:"传记"},{n:"剧情",v:"剧情"},{n:"奇幻",v:"奇幻"},{n:"惊悚",v:"惊悚"},{n:"灾难",v:"灾难"},{n:"歌舞",v:"歌舞"},{n:"音乐",v:"音乐"}]},{key:"综艺形式",name:"综艺形式",value:[{n:"不限",v:""},{n:"真人秀",v:"真人秀"},{n:"脱口秀",v:"脱口秀"},{n:"音乐",v:"音乐"},{n:"歌舞",v:"歌舞"}]},{key:"地区",name:"地区",value:[{n:"全部地区",v:""},{n:"华语",v:"华语"},{n:"欧美",v:"欧美"},{n:"国外",v:"国外"},{n:"韩国",v:"韩国"},{n:"日本",v:"日本"},{n:"中国大陆",v:"中国大陆"},{n:"中国香港",v:"中国香港"},{n:"美国",v:"美国"},{n:"英国",v:"英国"},{n:"泰国",v:"泰国"},{n:"中国台湾",v:"中国台湾"},{n:"意大利",v:"意大利"},{n:"法国",v:"法国"},{n:"德国",v:"德国"},{n:"西班牙",v:"西班牙"},{n:"俄罗斯",v:"俄罗斯"},{n:"瑞典",v:"瑞典"},{n:"巴西",v:"巴西"},{n:"丹麦",v:"丹麦"},{n:"印度",v:"印度"},{n:"加拿大",v:"加拿大"},{n:"爱尔兰",v:"爱尔兰"},{n:"澳大利亚",v:"澳大利亚"}]},{key:"sort",name:"排序",value:[{n:"近期热度",v:"T"},{n:"首播时间",v:"R"},{n:"高分优先",v:"S"}]},{key:"年代",name:"年代",value:[{n:"全部",v:""},{n:"2023",v:"2023"},{n:"2022",v:"2022"},{n:"2021",v:"2021"},{n:"2020",v:"2020"},{n:"2019",v:"2019"},{n:"2010年代",v:"2010年代"},{n:"2000年代",v:"2000年代"},{n:"90年代",v:"90年代"},{n:"80年代",v:"80年代"},{n:"70年代",v:"70年代"},{n:"60年代",v:"60年代"},{n:"更早",v:"更早"}]},{key:"平台",name:"平台",value:[{n:"全部",v:""},{n:"腾讯视频",v:"腾讯视频"},{n:"爱奇艺",v:"爱奇艺"},{n:"优酷",v:"优酷"},{n:"湖南卫视",v:"湖南卫视"},{n:"Netflix",v:"Netflix"},{n:"HBO",v:"HBO"},{n:"BBC",v:"BBC"},{n:"NHK",v:"NHK"},{n:"CBS",v:"CBS"},{n:"NBC",v:"NBC"},{n:"tvN",v:"tvN"}]}],rank_list_movie:[{key:"榜单",name:"榜单",value:[{n:"实时热门电影",v:"movie_real_time_hotest"},{n:"一周口碑电影榜",v:"movie_weekly_best"},{n:"豆瓣电影Top250",v:"movie_top250"}]}],rank_list_tv:[{key:"榜单",name:"榜单",value:[{n:"实时热门电视",v:"tv_real_time_hotest"},{n:"华语口碑剧集榜",v:"tv_chinese_best_weekly"},{n:"全球口碑剧集榜",v:"tv_global_best_weekly"},{n:"国内口碑综艺榜",v:"show_chinese_best_weekly"},{n:"国外口碑综艺榜",v:"show_global_best_weekly"}]}]}}async parseVodShortListFromJson(e){let t=[];for(const n of e){let e=new Wu;e.vod_id="msearch:"+n.id,void 0===n.title?e.vod_name=n.target.title:e.vod_name=n.title,void 0===n.pic?e.vod_pic=n.target.cover_url:e.vod_pic=n.pic.normal,void 0===n.rating?e.vod_remarks="评分:"+n.target.rating.value.toString():e.vod_remarks="评分:"+n.rating.value.toString(),t.push(e)}return t}get_tags(e){let t=[];for(const n of Object.keys(e))"sort"!==n&&t.push(e[n]);return t.join(",")}sign(e,t,n="GET"){let r="%2F"+e.split("/").slice(3).join("%2F"),i=[n.toLocaleUpperCase(),r,t.toString()].join("&");return Gu.HmacSHA1(i,"bf7dddc7c9cfe6f7").toString(Gu.enc.Base64)}async setHomeVod(){let e=this.siteUrl+"/subject_collection/subject_real_time_hotest/items",t=await this.fetch(e,{apikey:this.apiKey},this.getHeader());if(!Hu.isEmpty(t)){let e=JSON.parse(t).subject_collection_items;this.homeVodList=await this.parseVodShortListFromJson(e)}}async setCategory(e,t,n,r){let i=r.sort??"show_hot",s=this.get_tags(r);this.count=0,this.limit=20,this.total=0;let a=0;parseInt(t)>1&&(a=(parseInt(t)-1)*this.limit);let o="",c={start:a.toString(),count:this.limit.toString()},l="items";switch(e){case"hot_gaia":i=r.sort??"recommend";let e=r.area??"全部";c.sort=i,c.area=e,o="/movie/hot_gaia";break;case"tv_hot":o="/subject_collection/"+(r.type??"tv_hot")+"/items",l="subject_collection_items";break;case"show_hot":o="/subject_collection/"+(r.type??"show_hot")+"/items",l="subject_collection_items";break;case"movie":c.sort=i,c.tags=s,o="/movie/recommend";break;case"tv":c.sort=i,c.tags=s,o="/tv/recommend";break;case"rank_list_movie":o="/subject_collection/"+(r["榜单"]??"movie_real_time_hotest")+"/items",l="subject_collection_items";break;case"rank_list_tv":o="/subject_collection/"+(r["榜单"]??"tv_real_time_hotest")+"/items",l="subject_collection_items"}c.apikey=this.apiKey;let u=await this.fetch(this.siteUrl+o,c,this.getHeader());if(!Hu.isEmpty(u)){let e=JSON.parse(u)[l];this.vodList=await this.parseVodShortListFromJson(e)}}async setSearch(e,t,n){let r="https://frodo.douban.com/api/v2/search/movie",i=new Date,s=i.getFullYear().toString()+("0"+(i.getMonth()+1)).slice(-2).toString()+i.getDate().toString();let a={_sig:this.sign(r,s),_ts:s,apiKey:"0dad551ec0f84ed02907ff5c42e8ec70",count:20,os_rom:"android",q:encodeURIComponent(e),start:parseInt(n)},o=await this.fetch(r,a,this.getSearchHeader());if(!Hu.isEmpty(o)){let e=JSON.parse(o);this.vodList=await this.parseVodShortListFromJson(e.items);const t=parseInt(n);let r=t;20===this.vodList.length&&(r=t+1),this.result.setPage(t,r,20,r)}}};async function zf(e){await Wf.init(e)}async function Qf(e){return await Wf.home(e)}async function Jf(){return await Wf.homeVod()}async function Zf(e,t,n,r){return await Wf.category(e,t,n,r)}async function ep(e){return await Wf.detail(e)}async function tp(e,t,n){return await Wf.play(e,t,n)}async function np(e,t){return await Wf.search(e,t)}function rp(){return{init:zf,home:Qf,homeVod:Jf,category:Zf,detail:ep,play:tp,search:np}}export{rp as __jsEvalReturn,Wf as spider};