@signalk/freeboard-sk 3.2.0-beta.0 → 3.2.0-beta.2
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.
- package/package.json +16 -14
- package/plugin/alarms/alarms.js +68 -8
- package/plugin/lib/fetch.js +4 -4
- package/plugin/vitest.config.mjs +11 -0
- package/public/assets/features/chart-auto-refresh-1.jpg +0 -0
- package/public/assets/features/temporal-charts-1.jpg +0 -0
- package/public/assets/features/temporal-charts-2.jpg +0 -0
- package/public/assets/features-corpus.json +1 -1
- package/public/assets/help/index.html +7 -0
- package/public/{chunk-WXOWBQXR.js → chunk-2M5JDEPT.js} +1 -1
- package/public/{chunk-TVMAD5AZ.js → chunk-2SPW2M6P.js} +1 -1
- package/public/{chunk-PSRS6NXJ.js → chunk-2UND4DAL.js} +2 -2
- package/public/{chunk-TEKC7VXV.js → chunk-33UDAXN5.js} +1 -1
- package/public/chunk-3FOJW6X2.js +1 -0
- package/public/{chunk-7Z4ZZM32.js → chunk-ABEPBSQB.js} +1 -1
- package/public/{chunk-RU2QXGZX.js → chunk-APXAP2M7.js} +1 -1
- package/public/chunk-CJYO3MRU.js +1 -0
- package/public/{chunk-SOVFTS2B.js → chunk-FC62PK2U.js} +1 -1
- package/public/{chunk-2RJKLB5L.js → chunk-FHFMCRY4.js} +77 -77
- package/public/{chunk-7UXFP343.js → chunk-FMYAA5JW.js} +1 -1
- package/public/{chunk-OU4PGUT3.js → chunk-FTLLJC55.js} +1 -1
- package/public/{chunk-JOTL4UUV.js → chunk-J43UG5Q3.js} +1 -1
- package/public/chunk-K2CIRFN7.js +1709 -0
- package/public/{chunk-TVVJJZA5.js → chunk-K7PZKJJ7.js} +1 -1
- package/public/{chunk-Y5XX3LUA.js → chunk-KNJHWYQ3.js} +1 -1
- package/public/{chunk-TGPAYIRR.js → chunk-OGLYW4PJ.js} +1 -1
- package/public/chunk-QGRCSFIW.js +1 -0
- package/public/{chunk-PGHE7FOF.js → chunk-T5UYZVNA.js} +1 -1
- package/public/{chunk-NDDO5DKA.js → chunk-TTKT5FKY.js} +1 -1
- package/public/chunk-UYQ6T6PQ.js +1 -0
- package/public/{chunk-L3MJOGJ2.js → chunk-WHLON3TU.js} +1 -1
- package/public/{chunk-VSWAOYSI.js → chunk-XTQIZ74A.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-WYFYYBYG.js → main-WJS4CMGQ.js} +7 -7
- package/public/polyfills-LVNOU2XZ.js +2 -0
- package/public/{worker-2AV5I4KP.js → worker-JRN7I6EJ.js} +8 -8
- package/public/worker-U7H5YFPO.js +3 -0
- package/public/chunk-C6Q5GPY7.js +0 -1
- package/public/chunk-DDECKPFC.js +0 -1
- package/public/chunk-HB342AB6.js +0 -1
- package/public/chunk-JH5KSRZ6.js +0 -1709
- package/public/chunk-VYN2OBDD.js +0 -1
- package/public/polyfills-RV3JTMEC.js +0 -2
- package/public/worker-XSMNG74L.js +0 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var rn=Object.create;var ie=Object.defineProperty;var nn=Object.getOwnPropertyDescriptor;var on=Object.getOwnPropertyNames;var sn=Object.getPrototypeOf,un=Object.prototype.hasOwnProperty;var F=(t,r)=>()=>{try{return r||t((r={exports:{}}).exports,r),r.exports}catch(c){throw r=0,c}};var an=(t,r,c,y)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of on(r))!un.call(t,i)&&i!==c&&ie(t,i,{get:()=>r[i],enumerable:!(y=nn(r,i))||y.enumerable});return t};var cn=(t,r,c)=>(c=t!=null?rn(sn(t)):{},an(r||!t||!t.__esModule?ie(c,"default",{value:t,enumerable:!0}):c,t));var gt=F(Bt=>{(function(){Bt.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
2
|
-
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(Bt)});var tt=F((oe,st)=>{(function(){var t,r,c,y,i,f,u,l=[].slice,m={}.hasOwnProperty;t=function(){var g,N,O,D,p,T;if(T=arguments[0],p=2<=arguments.length?l.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(g=0,O=p.length;g<O;g++)if(D=p[g],D!=null)for(N in D)m.call(D,N)&&(T[N]=D[N]);return T},i=function(g){return!!g&&Object.prototype.toString.call(g)==="[object Function]"},f=function(g){var N;return!!g&&((N=typeof g)=="function"||N==="object")},c=function(g){return i(Array.isArray)?Array.isArray(g):Object.prototype.toString.call(g)==="[object Array]"},y=function(g){var N;if(c(g))return!g.length;for(N in g)if(m.call(g,N))return!1;return!0},u=function(g){var N,O;return f(g)&&(O=Object.getPrototypeOf(g))&&(N=O.constructor)&&typeof N=="function"&&N instanceof N&&Function.prototype.toString.call(N)===Function.prototype.toString.call(Object)},r=function(g){return i(g.valueOf)?g.valueOf():g},st.exports.assign=t,st.exports.isFunction=i,st.exports.isObject=f,st.exports.isArray=c,st.exports.isEmpty=y,st.exports.isPlainObject=u,st.exports.getValue=r}).call(oe)});var Ut=F((se,ue)=>{(function(){var t;ue.exports=t=(function(){function r(){}return r.prototype.hasFeature=function(c,y){return!0},r.prototype.createDocumentType=function(c,y,i){throw new Error("This DOM method is not implemented.")},r.prototype.createDocument=function(c,y,i){throw new Error("This DOM method is not implemented.")},r.prototype.createHTMLDocument=function(c){throw new Error("This DOM method is not implemented.")},r.prototype.getFeature=function(c,y){throw new Error("This DOM method is not implemented.")},r})()}).call(se)});var le=F((ae,ce)=>{(function(){var t;ce.exports=t=(function(){function r(){}return r.prototype.handleError=function(c){throw new Error(c)},r})()}).call(ae)});var pe=F((fe,he)=>{(function(){var t;he.exports=t=(function(){function r(c){this.arr=c||[]}return Object.defineProperty(r.prototype,"length",{get:function(){return this.arr.length}}),r.prototype.item=function(c){return this.arr[c]||null},r.prototype.contains=function(c){return this.arr.indexOf(c)!==-1},r})()}).call(fe)});var ye=F((de,me)=>{(function(){var t,r,c;r=le(),c=pe(),me.exports=t=(function(){function y(){var i;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new r,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=i=Object.create(this.defaultParams)}return Object.defineProperty(y.prototype,"parameterNames",{get:function(){return new c(Object.keys(this.defaultParams))}}),y.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},y.prototype.canSetParameter=function(i,f){return!0},y.prototype.setParameter=function(i,f){return f!=null?this.params[i]=f:delete this.params[i]},y})()}).call(de)});var k=F((ge,we)=>{(function(){we.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(ge)});var Vt=F((Te,De)=>{(function(){var t,r,c;t=k(),c=Q(),De.exports=r=(function(){function y(i,f,u){if(this.parent=i,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),f==null)throw new Error("Missing attribute name. "+this.debugInfo(f));this.name=this.stringify.name(f),this.value=this.stringify.attValue(u),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(y.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(y.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(y.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defineProperty(y.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(y.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(y.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(y.prototype,"specified",{get:function(){return!0}}),y.prototype.clone=function(){return Object.create(this)},y.prototype.toString=function(i){return this.options.writer.attribute(this,this.options.writer.filterOptions(i))},y.prototype.debugInfo=function(i){return i=i||this.name,i==null?"parent: <"+this.parent.name+">":"attribute: {"+i+"}, parent: <"+this.parent.name+">"},y.prototype.isEqualNode=function(i){return!(i.namespaceURI!==this.namespaceURI||i.prefix!==this.prefix||i.localName!==this.localName||i.value!==this.value)},y})()}).call(Te)});var wt=F((be,Ee)=>{(function(){var t;Ee.exports=t=(function(){function r(c){this.nodes=c}return Object.defineProperty(r.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),r.prototype.clone=function(){return this.nodes=null},r.prototype.getNamedItem=function(c){return this.nodes[c]},r.prototype.setNamedItem=function(c){var y;return y=this.nodes[c.nodeName],this.nodes[c.nodeName]=c,y||null},r.prototype.removeNamedItem=function(c){var y;return y=this.nodes[c],delete this.nodes[c],y||null},r.prototype.item=function(c){return this.nodes[Object.keys(this.nodes)[c]]||null},r.prototype.getNamedItemNS=function(c,y){throw new Error("This DOM method is not implemented.")},r.prototype.setNamedItemNS=function(c){throw new Error("This DOM method is not implemented.")},r.prototype.removeNamedItemNS=function(c,y){throw new Error("This DOM method is not implemented.")},r})()}).call(be)});var Tt=F((Ne,Oe)=>{(function(){var t,r,c,y,i,f,u,l,m,g=function(O,D){for(var p in D)N.call(D,p)&&(O[p]=D[p]);function T(){this.constructor=O}return T.prototype=D.prototype,O.prototype=new T,O.__super__=D.prototype,O},N={}.hasOwnProperty;m=tt(),l=m.isObject,u=m.isFunction,f=m.getValue,i=Q(),t=k(),r=Vt(),y=wt(),Oe.exports=c=(function(O){g(D,O);function D(p,T,E){var A,M,_,d;if(D.__super__.constructor.call(this,p),T==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(T),this.type=t.Element,this.attribs={},this.schemaTypeInfo=null,E!=null&&this.attribute(E),p.type===t.Document&&(this.isRoot=!0,this.documentObject=p,p.rootObject=this,p.children)){for(d=p.children,M=0,_=d.length;M<_;M++)if(A=d[M],A.type===t.DocType){A.name=this.name;break}}}return Object.defineProperty(D.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(D.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(D.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(D.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(D.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(D.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(D.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(D.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new y(this.attribs)),this.attributeMap}}),D.prototype.clone=function(){var p,T,E,A;E=Object.create(this),E.isRoot&&(E.documentObject=null),E.attribs={},A=this.attribs;for(T in A)N.call(A,T)&&(p=A[T],E.attribs[T]=p.clone());return E.children=[],this.children.forEach(function(M){var _;return _=M.clone(),_.parent=E,E.children.push(_)}),E},D.prototype.attribute=function(p,T){var E,A;if(p!=null&&(p=f(p)),l(p))for(E in p)N.call(p,E)&&(A=p[E],this.attribute(E,A));else u(T)&&(T=T.apply()),this.options.keepNullAttributes&&T==null?this.attribs[p]=new r(this,p,""):T!=null&&(this.attribs[p]=new r(this,p,T));return this},D.prototype.removeAttribute=function(p){var T,E,A;if(p==null)throw new Error("Missing attribute name. "+this.debugInfo());if(p=f(p),Array.isArray(p))for(E=0,A=p.length;E<A;E++)T=p[E],delete this.attribs[T];else delete this.attribs[p];return this},D.prototype.toString=function(p){return this.options.writer.element(this,this.options.writer.filterOptions(p))},D.prototype.att=function(p,T){return this.attribute(p,T)},D.prototype.a=function(p,T){return this.attribute(p,T)},D.prototype.getAttribute=function(p){return this.attribs.hasOwnProperty(p)?this.attribs[p].value:null},D.prototype.setAttribute=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getAttributeNode=function(p){return this.attribs.hasOwnProperty(p)?this.attribs[p]:null},D.prototype.setAttributeNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.removeAttributeNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getElementsByTagName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getAttributeNS=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.setAttributeNS=function(p,T,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.removeAttributeNS=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getAttributeNodeNS=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.setAttributeNodeNS=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getElementsByTagNameNS=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.hasAttribute=function(p){return this.attribs.hasOwnProperty(p)},D.prototype.hasAttributeNS=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.setIdAttribute=function(p,T){return this.attribs.hasOwnProperty(p)?this.attribs[p].isId:T},D.prototype.setIdAttributeNS=function(p,T,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.setIdAttributeNode=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getElementsByTagName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getElementsByTagNameNS=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getElementsByClassName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.isEqualNode=function(p){var T,E,A;if(!D.__super__.isEqualNode.apply(this,arguments).isEqualNode(p)||p.namespaceURI!==this.namespaceURI||p.prefix!==this.prefix||p.localName!==this.localName||p.attribs.length!==this.attribs.length)return!1;for(T=E=0,A=this.attribs.length-1;0<=A?E<=A:E>=A;T=0<=A?++E:--E)if(!this.attribs[T].isEqualNode(p.attribs[T]))return!1;return!0},D})(i)}).call(Ne)});var dt=F((Ie,Ce)=>{(function(){var t,r,c=function(i,f){for(var u in f)y.call(f,u)&&(i[u]=f[u]);function l(){this.constructor=i}return l.prototype=f.prototype,i.prototype=new l,i.__super__=f.prototype,i},y={}.hasOwnProperty;r=Q(),Ce.exports=t=(function(i){c(f,i);function f(u){f.__super__.constructor.call(this,u),this.value=""}return Object.defineProperty(f.prototype,"data",{get:function(){return this.value},set:function(u){return this.value=u||""}}),Object.defineProperty(f.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(f.prototype,"textContent",{get:function(){return this.value},set:function(u){return this.value=u||""}}),f.prototype.clone=function(){return Object.create(this)},f.prototype.substringData=function(u,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.appendData=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.insertData=function(u,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.deleteData=function(u,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.replaceData=function(u,l,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.isEqualNode=function(u){return!(!f.__super__.isEqualNode.apply(this,arguments).isEqualNode(u)||u.data!==this.data)},f})(r)}).call(Ie)});var Dt=F((_e,Le)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;t=k(),c=dt(),Le.exports=r=(function(f){y(u,f);function u(l,m){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=t.CData,this.value=this.stringify.cdata(m)}return u.prototype.clone=function(){return Object.create(this)},u.prototype.toString=function(l){return this.options.writer.cdata(this,this.options.writer.filterOptions(l))},u})(c)}).call(_e)});var bt=F((ve,Me)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;t=k(),r=dt(),Me.exports=c=(function(f){y(u,f);function u(l,m){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=t.Comment,this.value=this.stringify.comment(m)}return u.prototype.clone=function(){return Object.create(this)},u.prototype.toString=function(l){return this.options.writer.comment(this,this.options.writer.filterOptions(l))},u})(r)}).call(ve)});var Et=F((Ae,Pe)=>{(function(){var t,r,c,y,i=function(u,l){for(var m in l)f.call(l,m)&&(u[m]=l[m]);function g(){this.constructor=u}return g.prototype=l.prototype,u.prototype=new g,u.__super__=l.prototype,u},f={}.hasOwnProperty;y=tt().isObject,c=Q(),t=k(),Pe.exports=r=(function(u){i(l,u);function l(m,g,N,O){var D;l.__super__.constructor.call(this,m),y(g)&&(D=g,g=D.version,N=D.encoding,O=D.standalone),g||(g="1.0"),this.type=t.Declaration,this.version=this.stringify.xmlVersion(g),N!=null&&(this.encoding=this.stringify.xmlEncoding(N)),O!=null&&(this.standalone=this.stringify.xmlStandalone(O))}return l.prototype.toString=function(m){return this.options.writer.declaration(this,this.options.writer.filterOptions(m))},l})(c)}).call(Ae)});var Nt=F((xe,Se)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;c=Q(),t=k(),Se.exports=r=(function(f){y(u,f);function u(l,m,g,N,O,D){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(g==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(m));if(!N)throw new Error("Missing DTD attribute type. "+this.debugInfo(m));if(!O)throw new Error("Missing DTD attribute default. "+this.debugInfo(m));if(O.indexOf("#")!==0&&(O="#"+O),!O.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(m));if(D&&!O.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(m));this.elementName=this.stringify.name(m),this.type=t.AttributeDeclaration,this.attributeName=this.stringify.name(g),this.attributeType=this.stringify.dtdAttType(N),D&&(this.defaultValue=this.stringify.dtdAttDefault(D)),this.defaultValueType=O}return u.prototype.toString=function(l){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(l))},u})(c)}).call(xe)});var Ot=F((Fe,qe)=>{(function(){var t,r,c,y,i=function(u,l){for(var m in l)f.call(l,m)&&(u[m]=l[m]);function g(){this.constructor=u}return g.prototype=l.prototype,u.prototype=new g,u.__super__=l.prototype,u},f={}.hasOwnProperty;y=tt().isObject,c=Q(),t=k(),qe.exports=r=(function(u){i(l,u);function l(m,g,N,O){if(l.__super__.constructor.call(this,m),N==null)throw new Error("Missing DTD entity name. "+this.debugInfo(N));if(O==null)throw new Error("Missing DTD entity value. "+this.debugInfo(N));if(this.pe=!!g,this.name=this.stringify.name(N),this.type=t.EntityDeclaration,!y(O))this.value=this.stringify.dtdEntityValue(O),this.internal=!0;else{if(!O.pubID&&!O.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(N));if(O.pubID&&!O.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(N));if(this.internal=!1,O.pubID!=null&&(this.pubID=this.stringify.dtdPubID(O.pubID)),O.sysID!=null&&(this.sysID=this.stringify.dtdSysID(O.sysID)),O.nData!=null&&(this.nData=this.stringify.dtdNData(O.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(N))}}return Object.defineProperty(l.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(l.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(l.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(l.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(l.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(l.prototype,"xmlVersion",{get:function(){return null}}),l.prototype.toString=function(m){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(m))},l})(c)}).call(Fe)});var It=F((Xe,Re)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;c=Q(),t=k(),Re.exports=r=(function(f){y(u,f);function u(l,m,g){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing DTD element name. "+this.debugInfo());g||(g="(#PCDATA)"),Array.isArray(g)&&(g="("+g.join(",")+")"),this.name=this.stringify.name(m),this.type=t.ElementDeclaration,this.value=this.stringify.dtdElementValue(g)}return u.prototype.toString=function(l){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(l))},u})(c)}).call(Xe)});var Ct=F((je,Be)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;c=Q(),t=k(),Be.exports=r=(function(f){y(u,f);function u(l,m,g){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing DTD notation name. "+this.debugInfo(m));if(!g.pubID&&!g.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(m));this.name=this.stringify.name(m),this.type=t.NotationDeclaration,g.pubID!=null&&(this.pubID=this.stringify.dtdPubID(g.pubID)),g.sysID!=null&&(this.sysID=this.stringify.dtdSysID(g.sysID))}return Object.defineProperty(u.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(u.prototype,"systemId",{get:function(){return this.sysID}}),u.prototype.toString=function(l){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(l))},u})(c)}).call(je)});var _t=F((Ue,Ve)=>{(function(){var t,r,c,y,i,f,u,l,m,g=function(O,D){for(var p in D)N.call(D,p)&&(O[p]=D[p]);function T(){this.constructor=O}return T.prototype=D.prototype,O.prototype=new T,O.__super__=D.prototype,O},N={}.hasOwnProperty;m=tt().isObject,l=Q(),t=k(),r=Nt(),y=Ot(),c=It(),i=Ct(),u=wt(),Ve.exports=f=(function(O){g(D,O);function D(p,T,E){var A,M,_,d,o,n;if(D.__super__.constructor.call(this,p),this.type=t.DocType,p.children){for(d=p.children,M=0,_=d.length;M<_;M++)if(A=d[M],A.type===t.Element){this.name=A.name;break}}this.documentObject=p,m(T)&&(o=T,T=o.pubID,E=o.sysID),E==null&&(n=[T,E],E=n[0],T=n[1]),T!=null&&(this.pubID=this.stringify.dtdPubID(T)),E!=null&&(this.sysID=this.stringify.dtdSysID(E))}return Object.defineProperty(D.prototype,"entities",{get:function(){var p,T,E,A,M;for(A={},M=this.children,T=0,E=M.length;T<E;T++)p=M[T],p.type===t.EntityDeclaration&&!p.pe&&(A[p.name]=p);return new u(A)}}),Object.defineProperty(D.prototype,"notations",{get:function(){var p,T,E,A,M;for(A={},M=this.children,T=0,E=M.length;T<E;T++)p=M[T],p.type===t.NotationDeclaration&&(A[p.name]=p);return new u(A)}}),Object.defineProperty(D.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(D.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(D.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),D.prototype.element=function(p,T){var E;return E=new c(this,p,T),this.children.push(E),this},D.prototype.attList=function(p,T,E,A,M){var _;return _=new r(this,p,T,E,A,M),this.children.push(_),this},D.prototype.entity=function(p,T){var E;return E=new y(this,!1,p,T),this.children.push(E),this},D.prototype.pEntity=function(p,T){var E;return E=new y(this,!0,p,T),this.children.push(E),this},D.prototype.notation=function(p,T){var E;return E=new i(this,p,T),this.children.push(E),this},D.prototype.toString=function(p){return this.options.writer.docType(this,this.options.writer.filterOptions(p))},D.prototype.ele=function(p,T){return this.element(p,T)},D.prototype.att=function(p,T,E,A,M){return this.attList(p,T,E,A,M)},D.prototype.ent=function(p,T){return this.entity(p,T)},D.prototype.pent=function(p,T){return this.pEntity(p,T)},D.prototype.not=function(p,T){return this.notation(p,T)},D.prototype.up=function(){return this.root()||this.documentObject},D.prototype.isEqualNode=function(p){return!(!D.__super__.isEqualNode.apply(this,arguments).isEqualNode(p)||p.name!==this.name||p.publicId!==this.publicId||p.systemId!==this.systemId)},D})(l)}).call(Ue)});var Lt=F((We,ke)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;t=k(),r=Q(),ke.exports=c=(function(f){y(u,f);function u(l,m){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=t.Raw,this.value=this.stringify.raw(m)}return u.prototype.clone=function(){return Object.create(this)},u.prototype.toString=function(l){return this.options.writer.raw(this,this.options.writer.filterOptions(l))},u})(r)}).call(We)});var vt=F((Ge,Ye)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;t=k(),r=dt(),Ye.exports=c=(function(f){y(u,f);function u(l,m){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=t.Text,this.value=this.stringify.text(m)}return Object.defineProperty(u.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"wholeText",{get:function(){var l,m,g;for(g="",m=this.previousSibling;m;)g=m.data+g,m=m.previousSibling;for(g+=this.data,l=this.nextSibling;l;)g=g+l.data,l=l.nextSibling;return g}}),u.prototype.clone=function(){return Object.create(this)},u.prototype.toString=function(l){return this.options.writer.text(this,this.options.writer.filterOptions(l))},u.prototype.splitText=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.replaceWholeText=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},u})(r)}).call(Ge)});var Mt=F((Ke,ze)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;t=k(),r=dt(),ze.exports=c=(function(f){y(u,f);function u(l,m,g){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=t.ProcessingInstruction,this.target=this.stringify.insTarget(m),this.name=this.target,g&&(this.value=this.stringify.insValue(g))}return u.prototype.clone=function(){return Object.create(this)},u.prototype.toString=function(l){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(l))},u.prototype.isEqualNode=function(l){return!(!u.__super__.isEqualNode.apply(this,arguments).isEqualNode(l)||l.target!==this.target)},u})(r)}).call(Ke)});var Wt=F((He,$e)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;c=Q(),t=k(),$e.exports=r=(function(f){y(u,f);function u(l){u.__super__.constructor.call(this,l),this.type=t.Dummy}return u.prototype.clone=function(){return Object.create(this)},u.prototype.toString=function(l){return""},u})(c)}).call(He)});var Je=F((Qe,Ze)=>{(function(){var t;Ze.exports=t=(function(){function r(c){this.nodes=c}return Object.defineProperty(r.prototype,"length",{get:function(){return this.nodes.length||0}}),r.prototype.clone=function(){return this.nodes=null},r.prototype.item=function(c){return this.nodes[c]||null},r})()}).call(Qe)});var rr=F((tr,er)=>{(function(){er.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(tr)});var Q=F((nr,ir)=>{(function(){var t,r,c,y,i,f,u,l,m,g,N,O,D,p,T,E,A,M,_,d={}.hasOwnProperty;_=tt(),M=_.isObject,A=_.isFunction,E=_.isEmpty,T=_.getValue,l=null,c=null,y=null,i=null,f=null,D=null,p=null,O=null,u=null,r=null,N=null,m=null,t=null,ir.exports=g=(function(){function o(n){this.parent=n,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,l||(l=Tt(),c=Dt(),y=bt(),i=Et(),f=_t(),D=Lt(),p=vt(),O=Mt(),u=Wt(),r=k(),N=Je(),m=wt(),t=rr())}return Object.defineProperty(o.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(o.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(o.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(o.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(o.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new N(this.children)),this.childNodeList}}),Object.defineProperty(o.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(o.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(o.prototype,"previousSibling",{get:function(){var n;return n=this.parent.children.indexOf(this),this.parent.children[n-1]||null}}),Object.defineProperty(o.prototype,"nextSibling",{get:function(){var n;return n=this.parent.children.indexOf(this),this.parent.children[n+1]||null}}),Object.defineProperty(o.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(o.prototype,"textContent",{get:function(){var n,h,C,I,a;if(this.nodeType===r.Element||this.nodeType===r.DocumentFragment){for(a="",I=this.children,h=0,C=I.length;h<C;h++)n=I[h],n.textContent&&(a+=n.textContent);return a}else return null},set:function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),o.prototype.setParent=function(n){var h,C,I,a,w;for(this.parent=n,n&&(this.options=n.options,this.stringify=n.stringify),a=this.children,w=[],C=0,I=a.length;C<I;C++)h=a[C],w.push(h.setParent(this));return w},o.prototype.element=function(n,h,C){var I,a,w,v,P,x,q,X,S,V,R;if(x=null,h===null&&C==null&&(S=[{},null],h=S[0],C=S[1]),h==null&&(h={}),h=T(h),M(h)||(V=[h,C],C=V[0],h=V[1]),n!=null&&(n=T(n)),Array.isArray(n))for(w=0,q=n.length;w<q;w++)a=n[w],x=this.element(a);else if(A(n))x=this.element(n.apply());else if(M(n)){for(P in n)if(d.call(n,P))if(R=n[P],A(R)&&(R=R.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&P.indexOf(this.stringify.convertAttKey)===0)x=this.attribute(P.substr(this.stringify.convertAttKey.length),R);else if(!this.options.separateArrayItems&&Array.isArray(R)&&E(R))x=this.dummy();else if(M(R)&&E(R))x=this.element(P);else if(!this.options.keepNullNodes&&R==null)x=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(R))for(v=0,X=R.length;v<X;v++)a=R[v],I={},I[P]=a,x=this.element(I);else M(R)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&P.indexOf(this.stringify.convertTextKey)===0?x=this.element(R):(x=this.element(P),x.element(R)):x=this.element(P,R)}else!this.options.keepNullNodes&&C===null?x=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&n.indexOf(this.stringify.convertTextKey)===0?x=this.text(C):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&n.indexOf(this.stringify.convertCDataKey)===0?x=this.cdata(C):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&n.indexOf(this.stringify.convertCommentKey)===0?x=this.comment(C):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&n.indexOf(this.stringify.convertRawKey)===0?x=this.raw(C):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&n.indexOf(this.stringify.convertPIKey)===0?x=this.instruction(n.substr(this.stringify.convertPIKey.length),C):x=this.node(n,h,C);if(x==null)throw new Error("Could not create any elements with: "+n+". "+this.debugInfo());return x},o.prototype.insertBefore=function(n,h,C){var I,a,w,v,P;if(n?.type)return w=n,v=h,w.setParent(this),v?(a=children.indexOf(v),P=children.splice(a),children.push(w),Array.prototype.push.apply(children,P)):children.push(w),w;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(n));return a=this.parent.children.indexOf(this),P=this.parent.children.splice(a),I=this.parent.element(n,h,C),Array.prototype.push.apply(this.parent.children,P),I},o.prototype.insertAfter=function(n,h,C){var I,a,w;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(n));return a=this.parent.children.indexOf(this),w=this.parent.children.splice(a+1),I=this.parent.element(n,h,C),Array.prototype.push.apply(this.parent.children,w),I},o.prototype.remove=function(){var n,h;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return n=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[n,n-n+1].concat(h=[])),this.parent},o.prototype.node=function(n,h,C){var I,a;return n!=null&&(n=T(n)),h||(h={}),h=T(h),M(h)||(a=[h,C],C=a[0],h=a[1]),I=new l(this,n,h),C!=null&&I.text(C),this.children.push(I),I},o.prototype.text=function(n){var h;return M(n)&&this.element(n),h=new p(this,n),this.children.push(h),this},o.prototype.cdata=function(n){var h;return h=new c(this,n),this.children.push(h),this},o.prototype.comment=function(n){var h;return h=new y(this,n),this.children.push(h),this},o.prototype.commentBefore=function(n){var h,C,I;return C=this.parent.children.indexOf(this),I=this.parent.children.splice(C),h=this.parent.comment(n),Array.prototype.push.apply(this.parent.children,I),this},o.prototype.commentAfter=function(n){var h,C,I;return C=this.parent.children.indexOf(this),I=this.parent.children.splice(C+1),h=this.parent.comment(n),Array.prototype.push.apply(this.parent.children,I),this},o.prototype.raw=function(n){var h;return h=new D(this,n),this.children.push(h),this},o.prototype.dummy=function(){var n;return n=new u(this),n},o.prototype.instruction=function(n,h){var C,I,a,w,v;if(n!=null&&(n=T(n)),h!=null&&(h=T(h)),Array.isArray(n))for(w=0,v=n.length;w<v;w++)C=n[w],this.instruction(C);else if(M(n))for(C in n)d.call(n,C)&&(I=n[C],this.instruction(C,I));else A(h)&&(h=h.apply()),a=new O(this,n,h),this.children.push(a);return this},o.prototype.instructionBefore=function(n,h){var C,I,a;return I=this.parent.children.indexOf(this),a=this.parent.children.splice(I),C=this.parent.instruction(n,h),Array.prototype.push.apply(this.parent.children,a),this},o.prototype.instructionAfter=function(n,h){var C,I,a;return I=this.parent.children.indexOf(this),a=this.parent.children.splice(I+1),C=this.parent.instruction(n,h),Array.prototype.push.apply(this.parent.children,a),this},o.prototype.declaration=function(n,h,C){var I,a;return I=this.document(),a=new i(I,n,h,C),I.children.length===0?I.children.unshift(a):I.children[0].type===r.Declaration?I.children[0]=a:I.children.unshift(a),I.root()||I},o.prototype.dtd=function(n,h){var C,I,a,w,v,P,x,q,X,S;for(I=this.document(),a=new f(I,n,h),X=I.children,w=v=0,x=X.length;v<x;w=++v)if(C=X[w],C.type===r.DocType)return I.children[w]=a,a;for(S=I.children,w=P=0,q=S.length;P<q;w=++P)if(C=S[w],C.isRoot)return I.children.splice(w,0,a),a;return I.children.push(a),a},o.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},o.prototype.root=function(){var n;for(n=this;n;){if(n.type===r.Document)return n.rootObject;if(n.isRoot)return n;n=n.parent}},o.prototype.document=function(){var n;for(n=this;n;){if(n.type===r.Document)return n;n=n.parent}},o.prototype.end=function(n){return this.document().end(n)},o.prototype.prev=function(){var n;if(n=this.parent.children.indexOf(this),n<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[n-1]},o.prototype.next=function(){var n;if(n=this.parent.children.indexOf(this),n===-1||n===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[n+1]},o.prototype.importDocument=function(n){var h;return h=n.root().clone(),h.parent=this,h.isRoot=!1,this.children.push(h),this},o.prototype.debugInfo=function(n){var h,C;return n=n||this.name,n==null&&!((h=this.parent)!=null&&h.name)?"":n==null?"parent: <"+this.parent.name+">":(C=this.parent)!=null&&C.name?"node: <"+n+">, parent: <"+this.parent.name+">":"node: <"+n+">"},o.prototype.ele=function(n,h,C){return this.element(n,h,C)},o.prototype.nod=function(n,h,C){return this.node(n,h,C)},o.prototype.txt=function(n){return this.text(n)},o.prototype.dat=function(n){return this.cdata(n)},o.prototype.com=function(n){return this.comment(n)},o.prototype.ins=function(n,h){return this.instruction(n,h)},o.prototype.doc=function(){return this.document()},o.prototype.dec=function(n,h,C){return this.declaration(n,h,C)},o.prototype.e=function(n,h,C){return this.element(n,h,C)},o.prototype.n=function(n,h,C){return this.node(n,h,C)},o.prototype.t=function(n){return this.text(n)},o.prototype.d=function(n){return this.cdata(n)},o.prototype.c=function(n){return this.comment(n)},o.prototype.r=function(n){return this.raw(n)},o.prototype.i=function(n,h){return this.instruction(n,h)},o.prototype.u=function(){return this.up()},o.prototype.importXMLBuilder=function(n){return this.importDocument(n)},o.prototype.replaceChild=function(n,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.removeChild=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.appendChild=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.hasChildNodes=function(){return this.children.length!==0},o.prototype.cloneNode=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isSupported=function(n,h){return!0},o.prototype.hasAttributes=function(){return this.attribs.length!==0},o.prototype.compareDocumentPosition=function(n){var h,C;return h=this,h===n?0:this.document()!==n.document()?(C=t.Disconnected|t.ImplementationSpecific,Math.random()<.5?C|=t.Preceding:C|=t.Following,C):h.isAncestor(n)?t.Contains|t.Preceding:h.isDescendant(n)?t.Contains|t.Following:h.isPreceding(n)?t.Preceding:t.Following},o.prototype.isSameNode=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.lookupPrefix=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isDefaultNamespace=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.lookupNamespaceURI=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isEqualNode=function(n){var h,C,I;if(n.nodeType!==this.nodeType||n.children.length!==this.children.length)return!1;for(h=C=0,I=this.children.length-1;0<=I?C<=I:C>=I;h=0<=I?++C:--C)if(!this.children[h].isEqualNode(n.children[h]))return!1;return!0},o.prototype.getFeature=function(n,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.setUserData=function(n,h,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getUserData=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.contains=function(n){return n?n===this||this.isDescendant(n):!1},o.prototype.isDescendant=function(n){var h,C,I,a,w;for(w=this.children,I=0,a=w.length;I<a;I++)if(h=w[I],n===h||(C=h.isDescendant(n),C))return!0;return!1},o.prototype.isAncestor=function(n){return n.isDescendant(this)},o.prototype.isPreceding=function(n){var h,C;return h=this.treePosition(n),C=this.treePosition(this),h===-1||C===-1?!1:h<C},o.prototype.isFollowing=function(n){var h,C;return h=this.treePosition(n),C=this.treePosition(this),h===-1||C===-1?!1:h>C},o.prototype.treePosition=function(n){var h,C;return C=0,h=!1,this.foreachTreeNode(this.document(),function(I){if(C++,!h&&I===n)return h=!0}),h?C:-1},o.prototype.foreachTreeNode=function(n,h){var C,I,a,w,v;for(n||(n=this.document()),w=n.children,I=0,a=w.length;I<a;I++){if(C=w[I],v=h(C))return v;if(v=this.foreachTreeNode(C,h),v)return v}},o})()}).call(nr)});var kt=F((or,sr)=>{(function(){var t,r=function(y,i){return function(){return y.apply(i,arguments)}},c={}.hasOwnProperty;sr.exports=t=(function(){function y(i){this.assertLegalName=r(this.assertLegalName,this),this.assertLegalChar=r(this.assertLegalChar,this);var f,u,l;i||(i={}),this.options=i,this.options.version||(this.options.version="1.0"),u=i.stringify||{};for(f in u)c.call(u,f)&&(l=u[f],this[f]=l)}return y.prototype.name=function(i){return this.options.noValidation?i:this.assertLegalName(""+i||"")},y.prototype.text=function(i){return this.options.noValidation?i:this.assertLegalChar(this.textEscape(""+i||""))},y.prototype.cdata=function(i){return this.options.noValidation?i:(i=""+i||"",i=i.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(i))},y.prototype.comment=function(i){if(this.options.noValidation)return i;if(i=""+i||"",i.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+i);return this.assertLegalChar(i)},y.prototype.raw=function(i){return this.options.noValidation?i:""+i||""},y.prototype.attValue=function(i){return this.options.noValidation?i:this.assertLegalChar(this.attEscape(i=""+i||""))},y.prototype.insTarget=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.insValue=function(i){if(this.options.noValidation)return i;if(i=""+i||"",i.match(/\?>/))throw new Error("Invalid processing instruction value: "+i);return this.assertLegalChar(i)},y.prototype.xmlVersion=function(i){if(this.options.noValidation)return i;if(i=""+i||"",!i.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+i);return i},y.prototype.xmlEncoding=function(i){if(this.options.noValidation)return i;if(i=""+i||"",!i.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+i);return this.assertLegalChar(i)},y.prototype.xmlStandalone=function(i){return this.options.noValidation?i:i?"yes":"no"},y.prototype.dtdPubID=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.dtdSysID=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.dtdElementValue=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.dtdAttType=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.dtdAttDefault=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.dtdEntityValue=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.dtdNData=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.convertAttKey="@",y.prototype.convertPIKey="?",y.prototype.convertTextKey="#text",y.prototype.convertCDataKey="#cdata",y.prototype.convertCommentKey="#comment",y.prototype.convertRawKey="#raw",y.prototype.assertLegalChar=function(i){var f,u;if(this.options.noValidation)return i;if(f="",this.options.version==="1.0"){if(f=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,u=i.match(f))throw new Error("Invalid character in string: "+i+" at index "+u.index)}else if(this.options.version==="1.1"&&(f=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,u=i.match(f)))throw new Error("Invalid character in string: "+i+" at index "+u.index);return i},y.prototype.assertLegalName=function(i){var f;if(this.options.noValidation)return i;if(this.assertLegalChar(i),f=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!i.match(f))throw new Error("Invalid character in name");return i},y.prototype.textEscape=function(i){var f;return this.options.noValidation?i:(f=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,i.replace(f,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},y.prototype.attEscape=function(i){var f;return this.options.noValidation?i:(f=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,i.replace(f,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},y})()}).call(or)});var mt=F((ur,ar)=>{(function(){ar.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(ur)});var Gt=F((cr,lr)=>{(function(){var t,r,c,y,i,f,u,l,m,g,N,O,D,p,T,E,A,M={}.hasOwnProperty;A=tt().assign,t=k(),m=Et(),g=_t(),c=Dt(),y=bt(),O=Tt(),p=Lt(),T=vt(),D=Mt(),N=Wt(),i=Nt(),f=It(),u=Ot(),l=Ct(),r=mt(),lr.exports=E=(function(){function _(d){var o,n,h;d||(d={}),this.options=d,n=d.writer||{};for(o in n)M.call(n,o)&&(h=n[o],this["_"+o]=this[o],this[o]=h)}return _.prototype.filterOptions=function(d){var o,n,h,C,I,a,w,v;return d||(d={}),d=A({},this.options,d),o={writer:this},o.pretty=d.pretty||!1,o.allowEmpty=d.allowEmpty||!1,o.indent=(n=d.indent)!=null?n:" ",o.newline=(h=d.newline)!=null?h:`
|
|
3
|
-
`,o.offset=(C=d.offset)!=null?C:0,o.dontPrettyTextNodes=(I=(a=d.dontPrettyTextNodes)!=null?a:d.dontprettytextnodes)!=null?I:0,o.spaceBeforeSlash=(w=(v=d.spaceBeforeSlash)!=null?v:d.spacebeforeslash)!=null?w:"",o.spaceBeforeSlash===!0&&(o.spaceBeforeSlash=" "),o.suppressPrettyCount=0,o.user={},o.state=r.None,o},_.prototype.indent=function(d,o,n){var h;return!o.pretty||o.suppressPrettyCount?"":o.pretty&&(h=(n||0)+o.offset+1,h>0)?new Array(h).join(o.indent):""},_.prototype.endline=function(d,o,n){return!o.pretty||o.suppressPrettyCount?"":o.newline},_.prototype.attribute=function(d,o,n){var h;return this.openAttribute(d,o,n),h=" "+d.name+'="'+d.value+'"',this.closeAttribute(d,o,n),h},_.prototype.cdata=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<![CDATA[",o.state=r.InsideTag,h+=d.value,o.state=r.CloseTag,h+="]]>"+this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},_.prototype.comment=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<!-- ",o.state=r.InsideTag,h+=d.value,o.state=r.CloseTag,h+=" -->"+this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},_.prototype.declaration=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<?xml",o.state=r.InsideTag,h+=' version="'+d.version+'"',d.encoding!=null&&(h+=' encoding="'+d.encoding+'"'),d.standalone!=null&&(h+=' standalone="'+d.standalone+'"'),o.state=r.CloseTag,h+=o.spaceBeforeSlash+"?>",h+=this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},_.prototype.docType=function(d,o,n){var h,C,I,a,w;if(n||(n=0),this.openNode(d,o,n),o.state=r.OpenTag,a=this.indent(d,o,n),a+="<!DOCTYPE "+d.root().name,d.pubID&&d.sysID?a+=' PUBLIC "'+d.pubID+'" "'+d.sysID+'"':d.sysID&&(a+=' SYSTEM "'+d.sysID+'"'),d.children.length>0){for(a+=" [",a+=this.endline(d,o,n),o.state=r.InsideTag,w=d.children,C=0,I=w.length;C<I;C++)h=w[C],a+=this.writeChildNode(h,o,n+1);o.state=r.CloseTag,a+="]"}return o.state=r.CloseTag,a+=o.spaceBeforeSlash+">",a+=this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),a},_.prototype.element=function(d,o,n){var h,C,I,a,w,v,P,x,q,X,S,V,R,J;n||(n=0),X=!1,S="",this.openNode(d,o,n),o.state=r.OpenTag,S+=this.indent(d,o,n)+"<"+d.name,V=d.attribs;for(q in V)M.call(V,q)&&(h=V[q],S+=this.attribute(h,o,n));if(I=d.children.length,a=I===0?null:d.children[0],I===0||d.children.every(function(ht){return(ht.type===t.Text||ht.type===t.Raw)&&ht.value===""}))o.allowEmpty?(S+=">",o.state=r.CloseTag,S+="</"+d.name+">"+this.endline(d,o,n)):(o.state=r.CloseTag,S+=o.spaceBeforeSlash+"/>"+this.endline(d,o,n));else if(o.pretty&&I===1&&(a.type===t.Text||a.type===t.Raw)&&a.value!=null)S+=">",o.state=r.InsideTag,o.suppressPrettyCount++,X=!0,S+=this.writeChildNode(a,o,n+1),o.suppressPrettyCount--,X=!1,o.state=r.CloseTag,S+="</"+d.name+">"+this.endline(d,o,n);else{if(o.dontPrettyTextNodes){for(R=d.children,w=0,P=R.length;w<P;w++)if(C=R[w],(C.type===t.Text||C.type===t.Raw)&&C.value!=null){o.suppressPrettyCount++,X=!0;break}}for(S+=">"+this.endline(d,o,n),o.state=r.InsideTag,J=d.children,v=0,x=J.length;v<x;v++)C=J[v],S+=this.writeChildNode(C,o,n+1);o.state=r.CloseTag,S+=this.indent(d,o,n)+"</"+d.name+">",X&&o.suppressPrettyCount--,S+=this.endline(d,o,n),o.state=r.None}return this.closeNode(d,o,n),S},_.prototype.writeChildNode=function(d,o,n){switch(d.type){case t.CData:return this.cdata(d,o,n);case t.Comment:return this.comment(d,o,n);case t.Element:return this.element(d,o,n);case t.Raw:return this.raw(d,o,n);case t.Text:return this.text(d,o,n);case t.ProcessingInstruction:return this.processingInstruction(d,o,n);case t.Dummy:return"";case t.Declaration:return this.declaration(d,o,n);case t.DocType:return this.docType(d,o,n);case t.AttributeDeclaration:return this.dtdAttList(d,o,n);case t.ElementDeclaration:return this.dtdElement(d,o,n);case t.EntityDeclaration:return this.dtdEntity(d,o,n);case t.NotationDeclaration:return this.dtdNotation(d,o,n);default:throw new Error("Unknown XML node type: "+d.constructor.name)}},_.prototype.processingInstruction=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<?",o.state=r.InsideTag,h+=d.target,d.value&&(h+=" "+d.value),o.state=r.CloseTag,h+=o.spaceBeforeSlash+"?>",h+=this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},_.prototype.raw=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n),o.state=r.InsideTag,h+=d.value,o.state=r.CloseTag,h+=this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},_.prototype.text=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n),o.state=r.InsideTag,h+=d.value,o.state=r.CloseTag,h+=this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},_.prototype.dtdAttList=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<!ATTLIST",o.state=r.InsideTag,h+=" "+d.elementName+" "+d.attributeName+" "+d.attributeType,d.defaultValueType!=="#DEFAULT"&&(h+=" "+d.defaultValueType),d.defaultValue&&(h+=' "'+d.defaultValue+'"'),o.state=r.CloseTag,h+=o.spaceBeforeSlash+">"+this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},_.prototype.dtdElement=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<!ELEMENT",o.state=r.InsideTag,h+=" "+d.name+" "+d.value,o.state=r.CloseTag,h+=o.spaceBeforeSlash+">"+this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},_.prototype.dtdEntity=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<!ENTITY",o.state=r.InsideTag,d.pe&&(h+=" %"),h+=" "+d.name,d.value?h+=' "'+d.value+'"':(d.pubID&&d.sysID?h+=' PUBLIC "'+d.pubID+'" "'+d.sysID+'"':d.sysID&&(h+=' SYSTEM "'+d.sysID+'"'),d.nData&&(h+=" NDATA "+d.nData)),o.state=r.CloseTag,h+=o.spaceBeforeSlash+">"+this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},_.prototype.dtdNotation=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<!NOTATION",o.state=r.InsideTag,h+=" "+d.name,d.pubID&&d.sysID?h+=' PUBLIC "'+d.pubID+'" "'+d.sysID+'"':d.pubID?h+=' PUBLIC "'+d.pubID+'"':d.sysID&&(h+=' SYSTEM "'+d.sysID+'"'),o.state=r.CloseTag,h+=o.spaceBeforeSlash+">"+this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},_.prototype.openNode=function(d,o,n){},_.prototype.closeNode=function(d,o,n){},_.prototype.openAttribute=function(d,o,n){},_.prototype.closeAttribute=function(d,o,n){},_})()}).call(cr)});var At=F((fr,hr)=>{(function(){var t,r,c=function(i,f){for(var u in f)y.call(f,u)&&(i[u]=f[u]);function l(){this.constructor=i}return l.prototype=f.prototype,i.prototype=new l,i.__super__=f.prototype,i},y={}.hasOwnProperty;r=Gt(),hr.exports=t=(function(i){c(f,i);function f(u){f.__super__.constructor.call(this,u)}return f.prototype.document=function(u,l){var m,g,N,O,D;for(l=this.filterOptions(l),O="",D=u.children,g=0,N=D.length;g<N;g++)m=D[g],O+=this.writeChildNode(m,l,0);return l.pretty&&O.slice(-l.newline.length)===l.newline&&(O=O.slice(0,-l.newline.length)),O},f})(r)}).call(fr)});var Yt=F((pr,dr)=>{(function(){var t,r,c,y,i,f,u,l,m=function(N,O){for(var D in O)g.call(O,D)&&(N[D]=O[D]);function p(){this.constructor=N}return p.prototype=O.prototype,N.prototype=new p,N.__super__=O.prototype,N},g={}.hasOwnProperty;l=tt().isPlainObject,c=Ut(),r=ye(),i=Q(),t=k(),u=kt(),f=At(),dr.exports=y=(function(N){m(O,N);function O(D){O.__super__.constructor.call(this,null),this.name="#document",this.type=t.Document,this.documentURI=null,this.domConfig=new r,D||(D={}),D.writer||(D.writer=new f),this.options=D,this.stringify=new u(D)}return Object.defineProperty(O.prototype,"implementation",{value:new c}),Object.defineProperty(O.prototype,"doctype",{get:function(){var D,p,T,E;for(E=this.children,p=0,T=E.length;p<T;p++)if(D=E[p],D.type===t.DocType)return D;return null}}),Object.defineProperty(O.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(O.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(O.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(O.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===t.Declaration?this.children[0].encoding:null}}),Object.defineProperty(O.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===t.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(O.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===t.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(O.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(O.prototype,"origin",{get:function(){return null}}),Object.defineProperty(O.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(O.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(O.prototype,"contentType",{get:function(){return null}}),O.prototype.end=function(D){var p;return p={},D?l(D)&&(p=D,D=this.options.writer):D=this.options.writer,D.document(this,D.filterOptions(p))},O.prototype.toString=function(D){return this.options.writer.document(this,this.options.writer.filterOptions(D))},O.prototype.createElement=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createTextNode=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createComment=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createCDATASection=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createProcessingInstruction=function(D,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createAttribute=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createEntityReference=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.getElementsByTagName=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.importNode=function(D,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createElementNS=function(D,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createAttributeNS=function(D,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.getElementsByTagNameNS=function(D,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.getElementById=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.adoptNode=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.renameNode=function(D,p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.getElementsByClassName=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createEvent=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createNodeIterator=function(D,p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createTreeWalker=function(D,p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},O})(i)}).call(pr)});var gr=F((mr,yr)=>{(function(){var t,r,c,y,i,f,u,l,m,g,N,O,D,p,T,E,A,M,_,d,o,n,h,C,I={}.hasOwnProperty;C=tt(),n=C.isObject,o=C.isFunction,h=C.isPlainObject,d=C.getValue,t=k(),O=Yt(),p=Tt(),y=Dt(),i=bt(),E=Lt(),_=vt(),T=Mt(),g=Et(),N=_t(),f=Nt(),l=Ot(),u=It(),m=Ct(),c=Vt(),M=kt(),A=At(),r=mt(),yr.exports=D=(function(){function a(w,v,P){var x;this.name="?xml",this.type=t.Document,w||(w={}),x={},w.writer?h(w.writer)&&(x=w.writer,w.writer=new A):w.writer=new A,this.options=w,this.writer=w.writer,this.writerOptions=this.writer.filterOptions(x),this.stringify=new M(w),this.onDataCallback=v||function(){},this.onEndCallback=P||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return a.prototype.createChildNode=function(w){var v,P,x,q,X,S,V,R;switch(w.type){case t.CData:this.cdata(w.value);break;case t.Comment:this.comment(w.value);break;case t.Element:x={},V=w.attribs;for(P in V)I.call(V,P)&&(v=V[P],x[P]=v.value);this.node(w.name,x);break;case t.Dummy:this.dummy();break;case t.Raw:this.raw(w.value);break;case t.Text:this.text(w.value);break;case t.ProcessingInstruction:this.instruction(w.target,w.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+w.constructor.name)}for(R=w.children,X=0,S=R.length;X<S;X++)q=R[X],this.createChildNode(q),q.type===t.Element&&this.up();return this},a.prototype.dummy=function(){return this},a.prototype.node=function(w,v,P){var x;if(w==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(w));return this.openCurrent(),w=d(w),v==null&&(v={}),v=d(v),n(v)||(x=[v,P],P=x[0],v=x[1]),this.currentNode=new p(this,w,v),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,P!=null&&this.text(P),this},a.prototype.element=function(w,v,P){var x,q,X,S,V,R;if(this.currentNode&&this.currentNode.type===t.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(w)||n(w)||o(w))for(S=this.options.noValidation,this.options.noValidation=!0,R=new O(this.options).element("TEMP_ROOT"),R.element(w),this.options.noValidation=S,V=R.children,q=0,X=V.length;q<X;q++)x=V[q],this.createChildNode(x),x.type===t.Element&&this.up();else this.node(w,v,P);return this},a.prototype.attribute=function(w,v){var P,x;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(w));if(w!=null&&(w=d(w)),n(w))for(P in w)I.call(w,P)&&(x=w[P],this.attribute(P,x));else o(v)&&(v=v.apply()),this.options.keepNullAttributes&&v==null?this.currentNode.attribs[w]=new c(this,w,""):v!=null&&(this.currentNode.attribs[w]=new c(this,w,v));return this},a.prototype.text=function(w){var v;return this.openCurrent(),v=new _(this,w),this.onData(this.writer.text(v,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.cdata=function(w){var v;return this.openCurrent(),v=new y(this,w),this.onData(this.writer.cdata(v,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.comment=function(w){var v;return this.openCurrent(),v=new i(this,w),this.onData(this.writer.comment(v,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.raw=function(w){var v;return this.openCurrent(),v=new E(this,w),this.onData(this.writer.raw(v,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.instruction=function(w,v){var P,x,q,X,S;if(this.openCurrent(),w!=null&&(w=d(w)),v!=null&&(v=d(v)),Array.isArray(w))for(P=0,X=w.length;P<X;P++)x=w[P],this.instruction(x);else if(n(w))for(x in w)I.call(w,x)&&(q=w[x],this.instruction(x,q));else o(v)&&(v=v.apply()),S=new T(this,w,v),this.onData(this.writer.processingInstruction(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},a.prototype.declaration=function(w,v,P){var x;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return x=new g(this,w,v,P),this.onData(this.writer.declaration(x,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.doctype=function(w,v,P){if(this.openCurrent(),w==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new N(this,v,P),this.currentNode.rootNodeName=w,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},a.prototype.dtdElement=function(w,v){var P;return this.openCurrent(),P=new u(this,w,v),this.onData(this.writer.dtdElement(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.attList=function(w,v,P,x,q){var X;return this.openCurrent(),X=new f(this,w,v,P,x,q),this.onData(this.writer.dtdAttList(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.entity=function(w,v){var P;return this.openCurrent(),P=new l(this,!1,w,v),this.onData(this.writer.dtdEntity(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.pEntity=function(w,v){var P;return this.openCurrent(),P=new l(this,!0,w,v),this.onData(this.writer.dtdEntity(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.notation=function(w,v){var P;return this.openCurrent(),P=new m(this,w,v),this.onData(this.writer.dtdNotation(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},a.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},a.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},a.prototype.openNode=function(w){var v,P,x,q;if(!w.isOpen){if(!this.root&&this.currentLevel===0&&w.type===t.Element&&(this.root=w),P="",w.type===t.Element){this.writerOptions.state=r.OpenTag,P=this.writer.indent(w,this.writerOptions,this.currentLevel)+"<"+w.name,q=w.attribs;for(x in q)I.call(q,x)&&(v=q[x],P+=this.writer.attribute(v,this.writerOptions,this.currentLevel));P+=(w.children?">":"/>")+this.writer.endline(w,this.writerOptions,this.currentLevel),this.writerOptions.state=r.InsideTag}else this.writerOptions.state=r.OpenTag,P=this.writer.indent(w,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+w.rootNodeName,w.pubID&&w.sysID?P+=' PUBLIC "'+w.pubID+'" "'+w.sysID+'"':w.sysID&&(P+=' SYSTEM "'+w.sysID+'"'),w.children?(P+=" [",this.writerOptions.state=r.InsideTag):(this.writerOptions.state=r.CloseTag,P+=">"),P+=this.writer.endline(w,this.writerOptions,this.currentLevel);return this.onData(P,this.currentLevel),w.isOpen=!0}},a.prototype.closeNode=function(w){var v;if(!w.isClosed)return v="",this.writerOptions.state=r.CloseTag,w.type===t.Element?v=this.writer.indent(w,this.writerOptions,this.currentLevel)+"</"+w.name+">"+this.writer.endline(w,this.writerOptions,this.currentLevel):v=this.writer.indent(w,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(w,this.writerOptions,this.currentLevel),this.writerOptions.state=r.None,this.onData(v,this.currentLevel),w.isClosed=!0},a.prototype.onData=function(w,v){return this.documentStarted=!0,this.onDataCallback(w,v+1)},a.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},a.prototype.debugInfo=function(w){return w==null?"":"node: <"+w+">"},a.prototype.ele=function(){return this.element.apply(this,arguments)},a.prototype.nod=function(w,v,P){return this.node(w,v,P)},a.prototype.txt=function(w){return this.text(w)},a.prototype.dat=function(w){return this.cdata(w)},a.prototype.com=function(w){return this.comment(w)},a.prototype.ins=function(w,v){return this.instruction(w,v)},a.prototype.dec=function(w,v,P){return this.declaration(w,v,P)},a.prototype.dtd=function(w,v,P){return this.doctype(w,v,P)},a.prototype.e=function(w,v,P){return this.element(w,v,P)},a.prototype.n=function(w,v,P){return this.node(w,v,P)},a.prototype.t=function(w){return this.text(w)},a.prototype.d=function(w){return this.cdata(w)},a.prototype.c=function(w){return this.comment(w)},a.prototype.r=function(w){return this.raw(w)},a.prototype.i=function(w,v){return this.instruction(w,v)},a.prototype.att=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},a.prototype.a=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},a.prototype.ent=function(w,v){return this.entity(w,v)},a.prototype.pent=function(w,v){return this.pEntity(w,v)},a.prototype.not=function(w,v){return this.notation(w,v)},a})()}).call(mr)});var Dr=F((wr,Tr)=>{(function(){var t,r,c,y,i=function(u,l){for(var m in l)f.call(l,m)&&(u[m]=l[m]);function g(){this.constructor=u}return g.prototype=l.prototype,u.prototype=new g,u.__super__=l.prototype,u},f={}.hasOwnProperty;t=k(),y=Gt(),r=mt(),Tr.exports=c=(function(u){i(l,u);function l(m,g){this.stream=m,l.__super__.constructor.call(this,g)}return l.prototype.endline=function(m,g,N){return m.isLastRootNode&&g.state===r.CloseTag?"":l.__super__.endline.call(this,m,g,N)},l.prototype.document=function(m,g){var N,O,D,p,T,E,A,M,_;for(A=m.children,O=D=0,T=A.length;D<T;O=++D)N=A[O],N.isLastRootNode=O===m.children.length-1;for(g=this.filterOptions(g),M=m.children,_=[],p=0,E=M.length;p<E;p++)N=M[p],_.push(this.writeChildNode(N,g,0));return _},l.prototype.attribute=function(m,g,N){return this.stream.write(l.__super__.attribute.call(this,m,g,N))},l.prototype.cdata=function(m,g,N){return this.stream.write(l.__super__.cdata.call(this,m,g,N))},l.prototype.comment=function(m,g,N){return this.stream.write(l.__super__.comment.call(this,m,g,N))},l.prototype.declaration=function(m,g,N){return this.stream.write(l.__super__.declaration.call(this,m,g,N))},l.prototype.docType=function(m,g,N){var O,D,p,T;if(N||(N=0),this.openNode(m,g,N),g.state=r.OpenTag,this.stream.write(this.indent(m,g,N)),this.stream.write("<!DOCTYPE "+m.root().name),m.pubID&&m.sysID?this.stream.write(' PUBLIC "'+m.pubID+'" "'+m.sysID+'"'):m.sysID&&this.stream.write(' SYSTEM "'+m.sysID+'"'),m.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(m,g,N)),g.state=r.InsideTag,T=m.children,D=0,p=T.length;D<p;D++)O=T[D],this.writeChildNode(O,g,N+1);g.state=r.CloseTag,this.stream.write("]")}return g.state=r.CloseTag,this.stream.write(g.spaceBeforeSlash+">"),this.stream.write(this.endline(m,g,N)),g.state=r.None,this.closeNode(m,g,N)},l.prototype.element=function(m,g,N){var O,D,p,T,E,A,M,_,d,o;N||(N=0),this.openNode(m,g,N),g.state=r.OpenTag,this.stream.write(this.indent(m,g,N)+"<"+m.name),d=m.attribs;for(M in d)f.call(d,M)&&(O=d[M],this.attribute(O,g,N));if(p=m.children.length,T=p===0?null:m.children[0],p===0||m.children.every(function(n){return(n.type===t.Text||n.type===t.Raw)&&n.value===""}))g.allowEmpty?(this.stream.write(">"),g.state=r.CloseTag,this.stream.write("</"+m.name+">")):(g.state=r.CloseTag,this.stream.write(g.spaceBeforeSlash+"/>"));else if(g.pretty&&p===1&&(T.type===t.Text||T.type===t.Raw)&&T.value!=null)this.stream.write(">"),g.state=r.InsideTag,g.suppressPrettyCount++,_=!0,this.writeChildNode(T,g,N+1),g.suppressPrettyCount--,_=!1,g.state=r.CloseTag,this.stream.write("</"+m.name+">");else{for(this.stream.write(">"+this.endline(m,g,N)),g.state=r.InsideTag,o=m.children,E=0,A=o.length;E<A;E++)D=o[E],this.writeChildNode(D,g,N+1);g.state=r.CloseTag,this.stream.write(this.indent(m,g,N)+"</"+m.name+">")}return this.stream.write(this.endline(m,g,N)),g.state=r.None,this.closeNode(m,g,N)},l.prototype.processingInstruction=function(m,g,N){return this.stream.write(l.__super__.processingInstruction.call(this,m,g,N))},l.prototype.raw=function(m,g,N){return this.stream.write(l.__super__.raw.call(this,m,g,N))},l.prototype.text=function(m,g,N){return this.stream.write(l.__super__.text.call(this,m,g,N))},l.prototype.dtdAttList=function(m,g,N){return this.stream.write(l.__super__.dtdAttList.call(this,m,g,N))},l.prototype.dtdElement=function(m,g,N){return this.stream.write(l.__super__.dtdElement.call(this,m,g,N))},l.prototype.dtdEntity=function(m,g,N){return this.stream.write(l.__super__.dtdEntity.call(this,m,g,N))},l.prototype.dtdNotation=function(m,g,N){return this.stream.write(l.__super__.dtdNotation.call(this,m,g,N))},l})(y)}).call(wr)});var Er=F((br,ut)=>{(function(){var t,r,c,y,i,f,u,l,m,g;g=tt(),l=g.assign,m=g.isFunction,c=Ut(),y=Yt(),i=gr(),u=At(),f=Dr(),t=k(),r=mt(),ut.exports.create=function(N,O,D,p){var T,E;if(N==null)throw new Error("Root element needs a name.");return p=l({},O,D,p),T=new y(p),E=T.element(N),p.headless||(T.declaration(p),(p.pubID!=null||p.sysID!=null)&&T.dtd(p)),E},ut.exports.begin=function(N,O,D){var p;return m(N)&&(p=[N,O],O=p[0],D=p[1],N={}),O?new i(N,O,D):new y(N)},ut.exports.stringWriter=function(N){return new u(N)},ut.exports.streamWriter=function(N,O){return new f(N,O)},ut.exports.implementation=new c,ut.exports.nodeType=t,ut.exports.writerState=r}).call(br)});var Nr=F(Kt=>{(function(){"use strict";var t,r,c,y,i,f={}.hasOwnProperty;t=Er(),r=gt().defaults,y=function(u){return typeof u=="string"&&(u.indexOf("&")>=0||u.indexOf(">")>=0||u.indexOf("<")>=0)},i=function(u){return"<![CDATA["+c(u)+"]]>"},c=function(u){return u.replace("]]>","]]]]><![CDATA[>")},Kt.Builder=(function(){function u(l){var m,g,N;this.options={},g=r["0.2"];for(m in g)f.call(g,m)&&(N=g[m],this.options[m]=N);for(m in l)f.call(l,m)&&(N=l[m],this.options[m]=N)}return u.prototype.buildObject=function(l){var m,g,N,O,D;return m=this.options.attrkey,g=this.options.charkey,Object.keys(l).length===1&&this.options.rootName===r["0.2"].rootName?(D=Object.keys(l)[0],l=l[D]):D=this.options.rootName,N=(function(p){return function(T,E){var A,M,_,d,o,n;if(typeof E!="object")p.options.cdata&&y(E)?T.raw(i(E)):T.txt(E);else if(Array.isArray(E)){for(d in E)if(f.call(E,d)){M=E[d];for(o in M)_=M[o],T=N(T.ele(o),_).up()}}else for(o in E)if(f.call(E,o))if(M=E[o],o===m){if(typeof M=="object")for(A in M)n=M[A],T=T.att(A,n)}else if(o===g)p.options.cdata&&y(M)?T=T.raw(i(M)):T=T.txt(M);else if(Array.isArray(M))for(d in M)f.call(M,d)&&(_=M[d],typeof _=="string"?p.options.cdata&&y(_)?T=T.ele(o).raw(i(_)).up():T=T.ele(o,_).up():T=N(T.ele(o),_).up());else typeof M=="object"?T=N(T.ele(o),M).up():typeof M=="string"&&p.options.cdata&&y(M)?T=T.ele(o).raw(i(M)).up():(M==null&&(M=""),T=T.ele(o,M.toString()).up());return T}})(this),O=t.create(D,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),N(O,l).end(this.options.renderOpts)},u})()}).call(Kt)});var Or=F((Mn,zt)=>{function K(t){if(t)return ln(t);this._callbacks=new Map}function ln(t){return Object.assign(t,K.prototype),t._callbacks=new Map,t}K.prototype.on=function(t,r){let c=this._callbacks.get(t)??[];return c.push(r),this._callbacks.set(t,c),this};K.prototype.once=function(t,r){let c=(...y)=>{this.off(t,c),r.apply(this,y)};return c.fn=r,this.on(t,c),this};K.prototype.off=function(t,r){if(t===void 0&&r===void 0)return this._callbacks.clear(),this;if(r===void 0)return this._callbacks.delete(t),this;let c=this._callbacks.get(t);if(c){for(let[y,i]of c.entries())if(i===r||i.fn===r){c.splice(y,1);break}c.length===0?this._callbacks.delete(t):this._callbacks.set(t,c)}return this};K.prototype.emit=function(t,...r){let c=this._callbacks.get(t);if(c){let y=[...c];for(let i of y)i.apply(this,r)}return this};K.prototype.listeners=function(t){return this._callbacks.get(t)??[]};K.prototype.listenerCount=function(t){if(t)return this.listeners(t).length;let r=0;for(let c of this._callbacks.values())r+=c.length;return r};K.prototype.hasListeners=function(t){return this.listenerCount(t)>0};K.prototype.addEventListener=K.prototype.on;K.prototype.removeListener=K.prototype.off;K.prototype.removeEventListener=K.prototype.off;K.prototype.removeAllListeners=K.prototype.off;typeof zt<"u"&&(zt.exports=K)});var _r=F((An,Cr)=>{var Ir=Or();function yt(){Ir.call(this)}yt.prototype=new Ir;Cr.exports=yt;yt.Stream=yt;yt.prototype.pipe=function(t,r){var c=this;function y(N){t.writable&&t.write(N)===!1&&c.pause&&c.pause()}c.on("data",y);function i(){c.readable&&c.resume&&c.resume()}t.on("drain",i),!t._isStdio&&(!r||r.end!==!1)&&(c.on("end",u),c.on("close",l));var f=!1;function u(){f||(f=!0,t.end())}function l(){f||(f=!0,typeof t.destroy=="function"&&t.destroy())}function m(N){if(g(),!this.hasListeners("error"))throw N}c.on("error",m),t.on("error",m);function g(){c.off("data",y),t.off("drain",i),c.off("end",u),c.off("close",l),c.off("error",m),t.off("error",m),c.off("end",g),c.off("close",g),t.off("end",g),t.off("close",g)}return c.on("end",g),c.on("close",g),t.on("end",g),t.on("close",g),t.emit("pipe",c),t}});var Lr=F(Pt=>{(function(t){t.parser=function(s,e){return new c(s,e)},t.SAXParser=c,t.SAXStream=N,t.createStream=m,t.MAX_BUFFER_LENGTH=64*1024;var r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function c(s,e){if(!(this instanceof c))return new c(s,e);var L=this;i(L),L.q=L.c="",L.bufferCheckPosition=t.MAX_BUFFER_LENGTH,L.encoding=null,L.opt=e||{},L.opt.lowercase=L.opt.lowercase||L.opt.lowercasetags,L.looseCase=L.opt.lowercase?"toLowerCase":"toUpperCase",L.opt.maxEntityCount=L.opt.maxEntityCount||512,L.opt.maxEntityDepth=L.opt.maxEntityDepth||4,L.entityCount=L.entityDepth=0,L.tags=[],L.closed=L.closedRoot=L.sawRoot=!1,L.tag=L.error=null,L.strict=!!s,L.noscript=!!(s||L.opt.noscript),L.state=a.BEGIN,L.strictEntities=L.opt.strictEntities,L.ENTITIES=L.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),L.attribList=[],L.opt.xmlns&&(L.ns=Object.create(E)),L.opt.unquotedAttributeValues===void 0&&(L.opt.unquotedAttributeValues=!s),L.trackPosition=L.opt.position!==!1,L.trackPosition&&(L.position=L.line=L.column=0),v(L,"onready")}Object.create||(Object.create=function(s){function e(){}e.prototype=s;var L=new e;return L}),Object.keys||(Object.keys=function(s){var e=[];for(var L in s)s.hasOwnProperty(L)&&e.push(L);return e});function y(s){for(var e=Math.max(t.MAX_BUFFER_LENGTH,10),L=0,b=0,j=r.length;b<j;b++){var W=s[r[b]].length;if(W>e)switch(r[b]){case"textNode":V(s);break;case"cdata":S(s,"oncdata",s.cdata),s.cdata="";break;case"script":S(s,"onscript",s.script),s.script="";break;default:J(s,"Max buffer length exceeded: "+r[b])}L=Math.max(L,W)}var G=t.MAX_BUFFER_LENGTH-L;s.bufferCheckPosition=G+s.position}function i(s){for(var e=0,L=r.length;e<L;e++)s[r[e]]=""}function f(s){V(s),s.cdata!==""&&(S(s,"oncdata",s.cdata),s.cdata=""),s.script!==""&&(S(s,"onscript",s.script),s.script="")}c.prototype={end:function(){ht(this)},write:tn,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){f(this)}};var u;try{u=_r().Stream}catch{u=function(){}}u||(u=function(){});var l=t.EVENTS.filter(function(s){return s!=="error"&&s!=="end"});function m(s,e){return new N(s,e)}function g(s,e){if(s.length>=2){if(s[0]===255&&s[1]===254)return"utf-16le";if(s[0]===254&&s[1]===255)return"utf-16be"}return s.length>=3&&s[0]===239&&s[1]===187&&s[2]===191?"utf8":s.length>=4?s[0]===60&&s[1]===0&&s[2]===63&&s[3]===0?"utf-16le":s[0]===0&&s[1]===60&&s[2]===0&&s[3]===63?"utf-16be":"utf8":e?"utf8":null}function N(s,e){if(!(this instanceof N))return new N(s,e);u.apply(this),this._parser=new c(s,e),this.writable=!0,this.readable=!0;var L=this;this._parser.onend=function(){L.emit("end")},this._parser.onerror=function(b){L.emit("error",b),L._parser.error=null},this._decoder=null,this._decoderBuffer=null,l.forEach(function(b){Object.defineProperty(L,"on"+b,{get:function(){return L._parser["on"+b]},set:function(j){if(!j)return L.removeAllListeners(b),L._parser["on"+b]=j,j;L.on(b,j)},enumerable:!0,configurable:!1})})}N.prototype=Object.create(u.prototype,{constructor:{value:N}}),N.prototype._decodeBuffer=function(s,e){if(this._decoderBuffer&&(s=Buffer.concat([this._decoderBuffer,s]),this._decoderBuffer=null),!this._decoder){var L=g(s,e);if(!L)return this._decoderBuffer=s,"";this._parser.encoding=L,this._decoder=new TextDecoder(L)}return this._decoder.decode(s,{stream:!e})},N.prototype.write=function(s){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(s))s=this._decodeBuffer(s,!1);else if(this._decoderBuffer){var e=this._decodeBuffer(Buffer.alloc(0),!0);e&&(this._parser.write(e),this.emit("data",e))}return this._parser.write(s.toString()),this.emit("data",s),!0},N.prototype.end=function(s){if(s&&s.length&&this.write(s),this._decoderBuffer){var e=this._decodeBuffer(Buffer.alloc(0),!0);e&&(this._parser.write(e),this.emit("data",e))}else if(this._decoder){var L=this._decoder.decode();L&&(this._parser.write(L),this.emit("data",L))}return this._parser.end(),!0},N.prototype.on=function(s,e){var L=this;return!L._parser["on"+s]&&l.indexOf(s)!==-1&&(L._parser["on"+s]=function(){var b=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);b.splice(0,0,s),L.emit.apply(L,b)}),u.prototype.on.call(L,s,e)};var O="[CDATA[",D="DOCTYPE",p="http://www.w3.org/XML/1998/namespace",T="http://www.w3.org/2000/xmlns/",E={xml:p,xmlns:T},A=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,M=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,_=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function o(s){return s===" "||s===`
|
|
4
|
-
`||s==="\r"||s===" "}function n(s){return s==='"'||s==="'"}function h(s){return s===">"||o(s)}function
|
|
2
|
+
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(Bt)});var tt=F((oe,st)=>{(function(){var t,r,c,y,i,f,u,l=[].slice,m={}.hasOwnProperty;t=function(){var g,N,O,D,p,T;if(T=arguments[0],p=2<=arguments.length?l.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(g=0,O=p.length;g<O;g++)if(D=p[g],D!=null)for(N in D)m.call(D,N)&&(T[N]=D[N]);return T},i=function(g){return!!g&&Object.prototype.toString.call(g)==="[object Function]"},f=function(g){var N;return!!g&&((N=typeof g)=="function"||N==="object")},c=function(g){return i(Array.isArray)?Array.isArray(g):Object.prototype.toString.call(g)==="[object Array]"},y=function(g){var N;if(c(g))return!g.length;for(N in g)if(m.call(g,N))return!1;return!0},u=function(g){var N,O;return f(g)&&(O=Object.getPrototypeOf(g))&&(N=O.constructor)&&typeof N=="function"&&N instanceof N&&Function.prototype.toString.call(N)===Function.prototype.toString.call(Object)},r=function(g){return i(g.valueOf)?g.valueOf():g},st.exports.assign=t,st.exports.isFunction=i,st.exports.isObject=f,st.exports.isArray=c,st.exports.isEmpty=y,st.exports.isPlainObject=u,st.exports.getValue=r}).call(oe)});var Ut=F((se,ue)=>{(function(){var t;ue.exports=t=(function(){function r(){}return r.prototype.hasFeature=function(c,y){return!0},r.prototype.createDocumentType=function(c,y,i){throw new Error("This DOM method is not implemented.")},r.prototype.createDocument=function(c,y,i){throw new Error("This DOM method is not implemented.")},r.prototype.createHTMLDocument=function(c){throw new Error("This DOM method is not implemented.")},r.prototype.getFeature=function(c,y){throw new Error("This DOM method is not implemented.")},r})()}).call(se)});var le=F((ae,ce)=>{(function(){var t;ce.exports=t=(function(){function r(){}return r.prototype.handleError=function(c){throw new Error(c)},r})()}).call(ae)});var pe=F((fe,he)=>{(function(){var t;he.exports=t=(function(){function r(c){this.arr=c||[]}return Object.defineProperty(r.prototype,"length",{get:function(){return this.arr.length}}),r.prototype.item=function(c){return this.arr[c]||null},r.prototype.contains=function(c){return this.arr.indexOf(c)!==-1},r})()}).call(fe)});var ye=F((de,me)=>{(function(){var t,r,c;r=le(),c=pe(),me.exports=t=(function(){function y(){var i;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new r,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=i=Object.create(this.defaultParams)}return Object.defineProperty(y.prototype,"parameterNames",{get:function(){return new c(Object.keys(this.defaultParams))}}),y.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},y.prototype.canSetParameter=function(i,f){return!0},y.prototype.setParameter=function(i,f){return f!=null?this.params[i]=f:delete this.params[i]},y})()}).call(de)});var k=F((ge,we)=>{(function(){we.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(ge)});var Vt=F((Te,De)=>{(function(){var t,r,c;t=k(),c=$(),De.exports=r=(function(){function y(i,f,u){if(this.parent=i,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),f==null)throw new Error("Missing attribute name. "+this.debugInfo(f));this.name=this.stringify.name(f),this.value=this.stringify.attValue(u),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(y.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(y.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(y.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defineProperty(y.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(y.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(y.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(y.prototype,"specified",{get:function(){return!0}}),y.prototype.clone=function(){return Object.create(this)},y.prototype.toString=function(i){return this.options.writer.attribute(this,this.options.writer.filterOptions(i))},y.prototype.debugInfo=function(i){return i=i||this.name,i==null?"parent: <"+this.parent.name+">":"attribute: {"+i+"}, parent: <"+this.parent.name+">"},y.prototype.isEqualNode=function(i){return!(i.namespaceURI!==this.namespaceURI||i.prefix!==this.prefix||i.localName!==this.localName||i.value!==this.value)},y})()}).call(Te)});var wt=F((be,Ee)=>{(function(){var t;Ee.exports=t=(function(){function r(c){this.nodes=c}return Object.defineProperty(r.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),r.prototype.clone=function(){return this.nodes=null},r.prototype.getNamedItem=function(c){return this.nodes[c]},r.prototype.setNamedItem=function(c){var y;return y=this.nodes[c.nodeName],this.nodes[c.nodeName]=c,y||null},r.prototype.removeNamedItem=function(c){var y;return y=this.nodes[c],delete this.nodes[c],y||null},r.prototype.item=function(c){return this.nodes[Object.keys(this.nodes)[c]]||null},r.prototype.getNamedItemNS=function(c,y){throw new Error("This DOM method is not implemented.")},r.prototype.setNamedItemNS=function(c){throw new Error("This DOM method is not implemented.")},r.prototype.removeNamedItemNS=function(c,y){throw new Error("This DOM method is not implemented.")},r})()}).call(be)});var Tt=F((Ne,Oe)=>{(function(){var t,r,c,y,i,f,u,l,m,g=function(O,D){for(var p in D)N.call(D,p)&&(O[p]=D[p]);function T(){this.constructor=O}return T.prototype=D.prototype,O.prototype=new T,O.__super__=D.prototype,O},N={}.hasOwnProperty;m=tt(),l=m.isObject,u=m.isFunction,f=m.getValue,i=$(),t=k(),r=Vt(),y=wt(),Oe.exports=c=(function(O){g(D,O);function D(p,T,E){var A,M,C,d;if(D.__super__.constructor.call(this,p),T==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(T),this.type=t.Element,this.attribs={},this.schemaTypeInfo=null,E!=null&&this.attribute(E),p.type===t.Document&&(this.isRoot=!0,this.documentObject=p,p.rootObject=this,p.children)){for(d=p.children,M=0,C=d.length;M<C;M++)if(A=d[M],A.type===t.DocType){A.name=this.name;break}}}return Object.defineProperty(D.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(D.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(D.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(D.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(D.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(D.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(D.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(D.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new y(this.attribs)),this.attributeMap}}),D.prototype.clone=function(){var p,T,E,A;E=Object.create(this),E.isRoot&&(E.documentObject=null),E.attribs={},A=this.attribs;for(T in A)N.call(A,T)&&(p=A[T],E.attribs[T]=p.clone());return E.children=[],this.children.forEach(function(M){var C;return C=M.clone(),C.parent=E,E.children.push(C)}),E},D.prototype.attribute=function(p,T){var E,A;if(p!=null&&(p=f(p)),l(p))for(E in p)N.call(p,E)&&(A=p[E],this.attribute(E,A));else u(T)&&(T=T.apply()),this.options.keepNullAttributes&&T==null?this.attribs[p]=new r(this,p,""):T!=null&&(this.attribs[p]=new r(this,p,T));return this},D.prototype.removeAttribute=function(p){var T,E,A;if(p==null)throw new Error("Missing attribute name. "+this.debugInfo());if(p=f(p),Array.isArray(p))for(E=0,A=p.length;E<A;E++)T=p[E],delete this.attribs[T];else delete this.attribs[p];return this},D.prototype.toString=function(p){return this.options.writer.element(this,this.options.writer.filterOptions(p))},D.prototype.att=function(p,T){return this.attribute(p,T)},D.prototype.a=function(p,T){return this.attribute(p,T)},D.prototype.getAttribute=function(p){return this.attribs.hasOwnProperty(p)?this.attribs[p].value:null},D.prototype.setAttribute=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getAttributeNode=function(p){return this.attribs.hasOwnProperty(p)?this.attribs[p]:null},D.prototype.setAttributeNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.removeAttributeNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getElementsByTagName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getAttributeNS=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.setAttributeNS=function(p,T,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.removeAttributeNS=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getAttributeNodeNS=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.setAttributeNodeNS=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getElementsByTagNameNS=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.hasAttribute=function(p){return this.attribs.hasOwnProperty(p)},D.prototype.hasAttributeNS=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.setIdAttribute=function(p,T){return this.attribs.hasOwnProperty(p)?this.attribs[p].isId:T},D.prototype.setIdAttributeNS=function(p,T,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.setIdAttributeNode=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getElementsByTagName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getElementsByTagNameNS=function(p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.getElementsByClassName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},D.prototype.isEqualNode=function(p){var T,E,A;if(!D.__super__.isEqualNode.apply(this,arguments).isEqualNode(p)||p.namespaceURI!==this.namespaceURI||p.prefix!==this.prefix||p.localName!==this.localName||p.attribs.length!==this.attribs.length)return!1;for(T=E=0,A=this.attribs.length-1;0<=A?E<=A:E>=A;T=0<=A?++E:--E)if(!this.attribs[T].isEqualNode(p.attribs[T]))return!1;return!0},D})(i)}).call(Ne)});var dt=F((Ie,Le)=>{(function(){var t,r,c=function(i,f){for(var u in f)y.call(f,u)&&(i[u]=f[u]);function l(){this.constructor=i}return l.prototype=f.prototype,i.prototype=new l,i.__super__=f.prototype,i},y={}.hasOwnProperty;r=$(),Le.exports=t=(function(i){c(f,i);function f(u){f.__super__.constructor.call(this,u),this.value=""}return Object.defineProperty(f.prototype,"data",{get:function(){return this.value},set:function(u){return this.value=u||""}}),Object.defineProperty(f.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(f.prototype,"textContent",{get:function(){return this.value},set:function(u){return this.value=u||""}}),f.prototype.clone=function(){return Object.create(this)},f.prototype.substringData=function(u,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.appendData=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.insertData=function(u,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.deleteData=function(u,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.replaceData=function(u,l,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.isEqualNode=function(u){return!(!f.__super__.isEqualNode.apply(this,arguments).isEqualNode(u)||u.data!==this.data)},f})(r)}).call(Ie)});var Dt=F((Ce,_e)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;t=k(),c=dt(),_e.exports=r=(function(f){y(u,f);function u(l,m){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=t.CData,this.value=this.stringify.cdata(m)}return u.prototype.clone=function(){return Object.create(this)},u.prototype.toString=function(l){return this.options.writer.cdata(this,this.options.writer.filterOptions(l))},u})(c)}).call(Ce)});var bt=F((ve,Me)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;t=k(),r=dt(),Me.exports=c=(function(f){y(u,f);function u(l,m){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=t.Comment,this.value=this.stringify.comment(m)}return u.prototype.clone=function(){return Object.create(this)},u.prototype.toString=function(l){return this.options.writer.comment(this,this.options.writer.filterOptions(l))},u})(r)}).call(ve)});var Et=F((Ae,Pe)=>{(function(){var t,r,c,y,i=function(u,l){for(var m in l)f.call(l,m)&&(u[m]=l[m]);function g(){this.constructor=u}return g.prototype=l.prototype,u.prototype=new g,u.__super__=l.prototype,u},f={}.hasOwnProperty;y=tt().isObject,c=$(),t=k(),Pe.exports=r=(function(u){i(l,u);function l(m,g,N,O){var D;l.__super__.constructor.call(this,m),y(g)&&(D=g,g=D.version,N=D.encoding,O=D.standalone),g||(g="1.0"),this.type=t.Declaration,this.version=this.stringify.xmlVersion(g),N!=null&&(this.encoding=this.stringify.xmlEncoding(N)),O!=null&&(this.standalone=this.stringify.xmlStandalone(O))}return l.prototype.toString=function(m){return this.options.writer.declaration(this,this.options.writer.filterOptions(m))},l})(c)}).call(Ae)});var Nt=F((xe,Se)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;c=$(),t=k(),Se.exports=r=(function(f){y(u,f);function u(l,m,g,N,O,D){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(g==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(m));if(!N)throw new Error("Missing DTD attribute type. "+this.debugInfo(m));if(!O)throw new Error("Missing DTD attribute default. "+this.debugInfo(m));if(O.indexOf("#")!==0&&(O="#"+O),!O.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(m));if(D&&!O.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(m));this.elementName=this.stringify.name(m),this.type=t.AttributeDeclaration,this.attributeName=this.stringify.name(g),this.attributeType=this.stringify.dtdAttType(N),D&&(this.defaultValue=this.stringify.dtdAttDefault(D)),this.defaultValueType=O}return u.prototype.toString=function(l){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(l))},u})(c)}).call(xe)});var Ot=F((Fe,Xe)=>{(function(){var t,r,c,y,i=function(u,l){for(var m in l)f.call(l,m)&&(u[m]=l[m]);function g(){this.constructor=u}return g.prototype=l.prototype,u.prototype=new g,u.__super__=l.prototype,u},f={}.hasOwnProperty;y=tt().isObject,c=$(),t=k(),Xe.exports=r=(function(u){i(l,u);function l(m,g,N,O){if(l.__super__.constructor.call(this,m),N==null)throw new Error("Missing DTD entity name. "+this.debugInfo(N));if(O==null)throw new Error("Missing DTD entity value. "+this.debugInfo(N));if(this.pe=!!g,this.name=this.stringify.name(N),this.type=t.EntityDeclaration,!y(O))this.value=this.stringify.dtdEntityValue(O),this.internal=!0;else{if(!O.pubID&&!O.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(N));if(O.pubID&&!O.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(N));if(this.internal=!1,O.pubID!=null&&(this.pubID=this.stringify.dtdPubID(O.pubID)),O.sysID!=null&&(this.sysID=this.stringify.dtdSysID(O.sysID)),O.nData!=null&&(this.nData=this.stringify.dtdNData(O.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(N))}}return Object.defineProperty(l.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(l.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(l.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(l.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(l.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(l.prototype,"xmlVersion",{get:function(){return null}}),l.prototype.toString=function(m){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(m))},l})(c)}).call(Fe)});var It=F((qe,Re)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;c=$(),t=k(),Re.exports=r=(function(f){y(u,f);function u(l,m,g){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing DTD element name. "+this.debugInfo());g||(g="(#PCDATA)"),Array.isArray(g)&&(g="("+g.join(",")+")"),this.name=this.stringify.name(m),this.type=t.ElementDeclaration,this.value=this.stringify.dtdElementValue(g)}return u.prototype.toString=function(l){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(l))},u})(c)}).call(qe)});var Lt=F((je,Be)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;c=$(),t=k(),Be.exports=r=(function(f){y(u,f);function u(l,m,g){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing DTD notation name. "+this.debugInfo(m));if(!g.pubID&&!g.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(m));this.name=this.stringify.name(m),this.type=t.NotationDeclaration,g.pubID!=null&&(this.pubID=this.stringify.dtdPubID(g.pubID)),g.sysID!=null&&(this.sysID=this.stringify.dtdSysID(g.sysID))}return Object.defineProperty(u.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(u.prototype,"systemId",{get:function(){return this.sysID}}),u.prototype.toString=function(l){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(l))},u})(c)}).call(je)});var Ct=F((Ue,Ve)=>{(function(){var t,r,c,y,i,f,u,l,m,g=function(O,D){for(var p in D)N.call(D,p)&&(O[p]=D[p]);function T(){this.constructor=O}return T.prototype=D.prototype,O.prototype=new T,O.__super__=D.prototype,O},N={}.hasOwnProperty;m=tt().isObject,l=$(),t=k(),r=Nt(),y=Ot(),c=It(),i=Lt(),u=wt(),Ve.exports=f=(function(O){g(D,O);function D(p,T,E){var A,M,C,d,o,n;if(D.__super__.constructor.call(this,p),this.type=t.DocType,p.children){for(d=p.children,M=0,C=d.length;M<C;M++)if(A=d[M],A.type===t.Element){this.name=A.name;break}}this.documentObject=p,m(T)&&(o=T,T=o.pubID,E=o.sysID),E==null&&(n=[T,E],E=n[0],T=n[1]),T!=null&&(this.pubID=this.stringify.dtdPubID(T)),E!=null&&(this.sysID=this.stringify.dtdSysID(E))}return Object.defineProperty(D.prototype,"entities",{get:function(){var p,T,E,A,M;for(A={},M=this.children,T=0,E=M.length;T<E;T++)p=M[T],p.type===t.EntityDeclaration&&!p.pe&&(A[p.name]=p);return new u(A)}}),Object.defineProperty(D.prototype,"notations",{get:function(){var p,T,E,A,M;for(A={},M=this.children,T=0,E=M.length;T<E;T++)p=M[T],p.type===t.NotationDeclaration&&(A[p.name]=p);return new u(A)}}),Object.defineProperty(D.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(D.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(D.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),D.prototype.element=function(p,T){var E;return E=new c(this,p,T),this.children.push(E),this},D.prototype.attList=function(p,T,E,A,M){var C;return C=new r(this,p,T,E,A,M),this.children.push(C),this},D.prototype.entity=function(p,T){var E;return E=new y(this,!1,p,T),this.children.push(E),this},D.prototype.pEntity=function(p,T){var E;return E=new y(this,!0,p,T),this.children.push(E),this},D.prototype.notation=function(p,T){var E;return E=new i(this,p,T),this.children.push(E),this},D.prototype.toString=function(p){return this.options.writer.docType(this,this.options.writer.filterOptions(p))},D.prototype.ele=function(p,T){return this.element(p,T)},D.prototype.att=function(p,T,E,A,M){return this.attList(p,T,E,A,M)},D.prototype.ent=function(p,T){return this.entity(p,T)},D.prototype.pent=function(p,T){return this.pEntity(p,T)},D.prototype.not=function(p,T){return this.notation(p,T)},D.prototype.up=function(){return this.root()||this.documentObject},D.prototype.isEqualNode=function(p){return!(!D.__super__.isEqualNode.apply(this,arguments).isEqualNode(p)||p.name!==this.name||p.publicId!==this.publicId||p.systemId!==this.systemId)},D})(l)}).call(Ue)});var _t=F((We,ke)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;t=k(),r=$(),ke.exports=c=(function(f){y(u,f);function u(l,m){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=t.Raw,this.value=this.stringify.raw(m)}return u.prototype.clone=function(){return Object.create(this)},u.prototype.toString=function(l){return this.options.writer.raw(this,this.options.writer.filterOptions(l))},u})(r)}).call(We)});var vt=F((Ge,Ye)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;t=k(),r=dt(),Ye.exports=c=(function(f){y(u,f);function u(l,m){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=t.Text,this.value=this.stringify.text(m)}return Object.defineProperty(u.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"wholeText",{get:function(){var l,m,g;for(g="",m=this.previousSibling;m;)g=m.data+g,m=m.previousSibling;for(g+=this.data,l=this.nextSibling;l;)g=g+l.data,l=l.nextSibling;return g}}),u.prototype.clone=function(){return Object.create(this)},u.prototype.toString=function(l){return this.options.writer.text(this,this.options.writer.filterOptions(l))},u.prototype.splitText=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.replaceWholeText=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},u})(r)}).call(Ge)});var Mt=F((Ke,ze)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;t=k(),r=dt(),ze.exports=c=(function(f){y(u,f);function u(l,m,g){if(u.__super__.constructor.call(this,l),m==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=t.ProcessingInstruction,this.target=this.stringify.insTarget(m),this.name=this.target,g&&(this.value=this.stringify.insValue(g))}return u.prototype.clone=function(){return Object.create(this)},u.prototype.toString=function(l){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(l))},u.prototype.isEqualNode=function(l){return!(!u.__super__.isEqualNode.apply(this,arguments).isEqualNode(l)||l.target!==this.target)},u})(r)}).call(Ke)});var Wt=F((He,$e)=>{(function(){var t,r,c,y=function(f,u){for(var l in u)i.call(u,l)&&(f[l]=u[l]);function m(){this.constructor=f}return m.prototype=u.prototype,f.prototype=new m,f.__super__=u.prototype,f},i={}.hasOwnProperty;c=$(),t=k(),$e.exports=r=(function(f){y(u,f);function u(l){u.__super__.constructor.call(this,l),this.type=t.Dummy}return u.prototype.clone=function(){return Object.create(this)},u.prototype.toString=function(l){return""},u})(c)}).call(He)});var Je=F((Qe,Ze)=>{(function(){var t;Ze.exports=t=(function(){function r(c){this.nodes=c}return Object.defineProperty(r.prototype,"length",{get:function(){return this.nodes.length||0}}),r.prototype.clone=function(){return this.nodes=null},r.prototype.item=function(c){return this.nodes[c]||null},r})()}).call(Qe)});var rr=F((tr,er)=>{(function(){er.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(tr)});var $=F((nr,ir)=>{(function(){var t,r,c,y,i,f,u,l,m,g,N,O,D,p,T,E,A,M,C,d={}.hasOwnProperty;C=tt(),M=C.isObject,A=C.isFunction,E=C.isEmpty,T=C.getValue,l=null,c=null,y=null,i=null,f=null,D=null,p=null,O=null,u=null,r=null,N=null,m=null,t=null,ir.exports=g=(function(){function o(n){this.parent=n,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,l||(l=Tt(),c=Dt(),y=bt(),i=Et(),f=Ct(),D=_t(),p=vt(),O=Mt(),u=Wt(),r=k(),N=Je(),m=wt(),t=rr())}return Object.defineProperty(o.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(o.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(o.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(o.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(o.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new N(this.children)),this.childNodeList}}),Object.defineProperty(o.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(o.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(o.prototype,"previousSibling",{get:function(){var n;return n=this.parent.children.indexOf(this),this.parent.children[n-1]||null}}),Object.defineProperty(o.prototype,"nextSibling",{get:function(){var n;return n=this.parent.children.indexOf(this),this.parent.children[n+1]||null}}),Object.defineProperty(o.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(o.prototype,"textContent",{get:function(){var n,h,L,I,a;if(this.nodeType===r.Element||this.nodeType===r.DocumentFragment){for(a="",I=this.children,h=0,L=I.length;h<L;h++)n=I[h],n.textContent&&(a+=n.textContent);return a}else return null},set:function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),o.prototype.setParent=function(n){var h,L,I,a,w;for(this.parent=n,n&&(this.options=n.options,this.stringify=n.stringify),a=this.children,w=[],L=0,I=a.length;L<I;L++)h=a[L],w.push(h.setParent(this));return w},o.prototype.element=function(n,h,L){var I,a,w,v,P,x,X,q,S,V,R;if(x=null,h===null&&L==null&&(S=[{},null],h=S[0],L=S[1]),h==null&&(h={}),h=T(h),M(h)||(V=[h,L],L=V[0],h=V[1]),n!=null&&(n=T(n)),Array.isArray(n))for(w=0,X=n.length;w<X;w++)a=n[w],x=this.element(a);else if(A(n))x=this.element(n.apply());else if(M(n)){for(P in n)if(d.call(n,P))if(R=n[P],A(R)&&(R=R.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&P.indexOf(this.stringify.convertAttKey)===0)x=this.attribute(P.substr(this.stringify.convertAttKey.length),R);else if(!this.options.separateArrayItems&&Array.isArray(R)&&E(R))x=this.dummy();else if(M(R)&&E(R))x=this.element(P);else if(!this.options.keepNullNodes&&R==null)x=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(R))for(v=0,q=R.length;v<q;v++)a=R[v],I={},I[P]=a,x=this.element(I);else M(R)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&P.indexOf(this.stringify.convertTextKey)===0?x=this.element(R):(x=this.element(P),x.element(R)):x=this.element(P,R)}else!this.options.keepNullNodes&&L===null?x=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&n.indexOf(this.stringify.convertTextKey)===0?x=this.text(L):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&n.indexOf(this.stringify.convertCDataKey)===0?x=this.cdata(L):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&n.indexOf(this.stringify.convertCommentKey)===0?x=this.comment(L):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&n.indexOf(this.stringify.convertRawKey)===0?x=this.raw(L):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&n.indexOf(this.stringify.convertPIKey)===0?x=this.instruction(n.substr(this.stringify.convertPIKey.length),L):x=this.node(n,h,L);if(x==null)throw new Error("Could not create any elements with: "+n+". "+this.debugInfo());return x},o.prototype.insertBefore=function(n,h,L){var I,a,w,v,P;if(n?.type)return w=n,v=h,w.setParent(this),v?(a=children.indexOf(v),P=children.splice(a),children.push(w),Array.prototype.push.apply(children,P)):children.push(w),w;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(n));return a=this.parent.children.indexOf(this),P=this.parent.children.splice(a),I=this.parent.element(n,h,L),Array.prototype.push.apply(this.parent.children,P),I},o.prototype.insertAfter=function(n,h,L){var I,a,w;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(n));return a=this.parent.children.indexOf(this),w=this.parent.children.splice(a+1),I=this.parent.element(n,h,L),Array.prototype.push.apply(this.parent.children,w),I},o.prototype.remove=function(){var n,h;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return n=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[n,n-n+1].concat(h=[])),this.parent},o.prototype.node=function(n,h,L){var I,a;return n!=null&&(n=T(n)),h||(h={}),h=T(h),M(h)||(a=[h,L],L=a[0],h=a[1]),I=new l(this,n,h),L!=null&&I.text(L),this.children.push(I),I},o.prototype.text=function(n){var h;return M(n)&&this.element(n),h=new p(this,n),this.children.push(h),this},o.prototype.cdata=function(n){var h;return h=new c(this,n),this.children.push(h),this},o.prototype.comment=function(n){var h;return h=new y(this,n),this.children.push(h),this},o.prototype.commentBefore=function(n){var h,L,I;return L=this.parent.children.indexOf(this),I=this.parent.children.splice(L),h=this.parent.comment(n),Array.prototype.push.apply(this.parent.children,I),this},o.prototype.commentAfter=function(n){var h,L,I;return L=this.parent.children.indexOf(this),I=this.parent.children.splice(L+1),h=this.parent.comment(n),Array.prototype.push.apply(this.parent.children,I),this},o.prototype.raw=function(n){var h;return h=new D(this,n),this.children.push(h),this},o.prototype.dummy=function(){var n;return n=new u(this),n},o.prototype.instruction=function(n,h){var L,I,a,w,v;if(n!=null&&(n=T(n)),h!=null&&(h=T(h)),Array.isArray(n))for(w=0,v=n.length;w<v;w++)L=n[w],this.instruction(L);else if(M(n))for(L in n)d.call(n,L)&&(I=n[L],this.instruction(L,I));else A(h)&&(h=h.apply()),a=new O(this,n,h),this.children.push(a);return this},o.prototype.instructionBefore=function(n,h){var L,I,a;return I=this.parent.children.indexOf(this),a=this.parent.children.splice(I),L=this.parent.instruction(n,h),Array.prototype.push.apply(this.parent.children,a),this},o.prototype.instructionAfter=function(n,h){var L,I,a;return I=this.parent.children.indexOf(this),a=this.parent.children.splice(I+1),L=this.parent.instruction(n,h),Array.prototype.push.apply(this.parent.children,a),this},o.prototype.declaration=function(n,h,L){var I,a;return I=this.document(),a=new i(I,n,h,L),I.children.length===0?I.children.unshift(a):I.children[0].type===r.Declaration?I.children[0]=a:I.children.unshift(a),I.root()||I},o.prototype.dtd=function(n,h){var L,I,a,w,v,P,x,X,q,S;for(I=this.document(),a=new f(I,n,h),q=I.children,w=v=0,x=q.length;v<x;w=++v)if(L=q[w],L.type===r.DocType)return I.children[w]=a,a;for(S=I.children,w=P=0,X=S.length;P<X;w=++P)if(L=S[w],L.isRoot)return I.children.splice(w,0,a),a;return I.children.push(a),a},o.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},o.prototype.root=function(){var n;for(n=this;n;){if(n.type===r.Document)return n.rootObject;if(n.isRoot)return n;n=n.parent}},o.prototype.document=function(){var n;for(n=this;n;){if(n.type===r.Document)return n;n=n.parent}},o.prototype.end=function(n){return this.document().end(n)},o.prototype.prev=function(){var n;if(n=this.parent.children.indexOf(this),n<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[n-1]},o.prototype.next=function(){var n;if(n=this.parent.children.indexOf(this),n===-1||n===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[n+1]},o.prototype.importDocument=function(n){var h;return h=n.root().clone(),h.parent=this,h.isRoot=!1,this.children.push(h),this},o.prototype.debugInfo=function(n){var h,L;return n=n||this.name,n==null&&!((h=this.parent)!=null&&h.name)?"":n==null?"parent: <"+this.parent.name+">":(L=this.parent)!=null&&L.name?"node: <"+n+">, parent: <"+this.parent.name+">":"node: <"+n+">"},o.prototype.ele=function(n,h,L){return this.element(n,h,L)},o.prototype.nod=function(n,h,L){return this.node(n,h,L)},o.prototype.txt=function(n){return this.text(n)},o.prototype.dat=function(n){return this.cdata(n)},o.prototype.com=function(n){return this.comment(n)},o.prototype.ins=function(n,h){return this.instruction(n,h)},o.prototype.doc=function(){return this.document()},o.prototype.dec=function(n,h,L){return this.declaration(n,h,L)},o.prototype.e=function(n,h,L){return this.element(n,h,L)},o.prototype.n=function(n,h,L){return this.node(n,h,L)},o.prototype.t=function(n){return this.text(n)},o.prototype.d=function(n){return this.cdata(n)},o.prototype.c=function(n){return this.comment(n)},o.prototype.r=function(n){return this.raw(n)},o.prototype.i=function(n,h){return this.instruction(n,h)},o.prototype.u=function(){return this.up()},o.prototype.importXMLBuilder=function(n){return this.importDocument(n)},o.prototype.replaceChild=function(n,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.removeChild=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.appendChild=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.hasChildNodes=function(){return this.children.length!==0},o.prototype.cloneNode=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isSupported=function(n,h){return!0},o.prototype.hasAttributes=function(){return this.attribs.length!==0},o.prototype.compareDocumentPosition=function(n){var h,L;return h=this,h===n?0:this.document()!==n.document()?(L=t.Disconnected|t.ImplementationSpecific,Math.random()<.5?L|=t.Preceding:L|=t.Following,L):h.isAncestor(n)?t.Contains|t.Preceding:h.isDescendant(n)?t.Contains|t.Following:h.isPreceding(n)?t.Preceding:t.Following},o.prototype.isSameNode=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.lookupPrefix=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isDefaultNamespace=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.lookupNamespaceURI=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isEqualNode=function(n){var h,L,I;if(n.nodeType!==this.nodeType||n.children.length!==this.children.length)return!1;for(h=L=0,I=this.children.length-1;0<=I?L<=I:L>=I;h=0<=I?++L:--L)if(!this.children[h].isEqualNode(n.children[h]))return!1;return!0},o.prototype.getFeature=function(n,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.setUserData=function(n,h,L){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getUserData=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.contains=function(n){return n?n===this||this.isDescendant(n):!1},o.prototype.isDescendant=function(n){var h,L,I,a,w;for(w=this.children,I=0,a=w.length;I<a;I++)if(h=w[I],n===h||(L=h.isDescendant(n),L))return!0;return!1},o.prototype.isAncestor=function(n){return n.isDescendant(this)},o.prototype.isPreceding=function(n){var h,L;return h=this.treePosition(n),L=this.treePosition(this),h===-1||L===-1?!1:h<L},o.prototype.isFollowing=function(n){var h,L;return h=this.treePosition(n),L=this.treePosition(this),h===-1||L===-1?!1:h>L},o.prototype.treePosition=function(n){var h,L;return L=0,h=!1,this.foreachTreeNode(this.document(),function(I){if(L++,!h&&I===n)return h=!0}),h?L:-1},o.prototype.foreachTreeNode=function(n,h){var L,I,a,w,v;for(n||(n=this.document()),w=n.children,I=0,a=w.length;I<a;I++){if(L=w[I],v=h(L))return v;if(v=this.foreachTreeNode(L,h),v)return v}},o})()}).call(nr)});var kt=F((or,sr)=>{(function(){var t,r=function(y,i){return function(){return y.apply(i,arguments)}},c={}.hasOwnProperty;sr.exports=t=(function(){function y(i){this.assertLegalName=r(this.assertLegalName,this),this.assertLegalChar=r(this.assertLegalChar,this);var f,u,l;i||(i={}),this.options=i,this.options.version||(this.options.version="1.0"),u=i.stringify||{};for(f in u)c.call(u,f)&&(l=u[f],this[f]=l)}return y.prototype.name=function(i){return this.options.noValidation?i:this.assertLegalName(""+i||"")},y.prototype.text=function(i){return this.options.noValidation?i:this.assertLegalChar(this.textEscape(""+i||""))},y.prototype.cdata=function(i){return this.options.noValidation?i:(i=""+i||"",i=i.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(i))},y.prototype.comment=function(i){if(this.options.noValidation)return i;if(i=""+i||"",i.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+i);return this.assertLegalChar(i)},y.prototype.raw=function(i){return this.options.noValidation?i:""+i||""},y.prototype.attValue=function(i){return this.options.noValidation?i:this.assertLegalChar(this.attEscape(i=""+i||""))},y.prototype.insTarget=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.insValue=function(i){if(this.options.noValidation)return i;if(i=""+i||"",i.match(/\?>/))throw new Error("Invalid processing instruction value: "+i);return this.assertLegalChar(i)},y.prototype.xmlVersion=function(i){if(this.options.noValidation)return i;if(i=""+i||"",!i.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+i);return i},y.prototype.xmlEncoding=function(i){if(this.options.noValidation)return i;if(i=""+i||"",!i.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+i);return this.assertLegalChar(i)},y.prototype.xmlStandalone=function(i){return this.options.noValidation?i:i?"yes":"no"},y.prototype.dtdPubID=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.dtdSysID=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.dtdElementValue=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.dtdAttType=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.dtdAttDefault=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.dtdEntityValue=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.dtdNData=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},y.prototype.convertAttKey="@",y.prototype.convertPIKey="?",y.prototype.convertTextKey="#text",y.prototype.convertCDataKey="#cdata",y.prototype.convertCommentKey="#comment",y.prototype.convertRawKey="#raw",y.prototype.assertLegalChar=function(i){var f,u;if(this.options.noValidation)return i;if(f="",this.options.version==="1.0"){if(f=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,u=i.match(f))throw new Error("Invalid character in string: "+i+" at index "+u.index)}else if(this.options.version==="1.1"&&(f=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,u=i.match(f)))throw new Error("Invalid character in string: "+i+" at index "+u.index);return i},y.prototype.assertLegalName=function(i){var f;if(this.options.noValidation)return i;if(this.assertLegalChar(i),f=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!i.match(f))throw new Error("Invalid character in name");return i},y.prototype.textEscape=function(i){var f;return this.options.noValidation?i:(f=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,i.replace(f,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},y.prototype.attEscape=function(i){var f;return this.options.noValidation?i:(f=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,i.replace(f,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},y})()}).call(or)});var mt=F((ur,ar)=>{(function(){ar.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(ur)});var Gt=F((cr,lr)=>{(function(){var t,r,c,y,i,f,u,l,m,g,N,O,D,p,T,E,A,M={}.hasOwnProperty;A=tt().assign,t=k(),m=Et(),g=Ct(),c=Dt(),y=bt(),O=Tt(),p=_t(),T=vt(),D=Mt(),N=Wt(),i=Nt(),f=It(),u=Ot(),l=Lt(),r=mt(),lr.exports=E=(function(){function C(d){var o,n,h;d||(d={}),this.options=d,n=d.writer||{};for(o in n)M.call(n,o)&&(h=n[o],this["_"+o]=this[o],this[o]=h)}return C.prototype.filterOptions=function(d){var o,n,h,L,I,a,w,v;return d||(d={}),d=A({},this.options,d),o={writer:this},o.pretty=d.pretty||!1,o.allowEmpty=d.allowEmpty||!1,o.indent=(n=d.indent)!=null?n:" ",o.newline=(h=d.newline)!=null?h:`
|
|
3
|
+
`,o.offset=(L=d.offset)!=null?L:0,o.dontPrettyTextNodes=(I=(a=d.dontPrettyTextNodes)!=null?a:d.dontprettytextnodes)!=null?I:0,o.spaceBeforeSlash=(w=(v=d.spaceBeforeSlash)!=null?v:d.spacebeforeslash)!=null?w:"",o.spaceBeforeSlash===!0&&(o.spaceBeforeSlash=" "),o.suppressPrettyCount=0,o.user={},o.state=r.None,o},C.prototype.indent=function(d,o,n){var h;return!o.pretty||o.suppressPrettyCount?"":o.pretty&&(h=(n||0)+o.offset+1,h>0)?new Array(h).join(o.indent):""},C.prototype.endline=function(d,o,n){return!o.pretty||o.suppressPrettyCount?"":o.newline},C.prototype.attribute=function(d,o,n){var h;return this.openAttribute(d,o,n),h=" "+d.name+'="'+d.value+'"',this.closeAttribute(d,o,n),h},C.prototype.cdata=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<![CDATA[",o.state=r.InsideTag,h+=d.value,o.state=r.CloseTag,h+="]]>"+this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},C.prototype.comment=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<!-- ",o.state=r.InsideTag,h+=d.value,o.state=r.CloseTag,h+=" -->"+this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},C.prototype.declaration=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<?xml",o.state=r.InsideTag,h+=' version="'+d.version+'"',d.encoding!=null&&(h+=' encoding="'+d.encoding+'"'),d.standalone!=null&&(h+=' standalone="'+d.standalone+'"'),o.state=r.CloseTag,h+=o.spaceBeforeSlash+"?>",h+=this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},C.prototype.docType=function(d,o,n){var h,L,I,a,w;if(n||(n=0),this.openNode(d,o,n),o.state=r.OpenTag,a=this.indent(d,o,n),a+="<!DOCTYPE "+d.root().name,d.pubID&&d.sysID?a+=' PUBLIC "'+d.pubID+'" "'+d.sysID+'"':d.sysID&&(a+=' SYSTEM "'+d.sysID+'"'),d.children.length>0){for(a+=" [",a+=this.endline(d,o,n),o.state=r.InsideTag,w=d.children,L=0,I=w.length;L<I;L++)h=w[L],a+=this.writeChildNode(h,o,n+1);o.state=r.CloseTag,a+="]"}return o.state=r.CloseTag,a+=o.spaceBeforeSlash+">",a+=this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),a},C.prototype.element=function(d,o,n){var h,L,I,a,w,v,P,x,X,q,S,V,R,J;n||(n=0),q=!1,S="",this.openNode(d,o,n),o.state=r.OpenTag,S+=this.indent(d,o,n)+"<"+d.name,V=d.attribs;for(X in V)M.call(V,X)&&(h=V[X],S+=this.attribute(h,o,n));if(I=d.children.length,a=I===0?null:d.children[0],I===0||d.children.every(function(ht){return(ht.type===t.Text||ht.type===t.Raw)&&ht.value===""}))o.allowEmpty?(S+=">",o.state=r.CloseTag,S+="</"+d.name+">"+this.endline(d,o,n)):(o.state=r.CloseTag,S+=o.spaceBeforeSlash+"/>"+this.endline(d,o,n));else if(o.pretty&&I===1&&(a.type===t.Text||a.type===t.Raw)&&a.value!=null)S+=">",o.state=r.InsideTag,o.suppressPrettyCount++,q=!0,S+=this.writeChildNode(a,o,n+1),o.suppressPrettyCount--,q=!1,o.state=r.CloseTag,S+="</"+d.name+">"+this.endline(d,o,n);else{if(o.dontPrettyTextNodes){for(R=d.children,w=0,P=R.length;w<P;w++)if(L=R[w],(L.type===t.Text||L.type===t.Raw)&&L.value!=null){o.suppressPrettyCount++,q=!0;break}}for(S+=">"+this.endline(d,o,n),o.state=r.InsideTag,J=d.children,v=0,x=J.length;v<x;v++)L=J[v],S+=this.writeChildNode(L,o,n+1);o.state=r.CloseTag,S+=this.indent(d,o,n)+"</"+d.name+">",q&&o.suppressPrettyCount--,S+=this.endline(d,o,n),o.state=r.None}return this.closeNode(d,o,n),S},C.prototype.writeChildNode=function(d,o,n){switch(d.type){case t.CData:return this.cdata(d,o,n);case t.Comment:return this.comment(d,o,n);case t.Element:return this.element(d,o,n);case t.Raw:return this.raw(d,o,n);case t.Text:return this.text(d,o,n);case t.ProcessingInstruction:return this.processingInstruction(d,o,n);case t.Dummy:return"";case t.Declaration:return this.declaration(d,o,n);case t.DocType:return this.docType(d,o,n);case t.AttributeDeclaration:return this.dtdAttList(d,o,n);case t.ElementDeclaration:return this.dtdElement(d,o,n);case t.EntityDeclaration:return this.dtdEntity(d,o,n);case t.NotationDeclaration:return this.dtdNotation(d,o,n);default:throw new Error("Unknown XML node type: "+d.constructor.name)}},C.prototype.processingInstruction=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<?",o.state=r.InsideTag,h+=d.target,d.value&&(h+=" "+d.value),o.state=r.CloseTag,h+=o.spaceBeforeSlash+"?>",h+=this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},C.prototype.raw=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n),o.state=r.InsideTag,h+=d.value,o.state=r.CloseTag,h+=this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},C.prototype.text=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n),o.state=r.InsideTag,h+=d.value,o.state=r.CloseTag,h+=this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},C.prototype.dtdAttList=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<!ATTLIST",o.state=r.InsideTag,h+=" "+d.elementName+" "+d.attributeName+" "+d.attributeType,d.defaultValueType!=="#DEFAULT"&&(h+=" "+d.defaultValueType),d.defaultValue&&(h+=' "'+d.defaultValue+'"'),o.state=r.CloseTag,h+=o.spaceBeforeSlash+">"+this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},C.prototype.dtdElement=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<!ELEMENT",o.state=r.InsideTag,h+=" "+d.name+" "+d.value,o.state=r.CloseTag,h+=o.spaceBeforeSlash+">"+this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},C.prototype.dtdEntity=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<!ENTITY",o.state=r.InsideTag,d.pe&&(h+=" %"),h+=" "+d.name,d.value?h+=' "'+d.value+'"':(d.pubID&&d.sysID?h+=' PUBLIC "'+d.pubID+'" "'+d.sysID+'"':d.sysID&&(h+=' SYSTEM "'+d.sysID+'"'),d.nData&&(h+=" NDATA "+d.nData)),o.state=r.CloseTag,h+=o.spaceBeforeSlash+">"+this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},C.prototype.dtdNotation=function(d,o,n){var h;return this.openNode(d,o,n),o.state=r.OpenTag,h=this.indent(d,o,n)+"<!NOTATION",o.state=r.InsideTag,h+=" "+d.name,d.pubID&&d.sysID?h+=' PUBLIC "'+d.pubID+'" "'+d.sysID+'"':d.pubID?h+=' PUBLIC "'+d.pubID+'"':d.sysID&&(h+=' SYSTEM "'+d.sysID+'"'),o.state=r.CloseTag,h+=o.spaceBeforeSlash+">"+this.endline(d,o,n),o.state=r.None,this.closeNode(d,o,n),h},C.prototype.openNode=function(d,o,n){},C.prototype.closeNode=function(d,o,n){},C.prototype.openAttribute=function(d,o,n){},C.prototype.closeAttribute=function(d,o,n){},C})()}).call(cr)});var At=F((fr,hr)=>{(function(){var t,r,c=function(i,f){for(var u in f)y.call(f,u)&&(i[u]=f[u]);function l(){this.constructor=i}return l.prototype=f.prototype,i.prototype=new l,i.__super__=f.prototype,i},y={}.hasOwnProperty;r=Gt(),hr.exports=t=(function(i){c(f,i);function f(u){f.__super__.constructor.call(this,u)}return f.prototype.document=function(u,l){var m,g,N,O,D;for(l=this.filterOptions(l),O="",D=u.children,g=0,N=D.length;g<N;g++)m=D[g],O+=this.writeChildNode(m,l,0);return l.pretty&&O.slice(-l.newline.length)===l.newline&&(O=O.slice(0,-l.newline.length)),O},f})(r)}).call(fr)});var Yt=F((pr,dr)=>{(function(){var t,r,c,y,i,f,u,l,m=function(N,O){for(var D in O)g.call(O,D)&&(N[D]=O[D]);function p(){this.constructor=N}return p.prototype=O.prototype,N.prototype=new p,N.__super__=O.prototype,N},g={}.hasOwnProperty;l=tt().isPlainObject,c=Ut(),r=ye(),i=$(),t=k(),u=kt(),f=At(),dr.exports=y=(function(N){m(O,N);function O(D){O.__super__.constructor.call(this,null),this.name="#document",this.type=t.Document,this.documentURI=null,this.domConfig=new r,D||(D={}),D.writer||(D.writer=new f),this.options=D,this.stringify=new u(D)}return Object.defineProperty(O.prototype,"implementation",{value:new c}),Object.defineProperty(O.prototype,"doctype",{get:function(){var D,p,T,E;for(E=this.children,p=0,T=E.length;p<T;p++)if(D=E[p],D.type===t.DocType)return D;return null}}),Object.defineProperty(O.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(O.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(O.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(O.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===t.Declaration?this.children[0].encoding:null}}),Object.defineProperty(O.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===t.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(O.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===t.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(O.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(O.prototype,"origin",{get:function(){return null}}),Object.defineProperty(O.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(O.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(O.prototype,"contentType",{get:function(){return null}}),O.prototype.end=function(D){var p;return p={},D?l(D)&&(p=D,D=this.options.writer):D=this.options.writer,D.document(this,D.filterOptions(p))},O.prototype.toString=function(D){return this.options.writer.document(this,this.options.writer.filterOptions(D))},O.prototype.createElement=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createTextNode=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createComment=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createCDATASection=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createProcessingInstruction=function(D,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createAttribute=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createEntityReference=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.getElementsByTagName=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.importNode=function(D,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createElementNS=function(D,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createAttributeNS=function(D,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.getElementsByTagNameNS=function(D,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.getElementById=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.adoptNode=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.renameNode=function(D,p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.getElementsByClassName=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createEvent=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createNodeIterator=function(D,p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},O.prototype.createTreeWalker=function(D,p,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},O})(i)}).call(pr)});var gr=F((mr,yr)=>{(function(){var t,r,c,y,i,f,u,l,m,g,N,O,D,p,T,E,A,M,C,d,o,n,h,L,I={}.hasOwnProperty;L=tt(),n=L.isObject,o=L.isFunction,h=L.isPlainObject,d=L.getValue,t=k(),O=Yt(),p=Tt(),y=Dt(),i=bt(),E=_t(),C=vt(),T=Mt(),g=Et(),N=Ct(),f=Nt(),l=Ot(),u=It(),m=Lt(),c=Vt(),M=kt(),A=At(),r=mt(),yr.exports=D=(function(){function a(w,v,P){var x;this.name="?xml",this.type=t.Document,w||(w={}),x={},w.writer?h(w.writer)&&(x=w.writer,w.writer=new A):w.writer=new A,this.options=w,this.writer=w.writer,this.writerOptions=this.writer.filterOptions(x),this.stringify=new M(w),this.onDataCallback=v||function(){},this.onEndCallback=P||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return a.prototype.createChildNode=function(w){var v,P,x,X,q,S,V,R;switch(w.type){case t.CData:this.cdata(w.value);break;case t.Comment:this.comment(w.value);break;case t.Element:x={},V=w.attribs;for(P in V)I.call(V,P)&&(v=V[P],x[P]=v.value);this.node(w.name,x);break;case t.Dummy:this.dummy();break;case t.Raw:this.raw(w.value);break;case t.Text:this.text(w.value);break;case t.ProcessingInstruction:this.instruction(w.target,w.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+w.constructor.name)}for(R=w.children,q=0,S=R.length;q<S;q++)X=R[q],this.createChildNode(X),X.type===t.Element&&this.up();return this},a.prototype.dummy=function(){return this},a.prototype.node=function(w,v,P){var x;if(w==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(w));return this.openCurrent(),w=d(w),v==null&&(v={}),v=d(v),n(v)||(x=[v,P],P=x[0],v=x[1]),this.currentNode=new p(this,w,v),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,P!=null&&this.text(P),this},a.prototype.element=function(w,v,P){var x,X,q,S,V,R;if(this.currentNode&&this.currentNode.type===t.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(w)||n(w)||o(w))for(S=this.options.noValidation,this.options.noValidation=!0,R=new O(this.options).element("TEMP_ROOT"),R.element(w),this.options.noValidation=S,V=R.children,X=0,q=V.length;X<q;X++)x=V[X],this.createChildNode(x),x.type===t.Element&&this.up();else this.node(w,v,P);return this},a.prototype.attribute=function(w,v){var P,x;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(w));if(w!=null&&(w=d(w)),n(w))for(P in w)I.call(w,P)&&(x=w[P],this.attribute(P,x));else o(v)&&(v=v.apply()),this.options.keepNullAttributes&&v==null?this.currentNode.attribs[w]=new c(this,w,""):v!=null&&(this.currentNode.attribs[w]=new c(this,w,v));return this},a.prototype.text=function(w){var v;return this.openCurrent(),v=new C(this,w),this.onData(this.writer.text(v,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.cdata=function(w){var v;return this.openCurrent(),v=new y(this,w),this.onData(this.writer.cdata(v,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.comment=function(w){var v;return this.openCurrent(),v=new i(this,w),this.onData(this.writer.comment(v,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.raw=function(w){var v;return this.openCurrent(),v=new E(this,w),this.onData(this.writer.raw(v,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.instruction=function(w,v){var P,x,X,q,S;if(this.openCurrent(),w!=null&&(w=d(w)),v!=null&&(v=d(v)),Array.isArray(w))for(P=0,q=w.length;P<q;P++)x=w[P],this.instruction(x);else if(n(w))for(x in w)I.call(w,x)&&(X=w[x],this.instruction(x,X));else o(v)&&(v=v.apply()),S=new T(this,w,v),this.onData(this.writer.processingInstruction(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},a.prototype.declaration=function(w,v,P){var x;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return x=new g(this,w,v,P),this.onData(this.writer.declaration(x,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.doctype=function(w,v,P){if(this.openCurrent(),w==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new N(this,v,P),this.currentNode.rootNodeName=w,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},a.prototype.dtdElement=function(w,v){var P;return this.openCurrent(),P=new u(this,w,v),this.onData(this.writer.dtdElement(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.attList=function(w,v,P,x,X){var q;return this.openCurrent(),q=new f(this,w,v,P,x,X),this.onData(this.writer.dtdAttList(q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.entity=function(w,v){var P;return this.openCurrent(),P=new l(this,!1,w,v),this.onData(this.writer.dtdEntity(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.pEntity=function(w,v){var P;return this.openCurrent(),P=new l(this,!0,w,v),this.onData(this.writer.dtdEntity(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.notation=function(w,v){var P;return this.openCurrent(),P=new m(this,w,v),this.onData(this.writer.dtdNotation(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},a.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},a.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},a.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},a.prototype.openNode=function(w){var v,P,x,X;if(!w.isOpen){if(!this.root&&this.currentLevel===0&&w.type===t.Element&&(this.root=w),P="",w.type===t.Element){this.writerOptions.state=r.OpenTag,P=this.writer.indent(w,this.writerOptions,this.currentLevel)+"<"+w.name,X=w.attribs;for(x in X)I.call(X,x)&&(v=X[x],P+=this.writer.attribute(v,this.writerOptions,this.currentLevel));P+=(w.children?">":"/>")+this.writer.endline(w,this.writerOptions,this.currentLevel),this.writerOptions.state=r.InsideTag}else this.writerOptions.state=r.OpenTag,P=this.writer.indent(w,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+w.rootNodeName,w.pubID&&w.sysID?P+=' PUBLIC "'+w.pubID+'" "'+w.sysID+'"':w.sysID&&(P+=' SYSTEM "'+w.sysID+'"'),w.children?(P+=" [",this.writerOptions.state=r.InsideTag):(this.writerOptions.state=r.CloseTag,P+=">"),P+=this.writer.endline(w,this.writerOptions,this.currentLevel);return this.onData(P,this.currentLevel),w.isOpen=!0}},a.prototype.closeNode=function(w){var v;if(!w.isClosed)return v="",this.writerOptions.state=r.CloseTag,w.type===t.Element?v=this.writer.indent(w,this.writerOptions,this.currentLevel)+"</"+w.name+">"+this.writer.endline(w,this.writerOptions,this.currentLevel):v=this.writer.indent(w,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(w,this.writerOptions,this.currentLevel),this.writerOptions.state=r.None,this.onData(v,this.currentLevel),w.isClosed=!0},a.prototype.onData=function(w,v){return this.documentStarted=!0,this.onDataCallback(w,v+1)},a.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},a.prototype.debugInfo=function(w){return w==null?"":"node: <"+w+">"},a.prototype.ele=function(){return this.element.apply(this,arguments)},a.prototype.nod=function(w,v,P){return this.node(w,v,P)},a.prototype.txt=function(w){return this.text(w)},a.prototype.dat=function(w){return this.cdata(w)},a.prototype.com=function(w){return this.comment(w)},a.prototype.ins=function(w,v){return this.instruction(w,v)},a.prototype.dec=function(w,v,P){return this.declaration(w,v,P)},a.prototype.dtd=function(w,v,P){return this.doctype(w,v,P)},a.prototype.e=function(w,v,P){return this.element(w,v,P)},a.prototype.n=function(w,v,P){return this.node(w,v,P)},a.prototype.t=function(w){return this.text(w)},a.prototype.d=function(w){return this.cdata(w)},a.prototype.c=function(w){return this.comment(w)},a.prototype.r=function(w){return this.raw(w)},a.prototype.i=function(w,v){return this.instruction(w,v)},a.prototype.att=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},a.prototype.a=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},a.prototype.ent=function(w,v){return this.entity(w,v)},a.prototype.pent=function(w,v){return this.pEntity(w,v)},a.prototype.not=function(w,v){return this.notation(w,v)},a})()}).call(mr)});var Dr=F((wr,Tr)=>{(function(){var t,r,c,y,i=function(u,l){for(var m in l)f.call(l,m)&&(u[m]=l[m]);function g(){this.constructor=u}return g.prototype=l.prototype,u.prototype=new g,u.__super__=l.prototype,u},f={}.hasOwnProperty;t=k(),y=Gt(),r=mt(),Tr.exports=c=(function(u){i(l,u);function l(m,g){this.stream=m,l.__super__.constructor.call(this,g)}return l.prototype.endline=function(m,g,N){return m.isLastRootNode&&g.state===r.CloseTag?"":l.__super__.endline.call(this,m,g,N)},l.prototype.document=function(m,g){var N,O,D,p,T,E,A,M,C;for(A=m.children,O=D=0,T=A.length;D<T;O=++D)N=A[O],N.isLastRootNode=O===m.children.length-1;for(g=this.filterOptions(g),M=m.children,C=[],p=0,E=M.length;p<E;p++)N=M[p],C.push(this.writeChildNode(N,g,0));return C},l.prototype.attribute=function(m,g,N){return this.stream.write(l.__super__.attribute.call(this,m,g,N))},l.prototype.cdata=function(m,g,N){return this.stream.write(l.__super__.cdata.call(this,m,g,N))},l.prototype.comment=function(m,g,N){return this.stream.write(l.__super__.comment.call(this,m,g,N))},l.prototype.declaration=function(m,g,N){return this.stream.write(l.__super__.declaration.call(this,m,g,N))},l.prototype.docType=function(m,g,N){var O,D,p,T;if(N||(N=0),this.openNode(m,g,N),g.state=r.OpenTag,this.stream.write(this.indent(m,g,N)),this.stream.write("<!DOCTYPE "+m.root().name),m.pubID&&m.sysID?this.stream.write(' PUBLIC "'+m.pubID+'" "'+m.sysID+'"'):m.sysID&&this.stream.write(' SYSTEM "'+m.sysID+'"'),m.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(m,g,N)),g.state=r.InsideTag,T=m.children,D=0,p=T.length;D<p;D++)O=T[D],this.writeChildNode(O,g,N+1);g.state=r.CloseTag,this.stream.write("]")}return g.state=r.CloseTag,this.stream.write(g.spaceBeforeSlash+">"),this.stream.write(this.endline(m,g,N)),g.state=r.None,this.closeNode(m,g,N)},l.prototype.element=function(m,g,N){var O,D,p,T,E,A,M,C,d,o;N||(N=0),this.openNode(m,g,N),g.state=r.OpenTag,this.stream.write(this.indent(m,g,N)+"<"+m.name),d=m.attribs;for(M in d)f.call(d,M)&&(O=d[M],this.attribute(O,g,N));if(p=m.children.length,T=p===0?null:m.children[0],p===0||m.children.every(function(n){return(n.type===t.Text||n.type===t.Raw)&&n.value===""}))g.allowEmpty?(this.stream.write(">"),g.state=r.CloseTag,this.stream.write("</"+m.name+">")):(g.state=r.CloseTag,this.stream.write(g.spaceBeforeSlash+"/>"));else if(g.pretty&&p===1&&(T.type===t.Text||T.type===t.Raw)&&T.value!=null)this.stream.write(">"),g.state=r.InsideTag,g.suppressPrettyCount++,C=!0,this.writeChildNode(T,g,N+1),g.suppressPrettyCount--,C=!1,g.state=r.CloseTag,this.stream.write("</"+m.name+">");else{for(this.stream.write(">"+this.endline(m,g,N)),g.state=r.InsideTag,o=m.children,E=0,A=o.length;E<A;E++)D=o[E],this.writeChildNode(D,g,N+1);g.state=r.CloseTag,this.stream.write(this.indent(m,g,N)+"</"+m.name+">")}return this.stream.write(this.endline(m,g,N)),g.state=r.None,this.closeNode(m,g,N)},l.prototype.processingInstruction=function(m,g,N){return this.stream.write(l.__super__.processingInstruction.call(this,m,g,N))},l.prototype.raw=function(m,g,N){return this.stream.write(l.__super__.raw.call(this,m,g,N))},l.prototype.text=function(m,g,N){return this.stream.write(l.__super__.text.call(this,m,g,N))},l.prototype.dtdAttList=function(m,g,N){return this.stream.write(l.__super__.dtdAttList.call(this,m,g,N))},l.prototype.dtdElement=function(m,g,N){return this.stream.write(l.__super__.dtdElement.call(this,m,g,N))},l.prototype.dtdEntity=function(m,g,N){return this.stream.write(l.__super__.dtdEntity.call(this,m,g,N))},l.prototype.dtdNotation=function(m,g,N){return this.stream.write(l.__super__.dtdNotation.call(this,m,g,N))},l})(y)}).call(wr)});var Er=F((br,ut)=>{(function(){var t,r,c,y,i,f,u,l,m,g;g=tt(),l=g.assign,m=g.isFunction,c=Ut(),y=Yt(),i=gr(),u=At(),f=Dr(),t=k(),r=mt(),ut.exports.create=function(N,O,D,p){var T,E;if(N==null)throw new Error("Root element needs a name.");return p=l({},O,D,p),T=new y(p),E=T.element(N),p.headless||(T.declaration(p),(p.pubID!=null||p.sysID!=null)&&T.dtd(p)),E},ut.exports.begin=function(N,O,D){var p;return m(N)&&(p=[N,O],O=p[0],D=p[1],N={}),O?new i(N,O,D):new y(N)},ut.exports.stringWriter=function(N){return new u(N)},ut.exports.streamWriter=function(N,O){return new f(N,O)},ut.exports.implementation=new c,ut.exports.nodeType=t,ut.exports.writerState=r}).call(br)});var Nr=F(Kt=>{(function(){"use strict";var t,r,c,y,i,f={}.hasOwnProperty;t=Er(),r=gt().defaults,y=function(u){return typeof u=="string"&&(u.indexOf("&")>=0||u.indexOf(">")>=0||u.indexOf("<")>=0)},i=function(u){return"<![CDATA["+c(u)+"]]>"},c=function(u){return u.replace("]]>","]]]]><![CDATA[>")},Kt.Builder=(function(){function u(l){var m,g,N;this.options={},g=r["0.2"];for(m in g)f.call(g,m)&&(N=g[m],this.options[m]=N);for(m in l)f.call(l,m)&&(N=l[m],this.options[m]=N)}return u.prototype.buildObject=function(l){var m,g,N,O,D;return m=this.options.attrkey,g=this.options.charkey,Object.keys(l).length===1&&this.options.rootName===r["0.2"].rootName?(D=Object.keys(l)[0],l=l[D]):D=this.options.rootName,N=(function(p){return function(T,E){var A,M,C,d,o,n;if(typeof E!="object")p.options.cdata&&y(E)?T.raw(i(E)):T.txt(E);else if(Array.isArray(E)){for(d in E)if(f.call(E,d)){M=E[d];for(o in M)C=M[o],T=N(T.ele(o),C).up()}}else for(o in E)if(f.call(E,o))if(M=E[o],o===m){if(typeof M=="object")for(A in M)n=M[A],T=T.att(A,n)}else if(o===g)p.options.cdata&&y(M)?T=T.raw(i(M)):T=T.txt(M);else if(Array.isArray(M))for(d in M)f.call(M,d)&&(C=M[d],typeof C=="string"?p.options.cdata&&y(C)?T=T.ele(o).raw(i(C)).up():T=T.ele(o,C).up():T=N(T.ele(o),C).up());else typeof M=="object"?T=N(T.ele(o),M).up():typeof M=="string"&&p.options.cdata&&y(M)?T=T.ele(o).raw(i(M)).up():(M==null&&(M=""),T=T.ele(o,M.toString()).up());return T}})(this),O=t.create(D,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),N(O,l).end(this.options.renderOpts)},u})()}).call(Kt)});var Or=F((Mn,zt)=>{function K(t){if(t)return ln(t);this._callbacks=new Map}function ln(t){return Object.assign(t,K.prototype),t._callbacks=new Map,t}K.prototype.on=function(t,r){let c=this._callbacks.get(t)??[];return c.push(r),this._callbacks.set(t,c),this};K.prototype.once=function(t,r){let c=(...y)=>{this.off(t,c),r.apply(this,y)};return c.fn=r,this.on(t,c),this};K.prototype.off=function(t,r){if(t===void 0&&r===void 0)return this._callbacks.clear(),this;if(r===void 0)return this._callbacks.delete(t),this;let c=this._callbacks.get(t);if(c){for(let[y,i]of c.entries())if(i===r||i.fn===r){c.splice(y,1);break}c.length===0?this._callbacks.delete(t):this._callbacks.set(t,c)}return this};K.prototype.emit=function(t,...r){let c=this._callbacks.get(t);if(c){let y=[...c];for(let i of y)i.apply(this,r)}return this};K.prototype.listeners=function(t){return this._callbacks.get(t)??[]};K.prototype.listenerCount=function(t){if(t)return this.listeners(t).length;let r=0;for(let c of this._callbacks.values())r+=c.length;return r};K.prototype.hasListeners=function(t){return this.listenerCount(t)>0};K.prototype.addEventListener=K.prototype.on;K.prototype.removeListener=K.prototype.off;K.prototype.removeEventListener=K.prototype.off;K.prototype.removeAllListeners=K.prototype.off;typeof zt<"u"&&(zt.exports=K)});var Cr=F((An,Lr)=>{var Ir=Or();function yt(){Ir.call(this)}yt.prototype=new Ir;Lr.exports=yt;yt.Stream=yt;yt.prototype.pipe=function(t,r){var c=this;function y(N){t.writable&&t.write(N)===!1&&c.pause&&c.pause()}c.on("data",y);function i(){c.readable&&c.resume&&c.resume()}t.on("drain",i),!t._isStdio&&(!r||r.end!==!1)&&(c.on("end",u),c.on("close",l));var f=!1;function u(){f||(f=!0,t.end())}function l(){f||(f=!0,typeof t.destroy=="function"&&t.destroy())}function m(N){if(g(),!this.hasListeners("error"))throw N}c.on("error",m),t.on("error",m);function g(){c.off("data",y),t.off("drain",i),c.off("end",u),c.off("close",l),c.off("error",m),t.off("error",m),c.off("end",g),c.off("close",g),t.off("end",g),t.off("close",g)}return c.on("end",g),c.on("close",g),t.on("end",g),t.on("close",g),t.emit("pipe",c),t}});var _r=F(Pt=>{(function(t){t.parser=function(s,e){return new c(s,e)},t.SAXParser=c,t.SAXStream=N,t.createStream=m,t.MAX_BUFFER_LENGTH=64*1024;var r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function c(s,e){if(!(this instanceof c))return new c(s,e);var _=this;i(_),_.q=_.c="",_.bufferCheckPosition=t.MAX_BUFFER_LENGTH,_.encoding=null,_.opt=e||{},_.opt.lowercase=_.opt.lowercase||_.opt.lowercasetags,_.looseCase=_.opt.lowercase?"toLowerCase":"toUpperCase",_.opt.maxEntityCount=_.opt.maxEntityCount||512,_.opt.maxEntityDepth=_.opt.maxEntityDepth||4,_.entityCount=_.entityDepth=0,_.tags=[],_.closed=_.closedRoot=_.sawRoot=!1,_.tag=_.error=null,_.strict=!!s,_.noscript=!!(s||_.opt.noscript),_.state=a.BEGIN,_.strictEntities=_.opt.strictEntities,_.ENTITIES=_.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),_.attribList=[],_.opt.xmlns&&(_.ns=Object.create(E)),_.opt.unquotedAttributeValues===void 0&&(_.opt.unquotedAttributeValues=!s),_.trackPosition=_.opt.position!==!1,_.trackPosition&&(_.position=_.line=_.column=0),v(_,"onready")}Object.create||(Object.create=function(s){function e(){}e.prototype=s;var _=new e;return _}),Object.keys||(Object.keys=function(s){var e=[];for(var _ in s)s.hasOwnProperty(_)&&e.push(_);return e});function y(s){for(var e=Math.max(t.MAX_BUFFER_LENGTH,10),_=0,b=0,j=r.length;b<j;b++){var W=s[r[b]].length;if(W>e)switch(r[b]){case"textNode":V(s);break;case"cdata":S(s,"oncdata",s.cdata),s.cdata="";break;case"script":S(s,"onscript",s.script),s.script="";break;default:J(s,"Max buffer length exceeded: "+r[b])}_=Math.max(_,W)}var G=t.MAX_BUFFER_LENGTH-_;s.bufferCheckPosition=G+s.position}function i(s){for(var e=0,_=r.length;e<_;e++)s[r[e]]=""}function f(s){V(s),s.cdata!==""&&(S(s,"oncdata",s.cdata),s.cdata=""),s.script!==""&&(S(s,"onscript",s.script),s.script="")}c.prototype={end:function(){ht(this)},write:tn,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){f(this)}};var u;try{u=Cr().Stream}catch{u=function(){}}u||(u=function(){});var l=t.EVENTS.filter(function(s){return s!=="error"&&s!=="end"});function m(s,e){return new N(s,e)}function g(s,e){if(s.length>=2){if(s[0]===255&&s[1]===254)return"utf-16le";if(s[0]===254&&s[1]===255)return"utf-16be"}return s.length>=3&&s[0]===239&&s[1]===187&&s[2]===191?"utf8":s.length>=4?s[0]===60&&s[1]===0&&s[2]===63&&s[3]===0?"utf-16le":s[0]===0&&s[1]===60&&s[2]===0&&s[3]===63?"utf-16be":"utf8":e?"utf8":null}function N(s,e){if(!(this instanceof N))return new N(s,e);u.apply(this),this._parser=new c(s,e),this.writable=!0,this.readable=!0;var _=this;this._parser.onend=function(){_.emit("end")},this._parser.onerror=function(b){_.emit("error",b),_._parser.error=null},this._decoder=null,this._decoderBuffer=null,l.forEach(function(b){Object.defineProperty(_,"on"+b,{get:function(){return _._parser["on"+b]},set:function(j){if(!j)return _.removeAllListeners(b),_._parser["on"+b]=j,j;_.on(b,j)},enumerable:!0,configurable:!1})})}N.prototype=Object.create(u.prototype,{constructor:{value:N}}),N.prototype._decodeBuffer=function(s,e){if(this._decoderBuffer&&(s=Buffer.concat([this._decoderBuffer,s]),this._decoderBuffer=null),!this._decoder){var _=g(s,e);if(!_)return this._decoderBuffer=s,"";this._parser.encoding=_,this._decoder=new TextDecoder(_)}return this._decoder.decode(s,{stream:!e})},N.prototype.write=function(s){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(s))s=this._decodeBuffer(s,!1);else if(this._decoderBuffer){var e=this._decodeBuffer(Buffer.alloc(0),!0);e&&(this._parser.write(e),this.emit("data",e))}return this._parser.write(s.toString()),this.emit("data",s),!0},N.prototype.end=function(s){if(s&&s.length&&this.write(s),this._decoderBuffer){var e=this._decodeBuffer(Buffer.alloc(0),!0);e&&(this._parser.write(e),this.emit("data",e))}else if(this._decoder){var _=this._decoder.decode();_&&(this._parser.write(_),this.emit("data",_))}return this._parser.end(),!0},N.prototype.on=function(s,e){var _=this;return!_._parser["on"+s]&&l.indexOf(s)!==-1&&(_._parser["on"+s]=function(){var b=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);b.splice(0,0,s),_.emit.apply(_,b)}),u.prototype.on.call(_,s,e)};var O="[CDATA[",D="DOCTYPE",p="http://www.w3.org/XML/1998/namespace",T="http://www.w3.org/2000/xmlns/",E={xml:p,xmlns:T},A=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,M=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,C=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function o(s){return s===" "||s===`
|
|
4
|
+
`||s==="\r"||s===" "}function n(s){return s==='"'||s==="'"}function h(s){return s===">"||o(s)}function L(s,e){return s.test(e)}function I(s,e){return!L(s,e)}var a=0;t.STATE={BEGIN:a++,BEGIN_WHITESPACE:a++,TEXT:a++,TEXT_ENTITY:a++,OPEN_WAKA:a++,SGML_DECL:a++,SGML_DECL_QUOTED:a++,DOCTYPE:a++,DOCTYPE_QUOTED:a++,DOCTYPE_DTD:a++,DOCTYPE_DTD_QUOTED:a++,COMMENT_STARTING:a++,COMMENT:a++,COMMENT_ENDING:a++,COMMENT_ENDED:a++,CDATA:a++,CDATA_ENDING:a++,CDATA_ENDING_2:a++,PROC_INST:a++,PROC_INST_BODY:a++,PROC_INST_ENDING:a++,OPEN_TAG:a++,OPEN_TAG_SLASH:a++,ATTRIB:a++,ATTRIB_NAME:a++,ATTRIB_NAME_SAW_WHITE:a++,ATTRIB_VALUE:a++,ATTRIB_VALUE_QUOTED:a++,ATTRIB_VALUE_CLOSED:a++,ATTRIB_VALUE_UNQUOTED:a++,ATTRIB_VALUE_ENTITY_Q:a++,ATTRIB_VALUE_ENTITY_U:a++,CLOSE_TAG:a++,CLOSE_TAG_SAW_WHITE:a++,SCRIPT:a++,SCRIPT_ENDING:a++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(s){var e=t.ENTITIES[s],_=typeof e=="number"?String.fromCharCode(e):e;t.ENTITIES[s]=_});for(var w in t.STATE)t.STATE[t.STATE[w]]=w;a=t.STATE;function v(s,e,_){s[e]&&s[e](_)}function P(s){var e=s&&s.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);return e?e[2]:null}function x(s){return s?s.toLowerCase().replace(/[^a-z0-9]/g,""):null}function X(s,e){let _=x(s),b=x(e);return!_||!b?!0:b==="utf16"?_==="utf16le"||_==="utf16be":_===b}function q(s,e){if(!(!s.strict||!s.encoding||!e||e.name!=="xml")){var _=P(e.body);_&&!X(s.encoding,_)&&B(s,"XML declaration encoding "+_+" does not match detected stream encoding "+s.encoding.toUpperCase())}}function S(s,e,_){s.textNode&&V(s),v(s,e,_)}function V(s){s.textNode=R(s.opt,s.textNode),s.textNode&&v(s,"ontext",s.textNode),s.textNode=""}function R(s,e){return s.trim&&(e=e.trim()),s.normalize&&(e=e.replace(/\s+/g," ")),e}function J(s,e){return V(s),s.trackPosition&&(e+=`
|
|
5
5
|
Line: `+s.line+`
|
|
6
6
|
Column: `+s.column+`
|
|
7
|
-
Char: `+s.c),e=new Error(e),s.error=e,v(s,"onerror",e),s}function ht(s){return s.sawRoot&&!s.closedRoot&&B(s,"Unclosed root tag"),s.state!==a.BEGIN&&s.state!==a.BEGIN_WHITESPACE&&s.state!==a.TEXT&&J(s,"Unexpected end"),V(s),s.c="",s.closed=!0,v(s,"onend"),c.call(s,s.strict,s.opt),s}function B(s,e){if(typeof s!="object"||!(s instanceof c))throw new Error("bad call to strictFail");s.strict&&J(s,e)}function Zr(s){s.strict||(s.tagName=s.tagName[s.looseCase]());var e=s.tags[s.tags.length-1]||s,
|
|
7
|
+
Char: `+s.c),e=new Error(e),s.error=e,v(s,"onerror",e),s}function ht(s){return s.sawRoot&&!s.closedRoot&&B(s,"Unclosed root tag"),s.state!==a.BEGIN&&s.state!==a.BEGIN_WHITESPACE&&s.state!==a.TEXT&&J(s,"Unexpected end"),V(s),s.c="",s.closed=!0,v(s,"onend"),c.call(s,s.strict,s.opt),s}function B(s,e){if(typeof s!="object"||!(s instanceof c))throw new Error("bad call to strictFail");s.strict&&J(s,e)}function Zr(s){s.strict||(s.tagName=s.tagName[s.looseCase]());var e=s.tags[s.tags.length-1]||s,_=s.tag={name:s.tagName,attributes:{}};s.opt.xmlns&&(_.ns=e.ns),s.attribList.length=0,S(s,"onopentagstart",_)}function Ft(s,e){var _=s.indexOf(":"),b=_<0?["",s]:s.split(":"),j=b[0],W=b[1];return e&&s==="xmlns"&&(j="xmlns",W=""),{prefix:j,local:W}}function Xt(s){if(s.strict||(s.attribName=s.attribName[s.looseCase]()),s.attribList.indexOf(s.attribName)!==-1||s.tag.attributes.hasOwnProperty(s.attribName)){s.attribName=s.attribValue="";return}if(s.opt.xmlns){var e=Ft(s.attribName,!0),_=e.prefix,b=e.local;if(_==="xmlns")if(b==="xml"&&s.attribValue!==p)B(s,"xml: prefix must be bound to "+p+`
|
|
8
8
|
Actual: `+s.attribValue);else if(b==="xmlns"&&s.attribValue!==T)B(s,"xmlns: prefix must be bound to "+T+`
|
|
9
|
-
Actual: `+s.attribValue);else{var j=s.tag,W=s.tags[s.tags.length-1]||s;j.ns===W.ns&&(j.ns=Object.create(W.ns)),j.ns[b]=s.attribValue}s.attribList.push([s.attribName,s.attribValue])}else s.tag.attributes[s.attribName]=s.attribValue,S(s,"onattribute",{name:s.attribName,value:s.attribValue});s.attribName=s.attribValue=""}function at(s,e){if(s.opt.xmlns){var
|
|
10
|
-
`?(e.line++,e.column=0):e.column++),e.state){case a.BEGIN:if(e.state=a.BEGIN_WHITESPACE,b==="\uFEFF")continue;ee(e,b);continue;case a.BEGIN_WHITESPACE:ee(e,b);continue;case a.TEXT:if(e.sawRoot&&!e.closedRoot){for(var W=
|
|
11
|
-
`?(e.line++,e.column=0):e.column++);e.textNode+=s.substring(W,
|
|
12
|
-
`?(e.line++,e.column=0):e.column++);e.cdata+=s.substring(W,L-1),b==="]"&&(e.state=a.CDATA_ENDING);continue;case a.CDATA_ENDING:b==="]"?e.state=a.CDATA_ENDING_2:(e.cdata+="]"+b,e.state=a.CDATA);continue;case a.CDATA_ENDING_2:b===">"?(e.cdata&&S(e,"oncdata",e.cdata),S(e,"onclosecdata"),e.cdata="",e.state=a.TEXT):b==="]"?e.cdata+="]":(e.cdata+="]]"+b,e.state=a.CDATA);continue;case a.PROC_INST:b==="?"?e.state=a.PROC_INST_ENDING:o(b)?e.state=a.PROC_INST_BODY:e.procInstName+=b;continue;case a.PROC_INST_BODY:if(!e.procInstBody&&o(b))continue;b==="?"?e.state=a.PROC_INST_ENDING:e.procInstBody+=b;continue;case a.PROC_INST_ENDING:if(b===">"){let et={name:e.procInstName,body:e.procInstBody};X(e,et),S(e,"onprocessinginstruction",et),e.procInstName=e.procInstBody="",e.state=a.TEXT}else e.procInstBody+="?"+b,e.state=a.PROC_INST_BODY;continue;case a.OPEN_TAG:C(M,b)?e.tagName+=b:(Zr(e),b===">"?at(e):b==="/"?e.state=a.OPEN_TAG_SLASH:(o(b)||B(e,"Invalid character in tag name"),e.state=a.ATTRIB));continue;case a.OPEN_TAG_SLASH:b===">"?(at(e,!0),Xt(e)):(B(e,"Forward-slash in opening tag not followed by >"),e.state=a.ATTRIB);continue;case a.ATTRIB:if(o(b))continue;b===">"?at(e):b==="/"?e.state=a.OPEN_TAG_SLASH:C(A,b)?(e.attribName=b,e.attribValue="",e.state=a.ATTRIB_NAME):B(e,"Invalid attribute name");continue;case a.ATTRIB_NAME:b==="="?e.state=a.ATTRIB_VALUE:b===">"?(B(e,"Attribute without value"),e.attribValue=e.attribName,qt(e),at(e)):o(b)?e.state=a.ATTRIB_NAME_SAW_WHITE:C(M,b)?e.attribName+=b:B(e,"Invalid attribute name");continue;case a.ATTRIB_NAME_SAW_WHITE:if(b==="=")e.state=a.ATTRIB_VALUE;else{if(o(b))continue;B(e,"Attribute without value"),e.tag.attributes[e.attribName]="",e.attribValue="",S(e,"onattribute",{name:e.attribName,value:""}),e.attribName="",b===">"?at(e):C(A,b)?(e.attribName=b,e.state=a.ATTRIB_NAME):(B(e,"Invalid attribute name"),e.state=a.ATTRIB)}continue;case a.ATTRIB_VALUE:if(o(b))continue;n(b)?(e.q=b,e.state=a.ATTRIB_VALUE_QUOTED):(e.opt.unquotedAttributeValues||J(e,"Unquoted attribute value"),e.state=a.ATTRIB_VALUE_UNQUOTED,e.attribValue=b);continue;case a.ATTRIB_VALUE_QUOTED:if(b!==e.q){b==="&"?e.state=a.ATTRIB_VALUE_ENTITY_Q:e.attribValue+=b;continue}qt(e),e.q="",e.state=a.ATTRIB_VALUE_CLOSED;continue;case a.ATTRIB_VALUE_CLOSED:o(b)?e.state=a.ATTRIB:b===">"?at(e):b==="/"?e.state=a.OPEN_TAG_SLASH:C(A,b)?(B(e,"No whitespace between attributes"),e.attribName=b,e.attribValue="",e.state=a.ATTRIB_NAME):B(e,"Invalid attribute name");continue;case a.ATTRIB_VALUE_UNQUOTED:if(!h(b)){b==="&"?e.state=a.ATTRIB_VALUE_ENTITY_U:e.attribValue+=b;continue}qt(e),b===">"?at(e):e.state=a.ATTRIB;continue;case a.CLOSE_TAG:if(e.tagName)b===">"?Xt(e):C(M,b)?e.tagName+=b:e.script?(e.script+="</"+e.tagName+b,e.tagName="",e.state=a.SCRIPT):(o(b)||B(e,"Invalid tagname in closing tag"),e.state=a.CLOSE_TAG_SAW_WHITE);else{if(o(b))continue;I(A,b)?e.script?(e.script+="</"+b,e.state=a.SCRIPT):B(e,"Invalid tagname in closing tag."):e.tagName=b}continue;case a.CLOSE_TAG_SAW_WHITE:if(o(b))continue;b===">"?Xt(e):B(e,"Invalid characters in closing tag");continue;case a.TEXT_ENTITY:case a.ATTRIB_VALUE_ENTITY_Q:case a.ATTRIB_VALUE_ENTITY_U:var G,z;switch(e.state){case a.TEXT_ENTITY:G=a.TEXT,z="textNode";break;case a.ATTRIB_VALUE_ENTITY_Q:G=a.ATTRIB_VALUE_QUOTED,z="attribValue";break;case a.ATTRIB_VALUE_ENTITY_U:G=a.ATTRIB_VALUE_UNQUOTED,z="attribValue";break}if(b===";"){var H=Jr(e);e.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(H)?((e.entityCount+=1)>e.opt.maxEntityCount&&J(e,"Parsed entity count exceeds max entity count"),(e.entityDepth+=1)>e.opt.maxEntityDepth&&J(e,"Parsed entity depth exceeds max entity depth"),e.entity="",e.state=G,e.write(H),e.entityDepth-=1):(e[z]+=H,e.entity="",e.state=G)}else C(e.entity.length?d:_,b)?e.entity+=b:(B(e,"Invalid character in entity name"),e[z]+="&"+e.entity+b,e.entity="",e.state=G);continue;default:throw new Error(e,"Unknown state: "+e.state)}return e.position>=e.bufferCheckPosition&&y(e),e}String.fromCodePoint||(function(){var s=String.fromCharCode,e=Math.floor,L=function(){var b=16384,j=[],W,G,z=-1,H=arguments.length;if(!H)return"";for(var et="";++z<H;){var Y=Number(arguments[z]);if(!isFinite(Y)||Y<0||Y>1114111||e(Y)!==Y)throw RangeError("Invalid code point: "+Y);Y<=65535?j.push(Y):(Y-=65536,W=(Y>>10)+55296,G=Y%1024+56320,j.push(W,G)),(z+1===H||j.length>b)&&(et+=s.apply(null,j),j.length=0)}return et};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:L,configurable:!0,writable:!0}):String.fromCodePoint=L})()})(typeof Pt>"u"?Pt.sax={}:Pt)});var jr=F((xn,Ht)=>{"use strict";var pt=typeof Reflect=="object"?Reflect:null,vr=pt&&typeof pt.apply=="function"?pt.apply:function(r,c,y){return Function.prototype.apply.call(r,c,y)},xt;pt&&typeof pt.ownKeys=="function"?xt=pt.ownKeys:Object.getOwnPropertySymbols?xt=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:xt=function(r){return Object.getOwnPropertyNames(r)};function fn(t){console&&console.warn&&console.warn(t)}var Ar=Number.isNaN||function(r){return r!==r};function U(){U.init.call(this)}Ht.exports=U;Ht.exports.once=mn;U.EventEmitter=U;U.prototype._events=void 0;U.prototype._eventsCount=0;U.prototype._maxListeners=void 0;var Mr=10;function St(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(U,"defaultMaxListeners",{enumerable:!0,get:function(){return Mr},set:function(t){if(typeof t!="number"||t<0||Ar(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Mr=t}});U.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};U.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||Ar(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function Pr(t){return t._maxListeners===void 0?U.defaultMaxListeners:t._maxListeners}U.prototype.getMaxListeners=function(){return Pr(this)};U.prototype.emit=function(r){for(var c=[],y=1;y<arguments.length;y++)c.push(arguments[y]);var i=r==="error",f=this._events;if(f!==void 0)i=i&&f.error===void 0;else if(!i)return!1;if(i){var u;if(c.length>0&&(u=c[0]),u instanceof Error)throw u;var l=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw l.context=u,l}var m=f[r];if(m===void 0)return!1;if(typeof m=="function")vr(m,this,c);else for(var g=m.length,N=Xr(m,g),y=0;y<g;++y)vr(N[y],this,c);return!0};function xr(t,r,c,y){var i,f,u;if(St(c),f=t._events,f===void 0?(f=t._events=Object.create(null),t._eventsCount=0):(f.newListener!==void 0&&(t.emit("newListener",r,c.listener?c.listener:c),f=t._events),u=f[r]),u===void 0)u=f[r]=c,++t._eventsCount;else if(typeof u=="function"?u=f[r]=y?[c,u]:[u,c]:y?u.unshift(c):u.push(c),i=Pr(t),i>0&&u.length>i&&!u.warned){u.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=r,l.count=u.length,fn(l)}return t}U.prototype.addListener=function(r,c){return xr(this,r,c,!1)};U.prototype.on=U.prototype.addListener;U.prototype.prependListener=function(r,c){return xr(this,r,c,!0)};function hn(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Sr(t,r,c){var y={fired:!1,wrapFn:void 0,target:t,type:r,listener:c},i=hn.bind(y);return i.listener=c,y.wrapFn=i,i}U.prototype.once=function(r,c){return St(c),this.on(r,Sr(this,r,c)),this};U.prototype.prependOnceListener=function(r,c){return St(c),this.prependListener(r,Sr(this,r,c)),this};U.prototype.removeListener=function(r,c){var y,i,f,u,l;if(St(c),i=this._events,i===void 0)return this;if(y=i[r],y===void 0)return this;if(y===c||y.listener===c)--this._eventsCount===0?this._events=Object.create(null):(delete i[r],i.removeListener&&this.emit("removeListener",r,y.listener||c));else if(typeof y!="function"){for(f=-1,u=y.length-1;u>=0;u--)if(y[u]===c||y[u].listener===c){l=y[u].listener,f=u;break}if(f<0)return this;f===0?y.shift():pn(y,f),y.length===1&&(i[r]=y[0]),i.removeListener!==void 0&&this.emit("removeListener",r,l||c)}return this};U.prototype.off=U.prototype.removeListener;U.prototype.removeAllListeners=function(r){var c,y,i;if(y=this._events,y===void 0)return this;if(y.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):y[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete y[r]),this;if(arguments.length===0){var f=Object.keys(y),u;for(i=0;i<f.length;++i)u=f[i],u!=="removeListener"&&this.removeAllListeners(u);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(c=y[r],typeof c=="function")this.removeListener(r,c);else if(c!==void 0)for(i=c.length-1;i>=0;i--)this.removeListener(r,c[i]);return this};function Fr(t,r,c){var y=t._events;if(y===void 0)return[];var i=y[r];return i===void 0?[]:typeof i=="function"?c?[i.listener||i]:[i]:c?dn(i):Xr(i,i.length)}U.prototype.listeners=function(r){return Fr(this,r,!0)};U.prototype.rawListeners=function(r){return Fr(this,r,!1)};U.listenerCount=function(t,r){return typeof t.listenerCount=="function"?t.listenerCount(r):qr.call(t,r)};U.prototype.listenerCount=qr;function qr(t){var r=this._events;if(r!==void 0){var c=r[t];if(typeof c=="function")return 1;if(c!==void 0)return c.length}return 0}U.prototype.eventNames=function(){return this._eventsCount>0?xt(this._events):[]};function Xr(t,r){for(var c=new Array(r),y=0;y<r;++y)c[y]=t[y];return c}function pn(t,r){for(;r+1<t.length;r++)t[r]=t[r+1];t.pop()}function dn(t){for(var r=new Array(t.length),c=0;c<r.length;++c)r[c]=t[c].listener||t[c];return r}function mn(t,r){return new Promise(function(c,y){function i(u){t.removeListener(r,f),y(u)}function f(){typeof t.removeListener=="function"&&t.removeListener("error",i),c([].slice.call(arguments))}Rr(t,r,f,{once:!0}),r!=="error"&&yn(t,i,{once:!0})})}function yn(t,r,c){typeof t.on=="function"&&Rr(t,"error",r,c)}function Rr(t,r,c,y){if(typeof t.on=="function")y.once?t.once(r,c):t.on(r,c);else if(typeof t.addEventListener=="function")t.addEventListener(r,function i(f){y.once&&t.removeEventListener(r,i),c(f)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}});var Br=F($t=>{(function(){"use strict";$t.stripBOM=function(t){return t[0]==="\uFEFF"?t.substring(1):t}}).call($t)});var Qt=F(ct=>{(function(){"use strict";var t;t=new RegExp(/(?!xmlns)^.*:/),ct.normalize=function(r){return r.toLowerCase()},ct.firstCharLowerCase=function(r){return r.charAt(0).toLowerCase()+r.slice(1)},ct.stripPrefix=function(r){return r.replace(t,"")},ct.parseNumbers=function(r){return isNaN(r)||(r=r%1===0?parseInt(r,10):parseFloat(r)),r},ct.parseBooleans=function(r){return/^(?:true|false)$/i.test(r)&&(r=r.toLowerCase()==="true"),r}}).call(ct)});var Vr=F(Ur=>{Ur.every=function(t){return new Zt(t)};var nt={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};for(lt in nt)lt==="millisecond"?nt.ms=nt[lt]:nt[lt.charAt(0)]=nt[lt],nt[lt+"s"]=nt[lt];var lt;function Zt(t){this.count=0;var r=wn(t);r&&(this.time=Number(r[0])*nt[r[1]],this.type=r[1])}Zt.prototype.do=function(t){this.time&&(this.interval=setInterval(c,this.time));var r=this;function c(){r.count++,t.call(r)}return this};Zt.prototype.stop=function(){return this.interval&&(clearInterval(this.interval),delete this.interval),this};var gn=/^\s*(\d+(?:\.\d+)?)\s*([a-z]+)\s*$/;function wn(t){var r=t.match(gn);return r&&nt[r[2]]?r.slice(1):null}});var Wr=F(it=>{(function(){"use strict";var t,r,c,y,i,f,u,l,m,g=function(D,p){return function(){return D.apply(p,arguments)}},N=function(D,p){for(var T in p)O.call(p,T)&&(D[T]=p[T]);function E(){this.constructor=D}return E.prototype=p.prototype,D.prototype=new E,D.__super__=p.prototype,D},O={}.hasOwnProperty;l=Lr(),y=jr(),t=Br(),u=Qt(),m=Vr().setImmediate,r=gt().defaults,i=function(D){return typeof D=="object"&&D!=null&&Object.keys(D).length===0},f=function(D,p,T){var E,A,M;for(E=0,A=D.length;E<A;E++)M=D[E],p=M(p,T);return p},c=function(D,p,T){var E;return E=Object.create(null),E.value=T,E.writable=!0,E.enumerable=!0,E.configurable=!0,Object.defineProperty(D,p,E)},it.Parser=(function(D){N(p,D);function p(T){this.parseStringPromise=g(this.parseStringPromise,this),this.parseString=g(this.parseString,this),this.reset=g(this.reset,this),this.assignOrPush=g(this.assignOrPush,this),this.processAsync=g(this.processAsync,this);var E,A,M;if(!(this instanceof it.Parser))return new it.Parser(T);this.options={},A=r["0.2"];for(E in A)O.call(A,E)&&(M=A[E],this.options[E]=M);for(E in T)O.call(T,E)&&(M=T[E],this.options[E]=M);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(u.normalize)),this.reset()}return p.prototype.processAsync=function(){var T,E;try{return this.remaining.length<=this.options.chunkSize?(T=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(T),this.saxParser.close()):(T=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(T),m(this.processAsync))}catch(A){if(E=A,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(E)}},p.prototype.assignOrPush=function(T,E,A){return E in T?(T[E]instanceof Array||c(T,E,[T[E]]),T[E].push(A)):this.options.explicitArray?c(T,E,[A]):c(T,E,A)},p.prototype.reset=function(){var T,E,A,M;return this.removeAllListeners(),this.saxParser=l.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(function(_){return function(d){if(_.saxParser.resume(),!_.saxParser.errThrown)return _.saxParser.errThrown=!0,_.emit("error",d)}})(this),this.saxParser.onend=(function(_){return function(){if(!_.saxParser.ended)return _.saxParser.ended=!0,_.emit("end",_.resultObject)}})(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,M=[],T=this.options.attrkey,E=this.options.charkey,this.saxParser.onopentag=(function(_){return function(d){var o,n,h,C,I;if(h={},h[E]="",!_.options.ignoreAttrs){I=d.attributes;for(o in I)O.call(I,o)&&(!(T in h)&&!_.options.mergeAttrs&&(h[T]={}),n=_.options.attrValueProcessors?f(_.options.attrValueProcessors,d.attributes[o],o):d.attributes[o],C=_.options.attrNameProcessors?f(_.options.attrNameProcessors,o):o,_.options.mergeAttrs?_.assignOrPush(h,C,n):c(h[T],C,n))}return h["#name"]=_.options.tagNameProcessors?f(_.options.tagNameProcessors,d.name):d.name,_.options.xmlns&&(h[_.options.xmlnskey]={uri:d.uri,local:d.local}),M.push(h)}})(this),this.saxParser.onclosetag=(function(_){return function(){var d,o,n,h,C,I,a,w,v,P;if(I=M.pop(),C=I["#name"],(!_.options.explicitChildren||!_.options.preserveChildrenOrder)&&delete I["#name"],I.cdata===!0&&(d=I.cdata,delete I.cdata),v=M[M.length-1],I[E].match(/^\s*$/)&&!d?(o=I[E],delete I[E]):(_.options.trim&&(I[E]=I[E].trim()),_.options.normalize&&(I[E]=I[E].replace(/\s{2,}/g," ").trim()),I[E]=_.options.valueProcessors?f(_.options.valueProcessors,I[E],C):I[E],Object.keys(I).length===1&&E in I&&!_.EXPLICIT_CHARKEY&&(I=I[E])),i(I)&&(typeof _.options.emptyTag=="function"?I=_.options.emptyTag():I=_.options.emptyTag!==""?_.options.emptyTag:o),_.options.validator!=null&&(P="/"+(function(){var x,q,X;for(X=[],x=0,q=M.length;x<q;x++)h=M[x],X.push(h["#name"]);return X})().concat(C).join("/"),(function(){var x;try{return I=_.options.validator(P,v&&v[C],I)}catch(q){return x=q,_.emit("error",x)}})()),_.options.explicitChildren&&!_.options.mergeAttrs&&typeof I=="object"){if(!_.options.preserveChildrenOrder)h={},_.options.attrkey in I&&(h[_.options.attrkey]=I[_.options.attrkey],delete I[_.options.attrkey]),!_.options.charsAsChildren&&_.options.charkey in I&&(h[_.options.charkey]=I[_.options.charkey],delete I[_.options.charkey]),Object.getOwnPropertyNames(I).length>0&&(h[_.options.childkey]=I),I=h;else if(v){v[_.options.childkey]=v[_.options.childkey]||[],a={};for(n in I)O.call(I,n)&&c(a,n,I[n]);v[_.options.childkey].push(a),delete I["#name"],Object.keys(I).length===1&&E in I&&!_.EXPLICIT_CHARKEY&&(I=I[E])}}return M.length>0?_.assignOrPush(v,C,I):(_.options.explicitRoot&&(w=I,I={},c(I,C,w)),_.resultObject=I,_.saxParser.ended=!0,_.emit("end",_.resultObject))}})(this),A=(function(_){return function(d){var o,n;if(n=M[M.length-1],n)return n[E]+=d,_.options.explicitChildren&&_.options.preserveChildrenOrder&&_.options.charsAsChildren&&(_.options.includeWhiteChars||d.replace(/\\n/g,"").trim()!=="")&&(n[_.options.childkey]=n[_.options.childkey]||[],o={"#name":"__text__"},o[E]=d,_.options.normalize&&(o[E]=o[E].replace(/\s{2,}/g," ").trim()),n[_.options.childkey].push(o)),n}})(this),this.saxParser.ontext=A,this.saxParser.oncdata=(function(_){return function(d){var o;if(o=A(d),o)return o.cdata=!0}})(this)},p.prototype.parseString=function(T,E){var A;E!=null&&typeof E=="function"&&(this.on("end",function(M){return this.reset(),E(null,M)}),this.on("error",function(M){return this.reset(),E(M)}));try{return T=T.toString(),T.trim()===""?(this.emit("end",null),!0):(T=t.stripBOM(T),this.options.async?(this.remaining=T,m(this.processAsync),this.saxParser):this.saxParser.write(T).close())}catch(M){if(A=M,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw A}else return this.emit("error",A),this.saxParser.errThrown=!0}},p.prototype.parseStringPromise=function(T){return new Promise((function(E){return function(A,M){return E.parseString(T,function(_,d){return _?M(_):A(d)})}})(this))},p})(y),it.parseString=function(D,p,T){var E,A,M;return T!=null?(typeof T=="function"&&(E=T),typeof p=="object"&&(A=p)):(typeof p=="function"&&(E=p),A={}),M=new it.Parser(A),M.parseString(D,E)},it.parseStringPromise=function(D,p){var T,E;return typeof p=="object"&&(T=p),E=new it.Parser(T),E.parseStringPromise(D)}}).call(it)});var kr=F(ot=>{(function(){"use strict";var t,r,c,y,i=function(u,l){for(var m in l)f.call(l,m)&&(u[m]=l[m]);function g(){this.constructor=u}return g.prototype=l.prototype,u.prototype=new g,u.__super__=l.prototype,u},f={}.hasOwnProperty;r=gt(),t=Nr(),c=Wr(),y=Qt(),ot.defaults=r.defaults,ot.processors=y,ot.ValidationError=(function(u){i(l,u);function l(m){this.message=m}return l})(Error),ot.Builder=t.Builder,ot.Parser=c.Parser,ot.parseString=c.parseString,ot.parseStringPromise=c.parseStringPromise}).call(ot)});var te=cn(kr()),$r=8e3;self.onmessage=async t=>{let{sourceType:r}=t.data;try{let c;if(r==="wms"){let{url:y,options:i}=t.data;c=await Tn(y,i)}else if(r==="wmts"){let{url:y,options:i}=t.data;c=await bn(y,i)}else c=null;self.postMessage(c)}catch{self.postMessage(null)}};var Tn=async(t,r)=>{let c=t+"?request=getcapabilities&service=wms",y=new AbortController,i=setTimeout(()=>y.abort(),$r);try{let f=await fetch(c,{signal:y.signal});if(clearTimeout(i),!f.ok)throw new Error(`(${f.status}) Error fetching capabilities.. ${f.statusText}`);let u=await f.text();return await Dn(u,c,r)}catch(f){throw f}},Dn=async(t,r,c)=>{let y=0,i=(g,N,O=null,D=0)=>{if(y>=c.maxNodes||D>c.maxDepth)return;y+=1;let p={name:g.Name?$(g.Name[0]):"",description:g.Abstract?$(g.Abstract[0]):"",selected:!1,parent:O,time:null};if(g.Title&&(p.title=$(g.Title[0])),Array.isArray(g.Dimension)){for(let T of g.Dimension)if(T.$?.name.toLowerCase()==="time"&&T.$?.units==="ISO8601"){p.time=Object.assign({current:T.$?.default??null},Qr(T._,T.$?.default));break}}g.Layer&&(p.children=[],g.Layer.forEach(T=>i(T,p.children,p,D+1))),N.push(p)};if(t.indexOf("<Capability")===-1)throw new Error("Error: Invalid response received!");let f=await(0,te.parseStringPromise)(t);if(!f.WMS_Capabilities&&!f.WMT_MS_Capabilities)throw new Error("Error: No Capabilities found!");let u=f.WMS_Capabilities?f.WMS_Capabilities:f.WMT_MS_Capabilities?f.WMT_MS_Capabilities:void 0;if(!u?.Capability[0].Layer)throw new Error("Error: No layer information found!");let l={name:"",description:"",type:"WMS",url:r,layers:[]};if(Z(u?.Service)){let g=u?.Service[0];l.name=Z(g.Title)?$(g.Title[0]):Z(g.Name)?$(g.Name[0]):"WMS",l.description=Z(g.Abstract)?$(g.Abstract[0]):""}let m=[];return u.Capability[0].Layer.forEach(g=>{i(g,m)}),m.sort((g,N)=>g.name<N.name?-1:1),l.layers=m,l},bn=async(t,r)=>{let c=t+"?request=GetCapabilities&service=wmts",y=new AbortController,i=setTimeout(()=>y.abort(),$r);try{let f=await fetch(c,{signal:y.signal});if(clearTimeout(i),!f.ok)throw new Error(`(${f.status}) Error fetching capabilities.. ${f.statusText}`);let u=await f.text();return await En(u,c,r)}catch(f){throw f}},En=async(t,r,c)=>{let y=l=>{if(!Z(l["ows:Identifier"]))return null;let m={name:Z(l["ows:Title"])?$(l["ows:Title"][0]):"",description:Z(l["ows:Abstract"])?$(l["ows:Abstract"][0]):"",id:$(l["ows:Identifier"][0])};if(Z(l["ows:WGS84BoundingBox"])&&(m.bounds=[Number(l["ows:WGS84BoundingBox"][0]["ows:LowerCorner"][0].split(" ")[0]),Number(l["ows:WGS84BoundingBox"][0]["ows:LowerCorner"][0].split(" ")[1]),Number(l["ows:WGS84BoundingBox"][0]["ows:UpperCorner"][0].split(" ")[0]),Number(l["ows:WGS84BoundingBox"][0]["ows:UpperCorner"][0].split(" ")[1])]),Z(l.Format)){let g=$(l.Format[0]);m.format=g.indexOf("jpg")!==-1?"jpg":"png"}else m.format="png";return Z(l.Dimension)&&l.Dimension.forEach(g=>{$(g["ows:Identifier"][0]).toLowerCase()==="time"&&(m.time=Object.assign({current:ft($(g.Default[0]))??null},Qr($(g.Value),$(g.Default[0]))))}),m};if(t.indexOf("<Capabilities")===-1)throw new Error("Error: Invalid response received!");let i=await(0,te.parseStringPromise)(t);if(!Z(i.Capabilities?.Contents))throw new Error("Error: No Capabilities found!");if(!Z(i.Capabilities.Contents[0].Layer))throw new Error("Error: No layer information found!");let f={name:"",description:"",type:"WMTS",url:r,layers:[]},u=0;for(let l of i.Capabilities.Contents[0].Layer){if(u>=c.maxNodes)break;let m=y(l);m&&f.layers.push(m),u++}return f.layers.sort((l,m)=>l.name<m.name?-1:1),f},Z=t=>Array.isArray(t)&&t.length!==0,$=t=>t._??t,Jt=t=>{let r=/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$/,c=t.match(r);return c?{years:parseInt(c[1]??"0"),months:parseInt(c[2]??"0"),weeks:parseInt(c[3]??"0"),days:parseInt(c[4]??"0"),hours:parseInt(c[5]??"0"),minutes:parseInt(c[6]??"0"),seconds:parseFloat(c[7]??"0")}:{years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0}},Nn=t=>{let r=Jt(t);return r.weeks*(3600*1e3*24*7)+r.days*(3600*1e3*24)+r.hours*(3600*1e3)+r.minutes*(60*1e3)+r.seconds*1e3},Gr=(t,r,c)=>{let y={y:new Date(t).getFullYear(),m:new Date(t).getMonth(),d:new Date(t).getDate()},i={y:c?y.y+r.years:y.y-r.years,m:c?y.m+r.months:y.m-r.months,d:c?y.d+r.days:y.d-r.days};if(r.weeks){let l=r.weeks*7;i.d=c?i.d+l:i.d-l}let f=new Date(t);f.setFullYear(i.y,i.m,i.d);let u=r.hours*(1e3*3600)+r.minutes*(1e3*60)+r.seconds*1e3;return u=c?u:0-u,f.setTime(f.getTime()+u),f.toISOString()},Yr=t=>t.startsWith("P"),Kr=t=>!t.includes("-")&&!t.includes(":"),zr=t=>t.split("-").length===2&&!t.includes("T"),On=t=>t.split("-").length===3&&!t.includes("T"),In=t=>t.length===8&&!t.startsWith("P"),Cn=t=>t.includes("T")&&!t.includes(":"),Hr=t=>t.includes("/"),ft=t=>{try{return t.toLocaleLowerCase()==="current"||t.toLocaleLowerCase()==="present"?new Date().toISOString():(In(t)?t=`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6)}`:Cn(t)&&(t+=":00:00.000Z"),new Date(t).toISOString())}catch(r){throw new Error(`Unhandled Date format (${t})`,{cause:r})}},Qr=(t,r)=>{let c=i=>{if(Kr(i))return`${i}-12-31T23:59:59.999Z`;if(zr(i)){let f=i.split("-").map(l=>parseInt(l)),u=new Date(f[0],f[1],0).getDate();return`${i}-${u}T23:59:59.999Z`}else return On(i)?`${i}T23:59:59.999Z`:ft(i)},y=i=>{let f={from:null,to:null};if((i[0].toLocaleLowerCase()==="present"||i[0].toLocaleLowerCase()==="current")&&(i[0]=new Date().toISOString()),(i[1].toLocaleLowerCase()==="present"||i[1].toLocaleLowerCase()==="current")&&(i[1]=new Date().toISOString()),Yr(i[0])?f.from=Gr(i[1],Jt(i[0]),!1):f.from=ft(i[0]),Yr(i[1])?f.to=Gr(i[0],Jt(i[1]),!0):f.to=c(i[1]),i.length===3){let u=Nn(i[2]);u&&(f.interval=u)}return f};try{if(Array.isArray(t)){let i=[];if(t.forEach(u=>{if(Hr(u)){let l=y(u.split("/"));l&&i.push(l)}}),i.length){let u=new Date(r).valueOf();for(let l=0;l<i.length;l++)if(u>=new Date(i[l].from).valueOf()&&u<=new Date(i[l].to).valueOf())return i[l];return i[i.length-1]}let f=t.map(u=>ft(u));if(f.length>1)return{from:f[0]??null,to:f[f.length-1]??null,values:f};t=f[0]}if(t.includes(",")){let i=t.split(",").map(f=>ft(f));return{from:i[0]??null,to:i[i.length-1]??null,values:i}}else if(typeof t=="string"){if(Hr(t))return y(t.split("/"));if(Kr(t)){let i=new Date(t),f=i.getFullYear();return i.setFullYear(f+1),{from:ft(t),to:i.toISOString()}}else if(zr(t)){let i=new Date(t),f=new Date(i.getFullYear(),i.getMonth()+1,0).getDate();return i.setFullYear(i.getFullYear(),i.getMonth(),f),i.setUTCHours(23),i.setUTCMinutes(59),i.setUTCSeconds(59,999),{from:ft(t),to:i.toISOString()}}else return{from:null,to:null}}}catch{return{from:null,to:null}}};
|
|
9
|
+
Actual: `+s.attribValue);else{var j=s.tag,W=s.tags[s.tags.length-1]||s;j.ns===W.ns&&(j.ns=Object.create(W.ns)),j.ns[b]=s.attribValue}s.attribList.push([s.attribName,s.attribValue])}else s.tag.attributes[s.attribName]=s.attribValue,S(s,"onattribute",{name:s.attribName,value:s.attribValue});s.attribName=s.attribValue=""}function at(s,e){if(s.opt.xmlns){var _=s.tag,b=Ft(s.tagName);_.prefix=b.prefix,_.local=b.local,_.uri=_.ns[b.prefix]||"",_.prefix&&!_.uri&&(B(s,"Unbound namespace prefix: "+JSON.stringify(s.tagName)),_.uri=b.prefix);var j=s.tags[s.tags.length-1]||s;_.ns&&j.ns!==_.ns&&Object.keys(_.ns).forEach(function(ne){S(s,"onopennamespace",{prefix:ne,uri:_.ns[ne]})});for(var W=0,G=s.attribList.length;W<G;W++){var z=s.attribList[W],H=z[0],et=z[1],Y=Ft(H,!0),rt=Y.prefix,en=Y.local,re=rt===""?"":_.ns[rt]||"",jt={name:H,value:et,prefix:rt,local:en,uri:re};rt&&rt!=="xmlns"&&!re&&(B(s,"Unbound namespace prefix: "+JSON.stringify(rt)),jt.uri=rt),s.tag.attributes[H]=jt,S(s,"onattribute",jt)}s.attribList.length=0}s.tag.isSelfClosing=!!e,s.sawRoot=!0,s.tags.push(s.tag),S(s,"onopentag",s.tag),e||(!s.noscript&&s.tagName.toLowerCase()==="script"?s.state=a.SCRIPT:s.state=a.TEXT,s.tag=null,s.tagName=""),s.attribName=s.attribValue="",s.attribList.length=0}function qt(s){if(!s.tagName){B(s,"Weird empty close tag."),s.textNode+="</>",s.state=a.TEXT;return}if(s.script){if(s.tagName!=="script"){s.script+="</"+s.tagName+">",s.tagName="",s.state=a.SCRIPT;return}S(s,"onscript",s.script),s.script=""}var e=s.tags.length,_=s.tagName;s.strict||(_=_[s.looseCase]());for(var b=_;e--;){var j=s.tags[e];if(j.name!==b)B(s,"Unexpected close tag");else break}if(e<0){B(s,"Unmatched closing tag: "+s.tagName),s.textNode+="</"+s.tagName+">",s.state=a.TEXT;return}s.tagName=_;for(var W=s.tags.length;W-- >e;){var G=s.tag=s.tags.pop();s.tagName=s.tag.name,S(s,"onclosetag",s.tagName);var z={};for(var H in G.ns)z[H]=G.ns[H];var et=s.tags[s.tags.length-1]||s;s.opt.xmlns&&G.ns!==et.ns&&Object.keys(G.ns).forEach(function(Y){var rt=G.ns[Y];S(s,"onclosenamespace",{prefix:Y,uri:rt})})}e===0&&(s.closedRoot=!0),s.tagName=s.attribValue=s.attribName="",s.attribList.length=0,s.state=a.TEXT}function Jr(s){var e=s.entity,_=e.toLowerCase(),b,j="";return s.ENTITIES[e]?s.ENTITIES[e]:s.ENTITIES[_]?s.ENTITIES[_]:(e=_,e.charAt(0)==="#"&&(e.charAt(1)==="x"?(e=e.slice(2),b=parseInt(e,16),j=b.toString(16)):(e=e.slice(1),b=parseInt(e,10),j=b.toString(10))),e=e.replace(/^0+/,""),isNaN(b)||j.toLowerCase()!==e||b<0||b>1114111?(B(s,"Invalid character entity"),"&"+s.entity+";"):String.fromCodePoint(b))}function ee(s,e){e==="<"?(s.state=a.OPEN_WAKA,s.startTagPosition=s.position):o(e)||(B(s,"Non-whitespace before first tag."),s.textNode=e,s.state=a.TEXT)}function Rt(s,e){var _="";return e<s.length&&(_=s.charAt(e)),_}function tn(s){var e=this;if(this.error)throw this.error;if(e.closed)return J(e,"Cannot write after close. Assign an onready handler.");if(s===null)return ht(e);typeof s=="object"&&(s=s.toString());for(var _=0,b="";b=Rt(s,_++),e.c=b,!!b;)switch(e.trackPosition&&(e.position++,b===`
|
|
10
|
+
`?(e.line++,e.column=0):e.column++),e.state){case a.BEGIN:if(e.state=a.BEGIN_WHITESPACE,b==="\uFEFF")continue;ee(e,b);continue;case a.BEGIN_WHITESPACE:ee(e,b);continue;case a.TEXT:if(e.sawRoot&&!e.closedRoot){for(var W=_-1;b&&b!=="<"&&b!=="&";)b=Rt(s,_++),b&&e.trackPosition&&(e.position++,b===`
|
|
11
|
+
`?(e.line++,e.column=0):e.column++);e.textNode+=s.substring(W,_-1)}b==="<"&&!(e.sawRoot&&e.closedRoot&&!e.strict)?(e.state=a.OPEN_WAKA,e.startTagPosition=e.position):(!o(b)&&(!e.sawRoot||e.closedRoot)&&B(e,"Text data outside of root node."),b==="&"?e.state=a.TEXT_ENTITY:e.textNode+=b);continue;case a.SCRIPT:b==="<"?e.state=a.SCRIPT_ENDING:e.script+=b;continue;case a.SCRIPT_ENDING:b==="/"?e.state=a.CLOSE_TAG:(e.script+="<"+b,e.state=a.SCRIPT);continue;case a.OPEN_WAKA:if(b==="!")e.state=a.SGML_DECL,e.sgmlDecl="";else if(!o(b))if(L(A,b))e.state=a.OPEN_TAG,e.tagName=b;else if(b==="/")e.state=a.CLOSE_TAG,e.tagName="";else if(b==="?")e.state=a.PROC_INST,e.procInstName=e.procInstBody="";else{if(B(e,"Unencoded <"),e.startTagPosition+1<e.position){var j=e.position-e.startTagPosition;b=new Array(j).join(" ")+b}e.textNode+="<"+b,e.state=a.TEXT}continue;case a.SGML_DECL:if(e.sgmlDecl+b==="--"){e.state=a.COMMENT,e.comment="",e.sgmlDecl="";continue}e.doctype&&e.doctype!==!0&&e.sgmlDecl?(e.state=a.DOCTYPE_DTD,e.doctype+="<!"+e.sgmlDecl+b,e.sgmlDecl=""):(e.sgmlDecl+b).toUpperCase()===O?(S(e,"onopencdata"),e.state=a.CDATA,e.sgmlDecl="",e.cdata=""):(e.sgmlDecl+b).toUpperCase()===D?(e.state=a.DOCTYPE,(e.doctype||e.sawRoot)&&B(e,"Inappropriately located doctype declaration"),e.doctype="",e.sgmlDecl=""):b===">"?(S(e,"onsgmldeclaration",e.sgmlDecl),e.sgmlDecl="",e.state=a.TEXT):(n(b)&&(e.state=a.SGML_DECL_QUOTED),e.sgmlDecl+=b);continue;case a.SGML_DECL_QUOTED:b===e.q&&(e.state=a.SGML_DECL,e.q=""),e.sgmlDecl+=b;continue;case a.DOCTYPE:b===">"?(e.state=a.TEXT,S(e,"ondoctype",e.doctype),e.doctype=!0):(e.doctype+=b,b==="["?e.state=a.DOCTYPE_DTD:n(b)&&(e.state=a.DOCTYPE_QUOTED,e.q=b));continue;case a.DOCTYPE_QUOTED:e.doctype+=b,b===e.q&&(e.q="",e.state=a.DOCTYPE);continue;case a.DOCTYPE_DTD:b==="]"?(e.doctype+=b,e.state=a.DOCTYPE):b==="<"?(e.state=a.OPEN_WAKA,e.startTagPosition=e.position):n(b)?(e.doctype+=b,e.state=a.DOCTYPE_DTD_QUOTED,e.q=b):e.doctype+=b;continue;case a.DOCTYPE_DTD_QUOTED:e.doctype+=b,b===e.q&&(e.state=a.DOCTYPE_DTD,e.q="");continue;case a.COMMENT:b==="-"?e.state=a.COMMENT_ENDING:e.comment+=b;continue;case a.COMMENT_ENDING:b==="-"?(e.state=a.COMMENT_ENDED,e.comment=R(e.opt,e.comment),e.comment&&S(e,"oncomment",e.comment),e.comment=""):(e.comment+="-"+b,e.state=a.COMMENT);continue;case a.COMMENT_ENDED:b!==">"?(B(e,"Malformed comment"),e.comment+="--"+b,e.state=a.COMMENT):e.doctype&&e.doctype!==!0?e.state=a.DOCTYPE_DTD:e.state=a.TEXT;continue;case a.CDATA:for(var W=_-1;b&&b!=="]";)b=Rt(s,_++),b&&e.trackPosition&&(e.position++,b===`
|
|
12
|
+
`?(e.line++,e.column=0):e.column++);e.cdata+=s.substring(W,_-1),b==="]"&&(e.state=a.CDATA_ENDING);continue;case a.CDATA_ENDING:b==="]"?e.state=a.CDATA_ENDING_2:(e.cdata+="]"+b,e.state=a.CDATA);continue;case a.CDATA_ENDING_2:b===">"?(e.cdata&&S(e,"oncdata",e.cdata),S(e,"onclosecdata"),e.cdata="",e.state=a.TEXT):b==="]"?e.cdata+="]":(e.cdata+="]]"+b,e.state=a.CDATA);continue;case a.PROC_INST:b==="?"?e.state=a.PROC_INST_ENDING:o(b)?e.state=a.PROC_INST_BODY:e.procInstName+=b;continue;case a.PROC_INST_BODY:if(!e.procInstBody&&o(b))continue;b==="?"?e.state=a.PROC_INST_ENDING:e.procInstBody+=b;continue;case a.PROC_INST_ENDING:if(b===">"){let et={name:e.procInstName,body:e.procInstBody};q(e,et),S(e,"onprocessinginstruction",et),e.procInstName=e.procInstBody="",e.state=a.TEXT}else e.procInstBody+="?"+b,e.state=a.PROC_INST_BODY;continue;case a.OPEN_TAG:L(M,b)?e.tagName+=b:(Zr(e),b===">"?at(e):b==="/"?e.state=a.OPEN_TAG_SLASH:(o(b)||B(e,"Invalid character in tag name"),e.state=a.ATTRIB));continue;case a.OPEN_TAG_SLASH:b===">"?(at(e,!0),qt(e)):(B(e,"Forward-slash in opening tag not followed by >"),e.state=a.ATTRIB);continue;case a.ATTRIB:if(o(b))continue;b===">"?at(e):b==="/"?e.state=a.OPEN_TAG_SLASH:L(A,b)?(e.attribName=b,e.attribValue="",e.state=a.ATTRIB_NAME):B(e,"Invalid attribute name");continue;case a.ATTRIB_NAME:b==="="?e.state=a.ATTRIB_VALUE:b===">"?(B(e,"Attribute without value"),e.attribValue=e.attribName,Xt(e),at(e)):o(b)?e.state=a.ATTRIB_NAME_SAW_WHITE:L(M,b)?e.attribName+=b:B(e,"Invalid attribute name");continue;case a.ATTRIB_NAME_SAW_WHITE:if(b==="=")e.state=a.ATTRIB_VALUE;else{if(o(b))continue;B(e,"Attribute without value"),e.tag.attributes[e.attribName]="",e.attribValue="",S(e,"onattribute",{name:e.attribName,value:""}),e.attribName="",b===">"?at(e):L(A,b)?(e.attribName=b,e.state=a.ATTRIB_NAME):(B(e,"Invalid attribute name"),e.state=a.ATTRIB)}continue;case a.ATTRIB_VALUE:if(o(b))continue;n(b)?(e.q=b,e.state=a.ATTRIB_VALUE_QUOTED):(e.opt.unquotedAttributeValues||J(e,"Unquoted attribute value"),e.state=a.ATTRIB_VALUE_UNQUOTED,e.attribValue=b);continue;case a.ATTRIB_VALUE_QUOTED:if(b!==e.q){b==="&"?e.state=a.ATTRIB_VALUE_ENTITY_Q:e.attribValue+=b;continue}Xt(e),e.q="",e.state=a.ATTRIB_VALUE_CLOSED;continue;case a.ATTRIB_VALUE_CLOSED:o(b)?e.state=a.ATTRIB:b===">"?at(e):b==="/"?e.state=a.OPEN_TAG_SLASH:L(A,b)?(B(e,"No whitespace between attributes"),e.attribName=b,e.attribValue="",e.state=a.ATTRIB_NAME):B(e,"Invalid attribute name");continue;case a.ATTRIB_VALUE_UNQUOTED:if(!h(b)){b==="&"?e.state=a.ATTRIB_VALUE_ENTITY_U:e.attribValue+=b;continue}Xt(e),b===">"?at(e):e.state=a.ATTRIB;continue;case a.CLOSE_TAG:if(e.tagName)b===">"?qt(e):L(M,b)?e.tagName+=b:e.script?(e.script+="</"+e.tagName+b,e.tagName="",e.state=a.SCRIPT):(o(b)||B(e,"Invalid tagname in closing tag"),e.state=a.CLOSE_TAG_SAW_WHITE);else{if(o(b))continue;I(A,b)?e.script?(e.script+="</"+b,e.state=a.SCRIPT):B(e,"Invalid tagname in closing tag."):e.tagName=b}continue;case a.CLOSE_TAG_SAW_WHITE:if(o(b))continue;b===">"?qt(e):B(e,"Invalid characters in closing tag");continue;case a.TEXT_ENTITY:case a.ATTRIB_VALUE_ENTITY_Q:case a.ATTRIB_VALUE_ENTITY_U:var G,z;switch(e.state){case a.TEXT_ENTITY:G=a.TEXT,z="textNode";break;case a.ATTRIB_VALUE_ENTITY_Q:G=a.ATTRIB_VALUE_QUOTED,z="attribValue";break;case a.ATTRIB_VALUE_ENTITY_U:G=a.ATTRIB_VALUE_UNQUOTED,z="attribValue";break}if(b===";"){var H=Jr(e);e.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(H)?((e.entityCount+=1)>e.opt.maxEntityCount&&J(e,"Parsed entity count exceeds max entity count"),(e.entityDepth+=1)>e.opt.maxEntityDepth&&J(e,"Parsed entity depth exceeds max entity depth"),e.entity="",e.state=G,e.write(H),e.entityDepth-=1):(e[z]+=H,e.entity="",e.state=G)}else L(e.entity.length?d:C,b)?e.entity+=b:(B(e,"Invalid character in entity name"),e[z]+="&"+e.entity+b,e.entity="",e.state=G);continue;default:throw new Error(e,"Unknown state: "+e.state)}return e.position>=e.bufferCheckPosition&&y(e),e}String.fromCodePoint||(function(){var s=String.fromCharCode,e=Math.floor,_=function(){var b=16384,j=[],W,G,z=-1,H=arguments.length;if(!H)return"";for(var et="";++z<H;){var Y=Number(arguments[z]);if(!isFinite(Y)||Y<0||Y>1114111||e(Y)!==Y)throw RangeError("Invalid code point: "+Y);Y<=65535?j.push(Y):(Y-=65536,W=(Y>>10)+55296,G=Y%1024+56320,j.push(W,G)),(z+1===H||j.length>b)&&(et+=s.apply(null,j),j.length=0)}return et};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:_,configurable:!0,writable:!0}):String.fromCodePoint=_})()})(typeof Pt>"u"?Pt.sax={}:Pt)});var jr=F((xn,Ht)=>{"use strict";var pt=typeof Reflect=="object"?Reflect:null,vr=pt&&typeof pt.apply=="function"?pt.apply:function(r,c,y){return Function.prototype.apply.call(r,c,y)},xt;pt&&typeof pt.ownKeys=="function"?xt=pt.ownKeys:Object.getOwnPropertySymbols?xt=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:xt=function(r){return Object.getOwnPropertyNames(r)};function fn(t){console&&console.warn&&console.warn(t)}var Ar=Number.isNaN||function(r){return r!==r};function U(){U.init.call(this)}Ht.exports=U;Ht.exports.once=mn;U.EventEmitter=U;U.prototype._events=void 0;U.prototype._eventsCount=0;U.prototype._maxListeners=void 0;var Mr=10;function St(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(U,"defaultMaxListeners",{enumerable:!0,get:function(){return Mr},set:function(t){if(typeof t!="number"||t<0||Ar(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Mr=t}});U.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};U.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||Ar(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function Pr(t){return t._maxListeners===void 0?U.defaultMaxListeners:t._maxListeners}U.prototype.getMaxListeners=function(){return Pr(this)};U.prototype.emit=function(r){for(var c=[],y=1;y<arguments.length;y++)c.push(arguments[y]);var i=r==="error",f=this._events;if(f!==void 0)i=i&&f.error===void 0;else if(!i)return!1;if(i){var u;if(c.length>0&&(u=c[0]),u instanceof Error)throw u;var l=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw l.context=u,l}var m=f[r];if(m===void 0)return!1;if(typeof m=="function")vr(m,this,c);else for(var g=m.length,N=qr(m,g),y=0;y<g;++y)vr(N[y],this,c);return!0};function xr(t,r,c,y){var i,f,u;if(St(c),f=t._events,f===void 0?(f=t._events=Object.create(null),t._eventsCount=0):(f.newListener!==void 0&&(t.emit("newListener",r,c.listener?c.listener:c),f=t._events),u=f[r]),u===void 0)u=f[r]=c,++t._eventsCount;else if(typeof u=="function"?u=f[r]=y?[c,u]:[u,c]:y?u.unshift(c):u.push(c),i=Pr(t),i>0&&u.length>i&&!u.warned){u.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=r,l.count=u.length,fn(l)}return t}U.prototype.addListener=function(r,c){return xr(this,r,c,!1)};U.prototype.on=U.prototype.addListener;U.prototype.prependListener=function(r,c){return xr(this,r,c,!0)};function hn(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Sr(t,r,c){var y={fired:!1,wrapFn:void 0,target:t,type:r,listener:c},i=hn.bind(y);return i.listener=c,y.wrapFn=i,i}U.prototype.once=function(r,c){return St(c),this.on(r,Sr(this,r,c)),this};U.prototype.prependOnceListener=function(r,c){return St(c),this.prependListener(r,Sr(this,r,c)),this};U.prototype.removeListener=function(r,c){var y,i,f,u,l;if(St(c),i=this._events,i===void 0)return this;if(y=i[r],y===void 0)return this;if(y===c||y.listener===c)--this._eventsCount===0?this._events=Object.create(null):(delete i[r],i.removeListener&&this.emit("removeListener",r,y.listener||c));else if(typeof y!="function"){for(f=-1,u=y.length-1;u>=0;u--)if(y[u]===c||y[u].listener===c){l=y[u].listener,f=u;break}if(f<0)return this;f===0?y.shift():pn(y,f),y.length===1&&(i[r]=y[0]),i.removeListener!==void 0&&this.emit("removeListener",r,l||c)}return this};U.prototype.off=U.prototype.removeListener;U.prototype.removeAllListeners=function(r){var c,y,i;if(y=this._events,y===void 0)return this;if(y.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):y[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete y[r]),this;if(arguments.length===0){var f=Object.keys(y),u;for(i=0;i<f.length;++i)u=f[i],u!=="removeListener"&&this.removeAllListeners(u);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(c=y[r],typeof c=="function")this.removeListener(r,c);else if(c!==void 0)for(i=c.length-1;i>=0;i--)this.removeListener(r,c[i]);return this};function Fr(t,r,c){var y=t._events;if(y===void 0)return[];var i=y[r];return i===void 0?[]:typeof i=="function"?c?[i.listener||i]:[i]:c?dn(i):qr(i,i.length)}U.prototype.listeners=function(r){return Fr(this,r,!0)};U.prototype.rawListeners=function(r){return Fr(this,r,!1)};U.listenerCount=function(t,r){return typeof t.listenerCount=="function"?t.listenerCount(r):Xr.call(t,r)};U.prototype.listenerCount=Xr;function Xr(t){var r=this._events;if(r!==void 0){var c=r[t];if(typeof c=="function")return 1;if(c!==void 0)return c.length}return 0}U.prototype.eventNames=function(){return this._eventsCount>0?xt(this._events):[]};function qr(t,r){for(var c=new Array(r),y=0;y<r;++y)c[y]=t[y];return c}function pn(t,r){for(;r+1<t.length;r++)t[r]=t[r+1];t.pop()}function dn(t){for(var r=new Array(t.length),c=0;c<r.length;++c)r[c]=t[c].listener||t[c];return r}function mn(t,r){return new Promise(function(c,y){function i(u){t.removeListener(r,f),y(u)}function f(){typeof t.removeListener=="function"&&t.removeListener("error",i),c([].slice.call(arguments))}Rr(t,r,f,{once:!0}),r!=="error"&&yn(t,i,{once:!0})})}function yn(t,r,c){typeof t.on=="function"&&Rr(t,"error",r,c)}function Rr(t,r,c,y){if(typeof t.on=="function")y.once?t.once(r,c):t.on(r,c);else if(typeof t.addEventListener=="function")t.addEventListener(r,function i(f){y.once&&t.removeEventListener(r,i),c(f)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}});var Br=F($t=>{(function(){"use strict";$t.stripBOM=function(t){return t[0]==="\uFEFF"?t.substring(1):t}}).call($t)});var Qt=F(ct=>{(function(){"use strict";var t;t=new RegExp(/(?!xmlns)^.*:/),ct.normalize=function(r){return r.toLowerCase()},ct.firstCharLowerCase=function(r){return r.charAt(0).toLowerCase()+r.slice(1)},ct.stripPrefix=function(r){return r.replace(t,"")},ct.parseNumbers=function(r){return isNaN(r)||(r=r%1===0?parseInt(r,10):parseFloat(r)),r},ct.parseBooleans=function(r){return/^(?:true|false)$/i.test(r)&&(r=r.toLowerCase()==="true"),r}}).call(ct)});var Vr=F(Ur=>{Ur.every=function(t){return new Zt(t)};var nt={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};for(lt in nt)lt==="millisecond"?nt.ms=nt[lt]:nt[lt.charAt(0)]=nt[lt],nt[lt+"s"]=nt[lt];var lt;function Zt(t){this.count=0;var r=wn(t);r&&(this.time=Number(r[0])*nt[r[1]],this.type=r[1])}Zt.prototype.do=function(t){this.time&&(this.interval=setInterval(c,this.time));var r=this;function c(){r.count++,t.call(r)}return this};Zt.prototype.stop=function(){return this.interval&&(clearInterval(this.interval),delete this.interval),this};var gn=/^\s*(\d+(?:\.\d+)?)\s*([a-z]+)\s*$/;function wn(t){var r=t.match(gn);return r&&nt[r[2]]?r.slice(1):null}});var Wr=F(it=>{(function(){"use strict";var t,r,c,y,i,f,u,l,m,g=function(D,p){return function(){return D.apply(p,arguments)}},N=function(D,p){for(var T in p)O.call(p,T)&&(D[T]=p[T]);function E(){this.constructor=D}return E.prototype=p.prototype,D.prototype=new E,D.__super__=p.prototype,D},O={}.hasOwnProperty;l=_r(),y=jr(),t=Br(),u=Qt(),m=Vr().setImmediate,r=gt().defaults,i=function(D){return typeof D=="object"&&D!=null&&Object.keys(D).length===0},f=function(D,p,T){var E,A,M;for(E=0,A=D.length;E<A;E++)M=D[E],p=M(p,T);return p},c=function(D,p,T){var E;return E=Object.create(null),E.value=T,E.writable=!0,E.enumerable=!0,E.configurable=!0,Object.defineProperty(D,p,E)},it.Parser=(function(D){N(p,D);function p(T){this.parseStringPromise=g(this.parseStringPromise,this),this.parseString=g(this.parseString,this),this.reset=g(this.reset,this),this.assignOrPush=g(this.assignOrPush,this),this.processAsync=g(this.processAsync,this);var E,A,M;if(!(this instanceof it.Parser))return new it.Parser(T);this.options={},A=r["0.2"];for(E in A)O.call(A,E)&&(M=A[E],this.options[E]=M);for(E in T)O.call(T,E)&&(M=T[E],this.options[E]=M);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(u.normalize)),this.reset()}return p.prototype.processAsync=function(){var T,E;try{return this.remaining.length<=this.options.chunkSize?(T=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(T),this.saxParser.close()):(T=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(T),m(this.processAsync))}catch(A){if(E=A,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(E)}},p.prototype.assignOrPush=function(T,E,A){return E in T?(T[E]instanceof Array||c(T,E,[T[E]]),T[E].push(A)):this.options.explicitArray?c(T,E,[A]):c(T,E,A)},p.prototype.reset=function(){var T,E,A,M;return this.removeAllListeners(),this.saxParser=l.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(function(C){return function(d){if(C.saxParser.resume(),!C.saxParser.errThrown)return C.saxParser.errThrown=!0,C.emit("error",d)}})(this),this.saxParser.onend=(function(C){return function(){if(!C.saxParser.ended)return C.saxParser.ended=!0,C.emit("end",C.resultObject)}})(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,M=[],T=this.options.attrkey,E=this.options.charkey,this.saxParser.onopentag=(function(C){return function(d){var o,n,h,L,I;if(h={},h[E]="",!C.options.ignoreAttrs){I=d.attributes;for(o in I)O.call(I,o)&&(!(T in h)&&!C.options.mergeAttrs&&(h[T]={}),n=C.options.attrValueProcessors?f(C.options.attrValueProcessors,d.attributes[o],o):d.attributes[o],L=C.options.attrNameProcessors?f(C.options.attrNameProcessors,o):o,C.options.mergeAttrs?C.assignOrPush(h,L,n):c(h[T],L,n))}return h["#name"]=C.options.tagNameProcessors?f(C.options.tagNameProcessors,d.name):d.name,C.options.xmlns&&(h[C.options.xmlnskey]={uri:d.uri,local:d.local}),M.push(h)}})(this),this.saxParser.onclosetag=(function(C){return function(){var d,o,n,h,L,I,a,w,v,P;if(I=M.pop(),L=I["#name"],(!C.options.explicitChildren||!C.options.preserveChildrenOrder)&&delete I["#name"],I.cdata===!0&&(d=I.cdata,delete I.cdata),v=M[M.length-1],I[E].match(/^\s*$/)&&!d?(o=I[E],delete I[E]):(C.options.trim&&(I[E]=I[E].trim()),C.options.normalize&&(I[E]=I[E].replace(/\s{2,}/g," ").trim()),I[E]=C.options.valueProcessors?f(C.options.valueProcessors,I[E],L):I[E],Object.keys(I).length===1&&E in I&&!C.EXPLICIT_CHARKEY&&(I=I[E])),i(I)&&(typeof C.options.emptyTag=="function"?I=C.options.emptyTag():I=C.options.emptyTag!==""?C.options.emptyTag:o),C.options.validator!=null&&(P="/"+(function(){var x,X,q;for(q=[],x=0,X=M.length;x<X;x++)h=M[x],q.push(h["#name"]);return q})().concat(L).join("/"),(function(){var x;try{return I=C.options.validator(P,v&&v[L],I)}catch(X){return x=X,C.emit("error",x)}})()),C.options.explicitChildren&&!C.options.mergeAttrs&&typeof I=="object"){if(!C.options.preserveChildrenOrder)h={},C.options.attrkey in I&&(h[C.options.attrkey]=I[C.options.attrkey],delete I[C.options.attrkey]),!C.options.charsAsChildren&&C.options.charkey in I&&(h[C.options.charkey]=I[C.options.charkey],delete I[C.options.charkey]),Object.getOwnPropertyNames(I).length>0&&(h[C.options.childkey]=I),I=h;else if(v){v[C.options.childkey]=v[C.options.childkey]||[],a={};for(n in I)O.call(I,n)&&c(a,n,I[n]);v[C.options.childkey].push(a),delete I["#name"],Object.keys(I).length===1&&E in I&&!C.EXPLICIT_CHARKEY&&(I=I[E])}}return M.length>0?C.assignOrPush(v,L,I):(C.options.explicitRoot&&(w=I,I={},c(I,L,w)),C.resultObject=I,C.saxParser.ended=!0,C.emit("end",C.resultObject))}})(this),A=(function(C){return function(d){var o,n;if(n=M[M.length-1],n)return n[E]+=d,C.options.explicitChildren&&C.options.preserveChildrenOrder&&C.options.charsAsChildren&&(C.options.includeWhiteChars||d.replace(/\\n/g,"").trim()!=="")&&(n[C.options.childkey]=n[C.options.childkey]||[],o={"#name":"__text__"},o[E]=d,C.options.normalize&&(o[E]=o[E].replace(/\s{2,}/g," ").trim()),n[C.options.childkey].push(o)),n}})(this),this.saxParser.ontext=A,this.saxParser.oncdata=(function(C){return function(d){var o;if(o=A(d),o)return o.cdata=!0}})(this)},p.prototype.parseString=function(T,E){var A;E!=null&&typeof E=="function"&&(this.on("end",function(M){return this.reset(),E(null,M)}),this.on("error",function(M){return this.reset(),E(M)}));try{return T=T.toString(),T.trim()===""?(this.emit("end",null),!0):(T=t.stripBOM(T),this.options.async?(this.remaining=T,m(this.processAsync),this.saxParser):this.saxParser.write(T).close())}catch(M){if(A=M,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw A}else return this.emit("error",A),this.saxParser.errThrown=!0}},p.prototype.parseStringPromise=function(T){return new Promise((function(E){return function(A,M){return E.parseString(T,function(C,d){return C?M(C):A(d)})}})(this))},p})(y),it.parseString=function(D,p,T){var E,A,M;return T!=null?(typeof T=="function"&&(E=T),typeof p=="object"&&(A=p)):(typeof p=="function"&&(E=p),A={}),M=new it.Parser(A),M.parseString(D,E)},it.parseStringPromise=function(D,p){var T,E;return typeof p=="object"&&(T=p),E=new it.Parser(T),E.parseStringPromise(D)}}).call(it)});var kr=F(ot=>{(function(){"use strict";var t,r,c,y,i=function(u,l){for(var m in l)f.call(l,m)&&(u[m]=l[m]);function g(){this.constructor=u}return g.prototype=l.prototype,u.prototype=new g,u.__super__=l.prototype,u},f={}.hasOwnProperty;r=gt(),t=Nr(),c=Wr(),y=Qt(),ot.defaults=r.defaults,ot.processors=y,ot.ValidationError=(function(u){i(l,u);function l(m){this.message=m}return l})(Error),ot.Builder=t.Builder,ot.Parser=c.Parser,ot.parseString=c.parseString,ot.parseStringPromise=c.parseStringPromise}).call(ot)});var te=cn(kr()),$r=8e3;self.onmessage=async t=>{let{sourceType:r}=t.data;try{let c;if(r==="wms"){let{url:y,options:i}=t.data;c=await Tn(y,i)}else if(r==="wmts"){let{url:y,options:i}=t.data;c=await bn(y,i)}else c=null;self.postMessage(c)}catch{self.postMessage(null)}};var Tn=async(t,r)=>{let c=t+"?request=getcapabilities&service=wms",y=new AbortController,i=setTimeout(()=>y.abort(),$r);try{let f=await fetch(c,{signal:y.signal});if(!f.ok)throw new Error(`(${f.status}) Error fetching capabilities.. ${f.statusText}`);let u=await f.text();return await Dn(u,c,r)}finally{clearTimeout(i)}},Dn=async(t,r,c)=>{let y=0,i=(g,N,O=null,D=0)=>{if(y>=c.maxNodes||D>c.maxDepth)return;y+=1;let p={name:g.Name?Q(g.Name[0]):"",description:g.Abstract?Q(g.Abstract[0]):"",selected:!1,parent:O,time:null};if(g.Title&&(p.title=Q(g.Title[0])),Array.isArray(g.Dimension)){for(let T of g.Dimension)if(T.$?.name.toLowerCase()==="time"&&T.$?.units==="ISO8601"){p.time=Object.assign({current:T.$?.default??null},Qr(T._,T.$?.default));break}}g.Layer&&(p.children=[],g.Layer.forEach(T=>i(T,p.children,p,D+1))),N.push(p)};if(t.indexOf("<Capability")===-1)throw new Error("Error: Invalid response received!");let f=await(0,te.parseStringPromise)(t);if(!f.WMS_Capabilities&&!f.WMT_MS_Capabilities)throw new Error("Error: No Capabilities found!");let u=f.WMS_Capabilities?f.WMS_Capabilities:f.WMT_MS_Capabilities?f.WMT_MS_Capabilities:void 0;if(!u?.Capability[0].Layer)throw new Error("Error: No layer information found!");let l={name:"",description:"",type:"WMS",url:r,layers:[]};if(Z(u?.Service)){let g=u?.Service[0];l.name=Z(g.Title)?Q(g.Title[0]):Z(g.Name)?Q(g.Name[0]):"WMS",l.description=Z(g.Abstract)?Q(g.Abstract[0]):""}let m=[];return u.Capability[0].Layer.forEach(g=>{i(g,m)}),m.sort((g,N)=>g.name<N.name?-1:1),l.layers=m,l},bn=async(t,r)=>{let c=t+"?request=GetCapabilities&service=wmts",y=new AbortController,i=setTimeout(()=>y.abort(),$r);try{let f=await fetch(c,{signal:y.signal});if(!f.ok)throw new Error(`(${f.status}) Error fetching capabilities.. ${f.statusText}`);let u=await f.text();return await En(u,c,r)}finally{clearTimeout(i)}},En=async(t,r,c)=>{let y=l=>{if(!Z(l["ows:Identifier"]))return null;let m={name:Z(l["ows:Title"])?Q(l["ows:Title"][0]):"",description:Z(l["ows:Abstract"])?Q(l["ows:Abstract"][0]):"",id:Q(l["ows:Identifier"][0]),format:"png"};if(Z(l["ows:WGS84BoundingBox"])&&(m.bounds=[Number(l["ows:WGS84BoundingBox"][0]["ows:LowerCorner"][0].split(" ")[0]),Number(l["ows:WGS84BoundingBox"][0]["ows:LowerCorner"][0].split(" ")[1]),Number(l["ows:WGS84BoundingBox"][0]["ows:UpperCorner"][0].split(" ")[0]),Number(l["ows:WGS84BoundingBox"][0]["ows:UpperCorner"][0].split(" ")[1])]),Z(l.Format)){let g=Q(l.Format[0]);m.format=g.indexOf("jpg")!==-1?"jpg":"png"}return Z(l.Dimension)&&l.Dimension.forEach(g=>{Q(g["ows:Identifier"][0]).toLowerCase()==="time"&&(m.time=Object.assign({current:ft(Q(g.Default[0]))??null},Qr(g.Value,Q(g.Default[0]))))}),m};if(t.indexOf("<Capabilities")===-1)throw new Error("Error: Invalid response received!");let i=await(0,te.parseStringPromise)(t);if(!Z(i.Capabilities?.Contents))throw new Error("Error: No Capabilities found!");if(!Z(i.Capabilities.Contents[0].Layer))throw new Error("Error: No layer information found!");let f={name:"",description:"",type:"WMTS",url:r,layers:[]},u=0;for(let l of i.Capabilities.Contents[0].Layer){if(u>=c.maxNodes)break;let m=y(l);m&&f.layers.push(m),u++}return f.layers.sort((l,m)=>l.name<m.name?-1:1),f},Z=t=>Array.isArray(t)&&t.length!==0,Q=t=>typeof t=="string"?t:t._??"",Jt=t=>{let r=/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$/,c=t.match(r);return c?{years:parseInt(c[1]??"0"),months:parseInt(c[2]??"0"),weeks:parseInt(c[3]??"0"),days:parseInt(c[4]??"0"),hours:parseInt(c[5]??"0"),minutes:parseInt(c[6]??"0"),seconds:parseFloat(c[7]??"0")}:{years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0}},Nn=t=>{let r=Jt(t);return r.weeks*(3600*1e3*24*7)+r.days*(3600*1e3*24)+r.hours*(3600*1e3)+r.minutes*(60*1e3)+r.seconds*1e3},Gr=(t,r,c)=>{let y={y:new Date(t).getFullYear(),m:new Date(t).getMonth(),d:new Date(t).getDate()},i={y:c?y.y+r.years:y.y-r.years,m:c?y.m+r.months:y.m-r.months,d:c?y.d+r.days:y.d-r.days};if(r.weeks){let l=r.weeks*7;i.d=c?i.d+l:i.d-l}let f=new Date(t);f.setFullYear(i.y,i.m,i.d);let u=r.hours*(1e3*3600)+r.minutes*(1e3*60)+r.seconds*1e3;return u=c?u:0-u,f.setTime(f.getTime()+u),f.toISOString()},Yr=t=>t.startsWith("P"),Kr=t=>!t.includes("-")&&!t.includes(":"),zr=t=>t.split("-").length===2&&!t.includes("T"),On=t=>t.split("-").length===3&&!t.includes("T"),In=t=>t.length===8&&!t.startsWith("P"),Ln=t=>t.includes("T")&&!t.includes(":"),Hr=t=>t.includes("/"),ft=t=>{try{return t.toLocaleLowerCase()==="current"||t.toLocaleLowerCase()==="present"?new Date().toISOString():(In(t)?t=`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6)}`:Ln(t)&&(t+=":00:00.000Z"),new Date(t).toISOString())}catch(r){throw new Error(`Unhandled Date format (${t})`,{cause:r})}},Qr=(t,r)=>{let c=i=>{if(Kr(i))return`${i}-12-31T23:59:59.999Z`;if(zr(i)){let f=i.split("-").map(l=>parseInt(l)),u=new Date(f[0],f[1],0).getDate();return`${i}-${u}T23:59:59.999Z`}else return On(i)?`${i}T23:59:59.999Z`:ft(i)},y=i=>{let f={from:null,to:null};if((i[0].toLocaleLowerCase()==="present"||i[0].toLocaleLowerCase()==="current")&&(i[0]=new Date().toISOString()),(i[1].toLocaleLowerCase()==="present"||i[1].toLocaleLowerCase()==="current")&&(i[1]=new Date().toISOString()),Yr(i[0])?f.from=Gr(i[1],Jt(i[0]),!1):f.from=ft(i[0]),Yr(i[1])?f.to=Gr(i[0],Jt(i[1]),!0):f.to=c(i[1]),i.length===3){let u=Nn(i[2]);u&&(f.interval=u)}return f};try{if(Array.isArray(t)){let i=[];if(t.forEach(u=>{if(Hr(u)){let l=y(u.split("/"));l&&i.push(l)}}),i.length){let u=new Date(r).valueOf();for(let l=0;l<i.length;l++)if(u>=new Date(i[l].from).valueOf()&&u<=new Date(i[l].to).valueOf())return i[l];return i[i.length-1]}let f=t.map(u=>ft(u));if(f.length>1)return{from:f[0]??null,to:f[f.length-1]??null,values:f};t=f[0]}if(t.includes(",")){let i=t.split(",").map(f=>ft(f));return{from:i[0]??null,to:i[i.length-1]??null,values:i}}else if(typeof t=="string"){if(Hr(t))return y(t.split("/"));if(Kr(t)){let i=new Date(t),f=i.getFullYear();return i.setFullYear(f+1),{from:ft(t),to:i.toISOString()}}else if(zr(t)){let i=new Date(t),f=new Date(i.getFullYear(),i.getMonth()+1,0).getDate();return i.setFullYear(i.getFullYear(),i.getMonth(),f),i.setUTCHours(23),i.setUTCMinutes(59),i.setUTCSeconds(59,999),{from:ft(t),to:i.toISOString()}}else return{from:null,to:null}}}catch{return{from:null,to:null}}};export{Dn as parseWMSCapabilities,En as parseWMTSCapabilities};
|