zen-code 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/app.js +3 -3
  2. package/dist/{chunk-6saqxa3z.js → chunk-0p3df51n.js} +1 -1
  3. package/dist/{chunk-78ksrp8v.js → chunk-0pzpg2ra.js} +2 -2
  4. package/dist/{chunk-tbav8trq.js → chunk-142wmdx8.js} +1 -1
  5. package/dist/chunk-1t3rabge.js +1 -0
  6. package/dist/{chunk-bn077sjq.js → chunk-2z45fjmt.js} +51 -51
  7. package/dist/{chunk-6b3vfr39.js → chunk-3gn0c0j2.js} +1 -1
  8. package/dist/{chunk-9zcr1qh6.js → chunk-3nhw50tg.js} +1 -1
  9. package/dist/{chunk-yfjs6pf8.js → chunk-4260bzp9.js} +1 -1
  10. package/dist/{chunk-agevsn2e.js → chunk-4vh3dxeg.js} +1 -1
  11. package/dist/{chunk-cb0f54ar.js → chunk-5e2s5jvw.js} +1 -1
  12. package/dist/{chunk-1rcc9xzn.js → chunk-5kcxxes1.js} +1 -1
  13. package/dist/{chunk-5fe27s34.js → chunk-6t0qzren.js} +1 -1
  14. package/dist/{chunk-7qba2raw.js → chunk-74k5n8f5.js} +1 -1
  15. package/dist/chunk-780j97nd.js +1 -0
  16. package/dist/chunk-78t2g3ht.js +1 -0
  17. package/dist/{chunk-7cx9kda0.js → chunk-7d48d71t.js} +1 -1
  18. package/dist/{chunk-ctqtahz4.js → chunk-96b00ygr.js} +1 -1
  19. package/dist/{chunk-v0e9bsvt.js → chunk-9kbktaf8.js} +2 -2
  20. package/dist/{chunk-kgc6ws03.js → chunk-a4rvf135.js} +1 -1
  21. package/dist/{chunk-81b2s97q.js → chunk-ahsvdb98.js} +1 -1
  22. package/dist/{chunk-gphssgy6.js → chunk-an34z8wv.js} +1 -1
  23. package/dist/chunk-arm90pny.js +1 -0
  24. package/dist/{chunk-jd1razfg.js → chunk-avqzptcg.js} +2 -2
  25. package/dist/{chunk-pgnhcznr.js → chunk-b0yk07x5.js} +1 -1
  26. package/dist/{chunk-1gssqf6g.js → chunk-be8n8w26.js} +1 -1
  27. package/dist/{chunk-h7ypcqp3.js → chunk-bqkrynm6.js} +2 -2
  28. package/dist/chunk-bv28r5cf.js +1 -0
  29. package/dist/{chunk-0qz8rr2k.js → chunk-c59eqb10.js} +1 -1
  30. package/dist/{chunk-6j695pam.js → chunk-cbr2vrpt.js} +1 -1
  31. package/dist/{chunk-9011y634.js → chunk-csn4vg3d.js} +2 -2
  32. package/dist/{chunk-nt2yp4jh.js → chunk-df36fv24.js} +1 -1
  33. package/dist/{chunk-sv0k2v66.js → chunk-e3jv1c1w.js} +1 -1
  34. package/dist/{chunk-069q9hkz.js → chunk-e6m161vn.js} +1 -1
  35. package/dist/{chunk-dz9sqfph.js → chunk-eqetcfer.js} +1 -1
  36. package/dist/{chunk-492hjs9k.js → chunk-eze2fzrq.js} +1 -1
  37. package/dist/{chunk-qfa5v4n5.js → chunk-femf7e4d.js} +1 -1
  38. package/dist/{chunk-d2sr8fnm.js → chunk-fvg6pct8.js} +1 -1
  39. package/dist/{chunk-bk32cwxa.js → chunk-g2n6hnjp.js} +2 -2
  40. package/dist/{chunk-mv5m8bf4.js → chunk-ge071wp4.js} +2 -2
  41. package/dist/{chunk-mv8a5svx.js → chunk-h9w6y105.js} +1 -1
  42. package/dist/{chunk-e7mbewmw.js → chunk-hzxg9kx6.js} +1 -1
  43. package/dist/{chunk-q8zsxwd8.js → chunk-j2qd9mfs.js} +2 -2
  44. package/dist/{chunk-1d47g6nc.js → chunk-j40cj742.js} +1 -1
  45. package/dist/chunk-jbqqb1ht.js +2 -0
  46. package/dist/{chunk-zhqdp4ak.js → chunk-jz0kw4yt.js} +1 -1
  47. package/dist/{chunk-fkt5b511.js → chunk-kknfcsyy.js} +1 -1
  48. package/dist/{chunk-b175s7dm.js → chunk-kvnw06wg.js} +1 -1
  49. package/dist/{chunk-a0nr8jva.js → chunk-kyb15dg8.js} +1 -1
  50. package/dist/{chunk-snmkgfbe.js → chunk-mq4m1w4w.js} +1 -1
  51. package/dist/{chunk-tmyzfvsy.js → chunk-mqcbjght.js} +1 -1
  52. package/dist/{chunk-4eaqmt3c.js → chunk-mqm8wnc8.js} +1 -1
  53. package/dist/{chunk-h2hk7vx4.js → chunk-n7bpjcb0.js} +1 -1
  54. package/dist/{chunk-88w3txtb.js → chunk-ncaqgas1.js} +1 -1
  55. package/dist/{chunk-y524zd2h.js → chunk-nh11afw0.js} +1 -1
  56. package/dist/{chunk-2gprcgep.js → chunk-nwmvyez4.js} +2 -2
  57. package/dist/{chunk-3k3c686f.js → chunk-nzyvqxt4.js} +1 -1
  58. package/dist/{chunk-j8tq0e8m.js → chunk-p6c1xbd5.js} +2 -2
  59. package/dist/chunk-p75m7q2h.js +1 -0
  60. package/dist/{chunk-b0beqmg2.js → chunk-pffdbhs6.js} +1 -1
  61. package/dist/{chunk-em03xqy9.js → chunk-phw7yp5t.js} +1 -1
  62. package/dist/{chunk-akc3s5aw.js → chunk-q0452p0f.js} +1 -1
  63. package/dist/{chunk-jhxvctg5.js → chunk-r133z8tq.js} +1 -1
  64. package/dist/{chunk-c9yrpb3g.js → chunk-rqymdmqg.js} +3 -3
  65. package/dist/{chunk-ts4jreym.js → chunk-rr7h6wdp.js} +1 -1
  66. package/dist/{chunk-wd6s7gg7.js → chunk-s04zfe57.js} +1 -1
  67. package/dist/{chunk-kada5fyh.js → chunk-twhnh3dc.js} +1 -1
  68. package/dist/{chunk-d5gzkkgg.js → chunk-txnezkkt.js} +1 -1
  69. package/dist/{chunk-2bjeg40f.js → chunk-vttq7sqg.js} +1 -1
  70. package/dist/{chunk-0mq8786q.js → chunk-vvs5da2x.js} +2 -2
  71. package/dist/{chunk-5hqvapp1.js → chunk-w4tbr5h7.js} +1 -1
  72. package/dist/{chunk-yejgw2hm.js → chunk-wts8db9p.js} +1 -1
  73. package/dist/{chunk-4fs853nh.js → chunk-x17jyjan.js} +1 -1
  74. package/dist/{chunk-q8cfxky4.js → chunk-x7x7esvz.js} +2 -2
  75. package/dist/{chunk-mk8ggmt8.js → chunk-xprg4hxp.js} +6 -6
  76. package/dist/{chunk-ss4bh5wb.js → chunk-xrfpz1vw.js} +1 -1
  77. package/dist/{chunk-yb71zqvt.js → chunk-xtr6s7kh.js} +2 -2
  78. package/dist/{chunk-dh2f4xyb.js → chunk-y807k0kw.js} +1 -1
  79. package/dist/{chunk-43h0n2td.js → chunk-ycp2e43r.js} +1 -1
  80. package/dist/{chunk-n61yv4t5.js → chunk-yfv1xeeh.js} +1 -1
  81. package/dist/chunk-zxpb45tb.js +1 -0
  82. package/dist/cli.js +1 -1
  83. package/dist/nonInteractive.js +1 -1
  84. package/dist/zen-core.js +11 -394
  85. package/dist/zen-keyboard.js +1 -1
  86. package/package.json +1 -1
  87. package/dist/chunk-06trk066.js +0 -1
  88. package/dist/chunk-0kfw8bwn.js +0 -2
  89. package/dist/chunk-8ygdre0g.js +0 -1
  90. package/dist/chunk-dr32dt9y.js +0 -1
  91. package/dist/chunk-dv1vt080.js +0 -1
  92. package/dist/chunk-p7ew4trx.js +0 -1
  93. package/dist/chunk-qhzztj83.js +0 -1
  94. package/dist/chunk-zkd3m39v.js +0 -1
