gp-designer 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- (function(we,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(we=typeof globalThis<"u"?globalThis:we||self,c(we.GpWebModule={},we.Vue))})(this,function(we,c){"use strict";var Q;(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"})(Q||(Q={}));function or(e){return e.type===Q.Tag||e.type===Q.Script||e.type===Q.Style}const cr=Q.Root,lr=Q.Text,dr=Q.Directive,hr=Q.Comment,fr=Q.Script,Er=Q.Style,mr=Q.Tag,Tr=Q.CDATA,pr=Q.Doctype;let Mi=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return pt(this,t)}};class Na extends Mi{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class Tt extends Na{constructor(){super(...arguments),this.type=Q.Text}get nodeType(){return 3}}class Ca extends Na{constructor(){super(...arguments),this.type=Q.Comment}get nodeType(){return 8}}class Ia extends Na{constructor(t,a){super(a),this.name=t,this.type=Q.Directive}get nodeType(){return 1}}class Sa extends Mi{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}}class Pi extends Sa{constructor(){super(...arguments),this.type=Q.CDATA}get nodeType(){return 4}}class Ge extends Sa{constructor(){super(...arguments),this.type=Q.Root}get nodeType(){return 9}}class xa extends Sa{constructor(t,a,i=[],n=t==="script"?Q.Script:t==="style"?Q.Style:Q.Tag){super(i),this.name=t,this.attribs=a,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var a,i;return{name:t,value:this.attribs[t],namespace:(a=this["x-attribsNamespace"])===null||a===void 0?void 0:a[t],prefix:(i=this["x-attribsPrefix"])===null||i===void 0?void 0:i[t]}})}}function v(e){return or(e)}function qt(e){return e.type===Q.CDATA}function De(e){return e.type===Q.Text}function Wt(e){return e.type===Q.Comment}function Oa(e){return e.type===Q.Directive}function Be(e){return e.type===Q.Root}function se(e){return Object.prototype.hasOwnProperty.call(e,"children")}function pt(e,t=!1){let a;if(De(e))a=new Tt(e.data);else if(Wt(e))a=new Ca(e.data);else if(v(e)){const i=t?Da(e.children):[],n=new xa(e.name,{...e.attribs},i);i.forEach(r=>r.parent=n),e.namespace!=null&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]={...e["x-attribsPrefix"]}),a=n}else if(qt(e)){const i=t?Da(e.children):[],n=new Pi(i);i.forEach(r=>r.parent=n),a=n}else if(Be(e)){const i=t?Da(e.children):[],n=new Ge(i);i.forEach(r=>r.parent=n),e["x-mode"]&&(n["x-mode"]=e["x-mode"]),a=n}else if(Oa(e)){const i=new Ia(e.name,e.data);e["x-name"]!=null&&(i["x-name"]=e["x-name"],i["x-publicId"]=e["x-publicId"],i["x-systemId"]=e["x-systemId"]),a=i}else throw new Error(`Not implemented yet: ${e.type}`);return a.startIndex=e.startIndex,a.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(a.sourceCodeLocation=e.sourceCodeLocation),a}function Da(e){const t=e.map(a=>pt(a,!0));for(let a=1;a<t.length;a++)t[a].prev=t[a-1],t[a-1].next=t[a];return t}const ki={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class br{constructor(t,a,i){this.dom=[],this.root=new Ge(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof a=="function"&&(i=a,a=ki),typeof t=="object"&&(a=t,t=void 0),this.callback=t??null,this.options=a??ki,this.elementCB=i??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new Ge(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(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;const t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,a){const i=this.options.xmlMode?Q.Tag:void 0,n=new xa(t,a,void 0,i);this.addNode(n),this.tagStack.push(n)}ontext(t){const{lastNode:a}=this;if(a&&a.type===Q.Text)a.data+=t,this.options.withEndIndices&&(a.endIndex=this.parser.endIndex);else{const i=new Tt(t);this.addNode(i),this.lastNode=i}}oncomment(t){if(this.lastNode&&this.lastNode.type===Q.Comment){this.lastNode.data+=t;return}const a=new Ca(t);this.addNode(a),this.lastNode=a}oncommentend(){this.lastNode=null}oncdatastart(){const t=new Tt(""),a=new Pi([t]);this.addNode(a),t.parent=a,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,a){const i=new Ia(t,a);this.addNode(i)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){const a=this.tagStack[this.tagStack.length-1],i=a.children[a.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),a.children.push(t),i&&(t.prev=i,i.next=t),t.parent=a,this.lastNode=null}}const La=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ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀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℮ℯ檈Ā;q℮ℛim;拧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(e=>e.charCodeAt(0))),vi=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Ra;const gr=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]]),ya=(Ra=String.fromCodePoint)!==null&&Ra!==void 0?Ra:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function _r(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=gr.get(e))!==null&&t!==void 0?t:e}var re;(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"})(re||(re={}));const Ar=32;var Ue;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ue||(Ue={}));function Ma(e){return e>=re.ZERO&&e<=re.NINE}function Nr(e){return e>=re.UPPER_A&&e<=re.UPPER_F||e>=re.LOWER_A&&e<=re.LOWER_F}function Cr(e){return e>=re.UPPER_A&&e<=re.UPPER_Z||e>=re.LOWER_A&&e<=re.LOWER_Z||Ma(e)}function Ir(e){return e===re.EQUALS||Cr(e)}var ue;(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"})(ue||(ue={}));var Ne;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ne||(Ne={}));class Pa{constructor(t,a,i){this.decodeTree=t,this.emitCodePoint=a,this.errors=i,this.state=ue.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ne.Strict}startEntity(t){this.decodeMode=t,this.state=ue.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case ue.EntityStart:return t.charCodeAt(a)===re.NUM?(this.state=ue.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=ue.NamedEntity,this.stateNamedEntity(t,a));case ue.NumericStart:return this.stateNumericStart(t,a);case ue.NumericDecimal:return this.stateNumericDecimal(t,a);case ue.NumericHex:return this.stateNumericHex(t,a);case ue.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|Ar)===re.LOWER_X?(this.state=ue.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=ue.NumericDecimal,this.stateNumericDecimal(t,a))}addToNumericResult(t,a,i,n){if(a!==i){const r=i-a;this.result=this.result*Math.pow(n,r)+parseInt(t.substr(a,r),n),this.consumed+=r}}stateNumericHex(t,a){const i=a;for(;a<t.length;){const n=t.charCodeAt(a);if(Ma(n)||Nr(n))a+=1;else return this.addToNumericResult(t,i,a,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,i,a,16),-1}stateNumericDecimal(t,a){const i=a;for(;a<t.length;){const n=t.charCodeAt(a);if(Ma(n))a+=1;else return this.addToNumericResult(t,i,a,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,i,a,10),-1}emitNumericEntity(t,a){var i;if(this.consumed<=a)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===re.SEMI)this.consumed+=1;else if(this.decodeMode===Ne.Strict)return 0;return this.emitCodePoint(_r(this.result),this.consumed),this.errors&&(t!==re.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,a){const{decodeTree:i}=this;let n=i[this.treeIndex],r=(n&Ue.VALUE_LENGTH)>>14;for(;a<t.length;a++,this.excess++){const u=t.charCodeAt(a);if(this.treeIndex=Sr(i,n,this.treeIndex+Math.max(1,r),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ne.Attribute&&(r===0||Ir(u))?0:this.emitNotTerminatedNamedEntity();if(n=i[this.treeIndex],r=(n&Ue.VALUE_LENGTH)>>14,r!==0){if(u===re.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==Ne.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:a,decodeTree:i}=this,n=(i[a]&Ue.VALUE_LENGTH)>>14;return this.emitNamedEntityData(a,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,a,i){const{decodeTree:n}=this;return this.emitCodePoint(a===1?n[t]&~Ue.VALUE_LENGTH:n[t+1],i),a===3&&this.emitCodePoint(n[t+2],i),i}end(){var t;switch(this.state){case ue.NamedEntity:return this.result!==0&&(this.decodeMode!==Ne.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ue.NumericDecimal:return this.emitNumericEntity(0,2);case ue.NumericHex:return this.emitNumericEntity(0,3);case ue.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ue.EntityStart:return 0}}}function wi(e){let t="";const a=new Pa(e,i=>t+=ya(i));return function(n,r){let u=0,o=0;for(;(o=n.indexOf("&",o))>=0;){t+=n.slice(u,o),a.startEntity(r);const f=a.write(n,o+1);if(f<0){u=o+a.end();break}u=o+f,o=f===0?u+1:u}const l=t+n.slice(u);return t="",l}}function Sr(e,t,a,i){const n=(t&Ue.BRANCH_LENGTH)>>7,r=t&Ue.JUMP_TABLE;if(n===0)return r!==0&&i===r?a:-1;if(r){const l=i-r;return l<0||l>=n?-1:e[a+l]-1}let u=a,o=u+n-1;for(;u<=o;){const l=u+o>>>1,f=e[l];if(f<i)u=l+1;else if(f>i)o=l-1;else return e[l+n]}return-1}wi(La),wi(vi);const Bi=/["&'<>$\x80-\uFFFF]/g,xr=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),Or=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function Ui(e){let t="",a=0,i;for(;(i=Bi.exec(e))!==null;){const n=i.index,r=e.charCodeAt(n),u=xr.get(r);u!==void 0?(t+=e.substring(a,n)+u,a=n+1):(t+=`${e.substring(a,n)}&#x${Or(e,n).toString(16)};`,a=Bi.lastIndex+=+((r&64512)===55296))}return t+e.substr(a)}function Fi(e,t){return function(i){let n,r=0,u="";for(;n=e.exec(i);)r!==n.index&&(u+=i.substring(r,n.index)),u+=t.get(n[0].charCodeAt(0)),r=n.index+1;return u+i.substring(r)}}const Hi=Fi(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),Yi=Fi(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),Dr=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])),Lr=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])),Rr=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function yr(e){return e.replace(/"/g,"&quot;")}function Mr(e,t){var a;if(!e)return;const i=((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)===!1?yr:t.xmlMode||t.encodeEntities!=="utf8"?Ui:Hi;return Object.keys(e).map(n=>{var r,u;const o=(r=e[n])!==null&&r!==void 0?r:"";return t.xmlMode==="foreign"&&(n=(u=Lr.get(n))!==null&&u!==void 0?u:n),!t.emptyAttrs&&!t.xmlMode&&o===""?n:`${n}="${i(o)}"`}).join(" ")}const Vi=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function Xt(e,t={}){const a="length"in e?e:[e];let i="";for(let n=0;n<a.length;n++)i+=Pr(a[n],t);return i}function Pr(e,t){switch(e.type){case cr:return Xt(e.children,t);case pr:case dr:return Br(e);case hr:return Hr(e);case Tr:return Fr(e);case fr:case Er:case mr:return wr(e,t);case lr:return Ur(e,t)}}const kr=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),vr=new Set(["svg","math"]);function wr(e,t){var a;t.xmlMode==="foreign"&&(e.name=(a=Dr.get(e.name))!==null&&a!==void 0?a:e.name,e.parent&&kr.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&vr.has(e.name)&&(t={...t,xmlMode:"foreign"});let i=`<${e.name}`;const n=Mr(e.attribs,t);return n&&(i+=` ${n}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&Vi.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=Xt(e.children,t)),(t.xmlMode||!Vi.has(e.name))&&(i+=`</${e.name}>`)),i}function Br(e){return`<${e.data}>`}function Ur(e,t){var a;let i=e.data||"";return((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&Rr.has(e.parent.name))&&(i=t.xmlMode||t.encodeEntities!=="utf8"?Ui(i):Yi(i)),i}function Fr(e){return`<![CDATA[${e.children[0].data}]]>`}function Hr(e){return`<!--${e.data}-->`}function qi(e,t){return Xt(e,t)}function Yr(e,t){return se(e)?e.children.map(a=>qi(a,t)).join(""):""}function Gt(e){return Array.isArray(e)?e.map(Gt).join(""):v(e)?e.name==="br"?`
2
- `:Gt(e.children):qt(e)?Gt(e.children):De(e)?e.data:""}function nt(e){return Array.isArray(e)?e.map(nt).join(""):se(e)&&!Wt(e)?nt(e.children):De(e)?e.data:""}function $t(e){return Array.isArray(e)?e.map($t).join(""):se(e)&&(e.type===Q.Tag||qt(e))?$t(e.children):De(e)?e.data:""}function Qt(e){return se(e)?e.children:[]}function Wi(e){return e.parent||null}function Xi(e){const t=Wi(e);if(t!=null)return Qt(t);const a=[e];let{prev:i,next:n}=e;for(;i!=null;)a.unshift(i),{prev:i}=i;for(;n!=null;)a.push(n),{next:n}=n;return a}function Vr(e,t){var a;return(a=e.attribs)===null||a===void 0?void 0:a[t]}function qr(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function Wr(e){return e.name}function ka(e){let{next:t}=e;for(;t!==null&&!v(t);)({next:t}=t);return t}function va(e){let{prev:t}=e;for(;t!==null&&!v(t);)({prev:t}=t);return t}function $e(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,a=t.lastIndexOf(e);a>=0&&t.splice(a,1)}e.next=null,e.prev=null,e.parent=null}function Xr(e,t){const a=t.prev=e.prev;a&&(a.next=t);const i=t.next=e.next;i&&(i.prev=t);const n=t.parent=e.parent;if(n){const r=n.children;r[r.lastIndexOf(e)]=t,e.parent=null}}function Gr(e,t){if($e(t),t.next=null,t.parent=e,e.children.push(t)>1){const a=e.children[e.children.length-2];a.next=t,t.prev=a}else t.prev=null}function $r(e,t){$e(t);const{parent:a}=e,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=a,i){if(i.prev=t,a){const n=a.children;n.splice(n.lastIndexOf(i),0,t)}}else a&&a.children.push(t)}function Qr(e,t){if($e(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){const a=e.children[1];a.prev=t,t.next=a}else t.next=null}function jr(e,t){$e(t);const{parent:a}=e;if(a){const i=a.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=a,t.prev=e.prev,t.next=e,e.prev=t}function jt(e,t,a=!0,i=1/0){return wa(e,Array.isArray(t)?t:[t],a,i)}function wa(e,t,a,i){const n=[],r=[t],u=[0];for(;;){if(u[0]>=r[0].length){if(u.length===1)return n;r.shift(),u.shift();continue}const o=r[0][u[0]++];if(e(o)&&(n.push(o),--i<=0))return n;a&&se(o)&&o.children.length>0&&(u.unshift(0),r.unshift(o.children))}}function zr(e,t){return t.find(e)}function Ba(e,t,a=!0){let i=null;for(let n=0;n<t.length&&!i;n++){const r=t[n];if(v(r))e(r)?i=r:a&&r.children.length>0&&(i=Ba(e,r.children,!0));else continue}return i}function Gi(e,t){return t.some(a=>v(a)&&(e(a)||Gi(e,a.children)))}function Kr(e,t){const a=[],i=[t],n=[0];for(;;){if(n[0]>=i[0].length){if(i.length===1)return a;i.shift(),n.shift();continue}const r=i[0][n[0]++];v(r)&&(e(r)&&a.push(r),r.children.length>0&&(n.unshift(0),i.unshift(r.children)))}}const zt={tag_name(e){return typeof e=="function"?t=>v(t)&&e(t.name):e==="*"?v:t=>v(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>De(t)&&e(t.data):t=>De(t)&&t.data===e}};function $i(e,t){return typeof t=="function"?a=>v(a)&&t(a.attribs[e]):a=>v(a)&&a.attribs[e]===t}function Zr(e,t){return a=>e(a)||t(a)}function Qi(e){const t=Object.keys(e).map(a=>{const i=e[a];return Object.prototype.hasOwnProperty.call(zt,a)?zt[a](i):$i(a,i)});return t.length===0?null:t.reduce(Zr)}function Jr(e,t){const a=Qi(e);return a?a(t):!0}function eu(e,t,a,i=1/0){const n=Qi(e);return n?jt(n,t,a,i):[]}function tu(e,t,a=!0){return Array.isArray(t)||(t=[t]),Ba($i("id",e),t,a)}function st(e,t,a=!0,i=1/0){return jt(zt.tag_name(e),t,a,i)}function au(e,t,a=!0,i=1/0){return jt(zt.tag_type(e),t,a,i)}function iu(e){let t=e.length;for(;--t>=0;){const a=e[t];if(t>0&&e.lastIndexOf(a,t-1)>=0){e.splice(t,1);continue}for(let i=a.parent;i;i=i.parent)if(e.includes(i)){e.splice(t,1);break}}return e}var Ce;(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"})(Ce||(Ce={}));function ji(e,t){const a=[],i=[];if(e===t)return 0;let n=se(e)?e:e.parent;for(;n;)a.unshift(n),n=n.parent;for(n=se(t)?t:t.parent;n;)i.unshift(n),n=n.parent;const r=Math.min(a.length,i.length);let u=0;for(;u<r&&a[u]===i[u];)u++;if(u===0)return Ce.DISCONNECTED;const o=a[u-1],l=o.children,f=a[u],E=i[u];return l.indexOf(f)>l.indexOf(E)?o===t?Ce.FOLLOWING|Ce.CONTAINED_BY:Ce.FOLLOWING:o===e?Ce.PRECEDING|Ce.CONTAINS:Ce.PRECEDING}function rt(e){return e=e.filter((t,a,i)=>!i.includes(t,a+1)),e.sort((t,a)=>{const i=ji(t,a);return i&Ce.PRECEDING?-1:i&Ce.FOLLOWING?1:0}),e}function nu(e){const t=Kt(cu,e);return t?t.name==="feed"?su(t):ru(t):null}function su(e){var t;const a=e.children,i={type:"atom",items:st("entry",a).map(u=>{var o;const{children:l}=u,f={media:zi(l)};fe(f,"id","id",l),fe(f,"title","title",l);const E=(o=Kt("link",l))===null||o===void 0?void 0:o.attribs.href;E&&(f.link=E);const T=Fe("summary",l)||Fe("content",l);T&&(f.description=T);const b=Fe("updated",l);return b&&(f.pubDate=new Date(b)),f})};fe(i,"id","id",a),fe(i,"title","title",a);const n=(t=Kt("link",a))===null||t===void 0?void 0:t.attribs.href;n&&(i.link=n),fe(i,"description","subtitle",a);const r=Fe("updated",a);return r&&(i.updated=new Date(r)),fe(i,"author","email",a,!0),i}function ru(e){var t,a;const i=(a=(t=Kt("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&a!==void 0?a:[],n={type:e.name.substr(0,3),id:"",items:st("item",e.children).map(u=>{const{children:o}=u,l={media:zi(o)};fe(l,"id","guid",o),fe(l,"title","title",o),fe(l,"link","link",o),fe(l,"description","description",o);const f=Fe("pubDate",o)||Fe("dc:date",o);return f&&(l.pubDate=new Date(f)),l})};fe(n,"title","title",i),fe(n,"link","link",i),fe(n,"description","description",i);const r=Fe("lastBuildDate",i);return r&&(n.updated=new Date(r)),fe(n,"author","managingEditor",i,!0),n}const uu=["url","type","lang"],ou=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function zi(e){return st("media:content",e).map(t=>{const{attribs:a}=t,i={medium:a.medium,isDefault:!!a.isDefault};for(const n of uu)a[n]&&(i[n]=a[n]);for(const n of ou)a[n]&&(i[n]=parseInt(a[n],10));return a.expression&&(i.expression=a.expression),i})}function Kt(e,t){return st(e,t,!0,1)[0]}function Fe(e,t,a=!1){return nt(st(e,t,a,1)).trim()}function fe(e,t,a,i,n=!1){const r=Fe(a,i,n);r&&(e[t]=r)}function cu(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const Zt=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return Ce},append:$r,appendChild:Gr,compareDocumentPosition:ji,existsOne:Gi,filter:jt,find:wa,findAll:Kr,findOne:Ba,findOneChild:zr,getAttributeValue:Vr,getChildren:Qt,getElementById:tu,getElements:eu,getElementsByTagName:st,getElementsByTagType:au,getFeed:nu,getInnerHTML:Yr,getName:Wr,getOuterHTML:qi,getParent:Wi,getSiblings:Xi,getText:Gt,hasAttrib:qr,hasChildren:se,innerText:$t,isCDATA:qt,isComment:Wt,isDocument:Be,isTag:v,isText:De,nextElementSibling:ka,prepend:jr,prependChild:Qr,prevElementSibling:va,removeElement:$e,removeSubsets:iu,replaceElement:Xr,testElement:Jr,textContent:nt,uniqueSort:rt},Symbol.toStringTag,{value:"Module"})),lu={_useHtmlParser2:!1};function Ua(e,t){if(!e)return t??lu;const a={_useHtmlParser2:!!e.xmlMode,...t,...e};return e.xml?(a._useHtmlParser2=!0,a.xmlMode=!0,e.xml!==!0&&Object.assign(a,e.xml)):e.xmlMode&&(a._useHtmlParser2=!0),a}function Ki(e,t,a){return e?e(t??e._root.children,null,void 0,a).toString():""}function du(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function hu(e,t){const a=du(e)?(t=e,void 0):e,i={...this===null||this===void 0?void 0:this._options,...Ua(t)};return Ki(this,a,i)}function fu(e){const t={...this._options,xmlMode:!0};return Ki(this,e,t)}function bt(e){const t=e??(this?this.root():[]);let a="";for(let i=0;i<t.length;i++)a+=nt(t[i]);return a}function Eu(e,t,a=typeof t=="boolean"?t:!1){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(a=t);const i=this.load(e,this._options,!1);return a||i("script").remove(),[...i.root()[0].children]}function mu(){return this(this._root)}function Zi(e,t){if(t===e)return!1;let a=t;for(;a&&a!==a.parent;)if(a=a.parent,a===e)return!0;return!1}function Tu(e){return this.root().extract(e)}function pu(e,t){if(!Ji(e)||!Ji(t))return;let a=e.length;const i=+t.length;for(let n=0;n<i;n++)e[a++]=t[n];return e.length=a,e}function Ji(e){if(Array.isArray(e))return!0;if(typeof e!="object"||e===null||!("length"in e)||typeof e.length!="number"||e.length<0)return!1;for(let t=0;t<e.length;t++)if(!(t in e))return!1;return!0}const bu=Object.freeze(Object.defineProperty({__proto__:null,contains:Zi,extract:Tu,html:hu,merge:pu,parseHTML:Eu,root:mu,text:bt,xml:fu},Symbol.toStringTag,{value:"Module"}));function Pe(e){return e.cheerio!=null}function gu(e){return e.replace(/[._-](\w|$)/g,(t,a)=>a.toUpperCase())}function _u(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function te(e,t){const a=e.length;for(let i=0;i<a;i++)t(e[i],i);return e}var Qe;(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"})(Qe||(Qe={}));function Fa(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const a=e.charCodeAt(t+1);return(a>=Qe.LowerA&&a<=Qe.LowerZ||a>=Qe.UpperA&&a<=Qe.UpperZ||a===Qe.Exclamation)&&e.includes(">",t+2)}const gt=Object.prototype.hasOwnProperty,_t=/\s+/,Ha="data-",Ya=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Au=/^{[^]*}$|^\[[^]*]$/;function Jt(e,t,a){var i;if(!(!e||!v(e))){if((i=e.attribs)!==null&&i!==void 0||(e.attribs={}),!t)return e.attribs;if(gt.call(e.attribs,t))return!a&&Ya.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return bt(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function ut(e,t,a){a===null?nn(e,t):e.attribs[t]=`${a}`}function Nu(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return te(this,(a,i)=>{v(a)&&ut(a,e,t.call(a,i,a.attribs[e]))})}return te(this,a=>{if(v(a))if(typeof e=="object")for(const i of Object.keys(e)){const n=e[i];ut(a,i,n)}else ut(a,e,t)})}return arguments.length>1?this:Jt(this[0],e,this.options.xmlMode)}function en(e,t,a){return t in e?e[t]:!a&&Ya.test(t)?Jt(e,t,!1)!==void 0:Jt(e,t,a)}function Va(e,t,a,i){t in e?e[t]=a:ut(e,t,!i&&Ya.test(t)?a?"":null:`${a}`)}function Cu(e,t){var a;if(typeof e=="string"&&t===void 0){const i=this[0];if(!i||!v(i))return;switch(e){case"style":{const n=this.css(),r=Object.keys(n);for(let u=0;u<r.length;u++)n[u]=r[u];return n.length=r.length,n}case"tagName":case"nodeName":return i.name.toUpperCase();case"href":case"src":{const n=(a=i.attribs)===null||a===void 0?void 0:a[e];return typeof URL<"u"&&(e==="href"&&(i.tagName==="a"||i.tagName==="link")||e==="src"&&(i.tagName==="img"||i.tagName==="iframe"||i.tagName==="audio"||i.tagName==="video"||i.tagName==="source"))&&n!==void 0&&this.options.baseURI?new URL(n,this.options.baseURI).href:n}case"innerText":return $t(i);case"textContent":return nt(i);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return en(i,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new TypeError("Bad combination of arguments.");return te(this,(i,n)=>{v(i)&&Va(i,e,t.call(i,n,en(i,e,this.options.xmlMode)),this.options.xmlMode)})}return te(this,i=>{if(v(i))if(typeof e=="object")for(const n of Object.keys(e)){const r=e[n];Va(i,n,r,this.options.xmlMode)}else Va(i,e,t,this.options.xmlMode)})}}function tn(e,t,a){var i;(i=e.data)!==null&&i!==void 0||(e.data={}),typeof t=="object"?Object.assign(e.data,t):typeof t=="string"&&a!==void 0&&(e.data[t]=a)}function Iu(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith(Ha))continue;const a=gu(t.slice(Ha.length));gt.call(e.data,a)||(e.data[a]=an(e.attribs[t]))}return e.data}function Su(e,t){const a=Ha+_u(t),i=e.data;if(gt.call(i,t))return i[t];if(gt.call(e.attribs,a))return i[t]=an(e.attribs[a])}function an(e){if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);if(e===String(t))return t;if(Au.test(e))try{return JSON.parse(e)}catch{}return e}function xu(e,t){var a;const i=this[0];if(!i||!v(i))return;const n=i;return(a=n.data)!==null&&a!==void 0||(n.data={}),e==null?Iu(n):typeof e=="object"||t!==void 0?(te(this,r=>{v(r)&&(typeof e=="object"?tn(r,e):tn(r,e,t))}),this):Su(n,e)}function Ou(e){const t=arguments.length===0,a=this[0];if(!a||!v(a))return t?void 0:this;switch(a.name){case"textarea":return this.text(e);case"select":{const i=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");const n=typeof e=="object"?e:[e];for(const r of n)this.find(`option[value="${r}"]`).attr("selected","");return this}return this.attr("multiple")?i.toArray().map(n=>bt(n.children)):i.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function nn(e,t){!e.attribs||!gt.call(e.attribs,t)||delete e.attribs[t]}function ea(e){return e?e.trim().split(_t):[]}function Du(e){const t=ea(e);for(const a of t)te(this,i=>{v(i)&&nn(i,a)});return this}function Lu(e){return this.toArray().some(t=>{const a=v(t)&&t.attribs.class;let i=-1;if(a&&e.length>0)for(;(i=a.indexOf(e,i+1))>-1;){const n=i+e.length;if((i===0||_t.test(a[i-1]))&&(n===a.length||_t.test(a[n])))return!0}return!1})}function sn(e){if(typeof e=="function")return te(this,(i,n)=>{if(v(i)){const r=i.attribs.class||"";sn.call([i],e.call(i,n,r))}});if(!e||typeof e!="string")return this;const t=e.split(_t),a=this.length;for(let i=0;i<a;i++){const n=this[i];if(!v(n))continue;const r=Jt(n,"class",!1);if(r){let u=` ${r} `;for(const o of t){const l=`${o} `;u.includes(` ${l}`)||(u+=l)}ut(n,"class",u.trim())}else ut(n,"class",t.join(" ").trim())}return this}function rn(e){if(typeof e=="function")return te(this,(n,r)=>{v(n)&&rn.call([n],e.call(n,r,n.attribs.class||""))});const t=ea(e),a=t.length,i=arguments.length===0;return te(this,n=>{if(v(n))if(i)n.attribs.class="";else{const r=ea(n.attribs.class);let u=!1;for(let o=0;o<a;o++){const l=r.indexOf(t[o]);l>=0&&(r.splice(l,1),u=!0,o--)}u&&(n.attribs.class=r.join(" "))}})}function un(e,t){if(typeof e=="function")return te(this,(u,o)=>{v(u)&&un.call([u],e.call(u,o,u.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const a=e.split(_t),i=a.length,n=typeof t=="boolean"?t?1:-1:0,r=this.length;for(let u=0;u<r;u++){const o=this[u];if(!v(o))continue;const l=ea(o.attribs.class);for(let f=0;f<i;f++){const E=l.indexOf(a[f]);n>=0&&E<0?l.push(a[f]):n<=0&&E>=0&&l.splice(E,1)}o.attribs.class=l.join(" ")}return this}const Ru=Object.freeze(Object.defineProperty({__proto__:null,addClass:sn,attr:Nu,data:xu,hasClass:Lu,prop:Cu,removeAttr:Du,removeClass:rn,toggleClass:un,val:Ou},Symbol.toStringTag,{value:"Module"}));var R;(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"})(R||(R={}));var ne;(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"})(ne||(ne={}));const on=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,yu=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Mu=new Map([[126,ne.Element],[94,ne.Start],[36,ne.End],[42,ne.Any],[33,ne.Not],[124,ne.Hyphen]]),Pu=new Set(["has","not","matches","is","where","host","host-context"]);function At(e){switch(e.type){case R.Adjacent:case R.Child:case R.Descendant:case R.Parent:case R.Sibling:case R.ColumnCombinator:return!0;default:return!1}}const ku=new Set(["contains","icontains"]);function vu(e,t,a){const i=parseInt(t,16)-65536;return i!==i||a?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,i&1023|56320)}function Nt(e){return e.replace(yu,vu)}function qa(e){return e===39||e===34}function cn(e){return e===32||e===9||e===10||e===12||e===13}function ta(e){const t=[],a=ln(t,`${e}`,0);if(a<e.length)throw new Error(`Unmatched selector: ${e.slice(a)}`);return t}function ln(e,t,a){let i=[];function n(b){const N=t.slice(a+b).match(on);if(!N)throw new Error(`Expected name, found ${t.slice(a)}`);const[S]=N;return a+=b+S.length,Nt(S)}function r(b){for(a+=b;a<t.length&&cn(t.charCodeAt(a));)a++}function u(){a+=1;const b=a;let N=1;for(;N>0&&a<t.length;a++)t.charCodeAt(a)===40&&!o(a)?N++:t.charCodeAt(a)===41&&!o(a)&&N--;if(N)throw new Error("Parenthesis not matched");return Nt(t.slice(b,a-1))}function o(b){let N=0;for(;t.charCodeAt(--b)===92;)N++;return(N&1)===1}function l(){if(i.length>0&&At(i[i.length-1]))throw new Error("Did not expect successive traversals.")}function f(b){if(i.length>0&&i[i.length-1].type===R.Descendant){i[i.length-1].type=b;return}l(),i.push({type:b})}function E(b,N){i.push({type:R.Attribute,name:b,action:N,value:n(1),namespace:null,ignoreCase:"quirks"})}function T(){if(i.length&&i[i.length-1].type===R.Descendant&&i.pop(),i.length===0)throw new Error("Empty sub-selector");e.push(i)}if(r(0),t.length===a)return a;e:for(;a<t.length;){const b=t.charCodeAt(a);switch(b){case 32:case 9:case 10:case 12:case 13:{(i.length===0||i[0].type!==R.Descendant)&&(l(),i.push({type:R.Descendant})),r(1);break}case 62:{f(R.Child),r(1);break}case 60:{f(R.Parent),r(1);break}case 126:{f(R.Sibling),r(1);break}case 43:{f(R.Adjacent),r(1);break}case 46:{E("class",ne.Element);break}case 35:{E("id",ne.Equals);break}case 91:{r(1);let N,S=null;t.charCodeAt(a)===124?N=n(1):t.startsWith("*|",a)?(S="*",N=n(2)):(N=n(0),t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==61&&(S=N,N=n(1))),r(0);let y=ne.Exists;const P=Mu.get(t.charCodeAt(a));if(P){if(y=P,t.charCodeAt(a+1)!==61)throw new Error("Expected `=`");r(2)}else t.charCodeAt(a)===61&&(y=ne.Equals,r(1));let X="",B=null;if(y!=="exists"){if(qa(t.charCodeAt(a))){const k=t.charCodeAt(a);let _=a+1;for(;_<t.length&&(t.charCodeAt(_)!==k||o(_));)_+=1;if(t.charCodeAt(_)!==k)throw new Error("Attribute value didn't end");X=Nt(t.slice(a+1,_)),a=_+1}else{const k=a;for(;a<t.length&&(!cn(t.charCodeAt(a))&&t.charCodeAt(a)!==93||o(a));)a+=1;X=Nt(t.slice(k,a))}r(0);const F=t.charCodeAt(a)|32;F===115?(B=!1,r(1)):F===105&&(B=!0,r(1))}if(t.charCodeAt(a)!==93)throw new Error("Attribute selector didn't terminate");a+=1;const q={type:R.Attribute,name:N,action:y,value:X,namespace:S,ignoreCase:B};i.push(q);break}case 58:{if(t.charCodeAt(a+1)===58){i.push({type:R.PseudoElement,name:n(2).toLowerCase(),data:t.charCodeAt(a)===40?u():null});continue}const N=n(1).toLowerCase();let S=null;if(t.charCodeAt(a)===40)if(Pu.has(N)){if(qa(t.charCodeAt(a+1)))throw new Error(`Pseudo-selector ${N} cannot be quoted`);if(S=[],a=ln(S,t,a+1),t.charCodeAt(a)!==41)throw new Error(`Missing closing parenthesis in :${N} (${t})`);a+=1}else{if(S=u(),ku.has(N)){const y=S.charCodeAt(0);y===S.charCodeAt(S.length-1)&&qa(y)&&(S=S.slice(1,-1))}S=Nt(S)}i.push({type:R.Pseudo,name:N,data:S});break}case 44:{T(),i=[],r(1);break}default:{if(t.startsWith("/*",a)){const y=t.indexOf("*/",a+2);if(y<0)throw new Error("Comment was not terminated");a=y+2,i.length===0&&r(0);break}let N=null,S;if(b===42)a+=1,S="*";else if(b===124){if(S="",t.charCodeAt(a+1)===124){f(R.ColumnCombinator),r(2);break}}else if(on.test(t.slice(a)))S=n(0);else break e;t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==124&&(N=S,t.charCodeAt(a+1)===42?(S="*",a+=2):S=n(1)),i.push(S==="*"?{type:R.Universal,namespace:N}:{type:R.Tag,name:S,namespace:N})}}}return T(),a}function wu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var aa={trueFunc:function(){return!0},falseFunc:function(){return!1}};const U=wu(aa),dn=new Map([[R.Universal,50],[R.Tag,30],[R.Attribute,1],[R.Pseudo,0]]);function Wa(e){return!dn.has(e.type)}const Bu=new Map([[ne.Exists,10],[ne.Equals,8],[ne.Not,7],[ne.Start,6],[ne.End,6],[ne.Any,5]]);function Uu(e){const t=e.map(hn);for(let a=1;a<e.length;a++){const i=t[a];if(!(i<0))for(let n=a-1;n>=0&&i<t[n];n--){const r=e[n+1];e[n+1]=e[n],e[n]=r,t[n+1]=t[n],t[n]=i}}}function hn(e){var t,a;let i=(t=dn.get(e.type))!==null&&t!==void 0?t:-1;return e.type===R.Attribute?(i=(a=Bu.get(e.action))!==null&&a!==void 0?a:4,e.action===ne.Equals&&e.name==="id"&&(i=9),e.ignoreCase&&(i>>=1)):e.type===R.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?i=0:Array.isArray(e.data)?(i=Math.min(...e.data.map(n=>Math.min(...n.map(hn)))),i<0&&(i=0)):i=2:i=3),i}const Fu=/[-[\]{}()*+?.,\\^$|#\s]/g;function fn(e){return e.replace(Fu,"\\$&")}const Hu=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 je(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&Hu.has(e.name)}const Yu={equals(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return je(t,a)?(r=r.toLowerCase(),u=>{const o=i.getAttributeValue(u,n);return o!=null&&o.length===r.length&&o.toLowerCase()===r&&e(u)}):u=>i.getAttributeValue(u,n)===r&&e(u)},hyphen(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=r.length;return je(t,a)?(r=r.toLowerCase(),function(l){const f=i.getAttributeValue(l,n);return f!=null&&(f.length===u||f.charAt(u)==="-")&&f.substr(0,u).toLowerCase()===r&&e(l)}):function(l){const f=i.getAttributeValue(l,n);return f!=null&&(f.length===u||f.charAt(u)==="-")&&f.substr(0,u)===r&&e(l)}},element(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(/\s/.test(r))return U.falseFunc;const u=new RegExp(`(?:^|\\s)${fn(r)}(?:$|\\s)`,je(t,a)?"i":"");return function(l){const f=i.getAttributeValue(l,n);return f!=null&&f.length>=r.length&&u.test(f)&&e(l)}},exists(e,{name:t},{adapter:a}){return i=>a.hasAttrib(i,t)&&e(i)},start(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=r.length;return u===0?U.falseFunc:je(t,a)?(r=r.toLowerCase(),o=>{const l=i.getAttributeValue(o,n);return l!=null&&l.length>=u&&l.substr(0,u).toLowerCase()===r&&e(o)}):o=>{var l;return!!(!((l=i.getAttributeValue(o,n))===null||l===void 0)&&l.startsWith(r))&&e(o)}},end(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=-r.length;return u===0?U.falseFunc:je(t,a)?(r=r.toLowerCase(),o=>{var l;return((l=i.getAttributeValue(o,n))===null||l===void 0?void 0:l.substr(u).toLowerCase())===r&&e(o)}):o=>{var l;return!!(!((l=i.getAttributeValue(o,n))===null||l===void 0)&&l.endsWith(r))&&e(o)}},any(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(r==="")return U.falseFunc;if(je(t,a)){const u=new RegExp(fn(r),"i");return function(l){const f=i.getAttributeValue(l,n);return f!=null&&f.length>=r.length&&u.test(f)&&e(l)}}return u=>{var o;return!!(!((o=i.getAttributeValue(u,n))===null||o===void 0)&&o.includes(r))&&e(u)}},not(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return r===""?u=>!!i.getAttributeValue(u,n)&&e(u):je(t,a)?(r=r.toLowerCase(),u=>{const o=i.getAttributeValue(u,n);return(o==null||o.length!==r.length||o.toLowerCase()!==r)&&e(u)}):u=>i.getAttributeValue(u,n)!==r&&e(u)}},Vu=new Set([9,10,12,13,32]),En=48,qu=57;function Wu(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,a=0,i=r(),n=u();if(t<e.length&&e.charAt(t)==="n"&&(t++,a=i*(n??1),o(),t<e.length?(i=r(),o(),n=u()):i=n=0),n===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[a,i*n];function r(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function u(){const l=t;let f=0;for(;t<e.length&&e.charCodeAt(t)>=En&&e.charCodeAt(t)<=qu;)f=f*10+(e.charCodeAt(t)-En),t++;return t===l?null:f}function o(){for(;t<e.length&&Vu.has(e.charCodeAt(t));)t++}}function Xu(e){const t=e[0],a=e[1]-1;if(a<0&&t<=0)return U.falseFunc;if(t===-1)return r=>r<=a;if(t===0)return r=>r===a;if(t===1)return a<0?U.trueFunc:r=>r>=a;const i=Math.abs(t),n=(a%i+i)%i;return t>1?r=>r>=a&&r%i===n:r=>r<=a&&r%i===n}function ia(e){return Xu(Wu(e))}function na(e,t){return a=>{const i=t.getParent(a);return i!=null&&t.isTag(i)&&e(a)}}const Xa={contains(e,t,{adapter:a}){return function(n){return e(n)&&a.getText(n).includes(t)}},icontains(e,t,{adapter:a}){const i=t.toLowerCase();return function(r){return e(r)&&a.getText(r).toLowerCase().includes(i)}},"nth-child"(e,t,{adapter:a,equals:i}){const n=ia(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?na(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let f=0;f<o.length&&!i(u,o[f]);f++)a.isTag(o[f])&&l++;return n(l)&&e(u)}},"nth-last-child"(e,t,{adapter:a,equals:i}){const n=ia(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?na(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let f=o.length-1;f>=0&&!i(u,o[f]);f--)a.isTag(o[f])&&l++;return n(l)&&e(u)}},"nth-of-type"(e,t,{adapter:a,equals:i}){const n=ia(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?na(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let f=0;f<o.length;f++){const E=o[f];if(i(u,E))break;a.isTag(E)&&a.getName(E)===a.getName(u)&&l++}return n(l)&&e(u)}},"nth-last-of-type"(e,t,{adapter:a,equals:i}){const n=ia(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?na(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let f=o.length-1;f>=0;f--){const E=o[f];if(i(u,E))break;a.isTag(E)&&a.getName(E)===a.getName(u)&&l++}return n(l)&&e(u)}},root(e,t,{adapter:a}){return i=>{const n=a.getParent(i);return(n==null||!a.isTag(n))&&e(i)}},scope(e,t,a,i){const{equals:n}=a;return!i||i.length===0?Xa.root(e,t,a):i.length===1?r=>n(i[0],r)&&e(r):r=>i.includes(r)&&e(r)},hover:Ga("isHovered"),visited:Ga("isVisited"),active:Ga("isActive")};function Ga(e){return function(a,i,{adapter:n}){const r=n[e];return typeof r!="function"?U.falseFunc:function(o){return r(o)&&a(o)}}}const mn={empty(e,{adapter:t}){return!t.getChildren(e).some(a=>t.isTag(a)||t.getText(a)!=="")},"first-child"(e,{adapter:t,equals:a}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;const i=t.getSiblings(e).find(n=>t.isTag(n));return i!=null&&a(e,i)},"last-child"(e,{adapter:t,equals:a}){const i=t.getSiblings(e);for(let n=i.length-1;n>=0;n--){if(a(e,i[n]))return!0;if(t.isTag(i[n]))break}return!1},"first-of-type"(e,{adapter:t,equals:a}){const i=t.getSiblings(e),n=t.getName(e);for(let r=0;r<i.length;r++){const u=i[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===n)break}return!1},"last-of-type"(e,{adapter:t,equals:a}){const i=t.getSiblings(e),n=t.getName(e);for(let r=i.length-1;r>=0;r--){const u=i[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===n)break}return!1},"only-of-type"(e,{adapter:t,equals:a}){const i=t.getName(e);return t.getSiblings(e).every(n=>a(e,n)||!t.isTag(n)||t.getName(n)!==i)},"only-child"(e,{adapter:t,equals:a}){return t.getSiblings(e).every(i=>a(e,i)||!t.isTag(i))}};function Tn(e,t,a,i){if(a===null){if(e.length>i)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===i)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const Gu={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
1
+ (function(He,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(He=typeof globalThis<"u"?globalThis:He||self,c(He.GpWebModule={},He.Vue))})(this,function(He,c){"use strict";var X;(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"})(X||(X={}));function Er(e){return e.type===X.Tag||e.type===X.Script||e.type===X.Style}const Tr=X.Root,pr=X.Text,br=X.Directive,gr=X.Comment,_r=X.Script,Ar=X.Style,Nr=X.Tag,Cr=X.CDATA,Ir=X.Doctype;let vi=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return At(this,t)}};class Oa extends vi{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class _t extends Oa{constructor(){super(...arguments),this.type=X.Text}get nodeType(){return 3}}class Da extends Oa{constructor(){super(...arguments),this.type=X.Comment}get nodeType(){return 8}}class La extends Oa{constructor(t,a){super(a),this.name=t,this.type=X.Directive}get nodeType(){return 1}}class ya extends vi{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}}class Ui extends ya{constructor(){super(...arguments),this.type=X.CDATA}get nodeType(){return 4}}class ze extends ya{constructor(){super(...arguments),this.type=X.Root}get nodeType(){return 9}}class Ra extends ya{constructor(t,a,i=[],n=t==="script"?X.Script:t==="style"?X.Style:X.Tag){super(i),this.name=t,this.attribs=a,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var a,i;return{name:t,value:this.attribs[t],namespace:(a=this["x-attribsNamespace"])===null||a===void 0?void 0:a[t],prefix:(i=this["x-attribsPrefix"])===null||i===void 0?void 0:i[t]}})}}function w(e){return Er(e)}function Xt(e){return e.type===X.CDATA}function Re(e){return e.type===X.Text}function Qt(e){return e.type===X.Comment}function Ma(e){return e.type===X.Directive}function Ve(e){return e.type===X.Root}function re(e){return Object.prototype.hasOwnProperty.call(e,"children")}function At(e,t=!1){let a;if(Re(e))a=new _t(e.data);else if(Qt(e))a=new Da(e.data);else if(w(e)){const i=t?Pa(e.children):[],n=new Ra(e.name,{...e.attribs},i);i.forEach(r=>r.parent=n),e.namespace!=null&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]={...e["x-attribsPrefix"]}),a=n}else if(Xt(e)){const i=t?Pa(e.children):[],n=new Ui(i);i.forEach(r=>r.parent=n),a=n}else if(Ve(e)){const i=t?Pa(e.children):[],n=new ze(i);i.forEach(r=>r.parent=n),e["x-mode"]&&(n["x-mode"]=e["x-mode"]),a=n}else if(Ma(e)){const i=new La(e.name,e.data);e["x-name"]!=null&&(i["x-name"]=e["x-name"],i["x-publicId"]=e["x-publicId"],i["x-systemId"]=e["x-systemId"]),a=i}else throw new Error(`Not implemented yet: ${e.type}`);return a.startIndex=e.startIndex,a.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(a.sourceCodeLocation=e.sourceCodeLocation),a}function Pa(e){const t=e.map(a=>At(a,!0));for(let a=1;a<t.length;a++)t[a].prev=t[a-1],t[a-1].next=t[a];return t}const Fi={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class Sr{constructor(t,a,i){this.dom=[],this.root=new ze(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof a=="function"&&(i=a,a=Fi),typeof t=="object"&&(a=t,t=void 0),this.callback=t??null,this.options=a??Fi,this.elementCB=i??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new ze(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(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;const t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,a){const i=this.options.xmlMode?X.Tag:void 0,n=new Ra(t,a,void 0,i);this.addNode(n),this.tagStack.push(n)}ontext(t){const{lastNode:a}=this;if(a&&a.type===X.Text)a.data+=t,this.options.withEndIndices&&(a.endIndex=this.parser.endIndex);else{const i=new _t(t);this.addNode(i),this.lastNode=i}}oncomment(t){if(this.lastNode&&this.lastNode.type===X.Comment){this.lastNode.data+=t;return}const a=new Da(t);this.addNode(a),this.lastNode=a}oncommentend(){this.lastNode=null}oncdatastart(){const t=new _t(""),a=new Ui([t]);this.addNode(a),t.parent=a,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,a){const i=new La(t,a);this.addNode(i)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){const a=this.tagStack[this.tagStack.length-1],i=a.children[a.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),a.children.push(t),i&&(t.prev=i,i.next=t),t.parent=a,this.lastNode=null}}const ka=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ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀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℮ℯ檈Ā;q℮ℛim;拧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(e=>e.charCodeAt(0))),Hi=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var wa;const xr=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]]),Ba=(wa=String.fromCodePoint)!==null&&wa!==void 0?wa:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Or(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=xr.get(e))!==null&&t!==void 0?t:e}var ue;(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"})(ue||(ue={}));const Dr=32;var Ye;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ye||(Ye={}));function va(e){return e>=ue.ZERO&&e<=ue.NINE}function Lr(e){return e>=ue.UPPER_A&&e<=ue.UPPER_F||e>=ue.LOWER_A&&e<=ue.LOWER_F}function yr(e){return e>=ue.UPPER_A&&e<=ue.UPPER_Z||e>=ue.LOWER_A&&e<=ue.LOWER_Z||va(e)}function Rr(e){return e===ue.EQUALS||yr(e)}var oe;(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"})(oe||(oe={}));var Ie;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ie||(Ie={}));class Ua{constructor(t,a,i){this.decodeTree=t,this.emitCodePoint=a,this.errors=i,this.state=oe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ie.Strict}startEntity(t){this.decodeMode=t,this.state=oe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case oe.EntityStart:return t.charCodeAt(a)===ue.NUM?(this.state=oe.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=oe.NamedEntity,this.stateNamedEntity(t,a));case oe.NumericStart:return this.stateNumericStart(t,a);case oe.NumericDecimal:return this.stateNumericDecimal(t,a);case oe.NumericHex:return this.stateNumericHex(t,a);case oe.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|Dr)===ue.LOWER_X?(this.state=oe.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=oe.NumericDecimal,this.stateNumericDecimal(t,a))}addToNumericResult(t,a,i,n){if(a!==i){const r=i-a;this.result=this.result*Math.pow(n,r)+parseInt(t.substr(a,r),n),this.consumed+=r}}stateNumericHex(t,a){const i=a;for(;a<t.length;){const n=t.charCodeAt(a);if(va(n)||Lr(n))a+=1;else return this.addToNumericResult(t,i,a,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,i,a,16),-1}stateNumericDecimal(t,a){const i=a;for(;a<t.length;){const n=t.charCodeAt(a);if(va(n))a+=1;else return this.addToNumericResult(t,i,a,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,i,a,10),-1}emitNumericEntity(t,a){var i;if(this.consumed<=a)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ue.SEMI)this.consumed+=1;else if(this.decodeMode===Ie.Strict)return 0;return this.emitCodePoint(Or(this.result),this.consumed),this.errors&&(t!==ue.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,a){const{decodeTree:i}=this;let n=i[this.treeIndex],r=(n&Ye.VALUE_LENGTH)>>14;for(;a<t.length;a++,this.excess++){const u=t.charCodeAt(a);if(this.treeIndex=Mr(i,n,this.treeIndex+Math.max(1,r),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ie.Attribute&&(r===0||Rr(u))?0:this.emitNotTerminatedNamedEntity();if(n=i[this.treeIndex],r=(n&Ye.VALUE_LENGTH)>>14,r!==0){if(u===ue.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==Ie.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:a,decodeTree:i}=this,n=(i[a]&Ye.VALUE_LENGTH)>>14;return this.emitNamedEntityData(a,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,a,i){const{decodeTree:n}=this;return this.emitCodePoint(a===1?n[t]&~Ye.VALUE_LENGTH:n[t+1],i),a===3&&this.emitCodePoint(n[t+2],i),i}end(){var t;switch(this.state){case oe.NamedEntity:return this.result!==0&&(this.decodeMode!==Ie.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case oe.NumericDecimal:return this.emitNumericEntity(0,2);case oe.NumericHex:return this.emitNumericEntity(0,3);case oe.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case oe.EntityStart:return 0}}}function Vi(e){let t="";const a=new Ua(e,i=>t+=Ba(i));return function(n,r){let u=0,o=0;for(;(o=n.indexOf("&",o))>=0;){t+=n.slice(u,o),a.startEntity(r);const h=a.write(n,o+1);if(h<0){u=o+a.end();break}u=o+h,o=h===0?u+1:u}const l=t+n.slice(u);return t="",l}}function Mr(e,t,a,i){const n=(t&Ye.BRANCH_LENGTH)>>7,r=t&Ye.JUMP_TABLE;if(n===0)return r!==0&&i===r?a:-1;if(r){const l=i-r;return l<0||l>=n?-1:e[a+l]-1}let u=a,o=u+n-1;for(;u<=o;){const l=u+o>>>1,h=e[l];if(h<i)u=l+1;else if(h>i)o=l-1;else return e[l+n]}return-1}Vi(ka),Vi(Hi);const Yi=/["&'<>$\x80-\uFFFF]/g,Pr=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),kr=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function qi(e){let t="",a=0,i;for(;(i=Yi.exec(e))!==null;){const n=i.index,r=e.charCodeAt(n),u=Pr.get(r);u!==void 0?(t+=e.substring(a,n)+u,a=n+1):(t+=`${e.substring(a,n)}&#x${kr(e,n).toString(16)};`,a=Yi.lastIndex+=+((r&64512)===55296))}return t+e.substr(a)}function Wi(e,t){return function(i){let n,r=0,u="";for(;n=e.exec(i);)r!==n.index&&(u+=i.substring(r,n.index)),u+=t.get(n[0].charCodeAt(0)),r=n.index+1;return u+i.substring(r)}}const $i=Wi(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),Gi=Wi(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),wr=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])),Br=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])),vr=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function Ur(e){return e.replace(/"/g,"&quot;")}function Fr(e,t){var a;if(!e)return;const i=((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)===!1?Ur:t.xmlMode||t.encodeEntities!=="utf8"?qi:$i;return Object.keys(e).map(n=>{var r,u;const o=(r=e[n])!==null&&r!==void 0?r:"";return t.xmlMode==="foreign"&&(n=(u=Br.get(n))!==null&&u!==void 0?u:n),!t.emptyAttrs&&!t.xmlMode&&o===""?n:`${n}="${i(o)}"`}).join(" ")}const Xi=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function jt(e,t={}){const a="length"in e?e:[e];let i="";for(let n=0;n<a.length;n++)i+=Hr(a[n],t);return i}function Hr(e,t){switch(e.type){case Tr:return jt(e.children,t);case Ir:case br:return Wr(e);case gr:return Xr(e);case Cr:return Gr(e);case _r:case Ar:case Nr:return qr(e,t);case pr:return $r(e,t)}}const Vr=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),Yr=new Set(["svg","math"]);function qr(e,t){var a;t.xmlMode==="foreign"&&(e.name=(a=wr.get(e.name))!==null&&a!==void 0?a:e.name,e.parent&&Vr.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&Yr.has(e.name)&&(t={...t,xmlMode:"foreign"});let i=`<${e.name}`;const n=Fr(e.attribs,t);return n&&(i+=` ${n}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&Xi.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=jt(e.children,t)),(t.xmlMode||!Xi.has(e.name))&&(i+=`</${e.name}>`)),i}function Wr(e){return`<${e.data}>`}function $r(e,t){var a;let i=e.data||"";return((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&vr.has(e.parent.name))&&(i=t.xmlMode||t.encodeEntities!=="utf8"?qi(i):Gi(i)),i}function Gr(e){return`<![CDATA[${e.children[0].data}]]>`}function Xr(e){return`<!--${e.data}-->`}function Qi(e,t){return jt(e,t)}function Qr(e,t){return re(e)?e.children.map(a=>Qi(a,t)).join(""):""}function zt(e){return Array.isArray(e)?e.map(zt).join(""):w(e)?e.name==="br"?`
2
+ `:zt(e.children):Xt(e)?zt(e.children):Re(e)?e.data:""}function rt(e){return Array.isArray(e)?e.map(rt).join(""):re(e)&&!Qt(e)?rt(e.children):Re(e)?e.data:""}function Kt(e){return Array.isArray(e)?e.map(Kt).join(""):re(e)&&(e.type===X.Tag||Xt(e))?Kt(e.children):Re(e)?e.data:""}function Zt(e){return re(e)?e.children:[]}function ji(e){return e.parent||null}function zi(e){const t=ji(e);if(t!=null)return Zt(t);const a=[e];let{prev:i,next:n}=e;for(;i!=null;)a.unshift(i),{prev:i}=i;for(;n!=null;)a.push(n),{next:n}=n;return a}function jr(e,t){var a;return(a=e.attribs)===null||a===void 0?void 0:a[t]}function zr(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function Kr(e){return e.name}function Fa(e){let{next:t}=e;for(;t!==null&&!w(t);)({next:t}=t);return t}function Ha(e){let{prev:t}=e;for(;t!==null&&!w(t);)({prev:t}=t);return t}function Ke(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,a=t.lastIndexOf(e);a>=0&&t.splice(a,1)}e.next=null,e.prev=null,e.parent=null}function Zr(e,t){const a=t.prev=e.prev;a&&(a.next=t);const i=t.next=e.next;i&&(i.prev=t);const n=t.parent=e.parent;if(n){const r=n.children;r[r.lastIndexOf(e)]=t,e.parent=null}}function Jr(e,t){if(Ke(t),t.next=null,t.parent=e,e.children.push(t)>1){const a=e.children[e.children.length-2];a.next=t,t.prev=a}else t.prev=null}function eu(e,t){Ke(t);const{parent:a}=e,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=a,i){if(i.prev=t,a){const n=a.children;n.splice(n.lastIndexOf(i),0,t)}}else a&&a.children.push(t)}function tu(e,t){if(Ke(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){const a=e.children[1];a.prev=t,t.next=a}else t.next=null}function au(e,t){Ke(t);const{parent:a}=e;if(a){const i=a.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=a,t.prev=e.prev,t.next=e,e.prev=t}function Jt(e,t,a=!0,i=1/0){return Va(e,Array.isArray(t)?t:[t],a,i)}function Va(e,t,a,i){const n=[],r=[t],u=[0];for(;;){if(u[0]>=r[0].length){if(u.length===1)return n;r.shift(),u.shift();continue}const o=r[0][u[0]++];if(e(o)&&(n.push(o),--i<=0))return n;a&&re(o)&&o.children.length>0&&(u.unshift(0),r.unshift(o.children))}}function iu(e,t){return t.find(e)}function Ya(e,t,a=!0){let i=null;for(let n=0;n<t.length&&!i;n++){const r=t[n];if(w(r))e(r)?i=r:a&&r.children.length>0&&(i=Ya(e,r.children,!0));else continue}return i}function Ki(e,t){return t.some(a=>w(a)&&(e(a)||Ki(e,a.children)))}function nu(e,t){const a=[],i=[t],n=[0];for(;;){if(n[0]>=i[0].length){if(i.length===1)return a;i.shift(),n.shift();continue}const r=i[0][n[0]++];w(r)&&(e(r)&&a.push(r),r.children.length>0&&(n.unshift(0),i.unshift(r.children)))}}const ea={tag_name(e){return typeof e=="function"?t=>w(t)&&e(t.name):e==="*"?w:t=>w(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>Re(t)&&e(t.data):t=>Re(t)&&t.data===e}};function Zi(e,t){return typeof t=="function"?a=>w(a)&&t(a.attribs[e]):a=>w(a)&&a.attribs[e]===t}function su(e,t){return a=>e(a)||t(a)}function Ji(e){const t=Object.keys(e).map(a=>{const i=e[a];return Object.prototype.hasOwnProperty.call(ea,a)?ea[a](i):Zi(a,i)});return t.length===0?null:t.reduce(su)}function ru(e,t){const a=Ji(e);return a?a(t):!0}function uu(e,t,a,i=1/0){const n=Ji(e);return n?Jt(n,t,a,i):[]}function ou(e,t,a=!0){return Array.isArray(t)||(t=[t]),Ya(Zi("id",e),t,a)}function ut(e,t,a=!0,i=1/0){return Jt(ea.tag_name(e),t,a,i)}function cu(e,t,a=!0,i=1/0){return Jt(ea.tag_type(e),t,a,i)}function lu(e){let t=e.length;for(;--t>=0;){const a=e[t];if(t>0&&e.lastIndexOf(a,t-1)>=0){e.splice(t,1);continue}for(let i=a.parent;i;i=i.parent)if(e.includes(i)){e.splice(t,1);break}}return e}var Se;(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"})(Se||(Se={}));function en(e,t){const a=[],i=[];if(e===t)return 0;let n=re(e)?e:e.parent;for(;n;)a.unshift(n),n=n.parent;for(n=re(t)?t:t.parent;n;)i.unshift(n),n=n.parent;const r=Math.min(a.length,i.length);let u=0;for(;u<r&&a[u]===i[u];)u++;if(u===0)return Se.DISCONNECTED;const o=a[u-1],l=o.children,h=a[u],m=i[u];return l.indexOf(h)>l.indexOf(m)?o===t?Se.FOLLOWING|Se.CONTAINED_BY:Se.FOLLOWING:o===e?Se.PRECEDING|Se.CONTAINS:Se.PRECEDING}function ot(e){return e=e.filter((t,a,i)=>!i.includes(t,a+1)),e.sort((t,a)=>{const i=en(t,a);return i&Se.PRECEDING?-1:i&Se.FOLLOWING?1:0}),e}function du(e){const t=ta(Tu,e);return t?t.name==="feed"?hu(t):fu(t):null}function hu(e){var t;const a=e.children,i={type:"atom",items:ut("entry",a).map(u=>{var o;const{children:l}=u,h={media:tn(l)};Te(h,"id","id",l),Te(h,"title","title",l);const m=(o=ta("link",l))===null||o===void 0?void 0:o.attribs.href;m&&(h.link=m);const T=qe("summary",l)||qe("content",l);T&&(h.description=T);const b=qe("updated",l);return b&&(h.pubDate=new Date(b)),h})};Te(i,"id","id",a),Te(i,"title","title",a);const n=(t=ta("link",a))===null||t===void 0?void 0:t.attribs.href;n&&(i.link=n),Te(i,"description","subtitle",a);const r=qe("updated",a);return r&&(i.updated=new Date(r)),Te(i,"author","email",a,!0),i}function fu(e){var t,a;const i=(a=(t=ta("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&a!==void 0?a:[],n={type:e.name.substr(0,3),id:"",items:ut("item",e.children).map(u=>{const{children:o}=u,l={media:tn(o)};Te(l,"id","guid",o),Te(l,"title","title",o),Te(l,"link","link",o),Te(l,"description","description",o);const h=qe("pubDate",o)||qe("dc:date",o);return h&&(l.pubDate=new Date(h)),l})};Te(n,"title","title",i),Te(n,"link","link",i),Te(n,"description","description",i);const r=qe("lastBuildDate",i);return r&&(n.updated=new Date(r)),Te(n,"author","managingEditor",i,!0),n}const mu=["url","type","lang"],Eu=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function tn(e){return ut("media:content",e).map(t=>{const{attribs:a}=t,i={medium:a.medium,isDefault:!!a.isDefault};for(const n of mu)a[n]&&(i[n]=a[n]);for(const n of Eu)a[n]&&(i[n]=parseInt(a[n],10));return a.expression&&(i.expression=a.expression),i})}function ta(e,t){return ut(e,t,!0,1)[0]}function qe(e,t,a=!1){return rt(ut(e,t,a,1)).trim()}function Te(e,t,a,i,n=!1){const r=qe(a,i,n);r&&(e[t]=r)}function Tu(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const aa=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return Se},append:eu,appendChild:Jr,compareDocumentPosition:en,existsOne:Ki,filter:Jt,find:Va,findAll:nu,findOne:Ya,findOneChild:iu,getAttributeValue:jr,getChildren:Zt,getElementById:ou,getElements:uu,getElementsByTagName:ut,getElementsByTagType:cu,getFeed:du,getInnerHTML:Qr,getName:Kr,getOuterHTML:Qi,getParent:ji,getSiblings:zi,getText:zt,hasAttrib:zr,hasChildren:re,innerText:Kt,isCDATA:Xt,isComment:Qt,isDocument:Ve,isTag:w,isText:Re,nextElementSibling:Fa,prepend:au,prependChild:tu,prevElementSibling:Ha,removeElement:Ke,removeSubsets:lu,replaceElement:Zr,testElement:ru,textContent:rt,uniqueSort:ot},Symbol.toStringTag,{value:"Module"})),pu={_useHtmlParser2:!1};function qa(e,t){if(!e)return t??pu;const a={_useHtmlParser2:!!e.xmlMode,...t,...e};return e.xml?(a._useHtmlParser2=!0,a.xmlMode=!0,e.xml!==!0&&Object.assign(a,e.xml)):e.xmlMode&&(a._useHtmlParser2=!0),a}function an(e,t,a){return e?e(t??e._root.children,null,void 0,a).toString():""}function bu(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function gu(e,t){const a=bu(e)?(t=e,void 0):e,i={...this===null||this===void 0?void 0:this._options,...qa(t)};return an(this,a,i)}function _u(e){const t={...this._options,xmlMode:!0};return an(this,e,t)}function Nt(e){const t=e??(this?this.root():[]);let a="";for(let i=0;i<t.length;i++)a+=rt(t[i]);return a}function Au(e,t,a=typeof t=="boolean"?t:!1){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(a=t);const i=this.load(e,this._options,!1);return a||i("script").remove(),[...i.root()[0].children]}function Nu(){return this(this._root)}function nn(e,t){if(t===e)return!1;let a=t;for(;a&&a!==a.parent;)if(a=a.parent,a===e)return!0;return!1}function Cu(e){return this.root().extract(e)}function Iu(e,t){if(!sn(e)||!sn(t))return;let a=e.length;const i=+t.length;for(let n=0;n<i;n++)e[a++]=t[n];return e.length=a,e}function sn(e){if(Array.isArray(e))return!0;if(typeof e!="object"||e===null||!("length"in e)||typeof e.length!="number"||e.length<0)return!1;for(let t=0;t<e.length;t++)if(!(t in e))return!1;return!0}const Su=Object.freeze(Object.defineProperty({__proto__:null,contains:nn,extract:Cu,html:gu,merge:Iu,parseHTML:Au,root:Nu,text:Nt,xml:_u},Symbol.toStringTag,{value:"Module"}));function Be(e){return e.cheerio!=null}function xu(e){return e.replace(/[._-](\w|$)/g,(t,a)=>a.toUpperCase())}function Ou(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function Z(e,t){const a=e.length;for(let i=0;i<a;i++)t(e[i],i);return e}var Ze;(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"})(Ze||(Ze={}));function Wa(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const a=e.charCodeAt(t+1);return(a>=Ze.LowerA&&a<=Ze.LowerZ||a>=Ze.UpperA&&a<=Ze.UpperZ||a===Ze.Exclamation)&&e.includes(">",t+2)}const Ct=Object.prototype.hasOwnProperty,It=/\s+/,$a="data-",Ga=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Du=/^{[^]*}$|^\[[^]*]$/;function ia(e,t,a){var i;if(!(!e||!w(e))){if((i=e.attribs)!==null&&i!==void 0||(e.attribs={}),!t)return e.attribs;if(Ct.call(e.attribs,t))return!a&&Ga.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return Nt(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function ct(e,t,a){a===null?cn(e,t):e.attribs[t]=`${a}`}function Lu(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return Z(this,(a,i)=>{w(a)&&ct(a,e,t.call(a,i,a.attribs[e]))})}return Z(this,a=>{if(w(a))if(typeof e=="object")for(const i of Object.keys(e)){const n=e[i];ct(a,i,n)}else ct(a,e,t)})}return arguments.length>1?this:ia(this[0],e,this.options.xmlMode)}function rn(e,t,a){return t in e?e[t]:!a&&Ga.test(t)?ia(e,t,!1)!==void 0:ia(e,t,a)}function Xa(e,t,a,i){t in e?e[t]=a:ct(e,t,!i&&Ga.test(t)?a?"":null:`${a}`)}function yu(e,t){var a;if(typeof e=="string"&&t===void 0){const i=this[0];if(!i||!w(i))return;switch(e){case"style":{const n=this.css(),r=Object.keys(n);for(let u=0;u<r.length;u++)n[u]=r[u];return n.length=r.length,n}case"tagName":case"nodeName":return i.name.toUpperCase();case"href":case"src":{const n=(a=i.attribs)===null||a===void 0?void 0:a[e];return typeof URL<"u"&&(e==="href"&&(i.tagName==="a"||i.tagName==="link")||e==="src"&&(i.tagName==="img"||i.tagName==="iframe"||i.tagName==="audio"||i.tagName==="video"||i.tagName==="source"))&&n!==void 0&&this.options.baseURI?new URL(n,this.options.baseURI).href:n}case"innerText":return Kt(i);case"textContent":return rt(i);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return rn(i,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new TypeError("Bad combination of arguments.");return Z(this,(i,n)=>{w(i)&&Xa(i,e,t.call(i,n,rn(i,e,this.options.xmlMode)),this.options.xmlMode)})}return Z(this,i=>{if(w(i))if(typeof e=="object")for(const n of Object.keys(e)){const r=e[n];Xa(i,n,r,this.options.xmlMode)}else Xa(i,e,t,this.options.xmlMode)})}}function un(e,t,a){var i;(i=e.data)!==null&&i!==void 0||(e.data={}),typeof t=="object"?Object.assign(e.data,t):typeof t=="string"&&a!==void 0&&(e.data[t]=a)}function Ru(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith($a))continue;const a=xu(t.slice($a.length));Ct.call(e.data,a)||(e.data[a]=on(e.attribs[t]))}return e.data}function Mu(e,t){const a=$a+Ou(t),i=e.data;if(Ct.call(i,t))return i[t];if(Ct.call(e.attribs,a))return i[t]=on(e.attribs[a])}function on(e){if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);if(e===String(t))return t;if(Du.test(e))try{return JSON.parse(e)}catch{}return e}function Pu(e,t){var a;const i=this[0];if(!i||!w(i))return;const n=i;return(a=n.data)!==null&&a!==void 0||(n.data={}),e==null?Ru(n):typeof e=="object"||t!==void 0?(Z(this,r=>{w(r)&&(typeof e=="object"?un(r,e):un(r,e,t))}),this):Mu(n,e)}function ku(e){const t=arguments.length===0,a=this[0];if(!a||!w(a))return t?void 0:this;switch(a.name){case"textarea":return this.text(e);case"select":{const i=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");const n=typeof e=="object"?e:[e];for(const r of n)this.find(`option[value="${r}"]`).attr("selected","");return this}return this.attr("multiple")?i.toArray().map(n=>Nt(n.children)):i.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function cn(e,t){!e.attribs||!Ct.call(e.attribs,t)||delete e.attribs[t]}function na(e){return e?e.trim().split(It):[]}function wu(e){const t=na(e);for(const a of t)Z(this,i=>{w(i)&&cn(i,a)});return this}function Bu(e){return this.toArray().some(t=>{const a=w(t)&&t.attribs.class;let i=-1;if(a&&e.length>0)for(;(i=a.indexOf(e,i+1))>-1;){const n=i+e.length;if((i===0||It.test(a[i-1]))&&(n===a.length||It.test(a[n])))return!0}return!1})}function ln(e){if(typeof e=="function")return Z(this,(i,n)=>{if(w(i)){const r=i.attribs.class||"";ln.call([i],e.call(i,n,r))}});if(!e||typeof e!="string")return this;const t=e.split(It),a=this.length;for(let i=0;i<a;i++){const n=this[i];if(!w(n))continue;const r=ia(n,"class",!1);if(r){let u=` ${r} `;for(const o of t){const l=`${o} `;u.includes(` ${l}`)||(u+=l)}ct(n,"class",u.trim())}else ct(n,"class",t.join(" ").trim())}return this}function dn(e){if(typeof e=="function")return Z(this,(n,r)=>{w(n)&&dn.call([n],e.call(n,r,n.attribs.class||""))});const t=na(e),a=t.length,i=arguments.length===0;return Z(this,n=>{if(w(n))if(i)n.attribs.class="";else{const r=na(n.attribs.class);let u=!1;for(let o=0;o<a;o++){const l=r.indexOf(t[o]);l>=0&&(r.splice(l,1),u=!0,o--)}u&&(n.attribs.class=r.join(" "))}})}function hn(e,t){if(typeof e=="function")return Z(this,(u,o)=>{w(u)&&hn.call([u],e.call(u,o,u.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const a=e.split(It),i=a.length,n=typeof t=="boolean"?t?1:-1:0,r=this.length;for(let u=0;u<r;u++){const o=this[u];if(!w(o))continue;const l=na(o.attribs.class);for(let h=0;h<i;h++){const m=l.indexOf(a[h]);n>=0&&m<0?l.push(a[h]):n<=0&&m>=0&&l.splice(m,1)}o.attribs.class=l.join(" ")}return this}const vu=Object.freeze(Object.defineProperty({__proto__:null,addClass:ln,attr:Lu,data:Pu,hasClass:Bu,prop:yu,removeAttr:wu,removeClass:dn,toggleClass:hn,val:ku},Symbol.toStringTag,{value:"Module"}));var L;(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"})(L||(L={}));var ne;(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"})(ne||(ne={}));const fn=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,Uu=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Fu=new Map([[126,ne.Element],[94,ne.Start],[36,ne.End],[42,ne.Any],[33,ne.Not],[124,ne.Hyphen]]),Hu=new Set(["has","not","matches","is","where","host","host-context"]);function St(e){switch(e.type){case L.Adjacent:case L.Child:case L.Descendant:case L.Parent:case L.Sibling:case L.ColumnCombinator:return!0;default:return!1}}const Vu=new Set(["contains","icontains"]);function Yu(e,t,a){const i=parseInt(t,16)-65536;return i!==i||a?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,i&1023|56320)}function xt(e){return e.replace(Uu,Yu)}function Qa(e){return e===39||e===34}function mn(e){return e===32||e===9||e===10||e===12||e===13}function sa(e){const t=[],a=En(t,`${e}`,0);if(a<e.length)throw new Error(`Unmatched selector: ${e.slice(a)}`);return t}function En(e,t,a){let i=[];function n(b){const N=t.slice(a+b).match(fn);if(!N)throw new Error(`Expected name, found ${t.slice(a)}`);const[I]=N;return a+=b+I.length,xt(I)}function r(b){for(a+=b;a<t.length&&mn(t.charCodeAt(a));)a++}function u(){a+=1;const b=a;let N=1;for(;N>0&&a<t.length;a++)t.charCodeAt(a)===40&&!o(a)?N++:t.charCodeAt(a)===41&&!o(a)&&N--;if(N)throw new Error("Parenthesis not matched");return xt(t.slice(b,a-1))}function o(b){let N=0;for(;t.charCodeAt(--b)===92;)N++;return(N&1)===1}function l(){if(i.length>0&&St(i[i.length-1]))throw new Error("Did not expect successive traversals.")}function h(b){if(i.length>0&&i[i.length-1].type===L.Descendant){i[i.length-1].type=b;return}l(),i.push({type:b})}function m(b,N){i.push({type:L.Attribute,name:b,action:N,value:n(1),namespace:null,ignoreCase:"quirks"})}function T(){if(i.length&&i[i.length-1].type===L.Descendant&&i.pop(),i.length===0)throw new Error("Empty sub-selector");e.push(i)}if(r(0),t.length===a)return a;e:for(;a<t.length;){const b=t.charCodeAt(a);switch(b){case 32:case 9:case 10:case 12:case 13:{(i.length===0||i[0].type!==L.Descendant)&&(l(),i.push({type:L.Descendant})),r(1);break}case 62:{h(L.Child),r(1);break}case 60:{h(L.Parent),r(1);break}case 126:{h(L.Sibling),r(1);break}case 43:{h(L.Adjacent),r(1);break}case 46:{m("class",ne.Element);break}case 35:{m("id",ne.Equals);break}case 91:{r(1);let N,I=null;t.charCodeAt(a)===124?N=n(1):t.startsWith("*|",a)?(I="*",N=n(2)):(N=n(0),t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==61&&(I=N,N=n(1))),r(0);let y=ne.Exists;const P=Fu.get(t.charCodeAt(a));if(P){if(y=P,t.charCodeAt(a+1)!==61)throw new Error("Expected `=`");r(2)}else t.charCodeAt(a)===61&&(y=ne.Equals,r(1));let $="",v=null;if(y!=="exists"){if(Qa(t.charCodeAt(a))){const k=t.charCodeAt(a);let _=a+1;for(;_<t.length&&(t.charCodeAt(_)!==k||o(_));)_+=1;if(t.charCodeAt(_)!==k)throw new Error("Attribute value didn't end");$=xt(t.slice(a+1,_)),a=_+1}else{const k=a;for(;a<t.length&&(!mn(t.charCodeAt(a))&&t.charCodeAt(a)!==93||o(a));)a+=1;$=xt(t.slice(k,a))}r(0);const V=t.charCodeAt(a)|32;V===115?(v=!1,r(1)):V===105&&(v=!0,r(1))}if(t.charCodeAt(a)!==93)throw new Error("Attribute selector didn't terminate");a+=1;const q={type:L.Attribute,name:N,action:y,value:$,namespace:I,ignoreCase:v};i.push(q);break}case 58:{if(t.charCodeAt(a+1)===58){i.push({type:L.PseudoElement,name:n(2).toLowerCase(),data:t.charCodeAt(a)===40?u():null});continue}const N=n(1).toLowerCase();let I=null;if(t.charCodeAt(a)===40)if(Hu.has(N)){if(Qa(t.charCodeAt(a+1)))throw new Error(`Pseudo-selector ${N} cannot be quoted`);if(I=[],a=En(I,t,a+1),t.charCodeAt(a)!==41)throw new Error(`Missing closing parenthesis in :${N} (${t})`);a+=1}else{if(I=u(),Vu.has(N)){const y=I.charCodeAt(0);y===I.charCodeAt(I.length-1)&&Qa(y)&&(I=I.slice(1,-1))}I=xt(I)}i.push({type:L.Pseudo,name:N,data:I});break}case 44:{T(),i=[],r(1);break}default:{if(t.startsWith("/*",a)){const y=t.indexOf("*/",a+2);if(y<0)throw new Error("Comment was not terminated");a=y+2,i.length===0&&r(0);break}let N=null,I;if(b===42)a+=1,I="*";else if(b===124){if(I="",t.charCodeAt(a+1)===124){h(L.ColumnCombinator),r(2);break}}else if(fn.test(t.slice(a)))I=n(0);else break e;t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==124&&(N=I,t.charCodeAt(a+1)===42?(I="*",a+=2):I=n(1)),i.push(I==="*"?{type:L.Universal,namespace:N}:{type:L.Tag,name:I,namespace:N})}}}return T(),a}function qu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ra={trueFunc:function(){return!0},falseFunc:function(){return!1}};const H=qu(ra),Tn=new Map([[L.Universal,50],[L.Tag,30],[L.Attribute,1],[L.Pseudo,0]]);function ja(e){return!Tn.has(e.type)}const Wu=new Map([[ne.Exists,10],[ne.Equals,8],[ne.Not,7],[ne.Start,6],[ne.End,6],[ne.Any,5]]);function $u(e){const t=e.map(pn);for(let a=1;a<e.length;a++){const i=t[a];if(!(i<0))for(let n=a-1;n>=0&&i<t[n];n--){const r=e[n+1];e[n+1]=e[n],e[n]=r,t[n+1]=t[n],t[n]=i}}}function pn(e){var t,a;let i=(t=Tn.get(e.type))!==null&&t!==void 0?t:-1;return e.type===L.Attribute?(i=(a=Wu.get(e.action))!==null&&a!==void 0?a:4,e.action===ne.Equals&&e.name==="id"&&(i=9),e.ignoreCase&&(i>>=1)):e.type===L.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?i=0:Array.isArray(e.data)?(i=Math.min(...e.data.map(n=>Math.min(...n.map(pn)))),i<0&&(i=0)):i=2:i=3),i}const Gu=/[-[\]{}()*+?.,\\^$|#\s]/g;function bn(e){return e.replace(Gu,"\\$&")}const Xu=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 Je(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&Xu.has(e.name)}const Qu={equals(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return Je(t,a)?(r=r.toLowerCase(),u=>{const o=i.getAttributeValue(u,n);return o!=null&&o.length===r.length&&o.toLowerCase()===r&&e(u)}):u=>i.getAttributeValue(u,n)===r&&e(u)},hyphen(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=r.length;return Je(t,a)?(r=r.toLowerCase(),function(l){const h=i.getAttributeValue(l,n);return h!=null&&(h.length===u||h.charAt(u)==="-")&&h.substr(0,u).toLowerCase()===r&&e(l)}):function(l){const h=i.getAttributeValue(l,n);return h!=null&&(h.length===u||h.charAt(u)==="-")&&h.substr(0,u)===r&&e(l)}},element(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(/\s/.test(r))return H.falseFunc;const u=new RegExp(`(?:^|\\s)${bn(r)}(?:$|\\s)`,Je(t,a)?"i":"");return function(l){const h=i.getAttributeValue(l,n);return h!=null&&h.length>=r.length&&u.test(h)&&e(l)}},exists(e,{name:t},{adapter:a}){return i=>a.hasAttrib(i,t)&&e(i)},start(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=r.length;return u===0?H.falseFunc:Je(t,a)?(r=r.toLowerCase(),o=>{const l=i.getAttributeValue(o,n);return l!=null&&l.length>=u&&l.substr(0,u).toLowerCase()===r&&e(o)}):o=>{var l;return!!(!((l=i.getAttributeValue(o,n))===null||l===void 0)&&l.startsWith(r))&&e(o)}},end(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=-r.length;return u===0?H.falseFunc:Je(t,a)?(r=r.toLowerCase(),o=>{var l;return((l=i.getAttributeValue(o,n))===null||l===void 0?void 0:l.substr(u).toLowerCase())===r&&e(o)}):o=>{var l;return!!(!((l=i.getAttributeValue(o,n))===null||l===void 0)&&l.endsWith(r))&&e(o)}},any(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(r==="")return H.falseFunc;if(Je(t,a)){const u=new RegExp(bn(r),"i");return function(l){const h=i.getAttributeValue(l,n);return h!=null&&h.length>=r.length&&u.test(h)&&e(l)}}return u=>{var o;return!!(!((o=i.getAttributeValue(u,n))===null||o===void 0)&&o.includes(r))&&e(u)}},not(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return r===""?u=>!!i.getAttributeValue(u,n)&&e(u):Je(t,a)?(r=r.toLowerCase(),u=>{const o=i.getAttributeValue(u,n);return(o==null||o.length!==r.length||o.toLowerCase()!==r)&&e(u)}):u=>i.getAttributeValue(u,n)!==r&&e(u)}},ju=new Set([9,10,12,13,32]),gn=48,zu=57;function Ku(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,a=0,i=r(),n=u();if(t<e.length&&e.charAt(t)==="n"&&(t++,a=i*(n??1),o(),t<e.length?(i=r(),o(),n=u()):i=n=0),n===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[a,i*n];function r(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function u(){const l=t;let h=0;for(;t<e.length&&e.charCodeAt(t)>=gn&&e.charCodeAt(t)<=zu;)h=h*10+(e.charCodeAt(t)-gn),t++;return t===l?null:h}function o(){for(;t<e.length&&ju.has(e.charCodeAt(t));)t++}}function Zu(e){const t=e[0],a=e[1]-1;if(a<0&&t<=0)return H.falseFunc;if(t===-1)return r=>r<=a;if(t===0)return r=>r===a;if(t===1)return a<0?H.trueFunc:r=>r>=a;const i=Math.abs(t),n=(a%i+i)%i;return t>1?r=>r>=a&&r%i===n:r=>r<=a&&r%i===n}function ua(e){return Zu(Ku(e))}function oa(e,t){return a=>{const i=t.getParent(a);return i!=null&&t.isTag(i)&&e(a)}}const za={contains(e,t,{adapter:a}){return function(n){return e(n)&&a.getText(n).includes(t)}},icontains(e,t,{adapter:a}){const i=t.toLowerCase();return function(r){return e(r)&&a.getText(r).toLowerCase().includes(i)}},"nth-child"(e,t,{adapter:a,equals:i}){const n=ua(t);return n===H.falseFunc?H.falseFunc:n===H.trueFunc?oa(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=0;h<o.length&&!i(u,o[h]);h++)a.isTag(o[h])&&l++;return n(l)&&e(u)}},"nth-last-child"(e,t,{adapter:a,equals:i}){const n=ua(t);return n===H.falseFunc?H.falseFunc:n===H.trueFunc?oa(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=o.length-1;h>=0&&!i(u,o[h]);h--)a.isTag(o[h])&&l++;return n(l)&&e(u)}},"nth-of-type"(e,t,{adapter:a,equals:i}){const n=ua(t);return n===H.falseFunc?H.falseFunc:n===H.trueFunc?oa(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=0;h<o.length;h++){const m=o[h];if(i(u,m))break;a.isTag(m)&&a.getName(m)===a.getName(u)&&l++}return n(l)&&e(u)}},"nth-last-of-type"(e,t,{adapter:a,equals:i}){const n=ua(t);return n===H.falseFunc?H.falseFunc:n===H.trueFunc?oa(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=o.length-1;h>=0;h--){const m=o[h];if(i(u,m))break;a.isTag(m)&&a.getName(m)===a.getName(u)&&l++}return n(l)&&e(u)}},root(e,t,{adapter:a}){return i=>{const n=a.getParent(i);return(n==null||!a.isTag(n))&&e(i)}},scope(e,t,a,i){const{equals:n}=a;return!i||i.length===0?za.root(e,t,a):i.length===1?r=>n(i[0],r)&&e(r):r=>i.includes(r)&&e(r)},hover:Ka("isHovered"),visited:Ka("isVisited"),active:Ka("isActive")};function Ka(e){return function(a,i,{adapter:n}){const r=n[e];return typeof r!="function"?H.falseFunc:function(o){return r(o)&&a(o)}}}const _n={empty(e,{adapter:t}){return!t.getChildren(e).some(a=>t.isTag(a)||t.getText(a)!=="")},"first-child"(e,{adapter:t,equals:a}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;const i=t.getSiblings(e).find(n=>t.isTag(n));return i!=null&&a(e,i)},"last-child"(e,{adapter:t,equals:a}){const i=t.getSiblings(e);for(let n=i.length-1;n>=0;n--){if(a(e,i[n]))return!0;if(t.isTag(i[n]))break}return!1},"first-of-type"(e,{adapter:t,equals:a}){const i=t.getSiblings(e),n=t.getName(e);for(let r=0;r<i.length;r++){const u=i[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===n)break}return!1},"last-of-type"(e,{adapter:t,equals:a}){const i=t.getSiblings(e),n=t.getName(e);for(let r=i.length-1;r>=0;r--){const u=i[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===n)break}return!1},"only-of-type"(e,{adapter:t,equals:a}){const i=t.getName(e);return t.getSiblings(e).every(n=>a(e,n)||!t.isTag(n)||t.getName(n)!==i)},"only-child"(e,{adapter:t,equals:a}){return t.getSiblings(e).every(i=>a(e,i)||!t.isTag(i))}};function An(e,t,a,i){if(a===null){if(e.length>i)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===i)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const Ju={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
3
3
  :is(button, input, select, textarea, optgroup, option)[disabled],
4
4
  optgroup[disabled] > option,
5
5
  fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
6
- )`,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])"},pn={};function $u(e,t){return e===U.falseFunc?U.falseFunc:a=>t.isTag(a)&&e(a)}function bn(e,t){const a=t.getSiblings(e);if(a.length<=1)return[];const i=a.indexOf(e);return i<0||i===a.length-1?[]:a.slice(i+1).filter(t.isTag)}function $a(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 Qa=(e,t,a,i,n)=>{const r=n(t,$a(a),i);return r===U.trueFunc?e:r===U.falseFunc?U.falseFunc:u=>r(u)&&e(u)},ja={is:Qa,matches:Qa,where:Qa,not(e,t,a,i,n){const r=n(t,$a(a),i);return r===U.falseFunc?e:r===U.trueFunc?U.falseFunc:u=>!r(u)&&e(u)},has(e,t,a,i,n){const{adapter:r}=a,u=$a(a);u.relativeSelector=!0;const o=t.some(E=>E.some(Wa))?[pn]:void 0,l=n(t,u,o);if(l===U.falseFunc)return U.falseFunc;const f=$u(l,r);if(o&&l!==U.trueFunc){const{shouldTestNextSiblings:E=!1}=l;return T=>{if(!e(T))return!1;o[0]=T;const b=r.getChildren(T),N=E?[...b,...bn(T,r)]:b;return r.existsOne(f,N)}}return E=>e(E)&&r.existsOne(f,r.getChildren(E))}};function Qu(e,t,a,i,n){var r;const{name:u,data:o}=t;if(Array.isArray(o)){if(!(u in ja))throw new Error(`Unknown pseudo-class :${u}(${o})`);return ja[u](e,o,a,i,n)}const l=(r=a.pseudos)===null||r===void 0?void 0:r[u],f=typeof l=="string"?l:Gu[u];if(typeof f=="string"){if(o!=null)throw new Error(`Pseudo ${u} doesn't have any arguments`);const E=ta(f);return ja.is(e,E,a,i,n)}if(typeof l=="function")return Tn(l,u,o,1),E=>l(E,o)&&e(E);if(u in Xa)return Xa[u](e,o,a,i);if(u in mn){const E=mn[u];return Tn(E,u,o,2),T=>E(T,a,o)&&e(T)}throw new Error(`Unknown pseudo-class :${u}`)}function za(e,t){const a=t.getParent(e);return a&&t.isTag(a)?a:null}function ju(e,t,a,i,n){const{adapter:r,equals:u}=a;switch(t.type){case R.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case R.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case R.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!a.xmlMode||a.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),Yu[t.action](e,t,a)}case R.Pseudo:return Qu(e,t,a,i,n);case R.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:o}=t;return(!a.xmlMode||a.lowerCaseTags)&&(o=o.toLowerCase()),function(f){return r.getName(f)===o&&e(f)}}case R.Descendant:{if(a.cacheResults===!1||typeof WeakSet>"u")return function(f){let E=f;for(;E=za(E,r);)if(e(E))return!0;return!1};const o=new WeakSet;return function(f){let E=f;for(;E=za(E,r);)if(!o.has(E)){if(r.isTag(E)&&e(E))return!0;o.add(E)}return!1}}case"_flexibleDescendant":return function(l){let f=l;do if(e(f))return!0;while(f=za(f,r));return!1};case R.Parent:return function(l){return r.getChildren(l).some(f=>r.isTag(f)&&e(f))};case R.Child:return function(l){const f=r.getParent(l);return f!=null&&r.isTag(f)&&e(f)};case R.Sibling:return function(l){const f=r.getSiblings(l);for(let E=0;E<f.length;E++){const T=f[E];if(u(l,T))break;if(r.isTag(T)&&e(T))return!0}return!1};case R.Adjacent:return r.prevElementSibling?function(l){const f=r.prevElementSibling(l);return f!=null&&e(f)}:function(l){const f=r.getSiblings(l);let E;for(let T=0;T<f.length;T++){const b=f[T];if(u(l,b))break;r.isTag(b)&&(E=b)}return!!E&&e(E)};case R.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function gn(e){return e.type===R.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(gn)))}const zu={type:R.Descendant},Ku={type:"_flexibleDescendant"},Zu={type:R.Pseudo,name:"scope",data:null};function Ju(e,{adapter:t},a){const i=!!(a!=null&&a.every(n=>{const r=t.isTag(n)&&t.getParent(n);return n===pn||r&&t.isTag(r)}));for(const n of e){if(!(n.length>0&&Wa(n[0])&&n[0].type!==R.Descendant))if(i&&!n.some(gn))n.unshift(zu);else continue;n.unshift(Zu)}}function _n(e,t,a){var i;e.forEach(Uu),a=(i=t.context)!==null&&i!==void 0?i:a;const n=Array.isArray(a),r=a&&(Array.isArray(a)?a:[a]);if(t.relativeSelector!==!1)Ju(e,t,r);else if(e.some(l=>l.length>0&&Wa(l[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let u=!1;const o=e.map(l=>{if(l.length>=2){const[f,E]=l;f.type!==R.Pseudo||f.name!=="scope"||(n&&E.type===R.Descendant?l[1]=Ku:(E.type===R.Adjacent||E.type===R.Sibling)&&(u=!0))}return eo(l,t,r)}).reduce(to,U.falseFunc);return o.shouldTestNextSiblings=u,o}function eo(e,t,a){var i;return e.reduce((n,r)=>n===U.falseFunc?U.falseFunc:ju(n,r,t,a,_n),(i=t.rootFunc)!==null&&i!==void 0?i:U.trueFunc)}function to(e,t){return t===U.falseFunc||e===U.trueFunc?e:e===U.falseFunc||t===U.trueFunc?t:function(i){return e(i)||t(i)}}const An=(e,t)=>e===t,ao={adapter:Zt,equals:An};function io(e){var t,a,i,n;const r=e??ao;return(t=r.adapter)!==null&&t!==void 0||(r.adapter=Zt),(a=r.equals)!==null&&a!==void 0||(r.equals=(n=(i=r.adapter)===null||i===void 0?void 0:i.equals)!==null&&n!==void 0?n:An),r}function no(e){return function(a,i,n){const r=io(i);return e(a,r,n)}}const Ka=no(_n);function Nn(e,t,a=!1){return a&&(e=so(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function so(e,t){const a=Array.isArray(e)?e.slice(0):[e],i=a.length;for(let n=0;n<i;n++){const r=bn(a[n],t);a.push(...r)}return a}const ro=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function sa(e){return e.type!=="pseudo"?!1:ro.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(sa)):!1}function uo(e,t,a){const i=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(i)?i>=0?i+1:1/0:0;case"lt":return isFinite(i)?i>=0?Math.min(i,a):1/0:0;case"gt":return isFinite(i)?1/0:0;case"odd":return 2*a;case"even":return 2*a-1;case"last":case"not":return 1/0}}function oo(e){for(;e.parent;)e=e.parent;return e}function Za(e){const t=[],a=[];for(const i of e)i.some(sa)?t.push(i):a.push(i);return[a,t]}const co={type:R.Universal,namespace:null},lo={type:R.Pseudo,name:"scope",data:null};function Cn(e,t,a={}){return In([e],t,a)}function In(e,t,a={}){if(typeof t=="function")return e.some(t);const[i,n]=Za(ta(t));return i.length>0&&e.some(Ka(i,a))||n.some(r=>On(r,e,a).length>0)}function ho(e,t,a,i){const n=typeof a=="string"?parseInt(a,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(n)&&Math.abs(n)<t.length?[n<0?t[t.length+n]:t[n]]:[];case"gt":return isFinite(n)?t.slice(n+1):[];case"even":return t.filter((r,u)=>u%2===0);case"odd":return t.filter((r,u)=>u%2===1);case"not":{const r=new Set(xn(a,t,i));return t.filter(u=>!r.has(u))}}}function Sn(e,t,a={}){return xn(ta(e),t,a)}function xn(e,t,a){if(t.length===0)return[];const[i,n]=Za(e);let r;if(i.length){const u=ei(t,i,a);if(n.length===0)return u;u.length&&(r=new Set(u))}for(let u=0;u<n.length&&(r==null?void 0:r.size)!==t.length;u++){const o=n[u];if((r?t.filter(E=>v(E)&&!r.has(E)):t).length===0)break;const f=On(o,t,a);if(f.length)if(r)f.forEach(E=>r.add(E));else{if(u===n.length-1)return f;r=new Set(f)}}return typeof r<"u"?r.size===t.length?t:t.filter(u=>r.has(u)):[]}function On(e,t,a){var i;if(e.some(At)){const n=(i=a.root)!==null&&i!==void 0?i:oo(t[0]),r={...a,context:t,relativeSelector:!1};return e.push(lo),ra(n,e,r,!0,t.length)}return ra(t,e,a,!1,t.length)}function fo(e,t,a={},i=1/0){if(typeof e=="function")return Dn(t,e);const[n,r]=Za(ta(e)),u=r.map(o=>ra(t,o,a,!0,i));return n.length&&u.push(Ja(t,n,a,i)),u.length===0?[]:u.length===1?u[0]:rt(u.reduce((o,l)=>[...o,...l]))}function ra(e,t,a,i,n){const r=t.findIndex(sa),u=t.slice(0,r),o=t[r],l=t.length-1===r?n:1/0,f=uo(o.name,o.data,l);if(f===0)return[];const T=(u.length===0&&!Array.isArray(e)?Qt(e).filter(v):u.length===0?(Array.isArray(e)?e:[e]).filter(v):i||u.some(At)?Ja(e,[u],a,f):ei(e,[u],a)).slice(0,f);let b=ho(o.name,T,o.data,a);if(b.length===0||t.length===r+1)return b;const N=t.slice(r+1),S=N.some(At);if(S){if(At(N[0])){const{type:y}=N[0];(y===R.Sibling||y===R.Adjacent)&&(b=Nn(b,Zt,!0)),N.unshift(co)}a={...a,relativeSelector:!1,rootFunc:y=>b.includes(y)}}else a.rootFunc&&a.rootFunc!==aa.trueFunc&&(a={...a,rootFunc:aa.trueFunc});return N.some(sa)?ra(b,N,a,!1,n):S?Ja(b,[N],a,n):ei(b,[N],a)}function Ja(e,t,a,i){const n=Ka(t,a,e);return Dn(e,n,i)}function Dn(e,t,a=1/0){const i=Nn(e,Zt,t.shouldTestNextSiblings);return wa(n=>v(n)&&t(n),i,!0,a)}function ei(e,t,a){const i=(Array.isArray(e)?e:[e]).filter(v);if(i.length===0)return i;const n=Ka(t,a);return n===aa.trueFunc?i:i.filter(n)}const Eo=/^\s*[+~]/;function mo(e){if(!e)return this._make([]);if(typeof e!="string"){const t=Pe(e)?e.toArray():[e],a=this.toArray();return this._make(t.filter(i=>a.some(n=>Zi(n,i))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function To(e,t){var a;const i=this.toArray(),n=Eo.test(e)?i:this.children().toArray(),r={context:i,root:(a=this._root)===null||a===void 0?void 0:a[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(fo(e,n,r,t))}function ti(e){return function(t,...a){return function(i){var n;let r=e(t,this);return i&&(r=ni(r,i,this.options.xmlMode,(n=this._root)===null||n===void 0?void 0:n[0])),this._make(this.length>1&&r.length>1?a.reduce((u,o)=>o(u),r):r)}}}const Ct=ti((e,t)=>{let a=[];for(let i=0;i<t.length;i++){const n=e(t[i]);n.length>0&&(a=a.concat(n))}return a}),ai=ti((e,t)=>{const a=[];for(let i=0;i<t.length;i++){const n=e(t[i]);n!==null&&a.push(n)}return a});function ii(e,...t){let a=null;const i=ti((n,r)=>{const u=[];return te(r,o=>{for(let l;(l=n(o))&&!(a!=null&&a(l,u.length));o=l)u.push(l)}),u})(e,...t);return function(n,r){a=typeof n=="string"?o=>Cn(o,n,this.options):n?It(n):null;const u=i.call(this,r);return a=null,u}}function ot(e){return e.length>1?Array.from(new Set(e)):e}const po=ai(({parent:e})=>e&&!Be(e)?e:null,ot),bo=Ct(e=>{const t=[];for(;e.parent&&!Be(e.parent);)t.push(e.parent),e=e.parent;return t},rt,e=>e.reverse()),go=ii(({parent:e})=>e&&!Be(e)?e:null,rt,e=>e.reverse());function _o(e){var t;const a=[];if(!e)return this._make(a);const i={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},n=typeof e=="string"?r=>Cn(r,e,i):It(e);return te(this,r=>{for(r&&!Be(r)&&!v(r)&&(r=r.parent);r&&v(r);){if(n(r,0)){a.includes(r)||a.push(r);break}r=r.parent}}),this._make(a)}const Ao=ai(e=>ka(e)),No=Ct(e=>{const t=[];for(;e.next;)e=e.next,v(e)&&t.push(e);return t},ot),Co=ii(e=>ka(e),ot),Io=ai(e=>va(e)),So=Ct(e=>{const t=[];for(;e.prev;)e=e.prev,v(e)&&t.push(e);return t},ot),xo=ii(e=>va(e),ot),Oo=Ct(e=>Xi(e).filter(t=>v(t)&&t!==e),rt),Do=Ct(e=>Qt(e).filter(v),ot);function Lo(){const e=this.toArray().reduce((t,a)=>se(a)?t.concat(a.children):t,[]);return this._make(e)}function Ro(e){let t=0;const a=this.length;for(;t<a&&e.call(this[t],t,this[t])!==!1;)++t;return this}function yo(e){let t=[];for(let a=0;a<this.length;a++){const i=this[a],n=e.call(i,a,i);n!=null&&(t=t.concat(n))}return this._make(t)}function It(e){return typeof e=="function"?(t,a)=>e.call(t,a,t):Pe(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function Mo(e){var t;return this._make(ni(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function ni(e,t,a,i){return typeof t=="string"?Sn(t,e,{xmlMode:a,root:i}):e.filter(It(t))}function Po(e){const t=this.toArray();return typeof e=="string"?In(t.filter(v),e,this.options):e?t.some(It(e)):!1}function ko(e){let t=this.toArray();if(typeof e=="string"){const a=new Set(Sn(e,t,this.options));t=t.filter(i=>!a.has(i))}else{const a=It(e);t=t.filter((i,n)=>!a(i,n))}return this._make(t)}function vo(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,a)=>this._make(a).find(e).length>0)}function wo(){return this.length>1?this._make(this[0]):this}function Bo(){return this.length>0?this._make(this[this.length-1]):this}function Uo(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function Fo(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function Ho(){return Array.prototype.slice.call(this)}function Yo(e){let t,a;return e==null?(t=this.parent().children(),a=this[0]):typeof e=="string"?(t=this._make(e),a=this[0]):(t=this,a=Pe(e)?e[0]:e),Array.prototype.indexOf.call(t,a)}function Vo(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function qo(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function Wo(e,t){const a=this._make(e,t),i=rt([...this.get(),...a.get()]);return this._make(i)}function Xo(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const Go=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:To,add:Wo,addBack:Xo,children:Do,closest:_o,contents:Lo,each:Ro,end:qo,eq:Uo,filter:Mo,filterArray:ni,find:mo,first:wo,get:Fo,has:vo,index:Yo,is:Po,last:Bo,map:yo,next:Ao,nextAll:No,nextUntil:Co,not:ko,parent:po,parents:bo,parentsUntil:go,prev:Io,prevAll:So,prevUntil:xo,siblings:Oo,slice:Vo,toArray:Ho},Symbol.toStringTag,{value:"Module"}));function $o(e){return function(a,i,n,r){if(typeof Buffer<"u"&&Buffer.isBuffer(a)&&(a=a.toString()),typeof a=="string")return e(a,i,n,r);const u=a;if(!Array.isArray(u)&&Be(u))return u;const o=new Ge([]);return ze(u,o),o}}function ze(e,t){const a=Array.isArray(e)?e:[e];t?t.children=a:t=null;for(let i=0;i<a.length;i++){const n=a[i];n.parent&&n.parent.children!==a&&$e(n),t?(n.prev=a[i-1]||null,n.next=a[i+1]||null):n.prev=n.next=null,n.parent=t}return t}function Qo(e,t){if(e==null)return[];if(typeof e=="string")return this._parse(e,this.options,!1,null).children.slice(0);if("length"in e){if(e.length===1)return this._makeDomArray(e[0],t);const a=[];for(let i=0;i<e.length;i++){const n=e[i];if(typeof n=="object"){if(n==null)continue;if(!("length"in n)){a.push(t?pt(n,!0):n);continue}}a.push(...this._makeDomArray(n,t))}return a}return[t?pt(e,!0):e]}function Ln(e){return function(...t){const a=this.length-1;return te(this,(i,n)=>{if(!se(i))return;const r=typeof t[0]=="function"?t[0].call(i,n,this._render(i.children)):t,u=this._makeDomArray(r,n<a);e(u,i.children,i)})}}function He(e,t,a,i,n){var r,u;const o=[t,a,...i],l=t===0?null:e[t-1],f=t+a>=e.length?null:e[t+a];for(let E=0;E<i.length;++E){const T=i[E],b=T.parent;if(b){const S=b.children.indexOf(T);S>-1&&(b.children.splice(S,1),n===b&&t>S&&o[0]--)}T.parent=n,T.prev&&(T.prev.next=(r=T.next)!==null&&r!==void 0?r:null),T.next&&(T.next.prev=(u=T.prev)!==null&&u!==void 0?u:null),T.prev=E===0?l:i[E-1],T.next=E===i.length-1?f:i[E+1]}return l&&(l.next=i[0]),f&&(f.prev=i[i.length-1]),e.splice(...o)}function jo(e){return(Pe(e)?e:this._make(e)).append(this),this}function zo(e){return(Pe(e)?e:this._make(e)).prepend(this),this}const Ko=Ln((e,t,a)=>{He(t,t.length,0,e,a)}),Zo=Ln((e,t,a)=>{He(t,0,0,e,a)});function Rn(e){return function(t){const a=this.length-1,i=this.parents().last();for(let n=0;n<this.length;n++){const r=this[n],u=typeof t=="function"?t.call(r,n,r):typeof t=="string"&&!Fa(t)?i.find(t).clone():t,[o]=this._makeDomArray(u,n<a);if(!o||!se(o))continue;let l=o,f=0;for(;f<l.children.length;){const E=l.children[f];v(E)?(l=E,f=0):f++}e(r,l,[o])}return this}}const Jo=Rn((e,t,a)=>{const{parent:i}=e;if(!i)return;const n=i.children,r=n.indexOf(e);ze([e],t),He(n,r,0,a,i)}),ec=Rn((e,t,a)=>{se(e)&&(ze(e.children,t),ze(a,e))});function tc(e){return this.parent(e).not("body").each((t,a)=>{this._make(a).replaceWith(a.children)}),this}function ac(e){const t=this[0];if(t){const a=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t);let i;for(let r=0;r<a.length;r++)a[r].type==="tag"&&(i=a[r]);let n=0;for(;i&&n<i.children.length;){const r=i.children[n];r.type==="tag"?(i=r,n=0):n++}i&&this._make(i).append(this)}return this}function ic(...e){const t=this.length-1;return te(this,(a,i)=>{if(!se(a)||!a.parent)return;const n=a.parent.children,r=n.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,i,this._render(a.children)):e,o=this._makeDomArray(u,i<t);He(n,r+1,0,o,a.parent)})}function nc(e){typeof e=="string"&&(e=this._make(e)),this.remove();const t=[];for(const a of this._makeDomArray(e)){const i=this.clone().toArray(),{parent:n}=a;if(!n)continue;const r=n.children,u=r.indexOf(a);u<0||(He(r,u+1,0,i,n),t.push(...i))}return this._make(t)}function sc(...e){const t=this.length-1;return te(this,(a,i)=>{if(!se(a)||!a.parent)return;const n=a.parent.children,r=n.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,i,this._render(a.children)):e,o=this._makeDomArray(u,i<t);He(n,r,0,o,a.parent)})}function rc(e){const t=this._make(e);this.remove();const a=[];return te(t,i=>{const n=this.clone().toArray(),{parent:r}=i;if(!r)return;const u=r.children,o=u.indexOf(i);o<0||(He(u,o,0,n,r),a.push(...n))}),this._make(a)}function uc(e){const t=e?this.filter(e):this;return te(t,a=>{$e(a),a.prev=a.next=a.parent=null}),this}function oc(e){return te(this,(t,a)=>{const{parent:i}=t;if(!i)return;const n=i.children,r=typeof e=="function"?e.call(t,a,t):e,u=this._makeDomArray(r);ze(u,null);const o=n.indexOf(t);He(n,o,1,u,i),u.includes(t)||(t.parent=t.prev=t.next=null)})}function cc(){return te(this,e=>{if(se(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function lc(e){if(e===void 0){const t=this[0];return!t||!se(t)?null:this._render(t.children)}return te(this,t=>{if(!se(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=Pe(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;ze(a,t)})}function dc(){return this._render(this)}function hc(e){return e===void 0?bt(this):typeof e=="function"?te(this,(t,a)=>this._make(t).text(e.call(t,a,bt([t])))):te(this,t=>{if(!se(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=new Tt(`${e}`);ze(a,t)})}function fc(){const e=Array.prototype.map.call(this.get(),a=>pt(a,!0)),t=new Ge(e);for(const a of e)a.parent=t;return this._make(e)}const Ec=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:Qo,after:ic,append:Ko,appendTo:jo,before:sc,clone:fc,empty:cc,html:lc,insertAfter:nc,insertBefore:rc,prepend:Zo,prependTo:zo,remove:uc,replaceWith:oc,text:hc,toString:dc,unwrap:tc,wrap:Jo,wrapAll:ac,wrapInner:ec},Symbol.toStringTag,{value:"Module"}));function mc(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return te(this,(a,i)=>{v(a)&&yn(a,e,t,i)});if(this.length!==0)return Mn(this[0],e)}function yn(e,t,a,i){if(typeof t=="string"){const n=Mn(e),r=typeof a=="function"?a.call(e,i,n[t]):a;r===""?delete n[t]:r!=null&&(n[t]=r),e.attribs.style=Tc(n)}else if(typeof t=="object"){const n=Object.keys(t);for(let r=0;r<n.length;r++){const u=n[r];yn(e,u,t[u],r)}}}function Mn(e,t){if(!e||!v(e))return;const a=pc(e.attribs.style);if(typeof t=="string")return a[t];if(Array.isArray(t)){const i={};for(const n of t)a[n]!=null&&(i[n]=a[n]);return i}return a}function Tc(e){return Object.keys(e).reduce((t,a)=>`${t}${t?" ":""}${a}: ${e[a]};`,"")}function pc(e){if(e=(e||"").trim(),!e)return{};const t={};let a;for(const i of e.split(";")){const n=i.indexOf(":");if(n<1||n===i.length-1){const r=i.trimEnd();r.length>0&&a!==void 0&&(t[a]+=`;${r}`)}else a=i.slice(0,n).trim(),t[a]=i.slice(n+1).trim()}return t}const bc=Object.freeze(Object.defineProperty({__proto__:null,css:mc},Symbol.toStringTag,{value:"Module"})),Pn="input,select,textarea,keygen",gc=/%20/g,kn=/\r?\n/g;function _c(){return this.serializeArray().map(a=>`${encodeURIComponent(a.name)}=${encodeURIComponent(a.value)}`).join("&").replace(gc,"+")}function Ac(){return this.map((e,t)=>{const a=this._make(t);return v(t)&&t.name==="form"?a.find(Pn).toArray():a.filter(Pn).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var a;const i=this._make(t),n=i.attr("name"),r=(a=i.val())!==null&&a!==void 0?a:"";return Array.isArray(r)?r.map(u=>({name:n,value:u.replace(kn,`\r
7
- `)})):{name:n,value:r.replace(kn,`\r
8
- `)}}).toArray()}const Nc=Object.freeze(Object.defineProperty({__proto__:null,serialize:_c,serializeArray:Ac},Symbol.toStringTag,{value:"Module"}));function Cc(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function Ic(e){const t={};for(const a in e){const i=e[a],n=Array.isArray(i),{selector:r,value:u}=Cc(n?i[0]:i),o=typeof u=="function"?u:typeof u=="string"?l=>this._make(l).prop(u):l=>this._make(l).extract(u);if(n)t[a]=this._findBySelector(r,Number.POSITIVE_INFINITY).map((l,f)=>o(f,a,t)).get();else{const l=this._findBySelector(r,1);t[a]=l.length>0?o(l[0],a,t):void 0}}return t}const Sc=Object.freeze(Object.defineProperty({__proto__:null,extract:Ic},Symbol.toStringTag,{value:"Module"}));class St{constructor(t,a,i){if(this.length=0,this.options=i,this._root=a,t){for(let n=0;n<t.length;n++)this[n]=t[n];this.length=t.length}}}St.prototype.cheerio="[cheerio object]",St.prototype.splice=Array.prototype.splice,St.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(St.prototype,Ru,Go,Ec,bc,Nc,Sc);function xc(e,t){return function a(i,n,r=!0){if(i==null)throw new Error("cheerio.load() expects a string");const u=Ua(n),o=e(i,u,r,null);class l extends St{_make(T,b){const N=f(T,b);return N.prevObject=this,N}_parse(T,b,N,S){return e(T,b,N,S)}_render(T){return t(T,this.options)}}function f(E,T,b=o,N){if(E&&Pe(E))return E;const S=Ua(N,u),y=typeof b=="string"?[e(b,S,!1,null)]:"length"in b?b:[b],P=Pe(y)?y:new l(y,null,S);if(P._root=P,!E)return new l(void 0,P,S);const X=typeof E=="string"&&Fa(E)?e(E,S,!1,null).children:Oc(E)?[E]:Array.isArray(E)?E:void 0,B=new l(X,P,S);if(X)return B;if(typeof E!="string")throw new TypeError("Unexpected type of selector");let q=E;const F=T?typeof T=="string"?Fa(T)?new l([e(T,S,!1,null)],P,S):(q=`${T} ${q}`,P):Pe(T)?T:new l(Array.isArray(T)?T:[T],P,S):P;return F?F.find(q):B}return Object.assign(f,bu,{load:a,_root:o,_options:u,fn:l.prototype,prototype:l.prototype}),f}}function Oc(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const Dc=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]),Z="�";var d;(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.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_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_Z=122]="LATIN_SMALL_Z"})(d||(d={}));const Ee={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function vn(e){return e>=55296&&e<=57343}function Lc(e){return e>=56320&&e<=57343}function Rc(e,t){return(e-55296)*1024+9216+t}function wn(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Bn(e){return e>=64976&&e<=65007||Dc.has(e)}var g;(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"})(g||(g={}));const yc=65536;class Mc{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=yc,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,a){const{line:i,col:n,offset:r}=this,u=n+a,o=r+a;return{code:t,startLine:i,endLine:i,startCol:u,endCol:u,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const a=this.html.charCodeAt(this.pos+1);if(Lc(a))return this.pos++,this._addGap(),Rc(t,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,d.EOF;return this._err(g.surrogateInInputStream),t}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(t,a){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=a}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,a){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(a)return this.html.startsWith(t,this.pos);for(let i=0;i<t.length;i++)if((this.html.charCodeAt(this.pos+i)|32)!==t.charCodeAt(i))return!1;return!0}peek(t){const a=this.pos+t;if(a>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,d.EOF;const i=this.html.charCodeAt(a);return i===d.CARRIAGE_RETURN?d.LINE_FEED:i}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,d.EOF;let t=this.html.charCodeAt(this.pos);return t===d.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,d.LINE_FEED):t===d.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,vn(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===d.LINE_FEED||t===d.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){wn(t)?this._err(g.controlCharacterInInputStream):Bn(t)&&this._err(g.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var W;(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"})(W||(W={}));function Un(e,t){for(let a=e.attrs.length-1;a>=0;a--)if(e.attrs[a].name===t)return e.attrs[a].value;return null}var A;(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/"})(A||(A={}));var Ke;(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"})(Ke||(Ke={}));var _e;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(_e||(_e={}));var p;(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.SEARCH="search",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"})(p||(p={}));var s;(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.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(s||(s={}));const Pc=new Map([[p.A,s.A],[p.ADDRESS,s.ADDRESS],[p.ANNOTATION_XML,s.ANNOTATION_XML],[p.APPLET,s.APPLET],[p.AREA,s.AREA],[p.ARTICLE,s.ARTICLE],[p.ASIDE,s.ASIDE],[p.B,s.B],[p.BASE,s.BASE],[p.BASEFONT,s.BASEFONT],[p.BGSOUND,s.BGSOUND],[p.BIG,s.BIG],[p.BLOCKQUOTE,s.BLOCKQUOTE],[p.BODY,s.BODY],[p.BR,s.BR],[p.BUTTON,s.BUTTON],[p.CAPTION,s.CAPTION],[p.CENTER,s.CENTER],[p.CODE,s.CODE],[p.COL,s.COL],[p.COLGROUP,s.COLGROUP],[p.DD,s.DD],[p.DESC,s.DESC],[p.DETAILS,s.DETAILS],[p.DIALOG,s.DIALOG],[p.DIR,s.DIR],[p.DIV,s.DIV],[p.DL,s.DL],[p.DT,s.DT],[p.EM,s.EM],[p.EMBED,s.EMBED],[p.FIELDSET,s.FIELDSET],[p.FIGCAPTION,s.FIGCAPTION],[p.FIGURE,s.FIGURE],[p.FONT,s.FONT],[p.FOOTER,s.FOOTER],[p.FOREIGN_OBJECT,s.FOREIGN_OBJECT],[p.FORM,s.FORM],[p.FRAME,s.FRAME],[p.FRAMESET,s.FRAMESET],[p.H1,s.H1],[p.H2,s.H2],[p.H3,s.H3],[p.H4,s.H4],[p.H5,s.H5],[p.H6,s.H6],[p.HEAD,s.HEAD],[p.HEADER,s.HEADER],[p.HGROUP,s.HGROUP],[p.HR,s.HR],[p.HTML,s.HTML],[p.I,s.I],[p.IMG,s.IMG],[p.IMAGE,s.IMAGE],[p.INPUT,s.INPUT],[p.IFRAME,s.IFRAME],[p.KEYGEN,s.KEYGEN],[p.LABEL,s.LABEL],[p.LI,s.LI],[p.LINK,s.LINK],[p.LISTING,s.LISTING],[p.MAIN,s.MAIN],[p.MALIGNMARK,s.MALIGNMARK],[p.MARQUEE,s.MARQUEE],[p.MATH,s.MATH],[p.MENU,s.MENU],[p.META,s.META],[p.MGLYPH,s.MGLYPH],[p.MI,s.MI],[p.MO,s.MO],[p.MN,s.MN],[p.MS,s.MS],[p.MTEXT,s.MTEXT],[p.NAV,s.NAV],[p.NOBR,s.NOBR],[p.NOFRAMES,s.NOFRAMES],[p.NOEMBED,s.NOEMBED],[p.NOSCRIPT,s.NOSCRIPT],[p.OBJECT,s.OBJECT],[p.OL,s.OL],[p.OPTGROUP,s.OPTGROUP],[p.OPTION,s.OPTION],[p.P,s.P],[p.PARAM,s.PARAM],[p.PLAINTEXT,s.PLAINTEXT],[p.PRE,s.PRE],[p.RB,s.RB],[p.RP,s.RP],[p.RT,s.RT],[p.RTC,s.RTC],[p.RUBY,s.RUBY],[p.S,s.S],[p.SCRIPT,s.SCRIPT],[p.SEARCH,s.SEARCH],[p.SECTION,s.SECTION],[p.SELECT,s.SELECT],[p.SOURCE,s.SOURCE],[p.SMALL,s.SMALL],[p.SPAN,s.SPAN],[p.STRIKE,s.STRIKE],[p.STRONG,s.STRONG],[p.STYLE,s.STYLE],[p.SUB,s.SUB],[p.SUMMARY,s.SUMMARY],[p.SUP,s.SUP],[p.TABLE,s.TABLE],[p.TBODY,s.TBODY],[p.TEMPLATE,s.TEMPLATE],[p.TEXTAREA,s.TEXTAREA],[p.TFOOT,s.TFOOT],[p.TD,s.TD],[p.TH,s.TH],[p.THEAD,s.THEAD],[p.TITLE,s.TITLE],[p.TR,s.TR],[p.TRACK,s.TRACK],[p.TT,s.TT],[p.U,s.U],[p.UL,s.UL],[p.SVG,s.SVG],[p.VAR,s.VAR],[p.WBR,s.WBR],[p.XMP,s.XMP]]);function ua(e){var t;return(t=Pc.get(e))!==null&&t!==void 0?t:s.UNKNOWN}const I=s,kc={[A.HTML]:new Set([I.ADDRESS,I.APPLET,I.AREA,I.ARTICLE,I.ASIDE,I.BASE,I.BASEFONT,I.BGSOUND,I.BLOCKQUOTE,I.BODY,I.BR,I.BUTTON,I.CAPTION,I.CENTER,I.COL,I.COLGROUP,I.DD,I.DETAILS,I.DIR,I.DIV,I.DL,I.DT,I.EMBED,I.FIELDSET,I.FIGCAPTION,I.FIGURE,I.FOOTER,I.FORM,I.FRAME,I.FRAMESET,I.H1,I.H2,I.H3,I.H4,I.H5,I.H6,I.HEAD,I.HEADER,I.HGROUP,I.HR,I.HTML,I.IFRAME,I.IMG,I.INPUT,I.LI,I.LINK,I.LISTING,I.MAIN,I.MARQUEE,I.MENU,I.META,I.NAV,I.NOEMBED,I.NOFRAMES,I.NOSCRIPT,I.OBJECT,I.OL,I.P,I.PARAM,I.PLAINTEXT,I.PRE,I.SCRIPT,I.SECTION,I.SELECT,I.SOURCE,I.STYLE,I.SUMMARY,I.TABLE,I.TBODY,I.TD,I.TEMPLATE,I.TEXTAREA,I.TFOOT,I.TH,I.THEAD,I.TITLE,I.TR,I.TRACK,I.UL,I.WBR,I.XMP]),[A.MATHML]:new Set([I.MI,I.MO,I.MN,I.MS,I.MTEXT,I.ANNOTATION_XML]),[A.SVG]:new Set([I.TITLE,I.FOREIGN_OBJECT,I.DESC]),[A.XLINK]:new Set,[A.XML]:new Set,[A.XMLNS]:new Set},si=new Set([I.H1,I.H2,I.H3,I.H4,I.H5,I.H6]),vc=new Set([p.STYLE,p.SCRIPT,p.XMP,p.IFRAME,p.NOEMBED,p.NOFRAMES,p.PLAINTEXT]);function wc(e,t){return vc.has(e)||t&&e===p.NOSCRIPT}var h;(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.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(h||(h={}));const me={DATA:h.DATA,RCDATA:h.RCDATA,RAWTEXT:h.RAWTEXT,SCRIPT_DATA:h.SCRIPT_DATA,PLAINTEXT:h.PLAINTEXT,CDATA_SECTION:h.CDATA_SECTION};function Bc(e){return e>=d.DIGIT_0&&e<=d.DIGIT_9}function xt(e){return e>=d.LATIN_CAPITAL_A&&e<=d.LATIN_CAPITAL_Z}function Uc(e){return e>=d.LATIN_SMALL_A&&e<=d.LATIN_SMALL_Z}function Ye(e){return Uc(e)||xt(e)}function Fn(e){return Ye(e)||Bc(e)}function oa(e){return e+32}function Hn(e){return e===d.SPACE||e===d.LINE_FEED||e===d.TABULATION||e===d.FORM_FEED}function Yn(e){return Hn(e)||e===d.SOLIDUS||e===d.GREATER_THAN_SIGN}function Fc(e){return e===d.NULL?g.nullCharacterReference:e>1114111?g.characterReferenceOutsideUnicodeRange:vn(e)?g.surrogateCharacterReference:Bn(e)?g.noncharacterCharacterReference:wn(e)||e===d.CARRIAGE_RETURN?g.controlCharacterReference:null}let Hc=class{constructor(t,a){this.options=t,this.handler=a,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=h.DATA,this.returnState=h.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Mc(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Pa(La,(i,n)=>{this.preprocessor.pos=this.entityStartPos+n-1,this._flushCodePointConsumedAsCharacterReference(i)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(g.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(g.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const n=Fc(i);n&&this._err(n,1)}}:void 0)}_err(t,a=0){var i,n;(n=(i=this.handler).onParseError)===null||n===void 0||n.call(i,this.preprocessor.getError(t,a))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,a,i){this.active=!0,this.preprocessor.write(t,a),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let a=0;a<t;a++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,a){return this.preprocessor.startsWith(t,a)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:W.START_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:W.END_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:W.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:W.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,a){this.currentCharacterToken={type:t,chars:a,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,a;const i=this.currentToken;if(Un(i,this.currentAttr.name)===null){if(i.attrs.push(this.currentAttr),i.location&&this.currentLocation){const n=(t=(a=i.location).attrs)!==null&&t!==void 0?t:a.attrs=Object.create(null);n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(g.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=ua(t.tagName),t.type===W.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(g.endTagWithAttributes),t.selfClosing&&this._err(g.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case W.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case W.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case W.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:W.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,a){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=a;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,a)}_emitCodePoint(t){const a=Hn(t)?W.WHITESPACE_CHARACTER:t===d.NULL?W.NULL_CHARACTER:W.CHARACTER;this._appendCharToCurrentCharacterToken(a,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(W.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=h.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ne.Attribute:Ne.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===h.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case h.DATA:{this._stateData(t);break}case h.RCDATA:{this._stateRcdata(t);break}case h.RAWTEXT:{this._stateRawtext(t);break}case h.SCRIPT_DATA:{this._stateScriptData(t);break}case h.PLAINTEXT:{this._statePlaintext(t);break}case h.TAG_OPEN:{this._stateTagOpen(t);break}case h.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case h.TAG_NAME:{this._stateTagName(t);break}case h.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case h.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case h.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case h.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case h.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case h.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case h.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case h.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case h.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case h.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case h.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case h.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case h.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case h.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case h.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case h.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case h.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case h.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case h.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case h.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case h.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case h.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case h.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case h.BOGUS_COMMENT:{this._stateBogusComment(t);break}case h.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case h.COMMENT_START:{this._stateCommentStart(t);break}case h.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case h.COMMENT:{this._stateComment(t);break}case h.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case h.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case h.COMMENT_END:{this._stateCommentEnd(t);break}case h.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case h.DOCTYPE:{this._stateDoctype(t);break}case h.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case h.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case h.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case h.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case h.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case h.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case h.CDATA_SECTION:{this._stateCdataSection(t);break}case h.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case h.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case h.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case h.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.TAG_OPEN;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitCodePoint(t);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case d.AMPERSAND:{this._startCharacterReference();break}case d.LESS_THAN_SIGN:{this.state=h.RCDATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(Z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.RAWTEXT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(Z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(Z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(Z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ye(t))this._createStartTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case d.EXCLAMATION_MARK:{this.state=h.MARKUP_DECLARATION_OPEN;break}case d.SOLIDUS:{this.state=h.END_TAG_OPEN;break}case d.QUESTION_MARK:{this._err(g.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t);break}case d.EOF:{this._err(g.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(g.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=h.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ye(t))this._createEndTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case d.GREATER_THAN_SIGN:{this._err(g.missingEndTagName),this.state=h.DATA;break}case d.EOF:{this._err(g.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(g.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this.state=h.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.tagName+=Z;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(xt(t)?oa(t):t)}}_stateRcdataLessThanSign(t){t===d.SOLIDUS?this.state=h.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ye(t)?(this.state=h.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=h.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const a=this.currentToken;switch(a.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=h.BEFORE_ATTRIBUTE_NAME,!1;case d.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=h.SELF_CLOSING_START_TAG,!1;case d.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=h.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===d.SOLIDUS?this.state=h.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ye(t)?(this.state=h.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case d.SOLIDUS:{this.state=h.SCRIPT_DATA_END_TAG_OPEN;break}case d.EXCLAMATION_MARK:{this.state=h.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=h.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ye(t)?(this.state=h.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===d.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===d.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(Z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(Z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(Z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===d.SOLIDUS?this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ye(t)?(this._emitChars("<"),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ye(t)?(this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ee.SCRIPT,!1)&&Yn(this.preprocessor.peek(Ee.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Ee.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(Z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===d.SOLIDUS?(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ee.SCRIPT,!1)&&Yn(this.preprocessor.peek(Ee.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Ee.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.SOLIDUS:case d.GREATER_THAN_SIGN:case d.EOF:{this.state=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._err(g.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=h.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=h.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:case d.SOLIDUS:case d.GREATER_THAN_SIGN:case d.EOF:{this._leaveAttrName(),this.state=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._leaveAttrName(),this.state=h.BEFORE_ATTRIBUTE_VALUE;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:{this._err(g.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.name+=Z;break}default:this.currentAttr.name+=String.fromCodePoint(xt(t)?oa(t):t)}}_stateAfterAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.SOLIDUS:{this.state=h.SELF_CLOSING_START_TAG;break}case d.EQUALS_SIGN:{this.state=h.BEFORE_ATTRIBUTE_VALUE;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=h.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{this.state=h.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this.state=h.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingAttributeValue),this.state=h.DATA,this.emitCurrentTagToken();break}default:this.state=h.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=Z;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case d.APOSTROPHE:{this.state=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=Z;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this._leaveAttrValue(),this.state=h.BEFORE_ATTRIBUTE_NAME;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=Z;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:case d.EQUALS_SIGN:case d.GRAVE_ACCENT:{this._err(g.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this._leaveAttrValue(),this.state=h.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this._leaveAttrValue(),this.state=h.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.missingWhitespaceBetweenAttributes),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case d.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.unexpectedSolidusInTag),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=Z;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ee.DASH_DASH,!0)?(this._createCommentToken(Ee.DASH_DASH.length+1),this.state=h.COMMENT_START):this._consumeSequenceIfMatch(Ee.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ee.DOCTYPE.length+1),this.state=h.DOCTYPE):this._consumeSequenceIfMatch(Ee.CDATA_START,!0)?this.inForeignNode?this.state=h.CDATA_SECTION:(this._err(g.cdataInHtmlContent),this._createCommentToken(Ee.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=h.BOGUS_COMMENT):this._ensureHibernation()||(this._err(g.incorrectlyOpenedComment),this._createCommentToken(2),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_START_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=h.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END_DASH;break}case d.LESS_THAN_SIGN:{a.data+="<",this.state=h.COMMENT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=Z;break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const a=this.currentToken;switch(t){case d.EXCLAMATION_MARK:{a.data+="!",this.state=h.COMMENT_LESS_THAN_SIGN_BANG;break}case d.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===d.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=h.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===d.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=h.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==d.GREATER_THAN_SIGN&&t!==d.EOF&&this._err(g.nestedComment),this.state=h.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(a);break}case d.EXCLAMATION_MARK:{this.state=h.COMMENT_END_BANG;break}case d.HYPHEN_MINUS:{a.data+="-";break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--",this.state=h.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{a.data+="--!",this.state=h.COMMENT_END_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.incorrectlyClosedComment),this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=h.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=h.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case d.EOF:{this._err(g.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingWhitespaceBeforeDoctypeName),this.state=h.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(xt(t))this._createDoctypeToken(String.fromCharCode(oa(t))),this.state=h.DOCTYPE_NAME;else switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.NULL:{this._err(g.unexpectedNullCharacter),this._createDoctypeToken(Z),this.state=h.DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeName),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(g.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=h.DOCTYPE_NAME}}_stateDoctypeName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.AFTER_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.name+=Z;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(xt(t)?oa(t):t)}}_stateAfterDoctypeName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ee.PUBLIC,!1)?this.state=h.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ee.SYSTEM,!1)?this.state=h.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(g.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=Z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case d.APOSTROPHE:{this.state=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=Z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.QUOTATION_MARK:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=Z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case d.APOSTROPHE:{this.state=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=Z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.NULL:{this._err(g.unexpectedNullCharacter);break}case d.EOF:{this.emitCurrentDoctype(a),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case d.RIGHT_SQUARE_BRACKET:{this.state=h.CDATA_SECTION_BRACKET;break}case d.EOF:{this._err(g.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===d.RIGHT_SQUARE_BRACKET?this.state=h.CDATA_SECTION_END:(this._emitChars("]"),this.state=h.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA;break}case d.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=h.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(d.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Fn(this.preprocessor.peek(1))?h.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Fn(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===d.SEMICOLON&&this._err(g.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const Vn=new Set([s.DD,s.DT,s.LI,s.OPTGROUP,s.OPTION,s.P,s.RB,s.RP,s.RT,s.RTC]),qn=new Set([...Vn,s.CAPTION,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]),ca=new Set([s.APPLET,s.CAPTION,s.HTML,s.MARQUEE,s.OBJECT,s.TABLE,s.TD,s.TEMPLATE,s.TH]),Yc=new Set([...ca,s.OL,s.UL]),Vc=new Set([...ca,s.BUTTON]),Wn=new Set([s.ANNOTATION_XML,s.MI,s.MN,s.MO,s.MS,s.MTEXT]),Xn=new Set([s.DESC,s.FOREIGN_OBJECT,s.TITLE]),qc=new Set([s.TR,s.TEMPLATE,s.HTML]),Wc=new Set([s.TBODY,s.TFOOT,s.THEAD,s.TEMPLATE,s.HTML]),Xc=new Set([s.TABLE,s.TEMPLATE,s.HTML]),Gc=new Set([s.TD,s.TH]);class $c{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,a,i){this.treeAdapter=a,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=s.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===s.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===A.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,a){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=a,this.currentTagId=a,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,a,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,a){const i=this._indexOf(t);this.items[i]=a,i===this.stackTop&&(this.current=a)}insertAfter(t,a,i){const n=this._indexOf(t)+1;this.items.splice(n,0,a),this.tagIDs.splice(n,0,i),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(t){let a=this.stackTop+1;do a=this.tagIDs.lastIndexOf(t,a-1);while(a>0&&this.treeAdapter.getNamespaceURI(this.items[a])!==A.HTML);this.shortenToLength(a<0?0:a)}shortenToLength(t){for(;this.stackTop>=t;){const a=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(a,this.stackTop<t)}}popUntilElementPopped(t){const a=this._indexOf(t);this.shortenToLength(a<0?0:a)}popUntilPopped(t,a){const i=this._indexOfTagNames(t,a);this.shortenToLength(i<0?0:i)}popUntilNumberedHeaderPopped(){this.popUntilPopped(si,A.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Gc,A.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,a){for(let i=this.stackTop;i>=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===a)return i;return-1}clearBackTo(t,a){const i=this._indexOfTagNames(t,a);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(Xc,A.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Wc,A.HTML)}clearBackToTableRowContext(){this.clearBackTo(qc,A.HTML)}remove(t){const a=this._indexOf(t);a>=0&&(a===this.stackTop?this.pop():(this.items.splice(a,1),this.tagIDs.splice(a,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===s.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const a=this._indexOf(t)-1;return a>=0?this.items[a]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===s.HTML}hasInDynamicScope(t,a){for(let i=this.stackTop;i>=0;i--){const n=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case A.HTML:{if(n===t)return!0;if(a.has(n))return!1;break}case A.SVG:{if(Xn.has(n))return!1;break}case A.MATHML:{if(Wn.has(n))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ca)}hasInListItemScope(t){return this.hasInDynamicScope(t,Yc)}hasInButtonScope(t){return this.hasInDynamicScope(t,Vc)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case A.HTML:{if(si.has(a))return!0;if(ca.has(a))return!1;break}case A.SVG:{if(Xn.has(a))return!1;break}case A.MATHML:{if(Wn.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===A.HTML)switch(this.tagIDs[a]){case t:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===A.HTML)switch(this.tagIDs[t]){case s.TBODY:case s.THEAD:case s.TFOOT:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasInSelectScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===A.HTML)switch(this.tagIDs[a]){case t:return!0;case s.OPTION:case s.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;Vn.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;qn.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&qn.has(this.currentTagId);)this.pop()}}const ri=3;var Le;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Le||(Le={}));const Gn={type:Le.Marker};class Qc{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,a){const i=[],n=a.length,r=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===Le.Marker)break;const{element:f}=l;if(this.treeAdapter.getTagName(f)===r&&this.treeAdapter.getNamespaceURI(f)===u){const E=this.treeAdapter.getAttrList(f);E.length===n&&i.push({idx:o,attrs:E})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<ri)return;const a=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,a);if(i.length<ri)return;const n=new Map(a.map(u=>[u.name,u.value]));let r=0;for(let u=0;u<i.length;u++){const o=i[u];o.attrs.every(l=>n.get(l.name)===l.value)&&(r+=1,r>=ri&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Gn)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:Le.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:Le.Element,element:t,token:a})}removeEntry(t){const a=this.entries.indexOf(t);a>=0&&this.entries.splice(a,1)}clearToLastMarker(){const t=this.entries.indexOf(Gn);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const a=this.entries.find(i=>i.type===Le.Marker||this.treeAdapter.getTagName(i.element)===t);return a&&a.type===Le.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===Le.Element&&a.element===t)}}const ke={createDocument(){return{nodeName:"#document",mode:_e.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,a){return{nodeName:e,tagName:e,attrs:a,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,a){const i=e.childNodes.indexOf(a);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,a,i){const n=e.childNodes.find(r=>r.nodeName==="#documentType");if(n)n.name=t,n.publicId=a,n.systemId=i;else{const r={nodeName:"#documentType",name:t,publicId:a,systemId:i,parentNode:null};ke.appendChild(e,r)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const a=e.childNodes[e.childNodes.length-1];if(ke.isTextNode(a)){a.value+=t;return}}ke.appendChild(e,ke.createTextNode(t))},insertTextBefore(e,t,a){const i=e.childNodes[e.childNodes.indexOf(a)-1];i&&ke.isTextNode(i)?i.value+=t:ke.insertBefore(e,ke.createTextNode(t),a)},adoptAttributes(e,t){const a=new Set(e.attrs.map(i=>i.name));for(let i=0;i<t.length;i++)a.has(t[i].name)||e.attrs.push(t[i])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},$n="html",jc="about:legacy-compat",zc="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Qn=["+//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//"],Kc=[...Qn,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Zc=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),jn=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Jc=[...jn,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function zn(e,t){return t.some(a=>e.startsWith(a))}function el(e){return e.name===$n&&e.publicId===null&&(e.systemId===null||e.systemId===jc)}function tl(e){if(e.name!==$n)return _e.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===zc)return _e.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),Zc.has(a))return _e.QUIRKS;let i=t===null?Kc:Qn;if(zn(a,i))return _e.QUIRKS;if(i=t===null?jn:Jc,zn(a,i))return _e.LIMITED_QUIRKS}return _e.NO_QUIRKS}const Kn={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},al="definitionurl",il="definitionURL",nl=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])),sl=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:A.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:A.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:A.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:A.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:A.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:A.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:A.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:A.XML}],["xml:space",{prefix:"xml",name:"space",namespace:A.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:A.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:A.XMLNS}]]),rl=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])),ul=new Set([s.B,s.BIG,s.BLOCKQUOTE,s.BODY,s.BR,s.CENTER,s.CODE,s.DD,s.DIV,s.DL,s.DT,s.EM,s.EMBED,s.H1,s.H2,s.H3,s.H4,s.H5,s.H6,s.HEAD,s.HR,s.I,s.IMG,s.LI,s.LISTING,s.MENU,s.META,s.NOBR,s.OL,s.P,s.PRE,s.RUBY,s.S,s.SMALL,s.SPAN,s.STRONG,s.STRIKE,s.SUB,s.SUP,s.TABLE,s.TT,s.U,s.UL,s.VAR]);function ol(e){const t=e.tagID;return t===s.FONT&&e.attrs.some(({name:i})=>i===Ke.COLOR||i===Ke.SIZE||i===Ke.FACE)||ul.has(t)}function Zn(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===al){e.attrs[t].name=il;break}}function Jn(e){for(let t=0;t<e.attrs.length;t++){const a=nl.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function ui(e){for(let t=0;t<e.attrs.length;t++){const a=sl.get(e.attrs[t].name);a&&(e.attrs[t].prefix=a.prefix,e.attrs[t].name=a.name,e.attrs[t].namespace=a.namespace)}}function cl(e){const t=rl.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ua(e.tagName))}function ll(e,t){return t===A.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}function dl(e,t,a){if(t===A.MATHML&&e===s.ANNOTATION_XML){for(let i=0;i<a.length;i++)if(a[i].name===Ke.ENCODING){const n=a[i].value.toLowerCase();return n===Kn.TEXT_HTML||n===Kn.APPLICATION_XML}}return t===A.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}function hl(e,t,a,i){return(!i||i===A.HTML)&&dl(e,t,a)||(!i||i===A.MATHML)&&ll(e,t)}const fl="hidden",El=8,ml=3;var m;(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"})(m||(m={}));const Tl={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},es=new Set([s.TABLE,s.TBODY,s.TFOOT,s.THEAD,s.TR]),ts={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ke,onParseError:null};let as=class{constructor(t,a,i=null,n=null){this.fragmentContext=i,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=m.INITIAL,this.originalInsertionMode=m.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={...ts,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=a??this.treeAdapter.createDocument(),this.tokenizer=new Hc(this.options,this),this.activeFormattingElements=new Qc(this.treeAdapter),this.fragmentContextID=i?ua(this.treeAdapter.getTagName(i)):s.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new $c(this.document,this.treeAdapter,this)}static parse(t,a){const i=new this(a);return i.tokenizer.write(t,!0),i.document}static getFragmentParser(t,a){const i={...ts,...a};t??(t=i.treeAdapter.createElement(p.TEMPLATE,A.HTML,[]));const n=i.treeAdapter.createElement("documentmock",A.HTML,[]),r=new this(i,n,t);return r.fragmentContextID===s.TEMPLATE&&r.tmplInsertionModeStack.unshift(m.IN_TEMPLATE),r._initTokenizerForFragmentParsing(),r._insertFakeRootElement(),r._resetInsertionMode(),r._findFormInFragmentContext(),r}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),a=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,a),a}_err(t,a,i){var n;if(!this.onParseError)return;const r=(n=t.location)!==null&&n!==void 0?n:Tl,u={code:a,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:i?r.startLine:r.endLine,endCol:i?r.startCol:r.endCol,endOffset:i?r.startOffset:r.endOffset};this.onParseError(u)}onItemPush(t,a,i){var n,r;(r=(n=this.treeAdapter).onItemPush)===null||r===void 0||r.call(n,t),i&&this.openElements.stackTop>0&&this._setContextModes(t,a)}onItemPop(t,a){var i,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(n=(i=this.treeAdapter).onItemPop)===null||n===void 0||n.call(i,t,this.openElements.current),a){let r,u;this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,u=this.fragmentContextID):{current:r,currentTagId:u}=this.openElements,this._setContextModes(r,u)}}_setContextModes(t,a){const i=t===this.document||this.treeAdapter.getNamespaceURI(t)===A.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,A.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=m.TEXT}switchToPlaintextParsing(){this.insertionMode=m.TEXT,this.originalInsertionMode=m.IN_BODY,this.tokenizer.state=me.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===p.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==A.HTML))switch(this.fragmentContextID){case s.TITLE:case s.TEXTAREA:{this.tokenizer.state=me.RCDATA;break}case s.STYLE:case s.XMP:case s.IFRAME:case s.NOEMBED:case s.NOFRAMES:case s.NOSCRIPT:{this.tokenizer.state=me.RAWTEXT;break}case s.SCRIPT:{this.tokenizer.state=me.SCRIPT_DATA;break}case s.PLAINTEXT:{this.tokenizer.state=me.PLAINTEXT;break}}}_setDocumentType(t){const a=t.name||"",i=t.publicId||"",n=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,a,i,n),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,a){if(this.options.sourceCodeLocationInfo){const i=a&&{...a,startTag:a};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i,t)}}_appendElement(t,a){const i=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,a){const i=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,a){const i=this.treeAdapter.createElement(t,A.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,A.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(a,i),this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(p.HTML,A.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,s.HTML)}_appendCommentNode(t,a){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(a,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let a,i;if(this._shouldFosterParentOnInsertion()?({parent:a,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(a,t.chars,i):this.treeAdapter.insertText(a,t.chars)):(a=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(a,t.chars)),!t.location)return;const n=this.treeAdapter.getChildNodes(a),r=i?n.lastIndexOf(i):n.length,u=n[r-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:l,endCol:f,endOffset:E}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:l,endCol:f,endOffset:E})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,a){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(a,i)}_setEndLocation(t,a){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&a.location){const i=a.location,n=this.treeAdapter.getTagName(t),r=a.type===W.END_TAG&&n===a.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,r)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let a,i;return this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,i=this.fragmentContextID):{current:a,currentTagId:i}=this.openElements,t.tagID===s.SVG&&this.treeAdapter.getTagName(a)===p.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===A.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===s.MGLYPH||t.tagID===s.MALIGNMARK)&&!this._isIntegrationPoint(i,a,A.HTML)}_processToken(t){switch(t.type){case W.CHARACTER:{this.onCharacter(t);break}case W.NULL_CHARACTER:{this.onNullCharacter(t);break}case W.COMMENT:{this.onComment(t);break}case W.DOCTYPE:{this.onDoctype(t);break}case W.START_TAG:{this._processStartTag(t);break}case W.END_TAG:{this.onEndTag(t);break}case W.EOF:{this.onEof(t);break}case W.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,i){const n=this.treeAdapter.getNamespaceURI(a),r=this.treeAdapter.getAttrList(a);return hl(t,n,r,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(n=>n.type===Le.Marker||this.openElements.contains(n.element)),i=a<0?t-1:a-1;for(let n=i;n>=0;n--){const r=this.activeFormattingElements.entries[n];this._insertElement(r.token,this.treeAdapter.getNamespaceURI(r.element)),r.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=m.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(s.P),this.openElements.popUntilTagNamePopped(s.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case s.TR:{this.insertionMode=m.IN_ROW;return}case s.TBODY:case s.THEAD:case s.TFOOT:{this.insertionMode=m.IN_TABLE_BODY;return}case s.CAPTION:{this.insertionMode=m.IN_CAPTION;return}case s.COLGROUP:{this.insertionMode=m.IN_COLUMN_GROUP;return}case s.TABLE:{this.insertionMode=m.IN_TABLE;return}case s.BODY:{this.insertionMode=m.IN_BODY;return}case s.FRAMESET:{this.insertionMode=m.IN_FRAMESET;return}case s.SELECT:{this._resetInsertionModeForSelect(t);return}case s.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case s.HTML:{this.insertionMode=this.headElement?m.AFTER_HEAD:m.BEFORE_HEAD;return}case s.TD:case s.TH:{if(t>0){this.insertionMode=m.IN_CELL;return}break}case s.HEAD:{if(t>0){this.insertionMode=m.IN_HEAD;return}break}}this.insertionMode=m.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let a=t-1;a>0;a--){const i=this.openElements.tagIDs[a];if(i===s.TEMPLATE)break;if(i===s.TABLE){this.insertionMode=m.IN_SELECT_IN_TABLE;return}}this.insertionMode=m.IN_SELECT}_isElementCausesFosterParenting(t){return es.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const a=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case s.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(a)===A.HTML)return{parent:this.treeAdapter.getTemplateContent(a),beforeElement:null};break}case s.TABLE:{const i=this.treeAdapter.getParentNode(a);return i?{parent:i,beforeElement:a}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const a=this._findFosterParentingLocation();a.beforeElement?this.treeAdapter.insertBefore(a.parent,t,a.beforeElement):this.treeAdapter.appendChild(a.parent,t)}_isSpecialElement(t,a){const i=this.treeAdapter.getNamespaceURI(t);return kc[i].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){G0(this,t);return}switch(this.insertionMode){case m.INITIAL:{Ot(this,t);break}case m.BEFORE_HTML:{Dt(this,t);break}case m.BEFORE_HEAD:{Lt(this,t);break}case m.IN_HEAD:{Rt(this,t);break}case m.IN_HEAD_NO_SCRIPT:{yt(this,t);break}case m.AFTER_HEAD:{Mt(this,t);break}case m.IN_BODY:case m.IN_CAPTION:case m.IN_CELL:case m.IN_TEMPLATE:{ns(this,t);break}case m.TEXT:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case m.IN_TABLE:case m.IN_TABLE_BODY:case m.IN_ROW:{di(this,t);break}case m.IN_TABLE_TEXT:{hs(this,t);break}case m.IN_COLUMN_GROUP:{ha(this,t);break}case m.AFTER_BODY:{ma(this,t);break}case m.AFTER_AFTER_BODY:{Ta(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){X0(this,t);return}switch(this.insertionMode){case m.INITIAL:{Ot(this,t);break}case m.BEFORE_HTML:{Dt(this,t);break}case m.BEFORE_HEAD:{Lt(this,t);break}case m.IN_HEAD:{Rt(this,t);break}case m.IN_HEAD_NO_SCRIPT:{yt(this,t);break}case m.AFTER_HEAD:{Mt(this,t);break}case m.TEXT:{this._insertCharacters(t);break}case m.IN_TABLE:case m.IN_TABLE_BODY:case m.IN_ROW:{di(this,t);break}case m.IN_COLUMN_GROUP:{ha(this,t);break}case m.AFTER_BODY:{ma(this,t);break}case m.AFTER_AFTER_BODY:{Ta(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ci(this,t);return}switch(this.insertionMode){case m.INITIAL:case m.BEFORE_HTML:case m.BEFORE_HEAD:case m.IN_HEAD:case m.IN_HEAD_NO_SCRIPT:case m.AFTER_HEAD:case m.IN_BODY:case m.IN_TABLE:case m.IN_CAPTION:case m.IN_COLUMN_GROUP:case m.IN_TABLE_BODY:case m.IN_ROW:case m.IN_CELL:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:case m.IN_TEMPLATE:case m.IN_FRAMESET:case m.AFTER_FRAMESET:{ci(this,t);break}case m.IN_TABLE_TEXT:{vt(this,t);break}case m.AFTER_BODY:{Cl(this,t);break}case m.AFTER_AFTER_BODY:case m.AFTER_AFTER_FRAMESET:{Il(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case m.INITIAL:{Sl(this,t);break}case m.BEFORE_HEAD:case m.IN_HEAD:case m.IN_HEAD_NO_SCRIPT:case m.AFTER_HEAD:{this._err(t,g.misplacedDoctype);break}case m.IN_TABLE_TEXT:{vt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,g.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?$0(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case m.INITIAL:{Ot(this,t);break}case m.BEFORE_HTML:{xl(this,t);break}case m.BEFORE_HEAD:{Dl(this,t);break}case m.IN_HEAD:{Se(this,t);break}case m.IN_HEAD_NO_SCRIPT:{yl(this,t);break}case m.AFTER_HEAD:{Pl(this,t);break}case m.IN_BODY:{le(this,t);break}case m.IN_TABLE:{ct(this,t);break}case m.IN_TABLE_TEXT:{vt(this,t);break}case m.IN_CAPTION:{L0(this,t);break}case m.IN_COLUMN_GROUP:{hi(this,t);break}case m.IN_TABLE_BODY:{fa(this,t);break}case m.IN_ROW:{Ea(this,t);break}case m.IN_CELL:{M0(this,t);break}case m.IN_SELECT:{ms(this,t);break}case m.IN_SELECT_IN_TABLE:{k0(this,t);break}case m.IN_TEMPLATE:{w0(this,t);break}case m.AFTER_BODY:{U0(this,t);break}case m.IN_FRAMESET:{F0(this,t);break}case m.AFTER_FRAMESET:{Y0(this,t);break}case m.AFTER_AFTER_BODY:{q0(this,t);break}case m.AFTER_AFTER_FRAMESET:{W0(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Q0(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case m.INITIAL:{Ot(this,t);break}case m.BEFORE_HTML:{Ol(this,t);break}case m.BEFORE_HEAD:{Ll(this,t);break}case m.IN_HEAD:{Rl(this,t);break}case m.IN_HEAD_NO_SCRIPT:{Ml(this,t);break}case m.AFTER_HEAD:{kl(this,t);break}case m.IN_BODY:{da(this,t);break}case m.TEXT:{g0(this,t);break}case m.IN_TABLE:{Pt(this,t);break}case m.IN_TABLE_TEXT:{vt(this,t);break}case m.IN_CAPTION:{R0(this,t);break}case m.IN_COLUMN_GROUP:{y0(this,t);break}case m.IN_TABLE_BODY:{fi(this,t);break}case m.IN_ROW:{Es(this,t);break}case m.IN_CELL:{P0(this,t);break}case m.IN_SELECT:{Ts(this,t);break}case m.IN_SELECT_IN_TABLE:{v0(this,t);break}case m.IN_TEMPLATE:{B0(this,t);break}case m.AFTER_BODY:{bs(this,t);break}case m.IN_FRAMESET:{H0(this,t);break}case m.AFTER_FRAMESET:{V0(this,t);break}case m.AFTER_AFTER_BODY:{Ta(this,t);break}}}onEof(t){switch(this.insertionMode){case m.INITIAL:{Ot(this,t);break}case m.BEFORE_HTML:{Dt(this,t);break}case m.BEFORE_HEAD:{Lt(this,t);break}case m.IN_HEAD:{Rt(this,t);break}case m.IN_HEAD_NO_SCRIPT:{yt(this,t);break}case m.AFTER_HEAD:{Mt(this,t);break}case m.IN_BODY:case m.IN_TABLE:case m.IN_CAPTION:case m.IN_COLUMN_GROUP:case m.IN_TABLE_BODY:case m.IN_ROW:case m.IN_CELL:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:{ls(this,t);break}case m.TEXT:{_0(this,t);break}case m.IN_TABLE_TEXT:{vt(this,t);break}case m.IN_TEMPLATE:{ps(this,t);break}case m.AFTER_BODY:case m.IN_FRAMESET:case m.AFTER_FRAMESET:case m.AFTER_AFTER_BODY:case m.AFTER_AFTER_FRAMESET:{li(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===d.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case m.IN_HEAD:case m.IN_HEAD_NO_SCRIPT:case m.AFTER_HEAD:case m.TEXT:case m.IN_COLUMN_GROUP:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:case m.IN_FRAMESET:case m.AFTER_FRAMESET:{this._insertCharacters(t);break}case m.IN_BODY:case m.IN_CAPTION:case m.IN_CELL:case m.IN_TEMPLATE:case m.AFTER_BODY:case m.AFTER_AFTER_BODY:case m.AFTER_AFTER_FRAMESET:{is(this,t);break}case m.IN_TABLE:case m.IN_TABLE_BODY:case m.IN_ROW:{di(this,t);break}case m.IN_TABLE_TEXT:{ds(this,t);break}}}};function pl(e,t){let a=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return a?e.openElements.contains(a.element)?e.openElements.hasInScope(t.tagID)||(a=null):(e.activeFormattingElements.removeEntry(a),a=null):cs(e,t),a}function bl(e,t){let a=null,i=e.openElements.stackTop;for(;i>=0;i--){const n=e.openElements.items[i];if(n===t.element)break;e._isSpecialElement(n,e.openElements.tagIDs[i])&&(a=n)}return a||(e.openElements.shortenToLength(i<0?0:i),e.activeFormattingElements.removeEntry(t)),a}function gl(e,t,a){let i=t,n=e.openElements.getCommonAncestor(t);for(let r=0,u=n;u!==a;r++,u=n){n=e.openElements.getCommonAncestor(u);const o=e.activeFormattingElements.getElementEntry(u),l=o&&r>=ml;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(u)):(u=_l(e,o),i===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(u,i),i=u)}return i}function _l(e,t){const a=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,a,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function Al(e,t,a){const i=e.treeAdapter.getTagName(t),n=ua(i);if(e._isElementCausesFosterParenting(n))e._fosterParentElement(a);else{const r=e.treeAdapter.getNamespaceURI(t);n===s.TEMPLATE&&r===A.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function Nl(e,t,a){const i=e.treeAdapter.getNamespaceURI(a.element),{token:n}=a,r=e.treeAdapter.createElement(n.tagName,i,n.attrs);e._adoptNodes(t,r),e.treeAdapter.appendChild(t,r),e.activeFormattingElements.insertElementAfterBookmark(r,n),e.activeFormattingElements.removeEntry(a),e.openElements.remove(a.element),e.openElements.insertAfter(t,r,n.tagID)}function oi(e,t){for(let a=0;a<El;a++){const i=pl(e,t);if(!i)break;const n=bl(e,i);if(!n)break;e.activeFormattingElements.bookmark=i;const r=gl(e,n,i.element),u=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(r),u&&Al(e,u,r),Nl(e,n,i)}}function ci(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Cl(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Il(e,t){e._appendCommentNode(t,e.document)}function li(e,t){if(e.stopped=!0,t.location){const a=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=a;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],n=e.treeAdapter.getNodeSourceCodeLocation(i);if(n&&!n.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const r=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(r);u&&!u.endTag&&e._setEndLocation(r,t)}}}}function Sl(e,t){e._setDocumentType(t);const a=t.forceQuirks?_e.QUIRKS:tl(t);el(t)||e._err(t,g.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=m.BEFORE_HTML}function Ot(e,t){e._err(t,g.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,_e.QUIRKS),e.insertionMode=m.BEFORE_HTML,e._processToken(t)}function xl(e,t){t.tagID===s.HTML?(e._insertElement(t,A.HTML),e.insertionMode=m.BEFORE_HEAD):Dt(e,t)}function Ol(e,t){const a=t.tagID;(a===s.HTML||a===s.HEAD||a===s.BODY||a===s.BR)&&Dt(e,t)}function Dt(e,t){e._insertFakeRootElement(),e.insertionMode=m.BEFORE_HEAD,e._processToken(t)}function Dl(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.HEAD:{e._insertElement(t,A.HTML),e.headElement=e.openElements.current,e.insertionMode=m.IN_HEAD;break}default:Lt(e,t)}}function Ll(e,t){const a=t.tagID;a===s.HEAD||a===s.BODY||a===s.HTML||a===s.BR?Lt(e,t):e._err(t,g.endTagWithoutMatchingOpenElement)}function Lt(e,t){e._insertFakeElement(p.HEAD,s.HEAD),e.headElement=e.openElements.current,e.insertionMode=m.IN_HEAD,e._processToken(t)}function Se(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.TITLE:{e._switchToTextParsing(t,me.RCDATA);break}case s.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,me.RAWTEXT):(e._insertElement(t,A.HTML),e.insertionMode=m.IN_HEAD_NO_SCRIPT);break}case s.NOFRAMES:case s.STYLE:{e._switchToTextParsing(t,me.RAWTEXT);break}case s.SCRIPT:{e._switchToTextParsing(t,me.SCRIPT_DATA);break}case s.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=m.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(m.IN_TEMPLATE);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:Rt(e,t)}}function Rl(e,t){switch(t.tagID){case s.HEAD:{e.openElements.pop(),e.insertionMode=m.AFTER_HEAD;break}case s.BODY:case s.BR:case s.HTML:{Rt(e,t);break}case s.TEMPLATE:{Ze(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function Ze(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==s.TEMPLATE&&e._err(t,g.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,g.endTagWithoutMatchingOpenElement)}function Rt(e,t){e.openElements.pop(),e.insertionMode=m.AFTER_HEAD,e._processToken(t)}function yl(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.BASEFONT:case s.BGSOUND:case s.HEAD:case s.LINK:case s.META:case s.NOFRAMES:case s.STYLE:{Se(e,t);break}case s.NOSCRIPT:{e._err(t,g.nestedNoscriptInHead);break}default:yt(e,t)}}function Ml(e,t){switch(t.tagID){case s.NOSCRIPT:{e.openElements.pop(),e.insertionMode=m.IN_HEAD;break}case s.BR:{yt(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function yt(e,t){const a=t.type===W.EOF?g.openElementsLeftAfterEof:g.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=m.IN_HEAD,e._processToken(t)}function Pl(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.BODY:{e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=m.IN_BODY;break}case s.FRAMESET:{e._insertElement(t,A.HTML),e.insertionMode=m.IN_FRAMESET;break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{e._err(t,g.abandonedHeadElementChild),e.openElements.push(e.headElement,s.HEAD),Se(e,t),e.openElements.remove(e.headElement);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:Mt(e,t)}}function kl(e,t){switch(t.tagID){case s.BODY:case s.HTML:case s.BR:{Mt(e,t);break}case s.TEMPLATE:{Ze(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function Mt(e,t){e._insertFakeElement(p.BODY,s.BODY),e.insertionMode=m.IN_BODY,la(e,t)}function la(e,t){switch(t.type){case W.CHARACTER:{ns(e,t);break}case W.WHITESPACE_CHARACTER:{is(e,t);break}case W.COMMENT:{ci(e,t);break}case W.START_TAG:{le(e,t);break}case W.END_TAG:{da(e,t);break}case W.EOF:{ls(e,t);break}}}function is(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ns(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function vl(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function wl(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function Bl(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,A.HTML),e.insertionMode=m.IN_FRAMESET)}function Ul(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML)}function Fl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),si.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,A.HTML)}function Hl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Yl(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),a||(e.formElement=e.openElements.current))}function Vl(e,t){e.framesetOk=!1;const a=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const n=e.openElements.tagIDs[i];if(a===s.LI&&n===s.LI||(a===s.DD||a===s.DT)&&(n===s.DD||n===s.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==s.ADDRESS&&n!==s.DIV&&n!==s.P&&e._isSpecialElement(e.openElements.items[i],n))break}e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML)}function ql(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.tokenizer.state=me.PLAINTEXT}function Wl(e,t){e.openElements.hasInScope(s.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.framesetOk=!1}function Xl(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(p.A);a&&(oi(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Gl(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $l(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(s.NOBR)&&(oi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ql(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function jl(e,t){e.treeAdapter.getDocumentMode(e.document)!==_e.QUIRKS&&e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=m.IN_TABLE}function ss(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,A.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function rs(e){const t=Un(e,Ke.TYPE);return t!=null&&t.toLowerCase()===fl}function zl(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,A.HTML),rs(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Kl(e,t){e._appendElement(t,A.HTML),t.ackSelfClosing=!0}function Zl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._appendElement(t,A.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Jl(e,t){t.tagName=p.IMG,t.tagID=s.IMG,ss(e,t)}function e0(e,t){e._insertElement(t,A.HTML),e.skipNextNewLine=!0,e.tokenizer.state=me.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=m.TEXT}function t0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,me.RAWTEXT)}function a0(e,t){e.framesetOk=!1,e._switchToTextParsing(t,me.RAWTEXT)}function us(e,t){e._switchToTextParsing(t,me.RAWTEXT)}function i0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===m.IN_TABLE||e.insertionMode===m.IN_CAPTION||e.insertionMode===m.IN_TABLE_BODY||e.insertionMode===m.IN_ROW||e.insertionMode===m.IN_CELL?m.IN_SELECT_IN_TABLE:m.IN_SELECT}function n0(e,t){e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML)}function s0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,A.HTML)}function r0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(s.RTC),e._insertElement(t,A.HTML)}function u0(e,t){e._reconstructActiveFormattingElements(),Zn(t),ui(t),t.selfClosing?e._appendElement(t,A.MATHML):e._insertElement(t,A.MATHML),t.ackSelfClosing=!0}function o0(e,t){e._reconstructActiveFormattingElements(),Jn(t),ui(t),t.selfClosing?e._appendElement(t,A.SVG):e._insertElement(t,A.SVG),t.ackSelfClosing=!0}function os(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML)}function le(e,t){switch(t.tagID){case s.I:case s.S:case s.B:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.SMALL:case s.STRIKE:case s.STRONG:{Gl(e,t);break}case s.A:{Xl(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{Fl(e,t);break}case s.P:case s.DL:case s.OL:case s.UL:case s.DIV:case s.DIR:case s.NAV:case s.MAIN:case s.MENU:case s.ASIDE:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.DETAILS:case s.ADDRESS:case s.ARTICLE:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{Ul(e,t);break}case s.LI:case s.DD:case s.DT:{Vl(e,t);break}case s.BR:case s.IMG:case s.WBR:case s.AREA:case s.EMBED:case s.KEYGEN:{ss(e,t);break}case s.HR:{Zl(e,t);break}case s.RB:case s.RTC:{s0(e,t);break}case s.RT:case s.RP:{r0(e,t);break}case s.PRE:case s.LISTING:{Hl(e,t);break}case s.XMP:{t0(e,t);break}case s.SVG:{o0(e,t);break}case s.HTML:{vl(e,t);break}case s.BASE:case s.LINK:case s.META:case s.STYLE:case s.TITLE:case s.SCRIPT:case s.BGSOUND:case s.BASEFONT:case s.TEMPLATE:{Se(e,t);break}case s.BODY:{wl(e,t);break}case s.FORM:{Yl(e,t);break}case s.NOBR:{$l(e,t);break}case s.MATH:{u0(e,t);break}case s.TABLE:{jl(e,t);break}case s.INPUT:{zl(e,t);break}case s.PARAM:case s.TRACK:case s.SOURCE:{Kl(e,t);break}case s.IMAGE:{Jl(e,t);break}case s.BUTTON:{Wl(e,t);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{Ql(e,t);break}case s.IFRAME:{a0(e,t);break}case s.SELECT:{i0(e,t);break}case s.OPTION:case s.OPTGROUP:{n0(e,t);break}case s.NOEMBED:case s.NOFRAMES:{us(e,t);break}case s.FRAMESET:{Bl(e,t);break}case s.TEXTAREA:{e0(e,t);break}case s.NOSCRIPT:{e.options.scriptingEnabled?us(e,t):os(e,t);break}case s.PLAINTEXT:{ql(e,t);break}case s.COL:case s.TH:case s.TD:case s.TR:case s.HEAD:case s.FRAME:case s.TBODY:case s.TFOOT:case s.THEAD:case s.CAPTION:case s.COLGROUP:break;default:os(e,t)}}function c0(e,t){if(e.openElements.hasInScope(s.BODY)&&(e.insertionMode=m.AFTER_BODY,e.options.sourceCodeLocationInfo)){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e._setEndLocation(a,t)}}function l0(e,t){e.openElements.hasInScope(s.BODY)&&(e.insertionMode=m.AFTER_BODY,bs(e,t))}function d0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function h0(e){const t=e.openElements.tmplCount>0,{formElement:a}=e;t||(e.formElement=null),(a||t)&&e.openElements.hasInScope(s.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(s.FORM):a&&e.openElements.remove(a))}function f0(e){e.openElements.hasInButtonScope(s.P)||e._insertFakeElement(p.P,s.P),e._closePElement()}function E0(e){e.openElements.hasInListItemScope(s.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(s.LI),e.openElements.popUntilTagNamePopped(s.LI))}function m0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function T0(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function p0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function b0(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(p.BR,s.BR),e.openElements.pop(),e.framesetOk=!1}function cs(e,t){const a=t.tagName,i=t.tagID;for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n],u=e.openElements.tagIDs[n];if(i===u&&(i!==s.UNKNOWN||e.treeAdapter.getTagName(r)===a)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=n&&e.openElements.shortenToLength(n);break}if(e._isSpecialElement(r,u))break}}function da(e,t){switch(t.tagID){case s.A:case s.B:case s.I:case s.S:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.NOBR:case s.SMALL:case s.STRIKE:case s.STRONG:{oi(e,t);break}case s.P:{f0(e);break}case s.DL:case s.UL:case s.OL:case s.DIR:case s.DIV:case s.NAV:case s.PRE:case s.MAIN:case s.MENU:case s.ASIDE:case s.BUTTON:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.ADDRESS:case s.ARTICLE:case s.DETAILS:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.LISTING:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{d0(e,t);break}case s.LI:{E0(e);break}case s.DD:case s.DT:{m0(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{T0(e);break}case s.BR:{b0(e);break}case s.BODY:{c0(e,t);break}case s.HTML:{l0(e,t);break}case s.FORM:{h0(e);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{p0(e,t);break}case s.TEMPLATE:{Ze(e,t);break}default:cs(e,t)}}function ls(e,t){e.tmplInsertionModeStack.length>0?ps(e,t):li(e,t)}function g0(e,t){var a;t.tagID===s.SCRIPT&&((a=e.scriptHandler)===null||a===void 0||a.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function _0(e,t){e._err(t,g.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function di(e,t){if(es.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=m.IN_TABLE_TEXT,t.type){case W.CHARACTER:{hs(e,t);break}case W.WHITESPACE_CHARACTER:{ds(e,t);break}}else kt(e,t)}function A0(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,A.HTML),e.insertionMode=m.IN_CAPTION}function N0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,A.HTML),e.insertionMode=m.IN_COLUMN_GROUP}function C0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(p.COLGROUP,s.COLGROUP),e.insertionMode=m.IN_COLUMN_GROUP,hi(e,t)}function I0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,A.HTML),e.insertionMode=m.IN_TABLE_BODY}function S0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(p.TBODY,s.TBODY),e.insertionMode=m.IN_TABLE_BODY,fa(e,t)}function x0(e,t){e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function O0(e,t){rs(t)?e._appendElement(t,A.HTML):kt(e,t),t.ackSelfClosing=!0}function D0(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,A.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ct(e,t){switch(t.tagID){case s.TD:case s.TH:case s.TR:{S0(e,t);break}case s.STYLE:case s.SCRIPT:case s.TEMPLATE:{Se(e,t);break}case s.COL:{C0(e,t);break}case s.FORM:{D0(e,t);break}case s.TABLE:{x0(e,t);break}case s.TBODY:case s.TFOOT:case s.THEAD:{I0(e,t);break}case s.INPUT:{O0(e,t);break}case s.CAPTION:{A0(e,t);break}case s.COLGROUP:{N0(e,t);break}default:kt(e,t)}}function Pt(e,t){switch(t.tagID){case s.TABLE:{e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode());break}case s.TEMPLATE:{Ze(e,t);break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:kt(e,t)}}function kt(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,la(e,t),e.fosterParentingEnabled=a}function ds(e,t){e.pendingCharacterTokens.push(t)}function hs(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function vt(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)kt(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const fs=new Set([s.CAPTION,s.COL,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]);function L0(e,t){const a=t.tagID;fs.has(a)?e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=m.IN_TABLE,ct(e,t)):le(e,t)}function R0(e,t){const a=t.tagID;switch(a){case s.CAPTION:case s.TABLE:{e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=m.IN_TABLE,a===s.TABLE&&Pt(e,t));break}case s.BODY:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:da(e,t)}}function hi(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.COL:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.TEMPLATE:{Se(e,t);break}default:ha(e,t)}}function y0(e,t){switch(t.tagID){case s.COLGROUP:{e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=m.IN_TABLE);break}case s.TEMPLATE:{Ze(e,t);break}case s.COL:break;default:ha(e,t)}}function ha(e,t){e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=m.IN_TABLE,e._processToken(t))}function fa(e,t){switch(t.tagID){case s.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,A.HTML),e.insertionMode=m.IN_ROW;break}case s.TH:case s.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(p.TR,s.TR),e.insertionMode=m.IN_ROW,Ea(e,t);break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE,ct(e,t));break}default:ct(e,t)}}function fi(e,t){const a=t.tagID;switch(t.tagID){case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasInTableScope(a)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE);break}case s.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE,Pt(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:case s.TR:break;default:Pt(e,t)}}function Ea(e,t){switch(t.tagID){case s.TH:case s.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,A.HTML),e.insertionMode=m.IN_CELL,e.activeFormattingElements.insertMarker();break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY,fa(e,t));break}default:ct(e,t)}}function Es(e,t){switch(t.tagID){case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY);break}case s.TABLE:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY,fi(e,t));break}case s.TBODY:case s.TFOOT:case s.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(s.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY,fi(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:break;default:Pt(e,t)}}function M0(e,t){const a=t.tagID;fs.has(a)?(e.openElements.hasInTableScope(s.TD)||e.openElements.hasInTableScope(s.TH))&&(e._closeTableCell(),Ea(e,t)):le(e,t)}function P0(e,t){const a=t.tagID;switch(a){case s.TD:case s.TH:{e.openElements.hasInTableScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=m.IN_ROW);break}case s.TABLE:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),Es(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:break;default:da(e,t)}}function ms(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._insertElement(t,A.HTML);break}case s.OPTGROUP:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._insertElement(t,A.HTML);break}case s.HR:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.INPUT:case s.KEYGEN:case s.TEXTAREA:case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),t.tagID!==s.SELECT&&e._processStartTag(t));break}case s.SCRIPT:case s.TEMPLATE:{Se(e,t);break}}}function Ts(e,t){switch(t.tagID){case s.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===s.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===s.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop();break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop();break}case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode());break}case s.TEMPLATE:{Ze(e,t);break}}}function k0(e,t){const a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ms(e,t)}function v0(e,t){const a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?e.openElements.hasInTableScope(a)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Ts(e,t)}function w0(e,t){switch(t.tagID){case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{Se(e,t);break}case s.CAPTION:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.tmplInsertionModeStack[0]=m.IN_TABLE,e.insertionMode=m.IN_TABLE,ct(e,t);break}case s.COL:{e.tmplInsertionModeStack[0]=m.IN_COLUMN_GROUP,e.insertionMode=m.IN_COLUMN_GROUP,hi(e,t);break}case s.TR:{e.tmplInsertionModeStack[0]=m.IN_TABLE_BODY,e.insertionMode=m.IN_TABLE_BODY,fa(e,t);break}case s.TD:case s.TH:{e.tmplInsertionModeStack[0]=m.IN_ROW,e.insertionMode=m.IN_ROW,Ea(e,t);break}default:e.tmplInsertionModeStack[0]=m.IN_BODY,e.insertionMode=m.IN_BODY,le(e,t)}}function B0(e,t){t.tagID===s.TEMPLATE&&Ze(e,t)}function ps(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):li(e,t)}function U0(e,t){t.tagID===s.HTML?le(e,t):ma(e,t)}function bs(e,t){var a;if(t.tagID===s.HTML){if(e.fragmentContext||(e.insertionMode=m.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===s.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((a=e.treeAdapter.getNodeSourceCodeLocation(i))===null||a===void 0)&&a.endTag)&&e._setEndLocation(i,t)}}else ma(e,t)}function ma(e,t){e.insertionMode=m.IN_BODY,la(e,t)}function F0(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.FRAMESET:{e._insertElement(t,A.HTML);break}case s.FRAME:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.NOFRAMES:{Se(e,t);break}}}function H0(e,t){t.tagID===s.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==s.FRAMESET&&(e.insertionMode=m.AFTER_FRAMESET))}function Y0(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.NOFRAMES:{Se(e,t);break}}}function V0(e,t){t.tagID===s.HTML&&(e.insertionMode=m.AFTER_AFTER_FRAMESET)}function q0(e,t){t.tagID===s.HTML?le(e,t):Ta(e,t)}function Ta(e,t){e.insertionMode=m.IN_BODY,la(e,t)}function W0(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.NOFRAMES:{Se(e,t);break}}}function X0(e,t){t.chars=Z,e._insertCharacters(t)}function G0(e,t){e._insertCharacters(t),e.framesetOk=!1}function gs(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==A.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function $0(e,t){if(ol(t))gs(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(a);i===A.MATHML?Zn(t):i===A.SVG&&(cl(t),Jn(t)),ui(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function Q0(e,t){if(t.tagID===s.P||t.tagID===s.BR){gs(e),e._endTagOutsideForeignContent(t);return}for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a];if(e.treeAdapter.getNamespaceURI(i)===A.HTML){e._endTagOutsideForeignContent(t);break}const n=e.treeAdapter.getTagName(i);if(n.toLowerCase()===t.tagName){t.tagName=n,e.openElements.shortenToLength(a);break}}}const j0=new Set([p.AREA,p.BASE,p.BASEFONT,p.BGSOUND,p.BR,p.COL,p.EMBED,p.FRAME,p.HR,p.IMG,p.INPUT,p.KEYGEN,p.LINK,p.META,p.PARAM,p.SOURCE,p.TRACK,p.WBR]);function z0(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===A.HTML&&j0.has(t.treeAdapter.getTagName(e))}const K0={treeAdapter:ke,scriptingEnabled:!0};function Z0(e,t){const a={...K0,...t};return _s(e,a)}function J0(e,t){let a="";const i=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===p.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===A.HTML?t.treeAdapter.getTemplateContent(e):e,n=t.treeAdapter.getChildNodes(i);if(n)for(const r of n)a+=_s(r,t);return a}function _s(e,t){return t.treeAdapter.isElementNode(e)?ed(e,t):t.treeAdapter.isTextNode(e)?ad(e,t):t.treeAdapter.isCommentNode(e)?id(e,t):t.treeAdapter.isDocumentTypeNode(e)?nd(e,t):""}function ed(e,t){const a=t.treeAdapter.getTagName(e);return`<${a}${td(e,t)}>${z0(e,t)?"":`${J0(e,t)}</${a}>`}`}function td(e,{treeAdapter:t}){let a="";for(const i of t.getAttrList(e)){if(a+=" ",i.namespace)switch(i.namespace){case A.XML:{a+=`xml:${i.name}`;break}case A.XMLNS:{i.name!=="xmlns"&&(a+="xmlns:"),a+=i.name;break}case A.XLINK:{a+=`xlink:${i.name}`;break}default:a+=`${i.prefix}:${i.name}`}else a+=i.name;a+=`="${Hi(i.value)}"`}return a}function ad(e,t){const{treeAdapter:a}=t,i=a.getTextNodeContent(e),n=a.getParentNode(e),r=n&&a.isElementNode(n)&&a.getTagName(n);return r&&a.getNamespaceURI(n)===A.HTML&&wc(r,t.scriptingEnabled)?i:Yi(i)}function id(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function nd(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function sd(e,t){return as.parse(e,t)}function rd(e,t,a){typeof e=="string"&&(a=t,t=e,e=null);const i=as.getFragmentParser(e,a);return i.tokenizer.write(t,!0),i.getFragment()}function As(e){const t=e.includes('"')?"'":'"';return t+e+t}function ud(e,t,a){let i="!DOCTYPE ";return e&&(i+=e),t?i+=` PUBLIC ${As(t)}`:a&&(i+=" SYSTEM"),a&&(i+=` ${As(a)}`),i}const Ve={isCommentNode:Wt,isElementNode:v,isTextNode:De,createDocument(){const e=new Ge([]);return e["x-mode"]=_e.NO_QUIRKS,e},createDocumentFragment(){return new Ge([])},createElement(e,t,a){const i=Object.create(null),n=Object.create(null),r=Object.create(null);for(let o=0;o<a.length;o++){const l=a[o].name;i[l]=a[o].value,n[l]=a[o].namespace,r[l]=a[o].prefix}const u=new xa(e,i,[]);return u.namespace=t,u["x-attribsNamespace"]=n,u["x-attribsPrefix"]=r,u},createCommentNode(e){return new Ca(e)},createTextNode(e){return new Tt(e)},appendChild(e,t){const a=e.children[e.children.length-1];a&&(a.next=t,t.prev=a),e.children.push(t),t.parent=e},insertBefore(e,t,a){const i=e.children.indexOf(a),{prev:n}=a;n&&(n.next=t,t.prev=n),a.prev=t,t.next=a,e.children.splice(i,0,t),t.parent=e},setTemplateContent(e,t){Ve.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,a,i){const n=ud(t,a,i);let r=e.children.find(u=>Oa(u)&&u.name==="!doctype");r?r.data=n??null:(r=new Ia("!doctype",n),Ve.appendChild(e,r)),r["x-name"]=t,r["x-publicId"]=a,r["x-systemId"]=i},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:a,next:i}=e;e.prev=null,e.next=null,a&&(a.next=i),i&&(i.prev=a),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const a=e.children[e.children.length-1];a&&De(a)?a.data+=t:Ve.appendChild(e,Ve.createTextNode(t))},insertTextBefore(e,t,a){const i=e.children[e.children.indexOf(a)-1];i&&De(i)?i.data+=t:Ve.insertBefore(e,Ve.createTextNode(t),a)},adoptAttributes(e,t){for(let a=0;a<t.length;a++){const i=t[a].name;e.attribs[i]===void 0&&(e.attribs[i]=t[a].value,e["x-attribsNamespace"][i]=t[a].namespace,e["x-attribsPrefix"][i]=t[a].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return Oa(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function od(e,t,a,i){var n;return(n=t.treeAdapter)!==null&&n!==void 0||(t.treeAdapter=Ve),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),a?sd(e,t):rd(i,e,t)}const cd={treeAdapter:Ve};function ld(e){const t="length"in e?e:[e];for(let i=0;i<t.length;i+=1){const n=t[i];Be(n)&&Array.prototype.splice.call(t,i,1,...n.children)}let a="";for(let i=0;i<t.length;i+=1){const n=t[i];a+=Z0(n,cd)}return a}var M;(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"})(M||(M={}));var C;(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.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(C||(C={}));function ve(e){return e===M.Space||e===M.NewLine||e===M.Tab||e===M.FormFeed||e===M.CarriageReturn}function pa(e){return e===M.Slash||e===M.Gt||ve(e)}function dd(e){return e>=M.LowerA&&e<=M.LowerZ||e>=M.UpperA&&e<=M.UpperZ}var Re;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Re||(Re={}));const ce={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]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class hd{constructor({xmlMode:t=!1,decodeEntities:a=!0},i){this.cbs=i,this.state=C.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=C.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=a,this.entityDecoder=new Pa(t?vi:La,(n,r)=>this.emitCodePoint(n,r))}reset(){this.state=C.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=C.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===M.Lt||!this.decodeEntities&&this.fastForwardTo(M.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=C.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===M.Amp&&this.startEntity()}stateSpecialStartSequence(t){const a=this.sequenceIndex===this.currentSequence.length;if(!(a?pa(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!a){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=C.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===M.Gt||ve(t)){const a=this.index-this.currentSequence.length;if(this.sectionStart<a){const i=this.index;this.index=a,this.cbs.ontext(this.sectionStart,a),this.index=i}this.isSpecial=!1,this.sectionStart=a+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===ce.TitleEnd?this.decodeEntities&&t===M.Amp&&this.startEntity():this.fastForwardTo(M.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===M.Lt)}stateCDATASequence(t){t===ce.Cdata[this.sequenceIndex]?++this.sequenceIndex===ce.Cdata.length&&(this.state=C.InCommentLike,this.currentSequence=ce.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=C.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===ce.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=C.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!pa(t):dd(t)}startSpecial(t,a){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=a,this.state=C.SpecialStartSequence}stateBeforeTagName(t){if(t===M.ExclamationMark)this.state=C.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===M.Questionmark)this.state=C.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const a=t|32;this.sectionStart=this.index,this.xmlMode?this.state=C.InTagName:a===ce.ScriptEnd[2]?this.state=C.BeforeSpecialS:a===ce.TitleEnd[2]?this.state=C.BeforeSpecialT:this.state=C.InTagName}else t===M.Slash?this.state=C.BeforeClosingTagName:(this.state=C.Text,this.stateText(t))}stateInTagName(t){pa(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){ve(t)||(t===M.Gt?this.state=C.Text:(this.state=this.isTagStartChar(t)?C.InClosingTagName:C.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===M.Gt||ve(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=C.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===M.Gt||this.fastForwardTo(M.Gt))&&(this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===M.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=C.InSpecialTag,this.sequenceIndex=0):this.state=C.Text,this.sectionStart=this.index+1):t===M.Slash?this.state=C.InSelfClosingTag:ve(t)||(this.state=C.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===M.Gt?(this.cbs.onselfclosingtag(this.index),this.state=C.Text,this.sectionStart=this.index+1,this.isSpecial=!1):ve(t)||(this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===M.Eq||pa(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=C.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===M.Eq?this.state=C.BeforeAttributeValue:t===M.Slash||t===M.Gt?(this.cbs.onattribend(Re.NoValue,this.sectionStart),this.sectionStart=-1,this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t)):ve(t)||(this.cbs.onattribend(Re.NoValue,this.sectionStart),this.state=C.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===M.DoubleQuote?(this.state=C.InAttributeValueDq,this.sectionStart=this.index+1):t===M.SingleQuote?(this.state=C.InAttributeValueSq,this.sectionStart=this.index+1):ve(t)||(this.sectionStart=this.index,this.state=C.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,a){t===a||!this.decodeEntities&&this.fastForwardTo(a)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a===M.DoubleQuote?Re.Double:Re.Single,this.index+1),this.state=C.BeforeAttributeName):this.decodeEntities&&t===M.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,M.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,M.SingleQuote)}stateInAttributeValueNoQuotes(t){ve(t)||t===M.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Re.Unquoted,this.index),this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===M.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===M.OpeningSquareBracket?(this.state=C.CDATASequence,this.sequenceIndex=0):this.state=t===M.Dash?C.BeforeComment:C.InDeclaration}stateInDeclaration(t){(t===M.Gt||this.fastForwardTo(M.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=C.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===M.Gt||this.fastForwardTo(M.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===M.Dash?(this.state=C.InCommentLike,this.currentSequence=ce.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=C.InDeclaration}stateInSpecialComment(t){(t===M.Gt||this.fastForwardTo(M.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const a=t|32;a===ce.ScriptEnd[3]?this.startSpecial(ce.ScriptEnd,4):a===ce.StyleEnd[3]?this.startSpecial(ce.StyleEnd,4):(this.state=C.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const a=t|32;a===ce.TitleEnd[3]?this.startSpecial(ce.TitleEnd,4):a===ce.TextareaEnd[3]?this.startSpecial(ce.TextareaEnd,4):(this.state=C.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=C.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?Ne.Strict:this.baseState===C.Text||this.baseState===C.InSpecialTag?Ne.Legacy:Ne.Attribute)}stateInEntity(){const t=this.entityDecoder.write(this.buffer,this.index-this.offset);t>=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===C.Text||this.state===C.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===C.InAttributeValueDq||this.state===C.InAttributeValueSq||this.state===C.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();){const t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case C.Text:{this.stateText(t);break}case C.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case C.InSpecialTag:{this.stateInSpecialTag(t);break}case C.CDATASequence:{this.stateCDATASequence(t);break}case C.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case C.InAttributeName:{this.stateInAttributeName(t);break}case C.InCommentLike:{this.stateInCommentLike(t);break}case C.InSpecialComment:{this.stateInSpecialComment(t);break}case C.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case C.InTagName:{this.stateInTagName(t);break}case C.InClosingTagName:{this.stateInClosingTagName(t);break}case C.BeforeTagName:{this.stateBeforeTagName(t);break}case C.AfterAttributeName:{this.stateAfterAttributeName(t);break}case C.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case C.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case C.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case C.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case C.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case C.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case C.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case C.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case C.InDeclaration:{this.stateInDeclaration(t);break}case C.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case C.BeforeComment:{this.stateBeforeComment(t);break}case C.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case C.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===C.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===C.InCommentLike?this.currentSequence===ce.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===C.InTagName||this.state===C.BeforeAttributeName||this.state===C.BeforeAttributeValue||this.state===C.AfterAttributeName||this.state===C.InAttributeName||this.state===C.InAttributeValueSq||this.state===C.InAttributeValueDq||this.state===C.InAttributeValueNq||this.state===C.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,a){this.baseState!==C.Text&&this.baseState!==C.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+a,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+a,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}}const lt=new Set(["input","option","optgroup","select","button","datalist","textarea"]),z=new Set(["p"]),Ns=new Set(["thead","tbody"]),Cs=new Set(["dd","dt"]),Is=new Set(["rt","rp"]),fd=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",z],["h1",z],["h2",z],["h3",z],["h4",z],["h5",z],["h6",z],["select",lt],["input",lt],["output",lt],["button",lt],["datalist",lt],["textarea",lt],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",Cs],["dt",Cs],["address",z],["article",z],["aside",z],["blockquote",z],["details",z],["div",z],["dl",z],["fieldset",z],["figcaption",z],["figure",z],["footer",z],["form",z],["header",z],["hr",z],["main",z],["nav",z],["ol",z],["pre",z],["section",z],["table",z],["ul",z],["rt",Is],["rp",Is],["tbody",Ns],["tfoot",Ns]]),Ed=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),Ss=new Set(["math","svg"]),xs=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),md=/\s|\//;class Td{constructor(t,a={}){var i,n,r,u,o,l;this.options=a,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(i=a.lowerCaseTags)!==null&&i!==void 0?i:this.htmlMode,this.lowerCaseAttributeNames=(n=a.lowerCaseAttributeNames)!==null&&n!==void 0?n:this.htmlMode,this.recognizeSelfClosing=(r=a.recognizeSelfClosing)!==null&&r!==void 0?r:!this.htmlMode,this.tokenizer=new((u=a.Tokenizer)!==null&&u!==void 0?u:hd)(this.options,this),this.foreignContext=[!this.htmlMode],(l=(o=this.cbs).onparserinit)===null||l===void 0||l.call(o,this)}ontext(t,a){var i,n;const r=this.getSlice(t,a);this.endIndex=a-1,(n=(i=this.cbs).ontext)===null||n===void 0||n.call(i,r),this.startIndex=a}ontextentity(t,a){var i,n;this.endIndex=a-1,(n=(i=this.cbs).ontext)===null||n===void 0||n.call(i,ya(t)),this.startIndex=a}isVoidElement(t){return this.htmlMode&&Ed.has(t)}onopentagname(t,a){this.endIndex=a;let i=this.getSlice(t,a);this.lowerCaseTagNames&&(i=i.toLowerCase()),this.emitOpenTag(i)}emitOpenTag(t){var a,i,n,r;this.openTagStart=this.startIndex,this.tagname=t;const u=this.htmlMode&&fd.get(t);if(u)for(;this.stack.length>0&&u.has(this.stack[0]);){const o=this.stack.shift();(i=(a=this.cbs).onclosetag)===null||i===void 0||i.call(a,o,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(Ss.has(t)?this.foreignContext.unshift(!0):xs.has(t)&&this.foreignContext.unshift(!1))),(r=(n=this.cbs).onopentagname)===null||r===void 0||r.call(n,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var a,i;this.startIndex=this.openTagStart,this.attribs&&((i=(a=this.cbs).onopentag)===null||i===void 0||i.call(a,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,a){var i,n,r,u,o,l,f,E;this.endIndex=a;let T=this.getSlice(t,a);if(this.lowerCaseTagNames&&(T=T.toLowerCase()),this.htmlMode&&(Ss.has(T)||xs.has(T))&&this.foreignContext.shift(),this.isVoidElement(T))this.htmlMode&&T==="br"&&((u=(r=this.cbs).onopentagname)===null||u===void 0||u.call(r,"br"),(l=(o=this.cbs).onopentag)===null||l===void 0||l.call(o,"br",{},!0),(E=(f=this.cbs).onclosetag)===null||E===void 0||E.call(f,"br",!1));else{const b=this.stack.indexOf(T);if(b!==-1)for(let N=0;N<=b;N++){const S=this.stack.shift();(n=(i=this.cbs).onclosetag)===null||n===void 0||n.call(i,S,N!==b)}else this.htmlMode&&T==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=a+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var a,i;const n=this.tagname;this.endOpenTag(t),this.stack[0]===n&&((i=(a=this.cbs).onclosetag)===null||i===void 0||i.call(a,n,!t),this.stack.shift())}onattribname(t,a){this.startIndex=t;const i=this.getSlice(t,a);this.attribname=this.lowerCaseAttributeNames?i.toLowerCase():i}onattribdata(t,a){this.attribvalue+=this.getSlice(t,a)}onattribentity(t){this.attribvalue+=ya(t)}onattribend(t,a){var i,n;this.endIndex=a,(n=(i=this.cbs).onattribute)===null||n===void 0||n.call(i,this.attribname,this.attribvalue,t===Re.Double?'"':t===Re.Single?"'":t===Re.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const a=t.search(md);let i=a<0?t:t.substr(0,a);return this.lowerCaseTagNames&&(i=i.toLowerCase()),i}ondeclaration(t,a){this.endIndex=a;const i=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(i);this.cbs.onprocessinginstruction(`!${n}`,`!${i}`)}this.startIndex=a+1}onprocessinginstruction(t,a){this.endIndex=a;const i=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(i);this.cbs.onprocessinginstruction(`?${n}`,`?${i}`)}this.startIndex=a+1}oncomment(t,a,i){var n,r,u,o;this.endIndex=a,(r=(n=this.cbs).oncomment)===null||r===void 0||r.call(n,this.getSlice(t,a-i)),(o=(u=this.cbs).oncommentend)===null||o===void 0||o.call(u),this.startIndex=a+1}oncdata(t,a,i){var n,r,u,o,l,f,E,T,b,N;this.endIndex=a;const S=this.getSlice(t,a-i);!this.htmlMode||this.options.recognizeCDATA?((r=(n=this.cbs).oncdatastart)===null||r===void 0||r.call(n),(o=(u=this.cbs).ontext)===null||o===void 0||o.call(u,S),(f=(l=this.cbs).oncdataend)===null||f===void 0||f.call(l)):((T=(E=this.cbs).oncomment)===null||T===void 0||T.call(E,`[CDATA[${S}]]`),(N=(b=this.cbs).oncommentend)===null||N===void 0||N.call(b)),this.startIndex=a+1}onend(){var t,a;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let i=0;i<this.stack.length;i++)this.cbs.onclosetag(this.stack[i],!0)}(a=(t=this.cbs).onend)===null||a===void 0||a.call(t)}reset(){var t,a,i,n;(a=(t=this.cbs).onreset)===null||a===void 0||a.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(n=(i=this.cbs).onparserinit)===null||n===void 0||n.call(i,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,a){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let i=this.buffers[0].slice(t-this.bufferOffset,a-this.bufferOffset);for(;a-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),i+=this.buffers[0].slice(0,a-this.bufferOffset);return i}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var a,i;if(this.ended){(i=(a=this.cbs).onerror)===null||i===void 0||i.call(a,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var a,i;if(this.ended){(i=(a=this.cbs).onerror)===null||i===void 0||i.call(a,new Error(".end() after done!"));return}t&&this.write(t),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(t){this.write(t)}done(t){this.end(t)}}function pd(e,t){const a=new br(void 0,t);return new Td(a,t).end(e),a.root}const bd=$o((e,t,a,i)=>t._useHtmlParser2?pd(e,t):od(e,t,a,i)),Os=xc(bd,(e,t)=>t._useHtmlParser2?Xt(e,t):ld(e));var de=(e=>(e[e.None=0]="None",e[e.Text=1]="Text",e[e.Image=2]="Image",e[e.Video=3]="Video",e[e.Icon=4]="Icon",e[e.Link=5]="Link",e[e.Block=10]="Block",e))(de||{});const gd=c.defineComponent({name:"CustomIcon",props:{iconName:{type:String,required:!0}},setup(e){return{iconClass:c.computed(()=>`${e.iconName}`)}}}),Ei=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a};function _d(e,t,a,i,n,r){return c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)},null,2)}const Ad=Ei(gd,[["render",_d]]),Nd={key:0,contenteditable:"false",class:c.normalizeClass(["w-full h-[100vh] fixed top-0 left-0 flex justify-center items-center bg-[rgba(0,0,0,.7)] z-10"])},Cd={class:"flex flex-col max-w-[600px] bg-white rounded-xl overflow-hidden"},Id={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},Sd={class:"p-8 items-center justify-center flex flex-wrap h-[500px] overflow-y-auto"},xd=c.defineComponent({__name:"IconModal",props:{icons:{type:Array,default:()=>[]}},emits:["ok"],setup(e,{expose:t,emit:a}){const i=e,n=c.ref(i.icons||[]);c.watch(()=>i.icons,E=>{n.value=E||[]},{immediate:!0});const r=a,u=c.ref(!1);function o(){console.log(666),u.value=!0}function l(E){f(),r("ok",E)}function f(){u.value=!1}return t({openModal:o,closeModal:f}),(E,T)=>u.value?(c.openBlock(),c.createElementBlock("div",Nd,[c.createElementVNode("div",Cd,[c.createElementVNode("div",Id,[T[1]||(T[1]=c.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"选择图标",-1)),c.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:T[0]||(T[0]=c.withModifiers(b=>f(),["stop"]))})]),c.createElementVNode("div",Sd,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.value,b=>(c.openBlock(),c.createBlock(Ad,{key:b,class:"w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",iconName:b,onClick:c.withModifiers(N=>l(b),["stop"]),title:b},null,8,["iconName","onClick","title"]))),128))])])])):c.createCommentVNode("",!0)}});function Ds(e){return typeof e=="number"&&Number.isFinite(e)}const Od=c.defineComponent({name:"ImgUploader",inheritAttrs:!1,__name:"UploadImage",props:{alt:{},beforeUpload:{},customUpload:{},getExtraData:{},height:{default:100},multiple:{type:Boolean,default:!1},src:{},tip:{default:"点击上传"},width:{default:100},uploadByImage:{}},setup(e){const t=e,a=c.ref(),i=c.computed(()=>{const u={width:t.width,height:t.height};return Ds(t.width)&&(u.width+="px"),Ds(t.height)&&(u.height+="px"),u});async function n(u){console.log(u,u.target);const o=u.target.files[0];console.log(o),typeof t.customUpload=="function"&&t.customUpload(o),!(typeof t.beforeUpload=="function"&&!await t.beforeUpload(o))&&(typeof t.getExtraData=="function"&&await t.getExtraData(o),o&&(r(o),a.value.value=""))}async function r(u){if(t.uploadByImage){await t.uploadByImage(u);return}return{success:0}}return(u,o)=>(c.openBlock(),c.createElementBlock("div",c.mergeProps({style:i.value,contenteditable:"false",class:"bg-background-deep box-border cursor-pointer absolute left-0 top-0",title:"点击上传"},u.$attrs,{onClick:o[2]||(o[2]=c.withModifiers(()=>{},["stop"]))}),[c.createElementVNode("input",{onClick:o[0]||(o[0]=c.withModifiers(()=>{},["stop"])),contenteditable:"false",class:"cursor-pointer w-16 opacity-0",type:"file",ref_key:"fileInput",ref:a,onChange:o[1]||(o[1]=l=>n(l)),accept:"image/*"},null,544)],16))}});/*!
6
+ )`,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])"},Nn={};function eo(e,t){return e===H.falseFunc?H.falseFunc:a=>t.isTag(a)&&e(a)}function Cn(e,t){const a=t.getSiblings(e);if(a.length<=1)return[];const i=a.indexOf(e);return i<0||i===a.length-1?[]:a.slice(i+1).filter(t.isTag)}function Za(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 Ja=(e,t,a,i,n)=>{const r=n(t,Za(a),i);return r===H.trueFunc?e:r===H.falseFunc?H.falseFunc:u=>r(u)&&e(u)},ei={is:Ja,matches:Ja,where:Ja,not(e,t,a,i,n){const r=n(t,Za(a),i);return r===H.falseFunc?e:r===H.trueFunc?H.falseFunc:u=>!r(u)&&e(u)},has(e,t,a,i,n){const{adapter:r}=a,u=Za(a);u.relativeSelector=!0;const o=t.some(m=>m.some(ja))?[Nn]:void 0,l=n(t,u,o);if(l===H.falseFunc)return H.falseFunc;const h=eo(l,r);if(o&&l!==H.trueFunc){const{shouldTestNextSiblings:m=!1}=l;return T=>{if(!e(T))return!1;o[0]=T;const b=r.getChildren(T),N=m?[...b,...Cn(T,r)]:b;return r.existsOne(h,N)}}return m=>e(m)&&r.existsOne(h,r.getChildren(m))}};function to(e,t,a,i,n){var r;const{name:u,data:o}=t;if(Array.isArray(o)){if(!(u in ei))throw new Error(`Unknown pseudo-class :${u}(${o})`);return ei[u](e,o,a,i,n)}const l=(r=a.pseudos)===null||r===void 0?void 0:r[u],h=typeof l=="string"?l:Ju[u];if(typeof h=="string"){if(o!=null)throw new Error(`Pseudo ${u} doesn't have any arguments`);const m=sa(h);return ei.is(e,m,a,i,n)}if(typeof l=="function")return An(l,u,o,1),m=>l(m,o)&&e(m);if(u in za)return za[u](e,o,a,i);if(u in _n){const m=_n[u];return An(m,u,o,2),T=>m(T,a,o)&&e(T)}throw new Error(`Unknown pseudo-class :${u}`)}function ti(e,t){const a=t.getParent(e);return a&&t.isTag(a)?a:null}function ao(e,t,a,i,n){const{adapter:r,equals:u}=a;switch(t.type){case L.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case L.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case L.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!a.xmlMode||a.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),Qu[t.action](e,t,a)}case L.Pseudo:return to(e,t,a,i,n);case L.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:o}=t;return(!a.xmlMode||a.lowerCaseTags)&&(o=o.toLowerCase()),function(h){return r.getName(h)===o&&e(h)}}case L.Descendant:{if(a.cacheResults===!1||typeof WeakSet>"u")return function(h){let m=h;for(;m=ti(m,r);)if(e(m))return!0;return!1};const o=new WeakSet;return function(h){let m=h;for(;m=ti(m,r);)if(!o.has(m)){if(r.isTag(m)&&e(m))return!0;o.add(m)}return!1}}case"_flexibleDescendant":return function(l){let h=l;do if(e(h))return!0;while(h=ti(h,r));return!1};case L.Parent:return function(l){return r.getChildren(l).some(h=>r.isTag(h)&&e(h))};case L.Child:return function(l){const h=r.getParent(l);return h!=null&&r.isTag(h)&&e(h)};case L.Sibling:return function(l){const h=r.getSiblings(l);for(let m=0;m<h.length;m++){const T=h[m];if(u(l,T))break;if(r.isTag(T)&&e(T))return!0}return!1};case L.Adjacent:return r.prevElementSibling?function(l){const h=r.prevElementSibling(l);return h!=null&&e(h)}:function(l){const h=r.getSiblings(l);let m;for(let T=0;T<h.length;T++){const b=h[T];if(u(l,b))break;r.isTag(b)&&(m=b)}return!!m&&e(m)};case L.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function In(e){return e.type===L.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(In)))}const io={type:L.Descendant},no={type:"_flexibleDescendant"},so={type:L.Pseudo,name:"scope",data:null};function ro(e,{adapter:t},a){const i=!!(a!=null&&a.every(n=>{const r=t.isTag(n)&&t.getParent(n);return n===Nn||r&&t.isTag(r)}));for(const n of e){if(!(n.length>0&&ja(n[0])&&n[0].type!==L.Descendant))if(i&&!n.some(In))n.unshift(io);else continue;n.unshift(so)}}function Sn(e,t,a){var i;e.forEach($u),a=(i=t.context)!==null&&i!==void 0?i:a;const n=Array.isArray(a),r=a&&(Array.isArray(a)?a:[a]);if(t.relativeSelector!==!1)ro(e,t,r);else if(e.some(l=>l.length>0&&ja(l[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let u=!1;const o=e.map(l=>{if(l.length>=2){const[h,m]=l;h.type!==L.Pseudo||h.name!=="scope"||(n&&m.type===L.Descendant?l[1]=no:(m.type===L.Adjacent||m.type===L.Sibling)&&(u=!0))}return uo(l,t,r)}).reduce(oo,H.falseFunc);return o.shouldTestNextSiblings=u,o}function uo(e,t,a){var i;return e.reduce((n,r)=>n===H.falseFunc?H.falseFunc:ao(n,r,t,a,Sn),(i=t.rootFunc)!==null&&i!==void 0?i:H.trueFunc)}function oo(e,t){return t===H.falseFunc||e===H.trueFunc?e:e===H.falseFunc||t===H.trueFunc?t:function(i){return e(i)||t(i)}}const xn=(e,t)=>e===t,co={adapter:aa,equals:xn};function lo(e){var t,a,i,n;const r=e??co;return(t=r.adapter)!==null&&t!==void 0||(r.adapter=aa),(a=r.equals)!==null&&a!==void 0||(r.equals=(n=(i=r.adapter)===null||i===void 0?void 0:i.equals)!==null&&n!==void 0?n:xn),r}function ho(e){return function(a,i,n){const r=lo(i);return e(a,r,n)}}const ai=ho(Sn);function On(e,t,a=!1){return a&&(e=fo(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function fo(e,t){const a=Array.isArray(e)?e.slice(0):[e],i=a.length;for(let n=0;n<i;n++){const r=Cn(a[n],t);a.push(...r)}return a}const mo=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function ca(e){return e.type!=="pseudo"?!1:mo.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(ca)):!1}function Eo(e,t,a){const i=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(i)?i>=0?i+1:1/0:0;case"lt":return isFinite(i)?i>=0?Math.min(i,a):1/0:0;case"gt":return isFinite(i)?1/0:0;case"odd":return 2*a;case"even":return 2*a-1;case"last":case"not":return 1/0}}function To(e){for(;e.parent;)e=e.parent;return e}function ii(e){const t=[],a=[];for(const i of e)i.some(ca)?t.push(i):a.push(i);return[a,t]}const po={type:L.Universal,namespace:null},bo={type:L.Pseudo,name:"scope",data:null};function Dn(e,t,a={}){return Ln([e],t,a)}function Ln(e,t,a={}){if(typeof t=="function")return e.some(t);const[i,n]=ii(sa(t));return i.length>0&&e.some(ai(i,a))||n.some(r=>Mn(r,e,a).length>0)}function go(e,t,a,i){const n=typeof a=="string"?parseInt(a,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(n)&&Math.abs(n)<t.length?[n<0?t[t.length+n]:t[n]]:[];case"gt":return isFinite(n)?t.slice(n+1):[];case"even":return t.filter((r,u)=>u%2===0);case"odd":return t.filter((r,u)=>u%2===1);case"not":{const r=new Set(Rn(a,t,i));return t.filter(u=>!r.has(u))}}}function yn(e,t,a={}){return Rn(sa(e),t,a)}function Rn(e,t,a){if(t.length===0)return[];const[i,n]=ii(e);let r;if(i.length){const u=si(t,i,a);if(n.length===0)return u;u.length&&(r=new Set(u))}for(let u=0;u<n.length&&(r==null?void 0:r.size)!==t.length;u++){const o=n[u];if((r?t.filter(m=>w(m)&&!r.has(m)):t).length===0)break;const h=Mn(o,t,a);if(h.length)if(r)h.forEach(m=>r.add(m));else{if(u===n.length-1)return h;r=new Set(h)}}return typeof r<"u"?r.size===t.length?t:t.filter(u=>r.has(u)):[]}function Mn(e,t,a){var i;if(e.some(St)){const n=(i=a.root)!==null&&i!==void 0?i:To(t[0]),r={...a,context:t,relativeSelector:!1};return e.push(bo),la(n,e,r,!0,t.length)}return la(t,e,a,!1,t.length)}function _o(e,t,a={},i=1/0){if(typeof e=="function")return Pn(t,e);const[n,r]=ii(sa(e)),u=r.map(o=>la(t,o,a,!0,i));return n.length&&u.push(ni(t,n,a,i)),u.length===0?[]:u.length===1?u[0]:ot(u.reduce((o,l)=>[...o,...l]))}function la(e,t,a,i,n){const r=t.findIndex(ca),u=t.slice(0,r),o=t[r],l=t.length-1===r?n:1/0,h=Eo(o.name,o.data,l);if(h===0)return[];const T=(u.length===0&&!Array.isArray(e)?Zt(e).filter(w):u.length===0?(Array.isArray(e)?e:[e]).filter(w):i||u.some(St)?ni(e,[u],a,h):si(e,[u],a)).slice(0,h);let b=go(o.name,T,o.data,a);if(b.length===0||t.length===r+1)return b;const N=t.slice(r+1),I=N.some(St);if(I){if(St(N[0])){const{type:y}=N[0];(y===L.Sibling||y===L.Adjacent)&&(b=On(b,aa,!0)),N.unshift(po)}a={...a,relativeSelector:!1,rootFunc:y=>b.includes(y)}}else a.rootFunc&&a.rootFunc!==ra.trueFunc&&(a={...a,rootFunc:ra.trueFunc});return N.some(ca)?la(b,N,a,!1,n):I?ni(b,[N],a,n):si(b,[N],a)}function ni(e,t,a,i){const n=ai(t,a,e);return Pn(e,n,i)}function Pn(e,t,a=1/0){const i=On(e,aa,t.shouldTestNextSiblings);return Va(n=>w(n)&&t(n),i,!0,a)}function si(e,t,a){const i=(Array.isArray(e)?e:[e]).filter(w);if(i.length===0)return i;const n=ai(t,a);return n===ra.trueFunc?i:i.filter(n)}const Ao=/^\s*[+~]/;function No(e){if(!e)return this._make([]);if(typeof e!="string"){const t=Be(e)?e.toArray():[e],a=this.toArray();return this._make(t.filter(i=>a.some(n=>nn(n,i))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function Co(e,t){var a;const i=this.toArray(),n=Ao.test(e)?i:this.children().toArray(),r={context:i,root:(a=this._root)===null||a===void 0?void 0:a[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(_o(e,n,r,t))}function ri(e){return function(t,...a){return function(i){var n;let r=e(t,this);return i&&(r=ci(r,i,this.options.xmlMode,(n=this._root)===null||n===void 0?void 0:n[0])),this._make(this.length>1&&r.length>1?a.reduce((u,o)=>o(u),r):r)}}}const Ot=ri((e,t)=>{let a=[];for(let i=0;i<t.length;i++){const n=e(t[i]);n.length>0&&(a=a.concat(n))}return a}),ui=ri((e,t)=>{const a=[];for(let i=0;i<t.length;i++){const n=e(t[i]);n!==null&&a.push(n)}return a});function oi(e,...t){let a=null;const i=ri((n,r)=>{const u=[];return Z(r,o=>{for(let l;(l=n(o))&&!(a!=null&&a(l,u.length));o=l)u.push(l)}),u})(e,...t);return function(n,r){a=typeof n=="string"?o=>Dn(o,n,this.options):n?Dt(n):null;const u=i.call(this,r);return a=null,u}}function lt(e){return e.length>1?Array.from(new Set(e)):e}const Io=ui(({parent:e})=>e&&!Ve(e)?e:null,lt),So=Ot(e=>{const t=[];for(;e.parent&&!Ve(e.parent);)t.push(e.parent),e=e.parent;return t},ot,e=>e.reverse()),xo=oi(({parent:e})=>e&&!Ve(e)?e:null,ot,e=>e.reverse());function Oo(e){var t;const a=[];if(!e)return this._make(a);const i={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},n=typeof e=="string"?r=>Dn(r,e,i):Dt(e);return Z(this,r=>{for(r&&!Ve(r)&&!w(r)&&(r=r.parent);r&&w(r);){if(n(r,0)){a.includes(r)||a.push(r);break}r=r.parent}}),this._make(a)}const Do=ui(e=>Fa(e)),Lo=Ot(e=>{const t=[];for(;e.next;)e=e.next,w(e)&&t.push(e);return t},lt),yo=oi(e=>Fa(e),lt),Ro=ui(e=>Ha(e)),Mo=Ot(e=>{const t=[];for(;e.prev;)e=e.prev,w(e)&&t.push(e);return t},lt),Po=oi(e=>Ha(e),lt),ko=Ot(e=>zi(e).filter(t=>w(t)&&t!==e),ot),wo=Ot(e=>Zt(e).filter(w),lt);function Bo(){const e=this.toArray().reduce((t,a)=>re(a)?t.concat(a.children):t,[]);return this._make(e)}function vo(e){let t=0;const a=this.length;for(;t<a&&e.call(this[t],t,this[t])!==!1;)++t;return this}function Uo(e){let t=[];for(let a=0;a<this.length;a++){const i=this[a],n=e.call(i,a,i);n!=null&&(t=t.concat(n))}return this._make(t)}function Dt(e){return typeof e=="function"?(t,a)=>e.call(t,a,t):Be(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function Fo(e){var t;return this._make(ci(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function ci(e,t,a,i){return typeof t=="string"?yn(t,e,{xmlMode:a,root:i}):e.filter(Dt(t))}function Ho(e){const t=this.toArray();return typeof e=="string"?Ln(t.filter(w),e,this.options):e?t.some(Dt(e)):!1}function Vo(e){let t=this.toArray();if(typeof e=="string"){const a=new Set(yn(e,t,this.options));t=t.filter(i=>!a.has(i))}else{const a=Dt(e);t=t.filter((i,n)=>!a(i,n))}return this._make(t)}function Yo(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,a)=>this._make(a).find(e).length>0)}function qo(){return this.length>1?this._make(this[0]):this}function Wo(){return this.length>0?this._make(this[this.length-1]):this}function $o(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function Go(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function Xo(){return Array.prototype.slice.call(this)}function Qo(e){let t,a;return e==null?(t=this.parent().children(),a=this[0]):typeof e=="string"?(t=this._make(e),a=this[0]):(t=this,a=Be(e)?e[0]:e),Array.prototype.indexOf.call(t,a)}function jo(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function zo(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function Ko(e,t){const a=this._make(e,t),i=ot([...this.get(),...a.get()]);return this._make(i)}function Zo(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const Jo=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:Co,add:Ko,addBack:Zo,children:wo,closest:Oo,contents:Bo,each:vo,end:zo,eq:$o,filter:Fo,filterArray:ci,find:No,first:qo,get:Go,has:Yo,index:Qo,is:Ho,last:Wo,map:Uo,next:Do,nextAll:Lo,nextUntil:yo,not:Vo,parent:Io,parents:So,parentsUntil:xo,prev:Ro,prevAll:Mo,prevUntil:Po,siblings:ko,slice:jo,toArray:Xo},Symbol.toStringTag,{value:"Module"}));function ec(e){return function(a,i,n,r){if(typeof Buffer<"u"&&Buffer.isBuffer(a)&&(a=a.toString()),typeof a=="string")return e(a,i,n,r);const u=a;if(!Array.isArray(u)&&Ve(u))return u;const o=new ze([]);return et(u,o),o}}function et(e,t){const a=Array.isArray(e)?e:[e];t?t.children=a:t=null;for(let i=0;i<a.length;i++){const n=a[i];n.parent&&n.parent.children!==a&&Ke(n),t?(n.prev=a[i-1]||null,n.next=a[i+1]||null):n.prev=n.next=null,n.parent=t}return t}function tc(e,t){if(e==null)return[];if(typeof e=="string")return this._parse(e,this.options,!1,null).children.slice(0);if("length"in e){if(e.length===1)return this._makeDomArray(e[0],t);const a=[];for(let i=0;i<e.length;i++){const n=e[i];if(typeof n=="object"){if(n==null)continue;if(!("length"in n)){a.push(t?At(n,!0):n);continue}}a.push(...this._makeDomArray(n,t))}return a}return[t?At(e,!0):e]}function kn(e){return function(...t){const a=this.length-1;return Z(this,(i,n)=>{if(!re(i))return;const r=typeof t[0]=="function"?t[0].call(i,n,this._render(i.children)):t,u=this._makeDomArray(r,n<a);e(u,i.children,i)})}}function We(e,t,a,i,n){var r,u;const o=[t,a,...i],l=t===0?null:e[t-1],h=t+a>=e.length?null:e[t+a];for(let m=0;m<i.length;++m){const T=i[m],b=T.parent;if(b){const I=b.children.indexOf(T);I>-1&&(b.children.splice(I,1),n===b&&t>I&&o[0]--)}T.parent=n,T.prev&&(T.prev.next=(r=T.next)!==null&&r!==void 0?r:null),T.next&&(T.next.prev=(u=T.prev)!==null&&u!==void 0?u:null),T.prev=m===0?l:i[m-1],T.next=m===i.length-1?h:i[m+1]}return l&&(l.next=i[0]),h&&(h.prev=i[i.length-1]),e.splice(...o)}function ac(e){return(Be(e)?e:this._make(e)).append(this),this}function ic(e){return(Be(e)?e:this._make(e)).prepend(this),this}const nc=kn((e,t,a)=>{We(t,t.length,0,e,a)}),sc=kn((e,t,a)=>{We(t,0,0,e,a)});function wn(e){return function(t){const a=this.length-1,i=this.parents().last();for(let n=0;n<this.length;n++){const r=this[n],u=typeof t=="function"?t.call(r,n,r):typeof t=="string"&&!Wa(t)?i.find(t).clone():t,[o]=this._makeDomArray(u,n<a);if(!o||!re(o))continue;let l=o,h=0;for(;h<l.children.length;){const m=l.children[h];w(m)?(l=m,h=0):h++}e(r,l,[o])}return this}}const rc=wn((e,t,a)=>{const{parent:i}=e;if(!i)return;const n=i.children,r=n.indexOf(e);et([e],t),We(n,r,0,a,i)}),uc=wn((e,t,a)=>{re(e)&&(et(e.children,t),et(a,e))});function oc(e){return this.parent(e).not("body").each((t,a)=>{this._make(a).replaceWith(a.children)}),this}function cc(e){const t=this[0];if(t){const a=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t);let i;for(let r=0;r<a.length;r++)a[r].type==="tag"&&(i=a[r]);let n=0;for(;i&&n<i.children.length;){const r=i.children[n];r.type==="tag"?(i=r,n=0):n++}i&&this._make(i).append(this)}return this}function lc(...e){const t=this.length-1;return Z(this,(a,i)=>{if(!re(a)||!a.parent)return;const n=a.parent.children,r=n.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,i,this._render(a.children)):e,o=this._makeDomArray(u,i<t);We(n,r+1,0,o,a.parent)})}function dc(e){typeof e=="string"&&(e=this._make(e)),this.remove();const t=[];for(const a of this._makeDomArray(e)){const i=this.clone().toArray(),{parent:n}=a;if(!n)continue;const r=n.children,u=r.indexOf(a);u<0||(We(r,u+1,0,i,n),t.push(...i))}return this._make(t)}function hc(...e){const t=this.length-1;return Z(this,(a,i)=>{if(!re(a)||!a.parent)return;const n=a.parent.children,r=n.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,i,this._render(a.children)):e,o=this._makeDomArray(u,i<t);We(n,r,0,o,a.parent)})}function fc(e){const t=this._make(e);this.remove();const a=[];return Z(t,i=>{const n=this.clone().toArray(),{parent:r}=i;if(!r)return;const u=r.children,o=u.indexOf(i);o<0||(We(u,o,0,n,r),a.push(...n))}),this._make(a)}function mc(e){const t=e?this.filter(e):this;return Z(t,a=>{Ke(a),a.prev=a.next=a.parent=null}),this}function Ec(e){return Z(this,(t,a)=>{const{parent:i}=t;if(!i)return;const n=i.children,r=typeof e=="function"?e.call(t,a,t):e,u=this._makeDomArray(r);et(u,null);const o=n.indexOf(t);We(n,o,1,u,i),u.includes(t)||(t.parent=t.prev=t.next=null)})}function Tc(){return Z(this,e=>{if(re(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function pc(e){if(e===void 0){const t=this[0];return!t||!re(t)?null:this._render(t.children)}return Z(this,t=>{if(!re(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=Be(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;et(a,t)})}function bc(){return this._render(this)}function gc(e){return e===void 0?Nt(this):typeof e=="function"?Z(this,(t,a)=>this._make(t).text(e.call(t,a,Nt([t])))):Z(this,t=>{if(!re(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=new _t(`${e}`);et(a,t)})}function _c(){const e=Array.prototype.map.call(this.get(),a=>At(a,!0)),t=new ze(e);for(const a of e)a.parent=t;return this._make(e)}const Ac=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:tc,after:lc,append:nc,appendTo:ac,before:hc,clone:_c,empty:Tc,html:pc,insertAfter:dc,insertBefore:fc,prepend:sc,prependTo:ic,remove:mc,replaceWith:Ec,text:gc,toString:bc,unwrap:oc,wrap:rc,wrapAll:cc,wrapInner:uc},Symbol.toStringTag,{value:"Module"}));function Nc(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return Z(this,(a,i)=>{w(a)&&Bn(a,e,t,i)});if(this.length!==0)return vn(this[0],e)}function Bn(e,t,a,i){if(typeof t=="string"){const n=vn(e),r=typeof a=="function"?a.call(e,i,n[t]):a;r===""?delete n[t]:r!=null&&(n[t]=r),e.attribs.style=Cc(n)}else if(typeof t=="object"){const n=Object.keys(t);for(let r=0;r<n.length;r++){const u=n[r];Bn(e,u,t[u],r)}}}function vn(e,t){if(!e||!w(e))return;const a=Ic(e.attribs.style);if(typeof t=="string")return a[t];if(Array.isArray(t)){const i={};for(const n of t)a[n]!=null&&(i[n]=a[n]);return i}return a}function Cc(e){return Object.keys(e).reduce((t,a)=>`${t}${t?" ":""}${a}: ${e[a]};`,"")}function Ic(e){if(e=(e||"").trim(),!e)return{};const t={};let a;for(const i of e.split(";")){const n=i.indexOf(":");if(n<1||n===i.length-1){const r=i.trimEnd();r.length>0&&a!==void 0&&(t[a]+=`;${r}`)}else a=i.slice(0,n).trim(),t[a]=i.slice(n+1).trim()}return t}const Sc=Object.freeze(Object.defineProperty({__proto__:null,css:Nc},Symbol.toStringTag,{value:"Module"})),Un="input,select,textarea,keygen",xc=/%20/g,Fn=/\r?\n/g;function Oc(){return this.serializeArray().map(a=>`${encodeURIComponent(a.name)}=${encodeURIComponent(a.value)}`).join("&").replace(xc,"+")}function Dc(){return this.map((e,t)=>{const a=this._make(t);return w(t)&&t.name==="form"?a.find(Un).toArray():a.filter(Un).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var a;const i=this._make(t),n=i.attr("name"),r=(a=i.val())!==null&&a!==void 0?a:"";return Array.isArray(r)?r.map(u=>({name:n,value:u.replace(Fn,`\r
7
+ `)})):{name:n,value:r.replace(Fn,`\r
8
+ `)}}).toArray()}const Lc=Object.freeze(Object.defineProperty({__proto__:null,serialize:Oc,serializeArray:Dc},Symbol.toStringTag,{value:"Module"}));function yc(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function Rc(e){const t={};for(const a in e){const i=e[a],n=Array.isArray(i),{selector:r,value:u}=yc(n?i[0]:i),o=typeof u=="function"?u:typeof u=="string"?l=>this._make(l).prop(u):l=>this._make(l).extract(u);if(n)t[a]=this._findBySelector(r,Number.POSITIVE_INFINITY).map((l,h)=>o(h,a,t)).get();else{const l=this._findBySelector(r,1);t[a]=l.length>0?o(l[0],a,t):void 0}}return t}const Mc=Object.freeze(Object.defineProperty({__proto__:null,extract:Rc},Symbol.toStringTag,{value:"Module"}));class Lt{constructor(t,a,i){if(this.length=0,this.options=i,this._root=a,t){for(let n=0;n<t.length;n++)this[n]=t[n];this.length=t.length}}}Lt.prototype.cheerio="[cheerio object]",Lt.prototype.splice=Array.prototype.splice,Lt.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(Lt.prototype,vu,Jo,Ac,Sc,Lc,Mc);function Pc(e,t){return function a(i,n,r=!0){if(i==null)throw new Error("cheerio.load() expects a string");const u=qa(n),o=e(i,u,r,null);class l extends Lt{_make(T,b){const N=h(T,b);return N.prevObject=this,N}_parse(T,b,N,I){return e(T,b,N,I)}_render(T){return t(T,this.options)}}function h(m,T,b=o,N){if(m&&Be(m))return m;const I=qa(N,u),y=typeof b=="string"?[e(b,I,!1,null)]:"length"in b?b:[b],P=Be(y)?y:new l(y,null,I);if(P._root=P,!m)return new l(void 0,P,I);const $=typeof m=="string"&&Wa(m)?e(m,I,!1,null).children:kc(m)?[m]:Array.isArray(m)?m:void 0,v=new l($,P,I);if($)return v;if(typeof m!="string")throw new TypeError("Unexpected type of selector");let q=m;const V=T?typeof T=="string"?Wa(T)?new l([e(T,I,!1,null)],P,I):(q=`${T} ${q}`,P):Be(T)?T:new l(Array.isArray(T)?T:[T],P,I):P;return V?V.find(q):v}return Object.assign(h,Su,{load:a,_root:o,_options:u,fn:l.prototype,prototype:l.prototype}),h}}function kc(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const wc=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]),j="�";var d;(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.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_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_Z=122]="LATIN_SMALL_Z"})(d||(d={}));const pe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Hn(e){return e>=55296&&e<=57343}function Bc(e){return e>=56320&&e<=57343}function vc(e,t){return(e-55296)*1024+9216+t}function Vn(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Yn(e){return e>=64976&&e<=65007||wc.has(e)}var g;(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"})(g||(g={}));const Uc=65536;class Fc{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Uc,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,a){const{line:i,col:n,offset:r}=this,u=n+a,o=r+a;return{code:t,startLine:i,endLine:i,startCol:u,endCol:u,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const a=this.html.charCodeAt(this.pos+1);if(Bc(a))return this.pos++,this._addGap(),vc(t,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,d.EOF;return this._err(g.surrogateInInputStream),t}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(t,a){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=a}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,a){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(a)return this.html.startsWith(t,this.pos);for(let i=0;i<t.length;i++)if((this.html.charCodeAt(this.pos+i)|32)!==t.charCodeAt(i))return!1;return!0}peek(t){const a=this.pos+t;if(a>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,d.EOF;const i=this.html.charCodeAt(a);return i===d.CARRIAGE_RETURN?d.LINE_FEED:i}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,d.EOF;let t=this.html.charCodeAt(this.pos);return t===d.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,d.LINE_FEED):t===d.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Hn(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===d.LINE_FEED||t===d.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Vn(t)?this._err(g.controlCharacterInInputStream):Yn(t)&&this._err(g.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var W;(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"})(W||(W={}));function qn(e,t){for(let a=e.attrs.length-1;a>=0;a--)if(e.attrs[a].name===t)return e.attrs[a].value;return null}var A;(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/"})(A||(A={}));var tt;(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"})(tt||(tt={}));var Ne;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ne||(Ne={}));var p;(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.SEARCH="search",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"})(p||(p={}));var s;(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.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(s||(s={}));const Hc=new Map([[p.A,s.A],[p.ADDRESS,s.ADDRESS],[p.ANNOTATION_XML,s.ANNOTATION_XML],[p.APPLET,s.APPLET],[p.AREA,s.AREA],[p.ARTICLE,s.ARTICLE],[p.ASIDE,s.ASIDE],[p.B,s.B],[p.BASE,s.BASE],[p.BASEFONT,s.BASEFONT],[p.BGSOUND,s.BGSOUND],[p.BIG,s.BIG],[p.BLOCKQUOTE,s.BLOCKQUOTE],[p.BODY,s.BODY],[p.BR,s.BR],[p.BUTTON,s.BUTTON],[p.CAPTION,s.CAPTION],[p.CENTER,s.CENTER],[p.CODE,s.CODE],[p.COL,s.COL],[p.COLGROUP,s.COLGROUP],[p.DD,s.DD],[p.DESC,s.DESC],[p.DETAILS,s.DETAILS],[p.DIALOG,s.DIALOG],[p.DIR,s.DIR],[p.DIV,s.DIV],[p.DL,s.DL],[p.DT,s.DT],[p.EM,s.EM],[p.EMBED,s.EMBED],[p.FIELDSET,s.FIELDSET],[p.FIGCAPTION,s.FIGCAPTION],[p.FIGURE,s.FIGURE],[p.FONT,s.FONT],[p.FOOTER,s.FOOTER],[p.FOREIGN_OBJECT,s.FOREIGN_OBJECT],[p.FORM,s.FORM],[p.FRAME,s.FRAME],[p.FRAMESET,s.FRAMESET],[p.H1,s.H1],[p.H2,s.H2],[p.H3,s.H3],[p.H4,s.H4],[p.H5,s.H5],[p.H6,s.H6],[p.HEAD,s.HEAD],[p.HEADER,s.HEADER],[p.HGROUP,s.HGROUP],[p.HR,s.HR],[p.HTML,s.HTML],[p.I,s.I],[p.IMG,s.IMG],[p.IMAGE,s.IMAGE],[p.INPUT,s.INPUT],[p.IFRAME,s.IFRAME],[p.KEYGEN,s.KEYGEN],[p.LABEL,s.LABEL],[p.LI,s.LI],[p.LINK,s.LINK],[p.LISTING,s.LISTING],[p.MAIN,s.MAIN],[p.MALIGNMARK,s.MALIGNMARK],[p.MARQUEE,s.MARQUEE],[p.MATH,s.MATH],[p.MENU,s.MENU],[p.META,s.META],[p.MGLYPH,s.MGLYPH],[p.MI,s.MI],[p.MO,s.MO],[p.MN,s.MN],[p.MS,s.MS],[p.MTEXT,s.MTEXT],[p.NAV,s.NAV],[p.NOBR,s.NOBR],[p.NOFRAMES,s.NOFRAMES],[p.NOEMBED,s.NOEMBED],[p.NOSCRIPT,s.NOSCRIPT],[p.OBJECT,s.OBJECT],[p.OL,s.OL],[p.OPTGROUP,s.OPTGROUP],[p.OPTION,s.OPTION],[p.P,s.P],[p.PARAM,s.PARAM],[p.PLAINTEXT,s.PLAINTEXT],[p.PRE,s.PRE],[p.RB,s.RB],[p.RP,s.RP],[p.RT,s.RT],[p.RTC,s.RTC],[p.RUBY,s.RUBY],[p.S,s.S],[p.SCRIPT,s.SCRIPT],[p.SEARCH,s.SEARCH],[p.SECTION,s.SECTION],[p.SELECT,s.SELECT],[p.SOURCE,s.SOURCE],[p.SMALL,s.SMALL],[p.SPAN,s.SPAN],[p.STRIKE,s.STRIKE],[p.STRONG,s.STRONG],[p.STYLE,s.STYLE],[p.SUB,s.SUB],[p.SUMMARY,s.SUMMARY],[p.SUP,s.SUP],[p.TABLE,s.TABLE],[p.TBODY,s.TBODY],[p.TEMPLATE,s.TEMPLATE],[p.TEXTAREA,s.TEXTAREA],[p.TFOOT,s.TFOOT],[p.TD,s.TD],[p.TH,s.TH],[p.THEAD,s.THEAD],[p.TITLE,s.TITLE],[p.TR,s.TR],[p.TRACK,s.TRACK],[p.TT,s.TT],[p.U,s.U],[p.UL,s.UL],[p.SVG,s.SVG],[p.VAR,s.VAR],[p.WBR,s.WBR],[p.XMP,s.XMP]]);function da(e){var t;return(t=Hc.get(e))!==null&&t!==void 0?t:s.UNKNOWN}const S=s,Vc={[A.HTML]:new Set([S.ADDRESS,S.APPLET,S.AREA,S.ARTICLE,S.ASIDE,S.BASE,S.BASEFONT,S.BGSOUND,S.BLOCKQUOTE,S.BODY,S.BR,S.BUTTON,S.CAPTION,S.CENTER,S.COL,S.COLGROUP,S.DD,S.DETAILS,S.DIR,S.DIV,S.DL,S.DT,S.EMBED,S.FIELDSET,S.FIGCAPTION,S.FIGURE,S.FOOTER,S.FORM,S.FRAME,S.FRAMESET,S.H1,S.H2,S.H3,S.H4,S.H5,S.H6,S.HEAD,S.HEADER,S.HGROUP,S.HR,S.HTML,S.IFRAME,S.IMG,S.INPUT,S.LI,S.LINK,S.LISTING,S.MAIN,S.MARQUEE,S.MENU,S.META,S.NAV,S.NOEMBED,S.NOFRAMES,S.NOSCRIPT,S.OBJECT,S.OL,S.P,S.PARAM,S.PLAINTEXT,S.PRE,S.SCRIPT,S.SECTION,S.SELECT,S.SOURCE,S.STYLE,S.SUMMARY,S.TABLE,S.TBODY,S.TD,S.TEMPLATE,S.TEXTAREA,S.TFOOT,S.TH,S.THEAD,S.TITLE,S.TR,S.TRACK,S.UL,S.WBR,S.XMP]),[A.MATHML]:new Set([S.MI,S.MO,S.MN,S.MS,S.MTEXT,S.ANNOTATION_XML]),[A.SVG]:new Set([S.TITLE,S.FOREIGN_OBJECT,S.DESC]),[A.XLINK]:new Set,[A.XML]:new Set,[A.XMLNS]:new Set},li=new Set([S.H1,S.H2,S.H3,S.H4,S.H5,S.H6]),Yc=new Set([p.STYLE,p.SCRIPT,p.XMP,p.IFRAME,p.NOEMBED,p.NOFRAMES,p.PLAINTEXT]);function qc(e,t){return Yc.has(e)||t&&e===p.NOSCRIPT}var f;(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.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(f||(f={}));const be={DATA:f.DATA,RCDATA:f.RCDATA,RAWTEXT:f.RAWTEXT,SCRIPT_DATA:f.SCRIPT_DATA,PLAINTEXT:f.PLAINTEXT,CDATA_SECTION:f.CDATA_SECTION};function Wc(e){return e>=d.DIGIT_0&&e<=d.DIGIT_9}function yt(e){return e>=d.LATIN_CAPITAL_A&&e<=d.LATIN_CAPITAL_Z}function $c(e){return e>=d.LATIN_SMALL_A&&e<=d.LATIN_SMALL_Z}function $e(e){return $c(e)||yt(e)}function Wn(e){return $e(e)||Wc(e)}function ha(e){return e+32}function $n(e){return e===d.SPACE||e===d.LINE_FEED||e===d.TABULATION||e===d.FORM_FEED}function Gn(e){return $n(e)||e===d.SOLIDUS||e===d.GREATER_THAN_SIGN}function Gc(e){return e===d.NULL?g.nullCharacterReference:e>1114111?g.characterReferenceOutsideUnicodeRange:Hn(e)?g.surrogateCharacterReference:Yn(e)?g.noncharacterCharacterReference:Vn(e)||e===d.CARRIAGE_RETURN?g.controlCharacterReference:null}let Xc=class{constructor(t,a){this.options=t,this.handler=a,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=f.DATA,this.returnState=f.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Fc(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Ua(ka,(i,n)=>{this.preprocessor.pos=this.entityStartPos+n-1,this._flushCodePointConsumedAsCharacterReference(i)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(g.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(g.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const n=Gc(i);n&&this._err(n,1)}}:void 0)}_err(t,a=0){var i,n;(n=(i=this.handler).onParseError)===null||n===void 0||n.call(i,this.preprocessor.getError(t,a))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,a,i){this.active=!0,this.preprocessor.write(t,a),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let a=0;a<t;a++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,a){return this.preprocessor.startsWith(t,a)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:W.START_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:W.END_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:W.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:W.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,a){this.currentCharacterToken={type:t,chars:a,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,a;const i=this.currentToken;if(qn(i,this.currentAttr.name)===null){if(i.attrs.push(this.currentAttr),i.location&&this.currentLocation){const n=(t=(a=i.location).attrs)!==null&&t!==void 0?t:a.attrs=Object.create(null);n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(g.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=da(t.tagName),t.type===W.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(g.endTagWithAttributes),t.selfClosing&&this._err(g.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case W.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case W.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case W.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:W.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,a){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=a;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,a)}_emitCodePoint(t){const a=$n(t)?W.WHITESPACE_CHARACTER:t===d.NULL?W.NULL_CHARACTER:W.CHARACTER;this._appendCharToCurrentCharacterToken(a,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(W.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=f.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ie.Attribute:Ie.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===f.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===f.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===f.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case f.DATA:{this._stateData(t);break}case f.RCDATA:{this._stateRcdata(t);break}case f.RAWTEXT:{this._stateRawtext(t);break}case f.SCRIPT_DATA:{this._stateScriptData(t);break}case f.PLAINTEXT:{this._statePlaintext(t);break}case f.TAG_OPEN:{this._stateTagOpen(t);break}case f.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case f.TAG_NAME:{this._stateTagName(t);break}case f.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case f.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case f.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case f.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case f.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case f.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case f.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case f.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case f.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case f.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case f.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case f.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case f.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case f.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case f.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case f.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case f.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case f.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case f.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case f.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case f.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case f.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case f.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case f.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case f.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case f.BOGUS_COMMENT:{this._stateBogusComment(t);break}case f.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case f.COMMENT_START:{this._stateCommentStart(t);break}case f.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case f.COMMENT:{this._stateComment(t);break}case f.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case f.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case f.COMMENT_END:{this._stateCommentEnd(t);break}case f.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case f.DOCTYPE:{this._stateDoctype(t);break}case f.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case f.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case f.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case f.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case f.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case f.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case f.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case f.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case f.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case f.CDATA_SECTION:{this._stateCdataSection(t);break}case f.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case f.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case f.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case f.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.TAG_OPEN;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitCodePoint(t);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case d.AMPERSAND:{this._startCharacterReference();break}case d.LESS_THAN_SIGN:{this.state=f.RCDATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.RAWTEXT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if($e(t))this._createStartTagToken(),this.state=f.TAG_NAME,this._stateTagName(t);else switch(t){case d.EXCLAMATION_MARK:{this.state=f.MARKUP_DECLARATION_OPEN;break}case d.SOLIDUS:{this.state=f.END_TAG_OPEN;break}case d.QUESTION_MARK:{this._err(g.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=f.BOGUS_COMMENT,this._stateBogusComment(t);break}case d.EOF:{this._err(g.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(g.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=f.DATA,this._stateData(t)}}_stateEndTagOpen(t){if($e(t))this._createEndTagToken(),this.state=f.TAG_NAME,this._stateTagName(t);else switch(t){case d.GREATER_THAN_SIGN:{this._err(g.missingEndTagName),this.state=f.DATA;break}case d.EOF:{this._err(g.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(g.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=f.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this.state=f.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.tagName+=j;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(yt(t)?ha(t):t)}}_stateRcdataLessThanSign(t){t===d.SOLIDUS?this.state=f.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=f.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){$e(t)?(this.state=f.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=f.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const a=this.currentToken;switch(a.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=f.BEFORE_ATTRIBUTE_NAME,!1;case d.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=f.SELF_CLOSING_START_TAG,!1;case d.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=f.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===d.SOLIDUS?this.state=f.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){$e(t)?(this.state=f.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case d.SOLIDUS:{this.state=f.SCRIPT_DATA_END_TAG_OPEN;break}case d.EXCLAMATION_MARK:{this.state=f.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=f.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){$e(t)?(this.state=f.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===d.HYPHEN_MINUS?(this.state=f.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===d.HYPHEN_MINUS?(this.state=f.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_ESCAPED,this._emitChars(j);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.GREATER_THAN_SIGN:{this.state=f.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_ESCAPED,this._emitChars(j);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===d.SOLIDUS?this.state=f.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:$e(t)?(this._emitChars("<"),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){$e(t)?(this.state=f.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(pe.SCRIPT,!1)&&Gn(this.preprocessor.peek(pe.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<pe.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(j);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.GREATER_THAN_SIGN:{this.state=f.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(j);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===d.SOLIDUS?(this.state=f.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(pe.SCRIPT,!1)&&Gn(this.preprocessor.peek(pe.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<pe.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=f.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.SOLIDUS:case d.GREATER_THAN_SIGN:case d.EOF:{this.state=f.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._err(g.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=f.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=f.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:case d.SOLIDUS:case d.GREATER_THAN_SIGN:case d.EOF:{this._leaveAttrName(),this.state=f.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._leaveAttrName(),this.state=f.BEFORE_ATTRIBUTE_VALUE;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:{this._err(g.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.name+=j;break}default:this.currentAttr.name+=String.fromCodePoint(yt(t)?ha(t):t)}}_stateAfterAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.SOLIDUS:{this.state=f.SELF_CLOSING_START_TAG;break}case d.EQUALS_SIGN:{this.state=f.BEFORE_ATTRIBUTE_VALUE;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=f.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{this.state=f.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this.state=f.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingAttributeValue),this.state=f.DATA,this.emitCurrentTagToken();break}default:this.state=f.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=j;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case d.APOSTROPHE:{this.state=f.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=j;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this._leaveAttrValue(),this.state=f.BEFORE_ATTRIBUTE_NAME;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=f.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=j;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:case d.EQUALS_SIGN:case d.GRAVE_ACCENT:{this._err(g.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this._leaveAttrValue(),this.state=f.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this._leaveAttrValue(),this.state=f.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.missingWhitespaceBetweenAttributes),this.state=f.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case d.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.unexpectedSolidusInTag),this.state=f.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=j;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(pe.DASH_DASH,!0)?(this._createCommentToken(pe.DASH_DASH.length+1),this.state=f.COMMENT_START):this._consumeSequenceIfMatch(pe.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(pe.DOCTYPE.length+1),this.state=f.DOCTYPE):this._consumeSequenceIfMatch(pe.CDATA_START,!0)?this.inForeignNode?this.state=f.CDATA_SECTION:(this._err(g.cdataInHtmlContent),this._createCommentToken(pe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=f.BOGUS_COMMENT):this._ensureHibernation()||(this._err(g.incorrectlyOpenedComment),this._createCommentToken(2),this.state=f.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_START_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=f.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=f.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=f.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END_DASH;break}case d.LESS_THAN_SIGN:{a.data+="<",this.state=f.COMMENT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=j;break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const a=this.currentToken;switch(t){case d.EXCLAMATION_MARK:{a.data+="!",this.state=f.COMMENT_LESS_THAN_SIGN_BANG;break}case d.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=f.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===d.HYPHEN_MINUS?this.state=f.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=f.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===d.HYPHEN_MINUS?this.state=f.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=f.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==d.GREATER_THAN_SIGN&&t!==d.EOF&&this._err(g.nestedComment),this.state=f.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END;break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=f.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentComment(a);break}case d.EXCLAMATION_MARK:{this.state=f.COMMENT_END_BANG;break}case d.HYPHEN_MINUS:{a.data+="-";break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--",this.state=f.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{a.data+="--!",this.state=f.COMMENT_END_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.incorrectlyClosedComment),this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=f.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=f.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case d.EOF:{this._err(g.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingWhitespaceBeforeDoctypeName),this.state=f.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(yt(t))this._createDoctypeToken(String.fromCharCode(ha(t))),this.state=f.DOCTYPE_NAME;else switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.NULL:{this._err(g.unexpectedNullCharacter),this._createDoctypeToken(j),this.state=f.DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeName),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=f.DOCTYPE_NAME}}_stateDoctypeName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.AFTER_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.name+=j;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(yt(t)?ha(t):t)}}_stateAfterDoctypeName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(pe.PUBLIC,!1)?this.state=f.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(pe.SYSTEM,!1)?this.state=f.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(g.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=j;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case d.APOSTROPHE:{this.state=f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=j;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.QUOTATION_MARK:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=j;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case d.APOSTROPHE:{this.state=f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=j;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.NULL:{this._err(g.unexpectedNullCharacter);break}case d.EOF:{this.emitCurrentDoctype(a),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case d.RIGHT_SQUARE_BRACKET:{this.state=f.CDATA_SECTION_BRACKET;break}case d.EOF:{this._err(g.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===d.RIGHT_SQUARE_BRACKET?this.state=f.CDATA_SECTION_END:(this._emitChars("]"),this.state=f.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA;break}case d.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=f.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(d.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Wn(this.preprocessor.peek(1))?f.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Wn(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===d.SEMICOLON&&this._err(g.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const Xn=new Set([s.DD,s.DT,s.LI,s.OPTGROUP,s.OPTION,s.P,s.RB,s.RP,s.RT,s.RTC]),Qn=new Set([...Xn,s.CAPTION,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]),fa=new Set([s.APPLET,s.CAPTION,s.HTML,s.MARQUEE,s.OBJECT,s.TABLE,s.TD,s.TEMPLATE,s.TH]),Qc=new Set([...fa,s.OL,s.UL]),jc=new Set([...fa,s.BUTTON]),jn=new Set([s.ANNOTATION_XML,s.MI,s.MN,s.MO,s.MS,s.MTEXT]),zn=new Set([s.DESC,s.FOREIGN_OBJECT,s.TITLE]),zc=new Set([s.TR,s.TEMPLATE,s.HTML]),Kc=new Set([s.TBODY,s.TFOOT,s.THEAD,s.TEMPLATE,s.HTML]),Zc=new Set([s.TABLE,s.TEMPLATE,s.HTML]),Jc=new Set([s.TD,s.TH]);class el{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,a,i){this.treeAdapter=a,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=s.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===s.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===A.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,a){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=a,this.currentTagId=a,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,a,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,a){const i=this._indexOf(t);this.items[i]=a,i===this.stackTop&&(this.current=a)}insertAfter(t,a,i){const n=this._indexOf(t)+1;this.items.splice(n,0,a),this.tagIDs.splice(n,0,i),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(t){let a=this.stackTop+1;do a=this.tagIDs.lastIndexOf(t,a-1);while(a>0&&this.treeAdapter.getNamespaceURI(this.items[a])!==A.HTML);this.shortenToLength(a<0?0:a)}shortenToLength(t){for(;this.stackTop>=t;){const a=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(a,this.stackTop<t)}}popUntilElementPopped(t){const a=this._indexOf(t);this.shortenToLength(a<0?0:a)}popUntilPopped(t,a){const i=this._indexOfTagNames(t,a);this.shortenToLength(i<0?0:i)}popUntilNumberedHeaderPopped(){this.popUntilPopped(li,A.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Jc,A.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,a){for(let i=this.stackTop;i>=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===a)return i;return-1}clearBackTo(t,a){const i=this._indexOfTagNames(t,a);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(Zc,A.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Kc,A.HTML)}clearBackToTableRowContext(){this.clearBackTo(zc,A.HTML)}remove(t){const a=this._indexOf(t);a>=0&&(a===this.stackTop?this.pop():(this.items.splice(a,1),this.tagIDs.splice(a,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===s.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const a=this._indexOf(t)-1;return a>=0?this.items[a]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===s.HTML}hasInDynamicScope(t,a){for(let i=this.stackTop;i>=0;i--){const n=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case A.HTML:{if(n===t)return!0;if(a.has(n))return!1;break}case A.SVG:{if(zn.has(n))return!1;break}case A.MATHML:{if(jn.has(n))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,fa)}hasInListItemScope(t){return this.hasInDynamicScope(t,Qc)}hasInButtonScope(t){return this.hasInDynamicScope(t,jc)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case A.HTML:{if(li.has(a))return!0;if(fa.has(a))return!1;break}case A.SVG:{if(zn.has(a))return!1;break}case A.MATHML:{if(jn.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===A.HTML)switch(this.tagIDs[a]){case t:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===A.HTML)switch(this.tagIDs[t]){case s.TBODY:case s.THEAD:case s.TFOOT:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasInSelectScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===A.HTML)switch(this.tagIDs[a]){case t:return!0;case s.OPTION:case s.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;Xn.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Qn.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&Qn.has(this.currentTagId);)this.pop()}}const di=3;var Me;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Me||(Me={}));const Kn={type:Me.Marker};class tl{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,a){const i=[],n=a.length,r=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===Me.Marker)break;const{element:h}=l;if(this.treeAdapter.getTagName(h)===r&&this.treeAdapter.getNamespaceURI(h)===u){const m=this.treeAdapter.getAttrList(h);m.length===n&&i.push({idx:o,attrs:m})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<di)return;const a=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,a);if(i.length<di)return;const n=new Map(a.map(u=>[u.name,u.value]));let r=0;for(let u=0;u<i.length;u++){const o=i[u];o.attrs.every(l=>n.get(l.name)===l.value)&&(r+=1,r>=di&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Kn)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:Me.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:Me.Element,element:t,token:a})}removeEntry(t){const a=this.entries.indexOf(t);a>=0&&this.entries.splice(a,1)}clearToLastMarker(){const t=this.entries.indexOf(Kn);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const a=this.entries.find(i=>i.type===Me.Marker||this.treeAdapter.getTagName(i.element)===t);return a&&a.type===Me.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===Me.Element&&a.element===t)}}const ve={createDocument(){return{nodeName:"#document",mode:Ne.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,a){return{nodeName:e,tagName:e,attrs:a,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,a){const i=e.childNodes.indexOf(a);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,a,i){const n=e.childNodes.find(r=>r.nodeName==="#documentType");if(n)n.name=t,n.publicId=a,n.systemId=i;else{const r={nodeName:"#documentType",name:t,publicId:a,systemId:i,parentNode:null};ve.appendChild(e,r)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const a=e.childNodes[e.childNodes.length-1];if(ve.isTextNode(a)){a.value+=t;return}}ve.appendChild(e,ve.createTextNode(t))},insertTextBefore(e,t,a){const i=e.childNodes[e.childNodes.indexOf(a)-1];i&&ve.isTextNode(i)?i.value+=t:ve.insertBefore(e,ve.createTextNode(t),a)},adoptAttributes(e,t){const a=new Set(e.attrs.map(i=>i.name));for(let i=0;i<t.length;i++)a.has(t[i].name)||e.attrs.push(t[i])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Zn="html",al="about:legacy-compat",il="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Jn=["+//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//"],nl=[...Jn,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],sl=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),es=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],rl=[...es,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ts(e,t){return t.some(a=>e.startsWith(a))}function ul(e){return e.name===Zn&&e.publicId===null&&(e.systemId===null||e.systemId===al)}function ol(e){if(e.name!==Zn)return Ne.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===il)return Ne.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),sl.has(a))return Ne.QUIRKS;let i=t===null?nl:Jn;if(ts(a,i))return Ne.QUIRKS;if(i=t===null?es:rl,ts(a,i))return Ne.LIMITED_QUIRKS}return Ne.NO_QUIRKS}const as={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},cl="definitionurl",ll="definitionURL",dl=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])),hl=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:A.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:A.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:A.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:A.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:A.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:A.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:A.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:A.XML}],["xml:space",{prefix:"xml",name:"space",namespace:A.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:A.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:A.XMLNS}]]),fl=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])),ml=new Set([s.B,s.BIG,s.BLOCKQUOTE,s.BODY,s.BR,s.CENTER,s.CODE,s.DD,s.DIV,s.DL,s.DT,s.EM,s.EMBED,s.H1,s.H2,s.H3,s.H4,s.H5,s.H6,s.HEAD,s.HR,s.I,s.IMG,s.LI,s.LISTING,s.MENU,s.META,s.NOBR,s.OL,s.P,s.PRE,s.RUBY,s.S,s.SMALL,s.SPAN,s.STRONG,s.STRIKE,s.SUB,s.SUP,s.TABLE,s.TT,s.U,s.UL,s.VAR]);function El(e){const t=e.tagID;return t===s.FONT&&e.attrs.some(({name:i})=>i===tt.COLOR||i===tt.SIZE||i===tt.FACE)||ml.has(t)}function is(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===cl){e.attrs[t].name=ll;break}}function ns(e){for(let t=0;t<e.attrs.length;t++){const a=dl.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function hi(e){for(let t=0;t<e.attrs.length;t++){const a=hl.get(e.attrs[t].name);a&&(e.attrs[t].prefix=a.prefix,e.attrs[t].name=a.name,e.attrs[t].namespace=a.namespace)}}function Tl(e){const t=fl.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=da(e.tagName))}function pl(e,t){return t===A.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}function bl(e,t,a){if(t===A.MATHML&&e===s.ANNOTATION_XML){for(let i=0;i<a.length;i++)if(a[i].name===tt.ENCODING){const n=a[i].value.toLowerCase();return n===as.TEXT_HTML||n===as.APPLICATION_XML}}return t===A.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}function gl(e,t,a,i){return(!i||i===A.HTML)&&bl(e,t,a)||(!i||i===A.MATHML)&&pl(e,t)}const _l="hidden",Al=8,Nl=3;var E;(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"})(E||(E={}));const Cl={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ss=new Set([s.TABLE,s.TBODY,s.TFOOT,s.THEAD,s.TR]),rs={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ve,onParseError:null};let us=class{constructor(t,a,i=null,n=null){this.fragmentContext=i,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=E.INITIAL,this.originalInsertionMode=E.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={...rs,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=a??this.treeAdapter.createDocument(),this.tokenizer=new Xc(this.options,this),this.activeFormattingElements=new tl(this.treeAdapter),this.fragmentContextID=i?da(this.treeAdapter.getTagName(i)):s.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new el(this.document,this.treeAdapter,this)}static parse(t,a){const i=new this(a);return i.tokenizer.write(t,!0),i.document}static getFragmentParser(t,a){const i={...rs,...a};t??(t=i.treeAdapter.createElement(p.TEMPLATE,A.HTML,[]));const n=i.treeAdapter.createElement("documentmock",A.HTML,[]),r=new this(i,n,t);return r.fragmentContextID===s.TEMPLATE&&r.tmplInsertionModeStack.unshift(E.IN_TEMPLATE),r._initTokenizerForFragmentParsing(),r._insertFakeRootElement(),r._resetInsertionMode(),r._findFormInFragmentContext(),r}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),a=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,a),a}_err(t,a,i){var n;if(!this.onParseError)return;const r=(n=t.location)!==null&&n!==void 0?n:Cl,u={code:a,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:i?r.startLine:r.endLine,endCol:i?r.startCol:r.endCol,endOffset:i?r.startOffset:r.endOffset};this.onParseError(u)}onItemPush(t,a,i){var n,r;(r=(n=this.treeAdapter).onItemPush)===null||r===void 0||r.call(n,t),i&&this.openElements.stackTop>0&&this._setContextModes(t,a)}onItemPop(t,a){var i,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(n=(i=this.treeAdapter).onItemPop)===null||n===void 0||n.call(i,t,this.openElements.current),a){let r,u;this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,u=this.fragmentContextID):{current:r,currentTagId:u}=this.openElements,this._setContextModes(r,u)}}_setContextModes(t,a){const i=t===this.document||this.treeAdapter.getNamespaceURI(t)===A.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,A.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=E.TEXT}switchToPlaintextParsing(){this.insertionMode=E.TEXT,this.originalInsertionMode=E.IN_BODY,this.tokenizer.state=be.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===p.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==A.HTML))switch(this.fragmentContextID){case s.TITLE:case s.TEXTAREA:{this.tokenizer.state=be.RCDATA;break}case s.STYLE:case s.XMP:case s.IFRAME:case s.NOEMBED:case s.NOFRAMES:case s.NOSCRIPT:{this.tokenizer.state=be.RAWTEXT;break}case s.SCRIPT:{this.tokenizer.state=be.SCRIPT_DATA;break}case s.PLAINTEXT:{this.tokenizer.state=be.PLAINTEXT;break}}}_setDocumentType(t){const a=t.name||"",i=t.publicId||"",n=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,a,i,n),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,a){if(this.options.sourceCodeLocationInfo){const i=a&&{...a,startTag:a};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i,t)}}_appendElement(t,a){const i=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,a){const i=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,a){const i=this.treeAdapter.createElement(t,A.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,A.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(a,i),this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(p.HTML,A.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,s.HTML)}_appendCommentNode(t,a){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(a,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let a,i;if(this._shouldFosterParentOnInsertion()?({parent:a,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(a,t.chars,i):this.treeAdapter.insertText(a,t.chars)):(a=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(a,t.chars)),!t.location)return;const n=this.treeAdapter.getChildNodes(a),r=i?n.lastIndexOf(i):n.length,u=n[r-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:l,endCol:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:l,endCol:h,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,a){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(a,i)}_setEndLocation(t,a){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&a.location){const i=a.location,n=this.treeAdapter.getTagName(t),r=a.type===W.END_TAG&&n===a.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,r)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let a,i;return this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,i=this.fragmentContextID):{current:a,currentTagId:i}=this.openElements,t.tagID===s.SVG&&this.treeAdapter.getTagName(a)===p.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===A.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===s.MGLYPH||t.tagID===s.MALIGNMARK)&&!this._isIntegrationPoint(i,a,A.HTML)}_processToken(t){switch(t.type){case W.CHARACTER:{this.onCharacter(t);break}case W.NULL_CHARACTER:{this.onNullCharacter(t);break}case W.COMMENT:{this.onComment(t);break}case W.DOCTYPE:{this.onDoctype(t);break}case W.START_TAG:{this._processStartTag(t);break}case W.END_TAG:{this.onEndTag(t);break}case W.EOF:{this.onEof(t);break}case W.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,i){const n=this.treeAdapter.getNamespaceURI(a),r=this.treeAdapter.getAttrList(a);return gl(t,n,r,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(n=>n.type===Me.Marker||this.openElements.contains(n.element)),i=a<0?t-1:a-1;for(let n=i;n>=0;n--){const r=this.activeFormattingElements.entries[n];this._insertElement(r.token,this.treeAdapter.getNamespaceURI(r.element)),r.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=E.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(s.P),this.openElements.popUntilTagNamePopped(s.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case s.TR:{this.insertionMode=E.IN_ROW;return}case s.TBODY:case s.THEAD:case s.TFOOT:{this.insertionMode=E.IN_TABLE_BODY;return}case s.CAPTION:{this.insertionMode=E.IN_CAPTION;return}case s.COLGROUP:{this.insertionMode=E.IN_COLUMN_GROUP;return}case s.TABLE:{this.insertionMode=E.IN_TABLE;return}case s.BODY:{this.insertionMode=E.IN_BODY;return}case s.FRAMESET:{this.insertionMode=E.IN_FRAMESET;return}case s.SELECT:{this._resetInsertionModeForSelect(t);return}case s.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case s.HTML:{this.insertionMode=this.headElement?E.AFTER_HEAD:E.BEFORE_HEAD;return}case s.TD:case s.TH:{if(t>0){this.insertionMode=E.IN_CELL;return}break}case s.HEAD:{if(t>0){this.insertionMode=E.IN_HEAD;return}break}}this.insertionMode=E.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let a=t-1;a>0;a--){const i=this.openElements.tagIDs[a];if(i===s.TEMPLATE)break;if(i===s.TABLE){this.insertionMode=E.IN_SELECT_IN_TABLE;return}}this.insertionMode=E.IN_SELECT}_isElementCausesFosterParenting(t){return ss.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const a=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case s.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(a)===A.HTML)return{parent:this.treeAdapter.getTemplateContent(a),beforeElement:null};break}case s.TABLE:{const i=this.treeAdapter.getParentNode(a);return i?{parent:i,beforeElement:a}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const a=this._findFosterParentingLocation();a.beforeElement?this.treeAdapter.insertBefore(a.parent,t,a.beforeElement):this.treeAdapter.appendChild(a.parent,t)}_isSpecialElement(t,a){const i=this.treeAdapter.getNamespaceURI(t);return Vc[i].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){J0(this,t);return}switch(this.insertionMode){case E.INITIAL:{Rt(this,t);break}case E.BEFORE_HTML:{Mt(this,t);break}case E.BEFORE_HEAD:{Pt(this,t);break}case E.IN_HEAD:{kt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{wt(this,t);break}case E.AFTER_HEAD:{Bt(this,t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:{cs(this,t);break}case E.TEXT:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Ti(this,t);break}case E.IN_TABLE_TEXT:{ps(this,t);break}case E.IN_COLUMN_GROUP:{Ta(this,t);break}case E.AFTER_BODY:{ga(this,t);break}case E.AFTER_AFTER_BODY:{_a(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Z0(this,t);return}switch(this.insertionMode){case E.INITIAL:{Rt(this,t);break}case E.BEFORE_HTML:{Mt(this,t);break}case E.BEFORE_HEAD:{Pt(this,t);break}case E.IN_HEAD:{kt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{wt(this,t);break}case E.AFTER_HEAD:{Bt(this,t);break}case E.TEXT:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Ti(this,t);break}case E.IN_COLUMN_GROUP:{Ta(this,t);break}case E.AFTER_BODY:{ga(this,t);break}case E.AFTER_AFTER_BODY:{_a(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){mi(this,t);return}switch(this.insertionMode){case E.INITIAL:case E.BEFORE_HTML:case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_TEMPLATE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{mi(this,t);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}case E.AFTER_BODY:{yl(this,t);break}case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{Rl(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case E.INITIAL:{Ml(this,t);break}case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:{this._err(t,g.misplacedDoctype);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,g.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?ed(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{Rt(this,t);break}case E.BEFORE_HTML:{Pl(this,t);break}case E.BEFORE_HEAD:{wl(this,t);break}case E.IN_HEAD:{Le(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Ul(this,t);break}case E.AFTER_HEAD:{Hl(this,t);break}case E.IN_BODY:{he(this,t);break}case E.IN_TABLE:{dt(this,t);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}case E.IN_CAPTION:{B0(this,t);break}case E.IN_COLUMN_GROUP:{pi(this,t);break}case E.IN_TABLE_BODY:{pa(this,t);break}case E.IN_ROW:{ba(this,t);break}case E.IN_CELL:{F0(this,t);break}case E.IN_SELECT:{_s(this,t);break}case E.IN_SELECT_IN_TABLE:{V0(this,t);break}case E.IN_TEMPLATE:{q0(this,t);break}case E.AFTER_BODY:{$0(this,t);break}case E.IN_FRAMESET:{G0(this,t);break}case E.AFTER_FRAMESET:{Q0(this,t);break}case E.AFTER_AFTER_BODY:{z0(this,t);break}case E.AFTER_AFTER_FRAMESET:{K0(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?td(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{Rt(this,t);break}case E.BEFORE_HTML:{kl(this,t);break}case E.BEFORE_HEAD:{Bl(this,t);break}case E.IN_HEAD:{vl(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Fl(this,t);break}case E.AFTER_HEAD:{Vl(this,t);break}case E.IN_BODY:{Ea(this,t);break}case E.TEXT:{x0(this,t);break}case E.IN_TABLE:{vt(this,t);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}case E.IN_CAPTION:{v0(this,t);break}case E.IN_COLUMN_GROUP:{U0(this,t);break}case E.IN_TABLE_BODY:{bi(this,t);break}case E.IN_ROW:{gs(this,t);break}case E.IN_CELL:{H0(this,t);break}case E.IN_SELECT:{As(this,t);break}case E.IN_SELECT_IN_TABLE:{Y0(this,t);break}case E.IN_TEMPLATE:{W0(this,t);break}case E.AFTER_BODY:{Cs(this,t);break}case E.IN_FRAMESET:{X0(this,t);break}case E.AFTER_FRAMESET:{j0(this,t);break}case E.AFTER_AFTER_BODY:{_a(this,t);break}}}onEof(t){switch(this.insertionMode){case E.INITIAL:{Rt(this,t);break}case E.BEFORE_HTML:{Mt(this,t);break}case E.BEFORE_HEAD:{Pt(this,t);break}case E.IN_HEAD:{kt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{wt(this,t);break}case E.AFTER_HEAD:{Bt(this,t);break}case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{Es(this,t);break}case E.TEXT:{O0(this,t);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}case E.IN_TEMPLATE:{Ns(this,t);break}case E.AFTER_BODY:case E.IN_FRAMESET:case E.AFTER_FRAMESET:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{Ei(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===d.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.TEXT:case E.IN_COLUMN_GROUP:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{this._insertCharacters(t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:case E.AFTER_BODY:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{os(this,t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Ti(this,t);break}case E.IN_TABLE_TEXT:{Ts(this,t);break}}}};function Il(e,t){let a=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return a?e.openElements.contains(a.element)?e.openElements.hasInScope(t.tagID)||(a=null):(e.activeFormattingElements.removeEntry(a),a=null):ms(e,t),a}function Sl(e,t){let a=null,i=e.openElements.stackTop;for(;i>=0;i--){const n=e.openElements.items[i];if(n===t.element)break;e._isSpecialElement(n,e.openElements.tagIDs[i])&&(a=n)}return a||(e.openElements.shortenToLength(i<0?0:i),e.activeFormattingElements.removeEntry(t)),a}function xl(e,t,a){let i=t,n=e.openElements.getCommonAncestor(t);for(let r=0,u=n;u!==a;r++,u=n){n=e.openElements.getCommonAncestor(u);const o=e.activeFormattingElements.getElementEntry(u),l=o&&r>=Nl;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(u)):(u=Ol(e,o),i===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(u,i),i=u)}return i}function Ol(e,t){const a=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,a,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function Dl(e,t,a){const i=e.treeAdapter.getTagName(t),n=da(i);if(e._isElementCausesFosterParenting(n))e._fosterParentElement(a);else{const r=e.treeAdapter.getNamespaceURI(t);n===s.TEMPLATE&&r===A.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function Ll(e,t,a){const i=e.treeAdapter.getNamespaceURI(a.element),{token:n}=a,r=e.treeAdapter.createElement(n.tagName,i,n.attrs);e._adoptNodes(t,r),e.treeAdapter.appendChild(t,r),e.activeFormattingElements.insertElementAfterBookmark(r,n),e.activeFormattingElements.removeEntry(a),e.openElements.remove(a.element),e.openElements.insertAfter(t,r,n.tagID)}function fi(e,t){for(let a=0;a<Al;a++){const i=Il(e,t);if(!i)break;const n=Sl(e,i);if(!n)break;e.activeFormattingElements.bookmark=i;const r=xl(e,n,i.element),u=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(r),u&&Dl(e,u,r),Ll(e,n,i)}}function mi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function yl(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Rl(e,t){e._appendCommentNode(t,e.document)}function Ei(e,t){if(e.stopped=!0,t.location){const a=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=a;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],n=e.treeAdapter.getNodeSourceCodeLocation(i);if(n&&!n.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const r=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(r);u&&!u.endTag&&e._setEndLocation(r,t)}}}}function Ml(e,t){e._setDocumentType(t);const a=t.forceQuirks?Ne.QUIRKS:ol(t);ul(t)||e._err(t,g.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=E.BEFORE_HTML}function Rt(e,t){e._err(t,g.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ne.QUIRKS),e.insertionMode=E.BEFORE_HTML,e._processToken(t)}function Pl(e,t){t.tagID===s.HTML?(e._insertElement(t,A.HTML),e.insertionMode=E.BEFORE_HEAD):Mt(e,t)}function kl(e,t){const a=t.tagID;(a===s.HTML||a===s.HEAD||a===s.BODY||a===s.BR)&&Mt(e,t)}function Mt(e,t){e._insertFakeRootElement(),e.insertionMode=E.BEFORE_HEAD,e._processToken(t)}function wl(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.HEAD:{e._insertElement(t,A.HTML),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD;break}default:Pt(e,t)}}function Bl(e,t){const a=t.tagID;a===s.HEAD||a===s.BODY||a===s.HTML||a===s.BR?Pt(e,t):e._err(t,g.endTagWithoutMatchingOpenElement)}function Pt(e,t){e._insertFakeElement(p.HEAD,s.HEAD),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD,e._processToken(t)}function Le(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.TITLE:{e._switchToTextParsing(t,be.RCDATA);break}case s.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,be.RAWTEXT):(e._insertElement(t,A.HTML),e.insertionMode=E.IN_HEAD_NO_SCRIPT);break}case s.NOFRAMES:case s.STYLE:{e._switchToTextParsing(t,be.RAWTEXT);break}case s.SCRIPT:{e._switchToTextParsing(t,be.SCRIPT_DATA);break}case s.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=E.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(E.IN_TEMPLATE);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:kt(e,t)}}function vl(e,t){switch(t.tagID){case s.HEAD:{e.openElements.pop(),e.insertionMode=E.AFTER_HEAD;break}case s.BODY:case s.BR:case s.HTML:{kt(e,t);break}case s.TEMPLATE:{at(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function at(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==s.TEMPLATE&&e._err(t,g.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,g.endTagWithoutMatchingOpenElement)}function kt(e,t){e.openElements.pop(),e.insertionMode=E.AFTER_HEAD,e._processToken(t)}function Ul(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.BASEFONT:case s.BGSOUND:case s.HEAD:case s.LINK:case s.META:case s.NOFRAMES:case s.STYLE:{Le(e,t);break}case s.NOSCRIPT:{e._err(t,g.nestedNoscriptInHead);break}default:wt(e,t)}}function Fl(e,t){switch(t.tagID){case s.NOSCRIPT:{e.openElements.pop(),e.insertionMode=E.IN_HEAD;break}case s.BR:{wt(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function wt(e,t){const a=t.type===W.EOF?g.openElementsLeftAfterEof:g.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=E.IN_HEAD,e._processToken(t)}function Hl(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.BODY:{e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=E.IN_BODY;break}case s.FRAMESET:{e._insertElement(t,A.HTML),e.insertionMode=E.IN_FRAMESET;break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{e._err(t,g.abandonedHeadElementChild),e.openElements.push(e.headElement,s.HEAD),Le(e,t),e.openElements.remove(e.headElement);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:Bt(e,t)}}function Vl(e,t){switch(t.tagID){case s.BODY:case s.HTML:case s.BR:{Bt(e,t);break}case s.TEMPLATE:{at(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function Bt(e,t){e._insertFakeElement(p.BODY,s.BODY),e.insertionMode=E.IN_BODY,ma(e,t)}function ma(e,t){switch(t.type){case W.CHARACTER:{cs(e,t);break}case W.WHITESPACE_CHARACTER:{os(e,t);break}case W.COMMENT:{mi(e,t);break}case W.START_TAG:{he(e,t);break}case W.END_TAG:{Ea(e,t);break}case W.EOF:{Es(e,t);break}}}function os(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function cs(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Yl(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function ql(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function Wl(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_FRAMESET)}function $l(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML)}function Gl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),li.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,A.HTML)}function Xl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ql(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),a||(e.formElement=e.openElements.current))}function jl(e,t){e.framesetOk=!1;const a=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const n=e.openElements.tagIDs[i];if(a===s.LI&&n===s.LI||(a===s.DD||a===s.DT)&&(n===s.DD||n===s.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==s.ADDRESS&&n!==s.DIV&&n!==s.P&&e._isSpecialElement(e.openElements.items[i],n))break}e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML)}function zl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.tokenizer.state=be.PLAINTEXT}function Kl(e,t){e.openElements.hasInScope(s.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.framesetOk=!1}function Zl(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(p.A);a&&(fi(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Jl(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function e0(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(s.NOBR)&&(fi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function t0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function a0(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ne.QUIRKS&&e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=E.IN_TABLE}function ls(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,A.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ds(e){const t=qn(e,tt.TYPE);return t!=null&&t.toLowerCase()===_l}function i0(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,A.HTML),ds(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function n0(e,t){e._appendElement(t,A.HTML),t.ackSelfClosing=!0}function s0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._appendElement(t,A.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function r0(e,t){t.tagName=p.IMG,t.tagID=s.IMG,ls(e,t)}function u0(e,t){e._insertElement(t,A.HTML),e.skipNextNewLine=!0,e.tokenizer.state=be.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=E.TEXT}function o0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function c0(e,t){e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function hs(e,t){e._switchToTextParsing(t,be.RAWTEXT)}function l0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===E.IN_TABLE||e.insertionMode===E.IN_CAPTION||e.insertionMode===E.IN_TABLE_BODY||e.insertionMode===E.IN_ROW||e.insertionMode===E.IN_CELL?E.IN_SELECT_IN_TABLE:E.IN_SELECT}function d0(e,t){e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML)}function h0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,A.HTML)}function f0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(s.RTC),e._insertElement(t,A.HTML)}function m0(e,t){e._reconstructActiveFormattingElements(),is(t),hi(t),t.selfClosing?e._appendElement(t,A.MATHML):e._insertElement(t,A.MATHML),t.ackSelfClosing=!0}function E0(e,t){e._reconstructActiveFormattingElements(),ns(t),hi(t),t.selfClosing?e._appendElement(t,A.SVG):e._insertElement(t,A.SVG),t.ackSelfClosing=!0}function fs(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML)}function he(e,t){switch(t.tagID){case s.I:case s.S:case s.B:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.SMALL:case s.STRIKE:case s.STRONG:{Jl(e,t);break}case s.A:{Zl(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{Gl(e,t);break}case s.P:case s.DL:case s.OL:case s.UL:case s.DIV:case s.DIR:case s.NAV:case s.MAIN:case s.MENU:case s.ASIDE:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.DETAILS:case s.ADDRESS:case s.ARTICLE:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{$l(e,t);break}case s.LI:case s.DD:case s.DT:{jl(e,t);break}case s.BR:case s.IMG:case s.WBR:case s.AREA:case s.EMBED:case s.KEYGEN:{ls(e,t);break}case s.HR:{s0(e,t);break}case s.RB:case s.RTC:{h0(e,t);break}case s.RT:case s.RP:{f0(e,t);break}case s.PRE:case s.LISTING:{Xl(e,t);break}case s.XMP:{o0(e,t);break}case s.SVG:{E0(e,t);break}case s.HTML:{Yl(e,t);break}case s.BASE:case s.LINK:case s.META:case s.STYLE:case s.TITLE:case s.SCRIPT:case s.BGSOUND:case s.BASEFONT:case s.TEMPLATE:{Le(e,t);break}case s.BODY:{ql(e,t);break}case s.FORM:{Ql(e,t);break}case s.NOBR:{e0(e,t);break}case s.MATH:{m0(e,t);break}case s.TABLE:{a0(e,t);break}case s.INPUT:{i0(e,t);break}case s.PARAM:case s.TRACK:case s.SOURCE:{n0(e,t);break}case s.IMAGE:{r0(e,t);break}case s.BUTTON:{Kl(e,t);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{t0(e,t);break}case s.IFRAME:{c0(e,t);break}case s.SELECT:{l0(e,t);break}case s.OPTION:case s.OPTGROUP:{d0(e,t);break}case s.NOEMBED:case s.NOFRAMES:{hs(e,t);break}case s.FRAMESET:{Wl(e,t);break}case s.TEXTAREA:{u0(e,t);break}case s.NOSCRIPT:{e.options.scriptingEnabled?hs(e,t):fs(e,t);break}case s.PLAINTEXT:{zl(e,t);break}case s.COL:case s.TH:case s.TD:case s.TR:case s.HEAD:case s.FRAME:case s.TBODY:case s.TFOOT:case s.THEAD:case s.CAPTION:case s.COLGROUP:break;default:fs(e,t)}}function T0(e,t){if(e.openElements.hasInScope(s.BODY)&&(e.insertionMode=E.AFTER_BODY,e.options.sourceCodeLocationInfo)){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e._setEndLocation(a,t)}}function p0(e,t){e.openElements.hasInScope(s.BODY)&&(e.insertionMode=E.AFTER_BODY,Cs(e,t))}function b0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function g0(e){const t=e.openElements.tmplCount>0,{formElement:a}=e;t||(e.formElement=null),(a||t)&&e.openElements.hasInScope(s.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(s.FORM):a&&e.openElements.remove(a))}function _0(e){e.openElements.hasInButtonScope(s.P)||e._insertFakeElement(p.P,s.P),e._closePElement()}function A0(e){e.openElements.hasInListItemScope(s.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(s.LI),e.openElements.popUntilTagNamePopped(s.LI))}function N0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function C0(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function I0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function S0(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(p.BR,s.BR),e.openElements.pop(),e.framesetOk=!1}function ms(e,t){const a=t.tagName,i=t.tagID;for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n],u=e.openElements.tagIDs[n];if(i===u&&(i!==s.UNKNOWN||e.treeAdapter.getTagName(r)===a)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=n&&e.openElements.shortenToLength(n);break}if(e._isSpecialElement(r,u))break}}function Ea(e,t){switch(t.tagID){case s.A:case s.B:case s.I:case s.S:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.NOBR:case s.SMALL:case s.STRIKE:case s.STRONG:{fi(e,t);break}case s.P:{_0(e);break}case s.DL:case s.UL:case s.OL:case s.DIR:case s.DIV:case s.NAV:case s.PRE:case s.MAIN:case s.MENU:case s.ASIDE:case s.BUTTON:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.ADDRESS:case s.ARTICLE:case s.DETAILS:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.LISTING:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{b0(e,t);break}case s.LI:{A0(e);break}case s.DD:case s.DT:{N0(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{C0(e);break}case s.BR:{S0(e);break}case s.BODY:{T0(e,t);break}case s.HTML:{p0(e,t);break}case s.FORM:{g0(e);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{I0(e,t);break}case s.TEMPLATE:{at(e,t);break}default:ms(e,t)}}function Es(e,t){e.tmplInsertionModeStack.length>0?Ns(e,t):Ei(e,t)}function x0(e,t){var a;t.tagID===s.SCRIPT&&((a=e.scriptHandler)===null||a===void 0||a.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function O0(e,t){e._err(t,g.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ti(e,t){if(ss.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=E.IN_TABLE_TEXT,t.type){case W.CHARACTER:{ps(e,t);break}case W.WHITESPACE_CHARACTER:{Ts(e,t);break}}else Ut(e,t)}function D0(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_CAPTION}function L0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_COLUMN_GROUP}function y0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(p.COLGROUP,s.COLGROUP),e.insertionMode=E.IN_COLUMN_GROUP,pi(e,t)}function R0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_TABLE_BODY}function M0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(p.TBODY,s.TBODY),e.insertionMode=E.IN_TABLE_BODY,pa(e,t)}function P0(e,t){e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function k0(e,t){ds(t)?e._appendElement(t,A.HTML):Ut(e,t),t.ackSelfClosing=!0}function w0(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,A.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function dt(e,t){switch(t.tagID){case s.TD:case s.TH:case s.TR:{M0(e,t);break}case s.STYLE:case s.SCRIPT:case s.TEMPLATE:{Le(e,t);break}case s.COL:{y0(e,t);break}case s.FORM:{w0(e,t);break}case s.TABLE:{P0(e,t);break}case s.TBODY:case s.TFOOT:case s.THEAD:{R0(e,t);break}case s.INPUT:{k0(e,t);break}case s.CAPTION:{D0(e,t);break}case s.COLGROUP:{L0(e,t);break}default:Ut(e,t)}}function vt(e,t){switch(t.tagID){case s.TABLE:{e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode());break}case s.TEMPLATE:{at(e,t);break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:Ut(e,t)}}function Ut(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ma(e,t),e.fosterParentingEnabled=a}function Ts(e,t){e.pendingCharacterTokens.push(t)}function ps(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ft(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)Ut(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const bs=new Set([s.CAPTION,s.COL,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]);function B0(e,t){const a=t.tagID;bs.has(a)?e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_TABLE,dt(e,t)):he(e,t)}function v0(e,t){const a=t.tagID;switch(a){case s.CAPTION:case s.TABLE:{e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_TABLE,a===s.TABLE&&vt(e,t));break}case s.BODY:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:Ea(e,t)}}function pi(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.COL:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.TEMPLATE:{Le(e,t);break}default:Ta(e,t)}}function U0(e,t){switch(t.tagID){case s.COLGROUP:{e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE);break}case s.TEMPLATE:{at(e,t);break}case s.COL:break;default:Ta(e,t)}}function Ta(e,t){e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE,e._processToken(t))}function pa(e,t){switch(t.tagID){case s.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_ROW;break}case s.TH:case s.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(p.TR,s.TR),e.insertionMode=E.IN_ROW,ba(e,t);break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE,dt(e,t));break}default:dt(e,t)}}function bi(e,t){const a=t.tagID;switch(t.tagID){case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasInTableScope(a)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE);break}case s.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE,vt(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:case s.TR:break;default:vt(e,t)}}function ba(e,t){switch(t.tagID){case s.TH:case s.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_CELL,e.activeFormattingElements.insertMarker();break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,pa(e,t));break}default:dt(e,t)}}function gs(e,t){switch(t.tagID){case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY);break}case s.TABLE:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,bi(e,t));break}case s.TBODY:case s.TFOOT:case s.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(s.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,bi(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:break;default:vt(e,t)}}function F0(e,t){const a=t.tagID;bs.has(a)?(e.openElements.hasInTableScope(s.TD)||e.openElements.hasInTableScope(s.TH))&&(e._closeTableCell(),ba(e,t)):he(e,t)}function H0(e,t){const a=t.tagID;switch(a){case s.TD:case s.TH:{e.openElements.hasInTableScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_ROW);break}case s.TABLE:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),gs(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:break;default:Ea(e,t)}}function _s(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._insertElement(t,A.HTML);break}case s.OPTGROUP:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._insertElement(t,A.HTML);break}case s.HR:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.INPUT:case s.KEYGEN:case s.TEXTAREA:case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),t.tagID!==s.SELECT&&e._processStartTag(t));break}case s.SCRIPT:case s.TEMPLATE:{Le(e,t);break}}}function As(e,t){switch(t.tagID){case s.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===s.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===s.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop();break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop();break}case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode());break}case s.TEMPLATE:{at(e,t);break}}}function V0(e,t){const a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e._processStartTag(t)):_s(e,t)}function Y0(e,t){const a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?e.openElements.hasInTableScope(a)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e.onEndTag(t)):As(e,t)}function q0(e,t){switch(t.tagID){case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{Le(e,t);break}case s.CAPTION:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.tmplInsertionModeStack[0]=E.IN_TABLE,e.insertionMode=E.IN_TABLE,dt(e,t);break}case s.COL:{e.tmplInsertionModeStack[0]=E.IN_COLUMN_GROUP,e.insertionMode=E.IN_COLUMN_GROUP,pi(e,t);break}case s.TR:{e.tmplInsertionModeStack[0]=E.IN_TABLE_BODY,e.insertionMode=E.IN_TABLE_BODY,pa(e,t);break}case s.TD:case s.TH:{e.tmplInsertionModeStack[0]=E.IN_ROW,e.insertionMode=E.IN_ROW,ba(e,t);break}default:e.tmplInsertionModeStack[0]=E.IN_BODY,e.insertionMode=E.IN_BODY,he(e,t)}}function W0(e,t){t.tagID===s.TEMPLATE&&at(e,t)}function Ns(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ei(e,t)}function $0(e,t){t.tagID===s.HTML?he(e,t):ga(e,t)}function Cs(e,t){var a;if(t.tagID===s.HTML){if(e.fragmentContext||(e.insertionMode=E.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===s.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((a=e.treeAdapter.getNodeSourceCodeLocation(i))===null||a===void 0)&&a.endTag)&&e._setEndLocation(i,t)}}else ga(e,t)}function ga(e,t){e.insertionMode=E.IN_BODY,ma(e,t)}function G0(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.FRAMESET:{e._insertElement(t,A.HTML);break}case s.FRAME:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.NOFRAMES:{Le(e,t);break}}}function X0(e,t){t.tagID===s.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==s.FRAMESET&&(e.insertionMode=E.AFTER_FRAMESET))}function Q0(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.NOFRAMES:{Le(e,t);break}}}function j0(e,t){t.tagID===s.HTML&&(e.insertionMode=E.AFTER_AFTER_FRAMESET)}function z0(e,t){t.tagID===s.HTML?he(e,t):_a(e,t)}function _a(e,t){e.insertionMode=E.IN_BODY,ma(e,t)}function K0(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.NOFRAMES:{Le(e,t);break}}}function Z0(e,t){t.chars=j,e._insertCharacters(t)}function J0(e,t){e._insertCharacters(t),e.framesetOk=!1}function Is(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==A.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ed(e,t){if(El(t))Is(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(a);i===A.MATHML?is(t):i===A.SVG&&(Tl(t),ns(t)),hi(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function td(e,t){if(t.tagID===s.P||t.tagID===s.BR){Is(e),e._endTagOutsideForeignContent(t);return}for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a];if(e.treeAdapter.getNamespaceURI(i)===A.HTML){e._endTagOutsideForeignContent(t);break}const n=e.treeAdapter.getTagName(i);if(n.toLowerCase()===t.tagName){t.tagName=n,e.openElements.shortenToLength(a);break}}}const ad=new Set([p.AREA,p.BASE,p.BASEFONT,p.BGSOUND,p.BR,p.COL,p.EMBED,p.FRAME,p.HR,p.IMG,p.INPUT,p.KEYGEN,p.LINK,p.META,p.PARAM,p.SOURCE,p.TRACK,p.WBR]);function id(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===A.HTML&&ad.has(t.treeAdapter.getTagName(e))}const nd={treeAdapter:ve,scriptingEnabled:!0};function sd(e,t){const a={...nd,...t};return Ss(e,a)}function rd(e,t){let a="";const i=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===p.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===A.HTML?t.treeAdapter.getTemplateContent(e):e,n=t.treeAdapter.getChildNodes(i);if(n)for(const r of n)a+=Ss(r,t);return a}function Ss(e,t){return t.treeAdapter.isElementNode(e)?ud(e,t):t.treeAdapter.isTextNode(e)?cd(e,t):t.treeAdapter.isCommentNode(e)?ld(e,t):t.treeAdapter.isDocumentTypeNode(e)?dd(e,t):""}function ud(e,t){const a=t.treeAdapter.getTagName(e);return`<${a}${od(e,t)}>${id(e,t)?"":`${rd(e,t)}</${a}>`}`}function od(e,{treeAdapter:t}){let a="";for(const i of t.getAttrList(e)){if(a+=" ",i.namespace)switch(i.namespace){case A.XML:{a+=`xml:${i.name}`;break}case A.XMLNS:{i.name!=="xmlns"&&(a+="xmlns:"),a+=i.name;break}case A.XLINK:{a+=`xlink:${i.name}`;break}default:a+=`${i.prefix}:${i.name}`}else a+=i.name;a+=`="${$i(i.value)}"`}return a}function cd(e,t){const{treeAdapter:a}=t,i=a.getTextNodeContent(e),n=a.getParentNode(e),r=n&&a.isElementNode(n)&&a.getTagName(n);return r&&a.getNamespaceURI(n)===A.HTML&&qc(r,t.scriptingEnabled)?i:Gi(i)}function ld(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function dd(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function hd(e,t){return us.parse(e,t)}function fd(e,t,a){typeof e=="string"&&(a=t,t=e,e=null);const i=us.getFragmentParser(e,a);return i.tokenizer.write(t,!0),i.getFragment()}function xs(e){const t=e.includes('"')?"'":'"';return t+e+t}function md(e,t,a){let i="!DOCTYPE ";return e&&(i+=e),t?i+=` PUBLIC ${xs(t)}`:a&&(i+=" SYSTEM"),a&&(i+=` ${xs(a)}`),i}const Ge={isCommentNode:Qt,isElementNode:w,isTextNode:Re,createDocument(){const e=new ze([]);return e["x-mode"]=Ne.NO_QUIRKS,e},createDocumentFragment(){return new ze([])},createElement(e,t,a){const i=Object.create(null),n=Object.create(null),r=Object.create(null);for(let o=0;o<a.length;o++){const l=a[o].name;i[l]=a[o].value,n[l]=a[o].namespace,r[l]=a[o].prefix}const u=new Ra(e,i,[]);return u.namespace=t,u["x-attribsNamespace"]=n,u["x-attribsPrefix"]=r,u},createCommentNode(e){return new Da(e)},createTextNode(e){return new _t(e)},appendChild(e,t){const a=e.children[e.children.length-1];a&&(a.next=t,t.prev=a),e.children.push(t),t.parent=e},insertBefore(e,t,a){const i=e.children.indexOf(a),{prev:n}=a;n&&(n.next=t,t.prev=n),a.prev=t,t.next=a,e.children.splice(i,0,t),t.parent=e},setTemplateContent(e,t){Ge.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,a,i){const n=md(t,a,i);let r=e.children.find(u=>Ma(u)&&u.name==="!doctype");r?r.data=n??null:(r=new La("!doctype",n),Ge.appendChild(e,r)),r["x-name"]=t,r["x-publicId"]=a,r["x-systemId"]=i},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:a,next:i}=e;e.prev=null,e.next=null,a&&(a.next=i),i&&(i.prev=a),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const a=e.children[e.children.length-1];a&&Re(a)?a.data+=t:Ge.appendChild(e,Ge.createTextNode(t))},insertTextBefore(e,t,a){const i=e.children[e.children.indexOf(a)-1];i&&Re(i)?i.data+=t:Ge.insertBefore(e,Ge.createTextNode(t),a)},adoptAttributes(e,t){for(let a=0;a<t.length;a++){const i=t[a].name;e.attribs[i]===void 0&&(e.attribs[i]=t[a].value,e["x-attribsNamespace"][i]=t[a].namespace,e["x-attribsPrefix"][i]=t[a].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return Ma(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function Ed(e,t,a,i){var n;return(n=t.treeAdapter)!==null&&n!==void 0||(t.treeAdapter=Ge),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),a?hd(e,t):fd(i,e,t)}const Td={treeAdapter:Ge};function pd(e){const t="length"in e?e:[e];for(let i=0;i<t.length;i+=1){const n=t[i];Ve(n)&&Array.prototype.splice.call(t,i,1,...n.children)}let a="";for(let i=0;i<t.length;i+=1){const n=t[i];a+=sd(n,Td)}return a}var R;(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"})(R||(R={}));var C;(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.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(C||(C={}));function Ue(e){return e===R.Space||e===R.NewLine||e===R.Tab||e===R.FormFeed||e===R.CarriageReturn}function Aa(e){return e===R.Slash||e===R.Gt||Ue(e)}function bd(e){return e>=R.LowerA&&e<=R.LowerZ||e>=R.UpperA&&e<=R.UpperZ}var Pe;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Pe||(Pe={}));const le={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]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class gd{constructor({xmlMode:t=!1,decodeEntities:a=!0},i){this.cbs=i,this.state=C.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=C.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=a,this.entityDecoder=new Ua(t?Hi:ka,(n,r)=>this.emitCodePoint(n,r))}reset(){this.state=C.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=C.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===R.Lt||!this.decodeEntities&&this.fastForwardTo(R.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=C.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===R.Amp&&this.startEntity()}stateSpecialStartSequence(t){const a=this.sequenceIndex===this.currentSequence.length;if(!(a?Aa(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!a){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=C.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===R.Gt||Ue(t)){const a=this.index-this.currentSequence.length;if(this.sectionStart<a){const i=this.index;this.index=a,this.cbs.ontext(this.sectionStart,a),this.index=i}this.isSpecial=!1,this.sectionStart=a+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===le.TitleEnd?this.decodeEntities&&t===R.Amp&&this.startEntity():this.fastForwardTo(R.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===R.Lt)}stateCDATASequence(t){t===le.Cdata[this.sequenceIndex]?++this.sequenceIndex===le.Cdata.length&&(this.state=C.InCommentLike,this.currentSequence=le.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=C.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===le.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=C.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!Aa(t):bd(t)}startSpecial(t,a){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=a,this.state=C.SpecialStartSequence}stateBeforeTagName(t){if(t===R.ExclamationMark)this.state=C.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===R.Questionmark)this.state=C.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const a=t|32;this.sectionStart=this.index,this.xmlMode?this.state=C.InTagName:a===le.ScriptEnd[2]?this.state=C.BeforeSpecialS:a===le.TitleEnd[2]?this.state=C.BeforeSpecialT:this.state=C.InTagName}else t===R.Slash?this.state=C.BeforeClosingTagName:(this.state=C.Text,this.stateText(t))}stateInTagName(t){Aa(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){Ue(t)||(t===R.Gt?this.state=C.Text:(this.state=this.isTagStartChar(t)?C.InClosingTagName:C.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===R.Gt||Ue(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=C.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===R.Gt||this.fastForwardTo(R.Gt))&&(this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===R.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=C.InSpecialTag,this.sequenceIndex=0):this.state=C.Text,this.sectionStart=this.index+1):t===R.Slash?this.state=C.InSelfClosingTag:Ue(t)||(this.state=C.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===R.Gt?(this.cbs.onselfclosingtag(this.index),this.state=C.Text,this.sectionStart=this.index+1,this.isSpecial=!1):Ue(t)||(this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===R.Eq||Aa(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=C.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===R.Eq?this.state=C.BeforeAttributeValue:t===R.Slash||t===R.Gt?(this.cbs.onattribend(Pe.NoValue,this.sectionStart),this.sectionStart=-1,this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t)):Ue(t)||(this.cbs.onattribend(Pe.NoValue,this.sectionStart),this.state=C.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===R.DoubleQuote?(this.state=C.InAttributeValueDq,this.sectionStart=this.index+1):t===R.SingleQuote?(this.state=C.InAttributeValueSq,this.sectionStart=this.index+1):Ue(t)||(this.sectionStart=this.index,this.state=C.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,a){t===a||!this.decodeEntities&&this.fastForwardTo(a)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a===R.DoubleQuote?Pe.Double:Pe.Single,this.index+1),this.state=C.BeforeAttributeName):this.decodeEntities&&t===R.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,R.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,R.SingleQuote)}stateInAttributeValueNoQuotes(t){Ue(t)||t===R.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Pe.Unquoted,this.index),this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===R.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===R.OpeningSquareBracket?(this.state=C.CDATASequence,this.sequenceIndex=0):this.state=t===R.Dash?C.BeforeComment:C.InDeclaration}stateInDeclaration(t){(t===R.Gt||this.fastForwardTo(R.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=C.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===R.Gt||this.fastForwardTo(R.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===R.Dash?(this.state=C.InCommentLike,this.currentSequence=le.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=C.InDeclaration}stateInSpecialComment(t){(t===R.Gt||this.fastForwardTo(R.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const a=t|32;a===le.ScriptEnd[3]?this.startSpecial(le.ScriptEnd,4):a===le.StyleEnd[3]?this.startSpecial(le.StyleEnd,4):(this.state=C.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const a=t|32;a===le.TitleEnd[3]?this.startSpecial(le.TitleEnd,4):a===le.TextareaEnd[3]?this.startSpecial(le.TextareaEnd,4):(this.state=C.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=C.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?Ie.Strict:this.baseState===C.Text||this.baseState===C.InSpecialTag?Ie.Legacy:Ie.Attribute)}stateInEntity(){const t=this.entityDecoder.write(this.buffer,this.index-this.offset);t>=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===C.Text||this.state===C.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===C.InAttributeValueDq||this.state===C.InAttributeValueSq||this.state===C.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();){const t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case C.Text:{this.stateText(t);break}case C.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case C.InSpecialTag:{this.stateInSpecialTag(t);break}case C.CDATASequence:{this.stateCDATASequence(t);break}case C.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case C.InAttributeName:{this.stateInAttributeName(t);break}case C.InCommentLike:{this.stateInCommentLike(t);break}case C.InSpecialComment:{this.stateInSpecialComment(t);break}case C.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case C.InTagName:{this.stateInTagName(t);break}case C.InClosingTagName:{this.stateInClosingTagName(t);break}case C.BeforeTagName:{this.stateBeforeTagName(t);break}case C.AfterAttributeName:{this.stateAfterAttributeName(t);break}case C.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case C.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case C.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case C.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case C.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case C.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case C.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case C.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case C.InDeclaration:{this.stateInDeclaration(t);break}case C.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case C.BeforeComment:{this.stateBeforeComment(t);break}case C.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case C.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===C.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===C.InCommentLike?this.currentSequence===le.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===C.InTagName||this.state===C.BeforeAttributeName||this.state===C.BeforeAttributeValue||this.state===C.AfterAttributeName||this.state===C.InAttributeName||this.state===C.InAttributeValueSq||this.state===C.InAttributeValueDq||this.state===C.InAttributeValueNq||this.state===C.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,a){this.baseState!==C.Text&&this.baseState!==C.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+a,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+a,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}}const ht=new Set(["input","option","optgroup","select","button","datalist","textarea"]),Q=new Set(["p"]),Os=new Set(["thead","tbody"]),Ds=new Set(["dd","dt"]),Ls=new Set(["rt","rp"]),_d=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",Q],["h1",Q],["h2",Q],["h3",Q],["h4",Q],["h5",Q],["h6",Q],["select",ht],["input",ht],["output",ht],["button",ht],["datalist",ht],["textarea",ht],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",Ds],["dt",Ds],["address",Q],["article",Q],["aside",Q],["blockquote",Q],["details",Q],["div",Q],["dl",Q],["fieldset",Q],["figcaption",Q],["figure",Q],["footer",Q],["form",Q],["header",Q],["hr",Q],["main",Q],["nav",Q],["ol",Q],["pre",Q],["section",Q],["table",Q],["ul",Q],["rt",Ls],["rp",Ls],["tbody",Os],["tfoot",Os]]),Ad=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),ys=new Set(["math","svg"]),Rs=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),Nd=/\s|\//;class Cd{constructor(t,a={}){var i,n,r,u,o,l;this.options=a,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(i=a.lowerCaseTags)!==null&&i!==void 0?i:this.htmlMode,this.lowerCaseAttributeNames=(n=a.lowerCaseAttributeNames)!==null&&n!==void 0?n:this.htmlMode,this.recognizeSelfClosing=(r=a.recognizeSelfClosing)!==null&&r!==void 0?r:!this.htmlMode,this.tokenizer=new((u=a.Tokenizer)!==null&&u!==void 0?u:gd)(this.options,this),this.foreignContext=[!this.htmlMode],(l=(o=this.cbs).onparserinit)===null||l===void 0||l.call(o,this)}ontext(t,a){var i,n;const r=this.getSlice(t,a);this.endIndex=a-1,(n=(i=this.cbs).ontext)===null||n===void 0||n.call(i,r),this.startIndex=a}ontextentity(t,a){var i,n;this.endIndex=a-1,(n=(i=this.cbs).ontext)===null||n===void 0||n.call(i,Ba(t)),this.startIndex=a}isVoidElement(t){return this.htmlMode&&Ad.has(t)}onopentagname(t,a){this.endIndex=a;let i=this.getSlice(t,a);this.lowerCaseTagNames&&(i=i.toLowerCase()),this.emitOpenTag(i)}emitOpenTag(t){var a,i,n,r;this.openTagStart=this.startIndex,this.tagname=t;const u=this.htmlMode&&_d.get(t);if(u)for(;this.stack.length>0&&u.has(this.stack[0]);){const o=this.stack.shift();(i=(a=this.cbs).onclosetag)===null||i===void 0||i.call(a,o,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(ys.has(t)?this.foreignContext.unshift(!0):Rs.has(t)&&this.foreignContext.unshift(!1))),(r=(n=this.cbs).onopentagname)===null||r===void 0||r.call(n,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var a,i;this.startIndex=this.openTagStart,this.attribs&&((i=(a=this.cbs).onopentag)===null||i===void 0||i.call(a,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,a){var i,n,r,u,o,l,h,m;this.endIndex=a;let T=this.getSlice(t,a);if(this.lowerCaseTagNames&&(T=T.toLowerCase()),this.htmlMode&&(ys.has(T)||Rs.has(T))&&this.foreignContext.shift(),this.isVoidElement(T))this.htmlMode&&T==="br"&&((u=(r=this.cbs).onopentagname)===null||u===void 0||u.call(r,"br"),(l=(o=this.cbs).onopentag)===null||l===void 0||l.call(o,"br",{},!0),(m=(h=this.cbs).onclosetag)===null||m===void 0||m.call(h,"br",!1));else{const b=this.stack.indexOf(T);if(b!==-1)for(let N=0;N<=b;N++){const I=this.stack.shift();(n=(i=this.cbs).onclosetag)===null||n===void 0||n.call(i,I,N!==b)}else this.htmlMode&&T==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=a+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var a,i;const n=this.tagname;this.endOpenTag(t),this.stack[0]===n&&((i=(a=this.cbs).onclosetag)===null||i===void 0||i.call(a,n,!t),this.stack.shift())}onattribname(t,a){this.startIndex=t;const i=this.getSlice(t,a);this.attribname=this.lowerCaseAttributeNames?i.toLowerCase():i}onattribdata(t,a){this.attribvalue+=this.getSlice(t,a)}onattribentity(t){this.attribvalue+=Ba(t)}onattribend(t,a){var i,n;this.endIndex=a,(n=(i=this.cbs).onattribute)===null||n===void 0||n.call(i,this.attribname,this.attribvalue,t===Pe.Double?'"':t===Pe.Single?"'":t===Pe.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const a=t.search(Nd);let i=a<0?t:t.substr(0,a);return this.lowerCaseTagNames&&(i=i.toLowerCase()),i}ondeclaration(t,a){this.endIndex=a;const i=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(i);this.cbs.onprocessinginstruction(`!${n}`,`!${i}`)}this.startIndex=a+1}onprocessinginstruction(t,a){this.endIndex=a;const i=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(i);this.cbs.onprocessinginstruction(`?${n}`,`?${i}`)}this.startIndex=a+1}oncomment(t,a,i){var n,r,u,o;this.endIndex=a,(r=(n=this.cbs).oncomment)===null||r===void 0||r.call(n,this.getSlice(t,a-i)),(o=(u=this.cbs).oncommentend)===null||o===void 0||o.call(u),this.startIndex=a+1}oncdata(t,a,i){var n,r,u,o,l,h,m,T,b,N;this.endIndex=a;const I=this.getSlice(t,a-i);!this.htmlMode||this.options.recognizeCDATA?((r=(n=this.cbs).oncdatastart)===null||r===void 0||r.call(n),(o=(u=this.cbs).ontext)===null||o===void 0||o.call(u,I),(h=(l=this.cbs).oncdataend)===null||h===void 0||h.call(l)):((T=(m=this.cbs).oncomment)===null||T===void 0||T.call(m,`[CDATA[${I}]]`),(N=(b=this.cbs).oncommentend)===null||N===void 0||N.call(b)),this.startIndex=a+1}onend(){var t,a;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let i=0;i<this.stack.length;i++)this.cbs.onclosetag(this.stack[i],!0)}(a=(t=this.cbs).onend)===null||a===void 0||a.call(t)}reset(){var t,a,i,n;(a=(t=this.cbs).onreset)===null||a===void 0||a.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(n=(i=this.cbs).onparserinit)===null||n===void 0||n.call(i,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,a){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let i=this.buffers[0].slice(t-this.bufferOffset,a-this.bufferOffset);for(;a-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),i+=this.buffers[0].slice(0,a-this.bufferOffset);return i}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var a,i;if(this.ended){(i=(a=this.cbs).onerror)===null||i===void 0||i.call(a,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var a,i;if(this.ended){(i=(a=this.cbs).onerror)===null||i===void 0||i.call(a,new Error(".end() after done!"));return}t&&this.write(t),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(t){this.write(t)}done(t){this.end(t)}}function Id(e,t){const a=new Sr(void 0,t);return new Cd(a,t).end(e),a.root}const Sd=ec((e,t,a,i)=>t._useHtmlParser2?Id(e,t):Ed(e,t,a,i)),Ms=Pc(Sd,(e,t)=>t._useHtmlParser2?jt(e,t):pd(e));var de=(e=>(e[e.None=0]="None",e[e.Text=1]="Text",e[e.Image=2]="Image",e[e.Video=3]="Video",e[e.Icon=4]="Icon",e[e.Link=5]="Link",e[e.Block=10]="Block",e))(de||{});const xd=c.defineComponent({name:"CustomIcon",props:{iconName:{type:String,required:!0}},setup(e){return{iconClass:c.computed(()=>`${e.iconName}`)}}}),ft=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a};function Od(e,t,a,i,n,r){return c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)},null,2)}const Dd=ft(xd,[["render",Od]]),Ld={key:0,contenteditable:"false",class:c.normalizeClass(["w-full h-[100vh] fixed top-0 left-0 flex justify-center items-center bg-[rgba(0,0,0,.7)] z-10"])},yd={class:"flex flex-col max-w-[600px] bg-white rounded-xl overflow-hidden"},Rd={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},Md={class:"p-8 items-center justify-center flex flex-wrap h-[500px] overflow-y-auto"},Pd=c.defineComponent({__name:"IconModal",props:{icons:{type:Array,default:()=>[]}},emits:["ok"],setup(e,{expose:t,emit:a}){const i=e,n=c.ref(i.icons||[]);c.watch(()=>i.icons,m=>{n.value=m||[]},{immediate:!0});const r=a,u=c.ref(!1);function o(){console.log(666),u.value=!0}function l(m){h(),r("ok",m)}function h(){u.value=!1}return t({openModal:o,closeModal:h}),(m,T)=>u.value?(c.openBlock(),c.createElementBlock("div",Ld,[c.createElementVNode("div",yd,[c.createElementVNode("div",Rd,[T[1]||(T[1]=c.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"选择图标",-1)),c.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:T[0]||(T[0]=c.withModifiers(b=>h(),["stop"]))})]),c.createElementVNode("div",Md,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.value,b=>(c.openBlock(),c.createBlock(Dd,{key:b,class:"w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",iconName:b,onClick:c.withModifiers(N=>l(b),["stop"]),title:b},null,8,["iconName","onClick","title"]))),128))])])])):c.createCommentVNode("",!0)}});function Ps(e){return typeof e=="number"&&Number.isFinite(e)}const kd=c.defineComponent({name:"ImgUploader",inheritAttrs:!1,__name:"UploadImage",props:{alt:{},beforeUpload:{},customUpload:{},getExtraData:{},height:{default:100},multiple:{type:Boolean,default:!1},src:{},tip:{default:"点击上传"},width:{default:100},uploadByImage:{}},setup(e){const t=e,a=c.ref(),i=c.computed(()=>{const u={width:t.width,height:t.height};return Ps(t.width)&&(u.width+="px"),Ps(t.height)&&(u.height+="px"),u});async function n(u){console.log(u,u.target);const o=u.target.files[0];console.log(o),typeof t.customUpload=="function"&&t.customUpload(o),!(typeof t.beforeUpload=="function"&&!await t.beforeUpload(o))&&(typeof t.getExtraData=="function"&&await t.getExtraData(o),o&&(r(o),a.value.value=""))}async function r(u){if(t.uploadByImage){await t.uploadByImage(u);return}return{success:0}}return(u,o)=>(c.openBlock(),c.createElementBlock("div",c.mergeProps({style:i.value,contenteditable:"false",class:"bg-background-deep box-border cursor-pointer absolute left-0 top-0",title:"点击上传"},u.$attrs,{onClick:o[2]||(o[2]=c.withModifiers(()=>{},["stop"]))}),[c.createElementVNode("input",{onClick:o[0]||(o[0]=c.withModifiers(()=>{},["stop"])),contenteditable:"false",class:"cursor-pointer w-16 opacity-0",type:"file",ref_key:"fileInput",ref:a,onChange:o[1]||(o[1]=l=>n(l)),accept:"image/*"},null,544)],16))}});/*!
9
9
  * Cropper.js v1.6.2
10
10
  * https://fengyuanchen.github.io/cropperjs
11
11
  *
@@ -13,5 +13,5 @@
13
13
  * Released under the MIT license
14
14
  *
15
15
  * Date: 2024-04-21T07:43:05.335Z
16
- */function Ls(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,i)}return a}function Rs(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Ls(Object(a),!0).forEach(function(i){yd(e,i,a[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Ls(Object(a)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(a,i))})}return e}function Dd(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var i=a.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ys(e){var t=Dd(e,"string");return typeof t=="symbol"?t:t+""}function mi(e){"@babel/helpers - typeof";return mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mi(e)}function Ld(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ms(e,t){for(var a=0;a<t.length;a++){var i=t[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ys(i.key),i)}}function Rd(e,t,a){return t&&Ms(e.prototype,t),a&&Ms(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function yd(e,t,a){return t=ys(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Ps(e){return Md(e)||Pd(e)||kd(e)||vd()}function Md(e){if(Array.isArray(e))return Ti(e)}function Pd(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kd(e,t){if(e){if(typeof e=="string")return Ti(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ti(e,t)}}function Ti(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function vd(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
17
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ba=typeof window<"u"&&typeof window.document<"u",ye=ba?window:{},pi=ba&&ye.document.documentElement?"ontouchstart"in ye.document.documentElement:!1,bi=ba?"PointerEvent"in ye:!1,J="cropper",gi="all",ks="crop",vs="move",ws="zoom",Je="e",et="w",dt="s",qe="n",wt="ne",Bt="nw",Ut="se",Ft="sw",_i="".concat(J,"-crop"),Bs="".concat(J,"-disabled"),Te="".concat(J,"-hidden"),Us="".concat(J,"-hide"),wd="".concat(J,"-invisible"),ga="".concat(J,"-modal"),Ai="".concat(J,"-move"),Ht="".concat(J,"Action"),_a="".concat(J,"Preview"),Ni="crop",Fs="move",Hs="none",Ci="crop",Ii="cropend",Si="cropmove",xi="cropstart",Ys="dblclick",Bd=pi?"touchstart":"mousedown",Ud=pi?"touchmove":"mousemove",Fd=pi?"touchend touchcancel":"mouseup",Vs=bi?"pointerdown":Bd,qs=bi?"pointermove":Ud,Ws=bi?"pointerup pointercancel":Fd,Xs="ready",Gs="resize",$s="wheel",Oi="zoom",Qs="image/jpeg",Hd=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Yd=/^data:/,Vd=/^data:image\/jpeg;base64,/,qd=/^img|canvas$/i,js=200,zs=100,Ks={viewMode:0,dragMode:Ni,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:js,minContainerHeight:zs,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Wd='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',Xd=Number.isNaN||ye.isNaN;function H(e){return typeof e=="number"&&!Xd(e)}var Zs=function(t){return t>0&&t<1/0};function Di(e){return typeof e>"u"}function tt(e){return mi(e)==="object"&&e!==null}var Gd=Object.prototype.hasOwnProperty;function ht(e){if(!tt(e))return!1;try{var t=e.constructor,a=t.prototype;return t&&a&&Gd.call(a,"isPrototypeOf")}catch{return!1}}function pe(e){return typeof e=="function"}var $d=Array.prototype.slice;function Js(e){return Array.from?Array.from(e):$d.call(e)}function ie(e,t){return e&&pe(t)&&(Array.isArray(e)||H(e.length)?Js(e).forEach(function(a,i){t.call(e,a,i,e)}):tt(e)&&Object.keys(e).forEach(function(a){t.call(e,e[a],a,e)})),e}var ee=Object.assign||function(t){for(var a=arguments.length,i=new Array(a>1?a-1:0),n=1;n<a;n++)i[n-1]=arguments[n];return tt(t)&&i.length>0&&i.forEach(function(r){tt(r)&&Object.keys(r).forEach(function(u){t[u]=r[u]})}),t},Qd=/\.\d*(?:0|9){12}\d*$/;function ft(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Qd.test(e)?Math.round(e*t)/t:e}var jd=/^width|height|left|top|marginLeft|marginTop$/;function We(e,t){var a=e.style;ie(t,function(i,n){jd.test(n)&&H(i)&&(i="".concat(i,"px")),a[n]=i})}function zd(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function oe(e,t){if(t){if(H(e.length)){ie(e,function(i){oe(i,t)});return}if(e.classList){e.classList.add(t);return}var a=e.className.trim();a?a.indexOf(t)<0&&(e.className="".concat(a," ").concat(t)):e.className=t}}function Me(e,t){if(t){if(H(e.length)){ie(e,function(a){Me(a,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function Et(e,t,a){if(t){if(H(e.length)){ie(e,function(i){Et(i,t,a)});return}a?oe(e,t):Me(e,t)}}var Kd=/([a-z\d])([A-Z])/g;function Li(e){return e.replace(Kd,"$1-$2").toLowerCase()}function Ri(e,t){return tt(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Li(t)))}function Yt(e,t,a){tt(a)?e[t]=a:e.dataset?e.dataset[t]=a:e.setAttribute("data-".concat(Li(t)),a)}function Zd(e,t){if(tt(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(Li(t)))}var er=/\s\s*/,tr=function(){var e=!1;if(ba){var t=!1,a=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(r){t=r}});ye.addEventListener("test",a,i),ye.removeEventListener("test",a,i)}return e}();function xe(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(er).forEach(function(r){if(!tr){var u=e.listeners;u&&u[r]&&u[r][a]&&(n=u[r][a],delete u[r][a],Object.keys(u[r]).length===0&&delete u[r],Object.keys(u).length===0&&delete e.listeners)}e.removeEventListener(r,n,i)})}function Ie(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(er).forEach(function(r){if(i.once&&!tr){var u=e.listeners,o=u===void 0?{}:u;n=function(){delete o[r][a],e.removeEventListener(r,n,i);for(var f=arguments.length,E=new Array(f),T=0;T<f;T++)E[T]=arguments[T];a.apply(e,E)},o[r]||(o[r]={}),o[r][a]&&e.removeEventListener(r,o[r][a],i),o[r][a]=n,e.listeners=o}e.addEventListener(r,n,i)})}function mt(e,t,a){var i;return pe(Event)&&pe(CustomEvent)?i=new CustomEvent(t,{detail:a,bubbles:!0,cancelable:!0}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(t,!0,!0,a)),e.dispatchEvent(i)}function ar(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var yi=ye.location,Jd=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function ir(e){var t=e.match(Jd);return t!==null&&(t[1]!==yi.protocol||t[2]!==yi.hostname||t[3]!==yi.port)}function nr(e){var t="timestamp=".concat(new Date().getTime());return e+(e.indexOf("?")===-1?"?":"&")+t}function Vt(e){var t=e.rotate,a=e.scaleX,i=e.scaleY,n=e.translateX,r=e.translateY,u=[];H(n)&&n!==0&&u.push("translateX(".concat(n,"px)")),H(r)&&r!==0&&u.push("translateY(".concat(r,"px)")),H(t)&&t!==0&&u.push("rotate(".concat(t,"deg)")),H(a)&&a!==1&&u.push("scaleX(".concat(a,")")),H(i)&&i!==1&&u.push("scaleY(".concat(i,")"));var o=u.length?u.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function eh(e){var t=Rs({},e),a=0;return ie(e,function(i,n){delete t[n],ie(t,function(r){var u=Math.abs(i.startX-r.startX),o=Math.abs(i.startY-r.startY),l=Math.abs(i.endX-r.endX),f=Math.abs(i.endY-r.endY),E=Math.sqrt(u*u+o*o),T=Math.sqrt(l*l+f*f),b=(T-E)/E;Math.abs(b)>Math.abs(a)&&(a=b)})}),a}function Aa(e,t){var a=e.pageX,i=e.pageY,n={endX:a,endY:i};return t?n:Rs({startX:a,startY:i},n)}function th(e){var t=0,a=0,i=0;return ie(e,function(n){var r=n.startX,u=n.startY;t+=r,a+=u,i+=1}),t/=i,a/=i,{pageX:t,pageY:a}}function Xe(e){var t=e.aspectRatio,a=e.height,i=e.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=Zs(i),u=Zs(a);if(r&&u){var o=a*t;n==="contain"&&o>i||n==="cover"&&o<i?a=i/t:i=a*t}else r?a=i/t:u&&(i=a*t);return{width:i,height:a}}function ah(e){var t=e.width,a=e.height,i=e.degree;if(i=Math.abs(i)%180,i===90)return{width:a,height:t};var n=i%90*Math.PI/180,r=Math.sin(n),u=Math.cos(n),o=t*u+a*r,l=t*r+a*u;return i>90?{width:l,height:o}:{width:o,height:l}}function ih(e,t,a,i){var n=t.aspectRatio,r=t.naturalWidth,u=t.naturalHeight,o=t.rotate,l=o===void 0?0:o,f=t.scaleX,E=f===void 0?1:f,T=t.scaleY,b=T===void 0?1:T,N=a.aspectRatio,S=a.naturalWidth,y=a.naturalHeight,P=i.fillColor,X=P===void 0?"transparent":P,B=i.imageSmoothingEnabled,q=B===void 0?!0:B,F=i.imageSmoothingQuality,k=F===void 0?"low":F,_=i.maxWidth,w=_===void 0?1/0:_,$=i.maxHeight,ae=$===void 0?1/0:$,be=i.minWidth,Ae=be===void 0?0:be,Oe=i.minHeight,ge=Oe===void 0?0:Oe,he=document.createElement("canvas"),x=he.getContext("2d"),L=Xe({aspectRatio:N,width:w,height:ae}),Y=Xe({aspectRatio:N,width:Ae,height:ge},"cover"),G=Math.min(L.width,Math.max(Y.width,S)),O=Math.min(L.height,Math.max(Y.height,y)),D=Xe({aspectRatio:n,width:w,height:ae}),j=Xe({aspectRatio:n,width:Ae,height:ge},"cover"),V=Math.min(D.width,Math.max(j.width,r)),K=Math.min(D.height,Math.max(j.height,u)),at=[-V/2,-K/2,V,K];return he.width=ft(G),he.height=ft(O),x.fillStyle=X,x.fillRect(0,0,G,O),x.save(),x.translate(G/2,O/2),x.rotate(l*Math.PI/180),x.scale(E,b),x.imageSmoothingEnabled=q,x.imageSmoothingQuality=k,x.drawImage.apply(x,[e].concat(Ps(at.map(function(it){return Math.floor(ft(it))})))),x.restore(),he}var sr=String.fromCharCode;function nh(e,t,a){var i="";a+=t;for(var n=t;n<a;n+=1)i+=sr(e.getUint8(n));return i}var sh=/^data:.*,/;function rh(e){var t=e.replace(sh,""),a=atob(t),i=new ArrayBuffer(a.length),n=new Uint8Array(i);return ie(n,function(r,u){n[u]=a.charCodeAt(u)}),i}function uh(e,t){for(var a=[],i=8192,n=new Uint8Array(e);n.length>0;)a.push(sr.apply(null,Js(n.subarray(0,i)))),n=n.subarray(i);return"data:".concat(t,";base64,").concat(btoa(a.join("")))}function oh(e){var t=new DataView(e),a;try{var i,n,r;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var u=t.byteLength,o=2;o+1<u;){if(t.getUint8(o)===255&&t.getUint8(o+1)===225){n=o;break}o+=1}if(n){var l=n+4,f=n+10;if(nh(t,l,4)==="Exif"){var E=t.getUint16(f);if(i=E===18761,(i||E===19789)&&t.getUint16(f+2,i)===42){var T=t.getUint32(f+4,i);T>=8&&(r=f+T)}}}if(r){var b=t.getUint16(r,i),N,S;for(S=0;S<b;S+=1)if(N=r+S*12+2,t.getUint16(N,i)===274){N+=8,a=t.getUint16(N,i),t.setUint16(N,1,i);break}}}catch{a=1}return a}function ch(e){var t=0,a=1,i=1;switch(e){case 2:a=-1;break;case 3:t=-180;break;case 4:i=-1;break;case 5:t=90,i=-1;break;case 6:t=90;break;case 7:t=90,a=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:a,scaleY:i}}var lh={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,a=this.options,i=this.container,n=this.cropper,r=Number(a.minContainerWidth),u=Number(a.minContainerHeight);oe(n,Te),Me(t,Te);var o={width:Math.max(i.offsetWidth,r>=0?r:js),height:Math.max(i.offsetHeight,u>=0?u:zs)};this.containerData=o,We(n,{width:o.width,height:o.height}),oe(t,Te),Me(n,Te)},initCanvas:function(){var t=this.containerData,a=this.imageData,i=this.options.viewMode,n=Math.abs(a.rotate)%180===90,r=n?a.naturalHeight:a.naturalWidth,u=n?a.naturalWidth:a.naturalHeight,o=r/u,l=t.width,f=t.height;t.height*o>t.width?i===3?l=t.height*o:f=t.width/o:i===3?f=t.width/o:l=t.height*o;var E={aspectRatio:o,naturalWidth:r,naturalHeight:u,width:l,height:f};this.canvasData=E,this.limited=i===1||i===2,this.limitCanvas(!0,!0),E.width=Math.min(Math.max(E.width,E.minWidth),E.maxWidth),E.height=Math.min(Math.max(E.height,E.minHeight),E.maxHeight),E.left=(t.width-E.width)/2,E.top=(t.height-E.height)/2,E.oldLeft=E.left,E.oldTop=E.top,this.initialCanvasData=ee({},E)},limitCanvas:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=i.viewMode,l=r.aspectRatio,f=this.cropped&&u;if(t){var E=Number(i.minCanvasWidth)||0,T=Number(i.minCanvasHeight)||0;o>1?(E=Math.max(E,n.width),T=Math.max(T,n.height),o===3&&(T*l>E?E=T*l:T=E/l)):o>0&&(E?E=Math.max(E,f?u.width:0):T?T=Math.max(T,f?u.height:0):f&&(E=u.width,T=u.height,T*l>E?E=T*l:T=E/l));var b=Xe({aspectRatio:l,width:E,height:T});E=b.width,T=b.height,r.minWidth=E,r.minHeight=T,r.maxWidth=1/0,r.maxHeight=1/0}if(a)if(o>(f?0:1)){var N=n.width-r.width,S=n.height-r.height;r.minLeft=Math.min(0,N),r.minTop=Math.min(0,S),r.maxLeft=Math.max(0,N),r.maxTop=Math.max(0,S),f&&this.limited&&(r.minLeft=Math.min(u.left,u.left+(u.width-r.width)),r.minTop=Math.min(u.top,u.top+(u.height-r.height)),r.maxLeft=u.left,r.maxTop=u.top,o===2&&(r.width>=n.width&&(r.minLeft=Math.min(0,N),r.maxLeft=Math.max(0,N)),r.height>=n.height&&(r.minTop=Math.min(0,S),r.maxTop=Math.max(0,S))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=n.width,r.maxTop=n.height},renderCanvas:function(t,a){var i=this.canvasData,n=this.imageData;if(a){var r=ah({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),u=r.width,o=r.height,l=i.width*(u/i.naturalWidth),f=i.height*(o/i.naturalHeight);i.left-=(l-i.width)/2,i.top-=(f-i.height)/2,i.width=l,i.height=f,i.aspectRatio=u/o,i.naturalWidth=u,i.naturalHeight=o,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,We(this.canvas,ee({width:i.width,height:i.height},Vt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var a=this.canvasData,i=this.imageData,n=i.naturalWidth*(a.width/a.naturalWidth),r=i.naturalHeight*(a.height/a.naturalHeight);ee(i,{width:n,height:r,left:(a.width-n)/2,top:(a.height-r)/2}),We(this.image,ee({width:i.width,height:i.height},Vt(ee({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,a=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,n=Number(t.autoCropArea)||.8,r={width:a.width,height:a.height};i&&(a.height*i>a.width?r.height=r.width/i:r.width=r.height*i),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*n),r.height=Math.max(r.minHeight,r.height*n),r.left=a.left+(a.width-r.width)/2,r.top=a.top+(a.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=ee({},r)},limitCropBox:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=this.limited,l=i.aspectRatio;if(t){var f=Number(i.minCropBoxWidth)||0,E=Number(i.minCropBoxHeight)||0,T=o?Math.min(n.width,r.width,r.width+r.left,n.width-r.left):n.width,b=o?Math.min(n.height,r.height,r.height+r.top,n.height-r.top):n.height;f=Math.min(f,n.width),E=Math.min(E,n.height),l&&(f&&E?E*l>f?E=f/l:f=E*l:f?E=f/l:E&&(f=E*l),b*l>T?b=T/l:T=b*l),u.minWidth=Math.min(f,T),u.minHeight=Math.min(E,b),u.maxWidth=T,u.maxHeight=b}a&&(o?(u.minLeft=Math.max(0,r.left),u.minTop=Math.max(0,r.top),u.maxLeft=Math.min(n.width,r.left+r.width)-u.width,u.maxTop=Math.min(n.height,r.top+r.height)-u.height):(u.minLeft=0,u.minTop=0,u.maxLeft=n.width-u.width,u.maxTop=n.height-u.height))},renderCropBox:function(){var t=this.options,a=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&Yt(this.face,Ht,i.width>=a.width&&i.height>=a.height?vs:gi),We(this.cropBox,ee({width:i.width,height:i.height},Vt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),mt(this.element,Ci,this.getData())}},dh={initPreview:function(){var t=this.element,a=this.crossOrigin,i=this.options.preview,n=a?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",u=document.createElement("img");if(a&&(u.crossOrigin=a),u.src=n,u.alt=r,this.viewBox.appendChild(u),this.viewBoxImage=u,!!i){var o=i;typeof i=="string"?o=t.ownerDocument.querySelectorAll(i):i.querySelector&&(o=[i]),this.previews=o,ie(o,function(l){var f=document.createElement("img");Yt(l,_a,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),a&&(f.crossOrigin=a),f.src=n,f.alt=r,f.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',l.innerHTML="",l.appendChild(f)})}},resetPreview:function(){ie(this.previews,function(t){var a=Ri(t,_a);We(t,{width:a.width,height:a.height}),t.innerHTML=a.html,Zd(t,_a)})},preview:function(){var t=this.imageData,a=this.canvasData,i=this.cropBoxData,n=i.width,r=i.height,u=t.width,o=t.height,l=i.left-a.left-t.left,f=i.top-a.top-t.top;!this.cropped||this.disabled||(We(this.viewBoxImage,ee({width:u,height:o},Vt(ee({translateX:-l,translateY:-f},t)))),ie(this.previews,function(E){var T=Ri(E,_a),b=T.width,N=T.height,S=b,y=N,P=1;n&&(P=b/n,y=r*P),r&&y>N&&(P=N/r,S=n*P,y=N),We(E,{width:S,height:y}),We(E.getElementsByTagName("img")[0],ee({width:u*P,height:o*P},Vt(ee({translateX:-l*P,translateY:-f*P},t))))}))}},hh={bind:function(){var t=this.element,a=this.options,i=this.cropper;pe(a.cropstart)&&Ie(t,xi,a.cropstart),pe(a.cropmove)&&Ie(t,Si,a.cropmove),pe(a.cropend)&&Ie(t,Ii,a.cropend),pe(a.crop)&&Ie(t,Ci,a.crop),pe(a.zoom)&&Ie(t,Oi,a.zoom),Ie(i,Vs,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&Ie(i,$s,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&Ie(i,Ys,this.onDblclick=this.dblclick.bind(this)),Ie(t.ownerDocument,qs,this.onCropMove=this.cropMove.bind(this)),Ie(t.ownerDocument,Ws,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&Ie(window,Gs,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,i=this.cropper;pe(a.cropstart)&&xe(t,xi,a.cropstart),pe(a.cropmove)&&xe(t,Si,a.cropmove),pe(a.cropend)&&xe(t,Ii,a.cropend),pe(a.crop)&&xe(t,Ci,a.crop),pe(a.zoom)&&xe(t,Oi,a.zoom),xe(i,Vs,this.onCropStart),a.zoomable&&a.zoomOnWheel&&xe(i,$s,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&xe(i,Ys,this.onDblclick),xe(t.ownerDocument,qs,this.onCropMove),xe(t.ownerDocument,Ws,this.onCropEnd),a.responsive&&xe(window,Gs,this.onResize)}},fh={resize:function(){if(!this.disabled){var t=this.options,a=this.container,i=this.containerData,n=a.offsetWidth/i.width,r=a.offsetHeight/i.height,u=Math.abs(n-1)>Math.abs(r-1)?n:r;if(u!==1){var o,l;t.restore&&(o=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(ie(o,function(f,E){o[E]=f*u})),this.setCropBoxData(ie(l,function(f,E){l[E]=f*u})))}}},dblclick:function(){this.disabled||this.options.dragMode===Hs||this.setDragMode(zd(this.dragBox,_i)?Fs:Ni)},wheel:function(t){var a=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){a.wheeling=!1},50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var a=t.buttons,i=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(H(a)&&a!==1||H(i)&&i!==0||t.ctrlKey))){var n=this.options,r=this.pointers,u;t.changedTouches?ie(t.changedTouches,function(o){r[o.identifier]=Aa(o)}):r[t.pointerId||0]=Aa(t),Object.keys(r).length>1&&n.zoomable&&n.zoomOnTouch?u=ws:u=Ri(t.target,Ht),Hd.test(u)&&mt(this.element,xi,{originalEvent:t,action:u})!==!1&&(t.preventDefault(),this.action=u,this.cropping=!1,u===ks&&(this.cropping=!0,oe(this.dragBox,ga)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var i=this.pointers;t.preventDefault(),mt(this.element,Si,{originalEvent:t,action:a})!==!1&&(t.changedTouches?ie(t.changedTouches,function(n){ee(i[n.identifier]||{},Aa(n,!0))}):ee(i[t.pointerId||0]||{},Aa(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var a=this.action,i=this.pointers;t.changedTouches?ie(t.changedTouches,function(n){delete i[n.identifier]}):delete i[t.pointerId||0],a&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,Et(this.dragBox,ga,this.cropped&&this.options.modal)),mt(this.element,Ii,{originalEvent:t,action:a}))}}},Eh={change:function(t){var a=this.options,i=this.canvasData,n=this.containerData,r=this.cropBoxData,u=this.pointers,o=this.action,l=a.aspectRatio,f=r.left,E=r.top,T=r.width,b=r.height,N=f+T,S=E+b,y=0,P=0,X=n.width,B=n.height,q=!0,F;!l&&t.shiftKey&&(l=T&&b?T/b:1),this.limited&&(y=r.minLeft,P=r.minTop,X=y+Math.min(n.width,i.width,i.left+i.width),B=P+Math.min(n.height,i.height,i.top+i.height));var k=u[Object.keys(u)[0]],_={x:k.endX-k.startX,y:k.endY-k.startY},w=function(ae){switch(ae){case Je:N+_.x>X&&(_.x=X-N);break;case et:f+_.x<y&&(_.x=y-f);break;case qe:E+_.y<P&&(_.y=P-E);break;case dt:S+_.y>B&&(_.y=B-S);break}};switch(o){case gi:f+=_.x,E+=_.y;break;case Je:if(_.x>=0&&(N>=X||l&&(E<=P||S>=B))){q=!1;break}w(Je),T+=_.x,T<0&&(o=et,T=-T,f-=T),l&&(b=T/l,E+=(r.height-b)/2);break;case qe:if(_.y<=0&&(E<=P||l&&(f<=y||N>=X))){q=!1;break}w(qe),b-=_.y,E+=_.y,b<0&&(o=dt,b=-b,E-=b),l&&(T=b*l,f+=(r.width-T)/2);break;case et:if(_.x<=0&&(f<=y||l&&(E<=P||S>=B))){q=!1;break}w(et),T-=_.x,f+=_.x,T<0&&(o=Je,T=-T,f-=T),l&&(b=T/l,E+=(r.height-b)/2);break;case dt:if(_.y>=0&&(S>=B||l&&(f<=y||N>=X))){q=!1;break}w(dt),b+=_.y,b<0&&(o=qe,b=-b,E-=b),l&&(T=b*l,f+=(r.width-T)/2);break;case wt:if(l){if(_.y<=0&&(E<=P||N>=X)){q=!1;break}w(qe),b-=_.y,E+=_.y,T=b*l}else w(qe),w(Je),_.x>=0?N<X?T+=_.x:_.y<=0&&E<=P&&(q=!1):T+=_.x,_.y<=0?E>P&&(b-=_.y,E+=_.y):(b-=_.y,E+=_.y);T<0&&b<0?(o=Ft,b=-b,T=-T,E-=b,f-=T):T<0?(o=Bt,T=-T,f-=T):b<0&&(o=Ut,b=-b,E-=b);break;case Bt:if(l){if(_.y<=0&&(E<=P||f<=y)){q=!1;break}w(qe),b-=_.y,E+=_.y,T=b*l,f+=r.width-T}else w(qe),w(et),_.x<=0?f>y?(T-=_.x,f+=_.x):_.y<=0&&E<=P&&(q=!1):(T-=_.x,f+=_.x),_.y<=0?E>P&&(b-=_.y,E+=_.y):(b-=_.y,E+=_.y);T<0&&b<0?(o=Ut,b=-b,T=-T,E-=b,f-=T):T<0?(o=wt,T=-T,f-=T):b<0&&(o=Ft,b=-b,E-=b);break;case Ft:if(l){if(_.x<=0&&(f<=y||S>=B)){q=!1;break}w(et),T-=_.x,f+=_.x,b=T/l}else w(dt),w(et),_.x<=0?f>y?(T-=_.x,f+=_.x):_.y>=0&&S>=B&&(q=!1):(T-=_.x,f+=_.x),_.y>=0?S<B&&(b+=_.y):b+=_.y;T<0&&b<0?(o=wt,b=-b,T=-T,E-=b,f-=T):T<0?(o=Ut,T=-T,f-=T):b<0&&(o=Bt,b=-b,E-=b);break;case Ut:if(l){if(_.x>=0&&(N>=X||S>=B)){q=!1;break}w(Je),T+=_.x,b=T/l}else w(dt),w(Je),_.x>=0?N<X?T+=_.x:_.y>=0&&S>=B&&(q=!1):T+=_.x,_.y>=0?S<B&&(b+=_.y):b+=_.y;T<0&&b<0?(o=Bt,b=-b,T=-T,E-=b,f-=T):T<0?(o=Ft,T=-T,f-=T):b<0&&(o=wt,b=-b,E-=b);break;case vs:this.move(_.x,_.y),q=!1;break;case ws:this.zoom(eh(u),t),q=!1;break;case ks:if(!_.x||!_.y){q=!1;break}F=ar(this.cropper),f=k.startX-F.left,E=k.startY-F.top,T=r.minWidth,b=r.minHeight,_.x>0?o=_.y>0?Ut:wt:_.x<0&&(f-=T,o=_.y>0?Ft:Bt),_.y<0&&(E-=b),this.cropped||(Me(this.cropBox,Te),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}q&&(r.width=T,r.height=b,r.left=f,r.top=E,this.action=o,this.renderCropBox()),ie(u,function($){$.startX=$.endX,$.startY=$.endY})}},mh={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&oe(this.dragBox,ga),Me(this.cropBox,Te),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=ee({},this.initialImageData),this.canvasData=ee({},this.initialCanvasData),this.cropBoxData=ee({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(ee(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Me(this.dragBox,ga),oe(this.cropBox,Te)),this},replace:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),a?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,ie(this.previews,function(i){i.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Me(this.cropper,Bs)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,oe(this.cropper,Bs)),this},destroy:function(){var t=this.element;return t[J]?(t[J]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=i.left,r=i.top;return this.moveTo(Di(t)?t:n+Number(t),Di(a)?a:r+Number(a))},moveTo:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.movable&&(H(t)&&(i.left=t,n=!0),H(a)&&(i.top=a,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,a){var i=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(i.width*t/i.naturalWidth,null,a)},zoomTo:function(t,a,i){var n=this.options,r=this.canvasData,u=r.width,o=r.height,l=r.naturalWidth,f=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var E=l*t,T=f*t;if(mt(this.element,Oi,{ratio:t,oldRatio:u/l,originalEvent:i})===!1)return this;if(i){var b=this.pointers,N=ar(this.cropper),S=b&&Object.keys(b).length?th(b):{pageX:i.pageX,pageY:i.pageY};r.left-=(E-u)*((S.pageX-N.left-r.left)/u),r.top-=(T-o)*((S.pageY-N.top-r.top)/o)}else ht(a)&&H(a.x)&&H(a.y)?(r.left-=(E-u)*((a.x-r.left)/u),r.top-=(T-o)*((a.y-r.top)/o)):(r.left-=(E-u)/2,r.top-=(T-o)/2);r.width=E,r.height=T,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),H(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var a=this.imageData.scaleY;return this.scale(t,H(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(H(a)?a:1,t)},scale:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.scalable&&(H(t)&&(i.scaleX=t,n=!0),H(a)&&(i.scaleY=a,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=this.options,i=this.imageData,n=this.canvasData,r=this.cropBoxData,u;if(this.ready&&this.cropped){u={x:r.left-n.left,y:r.top-n.top,width:r.width,height:r.height};var o=i.width/i.naturalWidth;if(ie(u,function(E,T){u[T]=E/o}),t){var l=Math.round(u.y+u.height),f=Math.round(u.x+u.width);u.x=Math.round(u.x),u.y=Math.round(u.y),u.width=f-u.x,u.height=l-u.y}}else u={x:0,y:0,width:0,height:0};return a.rotatable&&(u.rotate=i.rotate||0),a.scalable&&(u.scaleX=i.scaleX||1,u.scaleY=i.scaleY||1),u},setData:function(t){var a=this.options,i=this.imageData,n=this.canvasData,r={};if(this.ready&&!this.disabled&&ht(t)){var u=!1;a.rotatable&&H(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,u=!0),a.scalable&&(H(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,u=!0),H(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,u=!0)),u&&this.renderCanvas(!0,!0);var o=i.width/i.naturalWidth;H(t.x)&&(r.left=t.x*o+n.left),H(t.y)&&(r.top=t.y*o+n.top),H(t.width)&&(r.width=t.width*o),H(t.height)&&(r.height=t.height*o),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?ee({},this.containerData):{}},getImageData:function(){return this.sized?ee({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,a={};return this.ready&&ie(["left","top","width","height","naturalWidth","naturalHeight"],function(i){a[i]=t[i]}),a},setCanvasData:function(t){var a=this.canvasData,i=a.aspectRatio;return this.ready&&!this.disabled&&ht(t)&&(H(t.left)&&(a.left=t.left),H(t.top)&&(a.top=t.top),H(t.width)?(a.width=t.width,a.height=t.width/i):H(t.height)&&(a.height=t.height,a.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,a;return this.ready&&this.cropped&&(a={left:t.left,top:t.top,width:t.width,height:t.height}),a||{}},setCropBoxData:function(t){var a=this.cropBoxData,i=this.options.aspectRatio,n,r;return this.ready&&this.cropped&&!this.disabled&&ht(t)&&(H(t.left)&&(a.left=t.left),H(t.top)&&(a.top=t.top),H(t.width)&&t.width!==a.width&&(n=!0,a.width=t.width),H(t.height)&&t.height!==a.height&&(r=!0,a.height=t.height),i&&(n?a.height=a.width/i:r&&(a.width=a.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var a=this.canvasData,i=ih(this.image,this.imageData,a,t);if(!this.cropped)return i;var n=this.getData(t.rounded),r=n.x,u=n.y,o=n.width,l=n.height,f=i.width/Math.floor(a.naturalWidth);f!==1&&(r*=f,u*=f,o*=f,l*=f);var E=o/l,T=Xe({aspectRatio:E,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),b=Xe({aspectRatio:E,width:t.minWidth||0,height:t.minHeight||0},"cover"),N=Xe({aspectRatio:E,width:t.width||(f!==1?i.width:o),height:t.height||(f!==1?i.height:l)}),S=N.width,y=N.height;S=Math.min(T.width,Math.max(b.width,S)),y=Math.min(T.height,Math.max(b.height,y));var P=document.createElement("canvas"),X=P.getContext("2d");P.width=ft(S),P.height=ft(y),X.fillStyle=t.fillColor||"transparent",X.fillRect(0,0,S,y);var B=t.imageSmoothingEnabled,q=B===void 0?!0:B,F=t.imageSmoothingQuality;X.imageSmoothingEnabled=q,F&&(X.imageSmoothingQuality=F);var k=i.width,_=i.height,w=r,$=u,ae,be,Ae,Oe,ge,he;w<=-o||w>k?(w=0,ae=0,Ae=0,ge=0):w<=0?(Ae=-w,w=0,ae=Math.min(k,o+w),ge=ae):w<=k&&(Ae=0,ae=Math.min(o,k-w),ge=ae),ae<=0||$<=-l||$>_?($=0,be=0,Oe=0,he=0):$<=0?(Oe=-$,$=0,be=Math.min(_,l+$),he=be):$<=_&&(Oe=0,be=Math.min(l,_-$),he=be);var x=[w,$,ae,be];if(ge>0&&he>0){var L=S/o;x.push(Ae*L,Oe*L,ge*L,he*L)}return X.drawImage.apply(X,[i].concat(Ps(x.map(function(Y){return Math.floor(ft(Y))})))),P},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!Di(t)&&(a.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var a=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var r=t===Ni,u=a.movable&&t===Fs;t=r||u?t:Hs,a.dragMode=t,Yt(i,Ht,t),Et(i,_i,r),Et(i,Ai,u),a.cropBoxMovable||(Yt(n,Ht,t),Et(n,_i,r),Et(n,Ai,u))}return this}},Th=ye.Cropper,rr=function(){function e(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Ld(this,e),!t||!qd.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=ee({},Ks,ht(a)&&a),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return Rd(e,[{key:"init",value:function(){var a=this.element,i=a.tagName.toLowerCase(),n;if(!a[J]){if(a[J]=this,i==="img"){if(this.isImg=!0,n=a.getAttribute("src")||"",this.originalUrl=n,!n)return;n=a.src}else i==="canvas"&&window.HTMLCanvasElement&&(n=a.toDataURL());this.load(n)}}},{key:"load",value:function(a){var i=this;if(a){this.url=a,this.imageData={};var n=this.element,r=this.options;if(!r.rotatable&&!r.scalable&&(r.checkOrientation=!1),!r.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Yd.test(a)){Vd.test(a)?this.read(rh(a)):this.clone();return}var u=new XMLHttpRequest,o=this.clone.bind(this);this.reloading=!0,this.xhr=u,u.onabort=o,u.onerror=o,u.ontimeout=o,u.onprogress=function(){u.getResponseHeader("content-type")!==Qs&&u.abort()},u.onload=function(){i.read(u.response)},u.onloadend=function(){i.reloading=!1,i.xhr=null},r.checkCrossOrigin&&ir(a)&&n.crossOrigin&&(a=nr(a)),u.open("GET",a,!0),u.responseType="arraybuffer",u.withCredentials=n.crossOrigin==="use-credentials",u.send()}}},{key:"read",value:function(a){var i=this.options,n=this.imageData,r=oh(a),u=0,o=1,l=1;if(r>1){this.url=uh(a,Qs);var f=ch(r);u=f.rotate,o=f.scaleX,l=f.scaleY}i.rotatable&&(n.rotate=u),i.scalable&&(n.scaleX=o,n.scaleY=l),this.clone()}},{key:"clone",value:function(){var a=this.element,i=this.url,n=a.crossOrigin,r=i;this.options.checkCrossOrigin&&ir(i)&&(n||(n="anonymous"),r=nr(i)),this.crossOrigin=n,this.crossOriginUrl=r;var u=document.createElement("img");n&&(u.crossOrigin=n),u.src=r||i,u.alt=a.alt||"The image to crop",this.image=u,u.onload=this.start.bind(this),u.onerror=this.stop.bind(this),oe(u,Us),a.parentNode.insertBefore(u,a.nextSibling)}},{key:"start",value:function(){var a=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var n=ye.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(ye.navigator.userAgent),r=function(f,E){ee(a.imageData,{naturalWidth:f,naturalHeight:E,aspectRatio:f/E}),a.initialImageData=ee({},a.imageData),a.sizing=!1,a.sized=!0,a.build()};if(i.naturalWidth&&!n){r(i.naturalWidth,i.naturalHeight);return}var u=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=u,u.onload=function(){r(u.width,u.height),n||o.removeChild(u)},u.src=i.src,n||(u.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(u))}},{key:"stop",value:function(){var a=this.image;a.onload=null,a.onerror=null,a.parentNode.removeChild(a),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var a=this.element,i=this.options,n=this.image,r=a.parentNode,u=document.createElement("div");u.innerHTML=Wd;var o=u.querySelector(".".concat(J,"-container")),l=o.querySelector(".".concat(J,"-canvas")),f=o.querySelector(".".concat(J,"-drag-box")),E=o.querySelector(".".concat(J,"-crop-box")),T=E.querySelector(".".concat(J,"-face"));this.container=r,this.cropper=o,this.canvas=l,this.dragBox=f,this.cropBox=E,this.viewBox=o.querySelector(".".concat(J,"-view-box")),this.face=T,l.appendChild(n),oe(a,Te),r.insertBefore(o,a.nextSibling),Me(n,Us),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,oe(E,Te),i.guides||oe(E.getElementsByClassName("".concat(J,"-dashed")),Te),i.center||oe(E.getElementsByClassName("".concat(J,"-center")),Te),i.background&&oe(o,"".concat(J,"-bg")),i.highlight||oe(T,wd),i.cropBoxMovable&&(oe(T,Ai),Yt(T,Ht,gi)),i.cropBoxResizable||(oe(E.getElementsByClassName("".concat(J,"-line")),Te),oe(E.getElementsByClassName("".concat(J,"-point")),Te)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),pe(i.ready)&&Ie(a,Xs,i.ready,{once:!0}),mt(a,Xs)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var a=this.cropper.parentNode;a&&a.removeChild(this.cropper),Me(this.element,Te)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=Th,e}},{key:"setDefaults",value:function(a){ee(Ks,ht(a)&&a)}}])}();ee(rr.prototype,lh,dh,hh,fh,Eh,mh);function ph(e,t){const a=e.split(",")||[],i=a[0].match(/:(.*?);/)[1],n=a[1]&&atob(a[1]);let r=n&&n.length;const u=new Uint8Array(r);for(;r--;)u[r]=n==null?void 0:n.charCodeAt(r);return new File([u],t,{type:i})}const bh={key:0,contenteditable:"false",class:"z-10 w-[100vw] h-[100vh] bg-[rgba(0,0,0,0.7)] flex flex-col justify-center items-center fixed top-0 left-0 cursor-auto"},gh={class:"w-[700px] flex flex-col bg-white rounded pb-8"},_h={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},Ah={class:"flex flex-col h-full"},Nh={class:"flex flex-row justify-center items-start flex-1"},Ch={class:"flex flex-col items-start flex-1"},Ih={class:"flex flex-col w-full px-6 py-4"},Sh={class:"flex flex-col w-full"},xh={class:"flex flex-row items-center"},Oh={class:"relative bg-[#474AFF] text-white rounded p-3"},Dh={class:"flex flex-row items-start justify-between mt-3"},Lh={class:"flex flex-col"},Rh={class:"flex flex-col justify-center items-center border w-[300px] h-[300px]"},yh={key:0,class:"w-full text-center"},Mh=["src"],Ph={class:"flex flex-col items-center",style:{width:"300px",height:"300px"}},kh={class:"text-[#999] mt-05 flex justify-center mt-4"},vh={class:"w-full flex justify-end space-x-5 mt-5 px-6"},wh=["loading"],Bh=c.defineComponent({__name:"index",emits:["cancel","ok"],setup(e,{expose:t,emit:a}){const i=a,n=c.ref({coverUrl:"",inputValue:"",uploadType:2,videoHost:"",videoUrl:""}),r=c.ref(),u=c.ref({autoCrop:!0,autoCropArea:1,background:!0,center:!0,cropBoxResizable:!0,dragMode:"move",preview:".before",toggleDragModeOnDblclick:!0,viewMode:1,zoomOnWheel:!0}),o=c.ref(!1),l=c.ref({afterImg:"",image:null,myCropper:null}),f=c.ref("image/jpeg"),E=F=>{console.log(F);const k=F.target.files[0];if(k){k.name&&(n.value.inputValue=k.name);const _=new FileReader;_.onload=w=>{var $,ae;console.log("e?.target?.result",($=w==null?void 0:w.target)==null?void 0:$.result),T((ae=w==null?void 0:w.target)==null?void 0:ae.result)},_.readAsDataURL(k)}};async function T(F){if(!F)return;await q();const k=F;l.value.image=k,l.value.image&&b()}function b(){const F=document.querySelector("#imgId");F&&F.addEventListener("load",()=>{B(),l.value.myCropper=new rr(F,u.value)})}const N=c.ref(!1);function S(F,k,_){r.value=F,F&&F.aspectRatio&&(u.value.aspectRatio=F.aspectRatio),_&&(n.value.inputValue=_),N.value=!0,k&&T(k)}function y(){N.value=!1}const P=()=>{var k,_;if(!l.value.myCropper)return;o.value=!0,l.value.afterImg=l.value.myCropper.getCroppedCanvas({height:(k=r.value)==null?void 0:k.height,imageSmoothingQuality:"high",width:(_=r.value)==null?void 0:_.width}).toDataURL(f.value);const F=ph(l.value.afterImg,n.value.inputValue);i("ok",F),o.value=!1,q(),B(),y()};function X(){q(),B(),y(),i("cancel")}function B(){l.value.myCropper&&l.value.myCropper.destroy()}function q(){l.value.image=""}return t({handleCloseCropper:y,handleOpenCropper:S}),(F,k)=>{var _,w,$;return N.value?(c.openBlock(),c.createElementBlock("div",bh,[c.createElementVNode("div",gh,[c.createElementVNode("div",_h,[k[1]||(k[1]=c.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"图片裁剪",-1)),c.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:c.withModifiers(X,["stop"])})]),c.createElementVNode("div",Ah,[c.createElementVNode("div",Nh,[c.createElementVNode("div",Ch,[c.createElementVNode("div",Ih,[c.createElementVNode("div",Sh,[c.createElementVNode("div",xh,[c.createElementVNode("div",Oh,[c.createElementVNode("input",{type:"file",accept:"image/*",onClick:k[0]||(k[0]=c.withModifiers(()=>{},["stop"])),contenteditable:"false",ref:"fileInput",onChange:E,class:"absolute top-0 left-0 w-[110px] h-[40px] opacity-0 cursor-pointer"},null,544),k[2]||(k[2]=c.createElementVNode("span",{id:"uploadHandler",class:"cursor-pointer"}," 选择/更换图片 ",-1))]),k[3]||(k[3]=c.createElementVNode("span",{class:"text-sm text-[#999] ml-3"},"滚动鼠标放大或缩小图片",-1))]),c.createElementVNode("div",Dh,[c.createElementVNode("div",Lh,[c.createElementVNode("div",Rh,[l.value.image?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",yh," 请上传图片 ")),c.createElementVNode("img",{id:"imgId",src:l.value.image,style:{width:"300px"}},null,8,Mh)])]),c.createElementVNode("div",Ph,[k[4]||(k[4]=c.createElementVNode("div",{class:"before w-[270px] h-[200px] pr-[70px] border"},null,-1)),c.createElementVNode("div",kh," 预览画像 "+c.toDisplayString(((_=r.value)==null?void 0:_.width)||"")+" "+c.toDisplayString((w=r.value)!=null&&w.width?"x":"")+" "+c.toDisplayString((($=r.value)==null?void 0:$.height)||""),1)])])])])])]),c.createElementVNode("div",vh,[c.createElementVNode("span",{loading:o.value,class:"!w-22 bg-[#474AFF] text-white rounded py-2 px-6 cursor-pointer",type:"primary",onClick:P}," 确认 ",8,wh),c.createElementVNode("span",{class:"!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",onClick:X},"取消")])])])])):c.createCommentVNode("",!0)}}}),Uh={key:0,"date-action":"1",class:"aidition",contenteditable:"false"},Fh={class:"aidition_left"},Hh={class:"aidition_right"},Yh={key:0,"date-action":"1",class:"text-red-500 text-xs mt-1"},Vh=Ei(c.defineComponent({__name:"ElementRenderer",props:{element:{type:Object,required:!0},selectedElement:Object,hoveredElement:Object,icons:{type:Array,default:()=>[]}},emits:["selectElement","hoverElement","updateText","contentUpdated","blockAction","addIcon","upload"],setup(e,{emit:t}){const a=e,i=t,n=c.computed(()=>a.selectedElement===a.element),r=c.computed(()=>a.hoveredElement===a.element),u=c.ref(!1),o=c.ref(!1),l=c.ref(""),f=c.computed(()=>a.element.rule.minText||0),E=c.computed(()=>a.element.rule.maxText||1/0),T=c.ref();function b(O){O.xpath!="/div[1]"&&(u.value=!0,i("selectElement",O))}function N(O){i("selectElement",O)}function S(O,D){i("hoverElement",O,D)}function y(O){i("hoverElement",O)}function P(O){O.currentTarget.contains(O.relatedTarget)?i("hoverElement",null):a.hoveredElement?i("hoverElement",null,a.hoveredElement.parentxpath):i("hoverElement",null)}function X(){u.value=!1,i("contentUpdated",B())}function B(){function O(D){const j=Object.entries(D.attrs||{}).map(([it,df])=>`${it}="${df}"`).join(" "),V=`<${D.tag}${j?" "+j:""}>`,K=`</${D.tag}>`,at=(D.children||[]).map(it=>O(it)).join("");return`${V}${D.editText||D.text||""}${at}${K}`}return O(a.element)}function q(O){var V;O.stopPropagation();const D=O.target,j=((V=D.firstChild)==null?void 0:V.nodeType)===Node.TEXT_NODE&&D.firstChild.nodeValue||"";if(j.length<f.value){o.value=!0,l.value=`最少输入 ${f.value} 个字符`;return}else if(j.length>E.value){o.value=!0,l.value=`最多输入 ${E.value} 个字符`;return}else o.value=!1,l.value="";a.element.editText=j,i("updateText",{element:a.element,newText:j}),i("contentUpdated",B())}function F(O){i("updateText",O),i("contentUpdated",B())}function k(){const O={...a.element};i("blockAction",{action:"add",element:a.element,newBlock:O})}function _(){i("blockAction",{action:"moveUp",element:a.element})}function w(){i("blockAction",{action:"moveDown",element:a.element})}function $(){i("blockAction",{action:"delete",element:a.element})}function ae(O){i("blockAction",O),i("contentUpdated",B())}function be(){T.value.openModal()}function Ae(O){i("addIcon",O,a.element),i("contentUpdated",B())}function Oe(O,D){i("addIcon",O,D),i("contentUpdated",B())}let ge;const he=c.ref(),x=c.ref({});function L(O,D){if(D.rule.minImageWidth&&D.rule.maxImageHeight?(x.value.width=D.rule.minImageWidth,x.value.height=D.rule.maxImageHeight,x.value.aspectRatio=D.rule.minImageWidth/D.rule.maxImageHeight):x.value={},O){O.name;const j=new FileReader;j.onload=V=>{var K;ge=(K=V==null?void 0:V.target)==null?void 0:K.result,he.value.handleOpenCropper(x.value,ge,O.name)},j.readAsDataURL(O)}}function Y(O,D){if(console.log(typeof O=="object",O),O)if(typeof O=="object"){D.attrs.alt=O.name;const j=new FileReader;j.onload=V=>{var at;let K=(at=V==null?void 0:V.target)==null?void 0:at.result;D.attrs.src=K,i("upload",K,D),i("contentUpdated",B())},j.readAsDataURL(O)}else D.attrs.src=O,i("upload",O,D),i("contentUpdated",B())}const G=async O=>{};return(O,D)=>{const j=c.resolveComponent("ElementRenderer",!0);return c.openBlock(),c.createElementBlock(c.Fragment,null,[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(a.element.tag),c.mergeProps({class:[" ",r.value?"border-dashed border-[1px] border-blue-500":"",n.value?"border-dashed border-[1px] border-green-500 z-10":"",o.value?"border-dashed border-[1px] border-red-500":"",(!r.value&&!n.value&&!o.value,"")]},a.element.attrs,{contenteditable:u.value,onClick:D[1]||(D[1]=c.withModifiers(()=>b(a.element),["stop"])),onMouseenter:D[2]||(D[2]=()=>y(a.element)),onMouseleave:P,onBlur:X,onInput:q}),{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(a.element.editText||a.element.text),1),a.element.children&&a.element.children.length?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[a.element.type===c.unref(de).Block?(c.openBlock(),c.createElementBlock("div",Uh,[c.createElementVNode("span",Fh,c.toDisplayString(a.element.editText||a.element.text),1),c.createElementVNode("div",Hh,[c.createElementVNode("span",{onClick:c.withModifiers(_,["stop"])},"排前"),c.createElementVNode("span",{onClick:c.withModifiers(w,["stop"])},"排后"),c.createElementVNode("span",{onClick:c.withModifiers($,["stop"])},"删除")])])):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.element.children,(V,K)=>(c.openBlock(),c.createBlock(j,{icons:e.icons,key:K,element:V,selectedElement:a.selectedElement,hoveredElement:a.hoveredElement,onSelectElement:N,onHoverElement:S,onUpdateText:F,onBlockAction:ae,onAddIcon:Oe,onUpload:Y},null,8,["icons","element","selectedElement","hoveredElement"]))),128)),a.element.type===c.unref(de).Block?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createElementVNode("span",{class:"iconfont icon-a-tianjiaxian icon_gray_add",onClick:c.withModifiers(k,["stop"]),contenteditable:"false"}),c.createElementVNode("div",{class:"add_modules",onClick:c.withModifiers(k,["stop"]),contenteditable:"false"},D[7]||(D[7]=[c.createElementVNode("span",{class:"iconfont icon-a-tianjiamian"},null,-1),c.createElementVNode("span",null,"添加模块",-1)])),c.createElementVNode("div",{class:"cont_aidition",contenteditable:"false",onClick:D[0]||(D[0]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{onClick:c.withModifiers(_,["stop"]),class:"iconfont icon-paiqian"}),c.createElementVNode("span",{onClick:c.withModifiers(w,["stop"]),class:"iconfont icon-paihou"}),c.createElementVNode("span",{onClick:c.withModifiers($,["stop"]),class:"iconfont icon-shanchu"}),c.createElementVNode("span",{onClick:c.withModifiers(k,["stop"]),class:"iconfont icon-a-tianjiaxian"})])],64)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)]),_:1},16,["class","contenteditable"])),a.element.type==c.unref(de).Text&&o.value?(c.openBlock(),c.createElementBlock("div",Yh,c.toDisplayString(l.value),1)):c.createCommentVNode("",!0),a.element.type===c.unref(de).Image?(c.openBlock(),c.createElementBlock("div",{key:1,class:"absolute top-0 right-0 bg-white rounded shadow z-10 py-0.5 px-1",onClick:D[3]||(D[3]=c.withModifiers(()=>{},["stop"]))},[D[8]||(D[8]=c.createElementVNode("span",{contenteditable:"false",class:"cursor-pointer"},"上传图片",-1)),c.createVNode(Od,{customUpload:V=>L(V,a.element),height:a.element.rule.maxImageHeight,width:a.element.rule.minImageWidth,uploadByImage:G},null,8,["customUpload","height","width"])])):c.createCommentVNode("",!0),a.element.type===c.unref(de).Icon?(c.openBlock(),c.createElementBlock("div",{key:2,class:"absolute -top-6 left-0 bg-white py-0.5 px-1 rounded shadow z-10",onClick:D[5]||(D[5]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{onClick:D[4]||(D[4]=c.withModifiers(V=>be(),["stop"])),contenteditable:"false",class:"cursor-pointer"},"选择图标")])):c.createCommentVNode("",!0),c.createVNode(xd,{icons:e.icons,ref_key:"iconRef",ref:T,onOk:Ae},null,8,["icons"]),c.createVNode(Bh,{ref_key:"cropperRef",ref:he,onOk:D[6]||(D[6]=V=>Y(V,a.element))},null,512)],64)}}}),[["__scopeId","data-v-f26b78b2"]]),qh={key:0},Wh={key:0},Xh={key:1},Gh={key:2},$h={key:3},Qh={key:4},jh={key:5},zh={key:6},Kh={key:7},Zh={key:8},Jh=c.defineComponent({__name:"EditorPanel",props:{element:Object},emits:["updateElement"],setup(e,{emit:t}){const a=e,i=t,n=c.ref({rule:{},...a.element});c.watch(()=>a.element,u=>{n.value={rule:{},...u}},{immediate:!0});function r(){i("updateElement",n.value)}return(u,o)=>(c.openBlock(),c.createElementBlock("div",null,[n.value?(c.openBlock(),c.createElementBlock("div",qh,[n.value.text!==void 0?(c.openBlock(),c.createElementBlock("div",Wh,[o[13]||(o[13]=c.createElementVNode("label",{class:"block mt-4"},"内容",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>n.value.text=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.text]])])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[o[14]||(o[14]=c.createElementVNode("label",{class:"block mt-4"},"节点",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=l=>n.value.xpath=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.xpath]])]),c.createElementVNode("div",null,[o[16]||(o[16]=c.createElementVNode("label",{class:"block mt-4"},"节点类型",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[2]||(o[2]=l=>n.value.type=l),class:"border rounded p-2 w-full"},o[15]||(o[15]=[c.createElementVNode("option",{value:0},"无",-1),c.createElementVNode("option",{value:1},"文本",-1),c.createElementVNode("option",{value:2},"图片",-1),c.createElementVNode("option",{value:3},"视频",-1),c.createElementVNode("option",{value:4},"图标",-1),c.createElementVNode("option",{value:5},"链接",-1),c.createElementVNode("option",{value:10},"块",-1)]),512),[[c.vModelSelect,n.value.type]])]),n.value.type==c.unref(de).Text?(c.openBlock(),c.createElementBlock("div",Xh,[o[17]||(o[17]=c.createElementVNode("label",{class:"block mt-4"},"最大文本长度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=l=>n.value.rule.maxText=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.rule.maxText]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Text?(c.openBlock(),c.createElementBlock("div",Gh,[o[18]||(o[18]=c.createElementVNode("label",{class:"block mt-4"},"最小文本长度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[4]||(o[4]=l=>n.value.rule.minText=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.rule.minText]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Image?(c.openBlock(),c.createElementBlock("div",$h,[o[20]||(o[20]=c.createElementVNode("label",{class:"block mt-4"},"是否裁剪",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[5]||(o[5]=l=>n.value.rule.crop=l),class:"border rounded p-2 w-full"},o[19]||(o[19]=[c.createElementVNode("option",{value:!0},"是",-1),c.createElementVNode("option",{value:!1},"否",-1)]),512),[[c.vModelSelect,n.value.rule.crop]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Image?(c.openBlock(),c.createElementBlock("div",Qh,[o[21]||(o[21]=c.createElementVNode("label",{class:"block mt-4"},"图片宽度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[6]||(o[6]=l=>n.value.rule.minImageWidth=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.rule.minImageWidth]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Image?(c.openBlock(),c.createElementBlock("div",jh,[o[22]||(o[22]=c.createElementVNode("label",{class:"block mt-4"},"图片高度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=l=>n.value.rule.maxImageHeight=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.rule.maxImageHeight]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Block?(c.openBlock(),c.createElementBlock("div",zh,[o[23]||(o[23]=c.createElementVNode("label",{class:"block mt-4"},"块最小数量",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[8]||(o[8]=l=>n.value.rule.minBlock=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.rule.minBlock]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Block?(c.openBlock(),c.createElementBlock("div",Kh,[o[24]||(o[24]=c.createElementVNode("label",{class:"block mt-4"},"块最大数量",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[9]||(o[9]=l=>n.value.rule.maxBlock=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.rule.maxBlock]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Text||n.value.type==c.unref(de).Icon?(c.openBlock(),c.createElementBlock("div",Zh,[o[26]||(o[26]=c.createElementVNode("label",{class:"block mt-4"},"颜色/主题色",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[10]||(o[10]=l=>n.value.rule.isThemeColor=l),class:"border rounded p-2 w-full"},o[25]||(o[25]=[c.createElementVNode("option",{value:!0},"是",-1),c.createElementVNode("option",{value:!1},"否",-1)]),512),[[c.vModelSelect,n.value.rule.isThemeColor]])])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[o[28]||(o[28]=c.createElementVNode("label",{class:"block mt-4"},"是否必填",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[11]||(o[11]=l=>n.value.rule.isRequired=l),class:"border rounded p-2 w-full"},o[27]||(o[27]=[c.createElementVNode("option",{value:!0},"是",-1),c.createElementVNode("option",{value:!1},"否",-1)]),512),[[c.vModelSelect,n.value.rule.isRequired]])]),c.createElementVNode("div",null,[o[30]||(o[30]=c.createElementVNode("label",{class:"block mt-4"},"是否只读",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[12]||(o[12]=l=>n.value.rule.isReadOnly=l),class:"border rounded p-2 w-full"},o[29]||(o[29]=[c.createElementVNode("option",{value:!0},"是",-1),c.createElementVNode("option",{value:!1},"否",-1)]),512),[[c.vModelSelect,n.value.rule.isReadOnly]])])])):c.createCommentVNode("",!0),c.createElementVNode("button",{onClick:r,class:"mt-4 p-2 bg-blue-500 text-white rounded"},"保存")]))}}),ef={class:"flex h-screen"},tf={class:"goodschool_mobile"},af=["innerHTML"],nf=["innerHTML"],sf={class:"flex-1 bg-gray-100 overflow-auto"},rf={class:"p-4"},uf={key:0,class:"text-red-500 text-xs mt-2"},of={key:0,class:"resize-area border-l overflow-auto w-[375px]"},cf={class:"p-4"},ur=Ei(c.defineComponent({__name:"Designer",props:{mode:{default:"design"},template:{},css:{},previewWidth:{default:375},uploadByFile:{},icons:{}},setup(e){const t=e,a=c.ref(t.template);c.watch(()=>t.template,x=>{a.value=x},{immediate:!0}),c.watch(()=>a.value,x=>{x&&(n.value=y(x))},{immediate:!0}),c.watch(()=>t.css,x=>{x.forEach(L=>{if(document.querySelector(`link[href="${L}"]`))return;const Y=document.createElement("link");Y.rel="stylesheet",Y.href=L,document.head.appendChild(Y)})},{immediate:!0});const i=c.ref(t.mode),n=c.ref(),r=c.ref(),u=c.ref(),o=c.ref("");let l=Os("",{},!1);function f(x){console.log("选择",x),r.value=x}function E(x,L=""){if(L){const Y=T(n.value,L);Y?u.value=Y:u.value=x}else u.value=x}function T(x,L){if(x.xpath===L)return x;if(x.children&&x.children.length)for(const Y of x.children){const G=T(Y,L);if(G)return G}}function b(x){var L,Y,G;if(console.log(x,r.value),r.value)if(r.value.rule=x.rule,r.value.type=x.type,(L=x.rule)!=null&&L.isThemeColor?(x.attrs.class+=" ys_tit_color",x.attrs.style&&(x.attrs.style=void 0)):((Y=x.attrs.class)!=null&&Y.includes(" ys_tit_color")&&(x.attrs.class=x.attrs.class.replace(" ys_tit_color"," ")),x.rule.color&&(x.attrs.style={color:x.rule.color})),r.value.type===de.Block){const O=T(n.value,r.value.parentxpath||"");O&&O.children&&O.children.forEach(D=>{var j;D.tag===r.value.tag&&(D.rule=x.rule,D.type=x.type,(j=D.attrs.class)!=null&&j.includes(" mb40")||(D.attrs.class+=" mb40"))})}else(G=r.value.attrs.class)!=null&&G.includes(" mb40")&&(r.value.attrs.class=r.value.attrs.class.replace(" mb40"," "))}const N=c.ref("");function S(x){N.value=x}function y(x){l=Os(x);const L=l("body").children().toArray().map(Y=>P(l(Y)));return console.log(L[0]),L[0]}function P(x,L=""){function Y(D){if(!D||!D[0])return"";const j=[];let V=D;for(;V.length&&V[0].tagName!=="html";){const K=V[0].tagName,it=V.parent().children(K).index(V)+1;j.unshift(`${K}[${it}]`),V=V.parent()}return"/html/"+j.join("/")}const G=Y(x).replace("/html/body[1]",""),O=x.children().toArray().map(D=>P(l(D),G));return{tag:x[0].tagName,text:x.contents().not(x.children()).text().trim(),attrs:x[0].attribs,children:O,xpath:G,parentxpath:L,rule:{}}}function X(x){console.log("更新子节点的文本",x);const L=T(n.value,x.element.xpath);L&&(L.editText=x.newText)}function B(x,L=""){function Y(G,O){var V;const j=(O?((V=T(n.value,O))==null?void 0:V.children)||[]:[n.value]).filter(K=>K.tag===G.tag).indexOf(G)+1;return`${O}/${G.tag}[${j}]`}x.xpath=Y(x,L),x.parentxpath=L,(x.children||[]).forEach(G=>B(G,x.xpath))}function q({action:x,element:L,newBlock:Y}){console.log("块操作",x,L,Y);const G=T(n.value,L.parentxpath||"");if(!G||!G.children)return;const O=G.children.findIndex(K=>K===L);if(O===-1)return;const D=G.children.length,{minBlock:j,maxBlock:V}=L.rule;if((x==="add"||x==="copy")&&D>=(V||1/0)){o.value=`无法添加更多块。最大块数量为 ${V}`;return}switch(x){case"add":if(Y){const K={...Y,xpath:"",children:JSON.parse(JSON.stringify(Y.children))};G.children.splice(O+1,0,K)}break;case"copy":if(Y){const K={...Y,xpath:"",children:JSON.parse(JSON.stringify(Y.children))};G.children.splice(O+1,0,K)}break;case"moveUp":if(O>0){const[K]=G.children.splice(O,1);G.children.splice(O-1,0,K)}break;case"moveDown":if(O<G.children.length-1){const[K]=G.children.splice(O,1);G.children.splice(O+1,0,K)}break;case"delete":if(D<=(j||0)){o.value=`无法删除更多块。最小块数量为 ${j}`;return}G.children.splice(O,1);break}o.value="",B(n.value)}function F(x,L){let Y=L.attrs.class.replace(/icon-\S+/g,`icon-${x}`);L.attrs.class=Y}function k(x,L){L.attrs.src=x}const _=c.ref(t.previewWidth),w=c.ref(375);let $=c.ref(!1),ae=c.ref(""),be=0,Ae=0;function Oe(x){ae.value=x,$.value=!0,be=event.clientX,Ae=_.value,window.addEventListener("mousemove",ge),window.addEventListener("mouseup",he)}function ge(x){if(!$.value)return;const L=x.clientX-be;ae.value==="preview"?_.value=Math.max(200,Ae+L):ae.value==="structure"&&(w.value=Math.max(200,Ae-L))}function he(){$.value=!1,ae.value="",window.removeEventListener("mousemove",ge),window.removeEventListener("mouseup",he)}return(x,L)=>(c.openBlock(),c.createElementBlock("div",ef,[c.createElementVNode("div",{class:"border-l overflow-auto resize-area",style:c.normalizeStyle({width:_.value+"px"})},[c.createElementVNode("div",tf,[L[1]||(L[1]=c.createElementVNode("h2",{class:"text-lg font-bold"},"实时预览",-1)),N.value?(c.openBlock(),c.createElementBlock("div",{key:0,innerHTML:N.value},null,8,af)):(c.openBlock(),c.createElementBlock("div",{key:1,innerHTML:c.unref(l)("body").html()},null,8,nf))])],4),c.createElementVNode("div",{class:"resizer",onMousedown:L[0]||(L[0]=Y=>Oe("preview"))},null,32),c.createElementVNode("div",sf,[c.createElementVNode("div",rf,[L[2]||(L[2]=c.createElementVNode("div",{class:"flex justify-between"},[c.createElementVNode("h2",{class:"text-lg font-bold"},"结构渲染")],-1)),o.value?(c.openBlock(),c.createElementBlock("div",uf,c.toDisplayString(o.value),1)):c.createCommentVNode("",!0),n.value?(c.openBlock(),c.createBlock(Vh,{key:1,icons:x.icons,element:n.value,selectedElement:r.value,hoveredElement:u.value,onSelectElement:f,onHoverElement:E,onContentUpdated:S,onUpdateText:X,onBlockAction:q,onAddIcon:F,onUpload:k},null,8,["icons","element","selectedElement","hoveredElement"])):c.createCommentVNode("",!0)])]),i.value=="design"?(c.openBlock(),c.createElementBlock("div",of,[c.createElementVNode("div",cf,[L[3]||(L[3]=c.createElementVNode("h2",{class:"text-lg font-bold"},"节点属性",-1)),r.value?(c.openBlock(),c.createBlock(Jh,{key:0,element:r.value,onUpdateElement:b},null,8,["element"])):c.createCommentVNode("",!0)])])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-3755c983"]]),lf={install(e){e.component("Designer",ur)}};we.Designer=ur,we.default=lf,Object.defineProperties(we,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
16
+ */function ks(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,i)}return a}function ws(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?ks(Object(a),!0).forEach(function(i){Ud(e,i,a[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ks(Object(a)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(a,i))})}return e}function wd(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var i=a.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bs(e){var t=wd(e,"string");return typeof t=="symbol"?t:t+""}function gi(e){"@babel/helpers - typeof";return gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gi(e)}function Bd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vs(e,t){for(var a=0;a<t.length;a++){var i=t[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Bs(i.key),i)}}function vd(e,t,a){return t&&vs(e.prototype,t),a&&vs(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ud(e,t,a){return t=Bs(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Us(e){return Fd(e)||Hd(e)||Vd(e)||Yd()}function Fd(e){if(Array.isArray(e))return _i(e)}function Hd(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vd(e,t){if(e){if(typeof e=="string")return _i(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _i(e,t)}}function _i(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function Yd(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
17
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Na=typeof window<"u"&&typeof window.document<"u",ke=Na?window:{},Ai=Na&&ke.document.documentElement?"ontouchstart"in ke.document.documentElement:!1,Ni=Na?"PointerEvent"in ke:!1,z="cropper",Ci="all",Fs="crop",Hs="move",Vs="zoom",it="e",nt="w",mt="s",Xe="n",Ht="ne",Vt="nw",Yt="se",qt="sw",Ii="".concat(z,"-crop"),Ys="".concat(z,"-disabled"),ge="".concat(z,"-hidden"),qs="".concat(z,"-hide"),qd="".concat(z,"-invisible"),Ca="".concat(z,"-modal"),Si="".concat(z,"-move"),Wt="".concat(z,"Action"),Ia="".concat(z,"Preview"),xi="crop",Ws="move",$s="none",Oi="crop",Di="cropend",Li="cropmove",yi="cropstart",Gs="dblclick",Wd=Ai?"touchstart":"mousedown",$d=Ai?"touchmove":"mousemove",Gd=Ai?"touchend touchcancel":"mouseup",Xs=Ni?"pointerdown":Wd,Qs=Ni?"pointermove":$d,js=Ni?"pointerup pointercancel":Gd,zs="ready",Ks="resize",Zs="wheel",Ri="zoom",Js="image/jpeg",Xd=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Qd=/^data:/,jd=/^data:image\/jpeg;base64,/,zd=/^img|canvas$/i,er=200,tr=100,ar={viewMode:0,dragMode:xi,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:er,minContainerHeight:tr,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Kd='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',Zd=Number.isNaN||ke.isNaN;function Y(e){return typeof e=="number"&&!Zd(e)}var ir=function(t){return t>0&&t<1/0};function Mi(e){return typeof e>"u"}function st(e){return gi(e)==="object"&&e!==null}var Jd=Object.prototype.hasOwnProperty;function Et(e){if(!st(e))return!1;try{var t=e.constructor,a=t.prototype;return t&&a&&Jd.call(a,"isPrototypeOf")}catch{return!1}}function _e(e){return typeof e=="function"}var eh=Array.prototype.slice;function nr(e){return Array.from?Array.from(e):eh.call(e)}function te(e,t){return e&&_e(t)&&(Array.isArray(e)||Y(e.length)?nr(e).forEach(function(a,i){t.call(e,a,i,e)}):st(e)&&Object.keys(e).forEach(function(a){t.call(e,e[a],a,e)})),e}var K=Object.assign||function(t){for(var a=arguments.length,i=new Array(a>1?a-1:0),n=1;n<a;n++)i[n-1]=arguments[n];return st(t)&&i.length>0&&i.forEach(function(r){st(r)&&Object.keys(r).forEach(function(u){t[u]=r[u]})}),t},th=/\.\d*(?:0|9){12}\d*$/;function Tt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return th.test(e)?Math.round(e*t)/t:e}var ah=/^width|height|left|top|marginLeft|marginTop$/;function Qe(e,t){var a=e.style;te(t,function(i,n){ah.test(n)&&Y(i)&&(i="".concat(i,"px")),a[n]=i})}function ih(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function ce(e,t){if(t){if(Y(e.length)){te(e,function(i){ce(i,t)});return}if(e.classList){e.classList.add(t);return}var a=e.className.trim();a?a.indexOf(t)<0&&(e.className="".concat(a," ").concat(t)):e.className=t}}function we(e,t){if(t){if(Y(e.length)){te(e,function(a){we(a,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function pt(e,t,a){if(t){if(Y(e.length)){te(e,function(i){pt(i,t,a)});return}a?ce(e,t):we(e,t)}}var nh=/([a-z\d])([A-Z])/g;function Pi(e){return e.replace(nh,"$1-$2").toLowerCase()}function ki(e,t){return st(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Pi(t)))}function $t(e,t,a){st(a)?e[t]=a:e.dataset?e.dataset[t]=a:e.setAttribute("data-".concat(Pi(t)),a)}function sh(e,t){if(st(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(Pi(t)))}var sr=/\s\s*/,rr=function(){var e=!1;if(Na){var t=!1,a=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(r){t=r}});ke.addEventListener("test",a,i),ke.removeEventListener("test",a,i)}return e}();function ye(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(sr).forEach(function(r){if(!rr){var u=e.listeners;u&&u[r]&&u[r][a]&&(n=u[r][a],delete u[r][a],Object.keys(u[r]).length===0&&delete u[r],Object.keys(u).length===0&&delete e.listeners)}e.removeEventListener(r,n,i)})}function xe(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(sr).forEach(function(r){if(i.once&&!rr){var u=e.listeners,o=u===void 0?{}:u;n=function(){delete o[r][a],e.removeEventListener(r,n,i);for(var h=arguments.length,m=new Array(h),T=0;T<h;T++)m[T]=arguments[T];a.apply(e,m)},o[r]||(o[r]={}),o[r][a]&&e.removeEventListener(r,o[r][a],i),o[r][a]=n,e.listeners=o}e.addEventListener(r,n,i)})}function bt(e,t,a){var i;return _e(Event)&&_e(CustomEvent)?i=new CustomEvent(t,{detail:a,bubbles:!0,cancelable:!0}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(t,!0,!0,a)),e.dispatchEvent(i)}function ur(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var wi=ke.location,rh=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function or(e){var t=e.match(rh);return t!==null&&(t[1]!==wi.protocol||t[2]!==wi.hostname||t[3]!==wi.port)}function cr(e){var t="timestamp=".concat(new Date().getTime());return e+(e.indexOf("?")===-1?"?":"&")+t}function Gt(e){var t=e.rotate,a=e.scaleX,i=e.scaleY,n=e.translateX,r=e.translateY,u=[];Y(n)&&n!==0&&u.push("translateX(".concat(n,"px)")),Y(r)&&r!==0&&u.push("translateY(".concat(r,"px)")),Y(t)&&t!==0&&u.push("rotate(".concat(t,"deg)")),Y(a)&&a!==1&&u.push("scaleX(".concat(a,")")),Y(i)&&i!==1&&u.push("scaleY(".concat(i,")"));var o=u.length?u.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function uh(e){var t=ws({},e),a=0;return te(e,function(i,n){delete t[n],te(t,function(r){var u=Math.abs(i.startX-r.startX),o=Math.abs(i.startY-r.startY),l=Math.abs(i.endX-r.endX),h=Math.abs(i.endY-r.endY),m=Math.sqrt(u*u+o*o),T=Math.sqrt(l*l+h*h),b=(T-m)/m;Math.abs(b)>Math.abs(a)&&(a=b)})}),a}function Sa(e,t){var a=e.pageX,i=e.pageY,n={endX:a,endY:i};return t?n:ws({startX:a,startY:i},n)}function oh(e){var t=0,a=0,i=0;return te(e,function(n){var r=n.startX,u=n.startY;t+=r,a+=u,i+=1}),t/=i,a/=i,{pageX:t,pageY:a}}function je(e){var t=e.aspectRatio,a=e.height,i=e.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=ir(i),u=ir(a);if(r&&u){var o=a*t;n==="contain"&&o>i||n==="cover"&&o<i?a=i/t:i=a*t}else r?a=i/t:u&&(i=a*t);return{width:i,height:a}}function ch(e){var t=e.width,a=e.height,i=e.degree;if(i=Math.abs(i)%180,i===90)return{width:a,height:t};var n=i%90*Math.PI/180,r=Math.sin(n),u=Math.cos(n),o=t*u+a*r,l=t*r+a*u;return i>90?{width:l,height:o}:{width:o,height:l}}function lh(e,t,a,i){var n=t.aspectRatio,r=t.naturalWidth,u=t.naturalHeight,o=t.rotate,l=o===void 0?0:o,h=t.scaleX,m=h===void 0?1:h,T=t.scaleY,b=T===void 0?1:T,N=a.aspectRatio,I=a.naturalWidth,y=a.naturalHeight,P=i.fillColor,$=P===void 0?"transparent":P,v=i.imageSmoothingEnabled,q=v===void 0?!0:v,V=i.imageSmoothingQuality,k=V===void 0?"low":V,_=i.maxWidth,B=_===void 0?1/0:_,G=i.maxHeight,se=G===void 0?1/0:G,fe=i.minWidth,Ae=fe===void 0?0:fe,Oe=i.minHeight,me=Oe===void 0?0:Oe,Ee=document.createElement("canvas"),J=Ee.getContext("2d"),De=je({aspectRatio:N,width:B,height:se}),x=je({aspectRatio:N,width:Ae,height:me},"cover"),M=Math.min(De.width,Math.max(x.width,I)),D=Math.min(De.height,Math.max(x.height,y)),O=je({aspectRatio:n,width:B,height:se}),U=je({aspectRatio:n,width:Ae,height:me},"cover"),F=Math.min(O.width,Math.max(U.width,r)),ee=Math.min(O.height,Math.max(U.height,u)),ae=[-F/2,-ee/2,F,ee];return Ee.width=Tt(M),Ee.height=Tt(D),J.fillStyle=$,J.fillRect(0,0,M,D),J.save(),J.translate(M/2,D/2),J.rotate(l*Math.PI/180),J.scale(m,b),J.imageSmoothingEnabled=q,J.imageSmoothingQuality=k,J.drawImage.apply(J,[e].concat(Us(ae.map(function(ie){return Math.floor(Tt(ie))})))),J.restore(),Ee}var lr=String.fromCharCode;function dh(e,t,a){var i="";a+=t;for(var n=t;n<a;n+=1)i+=lr(e.getUint8(n));return i}var hh=/^data:.*,/;function fh(e){var t=e.replace(hh,""),a=atob(t),i=new ArrayBuffer(a.length),n=new Uint8Array(i);return te(n,function(r,u){n[u]=a.charCodeAt(u)}),i}function mh(e,t){for(var a=[],i=8192,n=new Uint8Array(e);n.length>0;)a.push(lr.apply(null,nr(n.subarray(0,i)))),n=n.subarray(i);return"data:".concat(t,";base64,").concat(btoa(a.join("")))}function Eh(e){var t=new DataView(e),a;try{var i,n,r;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var u=t.byteLength,o=2;o+1<u;){if(t.getUint8(o)===255&&t.getUint8(o+1)===225){n=o;break}o+=1}if(n){var l=n+4,h=n+10;if(dh(t,l,4)==="Exif"){var m=t.getUint16(h);if(i=m===18761,(i||m===19789)&&t.getUint16(h+2,i)===42){var T=t.getUint32(h+4,i);T>=8&&(r=h+T)}}}if(r){var b=t.getUint16(r,i),N,I;for(I=0;I<b;I+=1)if(N=r+I*12+2,t.getUint16(N,i)===274){N+=8,a=t.getUint16(N,i),t.setUint16(N,1,i);break}}}catch{a=1}return a}function Th(e){var t=0,a=1,i=1;switch(e){case 2:a=-1;break;case 3:t=-180;break;case 4:i=-1;break;case 5:t=90,i=-1;break;case 6:t=90;break;case 7:t=90,a=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:a,scaleY:i}}var ph={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,a=this.options,i=this.container,n=this.cropper,r=Number(a.minContainerWidth),u=Number(a.minContainerHeight);ce(n,ge),we(t,ge);var o={width:Math.max(i.offsetWidth,r>=0?r:er),height:Math.max(i.offsetHeight,u>=0?u:tr)};this.containerData=o,Qe(n,{width:o.width,height:o.height}),ce(t,ge),we(n,ge)},initCanvas:function(){var t=this.containerData,a=this.imageData,i=this.options.viewMode,n=Math.abs(a.rotate)%180===90,r=n?a.naturalHeight:a.naturalWidth,u=n?a.naturalWidth:a.naturalHeight,o=r/u,l=t.width,h=t.height;t.height*o>t.width?i===3?l=t.height*o:h=t.width/o:i===3?h=t.width/o:l=t.height*o;var m={aspectRatio:o,naturalWidth:r,naturalHeight:u,width:l,height:h};this.canvasData=m,this.limited=i===1||i===2,this.limitCanvas(!0,!0),m.width=Math.min(Math.max(m.width,m.minWidth),m.maxWidth),m.height=Math.min(Math.max(m.height,m.minHeight),m.maxHeight),m.left=(t.width-m.width)/2,m.top=(t.height-m.height)/2,m.oldLeft=m.left,m.oldTop=m.top,this.initialCanvasData=K({},m)},limitCanvas:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=i.viewMode,l=r.aspectRatio,h=this.cropped&&u;if(t){var m=Number(i.minCanvasWidth)||0,T=Number(i.minCanvasHeight)||0;o>1?(m=Math.max(m,n.width),T=Math.max(T,n.height),o===3&&(T*l>m?m=T*l:T=m/l)):o>0&&(m?m=Math.max(m,h?u.width:0):T?T=Math.max(T,h?u.height:0):h&&(m=u.width,T=u.height,T*l>m?m=T*l:T=m/l));var b=je({aspectRatio:l,width:m,height:T});m=b.width,T=b.height,r.minWidth=m,r.minHeight=T,r.maxWidth=1/0,r.maxHeight=1/0}if(a)if(o>(h?0:1)){var N=n.width-r.width,I=n.height-r.height;r.minLeft=Math.min(0,N),r.minTop=Math.min(0,I),r.maxLeft=Math.max(0,N),r.maxTop=Math.max(0,I),h&&this.limited&&(r.minLeft=Math.min(u.left,u.left+(u.width-r.width)),r.minTop=Math.min(u.top,u.top+(u.height-r.height)),r.maxLeft=u.left,r.maxTop=u.top,o===2&&(r.width>=n.width&&(r.minLeft=Math.min(0,N),r.maxLeft=Math.max(0,N)),r.height>=n.height&&(r.minTop=Math.min(0,I),r.maxTop=Math.max(0,I))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=n.width,r.maxTop=n.height},renderCanvas:function(t,a){var i=this.canvasData,n=this.imageData;if(a){var r=ch({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),u=r.width,o=r.height,l=i.width*(u/i.naturalWidth),h=i.height*(o/i.naturalHeight);i.left-=(l-i.width)/2,i.top-=(h-i.height)/2,i.width=l,i.height=h,i.aspectRatio=u/o,i.naturalWidth=u,i.naturalHeight=o,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,Qe(this.canvas,K({width:i.width,height:i.height},Gt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var a=this.canvasData,i=this.imageData,n=i.naturalWidth*(a.width/a.naturalWidth),r=i.naturalHeight*(a.height/a.naturalHeight);K(i,{width:n,height:r,left:(a.width-n)/2,top:(a.height-r)/2}),Qe(this.image,K({width:i.width,height:i.height},Gt(K({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,a=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,n=Number(t.autoCropArea)||.8,r={width:a.width,height:a.height};i&&(a.height*i>a.width?r.height=r.width/i:r.width=r.height*i),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*n),r.height=Math.max(r.minHeight,r.height*n),r.left=a.left+(a.width-r.width)/2,r.top=a.top+(a.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=K({},r)},limitCropBox:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=this.limited,l=i.aspectRatio;if(t){var h=Number(i.minCropBoxWidth)||0,m=Number(i.minCropBoxHeight)||0,T=o?Math.min(n.width,r.width,r.width+r.left,n.width-r.left):n.width,b=o?Math.min(n.height,r.height,r.height+r.top,n.height-r.top):n.height;h=Math.min(h,n.width),m=Math.min(m,n.height),l&&(h&&m?m*l>h?m=h/l:h=m*l:h?m=h/l:m&&(h=m*l),b*l>T?b=T/l:T=b*l),u.minWidth=Math.min(h,T),u.minHeight=Math.min(m,b),u.maxWidth=T,u.maxHeight=b}a&&(o?(u.minLeft=Math.max(0,r.left),u.minTop=Math.max(0,r.top),u.maxLeft=Math.min(n.width,r.left+r.width)-u.width,u.maxTop=Math.min(n.height,r.top+r.height)-u.height):(u.minLeft=0,u.minTop=0,u.maxLeft=n.width-u.width,u.maxTop=n.height-u.height))},renderCropBox:function(){var t=this.options,a=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&$t(this.face,Wt,i.width>=a.width&&i.height>=a.height?Hs:Ci),Qe(this.cropBox,K({width:i.width,height:i.height},Gt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),bt(this.element,Oi,this.getData())}},bh={initPreview:function(){var t=this.element,a=this.crossOrigin,i=this.options.preview,n=a?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",u=document.createElement("img");if(a&&(u.crossOrigin=a),u.src=n,u.alt=r,this.viewBox.appendChild(u),this.viewBoxImage=u,!!i){var o=i;typeof i=="string"?o=t.ownerDocument.querySelectorAll(i):i.querySelector&&(o=[i]),this.previews=o,te(o,function(l){var h=document.createElement("img");$t(l,Ia,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),a&&(h.crossOrigin=a),h.src=n,h.alt=r,h.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',l.innerHTML="",l.appendChild(h)})}},resetPreview:function(){te(this.previews,function(t){var a=ki(t,Ia);Qe(t,{width:a.width,height:a.height}),t.innerHTML=a.html,sh(t,Ia)})},preview:function(){var t=this.imageData,a=this.canvasData,i=this.cropBoxData,n=i.width,r=i.height,u=t.width,o=t.height,l=i.left-a.left-t.left,h=i.top-a.top-t.top;!this.cropped||this.disabled||(Qe(this.viewBoxImage,K({width:u,height:o},Gt(K({translateX:-l,translateY:-h},t)))),te(this.previews,function(m){var T=ki(m,Ia),b=T.width,N=T.height,I=b,y=N,P=1;n&&(P=b/n,y=r*P),r&&y>N&&(P=N/r,I=n*P,y=N),Qe(m,{width:I,height:y}),Qe(m.getElementsByTagName("img")[0],K({width:u*P,height:o*P},Gt(K({translateX:-l*P,translateY:-h*P},t))))}))}},gh={bind:function(){var t=this.element,a=this.options,i=this.cropper;_e(a.cropstart)&&xe(t,yi,a.cropstart),_e(a.cropmove)&&xe(t,Li,a.cropmove),_e(a.cropend)&&xe(t,Di,a.cropend),_e(a.crop)&&xe(t,Oi,a.crop),_e(a.zoom)&&xe(t,Ri,a.zoom),xe(i,Xs,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&xe(i,Zs,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&xe(i,Gs,this.onDblclick=this.dblclick.bind(this)),xe(t.ownerDocument,Qs,this.onCropMove=this.cropMove.bind(this)),xe(t.ownerDocument,js,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&xe(window,Ks,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,i=this.cropper;_e(a.cropstart)&&ye(t,yi,a.cropstart),_e(a.cropmove)&&ye(t,Li,a.cropmove),_e(a.cropend)&&ye(t,Di,a.cropend),_e(a.crop)&&ye(t,Oi,a.crop),_e(a.zoom)&&ye(t,Ri,a.zoom),ye(i,Xs,this.onCropStart),a.zoomable&&a.zoomOnWheel&&ye(i,Zs,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&ye(i,Gs,this.onDblclick),ye(t.ownerDocument,Qs,this.onCropMove),ye(t.ownerDocument,js,this.onCropEnd),a.responsive&&ye(window,Ks,this.onResize)}},_h={resize:function(){if(!this.disabled){var t=this.options,a=this.container,i=this.containerData,n=a.offsetWidth/i.width,r=a.offsetHeight/i.height,u=Math.abs(n-1)>Math.abs(r-1)?n:r;if(u!==1){var o,l;t.restore&&(o=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(te(o,function(h,m){o[m]=h*u})),this.setCropBoxData(te(l,function(h,m){l[m]=h*u})))}}},dblclick:function(){this.disabled||this.options.dragMode===$s||this.setDragMode(ih(this.dragBox,Ii)?Ws:xi)},wheel:function(t){var a=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){a.wheeling=!1},50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var a=t.buttons,i=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(Y(a)&&a!==1||Y(i)&&i!==0||t.ctrlKey))){var n=this.options,r=this.pointers,u;t.changedTouches?te(t.changedTouches,function(o){r[o.identifier]=Sa(o)}):r[t.pointerId||0]=Sa(t),Object.keys(r).length>1&&n.zoomable&&n.zoomOnTouch?u=Vs:u=ki(t.target,Wt),Xd.test(u)&&bt(this.element,yi,{originalEvent:t,action:u})!==!1&&(t.preventDefault(),this.action=u,this.cropping=!1,u===Fs&&(this.cropping=!0,ce(this.dragBox,Ca)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var i=this.pointers;t.preventDefault(),bt(this.element,Li,{originalEvent:t,action:a})!==!1&&(t.changedTouches?te(t.changedTouches,function(n){K(i[n.identifier]||{},Sa(n,!0))}):K(i[t.pointerId||0]||{},Sa(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var a=this.action,i=this.pointers;t.changedTouches?te(t.changedTouches,function(n){delete i[n.identifier]}):delete i[t.pointerId||0],a&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,pt(this.dragBox,Ca,this.cropped&&this.options.modal)),bt(this.element,Di,{originalEvent:t,action:a}))}}},Ah={change:function(t){var a=this.options,i=this.canvasData,n=this.containerData,r=this.cropBoxData,u=this.pointers,o=this.action,l=a.aspectRatio,h=r.left,m=r.top,T=r.width,b=r.height,N=h+T,I=m+b,y=0,P=0,$=n.width,v=n.height,q=!0,V;!l&&t.shiftKey&&(l=T&&b?T/b:1),this.limited&&(y=r.minLeft,P=r.minTop,$=y+Math.min(n.width,i.width,i.left+i.width),v=P+Math.min(n.height,i.height,i.top+i.height));var k=u[Object.keys(u)[0]],_={x:k.endX-k.startX,y:k.endY-k.startY},B=function(se){switch(se){case it:N+_.x>$&&(_.x=$-N);break;case nt:h+_.x<y&&(_.x=y-h);break;case Xe:m+_.y<P&&(_.y=P-m);break;case mt:I+_.y>v&&(_.y=v-I);break}};switch(o){case Ci:h+=_.x,m+=_.y;break;case it:if(_.x>=0&&(N>=$||l&&(m<=P||I>=v))){q=!1;break}B(it),T+=_.x,T<0&&(o=nt,T=-T,h-=T),l&&(b=T/l,m+=(r.height-b)/2);break;case Xe:if(_.y<=0&&(m<=P||l&&(h<=y||N>=$))){q=!1;break}B(Xe),b-=_.y,m+=_.y,b<0&&(o=mt,b=-b,m-=b),l&&(T=b*l,h+=(r.width-T)/2);break;case nt:if(_.x<=0&&(h<=y||l&&(m<=P||I>=v))){q=!1;break}B(nt),T-=_.x,h+=_.x,T<0&&(o=it,T=-T,h-=T),l&&(b=T/l,m+=(r.height-b)/2);break;case mt:if(_.y>=0&&(I>=v||l&&(h<=y||N>=$))){q=!1;break}B(mt),b+=_.y,b<0&&(o=Xe,b=-b,m-=b),l&&(T=b*l,h+=(r.width-T)/2);break;case Ht:if(l){if(_.y<=0&&(m<=P||N>=$)){q=!1;break}B(Xe),b-=_.y,m+=_.y,T=b*l}else B(Xe),B(it),_.x>=0?N<$?T+=_.x:_.y<=0&&m<=P&&(q=!1):T+=_.x,_.y<=0?m>P&&(b-=_.y,m+=_.y):(b-=_.y,m+=_.y);T<0&&b<0?(o=qt,b=-b,T=-T,m-=b,h-=T):T<0?(o=Vt,T=-T,h-=T):b<0&&(o=Yt,b=-b,m-=b);break;case Vt:if(l){if(_.y<=0&&(m<=P||h<=y)){q=!1;break}B(Xe),b-=_.y,m+=_.y,T=b*l,h+=r.width-T}else B(Xe),B(nt),_.x<=0?h>y?(T-=_.x,h+=_.x):_.y<=0&&m<=P&&(q=!1):(T-=_.x,h+=_.x),_.y<=0?m>P&&(b-=_.y,m+=_.y):(b-=_.y,m+=_.y);T<0&&b<0?(o=Yt,b=-b,T=-T,m-=b,h-=T):T<0?(o=Ht,T=-T,h-=T):b<0&&(o=qt,b=-b,m-=b);break;case qt:if(l){if(_.x<=0&&(h<=y||I>=v)){q=!1;break}B(nt),T-=_.x,h+=_.x,b=T/l}else B(mt),B(nt),_.x<=0?h>y?(T-=_.x,h+=_.x):_.y>=0&&I>=v&&(q=!1):(T-=_.x,h+=_.x),_.y>=0?I<v&&(b+=_.y):b+=_.y;T<0&&b<0?(o=Ht,b=-b,T=-T,m-=b,h-=T):T<0?(o=Yt,T=-T,h-=T):b<0&&(o=Vt,b=-b,m-=b);break;case Yt:if(l){if(_.x>=0&&(N>=$||I>=v)){q=!1;break}B(it),T+=_.x,b=T/l}else B(mt),B(it),_.x>=0?N<$?T+=_.x:_.y>=0&&I>=v&&(q=!1):T+=_.x,_.y>=0?I<v&&(b+=_.y):b+=_.y;T<0&&b<0?(o=Vt,b=-b,T=-T,m-=b,h-=T):T<0?(o=qt,T=-T,h-=T):b<0&&(o=Ht,b=-b,m-=b);break;case Hs:this.move(_.x,_.y),q=!1;break;case Vs:this.zoom(uh(u),t),q=!1;break;case Fs:if(!_.x||!_.y){q=!1;break}V=ur(this.cropper),h=k.startX-V.left,m=k.startY-V.top,T=r.minWidth,b=r.minHeight,_.x>0?o=_.y>0?Yt:Ht:_.x<0&&(h-=T,o=_.y>0?qt:Vt),_.y<0&&(m-=b),this.cropped||(we(this.cropBox,ge),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}q&&(r.width=T,r.height=b,r.left=h,r.top=m,this.action=o,this.renderCropBox()),te(u,function(G){G.startX=G.endX,G.startY=G.endY})}},Nh={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&ce(this.dragBox,Ca),we(this.cropBox,ge),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=K({},this.initialImageData),this.canvasData=K({},this.initialCanvasData),this.cropBoxData=K({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(K(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),we(this.dragBox,Ca),ce(this.cropBox,ge)),this},replace:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),a?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,te(this.previews,function(i){i.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,we(this.cropper,Ys)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,ce(this.cropper,Ys)),this},destroy:function(){var t=this.element;return t[z]?(t[z]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=i.left,r=i.top;return this.moveTo(Mi(t)?t:n+Number(t),Mi(a)?a:r+Number(a))},moveTo:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.movable&&(Y(t)&&(i.left=t,n=!0),Y(a)&&(i.top=a,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,a){var i=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(i.width*t/i.naturalWidth,null,a)},zoomTo:function(t,a,i){var n=this.options,r=this.canvasData,u=r.width,o=r.height,l=r.naturalWidth,h=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var m=l*t,T=h*t;if(bt(this.element,Ri,{ratio:t,oldRatio:u/l,originalEvent:i})===!1)return this;if(i){var b=this.pointers,N=ur(this.cropper),I=b&&Object.keys(b).length?oh(b):{pageX:i.pageX,pageY:i.pageY};r.left-=(m-u)*((I.pageX-N.left-r.left)/u),r.top-=(T-o)*((I.pageY-N.top-r.top)/o)}else Et(a)&&Y(a.x)&&Y(a.y)?(r.left-=(m-u)*((a.x-r.left)/u),r.top-=(T-o)*((a.y-r.top)/o)):(r.left-=(m-u)/2,r.top-=(T-o)/2);r.width=m,r.height=T,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),Y(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var a=this.imageData.scaleY;return this.scale(t,Y(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(Y(a)?a:1,t)},scale:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.scalable&&(Y(t)&&(i.scaleX=t,n=!0),Y(a)&&(i.scaleY=a,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=this.options,i=this.imageData,n=this.canvasData,r=this.cropBoxData,u;if(this.ready&&this.cropped){u={x:r.left-n.left,y:r.top-n.top,width:r.width,height:r.height};var o=i.width/i.naturalWidth;if(te(u,function(m,T){u[T]=m/o}),t){var l=Math.round(u.y+u.height),h=Math.round(u.x+u.width);u.x=Math.round(u.x),u.y=Math.round(u.y),u.width=h-u.x,u.height=l-u.y}}else u={x:0,y:0,width:0,height:0};return a.rotatable&&(u.rotate=i.rotate||0),a.scalable&&(u.scaleX=i.scaleX||1,u.scaleY=i.scaleY||1),u},setData:function(t){var a=this.options,i=this.imageData,n=this.canvasData,r={};if(this.ready&&!this.disabled&&Et(t)){var u=!1;a.rotatable&&Y(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,u=!0),a.scalable&&(Y(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,u=!0),Y(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,u=!0)),u&&this.renderCanvas(!0,!0);var o=i.width/i.naturalWidth;Y(t.x)&&(r.left=t.x*o+n.left),Y(t.y)&&(r.top=t.y*o+n.top),Y(t.width)&&(r.width=t.width*o),Y(t.height)&&(r.height=t.height*o),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?K({},this.containerData):{}},getImageData:function(){return this.sized?K({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,a={};return this.ready&&te(["left","top","width","height","naturalWidth","naturalHeight"],function(i){a[i]=t[i]}),a},setCanvasData:function(t){var a=this.canvasData,i=a.aspectRatio;return this.ready&&!this.disabled&&Et(t)&&(Y(t.left)&&(a.left=t.left),Y(t.top)&&(a.top=t.top),Y(t.width)?(a.width=t.width,a.height=t.width/i):Y(t.height)&&(a.height=t.height,a.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,a;return this.ready&&this.cropped&&(a={left:t.left,top:t.top,width:t.width,height:t.height}),a||{}},setCropBoxData:function(t){var a=this.cropBoxData,i=this.options.aspectRatio,n,r;return this.ready&&this.cropped&&!this.disabled&&Et(t)&&(Y(t.left)&&(a.left=t.left),Y(t.top)&&(a.top=t.top),Y(t.width)&&t.width!==a.width&&(n=!0,a.width=t.width),Y(t.height)&&t.height!==a.height&&(r=!0,a.height=t.height),i&&(n?a.height=a.width/i:r&&(a.width=a.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var a=this.canvasData,i=lh(this.image,this.imageData,a,t);if(!this.cropped)return i;var n=this.getData(t.rounded),r=n.x,u=n.y,o=n.width,l=n.height,h=i.width/Math.floor(a.naturalWidth);h!==1&&(r*=h,u*=h,o*=h,l*=h);var m=o/l,T=je({aspectRatio:m,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),b=je({aspectRatio:m,width:t.minWidth||0,height:t.minHeight||0},"cover"),N=je({aspectRatio:m,width:t.width||(h!==1?i.width:o),height:t.height||(h!==1?i.height:l)}),I=N.width,y=N.height;I=Math.min(T.width,Math.max(b.width,I)),y=Math.min(T.height,Math.max(b.height,y));var P=document.createElement("canvas"),$=P.getContext("2d");P.width=Tt(I),P.height=Tt(y),$.fillStyle=t.fillColor||"transparent",$.fillRect(0,0,I,y);var v=t.imageSmoothingEnabled,q=v===void 0?!0:v,V=t.imageSmoothingQuality;$.imageSmoothingEnabled=q,V&&($.imageSmoothingQuality=V);var k=i.width,_=i.height,B=r,G=u,se,fe,Ae,Oe,me,Ee;B<=-o||B>k?(B=0,se=0,Ae=0,me=0):B<=0?(Ae=-B,B=0,se=Math.min(k,o+B),me=se):B<=k&&(Ae=0,se=Math.min(o,k-B),me=se),se<=0||G<=-l||G>_?(G=0,fe=0,Oe=0,Ee=0):G<=0?(Oe=-G,G=0,fe=Math.min(_,l+G),Ee=fe):G<=_&&(Oe=0,fe=Math.min(l,_-G),Ee=fe);var J=[B,G,se,fe];if(me>0&&Ee>0){var De=I/o;J.push(Ae*De,Oe*De,me*De,Ee*De)}return $.drawImage.apply($,[i].concat(Us(J.map(function(x){return Math.floor(Tt(x))})))),P},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!Mi(t)&&(a.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var a=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var r=t===xi,u=a.movable&&t===Ws;t=r||u?t:$s,a.dragMode=t,$t(i,Wt,t),pt(i,Ii,r),pt(i,Si,u),a.cropBoxMovable||($t(n,Wt,t),pt(n,Ii,r),pt(n,Si,u))}return this}},Ch=ke.Cropper,dr=function(){function e(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Bd(this,e),!t||!zd.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=K({},ar,Et(a)&&a),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return vd(e,[{key:"init",value:function(){var a=this.element,i=a.tagName.toLowerCase(),n;if(!a[z]){if(a[z]=this,i==="img"){if(this.isImg=!0,n=a.getAttribute("src")||"",this.originalUrl=n,!n)return;n=a.src}else i==="canvas"&&window.HTMLCanvasElement&&(n=a.toDataURL());this.load(n)}}},{key:"load",value:function(a){var i=this;if(a){this.url=a,this.imageData={};var n=this.element,r=this.options;if(!r.rotatable&&!r.scalable&&(r.checkOrientation=!1),!r.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Qd.test(a)){jd.test(a)?this.read(fh(a)):this.clone();return}var u=new XMLHttpRequest,o=this.clone.bind(this);this.reloading=!0,this.xhr=u,u.onabort=o,u.onerror=o,u.ontimeout=o,u.onprogress=function(){u.getResponseHeader("content-type")!==Js&&u.abort()},u.onload=function(){i.read(u.response)},u.onloadend=function(){i.reloading=!1,i.xhr=null},r.checkCrossOrigin&&or(a)&&n.crossOrigin&&(a=cr(a)),u.open("GET",a,!0),u.responseType="arraybuffer",u.withCredentials=n.crossOrigin==="use-credentials",u.send()}}},{key:"read",value:function(a){var i=this.options,n=this.imageData,r=Eh(a),u=0,o=1,l=1;if(r>1){this.url=mh(a,Js);var h=Th(r);u=h.rotate,o=h.scaleX,l=h.scaleY}i.rotatable&&(n.rotate=u),i.scalable&&(n.scaleX=o,n.scaleY=l),this.clone()}},{key:"clone",value:function(){var a=this.element,i=this.url,n=a.crossOrigin,r=i;this.options.checkCrossOrigin&&or(i)&&(n||(n="anonymous"),r=cr(i)),this.crossOrigin=n,this.crossOriginUrl=r;var u=document.createElement("img");n&&(u.crossOrigin=n),u.src=r||i,u.alt=a.alt||"The image to crop",this.image=u,u.onload=this.start.bind(this),u.onerror=this.stop.bind(this),ce(u,qs),a.parentNode.insertBefore(u,a.nextSibling)}},{key:"start",value:function(){var a=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var n=ke.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(ke.navigator.userAgent),r=function(h,m){K(a.imageData,{naturalWidth:h,naturalHeight:m,aspectRatio:h/m}),a.initialImageData=K({},a.imageData),a.sizing=!1,a.sized=!0,a.build()};if(i.naturalWidth&&!n){r(i.naturalWidth,i.naturalHeight);return}var u=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=u,u.onload=function(){r(u.width,u.height),n||o.removeChild(u)},u.src=i.src,n||(u.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(u))}},{key:"stop",value:function(){var a=this.image;a.onload=null,a.onerror=null,a.parentNode.removeChild(a),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var a=this.element,i=this.options,n=this.image,r=a.parentNode,u=document.createElement("div");u.innerHTML=Kd;var o=u.querySelector(".".concat(z,"-container")),l=o.querySelector(".".concat(z,"-canvas")),h=o.querySelector(".".concat(z,"-drag-box")),m=o.querySelector(".".concat(z,"-crop-box")),T=m.querySelector(".".concat(z,"-face"));this.container=r,this.cropper=o,this.canvas=l,this.dragBox=h,this.cropBox=m,this.viewBox=o.querySelector(".".concat(z,"-view-box")),this.face=T,l.appendChild(n),ce(a,ge),r.insertBefore(o,a.nextSibling),we(n,qs),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,ce(m,ge),i.guides||ce(m.getElementsByClassName("".concat(z,"-dashed")),ge),i.center||ce(m.getElementsByClassName("".concat(z,"-center")),ge),i.background&&ce(o,"".concat(z,"-bg")),i.highlight||ce(T,qd),i.cropBoxMovable&&(ce(T,Si),$t(T,Wt,Ci)),i.cropBoxResizable||(ce(m.getElementsByClassName("".concat(z,"-line")),ge),ce(m.getElementsByClassName("".concat(z,"-point")),ge)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),_e(i.ready)&&xe(a,zs,i.ready,{once:!0}),bt(a,zs)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var a=this.cropper.parentNode;a&&a.removeChild(this.cropper),we(this.element,ge)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=Ch,e}},{key:"setDefaults",value:function(a){K(ar,Et(a)&&a)}}])}();K(dr.prototype,ph,bh,gh,_h,Ah,Nh);function Ih(e,t){const a=e.split(",")||[],i=a[0].match(/:(.*?);/)[1],n=a[1]&&atob(a[1]);let r=n&&n.length;const u=new Uint8Array(r);for(;r--;)u[r]=n==null?void 0:n.charCodeAt(r);return new File([u],t,{type:i})}const Sh={key:0,contenteditable:"false",class:"z-10 w-[100vw] h-[100vh] bg-[rgba(0,0,0,0.7)] flex flex-col justify-center items-center fixed top-0 left-0 cursor-auto"},xh={class:"w-[700px] flex flex-col bg-white rounded pb-8"},Oh={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},Dh={class:"flex flex-col h-full"},Lh={class:"flex flex-row justify-center items-start flex-1"},yh={class:"flex flex-col items-start flex-1"},Rh={class:"flex flex-col w-full px-6 py-4"},Mh={class:"flex flex-col w-full"},Ph={class:"flex flex-row items-center"},kh={class:"relative bg-[#474AFF] text-white rounded p-3"},wh={class:"flex flex-row items-start justify-between mt-3"},Bh={class:"flex flex-col"},vh={class:"flex flex-col justify-center items-center border w-[300px] h-[300px]"},Uh={key:0,class:"w-full text-center"},Fh=["src"],Hh={class:"flex flex-col items-center",style:{width:"300px",height:"300px"}},Vh={class:"text-[#999] mt-05 flex justify-center mt-4"},Yh={class:"w-full flex justify-end space-x-5 mt-5 px-6"},qh=["loading"],Wh=c.defineComponent({__name:"index",emits:["cancel","ok"],setup(e,{expose:t,emit:a}){const i=a,n=c.ref({coverUrl:"",inputValue:"",uploadType:2,videoHost:"",videoUrl:""}),r=c.ref(),u=c.ref({autoCrop:!0,autoCropArea:1,background:!0,center:!0,cropBoxResizable:!0,dragMode:"move",preview:".before",toggleDragModeOnDblclick:!0,viewMode:1,zoomOnWheel:!0}),o=c.ref(!1),l=c.ref({afterImg:"",image:null,myCropper:null}),h=c.ref("image/jpeg"),m=V=>{console.log(V);const k=V.target.files[0];if(k){k.name&&(n.value.inputValue=k.name);const _=new FileReader;_.onload=B=>{var G,se;console.log("e?.target?.result",(G=B==null?void 0:B.target)==null?void 0:G.result),T((se=B==null?void 0:B.target)==null?void 0:se.result)},_.readAsDataURL(k)}};async function T(V){if(!V)return;await q();const k=V;l.value.image=k,l.value.image&&b()}function b(){const V=document.querySelector("#imgId");V&&V.addEventListener("load",()=>{v(),l.value.myCropper=new dr(V,u.value)})}const N=c.ref(!1);function I(V,k,_){r.value=V,V&&V.aspectRatio&&(u.value.aspectRatio=V.aspectRatio),_&&(n.value.inputValue=_),N.value=!0,k&&T(k)}function y(){N.value=!1}const P=()=>{var k,_;if(!l.value.myCropper)return;o.value=!0,l.value.afterImg=l.value.myCropper.getCroppedCanvas({height:(k=r.value)==null?void 0:k.height,imageSmoothingQuality:"high",width:(_=r.value)==null?void 0:_.width}).toDataURL(h.value);const V=Ih(l.value.afterImg,n.value.inputValue);i("ok",V),o.value=!1,q(),v(),y()};function $(){q(),v(),y(),i("cancel")}function v(){l.value.myCropper&&l.value.myCropper.destroy()}function q(){l.value.image=""}return t({handleCloseCropper:y,handleOpenCropper:I}),(V,k)=>{var _,B,G;return N.value?(c.openBlock(),c.createElementBlock("div",Sh,[c.createElementVNode("div",xh,[c.createElementVNode("div",Oh,[k[1]||(k[1]=c.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"图片裁剪",-1)),c.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:c.withModifiers($,["stop"])})]),c.createElementVNode("div",Dh,[c.createElementVNode("div",Lh,[c.createElementVNode("div",yh,[c.createElementVNode("div",Rh,[c.createElementVNode("div",Mh,[c.createElementVNode("div",Ph,[c.createElementVNode("div",kh,[c.createElementVNode("input",{type:"file",accept:"image/*",onClick:k[0]||(k[0]=c.withModifiers(()=>{},["stop"])),contenteditable:"false",ref:"fileInput",onChange:m,class:"absolute top-0 left-0 w-[110px] h-[40px] opacity-0 cursor-pointer"},null,544),k[2]||(k[2]=c.createElementVNode("span",{id:"uploadHandler",class:"cursor-pointer"}," 选择/更换图片 ",-1))]),k[3]||(k[3]=c.createElementVNode("span",{class:"text-sm text-[#999] ml-3"},"滚动鼠标放大或缩小图片",-1))]),c.createElementVNode("div",wh,[c.createElementVNode("div",Bh,[c.createElementVNode("div",vh,[l.value.image?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",Uh," 请上传图片 ")),c.createElementVNode("img",{id:"imgId",src:l.value.image,style:{width:"300px"}},null,8,Fh)])]),c.createElementVNode("div",Hh,[k[4]||(k[4]=c.createElementVNode("div",{class:"before w-[270px] h-[200px] pr-[70px] border"},null,-1)),c.createElementVNode("div",Vh," 预览画像 "+c.toDisplayString(((_=r.value)==null?void 0:_.width)||"")+" "+c.toDisplayString((B=r.value)!=null&&B.width?"x":"")+" "+c.toDisplayString(((G=r.value)==null?void 0:G.height)||""),1)])])])])])]),c.createElementVNode("div",Yh,[c.createElementVNode("span",{loading:o.value,class:"!w-22 bg-[#474AFF] text-white rounded py-2 px-6 cursor-pointer",type:"primary",onClick:P}," 确认 ",8,qh),c.createElementVNode("span",{class:"!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",onClick:$},"取消")])])])])):c.createCommentVNode("",!0)}}}),$h={key:0,"date-action":"1",class:"aidition",contenteditable:"false"},Gh={class:"aidition_left"},Xh={class:"aidition_right"},Qh={key:0,"date-action":"1",class:"text-red-500 text-xs mt-1"},jh=ft(c.defineComponent({__name:"ElementRenderer",props:{element:{type:Object,required:!0},selectedElement:Object,hoveredElement:Object,icons:{type:Array,default:()=>[]}},emits:["selectElement","hoverElement","updateText","contentUpdated","blockAction","addIcon","upload"],setup(e,{emit:t}){const a=e,i=t,n=c.computed(()=>a.selectedElement===a.element),r=c.computed(()=>a.hoveredElement===a.element),u=c.ref(!1),o=c.ref(!1),l=c.ref(""),h=c.computed(()=>a.element.rule.minText||0),m=c.computed(()=>a.element.rule.maxText||1/0),T=c.ref();function b(D){D.xpath!="/div[1]"&&(u.value=!0,i("selectElement",D))}function N(D){i("selectElement",D)}function I(D,O){i("hoverElement",D,O)}function y(D){i("hoverElement",D)}function P(D){D.currentTarget.contains(D.relatedTarget)?i("hoverElement",null):a.hoveredElement?i("hoverElement",null,a.hoveredElement.parentxpath):i("hoverElement",null)}function $(){u.value=!1,i("contentUpdated",v())}function v(){function D(O){const U=Object.entries(O.attrs||{}).map(([ie,Fe])=>`${ie}="${Fe}"`).join(" "),F=`<${O.tag}${U?" "+U:""}>`,ee=`</${O.tag}>`,ae=(O.children||[]).map(ie=>D(ie)).join("");return`${F}${O.editText||O.text||""}${ae}${ee}`}return D(a.element)}function q(D){var F;D.stopPropagation();const O=D.target,U=((F=O.firstChild)==null?void 0:F.nodeType)===Node.TEXT_NODE&&O.firstChild.nodeValue||"";if(U.length<h.value){o.value=!0,l.value=`最少输入 ${h.value} 个字符`;return}else if(U.length>m.value){o.value=!0,l.value=`最多输入 ${m.value} 个字符`;return}else o.value=!1,l.value="";a.element.editText=U,i("updateText",{element:a.element,newText:U}),i("contentUpdated",v())}function V(D){i("updateText",D),i("contentUpdated",v())}function k(){const D={...a.element};i("blockAction",{action:"add",element:a.element,newBlock:D})}function _(){i("blockAction",{action:"moveUp",element:a.element})}function B(){i("blockAction",{action:"moveDown",element:a.element})}function G(){i("blockAction",{action:"delete",element:a.element})}function se(D){i("blockAction",D),i("contentUpdated",v())}function fe(){T.value.openModal()}function Ae(D){i("addIcon",D,a.element),i("contentUpdated",v())}function Oe(D,O){i("addIcon",D,O),i("contentUpdated",v())}let me;const Ee=c.ref(),J=c.ref({});function De(D,O){if(O.rule.minImageWidth&&O.rule.maxImageHeight?(J.value.width=O.rule.minImageWidth,J.value.height=O.rule.maxImageHeight,J.value.aspectRatio=O.rule.minImageWidth/O.rule.maxImageHeight):J.value={},D){D.name;const U=new FileReader;U.onload=F=>{var ee;me=(ee=F==null?void 0:F.target)==null?void 0:ee.result,Ee.value.handleOpenCropper(J.value,me,D.name)},U.readAsDataURL(D)}}function x(D,O){if(console.log(typeof D=="object",D),D)if(typeof D=="object"){O.attrs.alt=D.name;const U=new FileReader;U.onload=F=>{var ae;let ee=(ae=F==null?void 0:F.target)==null?void 0:ae.result;O.attrs.src=ee,i("upload",ee,O),i("contentUpdated",v())},U.readAsDataURL(D)}else O.attrs.src=D,i("upload",D,O),i("contentUpdated",v())}const M=async D=>{};return(D,O)=>{const U=c.resolveComponent("ElementRenderer",!0);return c.openBlock(),c.createElementBlock(c.Fragment,null,[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(a.element.tag),c.mergeProps({class:[" ",r.value?"border-dashed border-[1px] border-blue-500":"",n.value?"border-dashed border-[1px] border-green-500 z-10":"",o.value?"border-dashed border-[1px] border-red-500":"",(!r.value&&!n.value&&!o.value,"")]},a.element.attrs,{contenteditable:u.value,onClick:O[1]||(O[1]=c.withModifiers(()=>b(a.element),["stop"])),onMouseenter:O[2]||(O[2]=()=>y(a.element)),onMouseleave:P,onBlur:$,onInput:q}),{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(a.element.editText||a.element.text),1),a.element.children&&a.element.children.length?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[a.element.type===c.unref(de).Block?(c.openBlock(),c.createElementBlock("div",$h,[c.createElementVNode("span",Gh,c.toDisplayString(a.element.editText||a.element.text),1),c.createElementVNode("div",Xh,[c.createElementVNode("span",{onClick:c.withModifiers(_,["stop"])},"排前"),c.createElementVNode("span",{onClick:c.withModifiers(B,["stop"])},"排后"),c.createElementVNode("span",{onClick:c.withModifiers(G,["stop"])},"删除")])])):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.element.children,(F,ee)=>(c.openBlock(),c.createBlock(U,{icons:e.icons,key:ee,element:F,selectedElement:a.selectedElement,hoveredElement:a.hoveredElement,onSelectElement:N,onHoverElement:I,onUpdateText:V,onBlockAction:se,onAddIcon:Oe,onUpload:x},null,8,["icons","element","selectedElement","hoveredElement"]))),128)),a.element.type===c.unref(de).Block?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createElementVNode("span",{class:"iconfont icon-a-tianjiaxian icon_gray_add",onClick:c.withModifiers(k,["stop"]),contenteditable:"false"}),c.createElementVNode("div",{class:"add_modules",onClick:c.withModifiers(k,["stop"]),contenteditable:"false"},O[7]||(O[7]=[c.createElementVNode("span",{class:"iconfont icon-a-tianjiamian"},null,-1),c.createElementVNode("span",null,"添加模块",-1)])),c.createElementVNode("div",{class:"cont_aidition",contenteditable:"false",onClick:O[0]||(O[0]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{onClick:c.withModifiers(_,["stop"]),class:"iconfont icon-paiqian"}),c.createElementVNode("span",{onClick:c.withModifiers(B,["stop"]),class:"iconfont icon-paihou"}),c.createElementVNode("span",{onClick:c.withModifiers(G,["stop"]),class:"iconfont icon-shanchu"}),c.createElementVNode("span",{onClick:c.withModifiers(k,["stop"]),class:"iconfont icon-a-tianjiaxian"})])],64)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)]),_:1},16,["class","contenteditable"])),a.element.type==c.unref(de).Text&&o.value?(c.openBlock(),c.createElementBlock("div",Qh,c.toDisplayString(l.value),1)):c.createCommentVNode("",!0),a.element.type===c.unref(de).Image?(c.openBlock(),c.createElementBlock("div",{key:1,class:"absolute top-0 right-0 bg-white rounded shadow z-10 py-0.5 px-1",onClick:O[3]||(O[3]=c.withModifiers(()=>{},["stop"]))},[O[8]||(O[8]=c.createElementVNode("span",{contenteditable:"false",class:"cursor-pointer"},"上传图片",-1)),c.createVNode(kd,{customUpload:F=>De(F,a.element),height:a.element.rule.maxImageHeight,width:a.element.rule.minImageWidth,uploadByImage:M},null,8,["customUpload","height","width"])])):c.createCommentVNode("",!0),a.element.type===c.unref(de).Icon?(c.openBlock(),c.createElementBlock("div",{key:2,class:"absolute -top-6 left-0 bg-white py-0.5 px-1 rounded shadow z-10",onClick:O[5]||(O[5]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{onClick:O[4]||(O[4]=c.withModifiers(F=>fe(),["stop"])),contenteditable:"false",class:"cursor-pointer"},"选择图标")])):c.createCommentVNode("",!0),c.createVNode(Pd,{icons:e.icons,ref_key:"iconRef",ref:T,onOk:Ae},null,8,["icons"]),c.createVNode(Wh,{ref_key:"cropperRef",ref:Ee,onOk:O[6]||(O[6]=F=>x(F,a.element))},null,512)],64)}}}),[["__scopeId","data-v-f26b78b2"]]),zh=c.defineComponent({name:"GpCheckbox",props:{modelValue:{type:Boolean,required:!0},label:{type:String,default:""}},emits:["update:modelValue"],setup(e,{emit:t}){return{updateValue:i=>{t("update:modelValue",i.target.checked)}}}}),Kh={class:"form-group"},Zh={class:"flex items-center space-x-2 cursor-pointer"},Jh=["checked","aria-checked"],ef={class:"checkbox-label text-sm text-gray-700"};function tf(e,t,a,i,n,r){return c.openBlock(),c.createElementBlock("div",Kh,[c.createElementVNode("label",Zh,[c.createElementVNode("input",{type:"checkbox",checked:e.modelValue,onChange:t[0]||(t[0]=(...u)=>e.updateValue&&e.updateValue(...u)),class:"custom-checkbox","aria-checked":e.modelValue},null,40,Jh),c.createElementVNode("span",ef,c.toDisplayString(e.label),1)])])}const xa=ft(zh,[["render",tf],["__scopeId","data-v-68b8f276"]]),af=c.defineComponent({name:"GpMessage",props:{message:{type:String,required:!0},type:{type:String,default:"info"},position:{type:String,default:"top-right"},duration:{type:Number,default:3e3},onClose:{type:Function,required:!0},icon:{type:Boolean,default:!0}},setup(e){const t=c.ref(!1),a=c.computed(()=>({success:"bg-green-100 text-green-800",error:"bg-red-100 text-red-800",info:"bg-blue-100 text-blue-800",warning:"bg-yellow-100 text-yellow-800"})[e.type]),i=()=>{t.value=!1,e.onClose()};return setTimeout(()=>{i()},e.duration),t.value=!0,{visible:t,typeClass:a,closeMessage:i}}}),nf={key:0,class:"gp-message"},sf={key:0,class:"mr-2"},rf={key:0,class:"text-green-500"},uf={key:1,class:"text-red-500"},of={key:2,class:"text-blue-500"},cf={key:3,class:"text-yellow-500"};function lf(e,t,a,i,n,r){return c.openBlock(),c.createBlock(c.Transition,{name:"fade"},{default:c.withCtx(()=>[e.visible?(c.openBlock(),c.createElementBlock("div",nf,[c.createElementVNode("div",{class:c.normalizeClass([e.typeClass,"message-content"])},[e.icon?(c.openBlock(),c.createElementBlock("span",sf,[c.renderSlot(e.$slots,"icon",{},()=>[e.type==="success"?(c.openBlock(),c.createElementBlock("span",rf,"✔")):c.createCommentVNode("",!0),e.type==="error"?(c.openBlock(),c.createElementBlock("span",uf,"✖")):c.createCommentVNode("",!0),e.type==="info"?(c.openBlock(),c.createElementBlock("span",of,"ℹ")):c.createCommentVNode("",!0),e.type==="warning"?(c.openBlock(),c.createElementBlock("span",cf,"⚠")):c.createCommentVNode("",!0)],!0)])):c.createCommentVNode("",!0),c.createElementVNode("span",null,c.toDisplayString(e.message),1),c.createElementVNode("button",{class:"close-btn hover:text-gray-800 font-bold",onClick:t[0]||(t[0]=(...u)=>e.closeMessage&&e.closeMessage(...u))}," × ")],2)])):c.createCommentVNode("",!0)]),_:3})}const df=ft(af,[["render",lf],["__scopeId","data-v-56476f4c"]]),gt=c.reactive([]);let Bi=null;const hf=()=>{const e=document.createElement("div");return e.id="global-message-container",document.body.appendChild(e),e},ff=()=>{if(Bi)return;const e=hf();Bi=c.createApp({setup(){return{messageQueue:gt}},render(){const t=c.computed(()=>{var i;return{"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4","top-center":"top-4 left-1/2 transform -translate-x-1/2","bottom-center":"bottom-4 left-1/2 transform -translate-x-1/2"}[((i=gt[0])==null?void 0:i.options.position)||"top-center"]});return c.h("div",{class:`fixed flex flex-col gap-2 ${t.value}`},gt.map(a=>c.h(df,{key:a.id,...a.options,onClose:()=>hr(a.id)})))}}),Bi.mount(e)},hr=e=>{const t=gt.findIndex(a=>a.id===e);t!==-1&&gt.splice(t,1)};let mf=0;const Ce=e=>{ff();const t=mf++;gt.push({id:t,options:e}),setTimeout(()=>{hr(t)},e.duration||3e3)};Ce.success=(e,t=3e3,a=!0)=>{Ce(typeof e=="string"?{message:e,type:"success",duration:t,icon:a}:{...e,type:"success"})},Ce.error=(e,t=3e3,a=!0)=>{Ce(typeof e=="string"?{message:e,type:"error",duration:t,icon:a}:{...e,type:"error"})},Ce.info=(e,t=3e3,a=!0)=>{Ce(typeof e=="string"?{message:e,type:"info",duration:t,icon:a}:{...e,type:"info"})},Ce.warning=(e,t=3e3,a=!0)=>{Ce(typeof e=="string"?{message:e,type:"warning",duration:t,icon:a}:{...e,type:"warning"})};const Ef={key:0},Tf={key:0},pf={class:"text-gray-500 my-2"},bf={class:"text-gray-500 my-2"},gf={key:1},_f={key:2},Af={key:3},Nf={key:4},Cf={key:5},If={key:6},Sf={key:7},xf={key:8},Of=ft(c.defineComponent({__name:"EditorPanel",props:{element:Object},emits:["updateElement"],setup(e,{emit:t}){const a=e,i=t,n=c.ref({rule:{},...a.element});c.watch(()=>a.element,u=>{n.value={rule:{},...u}},{immediate:!0});function r(){i("updateElement",n.value),Ce.success("保存成功")}return(u,o)=>(c.openBlock(),c.createElementBlock("div",null,[n.value?(c.openBlock(),c.createElementBlock("div",Ef,[n.value.text!==void 0?(c.openBlock(),c.createElementBlock("div",Tf,[o[11]||(o[11]=c.createElementVNode("label",{class:"block mt-4"},"内容",-1)),c.createElementVNode("div",pf,c.toDisplayString(n.value.text||"-"),1)])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[o[12]||(o[12]=c.createElementVNode("label",{class:"block mt-4"},"节点",-1)),c.createElementVNode("div",bf,c.toDisplayString(n.value.xpath),1)]),c.createElementVNode("div",null,[o[14]||(o[14]=c.createElementVNode("label",{class:"block mt-4"},"类型",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[0]||(o[0]=l=>n.value.type=l),class:"border rounded p-1 w-full"},o[13]||(o[13]=[c.createElementVNode("option",{value:0},"无",-1),c.createElementVNode("option",{value:1},"文本",-1),c.createElementVNode("option",{value:2},"图片",-1),c.createElementVNode("option",{value:3},"视频",-1),c.createElementVNode("option",{value:4},"图标",-1),c.createElementVNode("option",{value:5},"链接",-1),c.createElementVNode("option",{value:10},"块",-1)]),512),[[c.vModelSelect,n.value.type]])]),n.value.type==c.unref(de).Text?(c.openBlock(),c.createElementBlock("div",gf,[o[15]||(o[15]=c.createElementVNode("label",{class:"block mt-4"},"最小文本长度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=l=>n.value.rule.minText=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.minText]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Text?(c.openBlock(),c.createElementBlock("div",_f,[o[16]||(o[16]=c.createElementVNode("label",{class:"block mt-4"},"最大文本长度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[2]||(o[2]=l=>n.value.rule.maxText=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.maxText]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Image?(c.openBlock(),c.createElementBlock("div",Af,[o[17]||(o[17]=c.createElementVNode("label",{class:"block mt-4"},"是否裁剪",-1)),c.createVNode(xa,{class:"py-2",modelValue:n.value.rule.crop,"onUpdate:modelValue":o[3]||(o[3]=l=>n.value.rule.crop=l),label:"是"},null,8,["modelValue"])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Image?(c.openBlock(),c.createElementBlock("div",Nf,[o[18]||(o[18]=c.createElementVNode("label",{class:"block mt-4"},"图片宽度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[4]||(o[4]=l=>n.value.rule.minImageWidth=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.minImageWidth]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Image?(c.openBlock(),c.createElementBlock("div",Cf,[o[19]||(o[19]=c.createElementVNode("label",{class:"block mt-4"},"图片高度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=l=>n.value.rule.maxImageHeight=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.maxImageHeight]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Block?(c.openBlock(),c.createElementBlock("div",If,[o[20]||(o[20]=c.createElementVNode("label",{class:"block mt-4"},"块最小数量",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[6]||(o[6]=l=>n.value.rule.minBlock=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.minBlock]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Block?(c.openBlock(),c.createElementBlock("div",Sf,[o[21]||(o[21]=c.createElementVNode("label",{class:"block mt-4"},"块最大数量",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=l=>n.value.rule.maxBlock=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.maxBlock]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Text||n.value.type==c.unref(de).Icon?(c.openBlock(),c.createElementBlock("div",xf,[o[22]||(o[22]=c.createElementVNode("label",{class:"block mt-4"},"主题色",-1)),c.createVNode(xa,{class:"py-2",modelValue:n.value.rule.isThemeColor,"onUpdate:modelValue":o[8]||(o[8]=l=>n.value.rule.isThemeColor=l),label:"是"},null,8,["modelValue"])])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[o[23]||(o[23]=c.createElementVNode("label",{class:"block mt-4"},"是否必填",-1)),c.createVNode(xa,{class:"py-2",modelValue:n.value.rule.isRequired,"onUpdate:modelValue":o[9]||(o[9]=l=>n.value.rule.isRequired=l),label:"是"},null,8,["modelValue"])]),c.createElementVNode("div",null,[o[24]||(o[24]=c.createElementVNode("label",{class:"block mt-4"},"是否只读",-1)),c.createVNode(xa,{class:"py-2",modelValue:n.value.rule.isReadOnly,"onUpdate:modelValue":o[10]||(o[10]=l=>n.value.rule.isReadOnly=l),label:"是"},null,8,["modelValue"])])])):c.createCommentVNode("",!0),c.createElementVNode("button",{onClick:r,class:"mt-4 p-2 bg-blue-500 text-white rounded"}," 保存 ")]))}}),[["__scopeId","data-v-e53c3800"]]),Df={class:"flex h-screen"},Lf={class:"goodschool_mobile"},yf=["innerHTML"],Rf=["innerHTML"],Mf={class:"flex-1 bg-gray-100 overflow-auto"},Pf={class:"p-4"},kf={key:0,class:"text-red-500 text-xs mt-2"},wf={key:0,class:"resize-area border-l overflow-auto w-[375px]"},Bf={class:"p-4"},fr=ft(c.defineComponent({__name:"Designer",props:{mode:{default:"design"},template:{},css:{},previewWidth:{default:375},uploadByFile:{},icons:{},rules:{}},emits:["update:modelValue","update:element"],setup(e,{emit:t}){const a=e,i=t,n=c.ref(a.template);c.watch(()=>a.template,x=>{n.value=x},{immediate:!0}),c.watch(()=>n.value,x=>{x&&(u.value=$(x))},{immediate:!0}),c.watch(()=>a.css,x=>{x.forEach(M=>{if(document.querySelector(`link[href="${M}"]`))return;const D=document.createElement("link");D.rel="stylesheet",D.href=M,document.head.appendChild(D)})},{immediate:!0});const r=c.ref(a.mode),u=c.ref();c.watch(()=>u.value,x=>{x&&i("update:element",x)},{immediate:!0});const o=c.ref("");let l=Ms("",{},!1);c.watch(()=>o.value,x=>{i("update:modelValue",x)},{immediate:!0});const h=c.ref(),m=c.ref(),T=c.ref("");function b(x){console.log("选择",x),h.value=x}function N(x,M=""){if(M){const D=I(u.value,M);D?m.value=D:m.value=x}else m.value=x}function I(x,M){if(x.xpath===M)return x;if(x.children&&x.children.length)for(const D of x.children){const O=I(D,M);if(O)return O}}function y(x){var M,D,O;if(console.log(x,h.value),h.value)if(h.value.rule=x.rule,h.value.type=x.type,(M=x.rule)!=null&&M.isThemeColor?(x.attrs.class+=" ys_tit_color",x.attrs.style&&(x.attrs.style=void 0)):((D=x.attrs.class)!=null&&D.includes(" ys_tit_color")&&(x.attrs.class=x.attrs.class.replace(" ys_tit_color"," ")),x.rule.color&&(x.attrs.style={color:x.rule.color})),h.value.type===de.Block){const U=I(u.value,h.value.parentxpath||"");U&&U.children&&U.children.forEach(F=>{var ee;F.tag===h.value.tag&&(F.rule=x.rule,F.type=x.type,(ee=F.attrs.class)!=null&&ee.includes(" mb40")||(F.attrs.class+=" mb40"))})}else(O=h.value.attrs.class)!=null&&O.includes(" mb40")&&(h.value.attrs.class=h.value.attrs.class.replace(" mb40"," "))}function P(x){o.value=x}function $(x){l=Ms(x);const M=l("body").children().toArray().map(D=>v(l(D)));return o.value=l("body").html()||"",M[0]}function v(x,M=""){var ee;function D(ae){if(!ae||!ae[0])return"";const ie=[];let Fe=ae;for(;Fe.length&&Fe[0].tagName!=="html";){const mr=Fe[0].tagName,Uf=Fe.parent().children(mr).index(Fe)+1;ie.unshift(`${mr}[${Uf}]`),Fe=Fe.parent()}return"/html/"+ie.join("/")}const O=D(x).replace("/html/body[1]",""),U=x.children().toArray().map(ae=>v(l(ae),O)),F=(ee=a.rules)==null?void 0:ee.find(ae=>ae.xpath===O);return{tag:x[0].tagName,text:x.contents().not(x.children()).text().trim(),attrs:x[0].attribs,children:U,xpath:O,parentxpath:M,type:(F==null?void 0:F.type)||de.None,rule:(F==null?void 0:F.rule)||{}}}function q(x){console.log("更新子节点的文本",x);const M=I(u.value,x.element.xpath);M&&(M.editText=x.newText)}function V(x,M=""){function D(O,U){var ae;const ee=(U?((ae=I(u.value,U))==null?void 0:ae.children)||[]:[u.value]).filter(ie=>ie.tag===O.tag).indexOf(O)+1;return`${U}/${O.tag}[${ee}]`}x.xpath=D(x,M),x.parentxpath=M,(x.children||[]).forEach(O=>V(O,x.xpath))}function k({action:x,element:M,newBlock:D}){console.log("块操作",x,M,D);const O=I(u.value,M.parentxpath||"");if(!O||!O.children)return;const U=O.children.findIndex(ie=>ie===M);if(U===-1)return;const F=O.children.length,{minBlock:ee,maxBlock:ae}=M.rule;if((x==="add"||x==="copy")&&F>=(ae||1/0)){T.value=`无法添加更多块。最大块数量为 ${ae}`;return}switch(x){case"add":if(D){const ie={...D,xpath:"",children:JSON.parse(JSON.stringify(D.children))};O.children.splice(U+1,0,ie)}break;case"copy":if(D){const ie={...D,xpath:"",children:JSON.parse(JSON.stringify(D.children))};O.children.splice(U+1,0,ie)}break;case"moveUp":if(U>0){const[ie]=O.children.splice(U,1);O.children.splice(U-1,0,ie)}break;case"moveDown":if(U<O.children.length-1){const[ie]=O.children.splice(U,1);O.children.splice(U+1,0,ie)}break;case"delete":if(F<=(ee||0)){T.value=`无法删除更多块。最小块数量为 ${ee}`;return}O.children.splice(U,1);break}T.value="",V(u.value)}function _(x,M){let D=M.attrs.class.replace(/icon-\S+/g,`icon-${x}`);M.attrs.class=D}function B(x,M){M.attrs.src=x}const G=c.ref(a.previewWidth),se=c.ref(375);let fe=c.ref(!1),Ae=c.ref(""),Oe=0,me=0;function Ee(x){Ae.value=x,fe.value=!0,Oe=event.clientX,me=G.value,window.addEventListener("mousemove",J),window.addEventListener("mouseup",De)}function J(x){if(!fe.value)return;const M=x.clientX-Oe;Ae.value==="preview"?G.value=Math.max(200,me+M):Ae.value==="structure"&&(se.value=Math.max(200,me-M))}function De(){fe.value=!1,Ae.value="",window.removeEventListener("mousemove",J),window.removeEventListener("mouseup",De)}return(x,M)=>(c.openBlock(),c.createElementBlock("div",Df,[c.createElementVNode("div",{class:"border-l overflow-auto resize-area",style:c.normalizeStyle({width:G.value+"px"})},[c.createElementVNode("div",Lf,[M[1]||(M[1]=c.createElementVNode("h2",{class:"text-lg font-bold"},"实时预览",-1)),o.value?(c.openBlock(),c.createElementBlock("div",{key:0,innerHTML:o.value},null,8,yf)):(c.openBlock(),c.createElementBlock("div",{key:1,innerHTML:c.unref(l)("body").html()},null,8,Rf))])],4),c.createElementVNode("div",{class:"resizer",onMousedown:M[0]||(M[0]=D=>Ee("preview"))},null,32),c.createElementVNode("div",Mf,[c.createElementVNode("div",Pf,[M[2]||(M[2]=c.createElementVNode("div",{class:"flex justify-between"},[c.createElementVNode("h2",{class:"text-lg font-bold"},"结构渲染")],-1)),T.value?(c.openBlock(),c.createElementBlock("div",kf,c.toDisplayString(T.value),1)):c.createCommentVNode("",!0),u.value?(c.openBlock(),c.createBlock(jh,{key:1,icons:x.icons,element:u.value,selectedElement:h.value,hoveredElement:m.value,onSelectElement:b,onHoverElement:N,onContentUpdated:P,onUpdateText:q,onBlockAction:k,onAddIcon:_,onUpload:B},null,8,["icons","element","selectedElement","hoveredElement"])):c.createCommentVNode("",!0)])]),r.value=="design"?(c.openBlock(),c.createElementBlock("div",wf,[c.createElementVNode("div",Bf,[M[3]||(M[3]=c.createElementVNode("h2",{class:"text-lg font-bold"},"节点属性",-1)),h.value?(c.openBlock(),c.createBlock(Of,{key:0,element:h.value,onUpdateElement:y},null,8,["element"])):c.createCommentVNode("",!0)])])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-4815fdbe"]]),vf={install(e){e.component("Designer",fr)}};He.Designer=fr,He.default=vf,Object.defineProperties(He,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});