/****************************************** * @name 黑料不打烊 * @channel https://t.me/yqc_123/ * @feedback https://t.me/yqc_777/ * @update 20240925 * @version 1.0.4 ****************************************** 更新说明: 1.修复过滤广告问题 2.修复Surge多并发导致请求出错 3.去除【每日TOP10】选项 4.优化排版 友情提示: 1.Node.js环境默认通知文件与本脚本同目录, 如需修改请全文搜索sendNotify并替换为对应的相对目录 2.不在使用缓存cheerio和crypto-js库, 如不使用本库其他脚本可自行搜索删除(关键字: cheerio.js、CryptoJS.js) 3.由于不再使用Promise.all进行并发请求, 建议Surge用户将请求时间调整到30秒 脚本声明: 1. 本脚本仅用于学习研究,禁止用于商业用途 2. 本脚本不保证准确性、可靠性、完整性和及时性 3. 任何个人或组织均可无需经过通知而自由使用 4. 作者对任何脚本问题概不负责,包括由此产生的任何损失 5. 如果任何单位或个人认为该脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明、所有权证明,我将在收到认证文件确认后删除 6. 请勿将本脚本用于商业用途,由此引起的问题与作者无关 7. 本脚本及其更新版权归作者所有 ********************* 𝐐𝐮𝐚𝐧𝐭𝐮𝐦𝐮𝐥𝐭 𝐗 ********************* [task_local] 0 9,15 * * * https://raw.githubusercontent.com/Yuheng0101/X/main/Tasks/hlbdy.js, tag=黑料不打烊, img-url=https://raw.githubusercontent.com/Toperlock/Quantumult/main/icon/heiliao.png, enabled=true ********************* 𝐋𝐨𝐨𝐧 ********************* [Script] cron "9,15 * * *" script-path=https://raw.githubusercontent.com/Yuheng0101/X/main/Tasks/hlbdy.js, timeout=10, tag=黑料不打烊, img-url=https://raw.githubusercontent.com/Toperlock/Quantumult/main/icon/heiliao.png ********************* 𝐒𝐮𝐫𝐠𝐞 ********************* 黑料不打烊 = type=cron,cronexp=0 9,15 * * *,wake-system=1,script-path=https://raw.githubusercontent.com/Yuheng0101/X/main/Tasks/hlbdy.js,timeout=60 ********************* 𝐒𝐭𝐚𝐬𝐡 ********************* cron: script: - name: 黑料不打烊 cron: '9,15 * * *' timeout: 60 script-providers: 黑料不打烊: url: https://raw.githubusercontent.com/Yuheng0101/X/main/Tasks/hlbdy.js interval: 86400 ********************* 𝐍𝐨𝐝𝐞𝐉𝐒 ********************* # 环境变量 # 是否开启调试模式 export HLBDY_DEBUG = false # 分类选择 export HLBDY_TYPE = "最新黑料" # 通知类型 0: 组合通知 1:单独通知 export HLBDY_NOTIFY_TYPE = 0 ******************************************/ const getEnv=()=>"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":eval('typeof process !== "undefined"')?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0,isQuanX=()=>"Quantumult X"===getEnv(),isSurge=()=>"Surge"===getEnv(),isLoon=()=>"Loon"===getEnv(),isStash=()=>"Stash"===getEnv(),isNode$1=()=>"Node.js"===getEnv(),useNotify=()=>isNode$1()?require("./sendNotify"):"";class Logger{constructor(e="日志输出",t="info"){this.prefix=e,this.levels=["trace","debug","info","warn","error"],this.setLevel(t)}setLevel(e){this.currentLevelIndex=this.levels.indexOf(e)}log(e,...t){this.levels.indexOf(e)>=this.currentLevelIndex&&console.log(`${this.prefix?`[${this.prefix}] `:""}[${e.toUpperCase()}]\n`+[...t].join("\n"))}trace(...e){this.log("trace",...e)}debug(...e){this.log("debug",...e)}info(...e){this.log("info",...e)}warn(...e){this.log("warn",...e)}error(...e){this.log("error",...e)}}const request=async(request={}||"",option={})=>{switch(request.constructor){case Object:request={...request,...option};break;case String:request={url:request,...option}}request.method||(request.method="GET",(request.body??request.bodyBytes)&&(request.method="POST")),delete request.headers?.["Content-Length"],delete request.headers?.["content-length"];const method=request.method.toLocaleLowerCase();switch(getEnv()){case"Loon":case"Surge":case"Stash":case"Shadowrocket":default:return delete request.id,request.policy&&(isLoon()&&(request.node=request.policy),isStash()&&(request.headers||(request.headers={}),request.headers["X-Stash-Selected-Proxy"]=encodeURI(request.policy))),ArrayBuffer.isView(request.body)&&(request["binary-mode"]=!0),request?.timeout&&isSurge()&&(request.timeout=Number(request.timeout)/1e3),await new Promise(((e,t)=>{$httpClient[method](request,((r,n,s)=>{r?t(r):(n.ok=/^2\d\d$/.test(n.status),n.statusCode=n.status,s&&(n.body=s,1==request["binary-mode"]&&(n.bodyBytes=s)),e(n))}))}));case"Quantumult X":switch(delete request.scheme,delete request.sessionIndex,delete request.charset,request.policy&&(request.opts||(request.opts={}),request.opts.policy=request.policy),(request?.headers?.["Content-Type"]??request?.headers?.["content-type"])?.split(";")?.[0]){default:delete request.bodyBytes;break;case"application/protobuf":case"application/x-protobuf":case"application/vnd.google.protobuf":case"application/grpc":case"application/grpc+proto":case"application/octet-stream":delete request.body,ArrayBuffer.isView(request.bodyBytes)&&(request.bodyBytes=request.bodyBytes.buffer.slice(request.bodyBytes.byteOffset,request.bodyBytes.byteLength+request.bodyBytes.byteOffset));case void 0:}return await Promise.race([$task.fetch(request).then((e=>(e.ok=/^2\d\d$/.test(e.statusCode),e.status=e.statusCode,e)),(e=>Promise.reject(e.error))),new Promise(((e,t)=>setTimeout(t,request?.timeout??5e3,"timeout")))]);case"Node.js":const got=eval('require("got")');let iconv=eval('require("iconv-lite")');const{url:url,...option}=request;return await got[method](url,option).then((e=>(e.statusCode=e.status,e.body=iconv.decode(e.rawBody,request?.encoding||"utf-8"),e.bodyBytes=e.rawBody,e)),(e=>{if(e.response&&500===e.response.statusCode)return Promise.reject(e.response.body);Promise.reject(e.message)}))}};class Store{constructor(NAMESPACE){if(this.env=getEnv(),this.Store="./store",NAMESPACE&&(this.Store=`./store/${NAMESPACE}`),"Node.js"===this.env){const{LocalStorage:LocalStorage}=eval('require("node-localstorage")');this.localStorage=new LocalStorage(this.Store)}}get(e){switch(this.env){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(e);case"Quantumult X":return $prefs.valueForKey(e);case"Node.js":return this.localStorage.getItem(e);default:return null}}set(e,t){switch(this.env){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueForKey(t,e);case"Node.js":return this.localStorage.setItem(e,t),!0;default:return null}}clear(e){switch(this.env){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(null,e);case"Quantumult X":return $prefs.removeValueForKey(e);case"Node.js":return this.localStorage.removeItem(e),!0;default:return null}}}const notify=(e="",t="",r="",n={})=>{const s=e=>{const{$open:t,$copy:r,$media:n,$mediaMime:s}=e;switch(typeof e){case void 0:return e;case"string":switch(getEnv()){case"Surge":case"Stash":default:return{url:e};case"Loon":case"Shadowrocket":return e;case"Quantumult X":return{"open-url":e};case"Node.js":return}case"object":switch(getEnv()){case"Surge":case"Stash":case"Shadowrocket":default:{const i={};let a=e.openUrl||e.url||e["open-url"]||t;a&&Object.assign(i,{action:"open-url",url:a});let o=e["update-pasteboard"]||e.updatePasteboard||r;if(o&&Object.assign(i,{action:"clipboard",text:o}),n){let e,t,r;if(n.startsWith("http"))e=n;else if(n.startsWith("data:")){const[e]=n.split(";"),[,s]=n.split(",");t=s,r=e.replace("data:","")}else{t=n,r=(e=>{const t={JVBERi0:"application/pdf",R0lGODdh:"image/gif",R0lGODlh:"image/gif",iVBORw0KGgo:"image/png","/9j/":"image/jpg"};for(var r in t)if(0===e.indexOf(r))return t[r];return null})(n)}Object.assign(i,{"media-url":e,"media-base64":t,"media-base64-mime":s??r})}return Object.assign(i,{"auto-dismiss":e["auto-dismiss"],sound:e.sound}),i}case"Loon":{const r={};let s=e.openUrl||e.url||e["open-url"]||t;s&&Object.assign(r,{openUrl:s});let i=e.mediaUrl||e["media-url"];return n?.startsWith("http")&&(i=n),i&&Object.assign(r,{mediaUrl:i}),console.log(JSON.stringify(r)),r}case"Quantumult X":{const s={};let i=e["open-url"]||e.url||e.openUrl||t;i&&Object.assign(s,{"open-url":i});let a=e["media-url"]||e.mediaUrl;n?.startsWith("http")&&(a=n),a&&Object.assign(s,{"media-url":a});let o=e["update-pasteboard"]||e.updatePasteboard||r;return o&&Object.assign(s,{"update-pasteboard":o}),console.log(JSON.stringify(s)),s}case"Node.js":return}default:return}};switch(getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:$notification.post(e,t,r,s(n));break;case"Quantumult X":$notify(e,t,r,s(n));case"Node.js":}let i=["","==============📣系统通知📣=============="];i.push(e),t&&i.push(t),r&&i.push(r),console.log(i.join("\n"))},done=(e={})=>{switch(getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:$done(e);break;case"Node.js":process.exit(1)}},operator=e=>{const t=["𝟎","𝟏","𝟐","𝟑","𝟒","𝟓","𝟔","𝟕","𝟖","𝟗","𝐚","𝐛","𝐜","𝐝","𝐞","𝐟","𝐠","𝐡","𝐢","𝐣","𝐤","𝐥","𝐦","𝐧","𝐨","𝐩","𝐪","𝐫","𝐬","𝐭","𝐮","𝐯","𝐰","𝐱","𝐲","𝐳","𝐀","𝐁","𝐂","𝐃","𝐄","𝐅","𝐆","𝐇","𝐈","𝐉","𝐊","𝐋","𝐌","𝐍","𝐎","𝐏","𝐐","𝐑","𝐒","𝐓","𝐔","𝐕","𝐖","𝐗","𝐘","𝐙"],r={48:0,49:1,50:2,51:3,52:4,53:5,54:6,55:7,56:8,57:9,65:36,66:37,67:38,68:39,69:40,70:41,71:42,72:43,73:44,74:45,75:46,76:47,77:48,78:49,79:50,80:51,81:52,82:53,83:54,84:55,85:56,86:57,87:58,88:59,89:60,90:61,97:10,98:11,99:12,100:13,101:14,102:15,103:16,104:17,105:18,106:19,107:20,108:21,109:22,110:23,111:24,112:25,113:26,114:27,115:28,116:29,117:30,118:31,119:32,120:33,121:34,122:35};return e.replace(/[0-9A-z]/g,(e=>t[r[e.charCodeAt(0)]]))},jsonParse=e=>{try{return JSON.parse(e)}catch{return e}};function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var lib$9={},types={};Object.defineProperty(types,"__esModule",{value:!0});var load={},options={},__assign$4=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$4=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(Node);node.NodeWithChildren=NodeWithChildren;var CDATA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=domelementtype_1$1.ElementType.CDATA,t}return __extends$1(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(NodeWithChildren);node.CDATA=CDATA;var Document=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=domelementtype_1$1.ElementType.Root,t}return __extends$1(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(NodeWithChildren);node.Document=Document;var Element=function(e){function t(t,r,n,s){void 0===n&&(n=[]),void 0===s&&(s="script"===t?domelementtype_1$1.ElementType.Script:"style"===t?domelementtype_1$1.ElementType.Style:domelementtype_1$1.ElementType.Tag);var i=e.call(this,n)||this;return i.name=t,i.attribs=r,i.type=s,i}return __extends$1(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var r,n;return{name:t,value:e.attribs[t],namespace:null===(r=e["x-attribsNamespace"])||void 0===r?void 0:r[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(NodeWithChildren);function isTag(e){return(0,domelementtype_1$1.isTag)(e)}function isCDATA(e){return e.type===domelementtype_1$1.ElementType.CDATA}function isText(e){return e.type===domelementtype_1$1.ElementType.Text}function isComment(e){return e.type===domelementtype_1$1.ElementType.Comment}function isDirective(e){return e.type===domelementtype_1$1.ElementType.Directive}function isDocument(e){return e.type===domelementtype_1$1.ElementType.Root}function hasChildren(e){return Object.prototype.hasOwnProperty.call(e,"children")}function cloneNode(e,t){var r;if(void 0===t&&(t=!1),isText(e))r=new Text(e.data);else if(isComment(e))r=new Comment(e.data);else if(isTag(e)){var n=t?cloneChildren(e.children):[],s=new Element(e.name,__assign$3({},e.attribs),n);n.forEach((function(e){return e.parent=s})),null!=e.namespace&&(s.namespace=e.namespace),e["x-attribsNamespace"]&&(s["x-attribsNamespace"]=__assign$3({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(s["x-attribsPrefix"]=__assign$3({},e["x-attribsPrefix"])),r=s}else if(isCDATA(e)){n=t?cloneChildren(e.children):[];var i=new CDATA(n);n.forEach((function(e){return e.parent=i})),r=i}else if(isDocument(e)){n=t?cloneChildren(e.children):[];var a=new Document(n);n.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),r=a}else{if(!isDirective(e))throw new Error("Not implemented yet: ".concat(e.type));var o=new ProcessingInstruction(e.name,e.data);null!=e["x-name"]&&(o["x-name"]=e["x-name"],o["x-publicId"]=e["x-publicId"],o["x-systemId"]=e["x-systemId"]),r=o}return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function cloneChildren(e){for(var t=e.map((function(e){return cloneNode(e,!0)})),r=1;r䀾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((function(e){return e.charCodeAt(0)})));var decodeDataXml={};Object.defineProperty(decodeDataXml,"__esModule",{value:!0}),decodeDataXml.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})));var decode_codepoint={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var r=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function n(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=r.get(e))&&void 0!==t?t:e}e.fromCodePoint=null!==(t=String.fromCodePoint)&&void 0!==t?t:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)},e.replaceCodePoint=n,e.default=function(t){return(0,e.fromCodePoint)(n(t))}}(decode_codepoint),function(e){var t=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&t(n,e,s);return r(n,e),n},s=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var i=s(decodeDataHtml);e.htmlDecodeTree=i.default;var a=s(decodeDataXml);e.xmlDecodeTree=a.default;var o=n(decode_codepoint);e.decodeCodePoint=o.default;var c,l=decode_codepoint;Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return l.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return l.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(c||(c={}));var _,u,d;function h(e){return e>=c.ZERO&&e<=c.NINE}function T(e){return e===c.EQUALS||function(e){return e>=c.UPPER_A&&e<=c.UPPER_Z||e>=c.LOWER_A&&e<=c.LOWER_Z||h(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(_=e.BinTrieFlags||(e.BinTrieFlags={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(u||(u={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(d=e.DecodingMode||(e.DecodingMode={}));var p=function(){function e(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=u.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=d.Strict}return e.prototype.startEntity=function(e){this.decodeMode=e,this.state=u.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},e.prototype.write=function(e,t){switch(this.state){case u.EntityStart:return e.charCodeAt(t)===c.NUM?(this.state=u.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=u.NamedEntity,this.stateNamedEntity(e,t));case u.NumericStart:return this.stateNumericStart(e,t);case u.NumericDecimal:return this.stateNumericDecimal(e,t);case u.NumericHex:return this.stateNumericHex(e,t);case u.NamedEntity:return this.stateNamedEntity(e,t)}},e.prototype.stateNumericStart=function(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===c.LOWER_X?(this.state=u.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=u.NumericDecimal,this.stateNumericDecimal(e,t))},e.prototype.addToNumericResult=function(e,t,r,n){if(t!==r){var s=r-t;this.result=this.result*Math.pow(n,s)+parseInt(e.substr(t,s),n),this.consumed+=s}},e.prototype.stateNumericHex=function(e,t){for(var r,n=t;t=c.UPPER_A&&r<=c.UPPER_F||r>=c.LOWER_A&&r<=c.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(s,3);t+=1}return this.addToNumericResult(e,n,t,16),-1},e.prototype.stateNumericDecimal=function(e,t){for(var r=t;t>14;t>14)){if(i===c.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==d.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},e.prototype.emitNotTerminatedNamedEntity=function(){var e,t=this.result,r=(this.decodeTree[t]&_.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed},e.prototype.emitNamedEntityData=function(e,t,r){var n=this.decodeTree;return this.emitCodePoint(1===t?n[e]&~_.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r},e.prototype.end=function(){var e;switch(this.state){case u.NamedEntity:return 0===this.result||this.decodeMode===d.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case u.NumericDecimal:return this.emitNumericEntity(0,2);case u.NumericHex:return this.emitNumericEntity(0,3);case u.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case u.EntityStart:return 0}},e}();function m(e){var t="",r=new p(e,(function(e){return t+=(0,o.fromCodePoint)(e)}));return function(e,n){for(var s=0,i=0;(i=e.indexOf("&",i))>=0;){t+=e.slice(s,i),r.startEntity(n);var a=r.write(e,i+1);if(a<0){s=i+r.end();break}s=i+a,i=0===a?s+1:s}var o=t+e.slice(s);return t="",o}}function f(e,t,r,n){var s=(t&_.BRANCH_LENGTH)>>7,i=t&_.JUMP_TABLE;if(0===s)return 0!==i&&n===i?r:-1;if(i){var a=n-i;return a<0||a>=s?-1:e[r+a]-1}for(var o=r,c=o+s-1;o<=c;){var l=o+c>>>1,u=e[l];if(un))return e[l+s];c=l-1}}return-1}e.EntityDecoder=p,e.determineBranch=f;var E=m(i.default),A=m(a.default);e.decodeHTML=function(e,t){return void 0===t&&(t=d.Legacy),E(e,t)},e.decodeHTMLAttribute=function(e){return E(e,d.Attribute)},e.decodeHTMLStrict=function(e){return E(e,d.Strict)},e.decodeXML=function(e){return A(e,d.Strict)}}(decode);var encode={},encodeHtml={};function restoreDiff(e){for(var t=1;t$\x80-\uFFFF]/g;var t=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function r(r){for(var n,s="",i=0;null!==(n=e.xmlReplacer.exec(r));){var a=n.index,o=r.charCodeAt(a),c=t.get(o);void 0!==c?(s+=r.substring(i,a)+c,i=a+1):(s+="".concat(r.substring(i,a),"&#x").concat((0,e.getCodePoint)(r,a).toString(16),";"),i=e.xmlReplacer.lastIndex+=Number(55296==(64512&o)))}return s+r.substr(i)}function n(e,t){return function(r){for(var n,s=0,i="";n=e.exec(r);)s!==n.index&&(i+=r.substring(s,n.index)),i+=t.get(n[0].charCodeAt(0)),s=n.index+1;return i+r.substring(s)}}e.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},e.encodeXML=r,e.escape=r,e.escapeUTF8=n(/[&<>'"]/g,t),e.escapeAttribute=n(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=n(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))}(_escape);var __importDefault$4=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(encode,"__esModule",{value:!0}),encode.encodeNonAsciiHTML=encode.encodeHTML=void 0;var encode_html_js_1=__importDefault$4(encodeHtml),escape_js_1$1=_escape,htmlReplacer=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function encodeHTML(e){return encodeHTMLTrieRe(htmlReplacer,e)}function encodeNonAsciiHTML(e){return encodeHTMLTrieRe(escape_js_1$1.xmlReplacer,e)}function encodeHTMLTrieRe(e,t){for(var r,n="",s=0;null!==(r=e.exec(t));){var i=r.index;n+=t.substring(s,i);var a=t.charCodeAt(i),o=encode_html_js_1.default.get(a);if("object"==typeof o){if(i+10&&(n+=render$1(e.children,t)),!t.xmlMode&&singleTag.has(e.name)||(n+=""))),n}function renderDirective(e){return"<".concat(e.data,">")}function renderText(e,t){var r,n=e.data||"";return!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)||!t.xmlMode&&e.parent&&unencodedElements.has(e.parent.name)||(n=t.xmlMode||"utf8"!==t.encodeEntities?(0,entities_1.encodeXML)(n):(0,entities_1.escapeText)(n)),n}function renderCdata(e){return"")}function renderComment(e){return"\x3c!--".concat(e.data,"--\x3e")}var __importDefault$3=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(stringify$2,"__esModule",{value:!0}),stringify$2.innerText=stringify$2.textContent=stringify$2.getText=stringify$2.getInnerHTML=stringify$2.getOuterHTML=void 0;var domhandler_1$7=lib$7,dom_serializer_1=__importDefault$3(lib$5),domelementtype_1=lib$6;function getOuterHTML(e,t){return(0,dom_serializer_1.default)(e,t)}function getInnerHTML(e,t){return(0,domhandler_1$7.hasChildren)(e)?e.children.map((function(e){return getOuterHTML(e,t)})).join(""):""}function getText(e){return Array.isArray(e)?e.map(getText).join(""):(0,domhandler_1$7.isTag)(e)?"br"===e.name?"\n":getText(e.children):(0,domhandler_1$7.isCDATA)(e)?getText(e.children):(0,domhandler_1$7.isText)(e)?e.data:""}function textContent(e){return Array.isArray(e)?e.map(textContent).join(""):(0,domhandler_1$7.hasChildren)(e)&&!(0,domhandler_1$7.isComment)(e)?textContent(e.children):(0,domhandler_1$7.isText)(e)?e.data:""}function innerText(e){return Array.isArray(e)?e.map(innerText).join(""):(0,domhandler_1$7.hasChildren)(e)&&(e.type===domelementtype_1.ElementType.Tag||(0,domhandler_1$7.isCDATA)(e))?innerText(e.children):(0,domhandler_1$7.isText)(e)?e.data:""}stringify$2.getOuterHTML=getOuterHTML,stringify$2.getInnerHTML=getInnerHTML,stringify$2.getText=getText,stringify$2.textContent=textContent,stringify$2.innerText=innerText;var traversal={};Object.defineProperty(traversal,"__esModule",{value:!0}),traversal.prevElementSibling=traversal.nextElementSibling=traversal.getName=traversal.hasAttrib=traversal.getAttributeValue=traversal.getSiblings=traversal.getParent=traversal.getChildren=void 0;var domhandler_1$6=lib$7;function getChildren(e){return(0,domhandler_1$6.hasChildren)(e)?e.children:[]}function getParent(e){return e.parent||null}function getSiblings(e){var t=getParent(e);if(null!=t)return getChildren(t);for(var r=[e],n=e.prev,s=e.next;null!=n;)r.unshift(n),n=n.prev;for(;null!=s;)r.push(s),s=s.next;return r}function getAttributeValue(e,t){var r;return null===(r=e.attribs)||void 0===r?void 0:r[t]}function hasAttrib(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]}function getName(e){return e.name}function nextElementSibling(e){for(var t=e.next;null!==t&&!(0,domhandler_1$6.isTag)(t);)t=t.next;return t}function prevElementSibling(e){for(var t=e.prev;null!==t&&!(0,domhandler_1$6.isTag)(t);)t=t.prev;return t}traversal.getChildren=getChildren,traversal.getParent=getParent,traversal.getSiblings=getSiblings,traversal.getAttributeValue=getAttributeValue,traversal.hasAttrib=hasAttrib,traversal.getName=getName,traversal.nextElementSibling=nextElementSibling,traversal.prevElementSibling=prevElementSibling;var manipulation$1={};function removeElement(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}function replaceElement(e,t){var r=t.prev=e.prev;r&&(r.next=t);var n=t.next=e.next;n&&(n.prev=t);var s=t.parent=e.parent;if(s){var i=s.children;i[i.lastIndexOf(e)]=t,e.parent=null}}function appendChild(e,t){if(removeElement(t),t.next=null,t.parent=e,e.children.push(t)>1){var r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}function append(e,t){removeElement(t);var r=e.parent,n=e.next;if(t.next=n,t.prev=e,e.next=t,t.parent=r,n){if(n.prev=t,r){var s=r.children;s.splice(s.lastIndexOf(n),0,t)}}else r&&r.children.push(t)}function prependChild(e,t){if(removeElement(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var r=e.children[1];r.prev=t,t.next=r}else t.next=null}function prepend(e,t){removeElement(t);var r=e.parent;if(r){var n=r.children;n.splice(n.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}Object.defineProperty(manipulation$1,"__esModule",{value:!0}),manipulation$1.prepend=manipulation$1.prependChild=manipulation$1.append=manipulation$1.appendChild=manipulation$1.replaceElement=manipulation$1.removeElement=void 0,manipulation$1.removeElement=removeElement,manipulation$1.replaceElement=replaceElement,manipulation$1.appendChild=appendChild,manipulation$1.append=append,manipulation$1.prependChild=prependChild,manipulation$1.prepend=prepend;var querying={};Object.defineProperty(querying,"__esModule",{value:!0}),querying.findAll=querying.existsOne=querying.findOne=querying.findOneChild=querying.find=querying.filter=void 0;var domhandler_1$5=lib$7;function filter$1(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),find$1(e,Array.isArray(t)?t:[t],r,n)}function find$1(e,t,r,n){for(var s=[],i=[t],a=[0];;)if(a[0]>=i[0].length){if(1===a.length)return s;i.shift(),a.shift()}else{var o=i[0][a[0]++];if(e(o)&&(s.push(o),--n<=0))return s;r&&(0,domhandler_1$5.hasChildren)(o)&&o.children.length>0&&(a.unshift(0),i.unshift(o.children))}}function findOneChild(e,t){return t.find(e)}function findOne(e,t,r){void 0===r&&(r=!0);for(var n=null,s=0;s0&&(n=findOne(e,i.children,!0)))}return n}function existsOne(e,t){return t.some((function(t){return(0,domhandler_1$5.isTag)(t)&&(e(t)||existsOne(e,t.children))}))}function findAll(e,t){for(var r=[],n=[t],s=[0];;)if(s[0]>=n[0].length){if(1===n.length)return r;n.shift(),s.shift()}else{var i=n[0][s[0]++];(0,domhandler_1$5.isTag)(i)&&(e(i)&&r.push(i),i.children.length>0&&(s.unshift(0),n.unshift(i.children)))}}querying.filter=filter$1,querying.find=find$1,querying.findOneChild=findOneChild,querying.findOne=findOne,querying.existsOne=existsOne,querying.findAll=findAll;var legacy={};Object.defineProperty(legacy,"__esModule",{value:!0}),legacy.getElementsByTagType=legacy.getElementsByTagName=legacy.getElementById=legacy.getElements=legacy.testElement=void 0;var domhandler_1$4=lib$7,querying_js_1=querying,Checks={tag_name:function(e){return"function"==typeof e?function(t){return(0,domhandler_1$4.isTag)(t)&&e(t.name)}:"*"===e?domhandler_1$4.isTag:function(t){return(0,domhandler_1$4.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,domhandler_1$4.isText)(t)&&e(t.data)}:function(t){return(0,domhandler_1$4.isText)(t)&&t.data===e}}};function getAttribCheck(e,t){return"function"==typeof t?function(r){return(0,domhandler_1$4.isTag)(r)&&t(r.attribs[e])}:function(r){return(0,domhandler_1$4.isTag)(r)&&r.attribs[e]===t}}function combineFuncs(e,t){return function(r){return e(r)||t(r)}}function compileTest(e){var t=Object.keys(e).map((function(t){var r=e[t];return Object.prototype.hasOwnProperty.call(Checks,t)?Checks[t](r):getAttribCheck(t,r)}));return 0===t.length?null:t.reduce(combineFuncs)}function testElement(e,t){var r=compileTest(e);return!r||r(t)}function getElements(e,t,r,n){void 0===n&&(n=1/0);var s=compileTest(e);return s?(0,querying_js_1.filter)(s,t,r,n):[]}function getElementById(e,t,r){return void 0===r&&(r=!0),Array.isArray(t)||(t=[t]),(0,querying_js_1.findOne)(getAttribCheck("id",e),t,r)}function getElementsByTagName(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,querying_js_1.filter)(Checks.tag_name(e),t,r,n)}function getElementsByTagType(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,querying_js_1.filter)(Checks.tag_type(e),t,r,n)}legacy.testElement=testElement,legacy.getElements=getElements,legacy.getElementById=getElementById,legacy.getElementsByTagName=getElementsByTagName,legacy.getElementsByTagType=getElementsByTagType;var helpers$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueSort=e.compareDocumentPosition=e.DocumentPosition=e.removeSubsets=void 0;var t,r=lib$7;function n(e,n){var s=[],i=[];if(e===n)return 0;for(var a=(0,r.hasChildren)(e)?e:e.parent;a;)s.unshift(a),a=a.parent;for(a=(0,r.hasChildren)(n)?n:n.parent;a;)i.unshift(a),a=a.parent;for(var o=Math.min(s.length,i.length),c=0;c_.indexOf(d)?l===n?t.FOLLOWING|t.CONTAINED_BY:t.FOLLOWING:l===e?t.PRECEDING|t.CONTAINS:t.PRECEDING}e.removeSubsets=function(e){for(var t=e.length;--t>=0;){var r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0)e.splice(t,1);else for(var n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e},function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(t=e.DocumentPosition||(e.DocumentPosition={})),e.compareDocumentPosition=n,e.uniqueSort=function(e){return e=e.filter((function(e,t,r){return!r.includes(e,t+1)})),e.sort((function(e,r){var s=n(e,r);return s&t.PRECEDING?-1:s&t.FOLLOWING?1:0})),e}}(helpers$1);var feeds={};Object.defineProperty(feeds,"__esModule",{value:!0}),feeds.getFeed=void 0;var stringify_js_1=stringify$2,legacy_js_1=legacy;function getFeed(e){var t=getOneElement(isValidFeed,e);return t?"feed"===t.name?getAtomFeed(t):getRssFeed(t):null}function getAtomFeed(e){var t,r=e.children,n={type:"atom",items:(0,legacy_js_1.getElementsByTagName)("entry",r).map((function(e){var t,r=e.children,n={media:getMediaElements(r)};addConditionally(n,"id","id",r),addConditionally(n,"title","title",r);var s=null===(t=getOneElement("link",r))||void 0===t?void 0:t.attribs.href;s&&(n.link=s);var i=fetch("summary",r)||fetch("content",r);i&&(n.description=i);var a=fetch("updated",r);return a&&(n.pubDate=new Date(a)),n}))};addConditionally(n,"id","id",r),addConditionally(n,"title","title",r);var s=null===(t=getOneElement("link",r))||void 0===t?void 0:t.attribs.href;s&&(n.link=s),addConditionally(n,"description","subtitle",r);var i=fetch("updated",r);return i&&(n.updated=new Date(i)),addConditionally(n,"author","email",r,!0),n}function getRssFeed(e){var t,r,n=null!==(r=null===(t=getOneElement("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==r?r:[],s={type:e.name.substr(0,3),id:"",items:(0,legacy_js_1.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,r={media:getMediaElements(t)};addConditionally(r,"id","guid",t),addConditionally(r,"title","title",t),addConditionally(r,"link","link",t),addConditionally(r,"description","description",t);var n=fetch("pubDate",t)||fetch("dc:date",t);return n&&(r.pubDate=new Date(n)),r}))};addConditionally(s,"title","title",n),addConditionally(s,"link","link",n),addConditionally(s,"description","description",n);var i=fetch("lastBuildDate",n);return i&&(s.updated=new Date(i)),addConditionally(s,"author","managingEditor",n,!0),s}feeds.getFeed=getFeed;var MEDIA_KEYS_STRING=["url","type","lang"],MEDIA_KEYS_INT=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function getMediaElements(e){return(0,legacy_js_1.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,r={medium:t.medium,isDefault:!!t.isDefault},n=0,s=MEDIA_KEYS_STRING;ne.length-3)return!1;var n=e.charCodeAt(r+1);return(n>=t.LowerA&&n<=t.LowerZ||n>=t.UpperA&&n<=t.UpperZ||n===t.Exclamation)&&e.includes(">",r+2)}}(utils),Object.defineProperty(attributes$2,"__esModule",{value:!0}),attributes$2.toggleClass=attributes$2.removeClass=attributes$2.addClass=attributes$2.hasClass=attributes$2.removeAttr=attributes$2.val=attributes$2.data=attributes$2.prop=attributes$2.attr=void 0;var static_js_1$2=_static,utils_js_1$5=utils,domutils_1$3=lib$8,hasOwn=Object.prototype.hasOwnProperty,rspace=/\s+/,dataAttrPrefix="data-",primitives={null:null,true:!0,false:!1},rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,rbrace=/^{[^]*}$|^\[[^]*]$/;function getAttr(e,t,r){var n;if(e&&(0,utils_js_1$5.isTag)(e))return null!==(n=e.attribs)&&void 0!==n||(e.attribs={}),t?hasOwn.call(e.attribs,t)?!r&&rboolean.test(t)?t:e.attribs[t]:"option"===e.name&&"value"===t?(0,static_js_1$2.text)(e.children):"input"!==e.name||"radio"!==e.attribs.type&&"checkbox"!==e.attribs.type||"value"!==t?void 0:"on":e.attribs}function setAttr(e,t,r){null===r?removeAttribute(e,t):e.attribs[t]="".concat(r)}function attr(e,t){if("object"==typeof e||void 0!==t){if("function"==typeof t){if("string"!=typeof e)throw new Error("Bad combination of arguments.");return(0,utils_js_1$5.domEach)(this,(function(r,n){(0,utils_js_1$5.isTag)(r)&&setAttr(r,e,t.call(r,n,r.attribs[e]))}))}return(0,utils_js_1$5.domEach)(this,(function(r){(0,utils_js_1$5.isTag)(r)&&("object"==typeof e?Object.keys(e).forEach((function(t){var n=e[t];setAttr(r,t,n)})):setAttr(r,e,t))}))}return arguments.length>1?this:getAttr(this[0],e,this.options.xmlMode)}function getProp(e,t,r){return t in e?e[t]:!r&&rboolean.test(t)?void 0!==getAttr(e,t,!1):getAttr(e,t,r)}function setProp(e,t,r,n){t in e?e[t]=r:setAttr(e,t,!n&&rboolean.test(t)?r?"":null:"".concat(r))}function prop(e,t){var r,n=this;if("string"==typeof e&&void 0===t){var s=this[0];if(!s||!(0,utils_js_1$5.isTag)(s))return;switch(e){case"style":var i=this.css(),a=Object.keys(i);return a.forEach((function(e,t){i[t]=e})),i.length=a.length,i;case"tagName":case"nodeName":return s.name.toUpperCase();case"href":case"src":var o=null===(r=s.attribs)||void 0===r?void 0:r[e];return"undefined"==typeof URL||("href"!==e||"a"!==s.tagName&&"link"!==s.name)&&("src"!==e||"img"!==s.tagName&&"iframe"!==s.tagName&&"audio"!==s.tagName&&"video"!==s.tagName&&"source"!==s.tagName)||void 0===o||!this.options.baseURI?o:new URL(o,this.options.baseURI).href;case"innerText":return(0,domutils_1$3.innerText)(s);case"textContent":return(0,domutils_1$3.textContent)(s);case"outerHTML":return this.clone().wrap("").parent().html();case"innerHTML":return this.html();default:return getProp(s,e,this.options.xmlMode)}}if("object"==typeof e||void 0!==t){if("function"==typeof t){if("object"==typeof e)throw new Error("Bad combination of arguments.");return(0,utils_js_1$5.domEach)(this,(function(r,s){(0,utils_js_1$5.isTag)(r)&&setProp(r,e,t.call(r,s,getProp(r,e,n.options.xmlMode)),n.options.xmlMode)}))}return(0,utils_js_1$5.domEach)(this,(function(r){(0,utils_js_1$5.isTag)(r)&&("object"==typeof e?Object.keys(e).forEach((function(t){var s=e[t];setProp(r,t,s,n.options.xmlMode)})):setProp(r,e,t,n.options.xmlMode))}))}}function setData(e,t,r){var n,s=e;null!==(n=s.data)&&void 0!==n||(s.data={}),"object"==typeof t?Object.assign(s.data,t):"string"==typeof t&&void 0!==r&&(s.data[t]=r)}function readData(e,t){var r,n,s;null==t?n=(r=Object.keys(e.attribs).filter((function(e){return e.startsWith(dataAttrPrefix)}))).map((function(e){return(0,utils_js_1$5.camelCase)(e.slice(dataAttrPrefix.length))})):(r=[dataAttrPrefix+(0,utils_js_1$5.cssCase)(t)],n=[t]);for(var i=0;i-1;){var s=n+e.length;if((0===n||rspace.test(r[n-1]))&&(s===r.length||rspace.test(r[s])))return!0}return!1}))}function addClass(e){if("function"==typeof e)return(0,utils_js_1$5.domEach)(this,(function(t,r){if((0,utils_js_1$5.isTag)(t)){var n=t.attribs.class||"";addClass.call([t],e.call(t,r,n))}}));if(!e||"string"!=typeof e)return this;for(var t=e.split(rspace),r=this.length,n=0;n=0&&(s.splice(o,1),i=!0,a--)}i&&(e.attribs.class=s.join(" "))}}))}function toggleClass(e,t){if("function"==typeof e)return(0,utils_js_1$5.domEach)(this,(function(r,n){(0,utils_js_1$5.isTag)(r)&&toggleClass.call([r],e.call(r,n,r.attribs.class||"",t),t)}));if(!e||"string"!=typeof e)return this;for(var r=e.split(rspace),n=r.length,s="boolean"==typeof t?t?1:-1:0,i=this.length,a=0;a=0&&_<0?c.push(r[l]):s<=0&&_>=0&&c.splice(_,1)}o.attribs.class=c.join(" ")}}return this}attributes$2.attr=attr,attributes$2.prop=prop,attributes$2.data=data,attributes$2.val=val,attributes$2.removeAttr=removeAttr,attributes$2.hasClass=hasClass,attributes$2.addClass=addClass,attributes$2.removeClass=removeClass,attributes$2.toggleClass=toggleClass;var traversing={},lib$3={},SelectorType;!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"}(SelectorType||(SelectorType={}));const IgnoreCaseMode={Unknown:null,QuirksMode:"quirks",IgnoreCase:!0,CaseSensitive:!1};var AttributeAction;!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"}(AttributeAction||(AttributeAction={}));const reName=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,reEscape=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,actionTypes=new Map([[126,AttributeAction.Element],[94,AttributeAction.Start],[36,AttributeAction.End],[42,AttributeAction.Any],[33,AttributeAction.Not],[124,AttributeAction.Hyphen]]),unpackPseudos=new Set(["has","not","matches","is","where","host","host-context"]);function isTraversal$1(e){switch(e.type){case SelectorType.Adjacent:case SelectorType.Child:case SelectorType.Descendant:case SelectorType.Parent:case SelectorType.Sibling:case SelectorType.ColumnCombinator:return!0;default:return!1}}const stripQuotesFromPseudos=new Set(["contains","icontains"]);function funescape(e,t,r){const n=parseInt(t,16)-65536;return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)}function unescapeCSS(e){return e.replace(reEscape,funescape)}function isQuote(e){return 39===e||34===e}function isWhitespace$1(e){return 32===e||9===e||10===e||12===e||13===e}function parse$4(e){const t=[],r=parseSelector(t,`${e}`,0);if(r0&&r0&&isTraversal$1(n[n.length-1]))throw new Error("Did not expect successive traversals.")}function l(e){n.length>0&&n[n.length-1].type===SelectorType.Descendant?n[n.length-1].type=e:(c(),n.push({type:e}))}function _(e,t){n.push({type:SelectorType.Attribute,name:e,action:t,value:s(1),namespace:null,ignoreCase:"quirks"})}function u(){if(n.length&&n[n.length-1].type===SelectorType.Descendant&&n.pop(),0===n.length)throw new Error("Empty sub-selector");e.push(n)}if(i(0),t.length===r)return r;e:for(;re.charCodeAt(0)))),charsToEscapeInPseudoValue=new Set(pseudoValChars.map((e=>e.charCodeAt(0)))),charsToEscapeInName=new Set([...pseudoValChars,"~","^","$","*","+","!","|",":","[","]"," ","."].map((e=>e.charCodeAt(0))));function stringify$1(e){return e.map((e=>e.map(stringifyToken).join(""))).join(", ")}function stringifyToken(e,t,r){switch(e.type){case SelectorType.Child:return 0===t?"> ":" > ";case SelectorType.Parent:return 0===t?"< ":" < ";case SelectorType.Sibling:return 0===t?"~ ":" ~ ";case SelectorType.Adjacent:return 0===t?"+ ":" + ";case SelectorType.Descendant:return" ";case SelectorType.ColumnCombinator:return 0===t?"|| ":" || ";case SelectorType.Universal:return"*"===e.namespace&&t+10?n+e.slice(r):e}var es=Object.freeze({__proto__:null,get AttributeAction(){return AttributeAction},IgnoreCaseMode:IgnoreCaseMode,get SelectorType(){return SelectorType},isTraversal:isTraversal$1,parse:parse$4,stringify:stringify$1}),require$$0$1=getAugmentedNamespace(es),lib$2={},boolbase={trueFunc:function(){return!0},falseFunc:function(){return!1}},compile$3={},sort={};Object.defineProperty(sort,"__esModule",{value:!0}),sort.isTraversal=void 0;var css_what_1$2=require$$0$1,procedure=new Map([[css_what_1$2.SelectorType.Universal,50],[css_what_1$2.SelectorType.Tag,30],[css_what_1$2.SelectorType.Attribute,1],[css_what_1$2.SelectorType.Pseudo,0]]);function isTraversal(e){return!procedure.has(e.type)}sort.isTraversal=isTraversal;var attributes$1=new Map([[css_what_1$2.AttributeAction.Exists,10],[css_what_1$2.AttributeAction.Equals,8],[css_what_1$2.AttributeAction.Not,7],[css_what_1$2.AttributeAction.Start,6],[css_what_1$2.AttributeAction.End,6],[css_what_1$2.AttributeAction.Any,5]]);function sortByProcedure(e){for(var t=e.map(getProcedure),r=1;r=0&&n>=1)):e.type===css_what_1$2.SelectorType.Pseudo&&(e.data?"has"===e.name||"contains"===e.name?n=0:Array.isArray(e.data)?(n=Math.min.apply(Math,e.data.map((function(e){return Math.min.apply(Math,e.map(getProcedure))}))))<0&&(n=0):n=2:n=3),n}sort.default=sortByProcedure;var general={},attributes={},__importDefault$2=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(attributes,"__esModule",{value:!0}),attributes.attributeRules=void 0;var boolbase_1$2=__importDefault$2(boolbase),reChars=/[-[\]{}()*+?.,\\^$|#\s]/g;function escapeRegex(e){return e.replace(reChars,"\\$&")}var caseInsensitiveAttributes=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 shouldIgnoreCase(e,t){return"boolean"==typeof e.ignoreCase?e.ignoreCase:"quirks"===e.ignoreCase?!!t.quirksMode:!t.xmlMode&&caseInsensitiveAttributes.has(e.name)}attributes.attributeRules={equals:function(e,t,r){var n=r.adapter,s=t.name,i=t.value;return shouldIgnoreCase(t,r)?(i=i.toLowerCase(),function(t){var r=n.getAttributeValue(t,s);return null!=r&&r.length===i.length&&r.toLowerCase()===i&&e(t)}):function(t){return n.getAttributeValue(t,s)===i&&e(t)}},hyphen:function(e,t,r){var n=r.adapter,s=t.name,i=t.value,a=i.length;return shouldIgnoreCase(t,r)?(i=i.toLowerCase(),function(t){var r=n.getAttributeValue(t,s);return null!=r&&(r.length===a||"-"===r.charAt(a))&&r.substr(0,a).toLowerCase()===i&&e(t)}):function(t){var r=n.getAttributeValue(t,s);return null!=r&&(r.length===a||"-"===r.charAt(a))&&r.substr(0,a)===i&&e(t)}},element:function(e,t,r){var n=r.adapter,s=t.name,i=t.value;if(/\s/.test(i))return boolbase_1$2.default.falseFunc;var a=new RegExp("(?:^|\\s)".concat(escapeRegex(i),"(?:$|\\s)"),shouldIgnoreCase(t,r)?"i":"");return function(t){var r=n.getAttributeValue(t,s);return null!=r&&r.length>=i.length&&a.test(r)&&e(t)}},exists:function(e,t,r){var n=t.name,s=r.adapter;return function(t){return s.hasAttrib(t,n)&&e(t)}},start:function(e,t,r){var n=r.adapter,s=t.name,i=t.value,a=i.length;return 0===a?boolbase_1$2.default.falseFunc:shouldIgnoreCase(t,r)?(i=i.toLowerCase(),function(t){var r=n.getAttributeValue(t,s);return null!=r&&r.length>=a&&r.substr(0,a).toLowerCase()===i&&e(t)}):function(t){var r;return!!(null===(r=n.getAttributeValue(t,s))||void 0===r?void 0:r.startsWith(i))&&e(t)}},end:function(e,t,r){var n=r.adapter,s=t.name,i=t.value,a=-i.length;return 0===a?boolbase_1$2.default.falseFunc:shouldIgnoreCase(t,r)?(i=i.toLowerCase(),function(t){var r;return(null===(r=n.getAttributeValue(t,s))||void 0===r?void 0:r.substr(a).toLowerCase())===i&&e(t)}):function(t){var r;return!!(null===(r=n.getAttributeValue(t,s))||void 0===r?void 0:r.endsWith(i))&&e(t)}},any:function(e,t,r){var n=r.adapter,s=t.name,i=t.value;if(""===i)return boolbase_1$2.default.falseFunc;if(shouldIgnoreCase(t,r)){var a=new RegExp(escapeRegex(i),"i");return function(t){var r=n.getAttributeValue(t,s);return null!=r&&r.length>=i.length&&a.test(r)&&e(t)}}return function(t){var r;return!!(null===(r=n.getAttributeValue(t,s))||void 0===r?void 0:r.includes(i))&&e(t)}},not:function(e,t,r){var n=r.adapter,s=t.name,i=t.value;return""===i?function(t){return!!n.getAttributeValue(t,s)&&e(t)}:shouldIgnoreCase(t,r)?(i=i.toLowerCase(),function(t){var r=n.getAttributeValue(t,s);return(null==r||r.length!==i.length||r.toLowerCase()!==i)&&e(t)}):function(t){return n.getAttributeValue(t,s)!==i&&e(t)}}};var pseudoSelectors={},filters={},lib$1={},parse$3={};Object.defineProperty(parse$3,"__esModule",{value:!0}),parse$3.parse=void 0;var whitespace=new Set([9,10,12,13,32]),ZERO="0".charCodeAt(0),NINE="9".charCodeAt(0);function parse$2(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];var t=0,r=0,n=i(),s=a();if(t=ZERO&&e.charCodeAt(t)<=NINE;)n=10*n+(e.charCodeAt(t)-ZERO),t++;return t===r?null:n}function o(){for(;t=r};var n=Math.abs(t),s=(r%n+n)%n;return t>1?function(e){return e>=r&&e%n===s}:function(e){return e<=r&&e%n===s}}function generate(e){var t=e[0],r=e[1]-1,n=0;if(t<0){var s=-t,i=(r%s+s)%s;return function(){var e=i+s*n++;return e>r?null:e}}return 0===t?r<0?function(){return null}:function(){return 0==n++?r:null}:(r<0&&(r+=t*Math.ceil(-r/t)),function(){return t*n+++r})}compile$2.compile=compile$1,compile$2.generate=generate,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sequence=e.generate=e.compile=e.parse=void 0;var t=parse$3;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return t.parse}});var r=compile$2;Object.defineProperty(e,"compile",{enumerable:!0,get:function(){return r.compile}}),Object.defineProperty(e,"generate",{enumerable:!0,get:function(){return r.generate}}),e.default=function(e){return(0,r.compile)((0,t.parse)(e))},e.sequence=function(e){return(0,r.generate)((0,t.parse)(e))}}(lib$1),function(e){var t=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.filters=void 0;var r=t(lib$1),n=t(boolbase);function s(e,t){return function(r){var n=t.getParent(r);return null!=n&&t.isTag(n)&&e(r)}}function i(e){return function(t,r,s){var i=s.adapter[e];return"function"!=typeof i?n.default.falseFunc:function(e){return i(e)&&t(e)}}}e.filters={contains:function(e,t,r){var n=r.adapter;return function(r){return e(r)&&n.getText(r).includes(t)}},icontains:function(e,t,r){var n=r.adapter,s=t.toLowerCase();return function(t){return e(t)&&n.getText(t).toLowerCase().includes(s)}},"nth-child":function(e,t,i){var a=i.adapter,o=i.equals,c=(0,r.default)(t);return c===n.default.falseFunc?n.default.falseFunc:c===n.default.trueFunc?s(e,a):function(t){for(var r=a.getSiblings(t),n=0,s=0;s=0&&!o(t,r[s]);s--)a.isTag(r[s])&&n++;return c(n)&&e(t)}},"nth-of-type":function(e,t,i){var a=i.adapter,o=i.equals,c=(0,r.default)(t);return c===n.default.falseFunc?n.default.falseFunc:c===n.default.trueFunc?s(e,a):function(t){for(var r=a.getSiblings(t),n=0,s=0;s=0;s--){var i=r[s];if(o(t,i))break;a.isTag(i)&&a.getName(i)===a.getName(t)&&n++}return c(n)&&e(t)}},root:function(e,t,r){var n=r.adapter;return function(t){var r=n.getParent(t);return(null==r||!n.isTag(r))&&e(t)}},scope:function(t,r,n,s){var i=n.equals;return s&&0!==s.length?1===s.length?function(e){return i(s[0],e)&&t(e)}:function(e){return s.includes(e)&&t(e)}:e.filters.root(t,r,n)},hover:i("isHovered"),visited:i("isVisited"),active:i("isActive")}}(filters);var pseudos={};function verifyPseudoArgs(e,t,r,n){if(null===r){if(e.length>n)throw new Error("Pseudo-class :".concat(t," requires an argument"))}else if(e.length===n)throw new Error("Pseudo-class :".concat(t," doesn't have any arguments"))}Object.defineProperty(pseudos,"__esModule",{value:!0}),pseudos.verifyPseudoArgs=pseudos.pseudos=void 0,pseudos.pseudos={empty:function(e,t){var r=t.adapter;return!r.getChildren(e).some((function(e){return r.isTag(e)||""!==r.getText(e)}))},"first-child":function(e,t){var r=t.adapter,n=t.equals;if(r.prevElementSibling)return null==r.prevElementSibling(e);var s=r.getSiblings(e).find((function(e){return r.isTag(e)}));return null!=s&&n(e,s)},"last-child":function(e,t){for(var r=t.adapter,n=t.equals,s=r.getSiblings(e),i=s.length-1;i>=0;i--){if(n(e,s[i]))return!0;if(r.isTag(s[i]))break}return!1},"first-of-type":function(e,t){for(var r=t.adapter,n=t.equals,s=r.getSiblings(e),i=r.getName(e),a=0;a=0;a--){var o=s[a];if(n(e,o))return!0;if(r.isTag(o)&&r.getName(o)===i)break}return!1},"only-of-type":function(e,t){var r=t.adapter,n=t.equals,s=r.getName(e);return r.getSiblings(e).every((function(t){return n(e,t)||!r.isTag(t)||r.getName(t)!==s}))},"only-child":function(e,t){var r=t.adapter,n=t.equals;return r.getSiblings(e).every((function(t){return n(e,t)||!r.isTag(t)}))}},pseudos.verifyPseudoArgs=verifyPseudoArgs;var aliases={};Object.defineProperty(aliases,"__esModule",{value:!0}),aliases.aliases=void 0,aliases.aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};var subselects={};!function(e){var t=commonjsGlobal&&commonjsGlobal.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,s=0,i=t.length;s0&&(0,sort_js_1.isTraversal)(o[0])&&o[0].type!==css_what_1.SelectorType.Descendant);else{if(!s||o.some(includesScopePseudo))continue;o.unshift(DESCENDANT_TOKEN)}o.unshift(SCOPE_TOKEN)}}function compileToken(e,t,r){var n;e.forEach(sort_js_1.default),r=null!==(n=t.context)&&void 0!==n?n:r;var s=Array.isArray(r),i=r&&(Array.isArray(r)?r:[r]);if(!1!==t.relativeSelector)absolutize(e,t,i);else if(e.some((function(e){return e.length>0&&(0,sort_js_1.isTraversal)(e[0])})))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");var a=!1,o=e.map((function(e){if(e.length>=2){var r=e[0],n=e[1];r.type!==css_what_1.SelectorType.Pseudo||"scope"!==r.name||(s&&n.type===css_what_1.SelectorType.Descendant?e[1]=FLEXIBLE_DESCENDANT_TOKEN:n.type!==css_what_1.SelectorType.Adjacent&&n.type!==css_what_1.SelectorType.Sibling||(a=!0))}return compileRules(e,t,i)})).reduce(reduceRules,boolbase_1.default.falseFunc);return o.shouldTestNextSiblings=a,o}function compileRules(e,t,r){var n;return e.reduce((function(e,n){return e===boolbase_1.default.falseFunc?boolbase_1.default.falseFunc:(0,general_js_1.compileGeneralSelector)(e,n,t,r,compileToken)}),null!==(n=t.rootFunc)&&void 0!==n?n:boolbase_1.default.trueFunc)}function reduceRules(e,t){return t===boolbase_1.default.falseFunc||e===boolbase_1.default.trueFunc?e:e===boolbase_1.default.falseFunc||t===boolbase_1.default.trueFunc?t:function(r){return e(r)||t(r)}}compile$3.compileToken=compileToken,function(e){var t=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&t(n,e,s);return r(n,e),n},s=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.aliases=e.pseudos=e.filters=e.is=e.selectOne=e.selectAll=e.prepareContext=e._compileToken=e._compileUnsafe=e.compile=void 0;var i=n(lib$8),a=s(boolbase),o=compile$3,c=subselects,l=function(e,t){return e===t},_={adapter:i,equals:l};function u(e){var t,r,n,s,a=null!=e?e:_;return null!==(t=a.adapter)&&void 0!==t||(a.adapter=i),null!==(r=a.equals)&&void 0!==r||(a.equals=null!==(s=null===(n=a.adapter)||void 0===n?void 0:n.equals)&&void 0!==s?s:l),a}function d(e){return function(t,r,n){var s=u(r);return e(t,s,n)}}function h(e){return function(t,r,n){var s=u(n);"function"!=typeof t&&(t=(0,o.compileUnsafe)(t,s,r));var i=T(r,s.adapter,t.shouldTestNextSiblings);return e(t,i,s)}}function T(e,t,r){return void 0===r&&(r=!1),r&&(e=function(e,t){for(var r=Array.isArray(e)?e.slice(0):[e],n=r.length,s=0;s=0?n+1:1/0:0;case"lt":return isFinite(n)?n>=0?Math.min(n,r):1/0:0;case"gt":return isFinite(n)?1/0:0;case"odd":return 2*r;case"even":return 2*r-1;case"last":case"not":return 1/0}},Object.defineProperty(helpers,"__esModule",{value:!0}),helpers.groupSelectors=helpers.getDocumentRoot=void 0;var positionals_js_1=positionals;function getDocumentRoot(e){for(;e.parent;)e=e.parent;return e}function groupSelectors(e){for(var t=[],r=[],n=0,s=e;n0&&e.some((0,o._compileToken)(s,r))||i.some((function(t){return f(t,e,r).length>0}))}function m(e,t,r){if(0===t.length)return[];var n,s=(0,_.groupSelectors)(e),i=s[0],a=s[1];if(i.length){var o=g(t,i,r);if(0===a.length)return o;o.length&&(n=new Set(o))}for(var l=0;l0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(s)&&Math.abs(s)1&&i.length>1?r.reduce((function(e,t){return t(e)}),i):i)}}}traversing.find=find;var _matcher=_getMatcher((function(e,t){for(var r,n=[],s=0;s0})}function first(){return this.length>1?this._make(this[0]):this}function last(){return this.length>0?this._make(this[this.length-1]):this}function eq(e){var t;return 0===(e=+e)&&this.length<=1?this:(e<0&&(e=this.length+e),this._make(null!==(t=this[e])&&void 0!==t?t:[]))}function get(e){return null==e?this.toArray():this[e<0?this.length+e:e]}function toArray(){return Array.prototype.slice.call(this)}function index(e){var t,r;return null==e?(t=this.parent().children(),r=this[0]):"string"==typeof e?(t=this._make(e),r=this[0]):(t=this,r=(0,utils_js_1$4.isCheerio)(e)?e[0]:e),Array.prototype.indexOf.call(t,r)}function slice(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function end(){var e;return null!==(e=this.prevObject)&&void 0!==e?e:this._make([])}function add(e,t){var r=this._make(e,t),n=(0,domutils_1$2.uniqueSort)(__spreadArray$2(__spreadArray$2([],this.get(),!0),r.get(),!0));return this._make(n)}function addBack(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}traversing.parent=_singleMatcher((function(e){var t=e.parent;return t&&!(0,domhandler_1$3.isDocument)(t)?t:null}),_removeDuplicates),traversing.parents=_matcher((function(e){for(var t=[];e.parent&&!(0,domhandler_1$3.isDocument)(e.parent);)t.push(e.parent),e=e.parent;return t}),domutils_1$2.uniqueSort,(function(e){return e.reverse()})),traversing.parentsUntil=_matchUntil((function(e){var t=e.parent;return t&&!(0,domhandler_1$3.isDocument)(t)?t:null}),domutils_1$2.uniqueSort,(function(e){return e.reverse()})),traversing.closest=closest,traversing.next=_singleMatcher((function(e){return(0,domutils_1$2.nextElementSibling)(e)})),traversing.nextAll=_matcher((function(e){for(var t=[];e.next;)e=e.next,(0,utils_js_1$4.isTag)(e)&&t.push(e);return t}),_removeDuplicates),traversing.nextUntil=_matchUntil((function(e){return(0,domutils_1$2.nextElementSibling)(e)}),_removeDuplicates),traversing.prev=_singleMatcher((function(e){return(0,domutils_1$2.prevElementSibling)(e)})),traversing.prevAll=_matcher((function(e){for(var t=[];e.prev;)e=e.prev,(0,utils_js_1$4.isTag)(e)&&t.push(e);return t}),_removeDuplicates),traversing.prevUntil=_matchUntil((function(e){return(0,domutils_1$2.prevElementSibling)(e)}),_removeDuplicates),traversing.siblings=_matcher((function(e){return(0,domutils_1$2.getSiblings)(e).filter((function(t){return(0,utils_js_1$4.isTag)(t)&&t!==e}))}),domutils_1$2.uniqueSort),traversing.children=_matcher((function(e){return(0,domutils_1$2.getChildren)(e).filter(utils_js_1$4.isTag)}),_removeDuplicates),traversing.contents=contents,traversing.each=each,traversing.map=map,traversing.filter=filter,traversing.filterArray=filterArray,traversing.is=is,traversing.not=not,traversing.has=has,traversing.first=first,traversing.last=last,traversing.eq=eq,traversing.get=get,traversing.toArray=toArray,traversing.index=index,traversing.slice=slice,traversing.end=end,traversing.add=add,traversing.addBack=addBack;var manipulation={},global$1="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,inited=!1;function init(){inited=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)lookup[t]=e[t],revLookup[e.charCodeAt(t)]=t;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63}function toByteArray(e){var t,r,n,s,i,a;inited||init();var o=e.length;if(o%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[o-2]?2:"="===e[o-1]?1:0,a=new Arr(3*o/4-i),n=i>0?o-4:o;var c=0;for(t=0,r=0;t>16&255,a[c++]=s>>8&255,a[c++]=255&s;return 2===i?(s=revLookup[e.charCodeAt(t)]<<2|revLookup[e.charCodeAt(t+1)]>>4,a[c++]=255&s):1===i&&(s=revLookup[e.charCodeAt(t)]<<10|revLookup[e.charCodeAt(t+1)]<<4|revLookup[e.charCodeAt(t+2)]>>2,a[c++]=s>>8&255,a[c++]=255&s),a}function tripletToBase64(e){return lookup[e>>18&63]+lookup[e>>12&63]+lookup[e>>6&63]+lookup[63&e]}function encodeChunk(e,t,r){for(var n,s=[],i=t;ic?c:o+a));return 1===n?(t=e[r-1],s+=lookup[t>>2],s+=lookup[t<<4&63],s+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],s+=lookup[t>>10],s+=lookup[t>>4&63],s+=lookup[t<<2&63],s+="="),i.push(s),i.join("")}function read(e,t,r,n,s){var i,a,o=8*s-n-1,c=(1<>1,_=-7,u=r?s-1:0,d=r?-1:1,h=e[t+u];for(u+=d,i=h&(1<<-_)-1,h>>=-_,_+=o;_>0;i=256*i+e[t+u],u+=d,_-=8);for(a=i&(1<<-_)-1,i>>=-_,_+=n;_>0;a=256*a+e[t+u],u+=d,_-=8);if(0===i)i=1-l;else{if(i===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=l}return(h?-1:1)*a*Math.pow(2,i-n)}function write(e,t,r,n,s,i){var a,o,c,l=8*i-s-1,_=(1<>1,d=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,T=n?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=_):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+u>=1?d/c:d*Math.pow(2,1-u))*c>=2&&(a++,c/=2),a+u>=_?(o=0,a=_):a+u>=1?(o=(t*c-1)*Math.pow(2,s),a+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,s),a=0));s>=8;e[r+h]=255&o,h+=T,o/=256,s-=8);for(a=a<0;e[r+h]=255&a,h+=T,a/=256,l-=8);e[r+h-T]|=128*p}var toString$1={}.toString,isArray=Array.isArray||function(e){return"[object Array]"==toString$1.call(e)},INSPECT_MAX_BYTES=50;function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(e,t){if(kMaxLength()=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|e}function internalIsBuffer(e){return!(null==e||!e._isBuffer)}function byteLength(e,t){if(internalIsBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(n)return utf8ToBytes(e).length;t=(""+t).toLowerCase(),n=!0}}function slowToString(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,r);case"utf8":case"utf-8":return utf8Slice(this,t,r);case"ascii":return asciiSlice(this,t,r);case"latin1":case"binary":return latin1Slice(this,t,r);case"base64":return base64Slice(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,s){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),internalIsBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,s);if("number"==typeof t)return t&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,s){var i,a=1,o=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,c/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(s){var _=-1;for(i=r;io&&(r=o-c),i=r;i>=0;i--){for(var u=!0,d=0;ds&&(n=s):n=s;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a239?4:l>223?3:l>191?2:1;if(s+u<=r)switch(u){case 1:l<128&&(_=l);break;case 2:128==(192&(i=e[s+1]))&&(c=(31&l)<<6|63&i)>127&&(_=c);break;case 3:i=e[s+1],a=e[s+2],128==(192&i)&&128==(192&a)&&(c=(15&l)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(_=c);break;case 4:i=e[s+1],a=e[s+2],o=e[s+3],128==(192&i)&&128==(192&a)&&128==(192&o)&&(c=(15&l)<<18|(63&i)<<12|(63&a)<<6|63&o)>65535&&c<1114112&&(_=c)}null===_?(_=65533,u=1):_>65535&&(_-=65536,n.push(_>>>10&1023|55296),_=56320|1023&_),n.push(_),s+=u}return decodeCodePointsArray(n)}Buffer.TYPED_ARRAY_SUPPORT=void 0===global$1.TYPED_ARRAY_SUPPORT||global$1.TYPED_ARRAY_SUPPORT,kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(e){return e.__proto__=Buffer.prototype,e},Buffer.from=function(e,t,r){return from(null,e,t,r)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array),Buffer.alloc=function(e,t,r){return alloc(null,e,t,r)},Buffer.allocUnsafe=function(e){return allocUnsafe(null,e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(null,e)},Buffer.isBuffer=isBuffer,Buffer.compare=function(e,t){if(!internalIsBuffer(e)||!internalIsBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,s=0,i=Math.min(r,n);s0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},Buffer.prototype.compare=function(e,t,r,n,s){if(!internalIsBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(s>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),o=Math.min(i,a),c=this.slice(n,s),l=e.slice(t,r),_=0;_s)&&(r=s),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return hexWrite(this,e,t,r);case"utf8":case"utf-8":return utf8Write(this,e,t,r);case"ascii":return asciiWrite(this,e,t,r);case"latin1":case"binary":return latin1Write(this,e,t,r);case"base64":return base64Write(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(e){var t=e.length;if(t<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var s="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,s,i){if(!internalIsBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||te.length)throw new RangeError("Index out of range")}function objectWriteUInt16(e,t,r,n){t<0&&(t=65535+t+1);for(var s=0,i=Math.min(e.length-r,2);s>>8*(n?s:1-s)}function objectWriteUInt32(e,t,r,n){t<0&&(t=4294967295+t+1);for(var s=0,i=Math.min(e.length-r,4);s>>8*(n?s:3-s)&255}function checkIEEE754(e,t,r,n,s,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(e,t,r,n,s){return s||checkIEEE754(e,t,r,4),write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,s){return s||checkIEEE754(e,t,r,8),write(e,t,r,n,52,8),r+8}Buffer.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(s*=256);)n+=this[e+--t]*s;return n},Buffer.prototype.readUInt8=function(e,t){return t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function(e,t){return t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function(e,t){return t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function(e,t){return t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function(e,t){return t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=this[e],s=1,i=0;++i=(s*=128)&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=t,s=1,i=this[e+--n];n>0&&(s*=256);)i+=this[e+--n]*s;return i>=(s*=128)&&(i-=Math.pow(2,8*t)),i},Buffer.prototype.readInt8=function(e,t){return t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function(e,t){t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(e,t){t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(e,t){return t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function(e,t){return t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function(e,t){return t||checkOffset(e,4,this.length),read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function(e,t){return t||checkOffset(e,4,this.length),read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function(e,t){return t||checkOffset(e,8,this.length),read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function(e,t){return t||checkOffset(e,8,this.length),read(this,e,!1,52,8)},Buffer.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var s=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+s]=e/i&255;return t+r},Buffer.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Buffer.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2},Buffer.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4},Buffer.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var s=Math.pow(2,8*r-1);checkInt(this,e,t,r,s-1,-s)}var i=0,a=1,o=0;for(this[t]=255&e;++i>0)-o&255;return t+r},Buffer.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var s=Math.pow(2,8*r-1);checkInt(this,e,t,r,s-1,-s)}var i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+r},Buffer.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2},Buffer.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4},Buffer.prototype.writeFloatLE=function(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--s)e[s+t]=this[s+r];else if(i<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(s=0;s>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!s){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}s=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),s=r;continue}r=65536+(s-55296<<10|r-56320)}else s&&(t-=3)>-1&&i.push(239,191,189);if(s=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function asciiToBytes(e){for(var t=[],r=0;r>8,s=r%256,i.push(s),i.push(n);return i}function base64ToBytes(e){return toByteArray(base64clean(e))}function blitBuffer(e,t,r,n){for(var s=0;s=t.length||s>=e.length);++s)t[s+r]=e[s];return s}function isnan(e){return e!=e}function isBuffer(e){return null!=e&&(!!e._isBuffer||isFastBuffer(e)||isSlowBuffer(e))}function isFastBuffer(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function isSlowBuffer(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&isFastBuffer(e.slice(0,0))}var parse$1={};Object.defineProperty(parse$1,"__esModule",{value:!0}),parse$1.update=parse$1.getParse=void 0;var domutils_1$1=lib$8,domhandler_1$2=lib$7;function getParse(e){return function(t,r,n,s){if(void 0!==Buffer&&Buffer.isBuffer(t)&&(t=t.toString()),"string"==typeof t)return e(t,r,n,s);var i=t;if(!Array.isArray(i)&&(0,domhandler_1$2.isDocument)(i))return i;var a=new domhandler_1$2.Document([]);return update(i,a),a}}function update(e,t){var r=Array.isArray(e)?e:[e];t?t.children=r:t=null;for(var n=0;n=e.length?null:e[t+r],_=0;_-1&&(d.children.splice(h,1),s===d&&t>h&&o[0]--)}u.parent=s,u.prev&&(u.prev.next=null!==(i=u.next)&&void 0!==i?i:null),u.next&&(u.next.prev=null!==(a=u.prev)&&void 0!==a?a:null),u.prev=0===_?c:n[_-1],u.next=_===n.length-1?l:n[_+1]}return c&&(c.next=n[0]),l&&(l.prev=n[n.length-1]),e.splice.apply(e,o)}function appendTo(e){return((0,utils_js_1$3.isCheerio)(e)?e:this._make(e)).append(this),this}function prependTo(e){return((0,utils_js_1$3.isCheerio)(e)?e:this._make(e)).prepend(this),this}function _wrap(e){return function(t){for(var r=this.length-1,n=this.parents().last(),s=0;s0&&void 0!==t&&(r[t]+=";".concat(o))}else r[t=i.slice(0,a).trim()]=i.slice(a+1).trim()}return r}css$1.css=css;var forms={};Object.defineProperty(forms,"__esModule",{value:!0}),forms.serializeArray=forms.serialize=void 0;var utils_js_1$1=utils,submittableSelector="input,select,textarea,keygen",r20=/%20/g,rCRLF=/\r?\n/g;function serialize$1(){var e=this.serializeArray().map((function(e){return"".concat(encodeURIComponent(e.name),"=").concat(encodeURIComponent(e.value))}));return e.join("&").replace(r20,"+")}function serializeArray(){var e=this;return this.map((function(t,r){var n=e._make(r);return(0,utils_js_1$1.isTag)(r)&&"form"===r.name?n.find(submittableSelector).toArray():n.filter(submittableSelector).toArray()})).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((function(t,r){var n,s=e._make(r),i=s.attr("name"),a=null!==(n=s.val())&&void 0!==n?n:"";return Array.isArray(a)?a.map((function(e){return{name:i,value:e.replace(rCRLF,"\r\n")}})):{name:i,value:a.replace(rCRLF,"\r\n")}})).toArray()}forms.serialize=serialize$1,forms.serializeArray=serializeArray;var __createBinding$2=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),__setModuleDefault$2=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$2=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding$2(t,e,r);return __setModuleDefault$2(t,e),t};Object.defineProperty(cheerio$1,"__esModule",{value:!0}),cheerio$1.Cheerio=void 0;var Attributes=__importStar$2(attributes$2),Traversing=__importStar$2(traversing),Manipulation=__importStar$2(manipulation),Css=__importStar$2(css$1),Forms=__importStar$2(forms),Cheerio=function(e,t,r){if(this.length=0,this.options=r,this._root=t,e){for(var n=0;n=55296&&e<=57343},e.isSurrogatePair=function(e){return e>=56320&&e<=57343},e.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},e.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},e.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||t.has(e)}}(unicode$1);var errorCodes={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ERR=void 0,(t=e.ERR||(e.ERR={})).controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comment",t.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",t.eofInDoctype="eof-in-doctype",t.nestedComment="nested-comment",t.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",t.eofInComment="eof-in-comment",t.incorrectlyClosedComment="incorrectly-closed-comment",t.eofInCdata="eof-in-cdata",t.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",t.nullCharacterReference="null-character-reference",t.surrogateCharacterReference="surrogate-character-reference",t.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",t.controlCharacterReference="control-character-reference",t.noncharacterCharacterReference="noncharacter-character-reference",t.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",t.missingDoctypeName="missing-doctype-name",t.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",t.duplicateAttribute="duplicate-attribute",t.nonConformingDoctype="non-conforming-doctype",t.missingDoctype="missing-doctype",t.misplacedDoctype="misplaced-doctype",t.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",t.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",t.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",t.openElementsLeftAfterEof="open-elements-left-after-eof",t.abandonedHeadElementChild="abandoned-head-element-child",t.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",t.nestedNoscriptInHead="nested-noscript-in-head",t.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"}(errorCodes),Object.defineProperty(preprocessor,"__esModule",{value:!0}),preprocessor.Preprocessor=void 0;const unicode_js_1$1=unicode$1,error_codes_js_1$2=errorCodes,DEFAULT_BUFFER_WATERLINE=65536;class Preprocessor{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=DEFAULT_BUFFER_WATERLINE,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){const{line:t,col:r,offset:n}=this;return{code:e,startLine:t,endLine:t,startCol:r,endCol:r,startOffset:n,endOffset:n}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if((0,unicode_js_1$1.isSurrogatePair)(t))return this.pos++,this._addGap(),(0,unicode_js_1$1.getSurrogatePairCodePoint)(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,unicode_js_1$1.CODE_POINTS.EOF;return this._err(error_codes_js_1$2.ERR.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,unicode_js_1$1.CODE_POINTS.EOF;const r=this.html.charCodeAt(t);return r===unicode_js_1$1.CODE_POINTS.CARRIAGE_RETURN?unicode_js_1$1.CODE_POINTS.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,unicode_js_1$1.CODE_POINTS.EOF;let e=this.html.charCodeAt(this.pos);if(e===unicode_js_1$1.CODE_POINTS.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,unicode_js_1$1.CODE_POINTS.LINE_FEED;if(e===unicode_js_1$1.CODE_POINTS.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,(0,unicode_js_1$1.isSurrogate)(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&e<127||e===unicode_js_1$1.CODE_POINTS.LINE_FEED||e===unicode_js_1$1.CODE_POINTS.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){(0,unicode_js_1$1.isControlCodePoint)(e)?this._err(error_codes_js_1$2.ERR.controlCharacterInInputStream):(0,unicode_js_1$1.isUndefinedCodePoint)(e)&&this._err(error_codes_js_1$2.ERR.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}}(token);var html={};!function(e){var t,r,n,s,i;Object.defineProperty(e,"__esModule",{value:!0}),e.hasUnescapedText=e.isNumberedHeader=e.SPECIAL_ELEMENTS=e.getTagID=e.TAG_ID=e.TAG_NAMES=e.DOCUMENT_MODE=e.ATTRS=e.NS=void 0,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/"}(t=e.NS||(e.NS={})),(r=e.ATTRS||(e.ATTRS={})).TYPE="type",r.ACTION="action",r.ENCODING="encoding",r.PROMPT="prompt",r.NAME="name",r.COLOR="color",r.FACE="face",r.SIZE="size",(n=e.DOCUMENT_MODE||(e.DOCUMENT_MODE={})).NO_QUIRKS="no-quirks",n.QUIRKS="quirks",n.LIMITED_QUIRKS="limited-quirks",function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"}(s=e.TAG_NAMES||(e.TAG_NAMES={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SECTION=94]="SECTION",e[e.SELECT=95]="SELECT",e[e.SOURCE=96]="SOURCE",e[e.SMALL=97]="SMALL",e[e.SPAN=98]="SPAN",e[e.STRIKE=99]="STRIKE",e[e.STRONG=100]="STRONG",e[e.STYLE=101]="STYLE",e[e.SUB=102]="SUB",e[e.SUMMARY=103]="SUMMARY",e[e.SUP=104]="SUP",e[e.TABLE=105]="TABLE",e[e.TBODY=106]="TBODY",e[e.TEMPLATE=107]="TEMPLATE",e[e.TEXTAREA=108]="TEXTAREA",e[e.TFOOT=109]="TFOOT",e[e.TD=110]="TD",e[e.TH=111]="TH",e[e.THEAD=112]="THEAD",e[e.TITLE=113]="TITLE",e[e.TR=114]="TR",e[e.TRACK=115]="TRACK",e[e.TT=116]="TT",e[e.U=117]="U",e[e.UL=118]="UL",e[e.SVG=119]="SVG",e[e.VAR=120]="VAR",e[e.WBR=121]="WBR",e[e.XMP=122]="XMP"}(i=e.TAG_ID||(e.TAG_ID={}));const a=new Map([[s.A,i.A],[s.ADDRESS,i.ADDRESS],[s.ANNOTATION_XML,i.ANNOTATION_XML],[s.APPLET,i.APPLET],[s.AREA,i.AREA],[s.ARTICLE,i.ARTICLE],[s.ASIDE,i.ASIDE],[s.B,i.B],[s.BASE,i.BASE],[s.BASEFONT,i.BASEFONT],[s.BGSOUND,i.BGSOUND],[s.BIG,i.BIG],[s.BLOCKQUOTE,i.BLOCKQUOTE],[s.BODY,i.BODY],[s.BR,i.BR],[s.BUTTON,i.BUTTON],[s.CAPTION,i.CAPTION],[s.CENTER,i.CENTER],[s.CODE,i.CODE],[s.COL,i.COL],[s.COLGROUP,i.COLGROUP],[s.DD,i.DD],[s.DESC,i.DESC],[s.DETAILS,i.DETAILS],[s.DIALOG,i.DIALOG],[s.DIR,i.DIR],[s.DIV,i.DIV],[s.DL,i.DL],[s.DT,i.DT],[s.EM,i.EM],[s.EMBED,i.EMBED],[s.FIELDSET,i.FIELDSET],[s.FIGCAPTION,i.FIGCAPTION],[s.FIGURE,i.FIGURE],[s.FONT,i.FONT],[s.FOOTER,i.FOOTER],[s.FOREIGN_OBJECT,i.FOREIGN_OBJECT],[s.FORM,i.FORM],[s.FRAME,i.FRAME],[s.FRAMESET,i.FRAMESET],[s.H1,i.H1],[s.H2,i.H2],[s.H3,i.H3],[s.H4,i.H4],[s.H5,i.H5],[s.H6,i.H6],[s.HEAD,i.HEAD],[s.HEADER,i.HEADER],[s.HGROUP,i.HGROUP],[s.HR,i.HR],[s.HTML,i.HTML],[s.I,i.I],[s.IMG,i.IMG],[s.IMAGE,i.IMAGE],[s.INPUT,i.INPUT],[s.IFRAME,i.IFRAME],[s.KEYGEN,i.KEYGEN],[s.LABEL,i.LABEL],[s.LI,i.LI],[s.LINK,i.LINK],[s.LISTING,i.LISTING],[s.MAIN,i.MAIN],[s.MALIGNMARK,i.MALIGNMARK],[s.MARQUEE,i.MARQUEE],[s.MATH,i.MATH],[s.MENU,i.MENU],[s.META,i.META],[s.MGLYPH,i.MGLYPH],[s.MI,i.MI],[s.MO,i.MO],[s.MN,i.MN],[s.MS,i.MS],[s.MTEXT,i.MTEXT],[s.NAV,i.NAV],[s.NOBR,i.NOBR],[s.NOFRAMES,i.NOFRAMES],[s.NOEMBED,i.NOEMBED],[s.NOSCRIPT,i.NOSCRIPT],[s.OBJECT,i.OBJECT],[s.OL,i.OL],[s.OPTGROUP,i.OPTGROUP],[s.OPTION,i.OPTION],[s.P,i.P],[s.PARAM,i.PARAM],[s.PLAINTEXT,i.PLAINTEXT],[s.PRE,i.PRE],[s.RB,i.RB],[s.RP,i.RP],[s.RT,i.RT],[s.RTC,i.RTC],[s.RUBY,i.RUBY],[s.S,i.S],[s.SCRIPT,i.SCRIPT],[s.SECTION,i.SECTION],[s.SELECT,i.SELECT],[s.SOURCE,i.SOURCE],[s.SMALL,i.SMALL],[s.SPAN,i.SPAN],[s.STRIKE,i.STRIKE],[s.STRONG,i.STRONG],[s.STYLE,i.STYLE],[s.SUB,i.SUB],[s.SUMMARY,i.SUMMARY],[s.SUP,i.SUP],[s.TABLE,i.TABLE],[s.TBODY,i.TBODY],[s.TEMPLATE,i.TEMPLATE],[s.TEXTAREA,i.TEXTAREA],[s.TFOOT,i.TFOOT],[s.TD,i.TD],[s.TH,i.TH],[s.THEAD,i.THEAD],[s.TITLE,i.TITLE],[s.TR,i.TR],[s.TRACK,i.TRACK],[s.TT,i.TT],[s.U,i.U],[s.UL,i.UL],[s.SVG,i.SVG],[s.VAR,i.VAR],[s.WBR,i.WBR],[s.XMP,i.XMP]]);e.getTagID=function(e){var t;return null!==(t=a.get(e))&&void 0!==t?t:i.UNKNOWN};const o=i;e.SPECIAL_ELEMENTS={[t.HTML]:new Set([o.ADDRESS,o.APPLET,o.AREA,o.ARTICLE,o.ASIDE,o.BASE,o.BASEFONT,o.BGSOUND,o.BLOCKQUOTE,o.BODY,o.BR,o.BUTTON,o.CAPTION,o.CENTER,o.COL,o.COLGROUP,o.DD,o.DETAILS,o.DIR,o.DIV,o.DL,o.DT,o.EMBED,o.FIELDSET,o.FIGCAPTION,o.FIGURE,o.FOOTER,o.FORM,o.FRAME,o.FRAMESET,o.H1,o.H2,o.H3,o.H4,o.H5,o.H6,o.HEAD,o.HEADER,o.HGROUP,o.HR,o.HTML,o.IFRAME,o.IMG,o.INPUT,o.LI,o.LINK,o.LISTING,o.MAIN,o.MARQUEE,o.MENU,o.META,o.NAV,o.NOEMBED,o.NOFRAMES,o.NOSCRIPT,o.OBJECT,o.OL,o.P,o.PARAM,o.PLAINTEXT,o.PRE,o.SCRIPT,o.SECTION,o.SELECT,o.SOURCE,o.STYLE,o.SUMMARY,o.TABLE,o.TBODY,o.TD,o.TEMPLATE,o.TEXTAREA,o.TFOOT,o.TH,o.THEAD,o.TITLE,o.TR,o.TRACK,o.UL,o.WBR,o.XMP]),[t.MATHML]:new Set([o.MI,o.MO,o.MN,o.MS,o.MTEXT,o.ANNOTATION_XML]),[t.SVG]:new Set([o.TITLE,o.FOREIGN_OBJECT,o.DESC]),[t.XLINK]:new Set,[t.XML]:new Set,[t.XMLNS]:new Set},e.isNumberedHeader=function(e){return e===o.H1||e===o.H2||e===o.H3||e===o.H4||e===o.H5||e===o.H6};const c=new Set([s.STYLE,s.SCRIPT,s.XMP,s.IFRAME,s.NOEMBED,s.NOFRAMES,s.PLAINTEXT]);e.hasUnescapedText=function(e,t){return c.has(e)||t&&e===s.NOSCRIPT}}(html),Object.defineProperty(tokenizer,"__esModule",{value:!0}),tokenizer.Tokenizer=tokenizer.TokenizerMode=void 0;const preprocessor_js_1=preprocessor,unicode_js_1=unicode$1,token_js_1$1=token,decode_js_1$1=decode,error_codes_js_1$1=errorCodes,html_js_1$4=html,C1_CONTROLS_REFERENCE_REPLACEMENTS=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var State;function isAsciiDigit(e){return e>=unicode_js_1.CODE_POINTS.DIGIT_0&&e<=unicode_js_1.CODE_POINTS.DIGIT_9}function isAsciiUpper(e){return e>=unicode_js_1.CODE_POINTS.LATIN_CAPITAL_A&&e<=unicode_js_1.CODE_POINTS.LATIN_CAPITAL_Z}function isAsciiLower(e){return e>=unicode_js_1.CODE_POINTS.LATIN_SMALL_A&&e<=unicode_js_1.CODE_POINTS.LATIN_SMALL_Z}function isAsciiLetter(e){return isAsciiLower(e)||isAsciiUpper(e)}function isAsciiAlphaNumeric(e){return isAsciiLetter(e)||isAsciiDigit(e)}function isAsciiUpperHexDigit(e){return e>=unicode_js_1.CODE_POINTS.LATIN_CAPITAL_A&&e<=unicode_js_1.CODE_POINTS.LATIN_CAPITAL_F}function isAsciiLowerHexDigit(e){return e>=unicode_js_1.CODE_POINTS.LATIN_SMALL_A&&e<=unicode_js_1.CODE_POINTS.LATIN_SMALL_F}function isAsciiHexDigit(e){return isAsciiDigit(e)||isAsciiUpperHexDigit(e)||isAsciiLowerHexDigit(e)}function toAsciiLower(e){return e+32}function isWhitespace(e){return e===unicode_js_1.CODE_POINTS.SPACE||e===unicode_js_1.CODE_POINTS.LINE_FEED||e===unicode_js_1.CODE_POINTS.TABULATION||e===unicode_js_1.CODE_POINTS.FORM_FEED}function isEntityInAttributeInvalidEnd(e){return e===unicode_js_1.CODE_POINTS.EQUALS_SIGN||isAsciiAlphaNumeric(e)}function isScriptDataDoubleEscapeSequenceEnd(e){return isWhitespace(e)||e===unicode_js_1.CODE_POINTS.SOLIDUS||e===unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN}!function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"}(State||(State={})),tokenizer.TokenizerMode={DATA:State.DATA,RCDATA:State.RCDATA,RAWTEXT:State.RAWTEXT,SCRIPT_DATA:State.SCRIPT_DATA,PLAINTEXT:State.PLAINTEXT,CDATA_SECTION:State.CDATA_SECTION};let Tokenizer$1=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=State.DATA,this.returnState=State.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new preprocessor_js_1.Preprocessor(t),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var t,r;null===(r=(t=this.handler).onParseError)||void 0===r||r.call(t,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,r){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==r||r()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,t){this.state=e,this._callState(t)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(error_codes_js_1$1.ERR.endTagWithAttributes),e.selfClosing&&this._err(error_codes_js_1$1.ERR.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case token_js_1$1.TokenType.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case token_js_1$1.TokenType.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case token_js_1$1.TokenType.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:token_js_1$1.TokenType.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=isWhitespace(e)?token_js_1$1.TokenType.WHITESPACE_CHARACTER:e===unicode_js_1.CODE_POINTS.NULL?token_js_1$1.TokenType.NULL_CHARACTER:token_js_1$1.TokenType.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(token_js_1$1.TokenType.CHARACTER,e)}_matchNamedCharacterReference(e){let t=null,r=0,n=!1;for(let s=0,i=decode_js_1$1.htmlDecodeTree[0];s>=0&&(s=(0,decode_js_1$1.determineBranch)(decode_js_1$1.htmlDecodeTree,i,s+1,e),!(s<0));e=this._consume()){r+=1,i=decode_js_1$1.htmlDecodeTree[s];const a=i&decode_js_1$1.BinTrieFlags.VALUE_LENGTH;if(a){const i=(a>>14)-1;if(e!==unicode_js_1.CODE_POINTS.SEMICOLON&&this._isCharacterReferenceInAttribute()&&isEntityInAttributeInvalidEnd(this.preprocessor.peek(1))?(t=[unicode_js_1.CODE_POINTS.AMPERSAND],s+=i):(t=0===i?[decode_js_1$1.htmlDecodeTree[s]&~decode_js_1$1.BinTrieFlags.VALUE_LENGTH]:1===i?[decode_js_1$1.htmlDecodeTree[++s]]:[decode_js_1$1.htmlDecodeTree[++s],decode_js_1$1.htmlDecodeTree[++s]],r=0,n=e!==unicode_js_1.CODE_POINTS.SEMICOLON),0===i){this._consume();break}}}return this._unconsume(r),n&&!this.preprocessor.endOfChunkHit&&this._err(error_codes_js_1$1.ERR.missingSemicolonAfterCharacterReference),this._unconsume(1),t}_isCharacterReferenceInAttribute(){return this.returnState===State.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===State.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===State.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case State.DATA:this._stateData(e);break;case State.RCDATA:this._stateRcdata(e);break;case State.RAWTEXT:this._stateRawtext(e);break;case State.SCRIPT_DATA:this._stateScriptData(e);break;case State.PLAINTEXT:this._statePlaintext(e);break;case State.TAG_OPEN:this._stateTagOpen(e);break;case State.END_TAG_OPEN:this._stateEndTagOpen(e);break;case State.TAG_NAME:this._stateTagName(e);break;case State.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case State.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case State.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case State.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case State.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case State.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case State.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case State.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case State.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case State.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case State.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case State.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case State.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case State.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case State.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case State.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case State.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case State.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case State.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case State.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case State.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case State.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case State.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case State.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case State.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case State.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case State.BOGUS_COMMENT:this._stateBogusComment(e);break;case State.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case State.COMMENT_START:this._stateCommentStart(e);break;case State.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case State.COMMENT:this._stateComment(e);break;case State.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case State.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case State.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case State.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case State.COMMENT_END:this._stateCommentEnd(e);break;case State.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case State.DOCTYPE:this._stateDoctype(e);break;case State.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case State.DOCTYPE_NAME:this._stateDoctypeName(e);break;case State.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case State.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case State.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case State.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case State.CDATA_SECTION:this._stateCdataSection(e);break;case State.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case State.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case State.CHARACTER_REFERENCE:this._stateCharacterReference(e);break;case State.NAMED_CHARACTER_REFERENCE:this._stateNamedCharacterReference(e);break;case State.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;case State.NUMERIC_CHARACTER_REFERENCE:this._stateNumericCharacterReference(e);break;case State.HEXADEMICAL_CHARACTER_REFERENCE_START:this._stateHexademicalCharacterReferenceStart(e);break;case State.HEXADEMICAL_CHARACTER_REFERENCE:this._stateHexademicalCharacterReference(e);break;case State.DECIMAL_CHARACTER_REFERENCE:this._stateDecimalCharacterReference(e);break;case State.NUMERIC_CHARACTER_REFERENCE_END:this._stateNumericCharacterReferenceEnd(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN:this.state=State.TAG_OPEN;break;case unicode_js_1.CODE_POINTS.AMPERSAND:this.returnState=State.DATA,this.state=State.CHARACTER_REFERENCE;break;case unicode_js_1.CODE_POINTS.NULL:this._err(error_codes_js_1$1.ERR.unexpectedNullCharacter),this._emitCodePoint(e);break;case unicode_js_1.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case unicode_js_1.CODE_POINTS.AMPERSAND:this.returnState=State.RCDATA,this.state=State.CHARACTER_REFERENCE;break;case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN:this.state=State.RCDATA_LESS_THAN_SIGN;break;case unicode_js_1.CODE_POINTS.NULL:this._err(error_codes_js_1$1.ERR.unexpectedNullCharacter),this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER);break;case unicode_js_1.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN:this.state=State.RAWTEXT_LESS_THAN_SIGN;break;case unicode_js_1.CODE_POINTS.NULL:this._err(error_codes_js_1$1.ERR.unexpectedNullCharacter),this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER);break;case unicode_js_1.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN:this.state=State.SCRIPT_DATA_LESS_THAN_SIGN;break;case unicode_js_1.CODE_POINTS.NULL:this._err(error_codes_js_1$1.ERR.unexpectedNullCharacter),this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER);break;case unicode_js_1.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case unicode_js_1.CODE_POINTS.NULL:this._err(error_codes_js_1$1.ERR.unexpectedNullCharacter),this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER);break;case unicode_js_1.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(isAsciiLetter(e))this._createStartTagToken(),this.state=State.TAG_NAME,this._stateTagName(e);else switch(e){case unicode_js_1.CODE_POINTS.EXCLAMATION_MARK:this.state=State.MARKUP_DECLARATION_OPEN;break;case unicode_js_1.CODE_POINTS.SOLIDUS:this.state=State.END_TAG_OPEN;break;case unicode_js_1.CODE_POINTS.QUESTION_MARK:this._err(error_codes_js_1$1.ERR.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=State.BOGUS_COMMENT,this._stateBogusComment(e);break;case unicode_js_1.CODE_POINTS.EOF:this._err(error_codes_js_1$1.ERR.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(error_codes_js_1$1.ERR.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=State.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(isAsciiLetter(e))this._createEndTagToken(),this.state=State.TAG_NAME,this._stateTagName(e);else switch(e){case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN:this._err(error_codes_js_1$1.ERR.missingEndTagName),this.state=State.DATA;break;case unicode_js_1.CODE_POINTS.EOF:this._err(error_codes_js_1$1.ERR.eofBeforeTagName),this._emitChars("");break;case unicode_js_1.CODE_POINTS.NULL:this._err(error_codes_js_1$1.ERR.unexpectedNullCharacter),this.state=State.SCRIPT_DATA_ESCAPED,this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER);break;case unicode_js_1.CODE_POINTS.EOF:this._err(error_codes_js_1$1.ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=State.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===unicode_js_1.CODE_POINTS.SOLIDUS?this.state=State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:isAsciiLetter(e)?(this._emitChars("<"),this.state=State.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=State.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){isAsciiLetter(e)?(this.state=State.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break;case unicode_js_1.CODE_POINTS.NULL:this._err(error_codes_js_1$1.ERR.unexpectedNullCharacter),this.state=State.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER);break;case unicode_js_1.CODE_POINTS.EOF:this._err(error_codes_js_1$1.ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=State.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===unicode_js_1.CODE_POINTS.SOLIDUS?(this.state=State.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=State.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(unicode_js_1.SEQUENCES.SCRIPT,!1)&&isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(unicode_js_1.SEQUENCES.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e1114111)this._err(error_codes_js_1$1.ERR.characterReferenceOutsideUnicodeRange),this.charRefCode=unicode_js_1.CODE_POINTS.REPLACEMENT_CHARACTER;else if((0,unicode_js_1.isSurrogate)(this.charRefCode))this._err(error_codes_js_1$1.ERR.surrogateCharacterReference),this.charRefCode=unicode_js_1.CODE_POINTS.REPLACEMENT_CHARACTER;else if((0,unicode_js_1.isUndefinedCodePoint)(this.charRefCode))this._err(error_codes_js_1$1.ERR.noncharacterCharacterReference);else if((0,unicode_js_1.isControlCodePoint)(this.charRefCode)||this.charRefCode===unicode_js_1.CODE_POINTS.CARRIAGE_RETURN){this._err(error_codes_js_1$1.ERR.controlCharacterReference);const e=C1_CONTROLS_REFERENCE_REPLACEMENTS.get(this.charRefCode);void 0!==e&&(this.charRefCode=e)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}};tokenizer.Tokenizer=Tokenizer$1;var openElementStack={};Object.defineProperty(openElementStack,"__esModule",{value:!0}),openElementStack.OpenElementStack=void 0;const html_js_1$3=html,IMPLICIT_END_TAG_REQUIRED=new Set([html_js_1$3.TAG_ID.DD,html_js_1$3.TAG_ID.DT,html_js_1$3.TAG_ID.LI,html_js_1$3.TAG_ID.OPTGROUP,html_js_1$3.TAG_ID.OPTION,html_js_1$3.TAG_ID.P,html_js_1$3.TAG_ID.RB,html_js_1$3.TAG_ID.RP,html_js_1$3.TAG_ID.RT,html_js_1$3.TAG_ID.RTC]),IMPLICIT_END_TAG_REQUIRED_THOROUGHLY=new Set([...IMPLICIT_END_TAG_REQUIRED,html_js_1$3.TAG_ID.CAPTION,html_js_1$3.TAG_ID.COLGROUP,html_js_1$3.TAG_ID.TBODY,html_js_1$3.TAG_ID.TD,html_js_1$3.TAG_ID.TFOOT,html_js_1$3.TAG_ID.TH,html_js_1$3.TAG_ID.THEAD,html_js_1$3.TAG_ID.TR]),SCOPING_ELEMENT_NS=new Map([[html_js_1$3.TAG_ID.APPLET,html_js_1$3.NS.HTML],[html_js_1$3.TAG_ID.CAPTION,html_js_1$3.NS.HTML],[html_js_1$3.TAG_ID.HTML,html_js_1$3.NS.HTML],[html_js_1$3.TAG_ID.MARQUEE,html_js_1$3.NS.HTML],[html_js_1$3.TAG_ID.OBJECT,html_js_1$3.NS.HTML],[html_js_1$3.TAG_ID.TABLE,html_js_1$3.NS.HTML],[html_js_1$3.TAG_ID.TD,html_js_1$3.NS.HTML],[html_js_1$3.TAG_ID.TEMPLATE,html_js_1$3.NS.HTML],[html_js_1$3.TAG_ID.TH,html_js_1$3.NS.HTML],[html_js_1$3.TAG_ID.ANNOTATION_XML,html_js_1$3.NS.MATHML],[html_js_1$3.TAG_ID.MI,html_js_1$3.NS.MATHML],[html_js_1$3.TAG_ID.MN,html_js_1$3.NS.MATHML],[html_js_1$3.TAG_ID.MO,html_js_1$3.NS.MATHML],[html_js_1$3.TAG_ID.MS,html_js_1$3.NS.MATHML],[html_js_1$3.TAG_ID.MTEXT,html_js_1$3.NS.MATHML],[html_js_1$3.TAG_ID.DESC,html_js_1$3.NS.SVG],[html_js_1$3.TAG_ID.FOREIGN_OBJECT,html_js_1$3.NS.SVG],[html_js_1$3.TAG_ID.TITLE,html_js_1$3.NS.SVG]]),NAMED_HEADERS=[html_js_1$3.TAG_ID.H1,html_js_1$3.TAG_ID.H2,html_js_1$3.TAG_ID.H3,html_js_1$3.TAG_ID.H4,html_js_1$3.TAG_ID.H5,html_js_1$3.TAG_ID.H6],TABLE_ROW_CONTEXT=[html_js_1$3.TAG_ID.TR,html_js_1$3.TAG_ID.TEMPLATE,html_js_1$3.TAG_ID.HTML],TABLE_BODY_CONTEXT=[html_js_1$3.TAG_ID.TBODY,html_js_1$3.TAG_ID.TFOOT,html_js_1$3.TAG_ID.THEAD,html_js_1$3.TAG_ID.TEMPLATE,html_js_1$3.TAG_ID.HTML],TABLE_CONTEXT=[html_js_1$3.TAG_ID.TABLE,html_js_1$3.TAG_ID.TEMPLATE,html_js_1$3.TAG_ID.HTML],TABLE_CELLS=[html_js_1$3.TAG_ID.TD,html_js_1$3.TAG_ID.TH];class OpenElementStack{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,r){this.treeAdapter=t,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=html_js_1$3.TAG_ID.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===html_js_1$3.TAG_ID.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===html_js_1$3.NS.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const r=this._indexOf(e);this.items[r]=t,r===this.stackTop&&(this.current=t)}insertAfter(e,t,r){const n=this._indexOf(e)+1;this.items.splice(n,0,t),this.tagIDs.splice(n,0,r),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==html_js_1$3.NS.HTML);this.shortenToLength(t<0?0:t)}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;r--)if(e.includes(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===t)return r;return-1}clearBackTo(e,t){const r=this._indexOfTagNames(e,t);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(TABLE_CONTEXT,html_js_1$3.NS.HTML)}clearBackToTableBodyContext(){this.clearBackTo(TABLE_BODY_CONTEXT,html_js_1$3.NS.HTML)}clearBackToTableRowContext(){this.clearBackTo(TABLE_ROW_CONTEXT,html_js_1$3.NS.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===html_js_1$3.TAG_ID.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===html_js_1$3.TAG_ID.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===html_js_1$3.NS.HTML)return!0;if(SCOPING_ELEMENT_NS.get(r)===n)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e],r=this.treeAdapter.getNamespaceURI(this.items[e]);if((0,html_js_1$3.isNumberedHeader)(t)&&r===html_js_1$3.NS.HTML)return!0;if(SCOPING_ELEMENT_NS.get(t)===r)return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===html_js_1$3.NS.HTML)return!0;if((r===html_js_1$3.TAG_ID.UL||r===html_js_1$3.TAG_ID.OL)&&n===html_js_1$3.NS.HTML||SCOPING_ELEMENT_NS.get(r)===n)return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===html_js_1$3.NS.HTML)return!0;if(r===html_js_1$3.TAG_ID.BUTTON&&n===html_js_1$3.NS.HTML||SCOPING_ELEMENT_NS.get(r)===n)return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===html_js_1$3.NS.HTML){if(r===e)return!0;if(r===html_js_1$3.TAG_ID.TABLE||r===html_js_1$3.TAG_ID.TEMPLATE||r===html_js_1$3.TAG_ID.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===html_js_1$3.NS.HTML){if(t===html_js_1$3.TAG_ID.TBODY||t===html_js_1$3.TAG_ID.THEAD||t===html_js_1$3.TAG_ID.TFOOT)return!0;if(t===html_js_1$3.TAG_ID.TABLE||t===html_js_1$3.TAG_ID.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===html_js_1$3.NS.HTML){if(r===e)return!0;if(r!==html_js_1$3.TAG_ID.OPTION&&r!==html_js_1$3.TAG_ID.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId);)this.pop()}}openElementStack.OpenElementStack=OpenElementStack;var formattingElementList={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingElementList=e.EntryType=void 0;var t;!function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"}(t=e.EntryType||(e.EntryType={}));const r={type:t.Marker};e.FormattingElementList=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,r){const n=[],s=r.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e[e.name,e.value])));let s=0;for(let e=0;en.get(e.name)===e.value))&&(s+=1,s>=3&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(r)}pushElement(e,r){this._ensureNoahArkCondition(e),this.entries.unshift({type:t.Element,element:e,token:r})}insertElementAfterBookmark(e,r){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:t.Element,element:e,token:r})}removeEntry(e){const t=this.entries.indexOf(e);t>=0&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(r);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){const r=this.entries.find((r=>r.type===t.Marker||this.treeAdapter.getTagName(r.element)===e));return r&&r.type===t.Element?r:null}getElementEntry(e){return this.entries.find((r=>r.type===t.Element&&r.element===e))}}}(formattingElementList);var _default={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defaultTreeAdapter=void 0;const t=html;function r(e){return{nodeName:"#text",value:e,parentNode:null}}e.defaultTreeAdapter={createDocument:()=>({nodeName:"#document",mode:t.DOCUMENT_MODE.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,r)=>({nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(t,r,n,s){const i=t.childNodes.find((e=>"#documentType"===e.nodeName));if(i)i.name=r,i.publicId=n,i.systemId=s;else{const i={nodeName:"#documentType",name:r,publicId:n,systemId:s,parentNode:null};e.defaultTreeAdapter.appendChild(t,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(t,n){if(t.childNodes.length>0){const r=t.childNodes[t.childNodes.length-1];if(e.defaultTreeAdapter.isTextNode(r))return void(r.value+=n)}e.defaultTreeAdapter.appendChild(t,r(n))},insertTextBefore(t,n,s){const i=t.childNodes[t.childNodes.indexOf(s)-1];i&&e.defaultTreeAdapter.isTextNode(i)?i.value+=n:e.defaultTreeAdapter.insertBefore(t,r(n),s)},adoptAttributes(e,t){const r=new Set(e.attrs.map((e=>e.name)));for(let n=0;ne.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=Object.assign(Object.assign({},e.sourceCodeLocation),t)}}}(_default);var doctype$1={};Object.defineProperty(doctype$1,"__esModule",{value:!0}),doctype$1.getDocumentMode=doctype$1.isConforming=void 0;const html_js_1$2=html,VALID_DOCTYPE_NAME="html",VALID_SYSTEM_ID="about:legacy-compat",QUIRKS_MODE_SYSTEM_ID="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",QUIRKS_MODE_PUBLIC_ID_PREFIXES=["+//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//"],QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES=[...QUIRKS_MODE_PUBLIC_ID_PREFIXES,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],QUIRKS_MODE_PUBLIC_IDS=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),LIMITED_QUIRKS_PUBLIC_ID_PREFIXES=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES=[...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function hasPrefix(e,t){return t.some((t=>e.startsWith(t)))}function isConforming(e){return e.name===VALID_DOCTYPE_NAME&&null===e.publicId&&(null===e.systemId||e.systemId===VALID_SYSTEM_ID)}function getDocumentMode(e){if(e.name!==VALID_DOCTYPE_NAME)return html_js_1$2.DOCUMENT_MODE.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===QUIRKS_MODE_SYSTEM_ID)return html_js_1$2.DOCUMENT_MODE.QUIRKS;let{publicId:r}=e;if(null!==r){if(r=r.toLowerCase(),QUIRKS_MODE_PUBLIC_IDS.has(r))return html_js_1$2.DOCUMENT_MODE.QUIRKS;let e=null===t?QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES:QUIRKS_MODE_PUBLIC_ID_PREFIXES;if(hasPrefix(r,e))return html_js_1$2.DOCUMENT_MODE.QUIRKS;if(e=null===t?LIMITED_QUIRKS_PUBLIC_ID_PREFIXES:LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES,hasPrefix(r,e))return html_js_1$2.DOCUMENT_MODE.LIMITED_QUIRKS}return html_js_1$2.DOCUMENT_MODE.NO_QUIRKS}doctype$1.isConforming=isConforming,doctype$1.getDocumentMode=getDocumentMode;var foreignContent$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIntegrationPoint=e.adjustTokenSVGTagName=e.adjustTokenXMLAttrs=e.adjustTokenSVGAttrs=e.adjustTokenMathMLAttrs=e.causesExit=e.SVG_TAG_NAMES_ADJUSTMENT_MAP=void 0;const t=html,r={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},n=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]))),s=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:t.NS.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:t.NS.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:t.NS.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:t.NS.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:t.NS.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:t.NS.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:t.NS.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:t.NS.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:t.NS.XML}],["xml:space",{prefix:"xml",name:"space",namespace:t.NS.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:t.NS.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:t.NS.XMLNS}]]);e.SVG_TAG_NAMES_ADJUSTMENT_MAP=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])));const i=new Set([t.TAG_ID.B,t.TAG_ID.BIG,t.TAG_ID.BLOCKQUOTE,t.TAG_ID.BODY,t.TAG_ID.BR,t.TAG_ID.CENTER,t.TAG_ID.CODE,t.TAG_ID.DD,t.TAG_ID.DIV,t.TAG_ID.DL,t.TAG_ID.DT,t.TAG_ID.EM,t.TAG_ID.EMBED,t.TAG_ID.H1,t.TAG_ID.H2,t.TAG_ID.H3,t.TAG_ID.H4,t.TAG_ID.H5,t.TAG_ID.H6,t.TAG_ID.HEAD,t.TAG_ID.HR,t.TAG_ID.I,t.TAG_ID.IMG,t.TAG_ID.LI,t.TAG_ID.LISTING,t.TAG_ID.MENU,t.TAG_ID.META,t.TAG_ID.NOBR,t.TAG_ID.OL,t.TAG_ID.P,t.TAG_ID.PRE,t.TAG_ID.RUBY,t.TAG_ID.S,t.TAG_ID.SMALL,t.TAG_ID.SPAN,t.TAG_ID.STRONG,t.TAG_ID.STRIKE,t.TAG_ID.SUB,t.TAG_ID.SUP,t.TAG_ID.TABLE,t.TAG_ID.TT,t.TAG_ID.U,t.TAG_ID.UL,t.TAG_ID.VAR]);e.causesExit=function(e){const r=e.tagID;return r===t.TAG_ID.FONT&&e.attrs.some((({name:e})=>e===t.ATTRS.COLOR||e===t.ATTRS.SIZE||e===t.ATTRS.FACE))||i.has(r)},e.adjustTokenMathMLAttrs=function(e){for(let t=0;t0&&this._setContextModes(e,t)}onItemPop(e,t){var r,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(n=(r=this.treeAdapter).onItemPop)||void 0===n||n.call(r,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const r=e===this.document||this.treeAdapter.getNamespaceURI(e)===html_js_1$1.NS.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,html_js_1$1.NS.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=InsertionMode.TEXT}switchToPlaintextParsing(){this.insertionMode=InsertionMode.TEXT,this.originalInsertionMode=InsertionMode.IN_BODY,this.tokenizer.state=index_js_1.TokenizerMode.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===html_js_1$1.TAG_NAMES.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===html_js_1$1.NS.HTML)switch(this.fragmentContextID){case html_js_1$1.TAG_ID.TITLE:case html_js_1$1.TAG_ID.TEXTAREA:this.tokenizer.state=index_js_1.TokenizerMode.RCDATA;break;case html_js_1$1.TAG_ID.STYLE:case html_js_1$1.TAG_ID.XMP:case html_js_1$1.TAG_ID.IFRAME:case html_js_1$1.TAG_ID.NOEMBED:case html_js_1$1.TAG_ID.NOFRAMES:case html_js_1$1.TAG_ID.NOSCRIPT:this.tokenizer.state=index_js_1.TokenizerMode.RAWTEXT;break;case html_js_1$1.TAG_ID.SCRIPT:this.tokenizer.state=index_js_1.TokenizerMode.SCRIPT_DATA;break;case html_js_1$1.TAG_ID.PLAINTEXT:this.tokenizer.state=index_js_1.TokenizerMode.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",r=e.publicId||"",n=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,r,n),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const r=t&&Object.assign(Object.assign({},t),{startTag:t});this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){const r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,t){const r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,t){const r=this.treeAdapter.createElement(e,html_js_1$1.NS.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,html_js_1$1.NS.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,r),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(html_js_1$1.TAG_NAMES.HTML,html_js_1$1.NS.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,html_js_1$1.TAG_ID.HTML)}_appendCommentNode(e,t){const r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let t,r;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:r}=this._findFosterParentingLocation()),r?this.treeAdapter.insertTextBefore(t,e.chars,r):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const n=this.treeAdapter.getChildNodes(t),s=r?n.lastIndexOf(r):n.length,i=n[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:t,endCol:r,endOffset:n}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:r,endOffset:n})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(t,r)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const r=t.location,n=this.treeAdapter.getTagName(e),s=t.type===token_js_1.TokenType.END_TAG&&n===t.tagName?{endTag:Object.assign({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,s)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,r;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,r=this.fragmentContextID):({current:t,currentTagId:r}=this.openElements),(e.tagID!==html_js_1$1.TAG_ID.SVG||this.treeAdapter.getTagName(t)!==html_js_1$1.TAG_NAMES.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==html_js_1$1.NS.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===html_js_1$1.TAG_ID.MGLYPH||e.tagID===html_js_1$1.TAG_ID.MALIGNMARK)&&!this._isIntegrationPoint(r,t,html_js_1$1.NS.HTML))}_processToken(e){switch(e.type){case token_js_1.TokenType.CHARACTER:this.onCharacter(e);break;case token_js_1.TokenType.NULL_CHARACTER:this.onNullCharacter(e);break;case token_js_1.TokenType.COMMENT:this.onComment(e);break;case token_js_1.TokenType.DOCTYPE:this.onDoctype(e);break;case token_js_1.TokenType.START_TAG:this._processStartTag(e);break;case token_js_1.TokenType.END_TAG:this.onEndTag(e);break;case token_js_1.TokenType.EOF:this.onEof(e);break;case token_js_1.TokenType.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,r){const n=this.treeAdapter.getNamespaceURI(t),s=this.treeAdapter.getAttrList(t);return foreignContent.isIntegrationPoint(e,n,s,r)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===formatting_element_list_js_1.EntryType.Marker||this.openElements.contains(e.element)));for(let r=t<0?e-1:t-1;r>=0;r--){const e=this.activeFormattingElements.entries[r];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=InsertionMode.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(html_js_1$1.TAG_ID.P),this.openElements.popUntilTagNamePopped(html_js_1$1.TAG_ID.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case html_js_1$1.TAG_ID.TR:return void(this.insertionMode=InsertionMode.IN_ROW);case html_js_1$1.TAG_ID.TBODY:case html_js_1$1.TAG_ID.THEAD:case html_js_1$1.TAG_ID.TFOOT:return void(this.insertionMode=InsertionMode.IN_TABLE_BODY);case html_js_1$1.TAG_ID.CAPTION:return void(this.insertionMode=InsertionMode.IN_CAPTION);case html_js_1$1.TAG_ID.COLGROUP:return void(this.insertionMode=InsertionMode.IN_COLUMN_GROUP);case html_js_1$1.TAG_ID.TABLE:return void(this.insertionMode=InsertionMode.IN_TABLE);case html_js_1$1.TAG_ID.BODY:return void(this.insertionMode=InsertionMode.IN_BODY);case html_js_1$1.TAG_ID.FRAMESET:return void(this.insertionMode=InsertionMode.IN_FRAMESET);case html_js_1$1.TAG_ID.SELECT:return void this._resetInsertionModeForSelect(e);case html_js_1$1.TAG_ID.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case html_js_1$1.TAG_ID.HTML:return void(this.insertionMode=this.headElement?InsertionMode.AFTER_HEAD:InsertionMode.BEFORE_HEAD);case html_js_1$1.TAG_ID.TD:case html_js_1$1.TAG_ID.TH:if(e>0)return void(this.insertionMode=InsertionMode.IN_CELL);break;case html_js_1$1.TAG_ID.HEAD:if(e>0)return void(this.insertionMode=InsertionMode.IN_HEAD)}this.insertionMode=InsertionMode.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===html_js_1$1.TAG_ID.TEMPLATE)break;if(e===html_js_1$1.TAG_ID.TABLE)return void(this.insertionMode=InsertionMode.IN_SELECT_IN_TABLE)}this.insertionMode=InsertionMode.IN_SELECT}_isElementCausesFosterParenting(e){return TABLE_STRUCTURE_TAGS.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case html_js_1$1.TAG_ID.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===html_js_1$1.NS.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case html_js_1$1.TAG_ID.TABLE:{const r=this.treeAdapter.getParentNode(t);return r?{parent:r,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const r=this.treeAdapter.getNamespaceURI(e);return html_js_1$1.SPECIAL_ELEMENTS[r].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)characterInForeignContent(this,e);else switch(this.insertionMode){case InsertionMode.INITIAL:tokenInInitialMode(this,e);break;case InsertionMode.BEFORE_HTML:tokenBeforeHtml(this,e);break;case InsertionMode.BEFORE_HEAD:tokenBeforeHead(this,e);break;case InsertionMode.IN_HEAD:tokenInHead(this,e);break;case InsertionMode.IN_HEAD_NO_SCRIPT:tokenInHeadNoScript(this,e);break;case InsertionMode.AFTER_HEAD:tokenAfterHead(this,e);break;case InsertionMode.IN_BODY:case InsertionMode.IN_CAPTION:case InsertionMode.IN_CELL:case InsertionMode.IN_TEMPLATE:characterInBody(this,e);break;case InsertionMode.TEXT:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:characterInTable(this,e);break;case InsertionMode.IN_TABLE_TEXT:characterInTableText(this,e);break;case InsertionMode.IN_COLUMN_GROUP:tokenInColumnGroup(this,e);break;case InsertionMode.AFTER_BODY:tokenAfterBody(this,e);break;case InsertionMode.AFTER_AFTER_BODY:tokenAfterAfterBody(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)nullCharacterInForeignContent(this,e);else switch(this.insertionMode){case InsertionMode.INITIAL:tokenInInitialMode(this,e);break;case InsertionMode.BEFORE_HTML:tokenBeforeHtml(this,e);break;case InsertionMode.BEFORE_HEAD:tokenBeforeHead(this,e);break;case InsertionMode.IN_HEAD:tokenInHead(this,e);break;case InsertionMode.IN_HEAD_NO_SCRIPT:tokenInHeadNoScript(this,e);break;case InsertionMode.AFTER_HEAD:tokenAfterHead(this,e);break;case InsertionMode.TEXT:this._insertCharacters(e);break;case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:characterInTable(this,e);break;case InsertionMode.IN_COLUMN_GROUP:tokenInColumnGroup(this,e);break;case InsertionMode.AFTER_BODY:tokenAfterBody(this,e);break;case InsertionMode.AFTER_AFTER_BODY:tokenAfterAfterBody(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)appendComment(this,e);else switch(this.insertionMode){case InsertionMode.INITIAL:case InsertionMode.BEFORE_HTML:case InsertionMode.BEFORE_HEAD:case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:case InsertionMode.IN_BODY:case InsertionMode.IN_TABLE:case InsertionMode.IN_CAPTION:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:case InsertionMode.IN_CELL:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:case InsertionMode.IN_TEMPLATE:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:appendComment(this,e);break;case InsertionMode.IN_TABLE_TEXT:tokenInTableText(this,e);break;case InsertionMode.AFTER_BODY:appendCommentToRootHtmlElement(this,e);break;case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:appendCommentToDocument(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case InsertionMode.INITIAL:doctypeInInitialMode(this,e);break;case InsertionMode.BEFORE_HEAD:case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:this._err(e,error_codes_js_1.ERR.misplacedDoctype);break;case InsertionMode.IN_TABLE_TEXT:tokenInTableText(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,error_codes_js_1.ERR.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?startTagInForeignContent(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case InsertionMode.INITIAL:tokenInInitialMode(this,e);break;case InsertionMode.BEFORE_HTML:startTagBeforeHtml(this,e);break;case InsertionMode.BEFORE_HEAD:startTagBeforeHead(this,e);break;case InsertionMode.IN_HEAD:startTagInHead(this,e);break;case InsertionMode.IN_HEAD_NO_SCRIPT:startTagInHeadNoScript(this,e);break;case InsertionMode.AFTER_HEAD:startTagAfterHead(this,e);break;case InsertionMode.IN_BODY:startTagInBody(this,e);break;case InsertionMode.IN_TABLE:startTagInTable(this,e);break;case InsertionMode.IN_TABLE_TEXT:tokenInTableText(this,e);break;case InsertionMode.IN_CAPTION:startTagInCaption(this,e);break;case InsertionMode.IN_COLUMN_GROUP:startTagInColumnGroup(this,e);break;case InsertionMode.IN_TABLE_BODY:startTagInTableBody(this,e);break;case InsertionMode.IN_ROW:startTagInRow(this,e);break;case InsertionMode.IN_CELL:startTagInCell(this,e);break;case InsertionMode.IN_SELECT:startTagInSelect(this,e);break;case InsertionMode.IN_SELECT_IN_TABLE:startTagInSelectInTable(this,e);break;case InsertionMode.IN_TEMPLATE:startTagInTemplate(this,e);break;case InsertionMode.AFTER_BODY:startTagAfterBody(this,e);break;case InsertionMode.IN_FRAMESET:startTagInFrameset(this,e);break;case InsertionMode.AFTER_FRAMESET:startTagAfterFrameset(this,e);break;case InsertionMode.AFTER_AFTER_BODY:startTagAfterAfterBody(this,e);break;case InsertionMode.AFTER_AFTER_FRAMESET:startTagAfterAfterFrameset(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?endTagInForeignContent(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case InsertionMode.INITIAL:tokenInInitialMode(this,e);break;case InsertionMode.BEFORE_HTML:endTagBeforeHtml(this,e);break;case InsertionMode.BEFORE_HEAD:endTagBeforeHead(this,e);break;case InsertionMode.IN_HEAD:endTagInHead(this,e);break;case InsertionMode.IN_HEAD_NO_SCRIPT:endTagInHeadNoScript(this,e);break;case InsertionMode.AFTER_HEAD:endTagAfterHead(this,e);break;case InsertionMode.IN_BODY:endTagInBody(this,e);break;case InsertionMode.TEXT:endTagInText(this,e);break;case InsertionMode.IN_TABLE:endTagInTable(this,e);break;case InsertionMode.IN_TABLE_TEXT:tokenInTableText(this,e);break;case InsertionMode.IN_CAPTION:endTagInCaption(this,e);break;case InsertionMode.IN_COLUMN_GROUP:endTagInColumnGroup(this,e);break;case InsertionMode.IN_TABLE_BODY:endTagInTableBody(this,e);break;case InsertionMode.IN_ROW:endTagInRow(this,e);break;case InsertionMode.IN_CELL:endTagInCell(this,e);break;case InsertionMode.IN_SELECT:endTagInSelect(this,e);break;case InsertionMode.IN_SELECT_IN_TABLE:endTagInSelectInTable(this,e);break;case InsertionMode.IN_TEMPLATE:endTagInTemplate(this,e);break;case InsertionMode.AFTER_BODY:endTagAfterBody(this,e);break;case InsertionMode.IN_FRAMESET:endTagInFrameset(this,e);break;case InsertionMode.AFTER_FRAMESET:endTagAfterFrameset(this,e);break;case InsertionMode.AFTER_AFTER_BODY:tokenAfterAfterBody(this,e)}}onEof(e){switch(this.insertionMode){case InsertionMode.INITIAL:tokenInInitialMode(this,e);break;case InsertionMode.BEFORE_HTML:tokenBeforeHtml(this,e);break;case InsertionMode.BEFORE_HEAD:tokenBeforeHead(this,e);break;case InsertionMode.IN_HEAD:tokenInHead(this,e);break;case InsertionMode.IN_HEAD_NO_SCRIPT:tokenInHeadNoScript(this,e);break;case InsertionMode.AFTER_HEAD:tokenAfterHead(this,e);break;case InsertionMode.IN_BODY:case InsertionMode.IN_TABLE:case InsertionMode.IN_CAPTION:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:case InsertionMode.IN_CELL:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:eofInBody(this,e);break;case InsertionMode.TEXT:eofInText(this,e);break;case InsertionMode.IN_TABLE_TEXT:tokenInTableText(this,e);break;case InsertionMode.IN_TEMPLATE:eofInTemplate(this,e);break;case InsertionMode.AFTER_BODY:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:stopParsing(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===unicode.CODE_POINTS.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:case InsertionMode.TEXT:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:this._insertCharacters(e);break;case InsertionMode.IN_BODY:case InsertionMode.IN_CAPTION:case InsertionMode.IN_CELL:case InsertionMode.IN_TEMPLATE:case InsertionMode.AFTER_BODY:case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:whitespaceCharacterInBody(this,e);break;case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:characterInTable(this,e);break;case InsertionMode.IN_TABLE_TEXT:whitespaceCharacterInTableText(this,e)}}};function aaObtainFormattingElementEntry(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):genericEndTagInBody(e,t),r}function aaObtainFurthestBlock(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){const s=e.openElements.items[n];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[n])&&(r=s)}return r||(e.openElements.shortenToLength(n<0?0:n),e.activeFormattingElements.removeEntry(t)),r}function aaInnerLoop(e,t,r){let n=t,s=e.openElements.getCommonAncestor(t);for(let i=0,a=s;a!==r;i++,a=s){s=e.openElements.getCommonAncestor(a);const r=e.activeFormattingElements.getElementEntry(a),o=r&&i>=AA_INNER_LOOP_ITER;!r||o?(o&&e.activeFormattingElements.removeEntry(r),e.openElements.remove(a)):(a=aaRecreateElementFromEntry(e,r),n===t&&(e.activeFormattingElements.bookmark=r),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(a,n),n=a)}return n}function aaRecreateElementFromEntry(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function aaInsertLastNodeInCommonAncestor(e,t,r){const n=e.treeAdapter.getTagName(t),s=(0,html_js_1$1.getTagID)(n);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(r);else{const n=e.treeAdapter.getNamespaceURI(t);s===html_js_1$1.TAG_ID.TEMPLATE&&n===html_js_1$1.NS.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function aaReplaceFormattingElement(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),{token:s}=r,i=e.treeAdapter.createElement(s.tagName,n,s.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,s),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,i,s.tagID)}function callAdoptionAgency(e,t){for(let r=0;r=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],n=e.treeAdapter.getNodeSourceCodeLocation(r);if(n&&!n.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const r=e.openElements.items[1],n=e.treeAdapter.getNodeSourceCodeLocation(r);n&&!n.endTag&&e._setEndLocation(r,t)}}}}function doctypeInInitialMode(e,t){e._setDocumentType(t);const r=t.forceQuirks?html_js_1$1.DOCUMENT_MODE.QUIRKS:doctype.getDocumentMode(t);doctype.isConforming(t)||e._err(t,error_codes_js_1.ERR.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=InsertionMode.BEFORE_HTML}function tokenInInitialMode(e,t){e._err(t,error_codes_js_1.ERR.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,html_js_1$1.DOCUMENT_MODE.QUIRKS),e.insertionMode=InsertionMode.BEFORE_HTML,e._processToken(t)}function startTagBeforeHtml(e,t){t.tagID===html_js_1$1.TAG_ID.HTML?(e._insertElement(t,html_js_1$1.NS.HTML),e.insertionMode=InsertionMode.BEFORE_HEAD):tokenBeforeHtml(e,t)}function endTagBeforeHtml(e,t){const r=t.tagID;r!==html_js_1$1.TAG_ID.HTML&&r!==html_js_1$1.TAG_ID.HEAD&&r!==html_js_1$1.TAG_ID.BODY&&r!==html_js_1$1.TAG_ID.BR||tokenBeforeHtml(e,t)}function tokenBeforeHtml(e,t){e._insertFakeRootElement(),e.insertionMode=InsertionMode.BEFORE_HEAD,e._processToken(t)}function startTagBeforeHead(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.HTML:startTagInBody(e,t);break;case html_js_1$1.TAG_ID.HEAD:e._insertElement(t,html_js_1$1.NS.HTML),e.headElement=e.openElements.current,e.insertionMode=InsertionMode.IN_HEAD;break;default:tokenBeforeHead(e,t)}}function endTagBeforeHead(e,t){const r=t.tagID;r===html_js_1$1.TAG_ID.HEAD||r===html_js_1$1.TAG_ID.BODY||r===html_js_1$1.TAG_ID.HTML||r===html_js_1$1.TAG_ID.BR?tokenBeforeHead(e,t):e._err(t,error_codes_js_1.ERR.endTagWithoutMatchingOpenElement)}function tokenBeforeHead(e,t){e._insertFakeElement(html_js_1$1.TAG_NAMES.HEAD,html_js_1$1.TAG_ID.HEAD),e.headElement=e.openElements.current,e.insertionMode=InsertionMode.IN_HEAD,e._processToken(t)}function startTagInHead(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.HTML:startTagInBody(e,t);break;case html_js_1$1.TAG_ID.BASE:case html_js_1$1.TAG_ID.BASEFONT:case html_js_1$1.TAG_ID.BGSOUND:case html_js_1$1.TAG_ID.LINK:case html_js_1$1.TAG_ID.META:e._appendElement(t,html_js_1$1.NS.HTML),t.ackSelfClosing=!0;break;case html_js_1$1.TAG_ID.TITLE:e._switchToTextParsing(t,index_js_1.TokenizerMode.RCDATA);break;case html_js_1$1.TAG_ID.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,index_js_1.TokenizerMode.RAWTEXT):(e._insertElement(t,html_js_1$1.NS.HTML),e.insertionMode=InsertionMode.IN_HEAD_NO_SCRIPT);break;case html_js_1$1.TAG_ID.NOFRAMES:case html_js_1$1.TAG_ID.STYLE:e._switchToTextParsing(t,index_js_1.TokenizerMode.RAWTEXT);break;case html_js_1$1.TAG_ID.SCRIPT:e._switchToTextParsing(t,index_js_1.TokenizerMode.SCRIPT_DATA);break;case html_js_1$1.TAG_ID.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=InsertionMode.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);break;case html_js_1$1.TAG_ID.HEAD:e._err(t,error_codes_js_1.ERR.misplacedStartTagForHeadElement);break;default:tokenInHead(e,t)}}function endTagInHead(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.HEAD:e.openElements.pop(),e.insertionMode=InsertionMode.AFTER_HEAD;break;case html_js_1$1.TAG_ID.BODY:case html_js_1$1.TAG_ID.BR:case html_js_1$1.TAG_ID.HTML:tokenInHead(e,t);break;case html_js_1$1.TAG_ID.TEMPLATE:templateEndTagInHead(e,t);break;default:e._err(t,error_codes_js_1.ERR.endTagWithoutMatchingOpenElement)}}function templateEndTagInHead(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==html_js_1$1.TAG_ID.TEMPLATE&&e._err(t,error_codes_js_1.ERR.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(html_js_1$1.TAG_ID.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,error_codes_js_1.ERR.endTagWithoutMatchingOpenElement)}function tokenInHead(e,t){e.openElements.pop(),e.insertionMode=InsertionMode.AFTER_HEAD,e._processToken(t)}function startTagInHeadNoScript(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.HTML:startTagInBody(e,t);break;case html_js_1$1.TAG_ID.BASEFONT:case html_js_1$1.TAG_ID.BGSOUND:case html_js_1$1.TAG_ID.HEAD:case html_js_1$1.TAG_ID.LINK:case html_js_1$1.TAG_ID.META:case html_js_1$1.TAG_ID.NOFRAMES:case html_js_1$1.TAG_ID.STYLE:startTagInHead(e,t);break;case html_js_1$1.TAG_ID.NOSCRIPT:e._err(t,error_codes_js_1.ERR.nestedNoscriptInHead);break;default:tokenInHeadNoScript(e,t)}}function endTagInHeadNoScript(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.NOSCRIPT:e.openElements.pop(),e.insertionMode=InsertionMode.IN_HEAD;break;case html_js_1$1.TAG_ID.BR:tokenInHeadNoScript(e,t);break;default:e._err(t,error_codes_js_1.ERR.endTagWithoutMatchingOpenElement)}}function tokenInHeadNoScript(e,t){const r=t.type===token_js_1.TokenType.EOF?error_codes_js_1.ERR.openElementsLeftAfterEof:error_codes_js_1.ERR.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=InsertionMode.IN_HEAD,e._processToken(t)}function startTagAfterHead(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.HTML:startTagInBody(e,t);break;case html_js_1$1.TAG_ID.BODY:e._insertElement(t,html_js_1$1.NS.HTML),e.framesetOk=!1,e.insertionMode=InsertionMode.IN_BODY;break;case html_js_1$1.TAG_ID.FRAMESET:e._insertElement(t,html_js_1$1.NS.HTML),e.insertionMode=InsertionMode.IN_FRAMESET;break;case html_js_1$1.TAG_ID.BASE:case html_js_1$1.TAG_ID.BASEFONT:case html_js_1$1.TAG_ID.BGSOUND:case html_js_1$1.TAG_ID.LINK:case html_js_1$1.TAG_ID.META:case html_js_1$1.TAG_ID.NOFRAMES:case html_js_1$1.TAG_ID.SCRIPT:case html_js_1$1.TAG_ID.STYLE:case html_js_1$1.TAG_ID.TEMPLATE:case html_js_1$1.TAG_ID.TITLE:e._err(t,error_codes_js_1.ERR.abandonedHeadElementChild),e.openElements.push(e.headElement,html_js_1$1.TAG_ID.HEAD),startTagInHead(e,t),e.openElements.remove(e.headElement);break;case html_js_1$1.TAG_ID.HEAD:e._err(t,error_codes_js_1.ERR.misplacedStartTagForHeadElement);break;default:tokenAfterHead(e,t)}}function endTagAfterHead(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.BODY:case html_js_1$1.TAG_ID.HTML:case html_js_1$1.TAG_ID.BR:tokenAfterHead(e,t);break;case html_js_1$1.TAG_ID.TEMPLATE:templateEndTagInHead(e,t);break;default:e._err(t,error_codes_js_1.ERR.endTagWithoutMatchingOpenElement)}}function tokenAfterHead(e,t){e._insertFakeElement(html_js_1$1.TAG_NAMES.BODY,html_js_1$1.TAG_ID.BODY),e.insertionMode=InsertionMode.IN_BODY,modeInBody(e,t)}function modeInBody(e,t){switch(t.type){case token_js_1.TokenType.CHARACTER:characterInBody(e,t);break;case token_js_1.TokenType.WHITESPACE_CHARACTER:whitespaceCharacterInBody(e,t);break;case token_js_1.TokenType.COMMENT:appendComment(e,t);break;case token_js_1.TokenType.START_TAG:startTagInBody(e,t);break;case token_js_1.TokenType.END_TAG:endTagInBody(e,t);break;case token_js_1.TokenType.EOF:eofInBody(e,t)}}function whitespaceCharacterInBody(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function characterInBody(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function htmlStartTagInBody(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function bodyStartTagInBody(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function framesetStartTagInBody(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,html_js_1$1.NS.HTML),e.insertionMode=InsertionMode.IN_FRAMESET)}function addressStartTagInBody(e,t){e.openElements.hasInButtonScope(html_js_1$1.TAG_ID.P)&&e._closePElement(),e._insertElement(t,html_js_1$1.NS.HTML)}function numberedHeaderStartTagInBody(e,t){e.openElements.hasInButtonScope(html_js_1$1.TAG_ID.P)&&e._closePElement(),(0,html_js_1$1.isNumberedHeader)(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,html_js_1$1.NS.HTML)}function preStartTagInBody(e,t){e.openElements.hasInButtonScope(html_js_1$1.TAG_ID.P)&&e._closePElement(),e._insertElement(t,html_js_1$1.NS.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function formStartTagInBody(e,t){const r=e.openElements.tmplCount>0;e.formElement&&!r||(e.openElements.hasInButtonScope(html_js_1$1.TAG_ID.P)&&e._closePElement(),e._insertElement(t,html_js_1$1.NS.HTML),r||(e.formElement=e.openElements.current))}function listItemStartTagInBody(e,t){e.framesetOk=!1;const r=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){const n=e.openElements.tagIDs[t];if(r===html_js_1$1.TAG_ID.LI&&n===html_js_1$1.TAG_ID.LI||(r===html_js_1$1.TAG_ID.DD||r===html_js_1$1.TAG_ID.DT)&&(n===html_js_1$1.TAG_ID.DD||n===html_js_1$1.TAG_ID.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==html_js_1$1.TAG_ID.ADDRESS&&n!==html_js_1$1.TAG_ID.DIV&&n!==html_js_1$1.TAG_ID.P&&e._isSpecialElement(e.openElements.items[t],n))break}e.openElements.hasInButtonScope(html_js_1$1.TAG_ID.P)&&e._closePElement(),e._insertElement(t,html_js_1$1.NS.HTML)}function plaintextStartTagInBody(e,t){e.openElements.hasInButtonScope(html_js_1$1.TAG_ID.P)&&e._closePElement(),e._insertElement(t,html_js_1$1.NS.HTML),e.tokenizer.state=index_js_1.TokenizerMode.PLAINTEXT}function buttonStartTagInBody(e,t){e.openElements.hasInScope(html_js_1$1.TAG_ID.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(html_js_1$1.TAG_ID.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,html_js_1$1.NS.HTML),e.framesetOk=!1}function aStartTagInBody(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(html_js_1$1.TAG_NAMES.A);r&&(callAdoptionAgency(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,html_js_1$1.NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,html_js_1$1.NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function nobrStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(html_js_1$1.TAG_ID.NOBR)&&(callAdoptionAgency(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,html_js_1$1.NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function appletStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,html_js_1$1.NS.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function tableStartTagInBody(e,t){e.treeAdapter.getDocumentMode(e.document)!==html_js_1$1.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(html_js_1$1.TAG_ID.P)&&e._closePElement(),e._insertElement(t,html_js_1$1.NS.HTML),e.framesetOk=!1,e.insertionMode=InsertionMode.IN_TABLE}function areaStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,html_js_1$1.NS.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function isHiddenInput(e){const t=(0,token_js_1.getTokenAttr)(e,html_js_1$1.ATTRS.TYPE);return null!=t&&t.toLowerCase()===HIDDEN_INPUT_TYPE}function inputStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,html_js_1$1.NS.HTML),isHiddenInput(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function paramStartTagInBody(e,t){e._appendElement(t,html_js_1$1.NS.HTML),t.ackSelfClosing=!0}function hrStartTagInBody(e,t){e.openElements.hasInButtonScope(html_js_1$1.TAG_ID.P)&&e._closePElement(),e._appendElement(t,html_js_1$1.NS.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function imageStartTagInBody(e,t){t.tagName=html_js_1$1.TAG_NAMES.IMG,t.tagID=html_js_1$1.TAG_ID.IMG,areaStartTagInBody(e,t)}function textareaStartTagInBody(e,t){e._insertElement(t,html_js_1$1.NS.HTML),e.skipNextNewLine=!0,e.tokenizer.state=index_js_1.TokenizerMode.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=InsertionMode.TEXT}function xmpStartTagInBody(e,t){e.openElements.hasInButtonScope(html_js_1$1.TAG_ID.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,index_js_1.TokenizerMode.RAWTEXT)}function iframeStartTagInBody(e,t){e.framesetOk=!1,e._switchToTextParsing(t,index_js_1.TokenizerMode.RAWTEXT)}function noembedStartTagInBody(e,t){e._switchToTextParsing(t,index_js_1.TokenizerMode.RAWTEXT)}function selectStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,html_js_1$1.NS.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===InsertionMode.IN_TABLE||e.insertionMode===InsertionMode.IN_CAPTION||e.insertionMode===InsertionMode.IN_TABLE_BODY||e.insertionMode===InsertionMode.IN_ROW||e.insertionMode===InsertionMode.IN_CELL?InsertionMode.IN_SELECT_IN_TABLE:InsertionMode.IN_SELECT}function optgroupStartTagInBody(e,t){e.openElements.currentTagId===html_js_1$1.TAG_ID.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,html_js_1$1.NS.HTML)}function rbStartTagInBody(e,t){e.openElements.hasInScope(html_js_1$1.TAG_ID.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,html_js_1$1.NS.HTML)}function rtStartTagInBody(e,t){e.openElements.hasInScope(html_js_1$1.TAG_ID.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(html_js_1$1.TAG_ID.RTC),e._insertElement(t,html_js_1$1.NS.HTML)}function mathStartTagInBody(e,t){e._reconstructActiveFormattingElements(),foreignContent.adjustTokenMathMLAttrs(t),foreignContent.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,html_js_1$1.NS.MATHML):e._insertElement(t,html_js_1$1.NS.MATHML),t.ackSelfClosing=!0}function svgStartTagInBody(e,t){e._reconstructActiveFormattingElements(),foreignContent.adjustTokenSVGAttrs(t),foreignContent.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,html_js_1$1.NS.SVG):e._insertElement(t,html_js_1$1.NS.SVG),t.ackSelfClosing=!0}function genericStartTagInBody(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,html_js_1$1.NS.HTML)}function startTagInBody(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.I:case html_js_1$1.TAG_ID.S:case html_js_1$1.TAG_ID.B:case html_js_1$1.TAG_ID.U:case html_js_1$1.TAG_ID.EM:case html_js_1$1.TAG_ID.TT:case html_js_1$1.TAG_ID.BIG:case html_js_1$1.TAG_ID.CODE:case html_js_1$1.TAG_ID.FONT:case html_js_1$1.TAG_ID.SMALL:case html_js_1$1.TAG_ID.STRIKE:case html_js_1$1.TAG_ID.STRONG:bStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.A:aStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.H1:case html_js_1$1.TAG_ID.H2:case html_js_1$1.TAG_ID.H3:case html_js_1$1.TAG_ID.H4:case html_js_1$1.TAG_ID.H5:case html_js_1$1.TAG_ID.H6:numberedHeaderStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.P:case html_js_1$1.TAG_ID.DL:case html_js_1$1.TAG_ID.OL:case html_js_1$1.TAG_ID.UL:case html_js_1$1.TAG_ID.DIV:case html_js_1$1.TAG_ID.DIR:case html_js_1$1.TAG_ID.NAV:case html_js_1$1.TAG_ID.MAIN:case html_js_1$1.TAG_ID.MENU:case html_js_1$1.TAG_ID.ASIDE:case html_js_1$1.TAG_ID.CENTER:case html_js_1$1.TAG_ID.FIGURE:case html_js_1$1.TAG_ID.FOOTER:case html_js_1$1.TAG_ID.HEADER:case html_js_1$1.TAG_ID.HGROUP:case html_js_1$1.TAG_ID.DIALOG:case html_js_1$1.TAG_ID.DETAILS:case html_js_1$1.TAG_ID.ADDRESS:case html_js_1$1.TAG_ID.ARTICLE:case html_js_1$1.TAG_ID.SECTION:case html_js_1$1.TAG_ID.SUMMARY:case html_js_1$1.TAG_ID.FIELDSET:case html_js_1$1.TAG_ID.BLOCKQUOTE:case html_js_1$1.TAG_ID.FIGCAPTION:addressStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.LI:case html_js_1$1.TAG_ID.DD:case html_js_1$1.TAG_ID.DT:listItemStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.BR:case html_js_1$1.TAG_ID.IMG:case html_js_1$1.TAG_ID.WBR:case html_js_1$1.TAG_ID.AREA:case html_js_1$1.TAG_ID.EMBED:case html_js_1$1.TAG_ID.KEYGEN:areaStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.HR:hrStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.RB:case html_js_1$1.TAG_ID.RTC:rbStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.RT:case html_js_1$1.TAG_ID.RP:rtStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.PRE:case html_js_1$1.TAG_ID.LISTING:preStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.XMP:xmpStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.SVG:svgStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.HTML:htmlStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.BASE:case html_js_1$1.TAG_ID.LINK:case html_js_1$1.TAG_ID.META:case html_js_1$1.TAG_ID.STYLE:case html_js_1$1.TAG_ID.TITLE:case html_js_1$1.TAG_ID.SCRIPT:case html_js_1$1.TAG_ID.BGSOUND:case html_js_1$1.TAG_ID.BASEFONT:case html_js_1$1.TAG_ID.TEMPLATE:startTagInHead(e,t);break;case html_js_1$1.TAG_ID.BODY:bodyStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.FORM:formStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.NOBR:nobrStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.MATH:mathStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.TABLE:tableStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.INPUT:inputStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.PARAM:case html_js_1$1.TAG_ID.TRACK:case html_js_1$1.TAG_ID.SOURCE:paramStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.IMAGE:imageStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.BUTTON:buttonStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.APPLET:case html_js_1$1.TAG_ID.OBJECT:case html_js_1$1.TAG_ID.MARQUEE:appletStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.IFRAME:iframeStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.SELECT:selectStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.OPTION:case html_js_1$1.TAG_ID.OPTGROUP:optgroupStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.NOEMBED:noembedStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.FRAMESET:framesetStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.TEXTAREA:textareaStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.NOSCRIPT:e.options.scriptingEnabled?noembedStartTagInBody(e,t):genericStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.PLAINTEXT:plaintextStartTagInBody(e,t);break;case html_js_1$1.TAG_ID.COL:case html_js_1$1.TAG_ID.TH:case html_js_1$1.TAG_ID.TD:case html_js_1$1.TAG_ID.TR:case html_js_1$1.TAG_ID.HEAD:case html_js_1$1.TAG_ID.FRAME:case html_js_1$1.TAG_ID.TBODY:case html_js_1$1.TAG_ID.TFOOT:case html_js_1$1.TAG_ID.THEAD:case html_js_1$1.TAG_ID.CAPTION:case html_js_1$1.TAG_ID.COLGROUP:break;default:genericStartTagInBody(e,t)}}function bodyEndTagInBody(e,t){if(e.openElements.hasInScope(html_js_1$1.TAG_ID.BODY)&&(e.insertionMode=InsertionMode.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function htmlEndTagInBody(e,t){e.openElements.hasInScope(html_js_1$1.TAG_ID.BODY)&&(e.insertionMode=InsertionMode.AFTER_BODY,endTagAfterBody(e,t))}function addressEndTagInBody(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function formEndTagInBody(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(html_js_1$1.TAG_ID.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(html_js_1$1.TAG_ID.FORM):r&&e.openElements.remove(r))}function pEndTagInBody(e){e.openElements.hasInButtonScope(html_js_1$1.TAG_ID.P)||e._insertFakeElement(html_js_1$1.TAG_NAMES.P,html_js_1$1.TAG_ID.P),e._closePElement()}function liEndTagInBody(e){e.openElements.hasInListItemScope(html_js_1$1.TAG_ID.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(html_js_1$1.TAG_ID.LI),e.openElements.popUntilTagNamePopped(html_js_1$1.TAG_ID.LI))}function ddEndTagInBody(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function numberedHeaderEndTagInBody(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function appletEndTagInBody(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function brEndTagInBody(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(html_js_1$1.TAG_NAMES.BR,html_js_1$1.TAG_ID.BR),e.openElements.pop(),e.framesetOk=!1}function genericEndTagInBody(e,t){const r=t.tagName,n=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){const s=e.openElements.items[t],i=e.openElements.tagIDs[t];if(n===i&&(n!==html_js_1$1.TAG_ID.UNKNOWN||e.treeAdapter.getTagName(s)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(s,i))break}}function endTagInBody(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.A:case html_js_1$1.TAG_ID.B:case html_js_1$1.TAG_ID.I:case html_js_1$1.TAG_ID.S:case html_js_1$1.TAG_ID.U:case html_js_1$1.TAG_ID.EM:case html_js_1$1.TAG_ID.TT:case html_js_1$1.TAG_ID.BIG:case html_js_1$1.TAG_ID.CODE:case html_js_1$1.TAG_ID.FONT:case html_js_1$1.TAG_ID.NOBR:case html_js_1$1.TAG_ID.SMALL:case html_js_1$1.TAG_ID.STRIKE:case html_js_1$1.TAG_ID.STRONG:callAdoptionAgency(e,t);break;case html_js_1$1.TAG_ID.P:pEndTagInBody(e);break;case html_js_1$1.TAG_ID.DL:case html_js_1$1.TAG_ID.UL:case html_js_1$1.TAG_ID.OL:case html_js_1$1.TAG_ID.DIR:case html_js_1$1.TAG_ID.DIV:case html_js_1$1.TAG_ID.NAV:case html_js_1$1.TAG_ID.PRE:case html_js_1$1.TAG_ID.MAIN:case html_js_1$1.TAG_ID.MENU:case html_js_1$1.TAG_ID.ASIDE:case html_js_1$1.TAG_ID.BUTTON:case html_js_1$1.TAG_ID.CENTER:case html_js_1$1.TAG_ID.FIGURE:case html_js_1$1.TAG_ID.FOOTER:case html_js_1$1.TAG_ID.HEADER:case html_js_1$1.TAG_ID.HGROUP:case html_js_1$1.TAG_ID.DIALOG:case html_js_1$1.TAG_ID.ADDRESS:case html_js_1$1.TAG_ID.ARTICLE:case html_js_1$1.TAG_ID.DETAILS:case html_js_1$1.TAG_ID.SECTION:case html_js_1$1.TAG_ID.SUMMARY:case html_js_1$1.TAG_ID.LISTING:case html_js_1$1.TAG_ID.FIELDSET:case html_js_1$1.TAG_ID.BLOCKQUOTE:case html_js_1$1.TAG_ID.FIGCAPTION:addressEndTagInBody(e,t);break;case html_js_1$1.TAG_ID.LI:liEndTagInBody(e);break;case html_js_1$1.TAG_ID.DD:case html_js_1$1.TAG_ID.DT:ddEndTagInBody(e,t);break;case html_js_1$1.TAG_ID.H1:case html_js_1$1.TAG_ID.H2:case html_js_1$1.TAG_ID.H3:case html_js_1$1.TAG_ID.H4:case html_js_1$1.TAG_ID.H5:case html_js_1$1.TAG_ID.H6:numberedHeaderEndTagInBody(e);break;case html_js_1$1.TAG_ID.BR:brEndTagInBody(e);break;case html_js_1$1.TAG_ID.BODY:bodyEndTagInBody(e,t);break;case html_js_1$1.TAG_ID.HTML:htmlEndTagInBody(e,t);break;case html_js_1$1.TAG_ID.FORM:formEndTagInBody(e);break;case html_js_1$1.TAG_ID.APPLET:case html_js_1$1.TAG_ID.OBJECT:case html_js_1$1.TAG_ID.MARQUEE:appletEndTagInBody(e,t);break;case html_js_1$1.TAG_ID.TEMPLATE:templateEndTagInHead(e,t);break;default:genericEndTagInBody(e,t)}}function eofInBody(e,t){e.tmplInsertionModeStack.length>0?eofInTemplate(e,t):stopParsing(e,t)}function endTagInText(e,t){var r;t.tagID===html_js_1$1.TAG_ID.SCRIPT&&(null===(r=e.scriptHandler)||void 0===r||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function eofInText(e,t){e._err(t,error_codes_js_1.ERR.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function characterInTable(e,t){if(TABLE_STRUCTURE_TAGS.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=InsertionMode.IN_TABLE_TEXT,t.type){case token_js_1.TokenType.CHARACTER:characterInTableText(e,t);break;case token_js_1.TokenType.WHITESPACE_CHARACTER:whitespaceCharacterInTableText(e,t)}else tokenInTable(e,t)}function captionStartTagInTable(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,html_js_1$1.NS.HTML),e.insertionMode=InsertionMode.IN_CAPTION}function colgroupStartTagInTable(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,html_js_1$1.NS.HTML),e.insertionMode=InsertionMode.IN_COLUMN_GROUP}function colStartTagInTable(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(html_js_1$1.TAG_NAMES.COLGROUP,html_js_1$1.TAG_ID.COLGROUP),e.insertionMode=InsertionMode.IN_COLUMN_GROUP,startTagInColumnGroup(e,t)}function tbodyStartTagInTable(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,html_js_1$1.NS.HTML),e.insertionMode=InsertionMode.IN_TABLE_BODY}function tdStartTagInTable(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(html_js_1$1.TAG_NAMES.TBODY,html_js_1$1.TAG_ID.TBODY),e.insertionMode=InsertionMode.IN_TABLE_BODY,startTagInTableBody(e,t)}function tableStartTagInTable(e,t){e.openElements.hasInTableScope(html_js_1$1.TAG_ID.TABLE)&&(e.openElements.popUntilTagNamePopped(html_js_1$1.TAG_ID.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function inputStartTagInTable(e,t){isHiddenInput(t)?e._appendElement(t,html_js_1$1.NS.HTML):tokenInTable(e,t),t.ackSelfClosing=!0}function formStartTagInTable(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,html_js_1$1.NS.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function startTagInTable(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.TD:case html_js_1$1.TAG_ID.TH:case html_js_1$1.TAG_ID.TR:tdStartTagInTable(e,t);break;case html_js_1$1.TAG_ID.STYLE:case html_js_1$1.TAG_ID.SCRIPT:case html_js_1$1.TAG_ID.TEMPLATE:startTagInHead(e,t);break;case html_js_1$1.TAG_ID.COL:colStartTagInTable(e,t);break;case html_js_1$1.TAG_ID.FORM:formStartTagInTable(e,t);break;case html_js_1$1.TAG_ID.TABLE:tableStartTagInTable(e,t);break;case html_js_1$1.TAG_ID.TBODY:case html_js_1$1.TAG_ID.TFOOT:case html_js_1$1.TAG_ID.THEAD:tbodyStartTagInTable(e,t);break;case html_js_1$1.TAG_ID.INPUT:inputStartTagInTable(e,t);break;case html_js_1$1.TAG_ID.CAPTION:captionStartTagInTable(e,t);break;case html_js_1$1.TAG_ID.COLGROUP:colgroupStartTagInTable(e,t);break;default:tokenInTable(e,t)}}function endTagInTable(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.TABLE:e.openElements.hasInTableScope(html_js_1$1.TAG_ID.TABLE)&&(e.openElements.popUntilTagNamePopped(html_js_1$1.TAG_ID.TABLE),e._resetInsertionMode());break;case html_js_1$1.TAG_ID.TEMPLATE:templateEndTagInHead(e,t);break;case html_js_1$1.TAG_ID.BODY:case html_js_1$1.TAG_ID.CAPTION:case html_js_1$1.TAG_ID.COL:case html_js_1$1.TAG_ID.COLGROUP:case html_js_1$1.TAG_ID.HTML:case html_js_1$1.TAG_ID.TBODY:case html_js_1$1.TAG_ID.TD:case html_js_1$1.TAG_ID.TFOOT:case html_js_1$1.TAG_ID.TH:case html_js_1$1.TAG_ID.THEAD:case html_js_1$1.TAG_ID.TR:break;default:tokenInTable(e,t)}}function tokenInTable(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,modeInBody(e,t),e.fosterParentingEnabled=r}function whitespaceCharacterInTableText(e,t){e.pendingCharacterTokens.push(t)}function characterInTableText(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function tokenInTableText(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r0&&e.openElements.currentTagId===html_js_1$1.TAG_ID.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===html_js_1$1.TAG_ID.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===html_js_1$1.TAG_ID.OPTGROUP&&e.openElements.pop();break;case html_js_1$1.TAG_ID.OPTION:e.openElements.currentTagId===html_js_1$1.TAG_ID.OPTION&&e.openElements.pop();break;case html_js_1$1.TAG_ID.SELECT:e.openElements.hasInSelectScope(html_js_1$1.TAG_ID.SELECT)&&(e.openElements.popUntilTagNamePopped(html_js_1$1.TAG_ID.SELECT),e._resetInsertionMode());break;case html_js_1$1.TAG_ID.TEMPLATE:templateEndTagInHead(e,t)}}function startTagInSelectInTable(e,t){const r=t.tagID;r===html_js_1$1.TAG_ID.CAPTION||r===html_js_1$1.TAG_ID.TABLE||r===html_js_1$1.TAG_ID.TBODY||r===html_js_1$1.TAG_ID.TFOOT||r===html_js_1$1.TAG_ID.THEAD||r===html_js_1$1.TAG_ID.TR||r===html_js_1$1.TAG_ID.TD||r===html_js_1$1.TAG_ID.TH?(e.openElements.popUntilTagNamePopped(html_js_1$1.TAG_ID.SELECT),e._resetInsertionMode(),e._processStartTag(t)):startTagInSelect(e,t)}function endTagInSelectInTable(e,t){const r=t.tagID;r===html_js_1$1.TAG_ID.CAPTION||r===html_js_1$1.TAG_ID.TABLE||r===html_js_1$1.TAG_ID.TBODY||r===html_js_1$1.TAG_ID.TFOOT||r===html_js_1$1.TAG_ID.THEAD||r===html_js_1$1.TAG_ID.TR||r===html_js_1$1.TAG_ID.TD||r===html_js_1$1.TAG_ID.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(html_js_1$1.TAG_ID.SELECT),e._resetInsertionMode(),e.onEndTag(t)):endTagInSelect(e,t)}function startTagInTemplate(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.BASE:case html_js_1$1.TAG_ID.BASEFONT:case html_js_1$1.TAG_ID.BGSOUND:case html_js_1$1.TAG_ID.LINK:case html_js_1$1.TAG_ID.META:case html_js_1$1.TAG_ID.NOFRAMES:case html_js_1$1.TAG_ID.SCRIPT:case html_js_1$1.TAG_ID.STYLE:case html_js_1$1.TAG_ID.TEMPLATE:case html_js_1$1.TAG_ID.TITLE:startTagInHead(e,t);break;case html_js_1$1.TAG_ID.CAPTION:case html_js_1$1.TAG_ID.COLGROUP:case html_js_1$1.TAG_ID.TBODY:case html_js_1$1.TAG_ID.TFOOT:case html_js_1$1.TAG_ID.THEAD:e.tmplInsertionModeStack[0]=InsertionMode.IN_TABLE,e.insertionMode=InsertionMode.IN_TABLE,startTagInTable(e,t);break;case html_js_1$1.TAG_ID.COL:e.tmplInsertionModeStack[0]=InsertionMode.IN_COLUMN_GROUP,e.insertionMode=InsertionMode.IN_COLUMN_GROUP,startTagInColumnGroup(e,t);break;case html_js_1$1.TAG_ID.TR:e.tmplInsertionModeStack[0]=InsertionMode.IN_TABLE_BODY,e.insertionMode=InsertionMode.IN_TABLE_BODY,startTagInTableBody(e,t);break;case html_js_1$1.TAG_ID.TD:case html_js_1$1.TAG_ID.TH:e.tmplInsertionModeStack[0]=InsertionMode.IN_ROW,e.insertionMode=InsertionMode.IN_ROW,startTagInRow(e,t);break;default:e.tmplInsertionModeStack[0]=InsertionMode.IN_BODY,e.insertionMode=InsertionMode.IN_BODY,startTagInBody(e,t)}}function endTagInTemplate(e,t){t.tagID===html_js_1$1.TAG_ID.TEMPLATE&&templateEndTagInHead(e,t)}function eofInTemplate(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(html_js_1$1.TAG_ID.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):stopParsing(e,t)}function startTagAfterBody(e,t){t.tagID===html_js_1$1.TAG_ID.HTML?startTagInBody(e,t):tokenAfterBody(e,t)}function endTagAfterBody(e,t){var r;if(t.tagID===html_js_1$1.TAG_ID.HTML){if(e.fragmentContext||(e.insertionMode=InsertionMode.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===html_js_1$1.TAG_ID.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(null===(r=e.treeAdapter.getNodeSourceCodeLocation(n))||void 0===r?void 0:r.endTag)&&e._setEndLocation(n,t)}}else tokenAfterBody(e,t)}function tokenAfterBody(e,t){e.insertionMode=InsertionMode.IN_BODY,modeInBody(e,t)}function startTagInFrameset(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.HTML:startTagInBody(e,t);break;case html_js_1$1.TAG_ID.FRAMESET:e._insertElement(t,html_js_1$1.NS.HTML);break;case html_js_1$1.TAG_ID.FRAME:e._appendElement(t,html_js_1$1.NS.HTML),t.ackSelfClosing=!0;break;case html_js_1$1.TAG_ID.NOFRAMES:startTagInHead(e,t)}}function endTagInFrameset(e,t){t.tagID!==html_js_1$1.TAG_ID.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===html_js_1$1.TAG_ID.FRAMESET||(e.insertionMode=InsertionMode.AFTER_FRAMESET))}function startTagAfterFrameset(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.HTML:startTagInBody(e,t);break;case html_js_1$1.TAG_ID.NOFRAMES:startTagInHead(e,t)}}function endTagAfterFrameset(e,t){t.tagID===html_js_1$1.TAG_ID.HTML&&(e.insertionMode=InsertionMode.AFTER_AFTER_FRAMESET)}function startTagAfterAfterBody(e,t){t.tagID===html_js_1$1.TAG_ID.HTML?startTagInBody(e,t):tokenAfterAfterBody(e,t)}function tokenAfterAfterBody(e,t){e.insertionMode=InsertionMode.IN_BODY,modeInBody(e,t)}function startTagAfterAfterFrameset(e,t){switch(t.tagID){case html_js_1$1.TAG_ID.HTML:startTagInBody(e,t);break;case html_js_1$1.TAG_ID.NOFRAMES:startTagInHead(e,t)}}function nullCharacterInForeignContent(e,t){t.chars=unicode.REPLACEMENT_CHARACTER,e._insertCharacters(t)}function characterInForeignContent(e,t){e._insertCharacters(t),e.framesetOk=!1}function popUntilHtmlOrIntegrationPoint(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==html_js_1$1.NS.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function startTagInForeignContent(e,t){if(foreignContent.causesExit(t))popUntilHtmlOrIntegrationPoint(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===html_js_1$1.NS.MATHML?foreignContent.adjustTokenMathMLAttrs(t):n===html_js_1$1.NS.SVG&&(foreignContent.adjustTokenSVGTagName(t),foreignContent.adjustTokenSVGAttrs(t)),foreignContent.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function endTagInForeignContent(e,t){if(t.tagID===html_js_1$1.TAG_ID.P||t.tagID===html_js_1$1.TAG_ID.BR)return popUntilHtmlOrIntegrationPoint(e),void e._endTagOutsideForeignContent(t);for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===html_js_1$1.NS.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(n);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(r);break}}}var serializer={};Object.defineProperty(serializer,"__esModule",{value:!0}),serializer.serializeOuter=serializer.serialize=void 0;const html_js_1=html,escape_js_1=_escape,default_js_1=_default,VOID_ELEMENTS=new Set([html_js_1.TAG_NAMES.AREA,html_js_1.TAG_NAMES.BASE,html_js_1.TAG_NAMES.BASEFONT,html_js_1.TAG_NAMES.BGSOUND,html_js_1.TAG_NAMES.BR,html_js_1.TAG_NAMES.COL,html_js_1.TAG_NAMES.EMBED,html_js_1.TAG_NAMES.FRAME,html_js_1.TAG_NAMES.HR,html_js_1.TAG_NAMES.IMG,html_js_1.TAG_NAMES.INPUT,html_js_1.TAG_NAMES.KEYGEN,html_js_1.TAG_NAMES.LINK,html_js_1.TAG_NAMES.META,html_js_1.TAG_NAMES.PARAM,html_js_1.TAG_NAMES.SOURCE,html_js_1.TAG_NAMES.TRACK,html_js_1.TAG_NAMES.WBR]);function isVoidElement(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===html_js_1.NS.HTML&&VOID_ELEMENTS.has(t.treeAdapter.getTagName(e))}const defaultOpts={treeAdapter:default_js_1.defaultTreeAdapter,scriptingEnabled:!0};function serialize(e,t){const r=Object.assign(Object.assign({},defaultOpts),t);return isVoidElement(e,r)?"":serializeChildNodes(e,r)}function serializeOuter(e,t){return serializeNode(e,Object.assign(Object.assign({},defaultOpts),t))}function serializeChildNodes(e,t){let r="";const n=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===html_js_1.TAG_NAMES.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===html_js_1.NS.HTML?t.treeAdapter.getTemplateContent(e):e,s=t.treeAdapter.getChildNodes(n);if(s)for(const e of s)r+=serializeNode(e,t);return r}function serializeNode(e,t){return t.treeAdapter.isElementNode(e)?serializeElement(e,t):t.treeAdapter.isTextNode(e)?serializeTextNode(e,t):t.treeAdapter.isCommentNode(e)?serializeCommentNode(e,t):t.treeAdapter.isDocumentTypeNode(e)?serializeDocumentTypeNode(e,t):""}function serializeElement(e,t){const r=t.treeAdapter.getTagName(e);return`<${r}${serializeAttributes(e,t)}>${isVoidElement(e,t)?"":`${serializeChildNodes(e,t)}`}`}function serializeAttributes(e,{treeAdapter:t}){let r="";for(const n of t.getAttrList(e)){if(r+=" ",n.namespace)switch(n.namespace){case html_js_1.NS.XML:r+=`xml:${n.name}`;break;case html_js_1.NS.XMLNS:"xmlns"!==n.name&&(r+="xmlns:"),r+=n.name;break;case html_js_1.NS.XLINK:r+=`xlink:${n.name}`;break;default:r+=`${n.prefix}:${n.name}`}else r+=n.name;r+=`="${(0,escape_js_1.escapeAttribute)(n.value)}"`}return r}function serializeTextNode(e,t){const{treeAdapter:r}=t,n=r.getTextNodeContent(e),s=r.getParentNode(e),i=s&&r.isElementNode(s)&&r.getTagName(s);return i&&r.getNamespaceURI(s)===html_js_1.NS.HTML&&(0,html_js_1.hasUnescapedText)(i,t.scriptingEnabled)?n:(0,escape_js_1.escapeText)(n)}function serializeCommentNode(e,{treeAdapter:t}){return`\x3c!--${t.getCommentNodeContent(e)}--\x3e`}function serializeDocumentTypeNode(e,{treeAdapter:t}){return``}serializer.serialize=serialize,serializer.serializeOuter=serializeOuter,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseFragment=e.parse=e.TokenizerMode=e.Tokenizer=e.Token=e.html=e.foreignContent=e.ErrorCodes=e.serializeOuter=e.serialize=e.Parser=e.defaultTreeAdapter=void 0;const t=parser;var r=_default;Object.defineProperty(e,"defaultTreeAdapter",{enumerable:!0,get:function(){return r.defaultTreeAdapter}});var n=parser;Object.defineProperty(e,"Parser",{enumerable:!0,get:function(){return n.Parser}});var s=serializer;Object.defineProperty(e,"serialize",{enumerable:!0,get:function(){return s.serialize}}),Object.defineProperty(e,"serializeOuter",{enumerable:!0,get:function(){return s.serializeOuter}});var i=errorCodes;Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:function(){return i.ERR}}),e.foreignContent=foreignContent$1,e.html=html,e.Token=token;var a=tokenizer;Object.defineProperty(e,"Tokenizer",{enumerable:!0,get:function(){return a.Tokenizer}}),Object.defineProperty(e,"TokenizerMode",{enumerable:!0,get:function(){return a.TokenizerMode}}),e.parse=function(e,r){return t.Parser.parse(e,r)},e.parseFragment=function(e,r,n){"string"==typeof e&&(n=r,r=e,e=null);const s=t.Parser.getFragmentParser(e,n);return s.tokenizer.write(r,!0),s.getFragment()}}(cjs$1);var cjs={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.adapter=e.serializeDoctypeContent=void 0;const t=cjs$1,r=lib$7;function n(e){return new r.Text(e)}function s(e){const t=e.includes('"')?"'":'"';return t+e+t}function i(e,t,r){let n="!DOCTYPE ";return e&&(n+=e),t?n+=` PUBLIC ${s(t)}`:r&&(n+=" SYSTEM"),r&&(n+=` ${s(r)}`),n}e.serializeDoctypeContent=i,e.adapter={isCommentNode:r.isComment,isElementNode:r.isTag,isTextNode:r.isText,createDocument(){const e=new r.Document([]);return e["x-mode"]=t.html.DOCUMENT_MODE.NO_QUIRKS,e},createDocumentFragment:()=>new r.Document([]),createElement(e,t,n){const s=Object.create(null),i=Object.create(null),a=Object.create(null);for(let e=0;enew r.Comment(e),appendChild(e,t){const r=e.children[e.children.length-1];r&&(r.next=t,t.prev=r),e.children.push(t),t.parent=e},insertBefore(e,t,r){const n=e.children.indexOf(r),{prev:s}=r;s&&(s.next=t,t.prev=s),r.prev=t,t.next=r,e.children.splice(n,0,t),t.parent=e},setTemplateContent(t,r){e.adapter.appendChild(t,r)},getTemplateContent:e=>e.children[0],setDocumentType(t,n,s,a){const o=i(n,s,a);let c=t.children.find((e=>(0,r.isDirective)(e)&&"!doctype"===e.name));c?c.data=null!=o?o:null:(c=new r.ProcessingInstruction("!doctype",o),e.adapter.appendChild(t,c)),c["x-name"]=null!=n?n:void 0,c["x-publicId"]=null!=s?s:void 0,c["x-systemId"]=null!=a?a:void 0},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode:e=>e["x-mode"],detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:r,next:n}=e;e.prev=null,e.next=null,r&&(r.next=n),n&&(n.prev=r),e.parent.children.splice(t,1),e.parent=null}},insertText(t,s){const i=t.children[t.children.length-1];i&&(0,r.isText)(i)?i.data+=s:e.adapter.appendChild(t,n(s))},insertTextBefore(t,s,i){const a=t.children[t.children.indexOf(i)-1];a&&(0,r.isText)(a)?a.data+=s:e.adapter.insertBefore(t,n(s),i)},adoptAttributes(e,t){for(let r=0;re.children[0],getChildNodes:e=>e.children,getParentNode:e=>e.parent,getAttrList:e=>e.attributes,getTagName:e=>e.name,getNamespaceURI:e=>e.namespace,getTextNodeContent:e=>e.data,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName(e){var t;return null!==(t=e["x-name"])&&void 0!==t?t:""},getDocumentTypeNodePublicId(e){var t;return null!==(t=e["x-publicId"])&&void 0!==t?t:""},getDocumentTypeNodeSystemId(e){var t;return null!==(t=e["x-systemId"])&&void 0!==t?t:""},isDocumentTypeNode:e=>(0,r.isDirective)(e)&&"!doctype"===e.name,setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){null!=t.endOffset&&(e.endIndex=t.endOffset),e.sourceCodeLocation=Object.assign(Object.assign({},e.sourceCodeLocation),t)}}}(cjs);var __spreadArray=commonjsGlobal&&commonjsGlobal.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,s=0,i=t.length;s=t.Zero&&e<=t.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(t||(t={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(r||(r={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(n=e.QuoteType||(e.QuoteType={}));var c={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])},l=function(){function e(e,t){var n=e.xmlMode,i=void 0!==n&&n,a=e.decodeEntities,o=void 0===a||a;this.cbs=t,this.state=r.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=r.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=i,this.decodeEntities=o,this.entityTrie=i?s.xmlDecodeTree:s.htmlDecodeTree}return e.prototype.reset=function(){this.state=r.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=r.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=r.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===t.Amp&&(this.state=r.BeforeEntity)},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?a(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=r.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===t.Gt||i(e)){var n=this.index-this.currentSequence.length;if(this.sectionStart=t.LowerA&&e<=t.LowerZ||e>=t.UpperA&&e<=t.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=r.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===t.ExclamationMark)this.state=r.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===t.Questionmark)this.state=r.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var n=32|e;this.sectionStart=this.index,this.xmlMode||n!==c.TitleEnd[2]?this.state=this.xmlMode||n!==c.ScriptEnd[2]?r.InTagName:r.BeforeSpecialS:this.startSpecial(c.TitleEnd,3)}else e===t.Slash?this.state=r.BeforeClosingTagName:(this.state=r.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){a(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=r.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){i(e)||(e===t.Gt?this.state=r.Text:(this.state=this.isTagStartChar(e)?r.InClosingTagName:r.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===t.Gt||i(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=r.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===t.Gt||this.fastForwardTo(t.Gt))&&(this.state=r.Text,this.baseState=r.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===t.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=r.InSpecialTag,this.sequenceIndex=0):this.state=r.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===t.Slash?this.state=r.InSelfClosingTag:i(e)||(this.state=r.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===t.Gt?(this.cbs.onselfclosingtag(this.index),this.state=r.Text,this.baseState=r.Text,this.sectionStart=this.index+1,this.isSpecial=!1):i(e)||(this.state=r.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===t.Eq||a(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=r.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===t.Eq?this.state=r.BeforeAttributeValue:e===t.Slash||e===t.Gt?(this.cbs.onattribend(n.NoValue,this.index),this.state=r.BeforeAttributeName,this.stateBeforeAttributeName(e)):i(e)||(this.cbs.onattribend(n.NoValue,this.index),this.state=r.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===t.DoubleQuote?(this.state=r.InAttributeValueDq,this.sectionStart=this.index+1):e===t.SingleQuote?(this.state=r.InAttributeValueSq,this.sectionStart=this.index+1):i(e)||(this.sectionStart=this.index,this.state=r.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,s){e===s||!this.decodeEntities&&this.fastForwardTo(s)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(s===t.DoubleQuote?n.Double:n.Single,this.index),this.state=r.BeforeAttributeName):this.decodeEntities&&e===t.Amp&&(this.baseState=this.state,this.state=r.BeforeEntity)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,t.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,t.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){i(e)||e===t.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n.Unquoted,this.index),this.state=r.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===t.Amp&&(this.baseState=this.state,this.state=r.BeforeEntity)},e.prototype.stateBeforeDeclaration=function(e){e===t.OpeningSquareBracket?(this.state=r.CDATASequence,this.sequenceIndex=0):this.state=e===t.Dash?r.BeforeComment:r.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===t.Gt||this.fastForwardTo(t.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=r.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===t.Gt||this.fastForwardTo(t.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=r.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===t.Dash?(this.state=r.InCommentLike,this.currentSequence=c.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=r.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===t.Gt||this.fastForwardTo(t.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=r.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===c.ScriptEnd[3]?this.startSpecial(c.ScriptEnd,4):t===c.StyleEnd[3]?this.startSpecial(c.StyleEnd,4):(this.state=r.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeEntity=function(e){this.entityExcess=1,this.entityResult=0,e===t.Number?this.state=r.BeforeNumericEntity:e===t.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=r.InNamedEntity,this.stateInNamedEntity(e))},e.prototype.stateInNamedEntity=function(e){if(this.entityExcess+=1,this.trieIndex=(0,s.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];var r=this.trieCurrent&s.BinTrieFlags.VALUE_LENGTH;if(r){var n=(r>>14)-1;if(this.allowLegacyEntity()||e===t.Semi){var i=this.index-this.entityExcess+1;i>this.sectionStart&&this.emitPartial(this.sectionStart,i),this.entityResult=this.trieIndex,this.trieIndex+=n,this.entityExcess=0,this.sectionStart=this.index+1,0===n&&this.emitNamedEntity()}else this.trieIndex+=n}},e.prototype.emitNamedEntity=function(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&s.BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~s.BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}},e.prototype.stateBeforeNumericEntity=function(e){(32|e)===t.LowerX?(this.entityExcess++,this.state=r.InHexEntity):(this.state=r.InNumericEntity,this.stateInNumericEntity(e))},e.prototype.emitNumericEntity=function(e){var t=this.index-this.entityExcess-1;t+2+Number(this.state===r.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint((0,s.replaceCodePoint)(this.entityResult))),this.state=this.baseState},e.prototype.stateInNumericEntity=function(e){e===t.Semi?this.emitNumericEntity(!0):o(e)?(this.entityResult=10*this.entityResult+(e-t.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.stateInHexEntity=function(e){e===t.Semi?this.emitNumericEntity(!0):o(e)?(this.entityResult=16*this.entityResult+(e-t.Zero),this.entityExcess++):!function(e){return e>=t.UpperA&&e<=t.UpperF||e>=t.LowerA&&e<=t.LowerF}(e)?(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--):(this.entityResult=16*this.entityResult+((32|e)-t.LowerA+10),this.entityExcess++)},e.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===r.Text||this.baseState===r.InSpecialTag)},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===r.Text||this.state===r.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==r.InAttributeValueDq&&this.state!==r.InAttributeValueSq&&this.state!==r.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index0&&i.has(this.stack[this.stack.length-1]);){var a=this.stack.pop();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,a,!0)}this.isVoidElement(e)||(this.stack.push(e),foreignContextElements.has(e)?this.foreignContext.push(!0):htmlIntegrationElements.has(e)&&this.foreignContext.push(!1)),null===(s=(n=this.cbs).onopentagname)||void 0===s||s.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var r,n,s,i,a,o;this.endIndex=t;var c=this.getSlice(e,t);if(this.lowerCaseTagNames&&(c=c.toLowerCase()),(foreignContextElements.has(c)||htmlIntegrationElements.has(c))&&this.foreignContext.pop(),this.isVoidElement(c))this.options.xmlMode||"br"!==c||(null===(n=(r=this.cbs).onopentagname)||void 0===n||n.call(r,"br"),null===(i=(s=this.cbs).onopentag)||void 0===i||i.call(s,"br",{},!0),null===(o=(a=this.cbs).onclosetag)||void 0===o||o.call(a,"br",!1));else{var l=this.stack.lastIndexOf(c);if(-1!==l)if(this.cbs.onclosetag)for(var _=this.stack.length-l;_--;)this.cbs.onclosetag(this.stack.pop(),0!==_);else this.stack.length=l;else this.options.xmlMode||"p"!==c||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.pop())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,decode_js_1.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===Tokenizer_js_1.QuoteType.Double?'"':e===Tokenizer_js_1.QuoteType.Single?"'":e===Tokenizer_js_1.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(reNameEnd),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,s,i,a;this.endIndex=t,null===(s=(n=this.cbs).oncomment)||void 0===s||s.call(n,this.getSlice(e,t-r)),null===(a=(i=this.cbs).oncommentend)||void 0===a||a.call(i),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){var n,s,i,a,o,c,l,_,u,d;this.endIndex=t;var h=this.getSlice(e,t-r);this.options.xmlMode||this.options.recognizeCDATA?(null===(s=(n=this.cbs).oncdatastart)||void 0===s||s.call(n),null===(a=(i=this.cbs).ontext)||void 0===a||a.call(i,h),null===(c=(o=this.cbs).oncdataend)||void 0===c||c.call(o)):(null===(_=(l=this.cbs).oncomment)||void 0===_||_.call(l,"[CDATA[".concat(h,"]]")),null===(d=(u=this.cbs).oncommentend)||void 0===d||d.call(u)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,r,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(n=(r=this.cbs).onparserinit)||void 0===n||n.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.getSlice=function(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex>>2]>>>24-i%4*8&255;t[n+i>>>2]|=a<<24-(n+i)%4*8}else for(var o=0;o>>2]=r[o>>>2];return this.sigBytes+=s,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-s%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},u=l.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],s=0;s>>2]>>>24-s%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},d=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},h=a.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,s=n.words,i=n.sigBytes,a=this.blockSize,o=i/(4*a),l=(o=t?e.ceil(o):e.max((0|o)-this._minBufferSize,0))*a,_=e.min(4*l,i);if(l){for(var u=0;u>>6-a%4*2;s[i>>>2]|=o<<24-i%4*8,i++}return r.create(s,i)}t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var s=[],i=0;i>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,o=0;o<4&&i+.75*o>>6*(3-o)&63));var c=n.charAt(64);if(c)for(;s.length%4;)s.push(c);return s.join("")},parse:function(e){var t=e.length,r=this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var i=0;i>>24)|4278255360&(s<<24|s>>>8)}var i=this._hash.words,a=e[t+0],c=e[t+1],h=e[t+2],T=e[t+3],p=e[t+4],m=e[t+5],f=e[t+6],E=e[t+7],A=e[t+8],I=e[t+9],g=e[t+10],S=e[t+11],D=e[t+12],C=e[t+13],N=e[t+14],b=e[t+15],O=i[0],y=i[1],R=i[2],v=i[3];O=l(O,y,R,v,a,7,o[0]),v=l(v,O,y,R,c,12,o[1]),R=l(R,v,O,y,h,17,o[2]),y=l(y,R,v,O,T,22,o[3]),O=l(O,y,R,v,p,7,o[4]),v=l(v,O,y,R,m,12,o[5]),R=l(R,v,O,y,f,17,o[6]),y=l(y,R,v,O,E,22,o[7]),O=l(O,y,R,v,A,7,o[8]),v=l(v,O,y,R,I,12,o[9]),R=l(R,v,O,y,g,17,o[10]),y=l(y,R,v,O,S,22,o[11]),O=l(O,y,R,v,D,7,o[12]),v=l(v,O,y,R,C,12,o[13]),R=l(R,v,O,y,N,17,o[14]),O=_(O,y=l(y,R,v,O,b,22,o[15]),R,v,c,5,o[16]),v=_(v,O,y,R,f,9,o[17]),R=_(R,v,O,y,S,14,o[18]),y=_(y,R,v,O,a,20,o[19]),O=_(O,y,R,v,m,5,o[20]),v=_(v,O,y,R,g,9,o[21]),R=_(R,v,O,y,b,14,o[22]),y=_(y,R,v,O,p,20,o[23]),O=_(O,y,R,v,I,5,o[24]),v=_(v,O,y,R,N,9,o[25]),R=_(R,v,O,y,T,14,o[26]),y=_(y,R,v,O,A,20,o[27]),O=_(O,y,R,v,C,5,o[28]),v=_(v,O,y,R,h,9,o[29]),R=_(R,v,O,y,E,14,o[30]),O=u(O,y=_(y,R,v,O,D,20,o[31]),R,v,m,4,o[32]),v=u(v,O,y,R,A,11,o[33]),R=u(R,v,O,y,S,16,o[34]),y=u(y,R,v,O,N,23,o[35]),O=u(O,y,R,v,c,4,o[36]),v=u(v,O,y,R,p,11,o[37]),R=u(R,v,O,y,E,16,o[38]),y=u(y,R,v,O,g,23,o[39]),O=u(O,y,R,v,C,4,o[40]),v=u(v,O,y,R,a,11,o[41]),R=u(R,v,O,y,T,16,o[42]),y=u(y,R,v,O,f,23,o[43]),O=u(O,y,R,v,I,4,o[44]),v=u(v,O,y,R,D,11,o[45]),R=u(R,v,O,y,b,16,o[46]),O=d(O,y=u(y,R,v,O,h,23,o[47]),R,v,a,6,o[48]),v=d(v,O,y,R,E,10,o[49]),R=d(R,v,O,y,N,15,o[50]),y=d(y,R,v,O,m,21,o[51]),O=d(O,y,R,v,D,6,o[52]),v=d(v,O,y,R,T,10,o[53]),R=d(R,v,O,y,g,15,o[54]),y=d(y,R,v,O,c,21,o[55]),O=d(O,y,R,v,A,6,o[56]),v=d(v,O,y,R,b,10,o[57]),R=d(R,v,O,y,f,15,o[58]),y=d(y,R,v,O,C,21,o[59]),O=d(O,y,R,v,p,6,o[60]),v=d(v,O,y,R,S,10,o[61]),R=d(R,v,O,y,h,15,o[62]),y=d(y,R,v,O,I,21,o[63]),i[0]=i[0]+O|0,i[1]=i[1]+y|0,i[2]=i[2]+R|0,i[3]=i[3]+v|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,s=8*e.sigBytes;r[s>>>5]|=128<<24-s%32;var i=t.floor(n/4294967296),a=n;r[15+(s+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),r[14+(s+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(r.length+1),this._process();for(var o=this._hash,c=o.words,l=0;l<4;l++){var _=c[l];c[l]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8)}return o},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,r,n,s,i,a){var o=e+(t&r|~t&n)+s+a;return(o<>>32-i)+t}function _(e,t,r,n,s,i,a){var o=e+(t&n|r&~n)+s+a;return(o<>>32-i)+t}function u(e,t,r,n,s,i,a){var o=e+(t^r^n)+s+a;return(o<>>32-i)+t}function d(e,t,r,n,s,i,a){var o=e+(r^(t|~n))+s+a;return(o<>>32-i)+t}r.MD5=i._createHelper(c),r.HmacMD5=i._createHmacHelper(c)}(Math),e.MD5}(coreExports)),md5.exports}var evpkdf={exports:{}},sha1={exports:{}},hasRequiredSha1;function requireSha1(){return hasRequiredSha1||(hasRequiredSha1=1,sha1.exports=function(e){return r=(t=e).lib,n=r.WordArray,s=r.Hasher,i=t.algo,a=[],o=i.SHA1=s.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],s=r[1],i=r[2],o=r[3],c=r[4],l=0;l<80;l++){if(l<16)a[l]=0|e[t+l];else{var _=a[l-3]^a[l-8]^a[l-14]^a[l-16];a[l]=_<<1|_>>>31}var u=(n<<5|n>>>27)+c+a[l];u+=l<20?1518500249+(s&i|~s&o):l<40?1859775393+(s^i^o):l<60?(s&i|s&o|i&o)-1894007588:(s^i^o)-899497514,c=o,o=i,i=s<<30|s>>>2,s=n,n=u}r[0]=r[0]+n|0,r[1]=r[1]+s|0,r[2]=r[2]+i|0,r[3]=r[3]+o|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=s._createHelper(o),t.HmacSHA1=s._createHmacHelper(o),e.SHA1;var t,r,n,s,i,a,o}(coreExports)),sha1.exports}var hmac={exports:{}},hasRequiredHmac,hasRequiredEvpkdf;function requireHmac(){return hasRequiredHmac||(hasRequiredHmac=1,hmac.exports=function(e){var t,r,n;r=(t=e).lib.Base,n=t.enc.Utf8,t.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,s=4*r;t.sigBytes>s&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),o=i.words,c=a.words,l=0;l>>2];e.sigBytes-=t}};n.BlockCipher=_.extend({cfg:_.cfg.extend({mode:h,padding:T}),reset:function(){var e;_.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var p=n.CipherParams=s.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),m=(r.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?i.create([1398893684,1701076831]).concat(r).concat(t):t).toString(c)},parse:function(e){var t,r=c.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=i.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),p.create({ciphertext:r,salt:t})}},f=n.SerializableCipher=s.extend({cfg:s.extend({format:m}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var s=e.createEncryptor(r,n),i=s.finalize(t),a=s.cfg;return p.create({ciphertext:i,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),E=(r.kdf={}).OpenSSL={execute:function(e,t,r,n,s){if(n||(n=i.random(8)),s)a=l.create({keySize:t+r,hasher:s}).compute(e,n);else var a=l.create({keySize:t+r}).compute(e,n);var o=i.create(a.words.slice(t),4*r);return a.sigBytes=4*t,p.create({key:a,iv:o,salt:n})}},A=n.PasswordBasedCipher=f.extend({cfg:f.cfg.extend({kdf:E}),encrypt:function(e,t,r,n){var s=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=s.iv;var i=f.encrypt.call(this,e,t,s.key,n);return i.mixIn(s),i},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var s=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=s.iv,f.decrypt.call(this,e,t,s.key,n)}})}()}(coreExports,requireEvpkdf())),cipherCore.exports}aes.exports=function(e){return function(){var t=e,r=t.lib.BlockCipher,n=t.algo,s=[],i=[],a=[],o=[],c=[],l=[],_=[],u=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var T=n^n<<1^n<<2^n<<3^n<<4;T=T>>>8^255&T^99,s[r]=T,i[T]=r;var p=e[r],m=e[p],f=e[m],E=257*e[T]^16843008*T;a[r]=E<<24|E>>>8,o[r]=E<<16|E>>>16,c[r]=E<<8|E>>>24,l[r]=E,E=16843009*f^65537*m^257*p^16843008*r,_[T]=E<<24|E>>>8,u[T]=E<<16|E>>>16,d[T]=E<<8|E>>>24,h[T]=E,r?(r=p^e[e[e[f^p]]],n^=e[e[n]]):r=n=1}}();var T=[0,1,2,4,8,16,32,64,128,27,54],p=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),i=this._keySchedule=[],a=0;a6&&a%r==4&&(l=s[l>>>24]<<24|s[l>>>16&255]<<16|s[l>>>8&255]<<8|s[255&l]):(l=s[(l=l<<8|l>>>24)>>>24]<<24|s[l>>>16&255]<<16|s[l>>>8&255]<<8|s[255&l],l^=T[a/r|0]<<24),i[a]=i[a-r]^l);for(var o=this._invKeySchedule=[],c=0;c>>24]]^u[s[l>>>16&255]]^d[s[l>>>8&255]]^h[s[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,o,c,l,s)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,_,u,d,h,i),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,s,i,a,o){for(var c=this._nRounds,l=e[t]^r[0],_=e[t+1]^r[1],u=e[t+2]^r[2],d=e[t+3]^r[3],h=4,T=1;T>>24]^s[_>>>16&255]^i[u>>>8&255]^a[255&d]^r[h++],m=n[_>>>24]^s[u>>>16&255]^i[d>>>8&255]^a[255&l]^r[h++],f=n[u>>>24]^s[d>>>16&255]^i[l>>>8&255]^a[255&_]^r[h++],E=n[d>>>24]^s[l>>>16&255]^i[_>>>8&255]^a[255&u]^r[h++];l=p,_=m,u=f,d=E}p=(o[l>>>24]<<24|o[_>>>16&255]<<16|o[u>>>8&255]<<8|o[255&d])^r[h++],m=(o[_>>>24]<<24|o[u>>>16&255]<<16|o[d>>>8&255]<<8|o[255&l])^r[h++],f=(o[u>>>24]<<24|o[d>>>16&255]<<16|o[l>>>8&255]<<8|o[255&_])^r[h++],E=(o[d>>>24]<<24|o[l>>>16&255]<<16|o[_>>>8&255]<<8|o[255&u])^r[h++],e[t]=p,e[t+1]=m,e[t+2]=f,e[t+3]=E},keySize:8});t.AES=r._createHelper(p)}(),e.AES}(coreExports,requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore());var libTypedarrays={exports:{}};libTypedarrays.exports=function(e){return function(){if("function"==typeof ArrayBuffer){var t=e.lib.WordArray,r=t.init,n=t.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,n=[],s=0;s>>2]|=e[s]<<24-s%4*8;r.call(this,n,t)}else r.apply(this,arguments)};n.prototype=t}}(),e.lib.WordArray}(coreExports);var padNopadding={exports:{}};padNopadding.exports=function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding}(coreExports,requireCipherCore());const SCRIPTNAME="黑料不打烊",SCRIPTCODE="HLBDY",NAMESPACE="ONZ3V",NAV_URL="https://155.fun/",CATEGORY={"最新黑料":0,"今日黑料":6,"今日热搜":7,"热门大瓜":8,"网红乱象":1,"原创社区":13,"独家爆料":9},store=new Store(NAMESPACE),logger=new Logger(SCRIPTNAME,jsonParse(isNode$1()?process.env[`${SCRIPTCODE}_DEBUG`]:store.get(`${SCRIPTCODE.toLowerCase()}_debug`))?"debug":"info");logger.debug(`🔰 当前脚本为: ${SCRIPTNAME}, 开启调试模式`);const USER_SELECT=jsonParse(isNode$1()?process.env[`${SCRIPTCODE}_TYPE`]:store.get(`${SCRIPTCODE.toLowerCase()}_type`))||"最新黑料";logger.debug(`🔰 当前分类为: ${USER_SELECT}`);const NOTIFY_TYPE=Number(isNode$1()?process.env[`${SCRIPTCODE}_NOTIFY_TYPE`]:store.get(`${SCRIPTCODE.toLowerCase()}_notify_type`))||0;logger.debug("🔰 通知类型: "+(1==NOTIFY_TYPE?"单独通知":"组合通知"));const filterByDiff=(e,t)=>{const r=new Date;return e.map((e=>{const t=new Date(e.date),n=Math.floor((r-t)/864e5);return{...e,diff:n}})).filter((e=>e.diff<=t)).sort(((e,t)=>e.diff-t.diff))};function decryptImage(e){const t=CryptoJS.enc.Utf8.parse("f5d965df75336270"),r=CryptoJS.enc.Utf8.parse("97b60394abc2fbe1");return CryptoJS.AES.decrypt(e,t,{iv:r,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.NoPadding}).toString(CryptoJS.enc.Base64)}class Heiliao{constructor(e){this.key=CATEGORY[e]||0}async getBaseUrl(){const{body:e}=await request(NAV_URL),t=cheerio.load(e);this.baseURL=t(".box-wrap a").toArray().map((e=>({link:t(e).attr("href"),title:t(e).find("p").first().text()}))).find((e=>e.title.includes("入口")))?.link}getUrl=()=>combineURLs(this.baseURL,0===this.key?"":`category/${this.key}.html`);async getList(){const{body:e}=await request(this.getUrl()),t=cheerio.load(e);this.list=t(".cursor-pointer").toArray().map((e=>{const r=t(e),n=r.find(".title").text().trim(),s=r.find("img").attr("onload")?.match(/'(.*?)'/)?.[1],i=r.find(".ishot").text().trim(),a=r.attr("href");return{title:n,link:combineURLs(this.baseURL,a),status:i,fakeThumb:s}})).filter((e=>e.link&&e.title&&e.fakeThumb)).slice(0,10)}async getDate(e){const{body:t}=await request(e),r=cheerio.load(t);r(".detail-title").text().trim();const n=r(".detail-page .detail-date .detail-txt").text()?.match(/(\d{4})年(\d{1,2})月(\d{1,2})日/)?.slice(1)?.join("-");return n}async getImage(e){try{const t=await request({url:e,"binary-mode":1});let r;r=isNode$1()||isQuanX()?t.rawBody:t.body;const n=decryptImage(CryptoJS.enc.Base64.stringify(CryptoJS.lib.WordArray.create(r)));let s="jpeg";e.endsWith(".png")?s="png":e.endsWith(".gif")?s="gif":e.endsWith(".jpg")&&(s="jpeg");return"data:image/"+s+";base64,"+n}catch(e){logger.error(`🔴 获取${this.list[i].title}真实图片失败: ${e}`)}}}async function showNotice(){console.log("==============📣免责声明📣=============="),console.log("1. 本脚本仅用于学习研究,禁止用于商业用途"),console.log("2. 本脚本不保证准确性、可靠性、完整性和及时性"),console.log("3. 任何个人或组织均可无需经过通知而自由使用"),console.log("4. 作者对任何脚本问题概不负责,包括由此产生的任何损失"),console.log("5. 如果任何单位或个人认为该脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明、所有权证明,我将在收到认证文件确认后删除"),console.log("6. 请勿将本脚本用于商业用途,由此引起的问题与作者无关"),console.log("7. 本脚本及其更新版权归作者所有"),console.log("")}async function showMsg(e,t,r,n){if(isNode$1()){const s=[r],i=n?.["open-url"]||n?.openUrl||n?.$open||n?.url,a=n?.["media-url"]||n?.mediaUrl||n?.$media;i&&s.push(`🔗打开链接: ${i}`),a&&s.push(`📷媒体链接: ${a}`),console.log(`==============📣消息通知📣==============\n${e}\n${t}\n${s.join("\n")}`);try{await useNotify().sendNotify(`${e}\n${t}`,s.join("\n"))}catch(e){logger.error("请检查sendNotify.js的与当前脚本的相对位置!")}}else notify(e,t,r,n)}(async()=>{await showNotice();const e=new Heiliao(USER_SELECT);await e.getBaseUrl(),logger.debug(`获取最新链接成功: ${e.baseURL}`),await e.getList(),logger.debug(`获取到${e.list.length}条数据`);for(let t=0;te.date)),3);if(logger.debug(`列表[${e.list.length}]条信息过滤成功,剩余${t.length}条`),e?.list?.length){const t=[];for(let r=0;rlogger.error(e))).finally((()=>done({ok:1})));