@@ -1,4 +1,4 @@
1
- import{Jg as k2,Kg as U2,Lg as e2}from"./chunk-tws3wcnm.js";import{Bl as Kr}from"./chunk-78ksrp8v.js";import{$l as Dh,Wl as Ii,Yl as ut}from"./chunk-4fs853nh.js";var $4=ut((Wm,s8)=>{function Z4(t,r){if(r&&r.documentElement)t=r,r=arguments[2];else if(!t||!t.documentElement)throw Error("First argument to Readability constructor should be a document object.");if(r=r||{},this._doc=t,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._metadata={},this._debug=!!r.debug,this._maxElemsToParse=r.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=r.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=r.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(r.classesToPreserve||[]),this._keepClasses=!!r.keepClasses,this._serializer=r.serializer||function(s){return s.innerHTML},this._disableJSONLD=!!r.disableJSONLD,this._allowedVideoRegex=r.allowedVideoRegex||this.REGEXPS.videos,this._linkDensityModifier=r.linkDensityModifier||0,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let s=function(h){if(h.nodeType==h.TEXT_NODE)return`${h.nodeName} ("${h.textContent}")`;let c=Array.from(h.attributes||[],function(o){return`${o.name}="${o.value}"`}).join(" ");return`<${h.localName} ${c}>`};this.log=function(){if(typeof console<"u"){let c=Array.from(arguments,(o)=>{if(o&&o.nodeType==this.ELEMENT_NODE)return s(o);return o});c.unshift("Reader: (Readability)"),console.log(...c)}else if(typeof dump<"u"){var h=Array.prototype.map.call(arguments,function(c){return c&&c.nodeName?s(c):c}).join(" ");dump("Reader: (Readability) "+h+`
1
+ import{Jg as k2,Kg as U2,Lg as e2}from"./chunk-tws3wcnm.js";import{xl as Kr}from"./chunk-0pzpg2ra.js";import{Rl as Ii,Tl as ut,Wl as Dh}from"./chunk-x17jyjan.js";var $4=ut((Wm,s8)=>{function Z4(t,r){if(r&&r.documentElement)t=r,r=arguments[2];else if(!t||!t.documentElement)throw Error("First argument to Readability constructor should be a document object.");if(r=r||{},this._doc=t,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._metadata={},this._debug=!!r.debug,this._maxElemsToParse=r.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=r.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=r.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(r.classesToPreserve||[]),this._keepClasses=!!r.keepClasses,this._serializer=r.serializer||function(s){return s.innerHTML},this._disableJSONLD=!!r.disableJSONLD,this._allowedVideoRegex=r.allowedVideoRegex||this.REGEXPS.videos,this._linkDensityModifier=r.linkDensityModifier||0,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let s=function(h){if(h.nodeType==h.TEXT_NODE)return`${h.nodeName} ("${h.textContent}")`;let c=Array.from(h.attributes||[],function(o){return`${o.name}="${o.value}"`}).join(" ");return`<${h.localName} ${c}>`};this.log=function(){if(typeof console<"u"){let c=Array.from(arguments,(o)=>{if(o&&o.nodeType==this.ELEMENT_NODE)return s(o);return o});c.unshift("Reader: (Readability)"),console.log(...c)}else if(typeof dump<"u"){var h=Array.prototype.map.call(arguments,function(c){return c&&c.nodeName?s(c):c}).join(" ");dump("Reader: (Readability) "+h+`
2
2
  `)}}}else this.log=function(){}}Z4.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|footer|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,commas:/\u002C|\u060C|\uFE50|\uFE10|\uFE11|\u2E41|\u2E34|\u2E32|\uFF0C/g,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/,adWords:/^(ad(vertising|vertisement)?|pub(licité)?|werb(ung)?|广告|Реклама|Anuncio)$/iu,loadingWords:/^((loading|正在加载|Загрузка|chargement|cargando)(…|\.\.\.)?)$/iu},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P","OL","UL"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent(t){if(this._fixRelativeUris(t),this._simplifyNestedElements(t),!this._keepClasses)this._cleanClasses(t)},_removeNodes(t,r){if(this._docJSDOMParser&&t._isLiveNodeList)throw Error("Do not pass live node lists to _removeNodes");for(var s=t.length-1;s>=0;s--){var h=t[s],c=h.parentNode;if(c){if(!r||r.call(this,h,s,t))c.removeChild(h)}}},_replaceNodeTags(t,r){if(this._docJSDOMParser&&t._isLiveNodeList)throw Error("Do not pass live node lists to _replaceNodeTags");for(let s of t)this._setNodeTag(s,r)},_forEachNode(t,r){Array.prototype.forEach.call(t,r,this)},_findNode(t,r){return Array.prototype.find.call(t,r,this)},_someNode(t,r){return Array.prototype.some.call(t,r,this)},_everyNode(t,r){return Array.prototype.every.call(t,r,this)},_getAllNodesWithTag(t,r){if(t.querySelectorAll)return t.querySelectorAll(r.join(","));return[].concat.apply([],r.map(function(s){var h=t.getElementsByTagName(s);return Array.isArray(h)?h:Array.from(h)}))},_cleanClasses(t){var r=this._classesToPreserve,s=(t.getAttribute("class")||"").split(/\s+/).filter((h)=>r.includes(h)).join(" ");if(s)t.setAttribute("class",s);else t.removeAttribute("class");for(t=t.firstElementChild;t;t=t.nextElementSibling)this._cleanClasses(t)},_isUrl(t){try{return new URL(t),!0}catch{return!1}},_fixRelativeUris(t){var r=this._doc.baseURI,s=this._doc.documentURI;function h(f){if(r==s&&f.charAt(0)=="#")return f;try{return new URL(f,r).href}catch(g){}return f}var c=this._getAllNodesWithTag(t,["a"]);this._forEachNode(c,function(f){var g=f.getAttribute("href");if(g)if(g.indexOf("javascript:")===0)if(f.childNodes.length===1&&f.childNodes[0].nodeType===this.TEXT_NODE){var u=this._doc.createTextNode(f.textContent);f.parentNode.replaceChild(u,f)}else{var b=this._doc.createElement("span");while(f.firstChild)b.appendChild(f.firstChild);f.parentNode.replaceChild(b,f)}else f.setAttribute("href",h(g))});var o=this._getAllNodesWithTag(t,["img","picture","figure","video","audio","source"]);this._forEachNode(o,function(f){var g=f.getAttribute("src"),u=f.getAttribute("poster"),b=f.getAttribute("srcset");if(g)f.setAttribute("src",h(g));if(u)f.setAttribute("poster",h(u));if(b){var y=b.replace(this.REGEXPS.srcsetUrl,function(m,w,n,j){return h(w)+(n||"")+j});f.setAttribute("srcset",y)}})},_simplifyNestedElements(t){var r=t;while(r){if(r.parentNode&&["DIV","SECTION"].includes(r.tagName)&&!(r.id&&r.id.startsWith("readability"))){if(this._isElementWithoutContent(r)){r=this._removeAndGetNext(r);continue}else if(this._hasSingleTagInsideElement(r,"DIV")||this._hasSingleTagInsideElement(r,"SECTION")){var s=r.children[0];for(var h=0;h<r.attributes.length;h++)s.setAttributeNode(r.attributes[h].cloneNode());r.parentNode.replaceChild(s,r),r=s;continue}}r=this._getNextNode(r)}},_getArticleTitle(){var t=this._doc,r="",s="";try{if(r=s=t.title.trim(),typeof r!=="string")r=s=this._getInnerText(t.getElementsByTagName("title")[0])}catch(y){}var h=!1;function c(y){return y.split(/\s+/).length}if(/ [\|\-\\\/>»] /.test(r)){h=/ [\\\/>»] /.test(r);let y=Array.from(s.matchAll(/ [\|\-\\\/>»] /gi));if(r=s.substring(0,y.pop().index),c(r)<3)r=s.replace(/^[^\|\-\\\/>»]*[\|\-\\\/>»]/gi,"")}else if(r.includes(": ")){var o=this._getAllNodesWithTag(t,["h1","h2"]),f=r.trim(),g=this._someNode(o,function(y){return y.textContent.trim()===f});if(!g){if(r=s.substring(s.lastIndexOf(":")+1),c(r)<3)r=s.substring(s.indexOf(":")+1);else if(c(s.substr(0,s.indexOf(":")))>5)r=s}}else if(r.length>150||r.length<15){var u=t.getElementsByTagName("h1");if(u.length===1)r=this._getInnerText(u[0])}r=r.trim().replace(this.REGEXPS.normalize," ");var b=c(r);if(b<=4&&(!h||b!=c(s.replace(/[\|\-\\\/>»]+/g,""))-1))r=s;return r},_prepDocument(){var t=this._doc;if(this._removeNodes(this._getAllNodesWithTag(t,["style"])),t.body)this._replaceBrs(t.body);this._replaceNodeTags(this._getAllNodesWithTag(t,["font"]),"SPAN")},_nextNode(t){var r=t;while(r&&r.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(r.textContent))r=r.nextSibling;return r},_replaceBrs(t){this._forEachNode(this._getAllNodesWithTag(t,["br"]),function(r){var s=r.nextSibling,h=!1;while((s=this._nextNode(s))&&s.tagName=="BR"){h=!0;var c=s.nextSibling;s.remove(),s=c}if(h){var o=this._doc.createElement("p");r.parentNode.replaceChild(o,r),s=o.nextSibling;while(s){if(s.tagName=="BR"){var f=this._nextNode(s.nextSibling);if(f&&f.tagName=="BR")break}if(!this._isPhrasingContent(s))break;var g=s.nextSibling;o.appendChild(s),s=g}while(o.lastChild&&this._isWhitespace(o.lastChild))o.lastChild.remove();if(o.parentNode.tagName==="P")this._setNodeTag(o.parentNode,"DIV")}})},_setNodeTag(t,r){if(this.log("_setNodeTag",t,r),this._docJSDOMParser)return t.localName=r.toLowerCase(),t.tagName=r.toUpperCase(),t;var s=t.ownerDocument.createElement(r);while(t.firstChild)s.appendChild(t.firstChild);if(t.parentNode.replaceChild(s,t),t.readability)s.readability=t.readability;for(var h=0;h<t.attributes.length;h++)s.setAttributeNode(t.attributes[h].cloneNode());return s},_prepArticle(t){this._cleanStyles(t),this._markDataTables(t),this._fixLazyImages(t),this._cleanConditionally(t,"form"),this._cleanConditionally(t,"fieldset"),this._clean(t,"object"),this._clean(t,"embed"),this._clean(t,"footer"),this._clean(t,"link"),this._clean(t,"aside");var r=this.DEFAULT_CHAR_THRESHOLD;this._forEachNode(t.children,function(s){this._cleanMatchedNodes(s,function(h,c){return this.REGEXPS.shareElements.test(c)&&h.textContent.length<r})}),this._clean(t,"iframe"),this._clean(t,"input"),this._clean(t,"textarea"),this._clean(t,"select"),this._clean(t,"button"),this._cleanHeaders(t),this._cleanConditionally(t,"table"),this._cleanConditionally(t,"ul"),this._cleanConditionally(t,"div"),this._replaceNodeTags(this._getAllNodesWithTag(t,["h1"]),"h2"),this._removeNodes(this._getAllNodesWithTag(t,["p"]),function(s){var h=this._getAllNodesWithTag(s,["img","embed","object","iframe"]).length;return h===0&&!this._getInnerText(s,!1)}),this._forEachNode(this._getAllNodesWithTag(t,["br"]),function(s){var h=this._nextNode(s.nextSibling);if(h&&h.tagName=="P")s.remove()}),this._forEachNode(this._getAllNodesWithTag(t,["table"]),function(s){var h=this._hasSingleTagInsideElement(s,"TBODY")?s.firstElementChild:s;if(this._hasSingleTagInsideElement(h,"TR")){var c=h.firstElementChild;if(this._hasSingleTagInsideElement(c,"TD")){var o=c.firstElementChild;o=this._setNodeTag(o,this._everyNode(o.childNodes,this._isPhrasingContent)?"P":"DIV"),s.parentNode.replaceChild(o,s)}}})},_initializeNode(t){switch(t.readability={contentScore:0},t.tagName){case"DIV":t.readability.contentScore+=5;break;case"PRE":case"TD":case"BLOCKQUOTE":t.readability.contentScore+=3;break;case"ADDRESS":case"OL":case"UL":case"DL":case"DD":case"DT":case"LI":case"FORM":t.readability.contentScore-=3;break;case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"TH":t.readability.contentScore-=5;break}t.readability.contentScore+=this._getClassWeight(t)},_removeAndGetNext(t){var r=this._getNextNode(t,!0);return t.remove(),r},_getNextNode(t,r){if(!r&&t.firstElementChild)return t.firstElementChild;if(t.nextElementSibling)return t.nextElementSibling;do t=t.parentNode;while(t&&!t.nextElementSibling);return t&&t.nextElementSibling},_textSimilarity(t,r){var s=t.toLowerCase().split(this.REGEXPS.tokenize).filter(Boolean),h=r.toLowerCase().split(this.REGEXPS.tokenize).filter(Boolean);if(!s.length||!h.length)return 0;var c=h.filter((f)=>!s.includes(f)),o=c.join(" ").length/h.join(" ").length;return 1-o},_isValidByline(t,r){var s=t.getAttribute("rel"),h=t.getAttribute("itemprop"),c=t.textContent.trim().length;return(s==="author"||h&&h.includes("author")||this.REGEXPS.byline.test(r))&&!!c&&c<100},_getNodeAncestors(t,r){r=r||0;var s=0,h=[];while(t.parentNode){if(h.push(t.parentNode),r&&++s===r)break;t=t.parentNode}return h},_grabArticle(t){this.log("**** grabArticle ****");var r=this._doc,s=t!==null;if(t=t?t:this._doc.body,!t)return this.log("No body found in document. Abort."),null;var h=t.innerHTML;while(!0){this.log("Starting grabArticle loop");var c=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),o=[],f=this._doc.documentElement;let J0=!0;while(f){if(f.tagName==="HTML")this._articleLang=f.getAttribute("lang");var g=f.className+" "+f.id;if(!this._isProbablyVisible(f)){this.log("Removing hidden node - "+g),f=this._removeAndGetNext(f);continue}if(f.getAttribute("aria-modal")=="true"&&f.getAttribute("role")=="dialog"){f=this._removeAndGetNext(f);continue}if(!this._articleByline&&!this._metadata.byline&&this._isValidByline(f,g)){var u=this._getNextNode(f,!0),b=this._getNextNode(f),y=null;while(b&&b!=u){var m=b.getAttribute("itemprop");if(m&&m.includes("name")){y=b;break}else b=this._getNextNode(b)}this._articleByline=(y??f).textContent.trim(),f=this._removeAndGetNext(f);continue}if(J0&&this._headerDuplicatesTitle(f)){this.log("Removing header: ",f.textContent.trim(),this._articleTitle.trim()),J0=!1,f=this._removeAndGetNext(f);continue}if(c){if(this.REGEXPS.unlikelyCandidates.test(g)&&!this.REGEXPS.okMaybeItsACandidate.test(g)&&!this._hasAncestorTag(f,"table")&&!this._hasAncestorTag(f,"code")&&f.tagName!=="BODY"&&f.tagName!=="A"){this.log("Removing unlikely candidate - "+g),f=this._removeAndGetNext(f);continue}if(this.UNLIKELY_ROLES.includes(f.getAttribute("role"))){this.log("Removing content with role "+f.getAttribute("role")+" - "+g),f=this._removeAndGetNext(f);continue}}if((f.tagName==="DIV"||f.tagName==="SECTION"||f.tagName==="HEADER"||f.tagName==="H1"||f.tagName==="H2"||f.tagName==="H3"||f.tagName==="H4"||f.tagName==="H5"||f.tagName==="H6")&&this._isElementWithoutContent(f)){f=this._removeAndGetNext(f);continue}if(this.DEFAULT_TAGS_TO_SCORE.includes(f.tagName))o.push(f);if(f.tagName==="DIV"){var w=null,n=f.firstChild;while(n){var j=n.nextSibling;if(this._isPhrasingContent(n)){if(w!==null)w.appendChild(n);else if(!this._isWhitespace(n))w=r.createElement("p"),f.replaceChild(w,n),w.appendChild(n)}else if(w!==null){while(w.lastChild&&this._isWhitespace(w.lastChild))w.lastChild.remove();w=null}n=j}if(this._hasSingleTagInsideElement(f,"P")&&this._getLinkDensity(f)<0.25){var P=f.children[0];f.parentNode.replaceChild(P,f),f=P,o.push(f)}else if(!this._hasChildBlockElement(f))f=this._setNodeTag(f,"P"),o.push(f)}f=this._getNextNode(f)}var S=[];this._forEachNode(o,function(Kt){if(!Kt.parentNode||typeof Kt.parentNode.tagName>"u")return;var c0=this._getInnerText(Kt);if(c0.length<25)return;var V0=this._getNodeAncestors(Kt,5);if(V0.length===0)return;var q0=0;q0+=1,q0+=c0.split(this.REGEXPS.commas).length,q0+=Math.min(Math.floor(c0.length/100),3),this._forEachNode(V0,function(f0,y0){if(!f0.tagName||!f0.parentNode||typeof f0.parentNode.tagName>"u")return;if(typeof f0.readability>"u")this._initializeNode(f0),S.push(f0);if(y0===0)var R0=1;else if(y0===1)R0=2;else R0=y0*3;f0.readability.contentScore+=q0/R0})});var x=[];for(var M=0,q=S.length;M<q;M+=1){var z=S[M],E=z.readability.contentScore*(1-this._getLinkDensity(z));z.readability.contentScore=E,this.log("Candidate:",z,"with score "+E);for(var D=0;D<this._nbTopCandidates;D++){var T=x[D];if(!T||E>T.readability.contentScore){if(x.splice(D,0,z),x.length>this._nbTopCandidates)x.pop();break}}}var C=x[0]||null,H=!1,K;if(C===null||C.tagName==="BODY"){C=r.createElement("DIV"),H=!0;while(t.firstChild)this.log("Moving child out:",t.firstChild),C.appendChild(t.firstChild);t.appendChild(C),this._initializeNode(C)}else if(C){var O=[];for(var I=1;I<x.length;I++)if(x[I].readability.contentScore/C.readability.contentScore>=0.75)O.push(this._getNodeAncestors(x[I]));var N=3;if(O.length>=N){K=C.parentNode;while(K.tagName!=="BODY"){var F=0;for(var p=0;p<O.length&&F<N;p++)F+=Number(O[p].includes(K));if(F>=N){C=K;break}K=K.parentNode}}if(!C.readability)this._initializeNode(C);K=C.parentNode;var ht=C.readability.contentScore,U=ht/3;while(K.tagName!=="BODY"){if(!K.readability){K=K.parentNode;continue}var Y=K.readability.contentScore;if(Y<U)break;if(Y>ht){C=K;break}ht=K.readability.contentScore,K=K.parentNode}K=C.parentNode;while(K.tagName!="BODY"&&K.children.length==1)C=K,K=C.parentNode;if(!C.readability)this._initializeNode(C)}var Q=r.createElement("DIV");if(s)Q.id="readability-content";var G=Math.max(10,C.readability.contentScore*0.2);K=C.parentNode;var tt=K.children;for(var d=0,ft=tt.length;d<ft;d++){var e=tt[d],mt=!1;if(this.log("Looking at sibling node:",e,e.readability?"with score "+e.readability.contentScore:""),this.log("Sibling has score",e.readability?e.readability.contentScore:"Unknown"),e===C)mt=!0;else{var qt=0;if(e.className===C.className&&C.className!=="")qt+=C.readability.contentScore*0.2;if(e.readability&&e.readability.contentScore+qt>=G)mt=!0;else if(e.nodeName==="P"){var Ft=this._getLinkDensity(e),gt=this._getInnerText(e),Ut=gt.length;if(Ut>80&&Ft<0.25)mt=!0;else if(Ut<80&&Ut>0&&Ft===0&&gt.search(/\.( |$)/)!==-1)mt=!0}}if(mt){if(this.log("Appending node:",e),!this.ALTER_TO_DIV_EXCEPTIONS.includes(e.nodeName))this.log("Altering sibling:",e,"to div."),e=this._setNodeTag(e,"DIV");Q.appendChild(e),tt=K.children,d-=1,ft-=1}}if(this._debug)this.log("Article content pre-prep: "+Q.innerHTML);if(this._prepArticle(Q),this._debug)this.log("Article content post-prep: "+Q.innerHTML);if(H)C.id="readability-page-1",C.className="page";else{var Wt=r.createElement("DIV");Wt.id="readability-page-1",Wt.className="page";while(Q.firstChild)Wt.appendChild(Q.firstChild);Q.appendChild(Wt)}if(this._debug)this.log("Article content after paging: "+Q.innerHTML);var Zt=!0,g0=this._getInnerText(Q,!0).length;if(g0<this._charThreshold)if(Zt=!1,t.innerHTML=h,this._attempts.push({articleContent:Q,textLength:g0}),this._flagIsActive(this.FLAG_STRIP_UNLIKELYS))this._removeFlag(this.FLAG_STRIP_UNLIKELYS);else if(this._flagIsActive(this.FLAG_WEIGHT_CLASSES))this._removeFlag(this.FLAG_WEIGHT_CLASSES);else if(this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY))this._removeFlag(this.FLAG_CLEAN_CONDITIONALLY);else{if(this._attempts.sort(function(Kt,c0){return c0.textLength-Kt.textLength}),!this._attempts[0].textLength)return null;Q=this._attempts[0].articleContent,Zt=!0}if(Zt){var p0=[K,C].concat(this._getNodeAncestors(K));return this._someNode(p0,function(Kt){if(!Kt.tagName)return!1;var c0=Kt.getAttribute("dir");if(c0)return this._articleDir=c0,!0;return!1}),Q}}},_unescapeHtmlEntities(t){if(!t)return t;var r=this.HTML_ESCAPE_MAP;return t.replace(/&(quot|amp|apos|lt|gt);/g,function(s,h){return r[h]}).replace(/&#(?:x([0-9a-f]+)|([0-9]+));/gi,function(s,h,c){var o=parseInt(h||c,h?16:10);if(o==0||o>1114111||o>=55296&&o<=57343)o=65533;return String.fromCodePoint(o)})},_getJSONLD(t){var r=this._getAllNodesWithTag(t,["script"]),s;return this._forEachNode(r,function(h){if(!s&&h.getAttribute("type")==="application/ld+json")try{var c=h.textContent.replace(/^\s*<!\[CDATA\[|\]\]>\s*$/g,""),o=JSON.parse(c);if(Array.isArray(o)){if(o=o.find((m)=>{return m["@type"]&&m["@type"].match(this.REGEXPS.jsonLdArticleTypes)}),!o)return}var f=/^https?\:\/\/schema\.org\/?$/,g=typeof o["@context"]==="string"&&o["@context"].match(f)||typeof o["@context"]==="object"&&typeof o["@context"]["@vocab"]=="string"&&o["@context"]["@vocab"].match(f);if(!g)return;if(!o["@type"]&&Array.isArray(o["@graph"]))o=o["@graph"].find((m)=>{return(m["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)});if(!o||!o["@type"]||!o["@type"].match(this.REGEXPS.jsonLdArticleTypes))return;if(s={},typeof o.name==="string"&&typeof o.headline==="string"&&o.name!==o.headline){var u=this._getArticleTitle(),b=this._textSimilarity(o.name,u)>0.75,y=this._textSimilarity(o.headline,u)>0.75;if(y&&!b)s.title=o.headline;else s.title=o.name}else if(typeof o.name==="string")s.title=o.name.trim();else if(typeof o.headline==="string")s.title=o.headline.trim();if(o.author){if(typeof o.author.name==="string")s.byline=o.author.name.trim();else if(Array.isArray(o.author)&&o.author[0]&&typeof o.author[0].name==="string")s.byline=o.author.filter(function(m){return m&&typeof m.name==="string"}).map(function(m){return m.name.trim()}).join(", ")}if(typeof o.description==="string")s.excerpt=o.description.trim();if(o.publisher&&typeof o.publisher.name==="string")s.siteName=o.publisher.name.trim();if(typeof o.datePublished==="string")s.datePublished=o.datePublished.trim()}catch(m){this.log(m.message)}}),s?s:{}},_getArticleMetadata(t){var r={},s={},h=this._doc.getElementsByTagName("meta"),c=/\s*(article|dc|dcterm|og|twitter)\s*:\s*(author|creator|description|published_time|title|site_name)\s*/gi,o=/^\s*(?:(dc|dcterm|og|twitter|parsely|weibo:(article|webpage))\s*[-\.:]\s*)?(author|creator|pub-date|description|title|site_name)\s*$/i;if(this._forEachNode(h,function(g){var u=g.getAttribute("name"),b=g.getAttribute("property"),y=g.getAttribute("content");if(!y)return;var m=null,w=null;if(b){if(m=b.match(c),m)w=m[0].toLowerCase().replace(/\s/g,""),s[w]=y.trim()}if(!m&&u&&o.test(u)){if(w=u,y)w=w.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),s[w]=y.trim()}}),r.title=t.title||s["dc:title"]||s["dcterm:title"]||s["og:title"]||s["weibo:article:title"]||s["weibo:webpage:title"]||s.title||s["twitter:title"]||s["parsely-title"],!r.title)r.title=this._getArticleTitle();let f=typeof s["article:author"]==="string"&&!this._isUrl(s["article:author"])?s["article:author"]:void 0;return r.byline=t.byline||s["dc:creator"]||s["dcterm:creator"]||s.author||s["parsely-author"]||f,r.excerpt=t.excerpt||s["dc:description"]||s["dcterm:description"]||s["og:description"]||s["weibo:article:description"]||s["weibo:webpage:description"]||s.description||s["twitter:description"],r.siteName=t.siteName||s["og:site_name"],r.publishedTime=t.datePublished||s["article:published_time"]||s["parsely-pub-date"]||null,r.title=this._unescapeHtmlEntities(r.title),r.byline=this._unescapeHtmlEntities(r.byline),r.excerpt=this._unescapeHtmlEntities(r.excerpt),r.siteName=this._unescapeHtmlEntities(r.siteName),r.publishedTime=this._unescapeHtmlEntities(r.publishedTime),r},_isSingleImage(t){while(t){if(t.tagName==="IMG")return!0;if(t.children.length!==1||t.textContent.trim()!=="")return!1;t=t.children[0]}return!1},_unwrapNoscriptImages(t){var r=Array.from(t.getElementsByTagName("img"));this._forEachNode(r,function(h){for(var c=0;c<h.attributes.length;c++){var o=h.attributes[c];switch(o.name){case"src":case"srcset":case"data-src":case"data-srcset":return}if(/\.(jpg|jpeg|png|webp)/i.test(o.value))return}h.remove()});var s=Array.from(t.getElementsByTagName("noscript"));this._forEachNode(s,function(h){if(!this._isSingleImage(h))return;var c=t.createElement("div");c.innerHTML=h.innerHTML;var o=h.previousElementSibling;if(o&&this._isSingleImage(o)){var f=o;if(f.tagName!=="IMG")f=o.getElementsByTagName("img")[0];var g=c.getElementsByTagName("img")[0];for(var u=0;u<f.attributes.length;u++){var b=f.attributes[u];if(b.value==="")continue;if(b.name==="src"||b.name==="srcset"||/\.(jpg|jpeg|png|webp)/i.test(b.value)){if(g.getAttribute(b.name)===b.value)continue;var y=b.name;if(g.hasAttribute(y))y="data-old-"+y;g.setAttribute(y,b.value)}}h.parentNode.replaceChild(c.firstElementChild,o)}})},_removeScripts(t){this._removeNodes(this._getAllNodesWithTag(t,["script","noscript"]))},_hasSingleTagInsideElement(t,r){if(t.children.length!=1||t.children[0].tagName!==r)return!1;return!this._someNode(t.childNodes,function(s){return s.nodeType===this.TEXT_NODE&&this.REGEXPS.hasContent.test(s.textContent)})},_isElementWithoutContent(t){return t.nodeType===this.ELEMENT_NODE&&!t.textContent.trim().length&&(!t.children.length||t.children.length==t.getElementsByTagName("br").length+t.getElementsByTagName("hr").length)},_hasChildBlockElement(t){return this._someNode(t.childNodes,function(r){return this.DIV_TO_P_ELEMS.has(r.tagName)||this._hasChildBlockElement(r)})},_isPhrasingContent(t){return t.nodeType===this.TEXT_NODE||this.PHRASING_ELEMS.includes(t.tagName)||(t.tagName==="A"||t.tagName==="DEL"||t.tagName==="INS")&&this._everyNode(t.childNodes,this._isPhrasingContent)},_isWhitespace(t){return t.nodeType===this.TEXT_NODE&&t.textContent.trim().length===0||t.nodeType===this.ELEMENT_NODE&&t.tagName==="BR"},_getInnerText(t,r){r=typeof r>"u"?!0:r;var s=t.textContent.trim();if(r)return s.replace(this.REGEXPS.normalize," ");return s},_getCharCount(t,r){return r=r||",",this._getInnerText(t).split(r).length-1},_cleanStyles(t){if(!t||t.tagName.toLowerCase()==="svg")return;for(var r=0;r<this.PRESENTATIONAL_ATTRIBUTES.length;r++)t.removeAttribute(this.PRESENTATIONAL_ATTRIBUTES[r]);if(this.DEPRECATED_SIZE_ATTRIBUTE_ELEMS.includes(t.tagName))t.removeAttribute("width"),t.removeAttribute("height");var s=t.firstElementChild;while(s!==null)this._cleanStyles(s),s=s.nextElementSibling},_getLinkDensity(t){var r=this._getInnerText(t).length;if(r===0)return 0;var s=0;return this._forEachNode(t.getElementsByTagName("a"),function(h){var c=h.getAttribute("href"),o=c&&this.REGEXPS.hashUrl.test(c)?0.3:1;s+=this._getInnerText(h).length*o}),s/r},_getClassWeight(t){if(!this._flagIsActive(this.FLAG_WEIGHT_CLASSES))return 0;var r=0;if(typeof t.className==="string"&&t.className!==""){if(this.REGEXPS.negative.test(t.className))r-=25;if(this.REGEXPS.positive.test(t.className))r+=25}if(typeof t.id==="string"&&t.id!==""){if(this.REGEXPS.negative.test(t.id))r-=25;if(this.REGEXPS.positive.test(t.id))r+=25}return r},_clean(t,r){var s=["object","embed","iframe"].includes(r);this._removeNodes(this._getAllNodesWithTag(t,[r]),function(h){if(s){for(var c=0;c<h.attributes.length;c++)if(this._allowedVideoRegex.test(h.attributes[c].value))return!1;if(h.tagName==="object"&&this._allowedVideoRegex.test(h.innerHTML))return!1}return!0})},_hasAncestorTag(t,r,s,h){s=s||3,r=r.toUpperCase();var c=0;while(t.parentNode){if(s>0&&c>s)return!1;if(t.parentNode.tagName===r&&(!h||h(t.parentNode)))return!0;t=t.parentNode,c++}return!1},_getRowAndColumnCount(t){var r=0,s=0,h=t.getElementsByTagName("tr");for(var c=0;c<h.length;c++){var o=h[c].getAttribute("rowspan")||0;if(o)o=parseInt(o,10);r+=o||1;var f=0,g=h[c].getElementsByTagName("td");for(var u=0;u<g.length;u++){var b=g[u].getAttribute("colspan")||0;if(b)b=parseInt(b,10);f+=b||1}s=Math.max(s,f)}return{rows:r,columns:s}},_markDataTables(t){var r=t.getElementsByTagName("table");for(var s=0;s<r.length;s++){var h=r[s],c=h.getAttribute("role");if(c=="presentation"){h._readabilityDataTable=!1;continue}var o=h.getAttribute("datatable");if(o=="0"){h._readabilityDataTable=!1;continue}var f=h.getAttribute("summary");if(f){h._readabilityDataTable=!0;continue}var g=h.getElementsByTagName("caption")[0];if(g&&g.childNodes.length){h._readabilityDataTable=!0;continue}var u=["col","colgroup","tfoot","thead","th"],b=function(m){return!!h.getElementsByTagName(m)[0]};if(u.some(b)){this.log("Data table because found data-y descendant"),h._readabilityDataTable=!0;continue}if(h.getElementsByTagName("table")[0]){h._readabilityDataTable=!1;continue}var y=this._getRowAndColumnCount(h);if(y.columns==1||y.rows==1){h._readabilityDataTable=!1;continue}if(y.rows>=10||y.columns>4){h._readabilityDataTable=!0;continue}h._readabilityDataTable=y.rows*y.columns>10}},_fixLazyImages(t){this._forEachNode(this._getAllNodesWithTag(t,["img","picture","figure"]),function(r){if(r.src&&this.REGEXPS.b64DataUrl.test(r.src)){var s=this.REGEXPS.b64DataUrl.exec(r.src);if(s[1]==="image/svg+xml")return;var h=!1;for(var c=0;c<r.attributes.length;c++){var o=r.attributes[c];if(o.name==="src")continue;if(/\.(jpg|jpeg|png|webp)/i.test(o.value)){h=!0;break}}if(h){var f=s[0].length,g=r.src.length-f;if(g<133)r.removeAttribute("src")}}if((r.src||r.srcset&&r.srcset!="null")&&!r.className.toLowerCase().includes("lazy"))return;for(var u=0;u<r.attributes.length;u++){if(o=r.attributes[u],o.name==="src"||o.name==="srcset"||o.name==="alt")continue;var b=null;if(/\.(jpg|jpeg|png|webp)\s+\d/.test(o.value))b="srcset";else if(/^\s*\S+\.(jpg|jpeg|png|webp)\S*\s*$/.test(o.value))b="src";if(b){if(r.tagName==="IMG"||r.tagName==="PICTURE")r.setAttribute(b,o.value);else if(r.tagName==="FIGURE"&&!this._getAllNodesWithTag(r,["img","picture"]).length){var y=this._doc.createElement("img");y.setAttribute(b,o.value),r.appendChild(y)}}}})},_getTextDensity(t,r){var s=this._getInnerText(t,!0).length;if(s===0)return 0;var h=0,c=this._getAllNodesWithTag(t,r);return this._forEachNode(c,(o)=>h+=this._getInnerText(o,!0).length),h/s},_cleanConditionally(t,r){if(!this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY))return;this._removeNodes(this._getAllNodesWithTag(t,[r]),function(s){var h=function(K){return K._readabilityDataTable},c=r==="ul"||r==="ol";if(!c){var o=0,f=this._getAllNodesWithTag(s,["ul","ol"]);this._forEachNode(f,(K)=>o+=this._getInnerText(K).length),c=o/this._getInnerText(s).length>0.9}if(r==="table"&&h(s))return!1;if(this._hasAncestorTag(s,"table",-1,h))return!1;if(this._hasAncestorTag(s,"code"))return!1;if([...s.getElementsByTagName("table")].some((K)=>K._readabilityDataTable))return!1;var g=this._getClassWeight(s);this.log("Cleaning Conditionally",s);var u=0;if(g+u<0)return!0;if(this._getCharCount(s,",")<10){var b=s.getElementsByTagName("p").length,y=s.getElementsByTagName("img").length,m=s.getElementsByTagName("li").length-100,w=s.getElementsByTagName("input").length,n=this._getTextDensity(s,["h1","h2","h3","h4","h5","h6"]),j=0,P=this._getAllNodesWithTag(s,["object","embed","iframe"]);for(var S=0;S<P.length;S++){for(var x=0;x<P[S].attributes.length;x++)if(this._allowedVideoRegex.test(P[S].attributes[x].value))return!1;if(P[S].tagName==="object"&&this._allowedVideoRegex.test(P[S].innerHTML))return!1;j++}var M=this._getInnerText(s);if(this.REGEXPS.adWords.test(M)||this.REGEXPS.loadingWords.test(M))return!0;var q=M.length,z=this._getLinkDensity(s),E=["SPAN","LI","TD"].concat(Array.from(this.DIV_TO_P_ELEMS)),D=this._getTextDensity(s,E),T=this._hasAncestorTag(s,"figure"),C=(()=>{let O=[];if(!T&&y>1&&b/y<0.5)O.push(`Bad p to img ratio (img=${y}, p=${b})`);if(!c&&m>b)O.push(`Too many li's outside of a list. (li=${m} > p=${b})`);if(w>Math.floor(b/3))O.push(`Too many inputs per p. (input=${w}, p=${b})`);if(!c&&!T&&n<0.9&&q<25&&(y===0||y>2)&&z>0)O.push(`Suspiciously short. (headingDensity=${n}, img=${y}, linkDensity=${z})`);if(!c&&g<25&&z>0.2+this._linkDensityModifier)O.push(`Low weight and a little linky. (linkDensity=${z})`);if(g>=25&&z>0.5+this._linkDensityModifier)O.push(`High weight and mostly links. (linkDensity=${z})`);if(j===1&&q<75||j>1)O.push(`Suspicious embed. (embedCount=${j}, contentLength=${q})`);if(y===0&&D===0)O.push(`No useful content. (img=${y}, textDensity=${D})`);if(O.length)return this.log("Checks failed",O),!0;return!1})();if(c&&C){for(var H=0;H<s.children.length;H++)if(s.children[H].children.length>1)return C;let O=s.getElementsByTagName("li").length;if(y==O)return!1}return C}return!1})},_cleanMatchedNodes(t,r){var s=this._getNextNode(t,!0),h=this._getNextNode(t);while(h&&h!=s)if(r.call(this,h,h.className+" "+h.id))h=this._removeAndGetNext(h);else h=this._getNextNode(h)},_cleanHeaders(t){let r=this._getAllNodesWithTag(t,["h1","h2"]);this._removeNodes(r,function(s){let h=this._getClassWeight(s)<0;if(h)this.log("Removing header with low class weight:",s);return h})},_headerDuplicatesTitle(t){if(t.tagName!="H1"&&t.tagName!="H2")return!1;var r=this._getInnerText(t,!1);return this.log("Evaluating similarity of header:",r,this._articleTitle),this._textSimilarity(this._articleTitle,r)>0.75},_flagIsActive(t){return(this._flags&t)>0},_removeFlag(t){this._flags=this._flags&~t},_isProbablyVisible(t){return(!t.style||t.style.display!="none")&&(!t.style||t.style.visibility!="hidden")&&!t.hasAttribute("hidden")&&(!t.hasAttribute("aria-hidden")||t.getAttribute("aria-hidden")!="true"||t.className&&t.className.includes&&t.className.includes("fallback-image"))},parse(){if(this._maxElemsToParse>0){var t=this._doc.getElementsByTagName("*").length;if(t>this._maxElemsToParse)throw Error("Aborting parsing document; "+t+" elements found")}this._unwrapNoscriptImages(this._doc);var r=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var s=this._getArticleMetadata(r);this._metadata=s,this._articleTitle=s.title;var h=this._grabArticle();if(!h)return null;if(this.log("Grabbed: "+h.innerHTML),this._postProcessContent(h),!s.excerpt){var c=h.getElementsByTagName("p");if(c.length)s.excerpt=c[0].textContent.trim()}var o=h.textContent;return{title:this._articleTitle,byline:s.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(h),textContent:o,length:o.length,excerpt:s.excerpt,siteName:s.siteName||this._articleSiteName,publishedTime:s.publishedTime}}};if(typeof s8==="object")s8.exports=Z4});var r1=ut((Im,h8)=>{var t1={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function df(t){return(!t.style||t.style.display!="none")&&!t.hasAttribute("hidden")&&(!t.hasAttribute("aria-hidden")||t.getAttribute("aria-hidden")!="true"||t.className&&t.className.includes&&t.className.includes("fallback-image"))}function Zf(t,r={}){if(typeof r=="function")r={visibilityChecker:r};var s={minScore:20,minContentLength:140,visibilityChecker:df};r=Object.assign(s,r);var h=t.querySelectorAll("p, pre, article"),c=t.querySelectorAll("div > br");if(c.length){var o=new Set(h);[].forEach.call(c,function(g){o.add(g.parentNode)}),h=Array.from(o)}var f=0;return[].some.call(h,function(g){if(!r.visibilityChecker(g))return!1;var u=g.className+" "+g.id;if(t1.unlikelyCandidates.test(u)&&!t1.okMaybeItsACandidate.test(u))return!1;if(g.matches("li p"))return!1;var b=g.textContent.trim().length;if(b<r.minContentLength)return!1;if(f+=Math.sqrt(b-r.minContentLength),f>r.minScore)return!0;return!1})}if(typeof h8==="object")h8.exports=Zf});var h1=ut((Vm,s1)=>{var $f=$4(),t3=r1();s1.exports={Readability:$f,isProbablyReaderable:t3}});var i1=ut((Us,i8)=>{(function(t,r){typeof Us=="object"&&typeof i8=="object"?i8.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Us=="object"?Us.Defuddle=r():t.Defuddle=r()})(typeof self<"u"?self:Us,()=>(()=>{var t={0:(c,o,f)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.mathRules=o.createCleanMathEl=void 0;let g=f(282),u=f(639);o.createCleanMathEl=(b,y,m,w)=>{let n=b.createElement("math");if(n.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n.setAttribute("display",w?"block":"inline"),n.setAttribute("data-latex",m||""),y==null?void 0:y.mathml){let j=(0,u.parseHTML)(b,y.mathml).querySelector("math");j&&(0,u.transferContent)(j,n)}else m&&(n.textContent=m);return n},o.mathRules=[{selector:g.mathSelectors,element:"math",transform:(b,y)=>{if(!function(P){return"classList"in P&&"getAttribute"in P&&"querySelector"in P}(b))return b;let m=(0,g.getMathMLFromElement)(b),w=(0,g.getBasicLatexFromElement)(b),n=(0,g.isBlockDisplay)(b),j=(0,o.createCleanMathEl)(y,m,w,n);if(b.parentElement&&!b.matches('script[type^="math/"]'))b.parentElement.querySelectorAll('script[type^="math/"], .MathJax_Preview, script[type="text/javascript"][src*="mathjax"], script[type="text/javascript"][src*="katex"]').forEach((P)=>P.remove());return j}}]},20:(c,o,f)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.GrokExtractor=void 0;let g=f(181),u=f(639);class b extends g.ConversationExtractor{constructor(y,m){super(y,m),this.messageContainerSelector=".relative.group.flex.flex-col.justify-center.w-full",this.messageBubbles=y.querySelectorAll(this.messageContainerSelector),this.footnotes=[],this.footnoteCounter=0}canExtract(){return!!this.messageBubbles&&this.messageBubbles.length>0}extractMessages(){let y=[];return this.footnotes=[],this.footnoteCounter=0,this.messageBubbles&&this.messageBubbles.length!==0?(this.messageBubbles.forEach((m)=>{var w;let n=m.classList.contains("items-end"),j=m.classList.contains("items-start");if(!n&&!j)return;let P=m.querySelector(".message-bubble");if(!P)return;let S="",x="",M="";if(n)S=P.textContent||"",x="user",M="You";else if(j){x="assistant",M="Grok";let q=P.cloneNode(!0);(w=q.querySelector(".relative.border.border-border-l1.bg-surface-base"))===null||w===void 0||w.remove(),S=(0,u.serializeHTML)(q),S=this.processFootnotes(S)}S.trim()&&y.push({author:M,content:S.trim(),metadata:{role:x}})}),y):y}getFootnotes(){return this.footnotes}getMetadata(){var y;let m=this.getTitle(),w=((y=this.messageBubbles)===null||y===void 0?void 0:y.length)||0;return{title:m,site:"Grok",url:this.url,messageCount:w,description:`Grok conversation with ${w} messages`}}getTitle(){var y,m;let w=(y=this.document.title)===null||y===void 0?void 0:y.trim();if(w&&w!=="Grok"&&!w.startsWith("Grok by "))return w.replace(/\s-\s*Grok$/,"").trim();let n=this.document.querySelector(`${this.messageContainerSelector}.items-end`);if(n){let j=n.querySelector(".message-bubble");if(j){let P=((m=j.textContent)===null||m===void 0?void 0:m.trim())||"";return P.length>50?P.slice(0,50)+"...":P}}return"Grok Conversation"}processFootnotes(y){return y.replace(/<a\s+(?:[^>]*?\s+)?href="([^"]*)"[^>]*>(.*?)<\/a>/gi,(m,w,n)=>{if(!w||w.startsWith("#")||!w.match(/^https?:\/\//i))return m;let j;if(this.footnotes.find((P)=>P.url===w))j=this.footnotes.findIndex((P)=>P.url===w)+1;else{this.footnoteCounter++,j=this.footnoteCounter;let P=w;try{let S=new URL(w).hostname.replace(/^www\./,"");P=`<a href="${w}" target="_blank" rel="noopener noreferrer">${S}</a>`}catch(S){P=`<a href="${w}" target="_blank" rel="noopener noreferrer">${w}</a>`,console.warn(`GrokExtractor: Could not parse URL for footnote: ${w}`)}this.footnotes.push({url:w,text:P})}return`${n}<sup id="fnref:${j}" class="footnote-ref"><a href="#fn:${j}" class="footnote-link">${j}</a></sup>`})}}o.GrokExtractor=b},64:(c,o,f)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.XArticleExtractor=void 0;let g=f(279),u=f(639),b='[data-testid="twitterArticleRichTextView"]',y='[data-testid="twitter-article-title"]',m='[itemprop="author"]',w='meta[itemprop="name"]',n='meta[itemprop="additionalName"]',j='[data-testid="tweetPhoto"] img',P=".longform-unstyled, .public-DraftStyleDefault-block",S='span[style*="font-weight: bold"]',x="[data-offset-key]",M='[data-testid="simpleTweet"]',q='[data-testid="tweetText"]',z='[data-testid="User-Name"]',E='[data-testid="markdown-code-block"]';class D extends g.BaseExtractor{constructor(T,C,H){super(T,C,H),this.articleContainer=T.querySelector(b)}canExtract(){return!!this.articleContainer}extract(){let T=this.extractTitle(),C=this.extractAuthor(),H=this.extractContent(),K=this.createDescription();return{content:H,contentHtml:H,extractedContent:{articleId:this.getArticleId()},variables:{title:T,author:C,site:"X (Twitter)",description:K}}}extractTitle(){var T;let C=this.document.querySelector(y);return((T=C==null?void 0:C.textContent)===null||T===void 0?void 0:T.trim())||"Untitled X Article"}extractAuthor(){var T,C;let H=this.document.querySelector(m);if(!H)return this.getAuthorFromUrl();let K=(T=H.querySelector(w))===null||T===void 0?void 0:T.getAttribute("content"),O=(C=H.querySelector(n))===null||C===void 0?void 0:C.getAttribute("content");return K&&O?`${K} (@${O})`:K||O||this.getAuthorFromUrl()}getAuthorFromUrl(){let T=this.url.match(/\/([a-zA-Z][a-zA-Z0-9_]{0,14})\/article\/\d+/);return T?`@${T[1]}`:this.getAuthorFromOgTitle()}getAuthorFromOgTitle(){var T;let C=(((T=this.document.querySelector('meta[property="og:title"]'))===null||T===void 0?void 0:T.getAttribute("content"))||"").match(/^(?:\(\d+\)\s+)?(.+?)\s+on\s+X\s*:/);return C?C[1].trim():"Unknown"}getArticleId(){let T=this.url.match(/article\/(\d+)/);return T?T[1]:""}extractContent(){if(!this.articleContainer)return"";let T=this.articleContainer.cloneNode(!0);return this.cleanContent(T),`<article class="x-article">${(0,u.serializeHTML)(T)}</article>`}cleanContent(T){let C=T.ownerDocument||this.document;this.convertEmbeddedTweets(T,C),this.convertCodeBlocks(T,C),this.convertHeaders(T,C),this.unwrapLinkedImages(T,C),this.upgradeImageQuality(T),this.convertBoldSpans(T,C),this.convertDraftParagraphs(T,C),this.removeDraftAttributes(T)}convertEmbeddedTweets(T,C){T.querySelectorAll(M).forEach((H)=>{var K,O,I,N,F;let p=C.createElement("blockquote");p.className="embedded-tweet";let ht=H.querySelector(z),U=ht==null?void 0:ht.querySelectorAll("a"),Y=((O=(K=U==null?void 0:U[0])===null||K===void 0?void 0:K.textContent)===null||O===void 0?void 0:O.trim())||"",Q=((N=(I=U==null?void 0:U[1])===null||I===void 0?void 0:I.textContent)===null||N===void 0?void 0:N.trim())||"",G=H.querySelector(q),tt=((F=G==null?void 0:G.textContent)===null||F===void 0?void 0:F.trim())||"";if(Y||Q){let d=C.createElement("cite");d.textContent=Q?`${Y} ${Q}`:Y,p.appendChild(d)}if(tt){let d=C.createElement("p");d.textContent=tt,p.appendChild(d)}H.replaceWith(p)})}convertCodeBlocks(T,C){T.querySelectorAll(E).forEach((H)=>{var K;let O=H.querySelector("pre"),I=H.querySelector("code");if(!O||!I)return;let N="",F=I.className.match(/language-(\w+)/);if(F)N=F[1];else{let U=H.querySelector("span");N=((K=U==null?void 0:U.textContent)===null||K===void 0?void 0:K.trim())||""}let p=C.createElement("pre"),ht=C.createElement("code");N&&(ht.setAttribute("data-lang",N),ht.className=`language-${N}`),ht.textContent=I.textContent||"",p.appendChild(ht),H.replaceWith(p)})}convertHeaders(T,C){T.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach((H)=>{var K;let O=H.tagName.toLowerCase(),I=((K=H.textContent)===null||K===void 0?void 0:K.trim())||"";if(!I)return;let N=C.createElement(O);N.textContent=I,H.replaceWith(N)})}unwrapLinkedImages(T,C){T.querySelectorAll(j).forEach((H)=>{var K;let O=H.closest("a");if(!O||!T.contains(O))return;let I=H.getAttribute("src")||"",N=((K=H.getAttribute("alt"))===null||K===void 0?void 0:K.replace(/\s+/g," ").trim())||"Image";I=I.includes("&name=")?I.replace(/&name=\w+/,"&name=large"):I.includes("?")?`${I}&name=large`:`${I}?name=large`;let F=C.createElement("img");F.setAttribute("src",I),F.setAttribute("alt",N),O.replaceWith(F)})}upgradeImageQuality(T){T.querySelectorAll(j).forEach((C)=>{let H=C.getAttribute("src");H&&(H.includes("&name=")?C.setAttribute("src",H.replace(/&name=\w+/,"&name=large")):H.includes("?")?C.setAttribute("src",`${H}&name=large`):C.setAttribute("src",`${H}?name=large`))})}convertDraftParagraphs(T,C){T.querySelectorAll(P).forEach((H)=>{let K=C.createElement("p"),O=(I)=>{if(I.nodeType===3)K.appendChild(C.createTextNode(I.textContent||""));else if(I.nodeType===1){let N=I,F=N.tagName.toLowerCase();if(F==="strong"){let p=C.createElement("strong");p.textContent=N.textContent||"",K.appendChild(p)}else if(F==="a"){let p=C.createElement("a");p.setAttribute("href",N.getAttribute("href")||""),p.textContent=N.textContent||"",K.appendChild(p)}else if(F==="code"){let p=C.createElement("code");p.textContent=N.textContent||"",K.appendChild(p)}else N.childNodes.forEach((p)=>O(p))}};H.childNodes.forEach((I)=>O(I)),H.replaceWith(K)})}convertBoldSpans(T,C){T.querySelectorAll(S).forEach((H)=>{let K=C.createElement("strong");K.textContent=H.textContent||"",H.replaceWith(K)})}removeDraftAttributes(T){T.querySelectorAll(x).forEach((C)=>{C.removeAttribute("data-offset-key")})}createDescription(){var T,C;let H=((C=(T=this.articleContainer)===null||T===void 0?void 0:T.textContent)===null||C===void 0?void 0:C.trim())||"";return H.slice(0,140)+(H.length>140?"...":"")}}o.XArticleExtractor=D},181:(c,o,f)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ConversationExtractor=void 0;let g=f(279),u=f(628),b=f(639);class y extends g.BaseExtractor{getFootnotes(){return[]}extract(){var m;let w=this.extractMessages(),n=this.getMetadata(),j=this.getFootnotes(),P=this.createContentHtml(w,j),S=this.document.implementation.createHTMLDocument(),x=S.createElement("article");x.appendChild((0,b.parseHTML)(S,P)),S.body.appendChild(x);let M=new u.Defuddle(S).parse(),q=M.content;return{content:q,contentHtml:q,extractedContent:{messageCount:w.length.toString()},variables:{title:n.title||"Conversation",site:n.site,description:n.description||`${n.site} conversation with ${w.length} messages`,wordCount:((m=M.wordCount)===null||m===void 0?void 0:m.toString())||""}}}createContentHtml(m,w){return`${m.map((n,j)=>{let P=n.timestamp?`<div class="message-timestamp">${n.timestamp}</div>`:"",S=/<p[^>]*>[\s\S]*?<\/p>/i.test(n.content)?n.content:`<p>${n.content}</p>`,x=n.metadata?Object.entries(n.metadata).map(([M,q])=>`data-${M}="${q}"`).join(" "):"";return`
3
3
  <div class="message message-${n.author.toLowerCase()}" ${x}>
4
4
  <div class="message-header">
@@ -219,7 +219,7 @@ ${w.length>0?`
219
219
  `:s}};this.options=ln({},r,t),this.rules=new m2(this.options)}zi.prototype={turndown:function(t){if(!dn(t))throw TypeError(t+" is not a string, or an element/document/fragment node.");if(t==="")return"";var r=w2.call(this,new Un(t,this.options));return pn.call(this,r)},use:function(t){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.use(t[r]);else if(typeof t==="function")t(this);else throw TypeError("plugin must be a Function or an Array of Functions");return this},addRule:function(t,r){return this.rules.add(t,r),this},keep:function(t){return this.rules.keep(t),this},remove:function(t){return this.rules.remove(t),this},escape:function(t){return Qn.reduce(function(r,s){return r.replace(s[0],s[1])},t)}};function w2(t){var r=this;return Bn.call(t.childNodes,function(s,h){h=new Nn(h,r.options);var c="";if(h.nodeType===3)c=h.isCode?h.nodeValue:r.escape(h.nodeValue);else if(h.nodeType===1)c=Jn.call(r,h);return b2(s,c)},"")}function pn(t){var r=this;return this.rules.forEach(function(s){if(typeof s.append==="function")t=b2(t,s.append(r.options))}),t.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function Jn(t){var r=this.rules.forNode(t),s=w2.call(this,t),h=t.flankingWhitespace;if(h.leading||h.trailing)s=s.trim();return h.leading+r.replacement(s,t,this.options)+h.trailing}function b2(t,r){var s=c2(t),h=i2(r),c=Math.max(t.length-s.length,r.length-h.length),o=`
220
220
 
221
221
  `.substring(0,c);return s+o+h}function dn(t){return t!=null&&(typeof t==="string"||t.nodeType&&(t.nodeType===1||t.nodeType===9||t.nodeType===11))}_2.exports=zi});var yf=Ii(h1(),1),nf=Ii(i1(),1),gf=Ii(G1(),1);var Pf=Ii(S2(),1),Zn=U2((t,r)=>{var s={decodeValues:!0,map:!1,silent:!1};function h(y){return typeof y!=="string"||y in{}}function c(){return Object.create(null)}function o(y){return typeof y==="string"&&!!y.trim()}function f(y,m){var w=y.split(";").filter(o),n=w.shift(),j=g(n),P=j.name,S=j.value;if(m=m?Object.assign({},s,m):s,h(P))return null;try{S=m.decodeValues?decodeURIComponent(S):S}catch(M){console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",M)}var x=c();return x.name=P,x.value=S,w.forEach(function(M){var q=M.split("="),z=q.shift().trimLeft().toLowerCase();if(h(z))return;var E=q.join("=");if(z==="expires")x.expires=new Date(E);else if(z==="max-age"){var D=parseInt(E,10);if(!Number.isNaN(D))x.maxAge=D}else if(z==="secure")x.secure=!0;else if(z==="httponly")x.httpOnly=!0;else if(z==="samesite")x.sameSite=E;else if(z==="partitioned")x.partitioned=!0;else if(z)x[z]=E}),x}function g(y){var m="",w="",n=y.split("=");if(n.length>1)m=n.shift(),w=n.join("=");else w=y;return{name:m,value:w}}function u(y,m){if(m=m?Object.assign({},s,m):s,!y)if(!m.map)return[];else return c();if(y.headers)if(typeof y.headers.getSetCookie==="function")y=y.headers.getSetCookie();else if(y.headers["set-cookie"])y=y.headers["set-cookie"];else{var w=y.headers[Object.keys(y.headers).find(function(j){return j.toLowerCase()==="set-cookie"})];if(!w&&y.headers.cookie&&!m.silent)console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning.");y=w}if(!Array.isArray(y))y=[y];if(!m.map)return y.filter(o).map(function(j){return f(j,m)}).filter(Boolean);else{var n=c();return y.filter(o).reduce(function(j,P){var S=f(P,m);if(S&&!h(S.name))j[S.name]=S;return j},n)}}function b(y){if(Array.isArray(y))return y;if(typeof y!=="string")return[];var m=[],w=0,n,j,P,S,x;function M(){while(w<y.length&&/\s/.test(y.charAt(w)))w+=1;return w<y.length}function q(){return j=y.charAt(w),j!=="="&&j!==";"&&j!==","}while(w<y.length){n=w,x=!1;while(M())if(j=y.charAt(w),j===","){P=w,w+=1,M(),S=w;while(w<y.length&&q())w+=1;if(w<y.length&&y.charAt(w)==="=")x=!0,w=S,m.push(y.substring(n,P)),n=w;else w=P+1}else w+=1;if(!x||w>=y.length)m.push(y.substring(n,y.length))}return m}r.exports=u,r.exports.parse=u,r.exports.parseString=f,r.exports.splitCookiesString=b});function a2(t){let r={};return r.title=t.querySelector("title")?.textContent||void 0,r.description=t.querySelector('meta[name="description"]')?.getAttribute("content")||void 0,r.keywords=t.querySelector('meta[name="keywords"]')?.getAttribute("content")||void 0,r.author=t.querySelector('meta[name="author"]')?.getAttribute("content")||void 0,r.ogTitle=t.querySelector('meta[property="og:title"]')?.getAttribute("content")||void 0,r.ogDescription=t.querySelector('meta[property="og:description"]')?.getAttribute("content")||void 0,r.ogImage=t.querySelector('meta[property="og:image"]')?.getAttribute("content")||void 0,r.twitterTitle=t.querySelector('meta[name="twitter:title"]')?.getAttribute("content")||void 0,r.twitterDescription=t.querySelector('meta[name="twitter:description"]')?.getAttribute("content")||void 0,r.twitterImage=t.querySelector('meta[name="twitter:image"]')?.getAttribute("content")||void 0,r.canonical=t.querySelector('link[rel="canonical"]')?.getAttribute("href")||void 0,r}function N2(t){let r=[];if(t.title)r.push(`title: ${t.title}`);if(t.description)r.push(`description: ${t.description}`);if(t.keywords)r.push(`keywords: ${t.keywords}`);if(t.author)r.push(`author: ${t.author}`);if(t.ogTitle||t.ogDescription||t.ogImage){if(r.push("og:"),t.ogTitle)r.push(` title: ${t.ogTitle}`);if(t.ogDescription)r.push(` description: ${t.ogDescription}`);if(t.ogImage)r.push(` image: ${t.ogImage}`)}if(t.twitterTitle||t.twitterDescription||t.twitterImage){if(r.push("twitter:"),t.twitterTitle)r.push(` title: ${t.twitterTitle}`);if(t.twitterDescription)r.push(` description: ${t.twitterDescription}`);if(t.twitterImage)r.push(` image: ${t.twitterImage}`)}if(t.canonical)r.push(`canonical: ${t.canonical}`);return r.join(`
222
- `)}function $n(t){let{memory:r,__wbindgen_export_0:s,__wbindgen_malloc:h,__wbindgen_realloc:c,__wbindgen_free:o,parse_wasm:f,parse_frag_wasm:g}=t;{let M=s,q=M.grow(4);M.set(0,void 0),M.set(q+0,void 0),M.set(q+1,null),M.set(q+2,!0),M.set(q+3,!1)}let u=0,b=null;function y(){if(b===null||b.byteLength===0)b=new Uint8Array(r.buffer);return b}let m=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},w=function(M,q){return m.encodeInto(M,q)};function n(M,q,z){if(z===void 0){let H=m.encode(M),K=q(H.length,1)>>>0;return y().subarray(K,K+H.length).set(H),u=H.length,K}let E=M.length,D=q(E,1)>>>0,T=y(),C=0;for(;C<E;C++){let H=M.charCodeAt(C);if(H>127)break;T[D+C]=H}if(C!==E){if(C!==0)M=M.slice(C);D=z(D,E,E=C+M.length*3,1)>>>0;let H=y().subarray(D+C,D+E),K=w(M,H);C+=K.written,D=z(D,E,C,1)>>>0}return u=C,D}let j=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};if(typeof TextDecoder<"u")j.decode();function P(M,q){return M=M>>>0,j.decode(y().subarray(M,M+q))}function S(M){let q,z;try{let E=n(M,h,c),D=f(E,u);return q=D[0],z=D[1],P(D[0],D[1])}finally{o(q,z,1)}}function x(M,q){let z,E;try{let D=n(M,h,c),T=u,C=n(q,h,c),H=g(D,T,C,u);return z=H[0],E=H[1],P(H[0],H[1])}finally{o(z,E,1)}}return{parse:S,parse_frag:x}}async function tg(){let{parse:t,parse_frag:r,...s}=(await import("./chunk-tmyzfvsy.js")).default;return s.parse_wasm=t,s.parse_frag_wasm=r,$n(s)}var Hi=(t)=>{console.error("Error: deno-dom: No parser registered"),Deno.exit(1)},Y2=(t,r)=>{console.error("Error: deno-dom: No parser registered"),Deno.exit(1)},rg=Hi;function sg(t,r){if(Hi!==rg)return;Hi=t,Y2=r}var pt=Symbol("CTOR_KEY"),uw=(()=>{var t=Symbol.hasInstance;return class{constructor(){throw TypeError("Illegal constructor")}static[t](r){return r?.constructor===Vi}}})(),hg=Symbol("HTMLCollectionMutatorSym"),Vi=(()=>{class t extends Array{forEach(r,s){super.forEach(r,s)}item(r){return this[r]??null}[hg](){return{push:Array.prototype.push.bind(this),splice:Array.prototype.splice.bind(this),indexOf:Array.prototype.indexOf.bind(this)}}toString(){return"[object HTMLCollection]"}}return t})();for(let t of["from","isArray","of"])Vi[t]=void 0;for(let t of["concat","copyWithin","every","fill","filter","find","findIndex","flat","flatMap","includes","indexOf","join","lastIndexOf","map","pop","push","reduce","reduceRight","reverse","shift","slice","some","sort","splice","toLocaleString","unshift","entries","forEach","keys","values"])Vi.prototype[t]=void 0;var j4=Vi,ww=(()=>{var t=Symbol.hasInstance;return class{constructor(){throw TypeError("Illegal constructor")}static[t](r){return r?.constructor===Ri}}})(),Ah=Symbol("nodeListMutatorSym"),A2=Symbol("nodeListCachedMutator"),{push:y4,splice:n4,slice:ig,indexOf:g4,filter:M2}=Array.prototype;class v2{arrayInstance;elementViews;constructor(t){this.arrayInstance=t,this.elementViews=[]}push(...t){for(let r of this.elementViews)for(let s of t)if(s.nodeType===Yt.ELEMENT_NODE)y4.call(r,s);return y4.call(this.arrayInstance,...t)}splice(t,r=0,...s){for(let h of this.elementViews){let c=M2.call(ig.call(this.arrayInstance,t,t+r),(g)=>g.nodeType===Yt.ELEMENT_NODE),o=s.filter((g)=>g.nodeType===Yt.ELEMENT_NODE),f=-1;for(let g=t;g<this.arrayInstance.length;g++){let u=this.arrayInstance[g];if(u.nodeType===Yt.ELEMENT_NODE){f=g4.call(h,u);break}}if(f===-1)f=h.length;if(c.length)n4.call(h,f,c.length);n4.call(h,f,0,...o)}return n4.call(this.arrayInstance,t,r,...s)}indexOf(t,r=0){return g4.call(this.arrayInstance,t,r)}indexOfElementsView(t,r=0){return g4.call(this.elementsView(),t,r)}elementsView(){let t=this.elementViews[0];if(!t)t=new j4,this.elementViews.push(t),y4.call(t,...M2.call(this.arrayInstance,(r)=>r.nodeType===Yt.ELEMENT_NODE));return t}}var Ri=(()=>{class t extends Array{forEach(r,s){super.forEach(r,s)}item(r){return this[r]??null}[Ah](){let r=this[A2];if(r)return r;else{let s=new v2(this);return this[A2]=s,s}}toString(){return"[object NodeList]"}}return t})();for(let t of["from","isArray","of"])Ri[t]=void 0;for(let t of["concat","copyWithin","every","fill","filter","find","findIndex","flat","flatMap","includes","indexOf","join","lastIndexOf","map","pop","push","reduce","reduceRight","reverse","shift","slice","some","sort","splice","toLocaleString","unshift"])Ri.prototype[t]=void 0;var Xs=Ri,_h={Element:null,Document:null,DocumentFragment:null},G2=/[A-Z]/,B2=/[a-z]/;function ji(t){let r="data-";for(let s of t)if(G2.test(s))r+="-"+s.toLowerCase();else r+=s;return r}function cg(t){let r="",s="";for(let h of t.slice(5))if(s==="-"&&B2.test(h))r+=h.toUpperCase(),s="";else r+=s,s=h;return r+s}function ki(t,r,s){for(let h of t.childNodes)if(h.nodeType===xt.ELEMENT_NODE){let c=0;for(let o of r)if(h.classList.contains(o))c++;if(c===r.length)s.push(h);ki(h,r,s)}return s}function E2(t){return"<"+t.localName+Q2(t)+">"}var P2=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function w4(t,r){let s="",h="",c="";if(r){if(s=E2(t),h=`</${t.localName}>`,P2.has(t.localName))return s}let o=[t.localName==="template"?t.content.childNodes:t.childNodes],f=[0],g=[h],u=0;t:while(u>-1){let b=o[u][f[u]];if(b)switch(b.nodeType){case xt.ELEMENT_NODE:{c+=E2(b);let y=b.localName;if(!P2.has(y)){if(y==="template")o.push(b.content.childNodes);else o.push(b.childNodes);f.push(0),g.push(`</${y}>`),u++;continue t}break}case xt.COMMENT_NODE:c+=`<!--${b.data}-->`;break;case xt.TEXT_NODE:switch(b.parentNode.localName){case"style":case"script":case"xmp":case"iframe":case"noembed":case"noframes":case"plaintext":{c+=b.data;break}case"noscript":{c+=b.data;break}default:{c+=b.data.replace(/&/g,"&amp;").replace(/\xA0/g,"&nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");break}}break}else u--,f.pop(),o.pop(),c+=g.pop();f[u]++}return s+c}function Q2(t){let r="";for(let s of t.getAttributeNames())r+=` ${s}`,r+=`="${t.getAttribute(s).replace(/&/g,"&amp;").replace(/\xA0/g,"&nbsp;").replace(/"/g,"&quot;")}"`;return r}function Di(t,r,s){let h=t.parentNode,c=h._getChildNodesMutator(),o=null;{let g=s?-1:1;for(let u=c.indexOf(t)+g;0<=u&&u<h.childNodes.length;u+=g)if(!r.includes(h.childNodes[u])){o=h.childNodes[u];break}}r=ys(r,h);let f;if(o)f=c.indexOf(o)+(s?1:0);else f=s?0:h.childNodes.length;c.splice(f,0,...r)}function b4(t){let r=t;if(!(r&&typeof r==="object"))return!1;while(!0)switch(r.constructor){case _h.DocumentFragment:return!0;case Yt:case _h.Element:return!1;case Object:case null:case void 0:return!1;default:r=Reflect.getPrototypeOf(r)}}function _4(t,r){let s=t.childNodes.length;for(let h of t.childNodes)h._setParent(r);t._getChildNodesMutator().splice(0,s)}var xt=function(t){return t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t[t.NOTATION_NODE=12]="NOTATION_NODE",t}({});function ys(t,r){return t.flatMap((s)=>{if(b4(s)){let h=Array.from(s.childNodes);return _4(s,r),h}else{let h=s instanceof Yt?s:new ms(String(s));if(s===h&&r)r._assertNotAncestor(h);return h._remove(!0),h._setParent(r,!0),[h]}})}class Yt extends EventTarget{nodeName;nodeType;#t;parentNode;#h;get parentElement(){if(this.parentNode?.nodeType===xt.ELEMENT_NODE)return this.parentNode;return null}static ELEMENT_NODE=xt.ELEMENT_NODE;static ATTRIBUTE_NODE=xt.ATTRIBUTE_NODE;static TEXT_NODE=xt.TEXT_NODE;static CDATA_SECTION_NODE=xt.CDATA_SECTION_NODE;static ENTITY_REFERENCE_NODE=xt.ENTITY_REFERENCE_NODE;static ENTITY_NODE=xt.ENTITY_NODE;static PROCESSING_INSTRUCTION_NODE=xt.PROCESSING_INSTRUCTION_NODE;static COMMENT_NODE=xt.COMMENT_NODE;static DOCUMENT_NODE=xt.DOCUMENT_NODE;static DOCUMENT_TYPE_NODE=xt.DOCUMENT_TYPE_NODE;static DOCUMENT_FRAGMENT_NODE=xt.DOCUMENT_FRAGMENT_NODE;static NOTATION_NODE=xt.NOTATION_NODE;constructor(t,r,s,h){if(h!==pt)throw TypeError("Illegal constructor.");if(super(),this.nodeName=t,this.nodeType=r,this.#t=null,this.parentNode=null,this.#h=null,this.#s=null,this.#t=null,s)s.appendChild(this)}#s;get childNodes(){return this.#s||(this.#s=new Xs)}_getChildNodesMutator(){return this.childNodes[Ah]()}_hasInitializedChildNodes(){return Boolean(this.#s)}_setParent(t,r=!1){let s=this.parentNode===t,h=!s||r;if(h){if(this.parentNode=t,t){if(!s)this._setOwnerDocument(t.#h)}if(this._hasInitializedChildNodes())for(let c of this.childNodes)c._setParent(this,h)}}_assertNotAncestor(t){if(t.contains(this))throw new DOMException("The new child is an ancestor of the parent")}_setOwnerDocument(t){if(this.#h!==t){if(this.#h=t,this._hasInitializedChildNodes())for(let r of this.childNodes)r._setOwnerDocument(t)}}contains(t){let r=t;while(r){if(r===this)return!0;r=r.parentNode}return!1}get ownerDocument(){return this.#h}get nodeValue(){return this.#t}set nodeValue(t){}get textContent(){let t="";for(let r of this.childNodes)switch(r.nodeType){case xt.TEXT_NODE:t+=r.nodeValue;break;case xt.ELEMENT_NODE:t+=r.textContent;break}return t}set textContent(t){for(let r of this.childNodes)r._setParent(null);this._getChildNodesMutator().splice(0,this.childNodes.length),this.appendChild(new ms(t))}get firstChild(){if(!this._hasInitializedChildNodes())return null;return this.childNodes[0]||null}get lastChild(){if(!this._hasInitializedChildNodes())return null;return this.childNodes[this.childNodes.length-1]||null}hasChildNodes(){return this._hasInitializedChildNodes()&&Boolean(this.childNodes.length)}cloneNode(t=!1){let r=this._shallowClone();if(r._setOwnerDocument(this.ownerDocument),t&&this._hasInitializedChildNodes())for(let s of this.childNodes)r.appendChild(s.cloneNode(!0));return r}_shallowClone(){throw Error("Illegal invocation")}_remove(t=!1){let r=this.parentNode;if(r){let s=r._getChildNodesMutator(),h=s.indexOf(this);if(s.splice(h,1),!t)this._setParent(null)}}appendChild(t){if(b4(t))return this._getChildNodesMutator().push(...t.childNodes),_4(t,this),t;else return t._appendTo(this)}_appendTo(t){t._assertNotAncestor(this);let r=this.parentNode;if(r===t){if(t._getChildNodesMutator().indexOf(this)!==-1)return this}else if(r)this._remove();return this._setParent(t,!0),t._getChildNodesMutator().push(this),this}removeChild(t){if(t&&typeof t==="object")if(t.parentNode===this)return t._remove(),t;else throw new DOMException("Node.removeChild: The node to be removed is not a child of this node");else throw TypeError("Node.removeChild: Argument 1 is not an object.")}replaceChild(t,r){if(r.parentNode!==this)throw Error("Old child's parent is not the current node.");return r._replaceWith(t),r}insertBefore(t,r){this._assertNotAncestor(t);let s=this._getChildNodesMutator();if(r===null)return this.appendChild(t),t;let h=s.indexOf(r);if(h===-1)throw Error("DOMException: Child to insert before is not a child of this node");if(b4(t))s.splice(h,0,...t.childNodes),_4(t,this);else{let c=t.parentNode,o=c?._getChildNodesMutator();if(o)o.splice(o.indexOf(t),1);t._setParent(this,c!==this),s.splice(h,0,t)}return t}_replaceWith(...t){if(this.parentNode){let r=this.parentNode,s=r._getChildNodesMutator(),h=null;{let f=s.indexOf(this);for(let g=f+1;g<r.childNodes.length;g++)if(!t.includes(r.childNodes[g])){h=r.childNodes[g];break}}t=ys(t,r);let c=h?s.indexOf(h):r.childNodes.length,o;if(r.childNodes[c-1]===this)c--,o=1;else o=0;s.splice(c,o,...t),this._setParent(null)}}get nextSibling(){let t=this.parentNode;if(!t)return null;let r=t._getChildNodesMutator().indexOf(this);return t.childNodes[r+1]||null}get previousSibling(){let t=this.parentNode;if(!t)return null;let r=t._getChildNodesMutator().indexOf(this);return t.childNodes[r-1]||null}static DOCUMENT_POSITION_DISCONNECTED=1;static DOCUMENT_POSITION_PRECEDING=2;static DOCUMENT_POSITION_FOLLOWING=4;static DOCUMENT_POSITION_CONTAINS=8;static DOCUMENT_POSITION_CONTAINED_BY=16;static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;compareDocumentPosition(t){if(t===this)return 0;if(!(t instanceof Yt))throw TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");let r=t,s=this,h=[r],c=[s];while(r.parentNode??s.parentNode)r=r.parentNode?(h.push(r.parentNode),r.parentNode):r,s=s.parentNode?(c.push(s.parentNode),s.parentNode):s;if(r!==s)return Yt.DOCUMENT_POSITION_DISCONNECTED|Yt.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|Yt.DOCUMENT_POSITION_PRECEDING;let o=h.length>c.length?h:c,f=o===h?c:h;if(o[o.length-f.length]===f[0])return o===h?Yt.DOCUMENT_POSITION_CONTAINED_BY|Yt.DOCUMENT_POSITION_FOLLOWING:Yt.DOCUMENT_POSITION_CONTAINS|Yt.DOCUMENT_POSITION_PRECEDING;let g=o.length-f.length;for(let u=f.length-1;u>=0;u--){let b=f[u],y=o[g+u];if(y!==b){let m=b.parentNode._getChildNodesMutator();if(m.indexOf(b)<m.indexOf(y))if(f===h)return Yt.DOCUMENT_POSITION_PRECEDING;else return Yt.DOCUMENT_POSITION_FOLLOWING;else if(o===h)return Yt.DOCUMENT_POSITION_PRECEDING;else return Yt.DOCUMENT_POSITION_FOLLOWING}}return Yt.DOCUMENT_POSITION_FOLLOWING}getRootNode(t={}){if(this.parentNode)return this.parentNode.getRootNode(t);if(t.composed&&this.host)return this.host.getRootNode(t);return this}}Yt.prototype.ELEMENT_NODE=xt.ELEMENT_NODE;Yt.prototype.ATTRIBUTE_NODE=xt.ATTRIBUTE_NODE;Yt.prototype.TEXT_NODE=xt.TEXT_NODE;Yt.prototype.CDATA_SECTION_NODE=xt.CDATA_SECTION_NODE;Yt.prototype.ENTITY_REFERENCE_NODE=xt.ENTITY_REFERENCE_NODE;Yt.prototype.ENTITY_NODE=xt.ENTITY_NODE;Yt.prototype.PROCESSING_INSTRUCTION_NODE=xt.PROCESSING_INSTRUCTION_NODE;Yt.prototype.COMMENT_NODE=xt.COMMENT_NODE;Yt.prototype.DOCUMENT_NODE=xt.DOCUMENT_NODE;Yt.prototype.DOCUMENT_TYPE_NODE=xt.DOCUMENT_TYPE_NODE;Yt.prototype.DOCUMENT_FRAGMENT_NODE=xt.DOCUMENT_FRAGMENT_NODE;Yt.prototype.NOTATION_NODE=xt.NOTATION_NODE;class F4 extends Yt{#t="";constructor(t,r,s,h,c){super(r,s,h,c);this.#t=t}get nodeValue(){return this.#t}set nodeValue(t){this.#t=String(t??"")}get data(){return this.#t}set data(t){this.nodeValue=t}get textContent(){return this.#t}set textContent(t){this.nodeValue=t}get length(){return this.data.length}before(...t){if(this.parentNode)Di(this,t,!0)}after(...t){if(this.parentNode)Di(this,t,!1)}remove(){this._remove()}replaceWith(...t){this._replaceWith(...t)}}class ms extends F4{constructor(t=""){super(String(t),"#text",xt.TEXT_NODE,null,pt)}_shallowClone(){return new ms(this.textContent)}}class Ui extends F4{constructor(t=""){super(String(t),"#comment",xt.COMMENT_NODE,null,pt)}_shallowClone(){return new Ui(this.textContent)}get textContent(){return this.nodeValue}}var x2=new Map,q2=new Map;function Ki(t){return x2.get(t)??x2.set(t,t.toUpperCase()).get(t)}function vr(t){return q2.get(t)??q2.set(t,t.toLowerCase()).get(t)}var p2,J2,d2;p2=Symbol.iterator;class Br{static#t=32;#h="";get#s(){return this.#h}set#s(t){this.#h=t,this.#i(t)}#r=[];#i;constructor(t,r){if(r!==pt)throw TypeError("Illegal constructor");this.#i=t}static#c(t){return t===""||/[\t\n\f\r ]/.test(t)}#o(){let t=Array.from(this.#r);for(let r=0;r<t.length;r++)this[r]=t[r]}set value(t){if(this.#s=t,this.#r=t.trim().split(/[\t\n\f\r\s]+/g).filter(Boolean),this.#r.length>Br.#t)this.#r=new Set(this.#r);else{let r=[];for(let s of this.#r)if(!r.includes(s))r.push(s);this.#r=r}this.#o()}get value(){return this.#h}get length(){if(this.#r.constructor===Array)return this.#r.length;else return this.#r.size}*entries(){let t=Array.from(this.#r);for(let r=0;r<t.length;r++)yield[r,t[r]]}*values(){yield*this.#r.values()}*keys(){let t=this.length;for(let r=0;r<t;r++)yield r}*[p2](){yield*this.#r.values()}item(t){if(t=Number(t),Number.isNaN(t)||t===1/0)t=0;return this[Math.trunc(t)%4294967296]??null}contains(t){if(this.#r.constructor===Array)return this.#r.includes(t);else return this.#r.has(t)}#f(t){let r=this.#r;if(!r.includes(t))this[r.length]=t,r.push(t)}#n(t){let r=this.#r,{size:s}=r;if(r.add(t),s<r.size)this[s]=t}add(...t){let r=(this.#r.constructor===Array?this.#f:this.#n).bind(this);for(let s of t){if(Br.#c(s))throw new DOMException("Failed to execute 'add' on 'DOMTokenList': The token provided must not be empty.");r(s)}this.#y()}#g(t){let r=this.#r,s=r.indexOf(t);if(s>=0)r.splice(s,1)}#m(t){this.#r.delete(t)}remove(...t){let r=(this.#r.constructor===Array?this.#g:this.#m).bind(this),s=this.length;for(let c of t){if(Br.#c(c))throw new DOMException("Failed to execute 'remove' on 'DOMTokenList': The token provided must not be empty.");r(c)}let h=this.length;if(s!==h){for(let c=h;c<s;c++)delete this[c];this.#o()}this.#y()}replace(t,r){let s=this.#r.constructor===Array,h=(s?this.#g:this.#m).bind(this),c=(s?this.#f:this.#n).bind(this);if([t,r].some((o)=>Br.#c(o)))throw new DOMException("Failed to execute 'replace' on 'DOMTokenList': The token provided must not be empty.");if(!this.contains(t))return!1;if(this.contains(r))this.remove(t);else h(t),c(r),this.#o(),this.#y();return!0}supports(){throw Error("Not implemented")}toggle(t,r){if(r!==void 0)return this[r?"add":"remove"](t),!1;else{let s=this.contains(t);return this[s?"remove":"add"](t),!s}}forEach(t){for(let[r,s]of this.entries())t(s,r,this)}#y(){if(this.#s=Array.from(this.#r).join(" "),this.#r.constructor===Array&&this.#r.length>Br.#t)this.#r=new Set(this.#r)}}var Ci=Symbol("initializeClassListSym"),Dr=Symbol("domTokenListCurrentElementSym");J2=Symbol.iterator;class Z2{[Dr];constructor(t){this[Dr]=t}#t(){let t=this[Dr].classList;if(t===this)return null;return t}set value(t){this[Dr][Ci](),this[Dr].classList.value=String(t)}get value(){return this.#t()?.value??""}get length(){return this.#t()?.length??0}*entries(){let t=this.#t();if(t)yield*t.entries()}*values(){let t=this.#t();if(t)yield*t.values()}*keys(){let t=this.#t();if(t)yield*t.keys()}*[J2](){yield*this.values()}item(t){return this.#t()?.item(t)??null}contains(t){return this.#t()?.contains(t)??!1}add(...t){this[Dr][Ci](),this[Dr].classList.add(...t)}remove(...t){this.#t()?.remove(...t)}replace(t,r){return this.#t()?.replace(t,r)??!1}supports(){throw Error("Not implemented")}toggle(t,r){if(r===!1)return this.#t()?.toggle(t,r)??!1;return this[Dr][Ci](),this[Dr].classList.add(t),!0}forEach(t){this.#t()?.forEach(t)}}var wh=Symbol("setNamedNodeMapOwnerElementSym"),$2=Symbol("setAttrValueSym");class ei extends Yt{#t=null;#h="";#s="";#r=null;constructor(t,r,s,h){if(h!==pt)throw TypeError("Illegal constructor");super(r,xt.ATTRIBUTE_NODE,null,pt);this.#h=r,this.#s=s,this.#t=t}[wh](t){if(this.#r=t,this.#t=t?.attributes??null,t)this._setOwnerDocument(t.ownerDocument)}[$2](t){this.#s=t}_shallowClone(){let t=new ei(null,this.#h,this.#s,pt);return t._setOwnerDocument(this.ownerDocument),t}cloneNode(){return super.cloneNode()}appendChild(){throw new DOMException("Cannot add children to an Attribute")}replaceChild(){throw new DOMException("Cannot add children to an Attribute")}insertBefore(){throw new DOMException("Cannot add children to an Attribute")}removeChild(){throw new DOMException("The node to be removed is not a child of this node")}get name(){return this.#h}get localName(){return this.#h}get value(){return this.#s}set value(t){if(this.#s=String(t),this.#t)this.#t[Ks](this.#h,this.#s,!0)}get ownerElement(){return this.#r??null}get specified(){return!0}get prefix(){return null}}var Ks=Symbol("setNamedNodeMapValueSym"),Ti=Symbol("getNamedNodeMapValueSym"),tf=Symbol("getNamedNodeMapAttrNamesSym"),Fi=Symbol("getNamedNodeMapAttrNodeSym"),S4=Symbol("removeNamedNodeMapAttrSym");d2=Symbol.iterator;class L4{static#t=function(t,r){if(r+1>this.length)return;let s=Object.keys(t).filter((h)=>t[h]!==void 0)[r]?.slice(1);return this[Fi](s)};#h;constructor(t,r,s){if(s!==pt)throw TypeError("Illegal constructor.");this.#o=t,this.#h=r;for(let h of t.getAttributeNames())this[Ks](h,t.getAttribute(h))}#s={};#r={};#i=0;#c=0;#o=null;[Fi](t){let r="a"+t,s=this.#s[r];if(!s)s=this.#s[r]=new ei(this,t,this.#r[r],pt),s[wh](this.#o);return s}[tf](){let t=[];for(let[r,s]of Object.entries(this.#r))if(s!==void 0)t.push(r.slice(1));return t}[Ti](t){let r="a"+t;return this.#r[r]}[Ks](t,r,s=!1){let h="a"+t;if(this.#r[h]===void 0){if(this.#i++,this.#i>this.#c){this.#c=this.#i;let c=this.#c-1;Object.defineProperty(this,String(this.#c-1),{get:L4.#t.bind(this,this.#r,c)})}}else if(this.#s[h])this.#s[h][$2](r);if(this.#r[h]=r,s)this.#h(t,r)}[S4](t){let r="a"+t;if(this.#r[r]!==void 0){this.#i--,this.#r[r]=void 0,this.#h(t,null);let s=this.#s[r];if(s)s[wh](null),this.#s[r]=void 0}}*[d2](){for(let t=0;t<this.length;t++)yield this[t]}get length(){return this.#i}item(t){if(t>=this.#i)return null;return this[t]}getNamedItem(t){let r="a"+t;if(this.#r[r]!==void 0)return this[Fi](t);return null}setNamedItem(t){if(t.ownerElement)throw new DOMException("Attribute already in use");let r="a"+t.name,s=this.#s[r];if(s)s[wh](null),this.#r[r]=void 0;t[wh](this.#o),this.#s[r]=t,this[Ks](t.name,t.value,!0)}removeNamedItem(t){let r="a"+t;if(this.#r[r]!==void 0){let s=this[Fi](t);return this[S4](t),s}throw new DOMException("Node was not found")}}var rf=":A-Za-z_"+String.raw`\u{C0}-\u{D6}\u{D8}-\u{F6}\u{F8}-\u{2FF}\u{370}-\u{37D}`+String.raw`\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}`+String.raw`\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}`,og=rf+String.raw`\u{B7}\u{0300}-\u{036F}\u{203F}-\u{2040}0-9.-`,bw=new RegExp(`[${rf}]`,"u"),fg=new RegExp(`[${og}]`,"u");class Sr extends Yt{#t=null;get attributes(){if(!this.#t)this.#t=new L4(this,(t,r)=>{let s=r===null;if(r===null)r="";switch(t){case"class":{if(s)this.#c=-1;else if(this.#c===-1)this.#c=this.#i+1;this.#r=r,this.#f.value=r;break}case"id":{if(s)this.#i=-1;else if(this.#i===-1)this.#i=this.#c+1;this.#s=r;break}}},pt);return this.#t}#h=null;#s="";#r="";#i=-1;#c=-1;#o=new Z2(this);get#f(){return this.#o}[Ci](){if(this.#o.constructor===Br)return;this.#o=new Br((t)=>{if(this.#r!==t){if(this.#r=t,this.#c===-1)this.#c=this.#i+1;if(this.#t&&(this.hasAttribute("class")||t!==""))this.attributes[Ks]("class",t)}},pt)}constructor(t,r,s,h){super(t,xt.ELEMENT_NODE,r,h);for(let c of s)this.setAttribute(c[0],c[1]);this.nodeName=Ki(t)}get tagName(){return this.nodeName}get localName(){return vr(this.tagName)}_shallowClone(){let t=[];for(let r of this.getAttributeNames())t.push([r,this.getAttribute(r)]);return new Sr(this.nodeName,null,t,pt)}get childElementCount(){return this._getChildNodesMutator().elementsView().length}get className(){return this.#r}set className(t){this.#f.value=t}get classList(){return this.#f}get outerHTML(){return w4(this,!0)}set outerHTML(t){if(this.parentNode){let{parentElement:r,parentNode:s}=this,h=r?.localName;switch(s.nodeType){case xt.DOCUMENT_NODE:throw new DOMException("Modifications are not allowed for this document");case xt.DOCUMENT_FRAGMENT_NODE:h="body";default:{let{childNodes:c}=E4(t,h).childNodes[0],o=s._getChildNodesMutator(),f=o.indexOf(this);for(let g=c.length-1;g>=0;g--){let u=c[g];o.splice(f,0,u),u._setParent(s),u._setOwnerDocument(s.ownerDocument)}this.remove()}}}}get innerHTML(){return w4(this,!1)}set innerHTML(t){for(let s of this.childNodes)s._setParent(null);let r=this._getChildNodesMutator();if(r.splice(0,this.childNodes.length),t.length){let s=E4(t,this.localName);for(let h of s.childNodes[0].childNodes)r.push(h);for(let h of this.childNodes)h._setParent(this),h._setOwnerDocument(this.ownerDocument)}}get innerText(){return this.textContent}set innerText(t){this.textContent=t}get children(){return this._getChildNodesMutator().elementsView()}get id(){return this.#s||""}set id(t){this.setAttribute("id",t)}get dataset(){if(this.#h)return this.#h;return this.#h=new Proxy({},{get:(t,r,s)=>{if(typeof r==="string"){let h=ji(r);return this.getAttribute(h)??void 0}return},set:(t,r,s,h)=>{if(typeof r==="string"){let c="data-",o="";for(let f of r){if(o==="-"&&B2.test(f))throw new DOMException("An invalid or illegal string was specified");if(!fg.test(f))throw new DOMException("String contains an invalid character");if(G2.test(f))c+="-";c+=f.toLowerCase(),o=f}this.setAttribute(c,String(s))}return!0},deleteProperty:(t,r)=>{if(typeof r==="string"){let s=ji(r);this.removeAttribute(s)}return!0},ownKeys:(t)=>{return this.getAttributeNames().flatMap((r)=>{if(r.startsWith?.("data-"))return[cg(r)];else return[]})},getOwnPropertyDescriptor:(t,r)=>{if(typeof r==="string"){let s=ji(r);if(this.hasAttribute(s))return{writable:!0,enumerable:!0,configurable:!0}}return},has:(t,r)=>{if(typeof r==="string"){let s=ji(r);return this.hasAttribute(s)}return!1}}),this.#h}getAttributeNames(){if(!this.#t){let t=[],r=Number(this.#i>this.#c);for(let s=0;s<2;s++)switch((s+r)%2){case 0:{~this.#i&&t.push("id");break}case 1:{~this.#c&&t.push("class");break}}return t}return this.attributes[tf]()}getAttribute(t){let r=vr(String(t));switch(r){case"id":if(~this.#i)return this.#s;else return null;case"class":if(~this.#c)return this.#r;else return null}if(!this.#t)return null;return this.attributes[Ti](r)??null}setAttribute(t,r){let s=vr(String(t)),h=String(r),c=!1;switch(s){case"id":{if(this.#s=h,this.#i===-1)this.#i=this.#c+1;break}case"class":{if(this.#f.value=h,this.#c===-1)this.#c=this.#i+1;break}default:c=!0}if(this.#t||c)this.attributes[Ks](s,h)}removeAttribute(t){let r=vr(String(t));switch(r){case"id":{this.#s="",this.#i=-1;break}case"class":{this.#f.value="",this.#c=-1;break}}if(!this.#t)return;this.attributes[S4](r)}toggleAttribute(t,r){let s=vr(String(t));if(this.hasAttribute(s)){if(r===void 0||r===!1)return this.removeAttribute(s),!1;return!0}if(r===void 0||r===!0)return this.setAttribute(s,""),!0;return!1}hasAttribute(t){let r=vr(String(t));switch(r){case"id":return Boolean(~this.#i);case"class":return Boolean(~this.#c)}if(!this.#t)return!1;return this.attributes[Ti](r)!==void 0}hasAttributeNS(t,r){let s=vr(String(r));switch(s){case"id":return Boolean(~this.#i);case"class":return Boolean(~this.#c)}if(!this.#t)return!1;return this.attributes[Ti](s)!==void 0}getAttributeNode(t){let r=vr(String(t));return this.attributes.getNamedItem(r)}setAttributeNode(t){if(t?.constructor!==ei)throw TypeError("Element.setAttributeNode: Argument 1 does not implement interface Attr");let r=t.localName,s=this.attributes.getNamedItem(r);if(s===t)return t;return this.attributes.setNamedItem(t),s}replaceWith(...t){this._replaceWith(...t)}remove(){this._remove()}append(...t){this._getChildNodesMutator().push(...ys(t,this))}prepend(...t){this._getChildNodesMutator().splice(0,0,...ys(t,this))}before(...t){if(this.parentNode)Di(this,t,!0)}after(...t){if(this.parentNode)Di(this,t,!1)}get firstElementChild(){return this._getChildNodesMutator().elementsView()[0]??null}get lastElementChild(){let t=this._getChildNodesMutator().elementsView();return t[t.length-1]??null}get nextElementSibling(){let t=this.parentNode;if(!t)return null;let r=t._getChildNodesMutator(),s=r.indexOfElementsView(this);return r.elementsView()[s+1]??null}get previousElementSibling(){let t=this.parentNode;if(!t)return null;let r=t._getChildNodesMutator(),s=r.indexOfElementsView(this);return r.elementsView()[s-1]??null}querySelector(t){if(!this.ownerDocument)throw Error("Element must have an owner document");return this.ownerDocument._nwapi.first(t,this)}querySelectorAll(t){if(!this.ownerDocument)throw Error("Element must have an owner document");let r=new Xs,s=r[Ah]();for(let h of this.ownerDocument._nwapi.select(t,this))s.push(h);return r}matches(t){return this.ownerDocument._nwapi.match(t,this)}closest(t){let{match:r}=this.ownerDocument._nwapi,s=this;do{if(r(t,s))return s;s=s.parentElement}while(s!==null);return null}getElementById(t){if(!this._hasInitializedChildNodes())return null;for(let r of this.childNodes)if(r.nodeType===xt.ELEMENT_NODE){if(r.id===t)return r;let s=r.getElementById(t);if(s)return s}return null}getElementsByTagName(t){if(!this._hasInitializedChildNodes())return[];let r=Ki(t);if(r==="*")return this._getElementsByTagNameWildcard([]);else return this._getElementsByTagName(r,[])}_getElementsByTagNameWildcard(t){if(!this._hasInitializedChildNodes())return t;for(let r of this.childNodes)if(r.nodeType===xt.ELEMENT_NODE)t.push(r),r._getElementsByTagNameWildcard(t);return t}_getElementsByTagName(t,r){if(!this._hasInitializedChildNodes())return r;for(let s of this.childNodes)if(s.nodeType===xt.ELEMENT_NODE){if(s.tagName===t)r.push(s);s._getElementsByTagName(t,r)}return r}getElementsByClassName(t){if(!this._hasInitializedChildNodes())return[];return ki(this,t.trim().split(/\s+/),[])}getElementsByTagNameNS(t,r){if(!this._hasInitializedChildNodes())return[];return this.getElementsByTagName(r)}}_h.Element=Sr;var A4=Symbol(),M4=Symbol();class Xr extends Yt{constructor(){super("#document-fragment",xt.DOCUMENT_FRAGMENT_NODE,null,pt)}get childElementCount(){return this._getChildNodesMutator().elementsView().length}get children(){return this._getChildNodesMutator().elementsView()}get firstElementChild(){return this._getChildNodesMutator().elementsView()[0]??null}get lastElementChild(){let t=this._getChildNodesMutator().elementsView();return t[t.length-1]??null}_shallowClone(){return new Xr}append(...t){this._getChildNodesMutator().push(...ys(t,this))}prepend(...t){this._getChildNodesMutator().splice(0,0,...ys(t,this))}replaceChildren(...t){let r=this._getChildNodesMutator();for(let s of this.childNodes)s._setParent(null);r.splice(0,this.childNodes.length),r.splice(0,0,...ys(t,this))}getElementById(t){for(let r of this.childNodes)if(r.nodeType===xt.ELEMENT_NODE){if(r.id===t)return r;let s=r.getElementById(t);if(s)return s}return null}querySelector(t){if(!this.ownerDocument)throw Error("DocumentFragment must have an owner document");return this.ownerDocument._nwapi.first(t,this)}querySelectorAll(t){if(!this.ownerDocument)throw Error("DocumentFragment must have an owner document");let r=new Xs;return r[Ah]().push(...this.ownerDocument._nwapi.select(t,this)),r}}_h.DocumentFragment=Xr;function yg(t){let r=[];if(t==="*")return gg(this,r);for(let s of this.childNodes)if(s.nodeType===xt.ELEMENT_NODE){if(s.tagName===t)r.push(s);s._getElementsByTagName(t,r)}return r}function ng(t){return ki(this,t.trim().split(/\s+/),[])}function gg(t,r){for(let s of t.childNodes)if(s.nodeType===xt.ELEMENT_NODE)r.push(s),s._getElementsByTagNameWildcard(r);return r}Xr.prototype[A4]=yg;Xr.prototype[M4]=ng;class ai extends Sr{__contentIsSet=!1;#t=null;constructor(t,r,s,h){super("TEMPLATE",t,r,s);this.#t=h,this.__contentIsSet=!0}get content(){return this.#t}_setOwnerDocument(t){if(super._setOwnerDocument(t),this.__contentIsSet)this.content._setOwnerDocument(t)}_shallowClone(){let t=new Xr,r=this.getAttributeNames().map((s)=>[s,this.getAttribute(s)]);return new ai(null,r,pt,t)}cloneNode(t=!1){let r=super.cloneNode(t);if(t){let s=r.content;for(let h of this.content.childNodes)s.appendChild(h.cloneNode(t))}return r}get innerHTML(){return w4(this,!1)}set innerHTML(t){let r=this.content;for(let h of r.childNodes)h._setParent(null);let s=r._getChildNodesMutator();if(s.splice(0,r.childNodes.length),t.length){let h=E4(t,this.localName);s.push(...h.childNodes[0].childNodes);for(let c of r.childNodes)c._setParent(r),c._setOwnerDocument(r.ownerDocument)}}get outerHTML(){return`<template${Q2(this)}>${this.innerHTML}</template>`}}var mg=(t)=>{let r=sf({document:t,DOMException},"null");return r.configure({IDS_DUPES:!1,LOGERRORS:!1}),r};function sf(t,r){var s="nwsapi-2.2.0",h=t.document,c=h.documentElement,o=Array.prototype.slice,f="[\\x20\\t\\r\\n\\f]",g={operators:"[~*^$|]=|=",combinators:"[\\x20\\t>+~](?=[^>+~])"},u={double_enc:'(?=(?:[^"]*["][^"]*["])*[^"]*$)',single_enc:"(?=(?:[^']*['][^']*['])*[^']*$)",parens_enc:"(?![^\\x28]*\\x29)",square_enc:"(?![^\\x5b]*\\x5d)"},b={HasEscapes:RegExp("\\\\"),HexNumbers:RegExp("^[0-9a-fA-F]"),EscOrQuote:RegExp("^\\\\|[\\x22\\x27]"),RegExpChar:RegExp("(?:(?!\\\\)[\\\\^$.*+?()[\\]{}|\\/])","g"),TrimSpaces:RegExp("[\\r\\n\\f]|^"+f+"+|"+f+"+$","g"),CommaGroup:RegExp("(\\s*,\\s*)"+u.square_enc+u.parens_enc,"g"),SplitGroup:RegExp("((?:\\x28[^\\x29]*\\x29|\\[[^\\]]*\\]|\\\\.|[^,])+)","g"),FixEscapes:RegExp("\\\\([0-9a-fA-F]{1,6}"+f+"?|.)|([\\x22\\x27])","g"),CombineWSP:RegExp("[\\n\\r\\f\\x20]+"+u.single_enc+u.double_enc,"g"),TabCharWSP:RegExp("(\\x20?\\t+\\x20?)"+u.single_enc+u.double_enc,"g"),PseudosWSP:RegExp("\\s+([-+])\\s+"+u.square_enc,"g")},y={combinator:RegExp("\\s?([>+~])\\s?","g"),apimethods:RegExp("^(?:[a-z]+|\\*)\\|","i"),namespaces:RegExp("(\\*|[a-z]+)\\|[-a-z]+","i")},m={linguistic:"(dir|lang)\\x28\\s?([-\\w]{2,})\\s?(?:\\x29|$)",logicalsel:"(is|where|matches|not)\\x28\\s?([^()]*|[^\\x28]*\\x28[^\\x29]*\\x29)\\s?(?:\\x29|$)",treestruct:"(nth(?:-last)?(?:-child|-of-type))(?:\\x28\\s?(even|odd|(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)?)\\s?(?:\\x29|$))",locationpc:"(any-link|link|visited|target)\\b",useraction:"(hover|active|focus|focus-within)\\b",structural:"(root|empty|(?:(?:first|last|only)(?:-child|-of-type)))\\b",inputstate:"(enabled|disabled|read-only|read-write|placeholder-shown|default)\\b",inputvalue:"(checked|indeterminate|required|optional|valid|invalid|in-range|out-of-range)\\b",pseudo_sng:"(after|before|first-letter|first-line)\\b",pseudo_dbl:":(after|before|first-letter|first-line|selection|placeholder|-webkit-[-a-zA-Z0-9]{2,})\\b"},w={treestruct:RegExp("^:(?:"+m.treestruct+")(.*)","i"),structural:RegExp("^:(?:"+m.structural+")(.*)","i"),linguistic:RegExp("^:(?:"+m.linguistic+")(.*)","i"),useraction:RegExp("^:(?:"+m.useraction+")(.*)","i"),inputstate:RegExp("^:(?:"+m.inputstate+")(.*)","i"),inputvalue:RegExp("^:(?:"+m.inputvalue+")(.*)","i"),locationpc:RegExp("^:(?:"+m.locationpc+")(.*)","i"),logicalsel:RegExp("^:(?:"+m.logicalsel+")(.*)","i"),pseudo_dbl:RegExp("^:(?:"+m.pseudo_dbl+")(.*)","i"),pseudo_sng:RegExp("^:(?:"+m.pseudo_sng+")(.*)","i"),children:RegExp("^"+f+"?\\>"+f+"?(.*)"),adjacent:RegExp("^"+f+"?\\+"+f+"?(.*)"),relative:RegExp("^"+f+"?\\~"+f+"?(.*)"),ancestor:RegExp("^"+f+"+(.*)"),universal:RegExp("^\\*(.*)"),namespace:RegExp("^(\\w+|\\*)?\\|(.*)")},n=RegExp("^[\\u0591-\\u08ff\\ufb1d-\\ufdfd\\ufe70-\\ufefc ]+$"),j="Not enough arguments",P=" is not a valid selector",S=RegExp("(:nth(?:-last)?-child)","i"),x=RegExp("(:nth(?:-last)?-of-type)","i"),M,q,z={IDS_DUPES:!0,MIXEDCASE:!0,LOGERRORS:!0,VERBOSITY:!0},E,D,T,C={"=":1,"^=":1,"$=":1,"|=":1,"*=":1,"~=":1},H={accept:1,"accept-charset":1,align:1,alink:1,axis:1,bgcolor:1,charset:1,checked:1,clear:1,codetype:1,color:1,compact:1,declare:1,defer:1,dir:1,direction:1,disabled:1,enctype:1,face:1,frame:1,hreflang:1,"http-equiv":1,lang:1,language:1,link:1,media:1,method:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,rel:1,rev:1,rules:1,scope:1,scrolling:1,selected:1,shape:1,target:1,text:1,type:1,valign:1,valuetype:1,vlink:1},K={},O={},I={"=":{p1:"^",p2:"$",p3:"true"},"^=":{p1:"^",p2:"",p3:"true"},"$=":{p1:"",p2:"$",p3:"true"},"*=":{p1:"",p2:"",p3:"true"},"|=":{p1:"^",p2:"(-|$)",p3:"true"},"~=":{p1:"(^|\\s)",p2:"(\\s|$)",p3:"true"}},N=function(R,X){var v=0,J=R.length,ot=Array(J);while(J>v){if(X(ot[v]=R[v])===!1)break;++v}return ot},F=function(R,X){var v=-1,J=X.length;while(J--)R[R.length]=X[++v];return R},p=function(R,X){if(!ht&&R===X)return ht=!0,0;return R.compareDocumentPosition(X)&4?-1:1},ht=!1,U=function(R){var X=0,v=-1,J=R.length+1,ot=[];while(--J){if(R[X++]===R[X])continue;ot[++v]=R[X-1]}return ht=!1,ot},Y=function(R){var X,v="getElementsByTagNameNS";return R=R.ownerDocument||R,X=R.documentElement.namespaceURI||"http://www.w3.org/1999/xhtml",R[v]("*","*").length-R[v](X,"*").length>0},Q=function(R,X){var v=h;if(h=R.ownerDocument||R,X||v!==h)c=h.documentElement,T=p0(h),D=T&&h.compatMode.indexOf("CSS")<0,E=c&&c.namespaceURI,vt.doc=h,vt.root=c;return vt.from=R},G=function(R){if(R<1||R>1114111||R>55295&&R<57344)return"\\ufffd";if(R<65536){var X="000"+R.toString(16);return"\\u"+X.substr(X.length-4)}return"\\u"+((R-65536>>10)+55296).toString(16)+"\\u"+((R-65536)%1024+56320).toString(16)},tt=function(R){if(R<1||R>1114111||R>55295&&R<57344)return"�";if(R<65536)return String.fromCharCode(R);return String.fromCodePoint?String.fromCodePoint(R):String.fromCharCode((R-65536>>10)+55296,(R-65536)%1024+56320)},d=function(R){return b.HasEscapes.test(R)?R.replace(b.FixEscapes,function(X,v,J){return J?"\\"+J:b.HexNumbers.test(v)?G(parseInt(v,16)):b.EscOrQuote.test(v)?X:v}):R},ft=function(R){return b.HasEscapes.test(R)?R.replace(b.FixEscapes,function(X,v,J){return J?J:b.HexNumbers.test(v)?tt(parseInt(v,16)):b.EscOrQuote.test(v)?X:v}):R},e={"#":"getElementById","*":"getElementsByTagNameNS",".":"getElementsByClassName"},mt={"#":function(R,X){return b.HasEscapes.test(X)&&(X=ft(X)),function(v,J){return Ft(X,R)}},"*":function(R,X){return b.HasEscapes.test(X)&&(X=ft(X)),function(v,J){return gt(X,R)}},".":function(R,X){return b.HasEscapes.test(X)&&(X=ft(X)),function(v,J){return Ut(X,R)}}},qt=function(R,X){var v=X,J=[],ot=v.firstElementChild;while(v=ot){if(v.id==R&&(J[J.length]=v),ot=v.firstElementChild||v.nextElementSibling)continue;while(!ot&&(v=v.parentElement)&&v!==X)ot=v.nextElementSibling}return J},Ft=function(R,X){var v,J,ot=e["#"];if(z.IDS_DUPES===!1){if(ot in X)return(v=X[ot](R))?[v]:rt}else if("all"in X)if(v=X.all[R]){if(v.nodeType==1)return v.getAttribute("id")!=R?[]:[v];else if(R=="length")return(v=X[ot](R))?[v]:rt;for(i=0,l=v.length,J=[];l>i;++i)if(v[i].id==R)J[J.length]=v[i];return J&&J.length?J:[J]}else return rt;return qt(R,X)},gt=function(R,X){var v,J,ot=e["*"];if(ot in X)return o.call(X[ot]("*",R));else if(R=R.toLowerCase(),v=X.firstElementChild)if(!(v.nextElementSibling||R=="*"||v.localName==R))return o.call(v[ot]("*",R));else{J=[];do{if(R=="*"||v.localName==R)J[J.length]=v;F(J,v[ot]("*",R))}while(v=v.nextElementSibling)}else J=rt;return J},Ut=function(R,X){var v,J,ot=e["."],At;if(ot in X)return o.call(X[ot](R));else if(v=X.firstElementChild)if(At=RegExp("(^|\\s)"+R+"(\\s|$)",D?"i":""),!(v.nextElementSibling||At.test(v.className)))return o.call(v[ot](R));else{J=[];do{if(At.test(v.className))J[J.length]=v;F(J,v[ot](R))}while(v=v.nextElementSibling)}else J=rt;return J},Wt=function(R,X){var v,J,ot=R.getAttributeNames();X=RegExp(":?"+X+"$",T?"i":"");for(v=0,J=ot.length;J>v;++v)if(X.test(ot[v]))return!0;return!1},Zt=function(){var R=0,X=0,v=0,J=void 0,ot=Array(),At=Array();return function(_t,$t){if($t==2)return R=0,X=0,v=0,At.length=0,ot.length=0,J=void 0,-1;var at,Xt,It,Qt,Vt;if(J===_t.parentElement)Xt=v,It=R,Vt=X;else{Vt=ot.length,J=_t.parentElement;for(Xt=-1,It=0,Qt=Vt-1;Vt>It;++It,--Qt){if(ot[It]===J){Xt=It;break}if(ot[Qt]===J){Xt=Qt;break}}if(Xt<0){ot[Xt=Vt]=J,Vt=0,At[Xt]=Array(),at=J&&J.firstElementChild||_t;while(at){if(At[Xt][Vt]=at,at===_t)It=Vt;at=at.nextElementSibling,++Vt}if(v=Xt,R=0,X=Vt,Vt<2)return Vt}else Vt=At[Xt].length,v=Xt}if(_t!==At[Xt][It]&&_t!==At[Xt][It=0])for(It=0,at=At[Xt],Qt=Vt-1;Vt>It;++It,--Qt){if(at[It]===_t)break;if(at[Qt]===_t){It=Qt;break}}return R=It+1,X=Vt,$t?Vt-It:R}}(),g0=function(){var R=0,X=0,v=0,J=void 0,ot=Array(),At=Array();return function(_t,$t){if($t==2)return R=0,X=0,v=0,At.length=0,ot.length=0,J=void 0,-1;var at,Xt,It,Qt,Vt,Mt=_t.localName;if(At[v]&&At[v][Mt]&&J===_t.parentElement)Xt=v,It=R,Vt=X;else{Vt=ot.length,J=_t.parentElement;for(Xt=-1,It=0,Qt=Vt-1;Vt>It;++It,--Qt){if(ot[It]===J){Xt=It;break}if(ot[Qt]===J){Xt=Qt;break}}if(Xt<0||!At[Xt][Mt]){ot[Xt=Vt]=J,At[Xt]||(At[Xt]=Object()),Vt=0,At[Xt][Mt]=Array(),at=J&&J.firstElementChild||_t;while(at){if(at===_t)It=Vt;if(at.localName==Mt)At[Xt][Mt][Vt]=at,++Vt;at=at.nextElementSibling}if(v=Xt,R=It,X=Vt,Vt<2)return Vt}else Vt=At[Xt][Mt].length,v=Xt}if(_t!==At[Xt][Mt][It]&&_t!==At[Xt][Mt][It=0])for(It=0,at=At[Xt][Mt],Qt=Vt-1;Vt>It;++It,--Qt){if(at[It]===_t)break;if(at[Qt]===_t){It=Qt;break}}return R=It+1,X=Vt,$t?Vt-It:R}}(),p0=function(R){var X=R.ownerDocument||R;return X.nodeType==9&&"contentType"in X?X.contentType.indexOf("/html")>0:X.createElement("DiV").localName=="div"},J0=function(R,X){if(typeof R=="string")return!!z[R];if(typeof R!="object")return z;for(var v in R)z[v]=!!R[v];if(X)Et={},Ct={};return V0(),!0},Kt=function(R,X){var v;if(z.VERBOSITY){if(X)v=new X(R);else v=new t.DOMException(R,"SyntaxError");throw v}if(z.LOGERRORS&&console&&console.log)console.log(R)},c0=function(R){V0(),it=Q(R,!0)},V0=function(){var R="(?=[^0-9])(?:-{2}|[a-zA-Z0-9-_]|[^\\x00-\\x9f]|\\\\[^\\r\\n\\f0-9a-fA-F]|\\\\[0-9a-fA-F]{1,6}(?:\\r\\n|\\s)?|\\\\.)+",X="[-\\w]+",v="(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)",J='"[^"\\\\]*(?:\\\\.[^"\\\\]*)*(?:"|$)',ot="'[^'\\\\]*(?:\\\\.[^'\\\\]*)*(?:'|$)",At=R+"|"+J+"|"+ot,_t="([\\x22\\x27]?)((?!\\3)*|(?:\\\\?.)*?)(?:\\3|$)",$t="\\[(?:\\*\\|)?"+f+"?("+R+"(?::"+R+")?)"+f+"?(?:("+g.operators+")"+f+"?(?:"+At+"))?"+f+"?(i)?"+f+"?(?:\\]|$)",at=$t.replace(At,_t),Xt="(?:\\x28"+f+"*(?:"+v+"?)?|(?:\\*|\\|)|(?:(?::"+X+"(?:\\x28"+v+"?(?:\\x29|$))?|)|(?:[.#]?"+R+")|(?:"+$t+"))+|(?:"+f+"?,"+f+"?)|(?:"+f+"?)|(?:\\x29|$))*",It="(?="+f+"?[^>+~(){}<>])(?:(?:\\*|\\|)|(?:[.#]?"+R+")+|(?:"+$t+")+|(?:::?"+X+Xt+")|(?:"+f+"?"+g.combinators+f+"?)|(?:"+f+"?,"+f+"?)|(?:"+f+"?))+";M=RegExp("(?:([.:#*]?)("+R+")(?::[-\\w]+|\\[[^\\]]+(?:\\]|$)|\\x28[^\\x29]+(?:\\x29|$))*)$"),q=RegExp(It,"g"),w.id=RegExp("^#("+R+")(.*)"),w.tagName=RegExp("^("+R+")(.*)"),w.className=RegExp("^\\.("+R+")(.*)"),w.attribute=RegExp("^(?:"+at+")(.*)")},q0='"use strict";return function Resolver(c,f,x,r)',f0="var e,n,o,j=r.length-1,k=-1",y0="var e,n,o",R0="main:while((e=c[++k]))",O0="main:while((e=c.item(++k)))",Nt="e=c;",Ar="r[++j]=c[k];",lt="r[++j]=c.item(k);",C0="",b0="continue main;",_0="r=true;",s0="if(f(c[k])){break main;}",T0="if(f(c.item(k))){break main;}",Lt="f(c);",tr=[],kt=[],Ot=function(R,X,v){var J,ot,At="",_t="",$t="",at="",Xt="";switch(X){case!0:if(St[R])return St[R];$t=Ar+(v?s0:"")+b0,At=f0,_t=R0;break;case!1:if(yt[R])return yt[R];$t=C0+(v?Lt:"")+_0,At=y0,_t=Nt;break;case null:if(St[R])return St[R];$t=lt+(v?T0:"")+b0,At=f0,_t=O0;break;default:break}if(at=o0(R,$t,X,v,!1),_t+=X||X===null?"{"+at+"}":at,X||X===null&&R.includes(":nth"))_t+=S.test(R)?"s.nthElement(null, 2);":"",_t+=x.test(R)?"s.nthOfType(null, 2);":"";if(tr[0]||kt[0])Xt=","+(tr.join(",")||kt.join(",")),tr.length=0,kt.length=0;return J=Function("s",q0+"{"+At+Xt+";"+_t+"return r;}")(vt),X||X===null?St[R]=J:yt[R]=J},o0=function(R,X,v,J,ot){var At,_t,$t,at,Xt,It,Qt,Vt,Mt=ot?"!":"",zr=ot?"":"!",Is,n0,ct,Vr,us,k0,z0,jr,Jt=R,U0,j0;U0=v?$:nt,Jt=Jt.replace(y.combinator,"$1");while(Jt){switch(k0=y.apimethods.test(Jt)?"|":Jt[0],k0){case"*":if(ct=Jt.match(w.universal),Mt=="!")X="if("+Mt+"true){"+X+"}";break;case"#":ct=Jt.match(w.id),X="if("+Mt+"(/^"+ct[1]+'$/.test(e.getAttribute("id")))){'+X+"}";break;case".":ct=Jt.match(w.className),Is=(D?"i":"")+'.test(e.getAttribute("class"))',X="if("+Mt+"(/(^|\\s)"+ct[1]+"(\\s|$)/"+Is+")){"+X+"}";break;case(/[_a-z]/i.test(k0)?k0:void 0):ct=Jt.match(w.tagName),X="if("+Mt+"(e.localName"+(z.MIXEDCASE||Y(h)?'=="'+ct[1].toLowerCase()+'"':'=="'+ct[1].toUpperCase()+'"')+")){"+X+"}";break;case"|":if(ct=Jt.match(w.namespace),ct[1]=="*")X="if("+Mt+"true){"+X+"}";else if(!ct[1])X="if("+Mt+"(!e.namespaceURI)){"+X+"}";else if(typeof ct[1]=="string"&&c.prefix==ct[1])X="if("+Mt+'(e.namespaceURI=="'+E+'")){'+X+"}";else Kt("'"+U0+"'"+P);break;case"[":if(ct=Jt.match(w.attribute),Vt=ct[0].match(y.namespaces),Qt=ct[1],n0=Qt.split(":"),n0=n0.length==2?n0[1]:n0[0],ct[2]&&!(z0=I[ct[2]]))return Kt("'"+U0+"'"+P),"";if(ct[4]==="")z0=ct[2]=="~="?{p1:"^\\s",p2:"+$",p3:"true"}:(ct[2]in C)&&ct[2]!="~="?{p1:"^",p2:"$",p3:"true"}:z0;else if(ct[2]=="~="&&ct[4].includes(" ")){X="if("+Mt+"false){"+X+"}";break}else if(ct[4])ct[4]=d(ct[4]).replace(b.RegExpChar,"\\$&");jr=ct[5]=="i"||T&&H[n0.toLowerCase()]?"i":"",X="if("+Mt+"("+(!ct[2]?Vt?'s.hasAttributeNS(e,"'+Qt+'")':'e.hasAttribute&&e.hasAttribute("'+Qt+'")':!ct[4]&&C[ct[2]]&&ct[2]!="~="?'e.getAttribute&&e.getAttribute("'+Qt+'")==""':"(/"+z0.p1+ct[4]+z0.p2+"/"+jr+').test(e.getAttribute&&e.getAttribute("'+Qt+'"))=='+z0.p3)+")){"+X+"}";break;case"~":ct=Jt.match(w.relative),X="n=e;while((e=e.previousElementSibling)){"+X+"}e=n;";break;case"+":ct=Jt.match(w.adjacent),X="n=e;if((e=e.previousElementSibling)){"+X+"}e=n;";break;case"\t":case" ":ct=Jt.match(w.ancestor),X="n=e;while((e=e.parentElement)){"+X+"}e=n;";break;case">":ct=Jt.match(w.children),X="n=e;if((e=e.parentElement)){"+X+"}e=n;";break;case(k0 in K?k0:void 0):ct[ct.length-1]="*",X=K[k0](ct)+X;break;case":":if(ct=Jt.match(w.structural))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"root":X="if("+Mt+"(e===s.root)){"+X+(v?"break main;":"")+"}";break;case"empty":X="n=e.firstChild;while(n&&!(/1|3/).test(n.nodeType)){n=n.nextSibling}if("+zr+"n){"+X+"}";break;case"only-child":X="if("+Mt+"(!e.nextElementSibling&&!e.previousElementSibling)){"+X+"}";break;case"last-child":X="if("+Mt+"(!e.nextElementSibling)){"+X+"}";break;case"first-child":X="if("+Mt+"(!e.previousElementSibling)){"+X+"}";break;case"only-of-type":X="o=e.localName;n=e;while((n=n.nextElementSibling)&&n.localName!=o);if(!n){n=e;while((n=n.previousElementSibling)&&n.localName!=o);}if("+zr+"n){"+X+"}";break;case"last-of-type":X="n=e;o=e.localName;while((n=n.nextElementSibling)&&n.localName!=o);if("+zr+"n){"+X+"}";break;case"first-of-type":X="n=e;o=e.localName;while((n=n.previousElementSibling)&&n.localName!=o);if("+zr+"n){"+X+"}";break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.treestruct))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"nth-child":case"nth-of-type":case"nth-last-child":case"nth-last-of-type":if(n0=/-of-type/i.test(ct[1]),ct[1]&&ct[2]){if(jr=/last/i.test(ct[1]),ct[2]=="n"){X="if("+Mt+"true){"+X+"}";break}else if(ct[2]=="1"){z0=jr?"next":"previous",X=n0?"n=e;o=e.localName;while((n=n."+z0+"ElementSibling)&&n.localName!=o);if("+zr+"n){"+X+"}":"if("+Mt+"!e."+z0+"ElementSibling){"+X+"}";break}else if(ct[2]=="even"||ct[2]=="2n0"||ct[2]=="2n+0"||ct[2]=="2n")z0="n%2==0";else if(ct[2]=="odd"||ct[2]=="2n1"||ct[2]=="2n+1")z0="n%2==1";else{if(at=/n/i.test(ct[2]),$t=ct[2].split("n"),At=parseInt($t[0],10)||0,_t=parseInt($t[1],10)||0,$t[0]=="-")At=-1;if($t[0]=="+")At=1;z0=(_t?"(n"+(_t>0?"-":"+")+Math.abs(_t)+")":"n")+"%"+At+"==0",z0=At>=1?at?"n>"+(_t-1)+(Math.abs(At)!=1?"&&"+z0:""):"n=="+At:At<=-1?at?"n<"+(_t+1)+(Math.abs(At)!=1?"&&"+z0:""):"n=="+At:At===0?$t[0]?"n=="+_t:"n>"+(_t-1):"false"}n0=n0?"OfType":"Element",jr=jr?"true":"false",X="n=s.nth"+n0+"(e,"+jr+");if("+Mt+"("+z0+")){"+X+"}"}else Kt("'"+U0+"'"+P);break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.logicalsel))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"is":case"where":case"matches":n0=ct[2].replace(b.CommaGroup,",").replace(b.TrimSpaces,""),X='if(s.match("'+n0.replace(/\x22/g,"\\\"")+'",e)){'+X+"}";break;case"not":n0=ct[2].replace(b.CommaGroup,",").replace(b.TrimSpaces,""),X='if(!s.match("'+n0.replace(/\x22/g,"\\\"")+'",e)){'+X+"}";break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.linguistic))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"dir":X="var p;if("+Mt+"((/"+ct[2]+'/i.test(e.dir))||(p=s.ancestor("[dir]", e))&&(/'+ct[2]+'/i.test(p.dir))||(e.dir==""||e.dir=="auto")&&('+(ct[2]=="ltr"?"!":"")+n+".test(e.textContent)))){"+X+"};";break;case"lang":n0="(?:^|-)"+ct[2]+"(?:-|$)",X="var p;if("+Mt+'((e.isConnected&&(e.lang==""&&(p=s.ancestor("[lang]",e)))&&(p.lang=="'+ct[2]+'")||/'+n0+"/i.test(e.lang)))){"+X+"};";break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.locationpc))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"any-link":X="if("+Mt+'(/^a|area$/i.test(e.localName)&&e.hasAttribute("href")||e.visited)){'+X+"}";break;case"link":X="if("+Mt+'(/^a|area$/i.test(e.localName)&&e.hasAttribute("href"))){'+X+"}";break;case"visited":X="if("+Mt+'(/^a|area$/i.test(e.localName)&&e.hasAttribute("href")&&e.visited)){'+X+"}";break;case"target":X="if("+Mt+"((s.doc.compareDocumentPosition(e)&16)&&s.doc.location.hash&&e.id==s.doc.location.hash.slice(1))){"+X+"}";break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.useraction))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"hover":X="hasFocus"in h&&h.hasFocus()?"if("+Mt+"(e===s.doc.hoverElement)){"+X+"}":"if("+zr+"true){"+X+"}";break;case"active":X="hasFocus"in h&&h.hasFocus()?"if("+Mt+"(e===s.doc.activeElement)){"+X+"}":"if("+zr+"true){"+X+"}";break;case"focus":X="hasFocus"in h?"if("+Mt+'(e===s.doc.activeElement&&s.doc.hasFocus()&&(e.type||e.href||typeof e.tabIndex=="number"))){'+X+"}":"if("+Mt+"(e===s.doc.activeElement&&(e.type||e.href))){"+X+"}";break;case"focus-within":X="hasFocus"in h?"n=s.doc.activeElement;while(e){if(e===n||e.parentNode===n)break;}if("+Mt+'(e===n&&s.doc.hasFocus()&&(e.type||e.href||typeof e.tabIndex=="number"))){'+X+"}":X;break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.inputstate))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"enabled":X="if("+Mt+'(("form" in e||/^optgroup$/i.test(e.localName))&&"disabled" in e &&e.disabled===false)){'+X+"}";break;case"disabled":X="if("+Mt+'(("form" in e||/^optgroup$/i.test(e.localName))&&"disabled" in e&&(e.disabled===true||(n=s.ancestor("fieldset",e))&&(n=s.first("legend",n))&&!n.contains(e)))){'+X+"}";break;case"read-only":X="if("+Mt+'((/^textarea$/i.test(e.localName)&&(e.readOnly||e.disabled))||("|password|text|".includes("|"+e.type+"|")&&e.readOnly))){'+X+"}";break;case"read-write":X="if("+Mt+'(((/^textarea$/i.test(e.localName)&&!e.readOnly&&!e.disabled)||("|password|text|".includes("|"+e.type+"|")&&!e.readOnly&&!e.disabled))||(e.hasAttribute("contenteditable")||(s.doc.designMode=="on")))){'+X+"}";break;case"placeholder-shown":X="if("+Mt+'((/^input|textarea$/i.test(e.localName))&&e.hasAttribute("placeholder")&&("|textarea|password|number|search|email|text|tel|url|".includes("|"+e.type+"|"))&&(!s.match(":focus",e)))){'+X+"}";break;case"default":X="if("+Mt+'("form" in e && e.form)){var x=0;n=[];if(e.type=="image")n=e.form.getElementsByTagName("input");if(e.type=="submit")n=e.form.elements;while(n[x]&&e!==n[x]){if(n[x].type=="image")break;if(n[x].type=="submit")break;x++;}}if('+Mt+'(e.form&&(e===n[x]&&"|image|submit|".includes("|"+e.type+"|"))||((/^option$/i.test(e.localName))&&e.defaultSelected)||(("|radio|checkbox|".includes("|"+e.type+"|"))&&e.defaultChecked))){'+X+"}";break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.inputvalue))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"checked":X="if("+Mt+'(/^input$/i.test(e.localName)&&("|radio|checkbox|".includes("|"+e.type+"|")&&e.checked)||(/^option$/i.test(e.localName)&&(e.selected||e.checked)))){'+X+"}";break;case"indeterminate":X="if("+Mt+'(/^progress$/i.test(e.localName)&&!e.hasAttribute("value"))||(/^input$/i.test(e.localName)&&("checkbox"==e.type&&e.indeterminate)||("radio"==e.type&&e.name&&!s.first("input[name="+e.name+"]:checked",e.form)))){'+X+"}";break;case"required":X="if("+Mt+"(/^input|select|textarea$/i.test(e.localName)&&e.required)){"+X+"}";break;case"optional":X="if("+Mt+"(/^input|select|textarea$/i.test(e.localName)&&!e.required)){"+X+"}";break;case"invalid":X="if("+Mt+'(((/^form$/i.test(e.localName)&&!e.noValidate)||(e.willValidate&&!e.formNoValidate))&&!e.checkValidity())||(/^fieldset$/i.test(e.localName)&&s.first(":invalid",e))){'+X+"}";break;case"valid":X="if("+Mt+'(((/^form$/i.test(e.localName)&&!e.noValidate)||(e.willValidate&&!e.formNoValidate))&&e.checkValidity())||(/^fieldset$/i.test(e.localName)&&s.first(":valid",e))){'+X+"}";break;case"in-range":X="if("+Mt+'(/^input$/i.test(e.localName))&&(e.willValidate&&!e.formNoValidate)&&(!e.validity.rangeUnderflow&&!e.validity.rangeOverflow)&&("|date|datetime-local|month|number|range|time|week|".includes("|"+e.type+"|"))&&("range"==e.type||e.getAttribute("min")||e.getAttribute("max"))){'+X+"}";break;case"out-of-range":X="if("+Mt+'(/^input$/i.test(e.localName))&&(e.willValidate&&!e.formNoValidate)&&(e.validity.rangeUnderflow||e.validity.rangeOverflow)&&("|date|datetime-local|month|number|range|time|week|".includes("|"+e.type+"|"))&&("range"==e.type||e.getAttribute("min")||e.getAttribute("max"))){'+X+"}";break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.pseudo_sng))X='if(e.element&&e.type.toLowerCase()==":'+ct[0].toLowerCase()+'"){e=e.element;'+X+"}";else if(ct=Jt.match(w.pseudo_dbl))X='if(e.element&&e.type.toLowerCase()=="'+ct[0].toLowerCase()+'"){e=e.element;'+X+"}";else{n0=!1,us=!1;for(n0 in O)if(ct=Jt.match(O[n0].Expression)){if(Vr=O[n0].Callback(ct,X,v,J),"match"in Vr)ct=Vr.match;if(j0=Vr.modvar,v)j0&&tr.indexOf(j0)<0&&(tr[tr.length]=j0);else j0&&kt.indexOf(j0)<0&&(kt[kt.length]=j0);if(X=Vr.source,us=Vr.status,us)break}if(!us)return Kt("unknown pseudo-class selector '"+Jt+"'"),"";if(!n0)return Kt("unknown token in selector '"+Jt+"'"),""}break;default:Kt("'"+U0+"'"+P);break}if(!ct)return Kt("'"+U0+"'"+P),"";Jt=ct.pop()}return X},l0=function(R,X){return R.replace(/:scope/ig,X.localName+(X.id?"#"+X.id:"")+(X.className?"."+X.classList[0]:""))},P0=function(R,X,v){if(/:scope/i.test(R))R=l0(R,X);while(X){if(jt(R,X,v))break;X=X.parentElement}return X},rr=function(R,X,v){for(var J=0,ot=R.length,At=!1;ot>J;++J)R[J](X,v,null,!1)&&(At=!0);return At},d0=function(R,X){for(var v=0,J=R.length,ot=[];J>v;++v)ot[v]=Ot(R[v],!1,X);return{factory:ot}},jt=function(R,X,v){var J,ot;if(X&&Et[R])return rr(Et[R].factory,X,v);if(nt=R,arguments.length===0)return Kt(j,TypeError),z.VERBOSITY?void 0:!1;else if(arguments[0]==="")return Kt("''"+P),z.VERBOSITY?void 0:!1;if(typeof R!="string")R=""+R;if(/:scope/i.test(R))R=l0(R,X);if(ot=R.replace(/\x00|\\$/g,"�").replace(b.CombineWSP," ").replace(b.PseudosWSP,"$1").replace(b.TabCharWSP,"\t").replace(b.CommaGroup,",").replace(b.TrimSpaces,""),(J=ot.match(q))&&J.join("")==ot){if(J=ot.match(b.SplitGroup),ot[ot.length-1]==",")return Kt(P),z.VERBOSITY?void 0:!1}else return Kt("'"+R+"'"+P),z.VERBOSITY?void 0:!1;return Et[R]=d0(J,v),rr(Et[R].factory,X,v)},v0=function(R,X,v){if(arguments.length===0)Kt(j,TypeError);return sr(R,X,typeof v=="function"?function(J){return v(J),!1}:function(){return!1})[0]||null},sr=function(R,X,v){var J,ot,At,_t;if(X||(X=h),R){if(_t=Ct[R]){if(_t.context===X&&_t.callback===v){var{factory:$t,htmlset:at,nodeset:Xt}=_t,ot=[];if(Xt.length>1){for(var It=0,Qt=Xt.length,Vt;Qt>It;++It)if(Vt=mt[Xt[It][0]](X,Xt[It].slice(1))(),$t[It]!==null)$t[It](Vt,v,X,ot);else ot=ot.concat(Vt);if(Qt>1&&ot.length>1)ot.sort(p),ht&&(ot=U(ot))}else if($t[0])ot=$t[0](at[0](),v,X,ot);else ot=at[0]();return typeof v=="function"?N(ot,v):ot}}}if($=R,arguments.length===0)return Kt(j,TypeError),z.VERBOSITY?void 0:rt;else if(arguments[0]==="")return Kt("''"+P),z.VERBOSITY?void 0:rt;else if(it!==X)it=Q(X);if(typeof R!="string")R=""+R;if(/:scope/i.test(R))R=l0(R,X);if(At=R.replace(/\x00|\\$/g,"�").replace(b.CombineWSP," ").replace(b.PseudosWSP,"$1").replace(b.TabCharWSP,"\t").replace(b.CommaGroup,",").replace(b.TrimSpaces,""),(J=At.match(q))&&J.join("")==At){if(J=At.match(b.SplitGroup),At[At.length-1]==",")return Kt(P),z.VERBOSITY?void 0:!1}else return Kt("'"+R+"'"+P),z.VERBOSITY?void 0:!1;return Ct[R]=Ir(J,X,v),ot=Ct[R].results,typeof v=="function"?N(ot,v):ot},Wr=function(R,X){var v=X.index,J=X[1].length+X[2].length;return R.slice(0,v)+(" >+~".indexOf(R.charAt(v-1))>-1?":[".indexOf(R.charAt(v+J+1))>-1?"*":"":"")+R.slice(v+J-(X[1]=="*"?1:0))},Ir=function(R,X,v){var J,ot,At={},_t=["","*","*"],$t=R,at=[],Xt=[],It=[],Qt=[],Vt;for(J=0,ot=R.length;ot>J;++J){if(!At[R[J]]&&(At[R[J]]=!0))if(Vt=R[J].match(M),Vt&&Vt[1]!=":"&&(_t=Vt))_t[1]||(_t[1]="*"),$t[J]=Wr($t[J],_t);else _t=["","*","*"];It[J]=_t[1]+_t[2],Xt[J]=mt[_t[1]](X,_t[2]),at[J]=Ot($t[J],!0,null),at[J]?at[J](Xt[J](),v,X,Qt):result.concat(Xt[J]())}if(ot>1)Qt.sort(p),ht&&(Qt=U(Qt));return{callback:v,context:X,factory:at,htmlset:Xt,nodeset:It,results:Qt}},Mr,L,V,k,Z=function(R){if(Mr=Element.prototype.closest,L=Element.prototype.matches,V=Document.prototype.querySelector,k=Document.prototype.querySelectorAll,Element.prototype.closest=function(){var X=Object.getPrototypeOf(this).__proto__.__proto__.constructor.name;if(!("nodeType"in this))Kt("'closest' called on an object that does not implement interface "+X+".",TypeError);return arguments.length<1?P0.apply(this,[]):arguments.length<2?P0.apply(this,[arguments[0],this]):P0.apply(this,[arguments[0],this,typeof arguments[1]=="function"?arguments[1]:void 0])},Element.prototype.matches=function(){var X=Object.getPrototypeOf(this).__proto__.__proto__.constructor.name;if(!("nodeType"in this))Kt("'matches' called on an object that does not implement interface "+X+".",TypeError);return arguments.length<1?jt.apply(this,[]):arguments.length<2?jt.apply(this,[arguments[0],this]):jt.apply(this,[arguments[0],this,typeof arguments[1]=="function"?arguments[1]:void 0])},Element.prototype.querySelector=Document.prototype.querySelector=DocumentFragment.prototype.querySelector=function(){var X=Object.getPrototypeOf(this).__proto__.__proto__.constructor.name;if(!("nodeType"in this))Kt("'querySelector' called on an object that does not implement interface "+X+".",TypeError);return arguments.length<1?v0.apply(this,[]):arguments.length<2?v0.apply(this,[arguments[0],this]):v0.apply(this,[arguments[0],this,typeof arguments[1]=="function"?arguments[1]:void 0])},Element.prototype.querySelectorAll=Document.prototype.querySelectorAll=DocumentFragment.prototype.querySelectorAll=function(){var X=Object.getPrototypeOf(this).__proto__.__proto__.constructor.name;if(!("nodeType"in this))Kt("'querySelectorAll' called on an object that does not implement interface "+X+".",TypeError);return arguments.length<1?sr.apply(this,[]):arguments.length<2?sr.apply(this,[arguments[0],this]):sr.apply(this,[arguments[0],this,typeof arguments[1]=="function"?arguments[1]:void 0])},R)document.addEventListener("load",function(X){var v,J,ot,At,_t=X.target;if(/iframe/i.test(_t.localName))v="("+r+")(this, "+sf+");",J=_t.contentDocument,At=J.createElement("script"),At.textContent=v+"NW.Dom.install()",ot=J.documentElement,ot.removeChild(ot.insertBefore(At,ot.firstChild))},!0)},a=function(){Element.prototype.closest=Mr,Element.prototype.matches=L,Element.prototype.querySelector=Document.prototype.querySelector=DocumentFragment.prototype.querySelector=V,Element.prototype.querySelectorAll=Document.prototype.querySelectorAll=DocumentFragment.prototype.querySelectorAll=k},rt=Array(),it,nt,$,yt={},St={},Et={},Ct={},vt={doc:h,from:h,root:c,byTag:gt,first:v0,match:jt,ancestor:P0,nthOfType:g0,nthElement:Zt,hasAttributeNS:Wt},zt={lastMatched:nt,lastSelected:$,matchLambdas:yt,selectLambdas:St,matchResolvers:Et,selectResolvers:Ct,CFG:g,M_BODY:C0,S_BODY:Ar,M_TEST:Lt,S_TEST:s0,byId:Ft,byTag:gt,byClass:Ut,match:jt,first:v0,select:sr,closest:P0,compile:Ot,configure:J0,emit:Kt,Config:z,Snapshot:vt,Version:s,install:Z,uninstall:a,Operators:I,Selectors:O,registerCombinator:function(R,X){var v=0,J=R.length,ot;for(;J>v;++v)if(R[v]!="="){ot=R[v];break}if(g.combinators.indexOf(ot)<0)g.combinators=g.combinators.replace("](",ot+"]("),g.combinators=g.combinators.replace("])",ot+"])"),K[R]=X,V0();else console.warn("Warning: the '"+R+"' combinator is already registered.")},registerOperator:function(R,X){var v=0,J=R.length,ot;for(;J>v;++v)if(R[v]!="="){ot=R[v];break}if(g.operators.indexOf(ot)<0&&!I[R])g.operators=g.operators.replace("]=",ot+"]="),I[R]=X,V0();else console.warn("Warning: the '"+R+"' operator is already registered.")},registerSelector:function(R,X,v){O[R]||(O[R]={Expression:X,Callback:v})}};return c0(h),zt}var ug=mg;/*!
222
+ `)}function $n(t){let{memory:r,__wbindgen_export_0:s,__wbindgen_malloc:h,__wbindgen_realloc:c,__wbindgen_free:o,parse_wasm:f,parse_frag_wasm:g}=t;{let M=s,q=M.grow(4);M.set(0,void 0),M.set(q+0,void 0),M.set(q+1,null),M.set(q+2,!0),M.set(q+3,!1)}let u=0,b=null;function y(){if(b===null||b.byteLength===0)b=new Uint8Array(r.buffer);return b}let m=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},w=function(M,q){return m.encodeInto(M,q)};function n(M,q,z){if(z===void 0){let H=m.encode(M),K=q(H.length,1)>>>0;return y().subarray(K,K+H.length).set(H),u=H.length,K}let E=M.length,D=q(E,1)>>>0,T=y(),C=0;for(;C<E;C++){let H=M.charCodeAt(C);if(H>127)break;T[D+C]=H}if(C!==E){if(C!==0)M=M.slice(C);D=z(D,E,E=C+M.length*3,1)>>>0;let H=y().subarray(D+C,D+E),K=w(M,H);C+=K.written,D=z(D,E,C,1)>>>0}return u=C,D}let j=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};if(typeof TextDecoder<"u")j.decode();function P(M,q){return M=M>>>0,j.decode(y().subarray(M,M+q))}function S(M){let q,z;try{let E=n(M,h,c),D=f(E,u);return q=D[0],z=D[1],P(D[0],D[1])}finally{o(q,z,1)}}function x(M,q){let z,E;try{let D=n(M,h,c),T=u,C=n(q,h,c),H=g(D,T,C,u);return z=H[0],E=H[1],P(H[0],H[1])}finally{o(z,E,1)}}return{parse:S,parse_frag:x}}async function tg(){let{parse:t,parse_frag:r,...s}=(await import("./chunk-mqcbjght.js")).default;return s.parse_wasm=t,s.parse_frag_wasm=r,$n(s)}var Hi=(t)=>{console.error("Error: deno-dom: No parser registered"),Deno.exit(1)},Y2=(t,r)=>{console.error("Error: deno-dom: No parser registered"),Deno.exit(1)},rg=Hi;function sg(t,r){if(Hi!==rg)return;Hi=t,Y2=r}var pt=Symbol("CTOR_KEY"),uw=(()=>{var t=Symbol.hasInstance;return class{constructor(){throw TypeError("Illegal constructor")}static[t](r){return r?.constructor===Vi}}})(),hg=Symbol("HTMLCollectionMutatorSym"),Vi=(()=>{class t extends Array{forEach(r,s){super.forEach(r,s)}item(r){return this[r]??null}[hg](){return{push:Array.prototype.push.bind(this),splice:Array.prototype.splice.bind(this),indexOf:Array.prototype.indexOf.bind(this)}}toString(){return"[object HTMLCollection]"}}return t})();for(let t of["from","isArray","of"])Vi[t]=void 0;for(let t of["concat","copyWithin","every","fill","filter","find","findIndex","flat","flatMap","includes","indexOf","join","lastIndexOf","map","pop","push","reduce","reduceRight","reverse","shift","slice","some","sort","splice","toLocaleString","unshift","entries","forEach","keys","values"])Vi.prototype[t]=void 0;var j4=Vi,ww=(()=>{var t=Symbol.hasInstance;return class{constructor(){throw TypeError("Illegal constructor")}static[t](r){return r?.constructor===Ri}}})(),Ah=Symbol("nodeListMutatorSym"),A2=Symbol("nodeListCachedMutator"),{push:y4,splice:n4,slice:ig,indexOf:g4,filter:M2}=Array.prototype;class v2{arrayInstance;elementViews;constructor(t){this.arrayInstance=t,this.elementViews=[]}push(...t){for(let r of this.elementViews)for(let s of t)if(s.nodeType===Yt.ELEMENT_NODE)y4.call(r,s);return y4.call(this.arrayInstance,...t)}splice(t,r=0,...s){for(let h of this.elementViews){let c=M2.call(ig.call(this.arrayInstance,t,t+r),(g)=>g.nodeType===Yt.ELEMENT_NODE),o=s.filter((g)=>g.nodeType===Yt.ELEMENT_NODE),f=-1;for(let g=t;g<this.arrayInstance.length;g++){let u=this.arrayInstance[g];if(u.nodeType===Yt.ELEMENT_NODE){f=g4.call(h,u);break}}if(f===-1)f=h.length;if(c.length)n4.call(h,f,c.length);n4.call(h,f,0,...o)}return n4.call(this.arrayInstance,t,r,...s)}indexOf(t,r=0){return g4.call(this.arrayInstance,t,r)}indexOfElementsView(t,r=0){return g4.call(this.elementsView(),t,r)}elementsView(){let t=this.elementViews[0];if(!t)t=new j4,this.elementViews.push(t),y4.call(t,...M2.call(this.arrayInstance,(r)=>r.nodeType===Yt.ELEMENT_NODE));return t}}var Ri=(()=>{class t extends Array{forEach(r,s){super.forEach(r,s)}item(r){return this[r]??null}[Ah](){let r=this[A2];if(r)return r;else{let s=new v2(this);return this[A2]=s,s}}toString(){return"[object NodeList]"}}return t})();for(let t of["from","isArray","of"])Ri[t]=void 0;for(let t of["concat","copyWithin","every","fill","filter","find","findIndex","flat","flatMap","includes","indexOf","join","lastIndexOf","map","pop","push","reduce","reduceRight","reverse","shift","slice","some","sort","splice","toLocaleString","unshift"])Ri.prototype[t]=void 0;var Xs=Ri,_h={Element:null,Document:null,DocumentFragment:null},G2=/[A-Z]/,B2=/[a-z]/;function ji(t){let r="data-";for(let s of t)if(G2.test(s))r+="-"+s.toLowerCase();else r+=s;return r}function cg(t){let r="",s="";for(let h of t.slice(5))if(s==="-"&&B2.test(h))r+=h.toUpperCase(),s="";else r+=s,s=h;return r+s}function ki(t,r,s){for(let h of t.childNodes)if(h.nodeType===xt.ELEMENT_NODE){let c=0;for(let o of r)if(h.classList.contains(o))c++;if(c===r.length)s.push(h);ki(h,r,s)}return s}function E2(t){return"<"+t.localName+Q2(t)+">"}var P2=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function w4(t,r){let s="",h="",c="";if(r){if(s=E2(t),h=`</${t.localName}>`,P2.has(t.localName))return s}let o=[t.localName==="template"?t.content.childNodes:t.childNodes],f=[0],g=[h],u=0;t:while(u>-1){let b=o[u][f[u]];if(b)switch(b.nodeType){case xt.ELEMENT_NODE:{c+=E2(b);let y=b.localName;if(!P2.has(y)){if(y==="template")o.push(b.content.childNodes);else o.push(b.childNodes);f.push(0),g.push(`</${y}>`),u++;continue t}break}case xt.COMMENT_NODE:c+=`<!--${b.data}-->`;break;case xt.TEXT_NODE:switch(b.parentNode.localName){case"style":case"script":case"xmp":case"iframe":case"noembed":case"noframes":case"plaintext":{c+=b.data;break}case"noscript":{c+=b.data;break}default:{c+=b.data.replace(/&/g,"&amp;").replace(/\xA0/g,"&nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");break}}break}else u--,f.pop(),o.pop(),c+=g.pop();f[u]++}return s+c}function Q2(t){let r="";for(let s of t.getAttributeNames())r+=` ${s}`,r+=`="${t.getAttribute(s).replace(/&/g,"&amp;").replace(/\xA0/g,"&nbsp;").replace(/"/g,"&quot;")}"`;return r}function Di(t,r,s){let h=t.parentNode,c=h._getChildNodesMutator(),o=null;{let g=s?-1:1;for(let u=c.indexOf(t)+g;0<=u&&u<h.childNodes.length;u+=g)if(!r.includes(h.childNodes[u])){o=h.childNodes[u];break}}r=ys(r,h);let f;if(o)f=c.indexOf(o)+(s?1:0);else f=s?0:h.childNodes.length;c.splice(f,0,...r)}function b4(t){let r=t;if(!(r&&typeof r==="object"))return!1;while(!0)switch(r.constructor){case _h.DocumentFragment:return!0;case Yt:case _h.Element:return!1;case Object:case null:case void 0:return!1;default:r=Reflect.getPrototypeOf(r)}}function _4(t,r){let s=t.childNodes.length;for(let h of t.childNodes)h._setParent(r);t._getChildNodesMutator().splice(0,s)}var xt=function(t){return t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t[t.NOTATION_NODE=12]="NOTATION_NODE",t}({});function ys(t,r){return t.flatMap((s)=>{if(b4(s)){let h=Array.from(s.childNodes);return _4(s,r),h}else{let h=s instanceof Yt?s:new ms(String(s));if(s===h&&r)r._assertNotAncestor(h);return h._remove(!0),h._setParent(r,!0),[h]}})}class Yt extends EventTarget{nodeName;nodeType;#t;parentNode;#h;get parentElement(){if(this.parentNode?.nodeType===xt.ELEMENT_NODE)return this.parentNode;return null}static ELEMENT_NODE=xt.ELEMENT_NODE;static ATTRIBUTE_NODE=xt.ATTRIBUTE_NODE;static TEXT_NODE=xt.TEXT_NODE;static CDATA_SECTION_NODE=xt.CDATA_SECTION_NODE;static ENTITY_REFERENCE_NODE=xt.ENTITY_REFERENCE_NODE;static ENTITY_NODE=xt.ENTITY_NODE;static PROCESSING_INSTRUCTION_NODE=xt.PROCESSING_INSTRUCTION_NODE;static COMMENT_NODE=xt.COMMENT_NODE;static DOCUMENT_NODE=xt.DOCUMENT_NODE;static DOCUMENT_TYPE_NODE=xt.DOCUMENT_TYPE_NODE;static DOCUMENT_FRAGMENT_NODE=xt.DOCUMENT_FRAGMENT_NODE;static NOTATION_NODE=xt.NOTATION_NODE;constructor(t,r,s,h){if(h!==pt)throw TypeError("Illegal constructor.");if(super(),this.nodeName=t,this.nodeType=r,this.#t=null,this.parentNode=null,this.#h=null,this.#s=null,this.#t=null,s)s.appendChild(this)}#s;get childNodes(){return this.#s||(this.#s=new Xs)}_getChildNodesMutator(){return this.childNodes[Ah]()}_hasInitializedChildNodes(){return Boolean(this.#s)}_setParent(t,r=!1){let s=this.parentNode===t,h=!s||r;if(h){if(this.parentNode=t,t){if(!s)this._setOwnerDocument(t.#h)}if(this._hasInitializedChildNodes())for(let c of this.childNodes)c._setParent(this,h)}}_assertNotAncestor(t){if(t.contains(this))throw new DOMException("The new child is an ancestor of the parent")}_setOwnerDocument(t){if(this.#h!==t){if(this.#h=t,this._hasInitializedChildNodes())for(let r of this.childNodes)r._setOwnerDocument(t)}}contains(t){let r=t;while(r){if(r===this)return!0;r=r.parentNode}return!1}get ownerDocument(){return this.#h}get nodeValue(){return this.#t}set nodeValue(t){}get textContent(){let t="";for(let r of this.childNodes)switch(r.nodeType){case xt.TEXT_NODE:t+=r.nodeValue;break;case xt.ELEMENT_NODE:t+=r.textContent;break}return t}set textContent(t){for(let r of this.childNodes)r._setParent(null);this._getChildNodesMutator().splice(0,this.childNodes.length),this.appendChild(new ms(t))}get firstChild(){if(!this._hasInitializedChildNodes())return null;return this.childNodes[0]||null}get lastChild(){if(!this._hasInitializedChildNodes())return null;return this.childNodes[this.childNodes.length-1]||null}hasChildNodes(){return this._hasInitializedChildNodes()&&Boolean(this.childNodes.length)}cloneNode(t=!1){let r=this._shallowClone();if(r._setOwnerDocument(this.ownerDocument),t&&this._hasInitializedChildNodes())for(let s of this.childNodes)r.appendChild(s.cloneNode(!0));return r}_shallowClone(){throw Error("Illegal invocation")}_remove(t=!1){let r=this.parentNode;if(r){let s=r._getChildNodesMutator(),h=s.indexOf(this);if(s.splice(h,1),!t)this._setParent(null)}}appendChild(t){if(b4(t))return this._getChildNodesMutator().push(...t.childNodes),_4(t,this),t;else return t._appendTo(this)}_appendTo(t){t._assertNotAncestor(this);let r=this.parentNode;if(r===t){if(t._getChildNodesMutator().indexOf(this)!==-1)return this}else if(r)this._remove();return this._setParent(t,!0),t._getChildNodesMutator().push(this),this}removeChild(t){if(t&&typeof t==="object")if(t.parentNode===this)return t._remove(),t;else throw new DOMException("Node.removeChild: The node to be removed is not a child of this node");else throw TypeError("Node.removeChild: Argument 1 is not an object.")}replaceChild(t,r){if(r.parentNode!==this)throw Error("Old child's parent is not the current node.");return r._replaceWith(t),r}insertBefore(t,r){this._assertNotAncestor(t);let s=this._getChildNodesMutator();if(r===null)return this.appendChild(t),t;let h=s.indexOf(r);if(h===-1)throw Error("DOMException: Child to insert before is not a child of this node");if(b4(t))s.splice(h,0,...t.childNodes),_4(t,this);else{let c=t.parentNode,o=c?._getChildNodesMutator();if(o)o.splice(o.indexOf(t),1);t._setParent(this,c!==this),s.splice(h,0,t)}return t}_replaceWith(...t){if(this.parentNode){let r=this.parentNode,s=r._getChildNodesMutator(),h=null;{let f=s.indexOf(this);for(let g=f+1;g<r.childNodes.length;g++)if(!t.includes(r.childNodes[g])){h=r.childNodes[g];break}}t=ys(t,r);let c=h?s.indexOf(h):r.childNodes.length,o;if(r.childNodes[c-1]===this)c--,o=1;else o=0;s.splice(c,o,...t),this._setParent(null)}}get nextSibling(){let t=this.parentNode;if(!t)return null;let r=t._getChildNodesMutator().indexOf(this);return t.childNodes[r+1]||null}get previousSibling(){let t=this.parentNode;if(!t)return null;let r=t._getChildNodesMutator().indexOf(this);return t.childNodes[r-1]||null}static DOCUMENT_POSITION_DISCONNECTED=1;static DOCUMENT_POSITION_PRECEDING=2;static DOCUMENT_POSITION_FOLLOWING=4;static DOCUMENT_POSITION_CONTAINS=8;static DOCUMENT_POSITION_CONTAINED_BY=16;static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;compareDocumentPosition(t){if(t===this)return 0;if(!(t instanceof Yt))throw TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");let r=t,s=this,h=[r],c=[s];while(r.parentNode??s.parentNode)r=r.parentNode?(h.push(r.parentNode),r.parentNode):r,s=s.parentNode?(c.push(s.parentNode),s.parentNode):s;if(r!==s)return Yt.DOCUMENT_POSITION_DISCONNECTED|Yt.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|Yt.DOCUMENT_POSITION_PRECEDING;let o=h.length>c.length?h:c,f=o===h?c:h;if(o[o.length-f.length]===f[0])return o===h?Yt.DOCUMENT_POSITION_CONTAINED_BY|Yt.DOCUMENT_POSITION_FOLLOWING:Yt.DOCUMENT_POSITION_CONTAINS|Yt.DOCUMENT_POSITION_PRECEDING;let g=o.length-f.length;for(let u=f.length-1;u>=0;u--){let b=f[u],y=o[g+u];if(y!==b){let m=b.parentNode._getChildNodesMutator();if(m.indexOf(b)<m.indexOf(y))if(f===h)return Yt.DOCUMENT_POSITION_PRECEDING;else return Yt.DOCUMENT_POSITION_FOLLOWING;else if(o===h)return Yt.DOCUMENT_POSITION_PRECEDING;else return Yt.DOCUMENT_POSITION_FOLLOWING}}return Yt.DOCUMENT_POSITION_FOLLOWING}getRootNode(t={}){if(this.parentNode)return this.parentNode.getRootNode(t);if(t.composed&&this.host)return this.host.getRootNode(t);return this}}Yt.prototype.ELEMENT_NODE=xt.ELEMENT_NODE;Yt.prototype.ATTRIBUTE_NODE=xt.ATTRIBUTE_NODE;Yt.prototype.TEXT_NODE=xt.TEXT_NODE;Yt.prototype.CDATA_SECTION_NODE=xt.CDATA_SECTION_NODE;Yt.prototype.ENTITY_REFERENCE_NODE=xt.ENTITY_REFERENCE_NODE;Yt.prototype.ENTITY_NODE=xt.ENTITY_NODE;Yt.prototype.PROCESSING_INSTRUCTION_NODE=xt.PROCESSING_INSTRUCTION_NODE;Yt.prototype.COMMENT_NODE=xt.COMMENT_NODE;Yt.prototype.DOCUMENT_NODE=xt.DOCUMENT_NODE;Yt.prototype.DOCUMENT_TYPE_NODE=xt.DOCUMENT_TYPE_NODE;Yt.prototype.DOCUMENT_FRAGMENT_NODE=xt.DOCUMENT_FRAGMENT_NODE;Yt.prototype.NOTATION_NODE=xt.NOTATION_NODE;class F4 extends Yt{#t="";constructor(t,r,s,h,c){super(r,s,h,c);this.#t=t}get nodeValue(){return this.#t}set nodeValue(t){this.#t=String(t??"")}get data(){return this.#t}set data(t){this.nodeValue=t}get textContent(){return this.#t}set textContent(t){this.nodeValue=t}get length(){return this.data.length}before(...t){if(this.parentNode)Di(this,t,!0)}after(...t){if(this.parentNode)Di(this,t,!1)}remove(){this._remove()}replaceWith(...t){this._replaceWith(...t)}}class ms extends F4{constructor(t=""){super(String(t),"#text",xt.TEXT_NODE,null,pt)}_shallowClone(){return new ms(this.textContent)}}class Ui extends F4{constructor(t=""){super(String(t),"#comment",xt.COMMENT_NODE,null,pt)}_shallowClone(){return new Ui(this.textContent)}get textContent(){return this.nodeValue}}var x2=new Map,q2=new Map;function Ki(t){return x2.get(t)??x2.set(t,t.toUpperCase()).get(t)}function vr(t){return q2.get(t)??q2.set(t,t.toLowerCase()).get(t)}var p2,J2,d2;p2=Symbol.iterator;class Br{static#t=32;#h="";get#s(){return this.#h}set#s(t){this.#h=t,this.#i(t)}#r=[];#i;constructor(t,r){if(r!==pt)throw TypeError("Illegal constructor");this.#i=t}static#c(t){return t===""||/[\t\n\f\r ]/.test(t)}#o(){let t=Array.from(this.#r);for(let r=0;r<t.length;r++)this[r]=t[r]}set value(t){if(this.#s=t,this.#r=t.trim().split(/[\t\n\f\r\s]+/g).filter(Boolean),this.#r.length>Br.#t)this.#r=new Set(this.#r);else{let r=[];for(let s of this.#r)if(!r.includes(s))r.push(s);this.#r=r}this.#o()}get value(){return this.#h}get length(){if(this.#r.constructor===Array)return this.#r.length;else return this.#r.size}*entries(){let t=Array.from(this.#r);for(let r=0;r<t.length;r++)yield[r,t[r]]}*values(){yield*this.#r.values()}*keys(){let t=this.length;for(let r=0;r<t;r++)yield r}*[p2](){yield*this.#r.values()}item(t){if(t=Number(t),Number.isNaN(t)||t===1/0)t=0;return this[Math.trunc(t)%4294967296]??null}contains(t){if(this.#r.constructor===Array)return this.#r.includes(t);else return this.#r.has(t)}#f(t){let r=this.#r;if(!r.includes(t))this[r.length]=t,r.push(t)}#n(t){let r=this.#r,{size:s}=r;if(r.add(t),s<r.size)this[s]=t}add(...t){let r=(this.#r.constructor===Array?this.#f:this.#n).bind(this);for(let s of t){if(Br.#c(s))throw new DOMException("Failed to execute 'add' on 'DOMTokenList': The token provided must not be empty.");r(s)}this.#y()}#g(t){let r=this.#r,s=r.indexOf(t);if(s>=0)r.splice(s,1)}#m(t){this.#r.delete(t)}remove(...t){let r=(this.#r.constructor===Array?this.#g:this.#m).bind(this),s=this.length;for(let c of t){if(Br.#c(c))throw new DOMException("Failed to execute 'remove' on 'DOMTokenList': The token provided must not be empty.");r(c)}let h=this.length;if(s!==h){for(let c=h;c<s;c++)delete this[c];this.#o()}this.#y()}replace(t,r){let s=this.#r.constructor===Array,h=(s?this.#g:this.#m).bind(this),c=(s?this.#f:this.#n).bind(this);if([t,r].some((o)=>Br.#c(o)))throw new DOMException("Failed to execute 'replace' on 'DOMTokenList': The token provided must not be empty.");if(!this.contains(t))return!1;if(this.contains(r))this.remove(t);else h(t),c(r),this.#o(),this.#y();return!0}supports(){throw Error("Not implemented")}toggle(t,r){if(r!==void 0)return this[r?"add":"remove"](t),!1;else{let s=this.contains(t);return this[s?"remove":"add"](t),!s}}forEach(t){for(let[r,s]of this.entries())t(s,r,this)}#y(){if(this.#s=Array.from(this.#r).join(" "),this.#r.constructor===Array&&this.#r.length>Br.#t)this.#r=new Set(this.#r)}}var Ci=Symbol("initializeClassListSym"),Dr=Symbol("domTokenListCurrentElementSym");J2=Symbol.iterator;class Z2{[Dr];constructor(t){this[Dr]=t}#t(){let t=this[Dr].classList;if(t===this)return null;return t}set value(t){this[Dr][Ci](),this[Dr].classList.value=String(t)}get value(){return this.#t()?.value??""}get length(){return this.#t()?.length??0}*entries(){let t=this.#t();if(t)yield*t.entries()}*values(){let t=this.#t();if(t)yield*t.values()}*keys(){let t=this.#t();if(t)yield*t.keys()}*[J2](){yield*this.values()}item(t){return this.#t()?.item(t)??null}contains(t){return this.#t()?.contains(t)??!1}add(...t){this[Dr][Ci](),this[Dr].classList.add(...t)}remove(...t){this.#t()?.remove(...t)}replace(t,r){return this.#t()?.replace(t,r)??!1}supports(){throw Error("Not implemented")}toggle(t,r){if(r===!1)return this.#t()?.toggle(t,r)??!1;return this[Dr][Ci](),this[Dr].classList.add(t),!0}forEach(t){this.#t()?.forEach(t)}}var wh=Symbol("setNamedNodeMapOwnerElementSym"),$2=Symbol("setAttrValueSym");class ei extends Yt{#t=null;#h="";#s="";#r=null;constructor(t,r,s,h){if(h!==pt)throw TypeError("Illegal constructor");super(r,xt.ATTRIBUTE_NODE,null,pt);this.#h=r,this.#s=s,this.#t=t}[wh](t){if(this.#r=t,this.#t=t?.attributes??null,t)this._setOwnerDocument(t.ownerDocument)}[$2](t){this.#s=t}_shallowClone(){let t=new ei(null,this.#h,this.#s,pt);return t._setOwnerDocument(this.ownerDocument),t}cloneNode(){return super.cloneNode()}appendChild(){throw new DOMException("Cannot add children to an Attribute")}replaceChild(){throw new DOMException("Cannot add children to an Attribute")}insertBefore(){throw new DOMException("Cannot add children to an Attribute")}removeChild(){throw new DOMException("The node to be removed is not a child of this node")}get name(){return this.#h}get localName(){return this.#h}get value(){return this.#s}set value(t){if(this.#s=String(t),this.#t)this.#t[Ks](this.#h,this.#s,!0)}get ownerElement(){return this.#r??null}get specified(){return!0}get prefix(){return null}}var Ks=Symbol("setNamedNodeMapValueSym"),Ti=Symbol("getNamedNodeMapValueSym"),tf=Symbol("getNamedNodeMapAttrNamesSym"),Fi=Symbol("getNamedNodeMapAttrNodeSym"),S4=Symbol("removeNamedNodeMapAttrSym");d2=Symbol.iterator;class L4{static#t=function(t,r){if(r+1>this.length)return;let s=Object.keys(t).filter((h)=>t[h]!==void 0)[r]?.slice(1);return this[Fi](s)};#h;constructor(t,r,s){if(s!==pt)throw TypeError("Illegal constructor.");this.#o=t,this.#h=r;for(let h of t.getAttributeNames())this[Ks](h,t.getAttribute(h))}#s={};#r={};#i=0;#c=0;#o=null;[Fi](t){let r="a"+t,s=this.#s[r];if(!s)s=this.#s[r]=new ei(this,t,this.#r[r],pt),s[wh](this.#o);return s}[tf](){let t=[];for(let[r,s]of Object.entries(this.#r))if(s!==void 0)t.push(r.slice(1));return t}[Ti](t){let r="a"+t;return this.#r[r]}[Ks](t,r,s=!1){let h="a"+t;if(this.#r[h]===void 0){if(this.#i++,this.#i>this.#c){this.#c=this.#i;let c=this.#c-1;Object.defineProperty(this,String(this.#c-1),{get:L4.#t.bind(this,this.#r,c)})}}else if(this.#s[h])this.#s[h][$2](r);if(this.#r[h]=r,s)this.#h(t,r)}[S4](t){let r="a"+t;if(this.#r[r]!==void 0){this.#i--,this.#r[r]=void 0,this.#h(t,null);let s=this.#s[r];if(s)s[wh](null),this.#s[r]=void 0}}*[d2](){for(let t=0;t<this.length;t++)yield this[t]}get length(){return this.#i}item(t){if(t>=this.#i)return null;return this[t]}getNamedItem(t){let r="a"+t;if(this.#r[r]!==void 0)return this[Fi](t);return null}setNamedItem(t){if(t.ownerElement)throw new DOMException("Attribute already in use");let r="a"+t.name,s=this.#s[r];if(s)s[wh](null),this.#r[r]=void 0;t[wh](this.#o),this.#s[r]=t,this[Ks](t.name,t.value,!0)}removeNamedItem(t){let r="a"+t;if(this.#r[r]!==void 0){let s=this[Fi](t);return this[S4](t),s}throw new DOMException("Node was not found")}}var rf=":A-Za-z_"+String.raw`\u{C0}-\u{D6}\u{D8}-\u{F6}\u{F8}-\u{2FF}\u{370}-\u{37D}`+String.raw`\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}`+String.raw`\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}`,og=rf+String.raw`\u{B7}\u{0300}-\u{036F}\u{203F}-\u{2040}0-9.-`,bw=new RegExp(`[${rf}]`,"u"),fg=new RegExp(`[${og}]`,"u");class Sr extends Yt{#t=null;get attributes(){if(!this.#t)this.#t=new L4(this,(t,r)=>{let s=r===null;if(r===null)r="";switch(t){case"class":{if(s)this.#c=-1;else if(this.#c===-1)this.#c=this.#i+1;this.#r=r,this.#f.value=r;break}case"id":{if(s)this.#i=-1;else if(this.#i===-1)this.#i=this.#c+1;this.#s=r;break}}},pt);return this.#t}#h=null;#s="";#r="";#i=-1;#c=-1;#o=new Z2(this);get#f(){return this.#o}[Ci](){if(this.#o.constructor===Br)return;this.#o=new Br((t)=>{if(this.#r!==t){if(this.#r=t,this.#c===-1)this.#c=this.#i+1;if(this.#t&&(this.hasAttribute("class")||t!==""))this.attributes[Ks]("class",t)}},pt)}constructor(t,r,s,h){super(t,xt.ELEMENT_NODE,r,h);for(let c of s)this.setAttribute(c[0],c[1]);this.nodeName=Ki(t)}get tagName(){return this.nodeName}get localName(){return vr(this.tagName)}_shallowClone(){let t=[];for(let r of this.getAttributeNames())t.push([r,this.getAttribute(r)]);return new Sr(this.nodeName,null,t,pt)}get childElementCount(){return this._getChildNodesMutator().elementsView().length}get className(){return this.#r}set className(t){this.#f.value=t}get classList(){return this.#f}get outerHTML(){return w4(this,!0)}set outerHTML(t){if(this.parentNode){let{parentElement:r,parentNode:s}=this,h=r?.localName;switch(s.nodeType){case xt.DOCUMENT_NODE:throw new DOMException("Modifications are not allowed for this document");case xt.DOCUMENT_FRAGMENT_NODE:h="body";default:{let{childNodes:c}=E4(t,h).childNodes[0],o=s._getChildNodesMutator(),f=o.indexOf(this);for(let g=c.length-1;g>=0;g--){let u=c[g];o.splice(f,0,u),u._setParent(s),u._setOwnerDocument(s.ownerDocument)}this.remove()}}}}get innerHTML(){return w4(this,!1)}set innerHTML(t){for(let s of this.childNodes)s._setParent(null);let r=this._getChildNodesMutator();if(r.splice(0,this.childNodes.length),t.length){let s=E4(t,this.localName);for(let h of s.childNodes[0].childNodes)r.push(h);for(let h of this.childNodes)h._setParent(this),h._setOwnerDocument(this.ownerDocument)}}get innerText(){return this.textContent}set innerText(t){this.textContent=t}get children(){return this._getChildNodesMutator().elementsView()}get id(){return this.#s||""}set id(t){this.setAttribute("id",t)}get dataset(){if(this.#h)return this.#h;return this.#h=new Proxy({},{get:(t,r,s)=>{if(typeof r==="string"){let h=ji(r);return this.getAttribute(h)??void 0}return},set:(t,r,s,h)=>{if(typeof r==="string"){let c="data-",o="";for(let f of r){if(o==="-"&&B2.test(f))throw new DOMException("An invalid or illegal string was specified");if(!fg.test(f))throw new DOMException("String contains an invalid character");if(G2.test(f))c+="-";c+=f.toLowerCase(),o=f}this.setAttribute(c,String(s))}return!0},deleteProperty:(t,r)=>{if(typeof r==="string"){let s=ji(r);this.removeAttribute(s)}return!0},ownKeys:(t)=>{return this.getAttributeNames().flatMap((r)=>{if(r.startsWith?.("data-"))return[cg(r)];else return[]})},getOwnPropertyDescriptor:(t,r)=>{if(typeof r==="string"){let s=ji(r);if(this.hasAttribute(s))return{writable:!0,enumerable:!0,configurable:!0}}return},has:(t,r)=>{if(typeof r==="string"){let s=ji(r);return this.hasAttribute(s)}return!1}}),this.#h}getAttributeNames(){if(!this.#t){let t=[],r=Number(this.#i>this.#c);for(let s=0;s<2;s++)switch((s+r)%2){case 0:{~this.#i&&t.push("id");break}case 1:{~this.#c&&t.push("class");break}}return t}return this.attributes[tf]()}getAttribute(t){let r=vr(String(t));switch(r){case"id":if(~this.#i)return this.#s;else return null;case"class":if(~this.#c)return this.#r;else return null}if(!this.#t)return null;return this.attributes[Ti](r)??null}setAttribute(t,r){let s=vr(String(t)),h=String(r),c=!1;switch(s){case"id":{if(this.#s=h,this.#i===-1)this.#i=this.#c+1;break}case"class":{if(this.#f.value=h,this.#c===-1)this.#c=this.#i+1;break}default:c=!0}if(this.#t||c)this.attributes[Ks](s,h)}removeAttribute(t){let r=vr(String(t));switch(r){case"id":{this.#s="",this.#i=-1;break}case"class":{this.#f.value="",this.#c=-1;break}}if(!this.#t)return;this.attributes[S4](r)}toggleAttribute(t,r){let s=vr(String(t));if(this.hasAttribute(s)){if(r===void 0||r===!1)return this.removeAttribute(s),!1;return!0}if(r===void 0||r===!0)return this.setAttribute(s,""),!0;return!1}hasAttribute(t){let r=vr(String(t));switch(r){case"id":return Boolean(~this.#i);case"class":return Boolean(~this.#c)}if(!this.#t)return!1;return this.attributes[Ti](r)!==void 0}hasAttributeNS(t,r){let s=vr(String(r));switch(s){case"id":return Boolean(~this.#i);case"class":return Boolean(~this.#c)}if(!this.#t)return!1;return this.attributes[Ti](s)!==void 0}getAttributeNode(t){let r=vr(String(t));return this.attributes.getNamedItem(r)}setAttributeNode(t){if(t?.constructor!==ei)throw TypeError("Element.setAttributeNode: Argument 1 does not implement interface Attr");let r=t.localName,s=this.attributes.getNamedItem(r);if(s===t)return t;return this.attributes.setNamedItem(t),s}replaceWith(...t){this._replaceWith(...t)}remove(){this._remove()}append(...t){this._getChildNodesMutator().push(...ys(t,this))}prepend(...t){this._getChildNodesMutator().splice(0,0,...ys(t,this))}before(...t){if(this.parentNode)Di(this,t,!0)}after(...t){if(this.parentNode)Di(this,t,!1)}get firstElementChild(){return this._getChildNodesMutator().elementsView()[0]??null}get lastElementChild(){let t=this._getChildNodesMutator().elementsView();return t[t.length-1]??null}get nextElementSibling(){let t=this.parentNode;if(!t)return null;let r=t._getChildNodesMutator(),s=r.indexOfElementsView(this);return r.elementsView()[s+1]??null}get previousElementSibling(){let t=this.parentNode;if(!t)return null;let r=t._getChildNodesMutator(),s=r.indexOfElementsView(this);return r.elementsView()[s-1]??null}querySelector(t){if(!this.ownerDocument)throw Error("Element must have an owner document");return this.ownerDocument._nwapi.first(t,this)}querySelectorAll(t){if(!this.ownerDocument)throw Error("Element must have an owner document");let r=new Xs,s=r[Ah]();for(let h of this.ownerDocument._nwapi.select(t,this))s.push(h);return r}matches(t){return this.ownerDocument._nwapi.match(t,this)}closest(t){let{match:r}=this.ownerDocument._nwapi,s=this;do{if(r(t,s))return s;s=s.parentElement}while(s!==null);return null}getElementById(t){if(!this._hasInitializedChildNodes())return null;for(let r of this.childNodes)if(r.nodeType===xt.ELEMENT_NODE){if(r.id===t)return r;let s=r.getElementById(t);if(s)return s}return null}getElementsByTagName(t){if(!this._hasInitializedChildNodes())return[];let r=Ki(t);if(r==="*")return this._getElementsByTagNameWildcard([]);else return this._getElementsByTagName(r,[])}_getElementsByTagNameWildcard(t){if(!this._hasInitializedChildNodes())return t;for(let r of this.childNodes)if(r.nodeType===xt.ELEMENT_NODE)t.push(r),r._getElementsByTagNameWildcard(t);return t}_getElementsByTagName(t,r){if(!this._hasInitializedChildNodes())return r;for(let s of this.childNodes)if(s.nodeType===xt.ELEMENT_NODE){if(s.tagName===t)r.push(s);s._getElementsByTagName(t,r)}return r}getElementsByClassName(t){if(!this._hasInitializedChildNodes())return[];return ki(this,t.trim().split(/\s+/),[])}getElementsByTagNameNS(t,r){if(!this._hasInitializedChildNodes())return[];return this.getElementsByTagName(r)}}_h.Element=Sr;var A4=Symbol(),M4=Symbol();class Xr extends Yt{constructor(){super("#document-fragment",xt.DOCUMENT_FRAGMENT_NODE,null,pt)}get childElementCount(){return this._getChildNodesMutator().elementsView().length}get children(){return this._getChildNodesMutator().elementsView()}get firstElementChild(){return this._getChildNodesMutator().elementsView()[0]??null}get lastElementChild(){let t=this._getChildNodesMutator().elementsView();return t[t.length-1]??null}_shallowClone(){return new Xr}append(...t){this._getChildNodesMutator().push(...ys(t,this))}prepend(...t){this._getChildNodesMutator().splice(0,0,...ys(t,this))}replaceChildren(...t){let r=this._getChildNodesMutator();for(let s of this.childNodes)s._setParent(null);r.splice(0,this.childNodes.length),r.splice(0,0,...ys(t,this))}getElementById(t){for(let r of this.childNodes)if(r.nodeType===xt.ELEMENT_NODE){if(r.id===t)return r;let s=r.getElementById(t);if(s)return s}return null}querySelector(t){if(!this.ownerDocument)throw Error("DocumentFragment must have an owner document");return this.ownerDocument._nwapi.first(t,this)}querySelectorAll(t){if(!this.ownerDocument)throw Error("DocumentFragment must have an owner document");let r=new Xs;return r[Ah]().push(...this.ownerDocument._nwapi.select(t,this)),r}}_h.DocumentFragment=Xr;function yg(t){let r=[];if(t==="*")return gg(this,r);for(let s of this.childNodes)if(s.nodeType===xt.ELEMENT_NODE){if(s.tagName===t)r.push(s);s._getElementsByTagName(t,r)}return r}function ng(t){return ki(this,t.trim().split(/\s+/),[])}function gg(t,r){for(let s of t.childNodes)if(s.nodeType===xt.ELEMENT_NODE)r.push(s),s._getElementsByTagNameWildcard(r);return r}Xr.prototype[A4]=yg;Xr.prototype[M4]=ng;class ai extends Sr{__contentIsSet=!1;#t=null;constructor(t,r,s,h){super("TEMPLATE",t,r,s);this.#t=h,this.__contentIsSet=!0}get content(){return this.#t}_setOwnerDocument(t){if(super._setOwnerDocument(t),this.__contentIsSet)this.content._setOwnerDocument(t)}_shallowClone(){let t=new Xr,r=this.getAttributeNames().map((s)=>[s,this.getAttribute(s)]);return new ai(null,r,pt,t)}cloneNode(t=!1){let r=super.cloneNode(t);if(t){let s=r.content;for(let h of this.content.childNodes)s.appendChild(h.cloneNode(t))}return r}get innerHTML(){return w4(this,!1)}set innerHTML(t){let r=this.content;for(let h of r.childNodes)h._setParent(null);let s=r._getChildNodesMutator();if(s.splice(0,r.childNodes.length),t.length){let h=E4(t,this.localName);s.push(...h.childNodes[0].childNodes);for(let c of r.childNodes)c._setParent(r),c._setOwnerDocument(r.ownerDocument)}}get outerHTML(){return`<template${Q2(this)}>${this.innerHTML}</template>`}}var mg=(t)=>{let r=sf({document:t,DOMException},"null");return r.configure({IDS_DUPES:!1,LOGERRORS:!1}),r};function sf(t,r){var s="nwsapi-2.2.0",h=t.document,c=h.documentElement,o=Array.prototype.slice,f="[\\x20\\t\\r\\n\\f]",g={operators:"[~*^$|]=|=",combinators:"[\\x20\\t>+~](?=[^>+~])"},u={double_enc:'(?=(?:[^"]*["][^"]*["])*[^"]*$)',single_enc:"(?=(?:[^']*['][^']*['])*[^']*$)",parens_enc:"(?![^\\x28]*\\x29)",square_enc:"(?![^\\x5b]*\\x5d)"},b={HasEscapes:RegExp("\\\\"),HexNumbers:RegExp("^[0-9a-fA-F]"),EscOrQuote:RegExp("^\\\\|[\\x22\\x27]"),RegExpChar:RegExp("(?:(?!\\\\)[\\\\^$.*+?()[\\]{}|\\/])","g"),TrimSpaces:RegExp("[\\r\\n\\f]|^"+f+"+|"+f+"+$","g"),CommaGroup:RegExp("(\\s*,\\s*)"+u.square_enc+u.parens_enc,"g"),SplitGroup:RegExp("((?:\\x28[^\\x29]*\\x29|\\[[^\\]]*\\]|\\\\.|[^,])+)","g"),FixEscapes:RegExp("\\\\([0-9a-fA-F]{1,6}"+f+"?|.)|([\\x22\\x27])","g"),CombineWSP:RegExp("[\\n\\r\\f\\x20]+"+u.single_enc+u.double_enc,"g"),TabCharWSP:RegExp("(\\x20?\\t+\\x20?)"+u.single_enc+u.double_enc,"g"),PseudosWSP:RegExp("\\s+([-+])\\s+"+u.square_enc,"g")},y={combinator:RegExp("\\s?([>+~])\\s?","g"),apimethods:RegExp("^(?:[a-z]+|\\*)\\|","i"),namespaces:RegExp("(\\*|[a-z]+)\\|[-a-z]+","i")},m={linguistic:"(dir|lang)\\x28\\s?([-\\w]{2,})\\s?(?:\\x29|$)",logicalsel:"(is|where|matches|not)\\x28\\s?([^()]*|[^\\x28]*\\x28[^\\x29]*\\x29)\\s?(?:\\x29|$)",treestruct:"(nth(?:-last)?(?:-child|-of-type))(?:\\x28\\s?(even|odd|(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)?)\\s?(?:\\x29|$))",locationpc:"(any-link|link|visited|target)\\b",useraction:"(hover|active|focus|focus-within)\\b",structural:"(root|empty|(?:(?:first|last|only)(?:-child|-of-type)))\\b",inputstate:"(enabled|disabled|read-only|read-write|placeholder-shown|default)\\b",inputvalue:"(checked|indeterminate|required|optional|valid|invalid|in-range|out-of-range)\\b",pseudo_sng:"(after|before|first-letter|first-line)\\b",pseudo_dbl:":(after|before|first-letter|first-line|selection|placeholder|-webkit-[-a-zA-Z0-9]{2,})\\b"},w={treestruct:RegExp("^:(?:"+m.treestruct+")(.*)","i"),structural:RegExp("^:(?:"+m.structural+")(.*)","i"),linguistic:RegExp("^:(?:"+m.linguistic+")(.*)","i"),useraction:RegExp("^:(?:"+m.useraction+")(.*)","i"),inputstate:RegExp("^:(?:"+m.inputstate+")(.*)","i"),inputvalue:RegExp("^:(?:"+m.inputvalue+")(.*)","i"),locationpc:RegExp("^:(?:"+m.locationpc+")(.*)","i"),logicalsel:RegExp("^:(?:"+m.logicalsel+")(.*)","i"),pseudo_dbl:RegExp("^:(?:"+m.pseudo_dbl+")(.*)","i"),pseudo_sng:RegExp("^:(?:"+m.pseudo_sng+")(.*)","i"),children:RegExp("^"+f+"?\\>"+f+"?(.*)"),adjacent:RegExp("^"+f+"?\\+"+f+"?(.*)"),relative:RegExp("^"+f+"?\\~"+f+"?(.*)"),ancestor:RegExp("^"+f+"+(.*)"),universal:RegExp("^\\*(.*)"),namespace:RegExp("^(\\w+|\\*)?\\|(.*)")},n=RegExp("^[\\u0591-\\u08ff\\ufb1d-\\ufdfd\\ufe70-\\ufefc ]+$"),j="Not enough arguments",P=" is not a valid selector",S=RegExp("(:nth(?:-last)?-child)","i"),x=RegExp("(:nth(?:-last)?-of-type)","i"),M,q,z={IDS_DUPES:!0,MIXEDCASE:!0,LOGERRORS:!0,VERBOSITY:!0},E,D,T,C={"=":1,"^=":1,"$=":1,"|=":1,"*=":1,"~=":1},H={accept:1,"accept-charset":1,align:1,alink:1,axis:1,bgcolor:1,charset:1,checked:1,clear:1,codetype:1,color:1,compact:1,declare:1,defer:1,dir:1,direction:1,disabled:1,enctype:1,face:1,frame:1,hreflang:1,"http-equiv":1,lang:1,language:1,link:1,media:1,method:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,rel:1,rev:1,rules:1,scope:1,scrolling:1,selected:1,shape:1,target:1,text:1,type:1,valign:1,valuetype:1,vlink:1},K={},O={},I={"=":{p1:"^",p2:"$",p3:"true"},"^=":{p1:"^",p2:"",p3:"true"},"$=":{p1:"",p2:"$",p3:"true"},"*=":{p1:"",p2:"",p3:"true"},"|=":{p1:"^",p2:"(-|$)",p3:"true"},"~=":{p1:"(^|\\s)",p2:"(\\s|$)",p3:"true"}},N=function(R,X){var v=0,J=R.length,ot=Array(J);while(J>v){if(X(ot[v]=R[v])===!1)break;++v}return ot},F=function(R,X){var v=-1,J=X.length;while(J--)R[R.length]=X[++v];return R},p=function(R,X){if(!ht&&R===X)return ht=!0,0;return R.compareDocumentPosition(X)&4?-1:1},ht=!1,U=function(R){var X=0,v=-1,J=R.length+1,ot=[];while(--J){if(R[X++]===R[X])continue;ot[++v]=R[X-1]}return ht=!1,ot},Y=function(R){var X,v="getElementsByTagNameNS";return R=R.ownerDocument||R,X=R.documentElement.namespaceURI||"http://www.w3.org/1999/xhtml",R[v]("*","*").length-R[v](X,"*").length>0},Q=function(R,X){var v=h;if(h=R.ownerDocument||R,X||v!==h)c=h.documentElement,T=p0(h),D=T&&h.compatMode.indexOf("CSS")<0,E=c&&c.namespaceURI,vt.doc=h,vt.root=c;return vt.from=R},G=function(R){if(R<1||R>1114111||R>55295&&R<57344)return"\\ufffd";if(R<65536){var X="000"+R.toString(16);return"\\u"+X.substr(X.length-4)}return"\\u"+((R-65536>>10)+55296).toString(16)+"\\u"+((R-65536)%1024+56320).toString(16)},tt=function(R){if(R<1||R>1114111||R>55295&&R<57344)return"�";if(R<65536)return String.fromCharCode(R);return String.fromCodePoint?String.fromCodePoint(R):String.fromCharCode((R-65536>>10)+55296,(R-65536)%1024+56320)},d=function(R){return b.HasEscapes.test(R)?R.replace(b.FixEscapes,function(X,v,J){return J?"\\"+J:b.HexNumbers.test(v)?G(parseInt(v,16)):b.EscOrQuote.test(v)?X:v}):R},ft=function(R){return b.HasEscapes.test(R)?R.replace(b.FixEscapes,function(X,v,J){return J?J:b.HexNumbers.test(v)?tt(parseInt(v,16)):b.EscOrQuote.test(v)?X:v}):R},e={"#":"getElementById","*":"getElementsByTagNameNS",".":"getElementsByClassName"},mt={"#":function(R,X){return b.HasEscapes.test(X)&&(X=ft(X)),function(v,J){return Ft(X,R)}},"*":function(R,X){return b.HasEscapes.test(X)&&(X=ft(X)),function(v,J){return gt(X,R)}},".":function(R,X){return b.HasEscapes.test(X)&&(X=ft(X)),function(v,J){return Ut(X,R)}}},qt=function(R,X){var v=X,J=[],ot=v.firstElementChild;while(v=ot){if(v.id==R&&(J[J.length]=v),ot=v.firstElementChild||v.nextElementSibling)continue;while(!ot&&(v=v.parentElement)&&v!==X)ot=v.nextElementSibling}return J},Ft=function(R,X){var v,J,ot=e["#"];if(z.IDS_DUPES===!1){if(ot in X)return(v=X[ot](R))?[v]:rt}else if("all"in X)if(v=X.all[R]){if(v.nodeType==1)return v.getAttribute("id")!=R?[]:[v];else if(R=="length")return(v=X[ot](R))?[v]:rt;for(i=0,l=v.length,J=[];l>i;++i)if(v[i].id==R)J[J.length]=v[i];return J&&J.length?J:[J]}else return rt;return qt(R,X)},gt=function(R,X){var v,J,ot=e["*"];if(ot in X)return o.call(X[ot]("*",R));else if(R=R.toLowerCase(),v=X.firstElementChild)if(!(v.nextElementSibling||R=="*"||v.localName==R))return o.call(v[ot]("*",R));else{J=[];do{if(R=="*"||v.localName==R)J[J.length]=v;F(J,v[ot]("*",R))}while(v=v.nextElementSibling)}else J=rt;return J},Ut=function(R,X){var v,J,ot=e["."],At;if(ot in X)return o.call(X[ot](R));else if(v=X.firstElementChild)if(At=RegExp("(^|\\s)"+R+"(\\s|$)",D?"i":""),!(v.nextElementSibling||At.test(v.className)))return o.call(v[ot](R));else{J=[];do{if(At.test(v.className))J[J.length]=v;F(J,v[ot](R))}while(v=v.nextElementSibling)}else J=rt;return J},Wt=function(R,X){var v,J,ot=R.getAttributeNames();X=RegExp(":?"+X+"$",T?"i":"");for(v=0,J=ot.length;J>v;++v)if(X.test(ot[v]))return!0;return!1},Zt=function(){var R=0,X=0,v=0,J=void 0,ot=Array(),At=Array();return function(_t,$t){if($t==2)return R=0,X=0,v=0,At.length=0,ot.length=0,J=void 0,-1;var at,Xt,It,Qt,Vt;if(J===_t.parentElement)Xt=v,It=R,Vt=X;else{Vt=ot.length,J=_t.parentElement;for(Xt=-1,It=0,Qt=Vt-1;Vt>It;++It,--Qt){if(ot[It]===J){Xt=It;break}if(ot[Qt]===J){Xt=Qt;break}}if(Xt<0){ot[Xt=Vt]=J,Vt=0,At[Xt]=Array(),at=J&&J.firstElementChild||_t;while(at){if(At[Xt][Vt]=at,at===_t)It=Vt;at=at.nextElementSibling,++Vt}if(v=Xt,R=0,X=Vt,Vt<2)return Vt}else Vt=At[Xt].length,v=Xt}if(_t!==At[Xt][It]&&_t!==At[Xt][It=0])for(It=0,at=At[Xt],Qt=Vt-1;Vt>It;++It,--Qt){if(at[It]===_t)break;if(at[Qt]===_t){It=Qt;break}}return R=It+1,X=Vt,$t?Vt-It:R}}(),g0=function(){var R=0,X=0,v=0,J=void 0,ot=Array(),At=Array();return function(_t,$t){if($t==2)return R=0,X=0,v=0,At.length=0,ot.length=0,J=void 0,-1;var at,Xt,It,Qt,Vt,Mt=_t.localName;if(At[v]&&At[v][Mt]&&J===_t.parentElement)Xt=v,It=R,Vt=X;else{Vt=ot.length,J=_t.parentElement;for(Xt=-1,It=0,Qt=Vt-1;Vt>It;++It,--Qt){if(ot[It]===J){Xt=It;break}if(ot[Qt]===J){Xt=Qt;break}}if(Xt<0||!At[Xt][Mt]){ot[Xt=Vt]=J,At[Xt]||(At[Xt]=Object()),Vt=0,At[Xt][Mt]=Array(),at=J&&J.firstElementChild||_t;while(at){if(at===_t)It=Vt;if(at.localName==Mt)At[Xt][Mt][Vt]=at,++Vt;at=at.nextElementSibling}if(v=Xt,R=It,X=Vt,Vt<2)return Vt}else Vt=At[Xt][Mt].length,v=Xt}if(_t!==At[Xt][Mt][It]&&_t!==At[Xt][Mt][It=0])for(It=0,at=At[Xt][Mt],Qt=Vt-1;Vt>It;++It,--Qt){if(at[It]===_t)break;if(at[Qt]===_t){It=Qt;break}}return R=It+1,X=Vt,$t?Vt-It:R}}(),p0=function(R){var X=R.ownerDocument||R;return X.nodeType==9&&"contentType"in X?X.contentType.indexOf("/html")>0:X.createElement("DiV").localName=="div"},J0=function(R,X){if(typeof R=="string")return!!z[R];if(typeof R!="object")return z;for(var v in R)z[v]=!!R[v];if(X)Et={},Ct={};return V0(),!0},Kt=function(R,X){var v;if(z.VERBOSITY){if(X)v=new X(R);else v=new t.DOMException(R,"SyntaxError");throw v}if(z.LOGERRORS&&console&&console.log)console.log(R)},c0=function(R){V0(),it=Q(R,!0)},V0=function(){var R="(?=[^0-9])(?:-{2}|[a-zA-Z0-9-_]|[^\\x00-\\x9f]|\\\\[^\\r\\n\\f0-9a-fA-F]|\\\\[0-9a-fA-F]{1,6}(?:\\r\\n|\\s)?|\\\\.)+",X="[-\\w]+",v="(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)",J='"[^"\\\\]*(?:\\\\.[^"\\\\]*)*(?:"|$)',ot="'[^'\\\\]*(?:\\\\.[^'\\\\]*)*(?:'|$)",At=R+"|"+J+"|"+ot,_t="([\\x22\\x27]?)((?!\\3)*|(?:\\\\?.)*?)(?:\\3|$)",$t="\\[(?:\\*\\|)?"+f+"?("+R+"(?::"+R+")?)"+f+"?(?:("+g.operators+")"+f+"?(?:"+At+"))?"+f+"?(i)?"+f+"?(?:\\]|$)",at=$t.replace(At,_t),Xt="(?:\\x28"+f+"*(?:"+v+"?)?|(?:\\*|\\|)|(?:(?::"+X+"(?:\\x28"+v+"?(?:\\x29|$))?|)|(?:[.#]?"+R+")|(?:"+$t+"))+|(?:"+f+"?,"+f+"?)|(?:"+f+"?)|(?:\\x29|$))*",It="(?="+f+"?[^>+~(){}<>])(?:(?:\\*|\\|)|(?:[.#]?"+R+")+|(?:"+$t+")+|(?:::?"+X+Xt+")|(?:"+f+"?"+g.combinators+f+"?)|(?:"+f+"?,"+f+"?)|(?:"+f+"?))+";M=RegExp("(?:([.:#*]?)("+R+")(?::[-\\w]+|\\[[^\\]]+(?:\\]|$)|\\x28[^\\x29]+(?:\\x29|$))*)$"),q=RegExp(It,"g"),w.id=RegExp("^#("+R+")(.*)"),w.tagName=RegExp("^("+R+")(.*)"),w.className=RegExp("^\\.("+R+")(.*)"),w.attribute=RegExp("^(?:"+at+")(.*)")},q0='"use strict";return function Resolver(c,f,x,r)',f0="var e,n,o,j=r.length-1,k=-1",y0="var e,n,o",R0="main:while((e=c[++k]))",O0="main:while((e=c.item(++k)))",Nt="e=c;",Ar="r[++j]=c[k];",lt="r[++j]=c.item(k);",C0="",b0="continue main;",_0="r=true;",s0="if(f(c[k])){break main;}",T0="if(f(c.item(k))){break main;}",Lt="f(c);",tr=[],kt=[],Ot=function(R,X,v){var J,ot,At="",_t="",$t="",at="",Xt="";switch(X){case!0:if(St[R])return St[R];$t=Ar+(v?s0:"")+b0,At=f0,_t=R0;break;case!1:if(yt[R])return yt[R];$t=C0+(v?Lt:"")+_0,At=y0,_t=Nt;break;case null:if(St[R])return St[R];$t=lt+(v?T0:"")+b0,At=f0,_t=O0;break;default:break}if(at=o0(R,$t,X,v,!1),_t+=X||X===null?"{"+at+"}":at,X||X===null&&R.includes(":nth"))_t+=S.test(R)?"s.nthElement(null, 2);":"",_t+=x.test(R)?"s.nthOfType(null, 2);":"";if(tr[0]||kt[0])Xt=","+(tr.join(",")||kt.join(",")),tr.length=0,kt.length=0;return J=Function("s",q0+"{"+At+Xt+";"+_t+"return r;}")(vt),X||X===null?St[R]=J:yt[R]=J},o0=function(R,X,v,J,ot){var At,_t,$t,at,Xt,It,Qt,Vt,Mt=ot?"!":"",zr=ot?"":"!",Is,n0,ct,Vr,us,k0,z0,jr,Jt=R,U0,j0;U0=v?$:nt,Jt=Jt.replace(y.combinator,"$1");while(Jt){switch(k0=y.apimethods.test(Jt)?"|":Jt[0],k0){case"*":if(ct=Jt.match(w.universal),Mt=="!")X="if("+Mt+"true){"+X+"}";break;case"#":ct=Jt.match(w.id),X="if("+Mt+"(/^"+ct[1]+'$/.test(e.getAttribute("id")))){'+X+"}";break;case".":ct=Jt.match(w.className),Is=(D?"i":"")+'.test(e.getAttribute("class"))',X="if("+Mt+"(/(^|\\s)"+ct[1]+"(\\s|$)/"+Is+")){"+X+"}";break;case(/[_a-z]/i.test(k0)?k0:void 0):ct=Jt.match(w.tagName),X="if("+Mt+"(e.localName"+(z.MIXEDCASE||Y(h)?'=="'+ct[1].toLowerCase()+'"':'=="'+ct[1].toUpperCase()+'"')+")){"+X+"}";break;case"|":if(ct=Jt.match(w.namespace),ct[1]=="*")X="if("+Mt+"true){"+X+"}";else if(!ct[1])X="if("+Mt+"(!e.namespaceURI)){"+X+"}";else if(typeof ct[1]=="string"&&c.prefix==ct[1])X="if("+Mt+'(e.namespaceURI=="'+E+'")){'+X+"}";else Kt("'"+U0+"'"+P);break;case"[":if(ct=Jt.match(w.attribute),Vt=ct[0].match(y.namespaces),Qt=ct[1],n0=Qt.split(":"),n0=n0.length==2?n0[1]:n0[0],ct[2]&&!(z0=I[ct[2]]))return Kt("'"+U0+"'"+P),"";if(ct[4]==="")z0=ct[2]=="~="?{p1:"^\\s",p2:"+$",p3:"true"}:(ct[2]in C)&&ct[2]!="~="?{p1:"^",p2:"$",p3:"true"}:z0;else if(ct[2]=="~="&&ct[4].includes(" ")){X="if("+Mt+"false){"+X+"}";break}else if(ct[4])ct[4]=d(ct[4]).replace(b.RegExpChar,"\\$&");jr=ct[5]=="i"||T&&H[n0.toLowerCase()]?"i":"",X="if("+Mt+"("+(!ct[2]?Vt?'s.hasAttributeNS(e,"'+Qt+'")':'e.hasAttribute&&e.hasAttribute("'+Qt+'")':!ct[4]&&C[ct[2]]&&ct[2]!="~="?'e.getAttribute&&e.getAttribute("'+Qt+'")==""':"(/"+z0.p1+ct[4]+z0.p2+"/"+jr+').test(e.getAttribute&&e.getAttribute("'+Qt+'"))=='+z0.p3)+")){"+X+"}";break;case"~":ct=Jt.match(w.relative),X="n=e;while((e=e.previousElementSibling)){"+X+"}e=n;";break;case"+":ct=Jt.match(w.adjacent),X="n=e;if((e=e.previousElementSibling)){"+X+"}e=n;";break;case"\t":case" ":ct=Jt.match(w.ancestor),X="n=e;while((e=e.parentElement)){"+X+"}e=n;";break;case">":ct=Jt.match(w.children),X="n=e;if((e=e.parentElement)){"+X+"}e=n;";break;case(k0 in K?k0:void 0):ct[ct.length-1]="*",X=K[k0](ct)+X;break;case":":if(ct=Jt.match(w.structural))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"root":X="if("+Mt+"(e===s.root)){"+X+(v?"break main;":"")+"}";break;case"empty":X="n=e.firstChild;while(n&&!(/1|3/).test(n.nodeType)){n=n.nextSibling}if("+zr+"n){"+X+"}";break;case"only-child":X="if("+Mt+"(!e.nextElementSibling&&!e.previousElementSibling)){"+X+"}";break;case"last-child":X="if("+Mt+"(!e.nextElementSibling)){"+X+"}";break;case"first-child":X="if("+Mt+"(!e.previousElementSibling)){"+X+"}";break;case"only-of-type":X="o=e.localName;n=e;while((n=n.nextElementSibling)&&n.localName!=o);if(!n){n=e;while((n=n.previousElementSibling)&&n.localName!=o);}if("+zr+"n){"+X+"}";break;case"last-of-type":X="n=e;o=e.localName;while((n=n.nextElementSibling)&&n.localName!=o);if("+zr+"n){"+X+"}";break;case"first-of-type":X="n=e;o=e.localName;while((n=n.previousElementSibling)&&n.localName!=o);if("+zr+"n){"+X+"}";break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.treestruct))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"nth-child":case"nth-of-type":case"nth-last-child":case"nth-last-of-type":if(n0=/-of-type/i.test(ct[1]),ct[1]&&ct[2]){if(jr=/last/i.test(ct[1]),ct[2]=="n"){X="if("+Mt+"true){"+X+"}";break}else if(ct[2]=="1"){z0=jr?"next":"previous",X=n0?"n=e;o=e.localName;while((n=n."+z0+"ElementSibling)&&n.localName!=o);if("+zr+"n){"+X+"}":"if("+Mt+"!e."+z0+"ElementSibling){"+X+"}";break}else if(ct[2]=="even"||ct[2]=="2n0"||ct[2]=="2n+0"||ct[2]=="2n")z0="n%2==0";else if(ct[2]=="odd"||ct[2]=="2n1"||ct[2]=="2n+1")z0="n%2==1";else{if(at=/n/i.test(ct[2]),$t=ct[2].split("n"),At=parseInt($t[0],10)||0,_t=parseInt($t[1],10)||0,$t[0]=="-")At=-1;if($t[0]=="+")At=1;z0=(_t?"(n"+(_t>0?"-":"+")+Math.abs(_t)+")":"n")+"%"+At+"==0",z0=At>=1?at?"n>"+(_t-1)+(Math.abs(At)!=1?"&&"+z0:""):"n=="+At:At<=-1?at?"n<"+(_t+1)+(Math.abs(At)!=1?"&&"+z0:""):"n=="+At:At===0?$t[0]?"n=="+_t:"n>"+(_t-1):"false"}n0=n0?"OfType":"Element",jr=jr?"true":"false",X="n=s.nth"+n0+"(e,"+jr+");if("+Mt+"("+z0+")){"+X+"}"}else Kt("'"+U0+"'"+P);break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.logicalsel))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"is":case"where":case"matches":n0=ct[2].replace(b.CommaGroup,",").replace(b.TrimSpaces,""),X='if(s.match("'+n0.replace(/\x22/g,"\\\"")+'",e)){'+X+"}";break;case"not":n0=ct[2].replace(b.CommaGroup,",").replace(b.TrimSpaces,""),X='if(!s.match("'+n0.replace(/\x22/g,"\\\"")+'",e)){'+X+"}";break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.linguistic))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"dir":X="var p;if("+Mt+"((/"+ct[2]+'/i.test(e.dir))||(p=s.ancestor("[dir]", e))&&(/'+ct[2]+'/i.test(p.dir))||(e.dir==""||e.dir=="auto")&&('+(ct[2]=="ltr"?"!":"")+n+".test(e.textContent)))){"+X+"};";break;case"lang":n0="(?:^|-)"+ct[2]+"(?:-|$)",X="var p;if("+Mt+'((e.isConnected&&(e.lang==""&&(p=s.ancestor("[lang]",e)))&&(p.lang=="'+ct[2]+'")||/'+n0+"/i.test(e.lang)))){"+X+"};";break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.locationpc))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"any-link":X="if("+Mt+'(/^a|area$/i.test(e.localName)&&e.hasAttribute("href")||e.visited)){'+X+"}";break;case"link":X="if("+Mt+'(/^a|area$/i.test(e.localName)&&e.hasAttribute("href"))){'+X+"}";break;case"visited":X="if("+Mt+'(/^a|area$/i.test(e.localName)&&e.hasAttribute("href")&&e.visited)){'+X+"}";break;case"target":X="if("+Mt+"((s.doc.compareDocumentPosition(e)&16)&&s.doc.location.hash&&e.id==s.doc.location.hash.slice(1))){"+X+"}";break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.useraction))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"hover":X="hasFocus"in h&&h.hasFocus()?"if("+Mt+"(e===s.doc.hoverElement)){"+X+"}":"if("+zr+"true){"+X+"}";break;case"active":X="hasFocus"in h&&h.hasFocus()?"if("+Mt+"(e===s.doc.activeElement)){"+X+"}":"if("+zr+"true){"+X+"}";break;case"focus":X="hasFocus"in h?"if("+Mt+'(e===s.doc.activeElement&&s.doc.hasFocus()&&(e.type||e.href||typeof e.tabIndex=="number"))){'+X+"}":"if("+Mt+"(e===s.doc.activeElement&&(e.type||e.href))){"+X+"}";break;case"focus-within":X="hasFocus"in h?"n=s.doc.activeElement;while(e){if(e===n||e.parentNode===n)break;}if("+Mt+'(e===n&&s.doc.hasFocus()&&(e.type||e.href||typeof e.tabIndex=="number"))){'+X+"}":X;break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.inputstate))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"enabled":X="if("+Mt+'(("form" in e||/^optgroup$/i.test(e.localName))&&"disabled" in e &&e.disabled===false)){'+X+"}";break;case"disabled":X="if("+Mt+'(("form" in e||/^optgroup$/i.test(e.localName))&&"disabled" in e&&(e.disabled===true||(n=s.ancestor("fieldset",e))&&(n=s.first("legend",n))&&!n.contains(e)))){'+X+"}";break;case"read-only":X="if("+Mt+'((/^textarea$/i.test(e.localName)&&(e.readOnly||e.disabled))||("|password|text|".includes("|"+e.type+"|")&&e.readOnly))){'+X+"}";break;case"read-write":X="if("+Mt+'(((/^textarea$/i.test(e.localName)&&!e.readOnly&&!e.disabled)||("|password|text|".includes("|"+e.type+"|")&&!e.readOnly&&!e.disabled))||(e.hasAttribute("contenteditable")||(s.doc.designMode=="on")))){'+X+"}";break;case"placeholder-shown":X="if("+Mt+'((/^input|textarea$/i.test(e.localName))&&e.hasAttribute("placeholder")&&("|textarea|password|number|search|email|text|tel|url|".includes("|"+e.type+"|"))&&(!s.match(":focus",e)))){'+X+"}";break;case"default":X="if("+Mt+'("form" in e && e.form)){var x=0;n=[];if(e.type=="image")n=e.form.getElementsByTagName("input");if(e.type=="submit")n=e.form.elements;while(n[x]&&e!==n[x]){if(n[x].type=="image")break;if(n[x].type=="submit")break;x++;}}if('+Mt+'(e.form&&(e===n[x]&&"|image|submit|".includes("|"+e.type+"|"))||((/^option$/i.test(e.localName))&&e.defaultSelected)||(("|radio|checkbox|".includes("|"+e.type+"|"))&&e.defaultChecked))){'+X+"}";break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.inputvalue))switch(ct[1]=ct[1].toLowerCase(),ct[1]){case"checked":X="if("+Mt+'(/^input$/i.test(e.localName)&&("|radio|checkbox|".includes("|"+e.type+"|")&&e.checked)||(/^option$/i.test(e.localName)&&(e.selected||e.checked)))){'+X+"}";break;case"indeterminate":X="if("+Mt+'(/^progress$/i.test(e.localName)&&!e.hasAttribute("value"))||(/^input$/i.test(e.localName)&&("checkbox"==e.type&&e.indeterminate)||("radio"==e.type&&e.name&&!s.first("input[name="+e.name+"]:checked",e.form)))){'+X+"}";break;case"required":X="if("+Mt+"(/^input|select|textarea$/i.test(e.localName)&&e.required)){"+X+"}";break;case"optional":X="if("+Mt+"(/^input|select|textarea$/i.test(e.localName)&&!e.required)){"+X+"}";break;case"invalid":X="if("+Mt+'(((/^form$/i.test(e.localName)&&!e.noValidate)||(e.willValidate&&!e.formNoValidate))&&!e.checkValidity())||(/^fieldset$/i.test(e.localName)&&s.first(":invalid",e))){'+X+"}";break;case"valid":X="if("+Mt+'(((/^form$/i.test(e.localName)&&!e.noValidate)||(e.willValidate&&!e.formNoValidate))&&e.checkValidity())||(/^fieldset$/i.test(e.localName)&&s.first(":valid",e))){'+X+"}";break;case"in-range":X="if("+Mt+'(/^input$/i.test(e.localName))&&(e.willValidate&&!e.formNoValidate)&&(!e.validity.rangeUnderflow&&!e.validity.rangeOverflow)&&("|date|datetime-local|month|number|range|time|week|".includes("|"+e.type+"|"))&&("range"==e.type||e.getAttribute("min")||e.getAttribute("max"))){'+X+"}";break;case"out-of-range":X="if("+Mt+'(/^input$/i.test(e.localName))&&(e.willValidate&&!e.formNoValidate)&&(e.validity.rangeUnderflow||e.validity.rangeOverflow)&&("|date|datetime-local|month|number|range|time|week|".includes("|"+e.type+"|"))&&("range"==e.type||e.getAttribute("min")||e.getAttribute("max"))){'+X+"}";break;default:Kt("'"+U0+"'"+P);break}else if(ct=Jt.match(w.pseudo_sng))X='if(e.element&&e.type.toLowerCase()==":'+ct[0].toLowerCase()+'"){e=e.element;'+X+"}";else if(ct=Jt.match(w.pseudo_dbl))X='if(e.element&&e.type.toLowerCase()=="'+ct[0].toLowerCase()+'"){e=e.element;'+X+"}";else{n0=!1,us=!1;for(n0 in O)if(ct=Jt.match(O[n0].Expression)){if(Vr=O[n0].Callback(ct,X,v,J),"match"in Vr)ct=Vr.match;if(j0=Vr.modvar,v)j0&&tr.indexOf(j0)<0&&(tr[tr.length]=j0);else j0&&kt.indexOf(j0)<0&&(kt[kt.length]=j0);if(X=Vr.source,us=Vr.status,us)break}if(!us)return Kt("unknown pseudo-class selector '"+Jt+"'"),"";if(!n0)return Kt("unknown token in selector '"+Jt+"'"),""}break;default:Kt("'"+U0+"'"+P);break}if(!ct)return Kt("'"+U0+"'"+P),"";Jt=ct.pop()}return X},l0=function(R,X){return R.replace(/:scope/ig,X.localName+(X.id?"#"+X.id:"")+(X.className?"."+X.classList[0]:""))},P0=function(R,X,v){if(/:scope/i.test(R))R=l0(R,X);while(X){if(jt(R,X,v))break;X=X.parentElement}return X},rr=function(R,X,v){for(var J=0,ot=R.length,At=!1;ot>J;++J)R[J](X,v,null,!1)&&(At=!0);return At},d0=function(R,X){for(var v=0,J=R.length,ot=[];J>v;++v)ot[v]=Ot(R[v],!1,X);return{factory:ot}},jt=function(R,X,v){var J,ot;if(X&&Et[R])return rr(Et[R].factory,X,v);if(nt=R,arguments.length===0)return Kt(j,TypeError),z.VERBOSITY?void 0:!1;else if(arguments[0]==="")return Kt("''"+P),z.VERBOSITY?void 0:!1;if(typeof R!="string")R=""+R;if(/:scope/i.test(R))R=l0(R,X);if(ot=R.replace(/\x00|\\$/g,"�").replace(b.CombineWSP," ").replace(b.PseudosWSP,"$1").replace(b.TabCharWSP,"\t").replace(b.CommaGroup,",").replace(b.TrimSpaces,""),(J=ot.match(q))&&J.join("")==ot){if(J=ot.match(b.SplitGroup),ot[ot.length-1]==",")return Kt(P),z.VERBOSITY?void 0:!1}else return Kt("'"+R+"'"+P),z.VERBOSITY?void 0:!1;return Et[R]=d0(J,v),rr(Et[R].factory,X,v)},v0=function(R,X,v){if(arguments.length===0)Kt(j,TypeError);return sr(R,X,typeof v=="function"?function(J){return v(J),!1}:function(){return!1})[0]||null},sr=function(R,X,v){var J,ot,At,_t;if(X||(X=h),R){if(_t=Ct[R]){if(_t.context===X&&_t.callback===v){var{factory:$t,htmlset:at,nodeset:Xt}=_t,ot=[];if(Xt.length>1){for(var It=0,Qt=Xt.length,Vt;Qt>It;++It)if(Vt=mt[Xt[It][0]](X,Xt[It].slice(1))(),$t[It]!==null)$t[It](Vt,v,X,ot);else ot=ot.concat(Vt);if(Qt>1&&ot.length>1)ot.sort(p),ht&&(ot=U(ot))}else if($t[0])ot=$t[0](at[0](),v,X,ot);else ot=at[0]();return typeof v=="function"?N(ot,v):ot}}}if($=R,arguments.length===0)return Kt(j,TypeError),z.VERBOSITY?void 0:rt;else if(arguments[0]==="")return Kt("''"+P),z.VERBOSITY?void 0:rt;else if(it!==X)it=Q(X);if(typeof R!="string")R=""+R;if(/:scope/i.test(R))R=l0(R,X);if(At=R.replace(/\x00|\\$/g,"�").replace(b.CombineWSP," ").replace(b.PseudosWSP,"$1").replace(b.TabCharWSP,"\t").replace(b.CommaGroup,",").replace(b.TrimSpaces,""),(J=At.match(q))&&J.join("")==At){if(J=At.match(b.SplitGroup),At[At.length-1]==",")return Kt(P),z.VERBOSITY?void 0:!1}else return Kt("'"+R+"'"+P),z.VERBOSITY?void 0:!1;return Ct[R]=Ir(J,X,v),ot=Ct[R].results,typeof v=="function"?N(ot,v):ot},Wr=function(R,X){var v=X.index,J=X[1].length+X[2].length;return R.slice(0,v)+(" >+~".indexOf(R.charAt(v-1))>-1?":[".indexOf(R.charAt(v+J+1))>-1?"*":"":"")+R.slice(v+J-(X[1]=="*"?1:0))},Ir=function(R,X,v){var J,ot,At={},_t=["","*","*"],$t=R,at=[],Xt=[],It=[],Qt=[],Vt;for(J=0,ot=R.length;ot>J;++J){if(!At[R[J]]&&(At[R[J]]=!0))if(Vt=R[J].match(M),Vt&&Vt[1]!=":"&&(_t=Vt))_t[1]||(_t[1]="*"),$t[J]=Wr($t[J],_t);else _t=["","*","*"];It[J]=_t[1]+_t[2],Xt[J]=mt[_t[1]](X,_t[2]),at[J]=Ot($t[J],!0,null),at[J]?at[J](Xt[J](),v,X,Qt):result.concat(Xt[J]())}if(ot>1)Qt.sort(p),ht&&(Qt=U(Qt));return{callback:v,context:X,factory:at,htmlset:Xt,nodeset:It,results:Qt}},Mr,L,V,k,Z=function(R){if(Mr=Element.prototype.closest,L=Element.prototype.matches,V=Document.prototype.querySelector,k=Document.prototype.querySelectorAll,Element.prototype.closest=function(){var X=Object.getPrototypeOf(this).__proto__.__proto__.constructor.name;if(!("nodeType"in this))Kt("'closest' called on an object that does not implement interface "+X+".",TypeError);return arguments.length<1?P0.apply(this,[]):arguments.length<2?P0.apply(this,[arguments[0],this]):P0.apply(this,[arguments[0],this,typeof arguments[1]=="function"?arguments[1]:void 0])},Element.prototype.matches=function(){var X=Object.getPrototypeOf(this).__proto__.__proto__.constructor.name;if(!("nodeType"in this))Kt("'matches' called on an object that does not implement interface "+X+".",TypeError);return arguments.length<1?jt.apply(this,[]):arguments.length<2?jt.apply(this,[arguments[0],this]):jt.apply(this,[arguments[0],this,typeof arguments[1]=="function"?arguments[1]:void 0])},Element.prototype.querySelector=Document.prototype.querySelector=DocumentFragment.prototype.querySelector=function(){var X=Object.getPrototypeOf(this).__proto__.__proto__.constructor.name;if(!("nodeType"in this))Kt("'querySelector' called on an object that does not implement interface "+X+".",TypeError);return arguments.length<1?v0.apply(this,[]):arguments.length<2?v0.apply(this,[arguments[0],this]):v0.apply(this,[arguments[0],this,typeof arguments[1]=="function"?arguments[1]:void 0])},Element.prototype.querySelectorAll=Document.prototype.querySelectorAll=DocumentFragment.prototype.querySelectorAll=function(){var X=Object.getPrototypeOf(this).__proto__.__proto__.constructor.name;if(!("nodeType"in this))Kt("'querySelectorAll' called on an object that does not implement interface "+X+".",TypeError);return arguments.length<1?sr.apply(this,[]):arguments.length<2?sr.apply(this,[arguments[0],this]):sr.apply(this,[arguments[0],this,typeof arguments[1]=="function"?arguments[1]:void 0])},R)document.addEventListener("load",function(X){var v,J,ot,At,_t=X.target;if(/iframe/i.test(_t.localName))v="("+r+")(this, "+sf+");",J=_t.contentDocument,At=J.createElement("script"),At.textContent=v+"NW.Dom.install()",ot=J.documentElement,ot.removeChild(ot.insertBefore(At,ot.firstChild))},!0)},a=function(){Element.prototype.closest=Mr,Element.prototype.matches=L,Element.prototype.querySelector=Document.prototype.querySelector=DocumentFragment.prototype.querySelector=V,Element.prototype.querySelectorAll=Document.prototype.querySelectorAll=DocumentFragment.prototype.querySelectorAll=k},rt=Array(),it,nt,$,yt={},St={},Et={},Ct={},vt={doc:h,from:h,root:c,byTag:gt,first:v0,match:jt,ancestor:P0,nthOfType:g0,nthElement:Zt,hasAttributeNS:Wt},zt={lastMatched:nt,lastSelected:$,matchLambdas:yt,selectLambdas:St,matchResolvers:Et,selectResolvers:Ct,CFG:g,M_BODY:C0,S_BODY:Ar,M_TEST:Lt,S_TEST:s0,byId:Ft,byTag:gt,byClass:Ut,match:jt,first:v0,select:sr,closest:P0,compile:Ot,configure:J0,emit:Kt,Config:z,Snapshot:vt,Version:s,install:Z,uninstall:a,Operators:I,Selectors:O,registerCombinator:function(R,X){var v=0,J=R.length,ot;for(;J>v;++v)if(R[v]!="="){ot=R[v];break}if(g.combinators.indexOf(ot)<0)g.combinators=g.combinators.replace("](",ot+"]("),g.combinators=g.combinators.replace("])",ot+"])"),K[R]=X,V0();else console.warn("Warning: the '"+R+"' combinator is already registered.")},registerOperator:function(R,X){var v=0,J=R.length,ot;for(;J>v;++v)if(R[v]!="="){ot=R[v];break}if(g.operators.indexOf(ot)<0&&!I[R])g.operators=g.operators.replace("]=",ot+"]="),I[R]=X,V0();else console.warn("Warning: the '"+R+"' operator is already registered.")},registerSelector:function(R,X,v){O[R]||(O[R]={Expression:X,Callback:v})}};return c0(h),zt}var ug=mg;/*!
223
223
  * Sizzle CSS Selector Engine v2.3.7-pre
224
224
  * https://sizzlejs.com/
225
225
  *
@@ -1,4 +1,4 @@
1
- import{U as c}from"./chunk-h7ypcqp3.js";import{Wl as h,Yl as wY}from"./chunk-4fs853nh.js";var IX=wY((DY)=>{var p=h(c());(function(){function X($){if($==null)return null;if(typeof $==="function")return $.$$typeof===i?null:$.displayName||$.name||null;if(typeof $==="string")return $;switch($){case L:return"Fragment";case k:return"Profiler";case P:return"StrictMode";case b:return"Suspense";case YX:return"SuspenseList";case d:return"Activity"}if(typeof $==="object")switch(typeof $.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),$.$$typeof){case w:return"Portal";case R:return $.displayName||"Context";case S:return($._context.displayName||"Context")+".Consumer";case g:var V=$.render;return $=$.displayName,$||($=V.displayName||V.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case O:return V=$.displayName||null,V!==null?V:X($.type)||"Memo";case Q:V=$._payload,$=$._init;try{return X($(V))}catch(D){}}return null}function Y($){return""+$}function G($){try{Y($);var V=!1}catch(_X){V=!0}if(V){V=console;var D=V.error,T=typeof Symbol==="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.constructor.name||"Object";return D.call(V,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",T),Y($)}}function J($){if($===L)return"<>";if(typeof $==="object"&&$!==null&&$.$$typeof===Q)return"<...>";try{var V=X($);return V?"<"+V+">":"<...>"}catch(D){return"<...>"}}function Z(){var $=s.A;return $===null?null:$.getOwner()}function H(){return Error("react-stack-top-frame")}function _($){if(y.call($,"key")){var V=Object.getOwnPropertyDescriptor($,"key").get;if(V&&V.isReactWarning)return!1}return $.key!==void 0}function W($,V){function D(){vX||(vX=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",V))}D.isReactWarning=!0,Object.defineProperty($,"key",{get:D,configurable:!0})}function A(){var $=X(this.type);return gX[$]||(gX[$]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),$=this.props.ref,$!==void 0?$:null}function U($,V,D,T,_X,KX){var I=D.ref;return $={$$typeof:K,type:$,key:V,props:D,_owner:T},(I!==void 0?I:null)!==null?Object.defineProperty($,"ref",{enumerable:!1,get:A}):Object.defineProperty($,"ref",{enumerable:!1,value:null}),$._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty($,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty($,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:_X}),Object.defineProperty($,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:KX}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$}function z($,V,D,T,_X,KX){var I=V.children;if(I!==void 0)if(T)if(n(I)){for(T=0;T<I.length;T++)E(I[T]);Object.freeze&&Object.freeze(I)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else E(I);if(y.call(V,"key")){I=X($);var a=Object.keys(V).filter(function(BY){return BY!=="key"});T=0<a.length?"{key: someKey, "+a.join(": ..., ")+": ...}":"{key: someKey}",mX[I+T]||(a=0<a.length?"{"+a.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ import{U as c}from"./chunk-bqkrynm6.js";import{Rl as h,Tl as wY}from"./chunk-x17jyjan.js";var IX=wY((DY)=>{var p=h(c());(function(){function X($){if($==null)return null;if(typeof $==="function")return $.$$typeof===i?null:$.displayName||$.name||null;if(typeof $==="string")return $;switch($){case L:return"Fragment";case k:return"Profiler";case P:return"StrictMode";case b:return"Suspense";case YX:return"SuspenseList";case d:return"Activity"}if(typeof $==="object")switch(typeof $.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),$.$$typeof){case w:return"Portal";case R:return $.displayName||"Context";case S:return($._context.displayName||"Context")+".Consumer";case g:var V=$.render;return $=$.displayName,$||($=V.displayName||V.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case O:return V=$.displayName||null,V!==null?V:X($.type)||"Memo";case Q:V=$._payload,$=$._init;try{return X($(V))}catch(D){}}return null}function Y($){return""+$}function G($){try{Y($);var V=!1}catch(_X){V=!0}if(V){V=console;var D=V.error,T=typeof Symbol==="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.constructor.name||"Object";return D.call(V,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",T),Y($)}}function J($){if($===L)return"<>";if(typeof $==="object"&&$!==null&&$.$$typeof===Q)return"<...>";try{var V=X($);return V?"<"+V+">":"<...>"}catch(D){return"<...>"}}function Z(){var $=s.A;return $===null?null:$.getOwner()}function H(){return Error("react-stack-top-frame")}function _($){if(y.call($,"key")){var V=Object.getOwnPropertyDescriptor($,"key").get;if(V&&V.isReactWarning)return!1}return $.key!==void 0}function W($,V){function D(){vX||(vX=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",V))}D.isReactWarning=!0,Object.defineProperty($,"key",{get:D,configurable:!0})}function A(){var $=X(this.type);return gX[$]||(gX[$]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),$=this.props.ref,$!==void 0?$:null}function U($,V,D,T,_X,KX){var I=D.ref;return $={$$typeof:K,type:$,key:V,props:D,_owner:T},(I!==void 0?I:null)!==null?Object.defineProperty($,"ref",{enumerable:!1,get:A}):Object.defineProperty($,"ref",{enumerable:!1,value:null}),$._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty($,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty($,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:_X}),Object.defineProperty($,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:KX}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$}function z($,V,D,T,_X,KX){var I=V.children;if(I!==void 0)if(T)if(n(I)){for(T=0;T<I.length;T++)E(I[T]);Object.freeze&&Object.freeze(I)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else E(I);if(y.call(V,"key")){I=X($);var a=Object.keys(V).filter(function(BY){return BY!=="key"});T=0<a.length?"{key: someKey, "+a.join(": ..., ")+": ...}":"{key: someKey}",mX[I+T]||(a=0<a.length?"{"+a.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
@@ -1,4 +1,4 @@
1
- import{Ff as S6,Gf as R6,Hf as y6,qf as _6}from"./chunk-7cx9kda0.js";import{Nf as j6}from"./chunk-y524zd2h.js";import{$f as h6,Vf as WY,Yf as b6,_f as f6,bg as z2,dg as m6,eg as H2}from"./chunk-4eaqmt3c.js";import{fg as y8,gg as iY,hg as f8,ig as Q7,jg as E9,kg as cY,lg as P9,mg as pY,ng as x9,og as jW,pg as _W,qg as yW,rg as k8,wg as z9}from"./chunk-88w3txtb.js";import{$h as l0,Ai as BX,Gh as oW,Kh as jX,Lh as O9,Nh as eW,Pj as tX,Sh as vY,Vi as F9,Wi as L9,Xh as r,Xj as uY,Yh as b8,Yi as HX,Zj as r1,_h as u,ai as D9,aj as lY,ei as M9,ej as n1,hi as t8,ii as T9,lk as aX,mh as x0,ni as mY,qi as A9,qk as hX,sh as dY,th as OX,uh as O0,uk as KX,xj as IW,zi as o5,zj as WX}from"./chunk-v0e9bsvt.js";import{Pk as y}from"./chunk-qfa5v4n5.js";import{Bl as H,Vk as c1,dl as d1,jl as L2,ml as I9,nl as j9,ol as E2,xl as x2}from"./chunk-78ksrp8v.js";import{El as q6,Jl as MG}from"./chunk-yb71zqvt.js";var RZ=30000;class k6{agentCache=new Map;modelCache=new Map;providerCache=new Map;providerKeyCache=new Map;get(X,Y){let $=X.get(Y);if($&&Date.now()<$.expiresAt)return $.data;return X.delete(Y),null}set(X,Y,$){X.set(Y,{data:$,expiresAt:Date.now()+RZ})}getAgent=(X)=>this.get(this.agentCache,X);setAgent=(X,Y)=>this.set(this.agentCache,X,Y);getModel=(X)=>this.get(this.modelCache,X);setModel=(X,Y)=>this.set(this.modelCache,X,Y);getProvider=(X)=>this.get(this.providerCache,X);setProvider=(X,Y)=>this.set(this.providerCache,X,Y);getProviderKey=(X)=>this.get(this.providerKeyCache,X);setProviderKey=(X,Y)=>this.set(this.providerKeyCache,X,Y);clear(){this.agentCache.clear(),this.modelCache.clear(),this.providerCache.clear(),this.providerKeyCache.clear()}}var I6=new k6;async function v6(X,Y,$,W){let{pkg:Z,providerResolver:Q,modelResolver:J,initModel:G,stateSchema:z,enhanceSystemPrompt:N,excludeMiddleware:B=[],yoloMode:V}=$,K=!!W?.parent_id,U=I6.getAgent(X);if(!U){if(U=await Z.getAgent(X),!U)throw Error(`Agent not found: ${X}`);I6.setAgent(X,U)}let E=await Z.validateAgent(X);if(!E.valid)throw Error(`Agent validation failed: ${JSON.stringify(E.errors)}`);let I=Y.model_id||U.modelId;if(!I)throw Error(`Agent "${X}" has no model configured and no model_id was provided in state. Please assign a default model to this agent in the settings.`);let T=null;if(J)T=await J.resolve(I);else{let m=await Z.getModel(I);if(m)T={id:m.id,model_name:m.model_name,provider_id:m.provider_id,temperature:m.temperature,enable_thinking:m.enable_thinking,stream_usage:m.stream_usage,max_tokens:m.max_tokens}}if(!T)T={id:I,model_name:I};let S=null;if(Y.provider_id&&Q)S=await Q.resolve(Y.provider_id);else if(T.provider_id&&Q)S=await Q.resolve(T.provider_id);else if(Q)S=await Q.resolveByModel(I);let P={streamUsage:T.stream_usage??!0,enableThinking:T.enable_thinking??Y.enable_thinking??!0,streaming:Y.streaming??!1,metadata:{agent_id:X,model_id:T.id,provider_id:S?.id||Y.provider_id,parent_id:W?.parent_id}};if(S)P.modelProvider=S.type,P.apiKey=S.apiKey,P.baseURL=S.baseUrl,P.temperature=T.temperature??Y.temperature??0.7;else P.modelProvider=Y.provider_type||"openai",P.temperature=Y.temperature??T.temperature??0.7;let h=await G(T.model_name,P),f=await Z.getPromptWithContent(U.systemPromptId);if(!f)throw Error(`Prompt not found: ${U.systemPromptId}`);let e=f.content;if(N)e=await N(e,Y);let b=[];for(let[m,k]of Object.entries(U.middlewares)){if(m==="subagents"&&K)continue;if(B.includes(m))continue;if(!k)continue;if(typeof k==="object"&&"enabled"in k&&!k.enabled)continue;let TX=Z.middlewares.getImplementation(m);if(!TX){console.warn(`Middleware ${m} not found in registry`);continue}let $Y=typeof k==="boolean"?{}:k.customParams||{};b.push(await TX.execute($Y))}let g={ask_user_questions:{allowedDecisions:["respond","approve","reject","edit"]}};if(V)g.terminal={allowedDecisions:["approve","reject","edit"]};if(b.push(y6({interruptOn:g})),(S?.type||Y.provider_type)==="anthropic"||process.env.MODEL_PROVIDER==="anthropic")b.push(_6());return j6({name:K?`subagent_${W.parent_id}`:U.name,model:h,systemPrompt:e,stateSchema:z,middleware:b})}async function HK(X){return(await X.listAgents()).map(($)=>$.id)}var g6=new f6({messages:h6,task_store:new b6(H.record(H.string(),H.any()).default(()=>({})),{reducer:(X,Y)=>({...X,...Y})}),provider_id:H.string().default("default"),provider_type:H.string().default("openai"),model_id:H.string().default("qwen-plus"),agent_name:H.string().default("Code Agent"),active_agent:H.string().optional(),enable_thinking:H.boolean().default(!0),streaming:H.boolean().default(!1),user_id:H.string().optional(),thread_id:H.string().optional(),cwd:H.string().default(process.cwd()),agent_id:H.string().default("agents/default")}),wK=g6,A$=g6;var CZ=H.object({thought:H.string().describe("Your current thinking step"),nextThoughtNeeded:H.boolean().describe("Whether another thought step is needed"),thoughtNumber:H.number().min(1).describe("Current thought number"),totalThoughts:H.number().min(1).describe("Estimated total thoughts needed"),isRevision:H.boolean().optional().describe("Whether this revises previous thinking"),revisesThought:H.number().min(1).optional().describe("Which thought is being reconsidered"),branchFromThought:H.number().min(1).optional().describe("Branching point thought number"),branchId:H.string().optional().describe("Branch identifier"),needsMoreThoughts:H.boolean().optional().describe("If more thoughts are needed")}),u6=[],ZY={},OK=KX(async(X)=>{try{if(X.thoughtNumber>X.totalThoughts)X.totalThoughts=X.thoughtNumber;if(u6.push(X),X.branchFromThought&&X.branchId){if(!ZY[X.branchId])ZY[X.branchId]=[];ZY[X.branchId].push(X)}return JSON.stringify({thoughtNumber:X.thoughtNumber,totalThoughts:X.totalThoughts,nextThoughtNeeded:X.nextThoughtNeeded,branches:Object.keys(ZY),thoughtHistoryLength:u6.length},null,2)}catch(Y){return JSON.stringify({error:Y instanceof Error?Y.message:String(Y),status:"failed"},null,2)}},{name:"sequential-thinking",description:`A detailed tool for dynamic and reflective problem-solving through thoughts.
1
+ import{Ff as S6,Gf as R6,Hf as y6,qf as _6}from"./chunk-7d48d71t.js";import{Nf as j6}from"./chunk-nh11afw0.js";import{$f as h6,Vf as WY,Yf as b6,_f as f6,bg as z2,dg as m6,eg as H2}from"./chunk-mqm8wnc8.js";import{fg as y8,gg as iY,hg as f8,ig as Q7,jg as E9,kg as cY,lg as P9,mg as pY,ng as x9,og as jW,pg as _W,qg as yW,rg as k8,wg as z9}from"./chunk-ncaqgas1.js";import{Ch as oW,Gh as jX,Hh as O9,Jh as eW,Lj as tX,Oh as vY,Ri as F9,Si as L9,Th as r,Tj as uY,Uh as b8,Ui as HX,Vj as r1,Wh as u,Xh as l0,Yh as D9,Yi as lY,ai as M9,aj as n1,di as t8,ei as T9,hk as aX,ih as x0,ji as mY,mi as A9,mk as hX,oh as dY,ph as OX,qh as O0,qk as KX,tj as IW,vi as o5,vj as WX,wi as BX}from"./chunk-9kbktaf8.js";import{Lk as y}from"./chunk-femf7e4d.js";import{$k as d1,Rk as c1,fl as L2,il as I9,jl as j9,kl as E2,tl as x2,xl as H}from"./chunk-0pzpg2ra.js";import{Al as q6,Fl as MG}from"./chunk-xtr6s7kh.js";var RZ=30000;class k6{agentCache=new Map;modelCache=new Map;providerCache=new Map;providerKeyCache=new Map;get(X,Y){let $=X.get(Y);if($&&Date.now()<$.expiresAt)return $.data;return X.delete(Y),null}set(X,Y,$){X.set(Y,{data:$,expiresAt:Date.now()+RZ})}getAgent=(X)=>this.get(this.agentCache,X);setAgent=(X,Y)=>this.set(this.agentCache,X,Y);getModel=(X)=>this.get(this.modelCache,X);setModel=(X,Y)=>this.set(this.modelCache,X,Y);getProvider=(X)=>this.get(this.providerCache,X);setProvider=(X,Y)=>this.set(this.providerCache,X,Y);getProviderKey=(X)=>this.get(this.providerKeyCache,X);setProviderKey=(X,Y)=>this.set(this.providerKeyCache,X,Y);clear(){this.agentCache.clear(),this.modelCache.clear(),this.providerCache.clear(),this.providerKeyCache.clear()}}var I6=new k6;async function v6(X,Y,$,W){let{pkg:Z,providerResolver:Q,modelResolver:J,initModel:G,stateSchema:z,enhanceSystemPrompt:N,excludeMiddleware:B=[],yoloMode:V}=$,K=!!W?.parent_id,U=I6.getAgent(X);if(!U){if(U=await Z.getAgent(X),!U)throw Error(`Agent not found: ${X}`);I6.setAgent(X,U)}let E=await Z.validateAgent(X);if(!E.valid)throw Error(`Agent validation failed: ${JSON.stringify(E.errors)}`);let I=Y.model_id||U.modelId;if(!I)throw Error(`Agent "${X}" has no model configured and no model_id was provided in state. Please assign a default model to this agent in the settings.`);let T=null;if(J)T=await J.resolve(I);else{let m=await Z.getModel(I);if(m)T={id:m.id,model_name:m.model_name,provider_id:m.provider_id,temperature:m.temperature,enable_thinking:m.enable_thinking,stream_usage:m.stream_usage,max_tokens:m.max_tokens}}if(!T)T={id:I,model_name:I};let S=null;if(Y.provider_id&&Q)S=await Q.resolve(Y.provider_id);else if(T.provider_id&&Q)S=await Q.resolve(T.provider_id);else if(Q)S=await Q.resolveByModel(I);let P={streamUsage:T.stream_usage??!0,enableThinking:T.enable_thinking??Y.enable_thinking??!0,streaming:Y.streaming??!1,metadata:{agent_id:X,model_id:T.id,provider_id:S?.id||Y.provider_id,parent_id:W?.parent_id}};if(S)P.modelProvider=S.type,P.apiKey=S.apiKey,P.baseURL=S.baseUrl,P.temperature=T.temperature??Y.temperature??0.7;else P.modelProvider=Y.provider_type||"openai",P.temperature=Y.temperature??T.temperature??0.7;let h=await G(T.model_name,P),f=await Z.getPromptWithContent(U.systemPromptId);if(!f)throw Error(`Prompt not found: ${U.systemPromptId}`);let e=f.content;if(N)e=await N(e,Y);let b=[];for(let[m,k]of Object.entries(U.middlewares)){if(m==="subagents"&&K)continue;if(B.includes(m))continue;if(!k)continue;if(typeof k==="object"&&"enabled"in k&&!k.enabled)continue;let TX=Z.middlewares.getImplementation(m);if(!TX){console.warn(`Middleware ${m} not found in registry`);continue}let $Y=typeof k==="boolean"?{}:k.customParams||{};b.push(await TX.execute($Y))}let g={ask_user_questions:{allowedDecisions:["respond","approve","reject","edit"]}};if(V)g.terminal={allowedDecisions:["approve","reject","edit"]};if(b.push(y6({interruptOn:g})),(S?.type||Y.provider_type)==="anthropic"||process.env.MODEL_PROVIDER==="anthropic")b.push(_6());return j6({name:K?`subagent_${W.parent_id}`:U.name,model:h,systemPrompt:e,stateSchema:z,middleware:b})}async function HK(X){return(await X.listAgents()).map(($)=>$.id)}var g6=new f6({messages:h6,task_store:new b6(H.record(H.string(),H.any()).default(()=>({})),{reducer:(X,Y)=>({...X,...Y})}),provider_id:H.string().default("default"),provider_type:H.string().default("openai"),model_id:H.string().default("qwen-plus"),agent_name:H.string().default("Code Agent"),active_agent:H.string().optional(),enable_thinking:H.boolean().default(!0),streaming:H.boolean().default(!1),user_id:H.string().optional(),thread_id:H.string().optional(),cwd:H.string().default(process.cwd()),agent_id:H.string().default("agents/default")}),wK=g6,A$=g6;var CZ=H.object({thought:H.string().describe("Your current thinking step"),nextThoughtNeeded:H.boolean().describe("Whether another thought step is needed"),thoughtNumber:H.number().min(1).describe("Current thought number"),totalThoughts:H.number().min(1).describe("Estimated total thoughts needed"),isRevision:H.boolean().optional().describe("Whether this revises previous thinking"),revisesThought:H.number().min(1).optional().describe("Which thought is being reconsidered"),branchFromThought:H.number().min(1).optional().describe("Branching point thought number"),branchId:H.string().optional().describe("Branch identifier"),needsMoreThoughts:H.boolean().optional().describe("If more thoughts are needed")}),u6=[],ZY={},OK=KX(async(X)=>{try{if(X.thoughtNumber>X.totalThoughts)X.totalThoughts=X.thoughtNumber;if(u6.push(X),X.branchFromThought&&X.branchId){if(!ZY[X.branchId])ZY[X.branchId]=[];ZY[X.branchId].push(X)}return JSON.stringify({thoughtNumber:X.thoughtNumber,totalThoughts:X.totalThoughts,nextThoughtNeeded:X.nextThoughtNeeded,branches:Object.keys(ZY),thoughtHistoryLength:u6.length},null,2)}catch(Y){return JSON.stringify({error:Y instanceof Error?Y.message:String(Y),status:"failed"},null,2)}},{name:"sequential-thinking",description:`A detailed tool for dynamic and reflective problem-solving through thoughts.
2
2
  This tool helps analyze problems through a flexible thinking process that can adapt and evolve.
3
3
  Each thought can build on, question, or revise previous insights as understanding deepens.
4
4
 
@@ -1,2 +1,2 @@
1
1
  import{createRequire as u}from"node:module";var n=Object.create;var{getPrototypeOf:o,defineProperty:e,getOwnPropertyNames:k,getOwnPropertyDescriptor:p}=Object,l=Object.prototype.hasOwnProperty;function m(a){return this[a]}var q,r,v=(a,b,c)=>{var d=a!=null&&typeof a==="object";if(d){var h=b?q??=new WeakMap:r??=new WeakMap,i=h.get(a);if(i)return i}c=a!=null?n(o(a)):{};let f=b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c;for(let g of k(a))if(!l.call(f,g))e(f,g,{get:m.bind(a,g),enumerable:!0});if(d)h.set(a,f);return f},w=(a)=>{var b=(j??=new WeakMap).get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function"){for(var d of k(a))if(!l.call(b,d))e(b,d,{get:m.bind(a,d),enumerable:!(c=p(a,d))||c.enumerable})}return j.set(a,b),b},j,x=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var s=(a)=>a;function t(a,b){this[a]=s.bind(null,b)}var y=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:t.bind(b,c)})};var z=(a,b)=>()=>(a&&(b=a(a=0)),b);var B=u(import.meta.url);
2
- export{v as Wl,w as Xl,x as Yl,y as Zl,z as _l,B as $l};
2
+ export{v as Rl,w as Sl,x as Tl,y as Ul,z as Vl,B as Wl};