@signalk/freeboard-sk
Version:
Openlayers chart plotter implementation for Signal K
3 lines • 147 kB
JavaScript
var sn=Object.create;var Fe=Object.defineProperty;var un=Object.getOwnPropertyDescriptor;var an=Object.getOwnPropertyNames;var cn=Object.getPrototypeOf,ln=Object.prototype.hasOwnProperty;var B=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var fn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of an(t))!ln.call(e,i)&&i!==r&&Fe(e,i,{get:()=>t[i],enumerable:!(n=un(t,i))||n.enumerable});return e};var hn=(e,t,r)=>(r=e!=null?sn(cn(e)):{},fn(t||!e||!e.__esModule?Fe(r,"default",{value:e,enumerable:!0}):r,e));var vt=B(ne=>{(function(){ne.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:`
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(ne)});var it=B((Se,ht)=>{(function(){var e,t,r,n,i,s,o,c=[].slice,p={}.hasOwnProperty;e=function(){var d,I,D,T,g,E;if(E=arguments[0],g=2<=arguments.length?c.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(d=0,D=g.length;d<D;d++)if(T=g[d],T!=null)for(I in T)p.call(T,I)&&(E[I]=T[I]);return E},i=function(d){return!!d&&Object.prototype.toString.call(d)==="[object Function]"},s=function(d){var I;return!!d&&((I=typeof d)=="function"||I==="object")},r=function(d){return i(Array.isArray)?Array.isArray(d):Object.prototype.toString.call(d)==="[object Array]"},n=function(d){var I;if(r(d))return!d.length;for(I in d)if(p.call(d,I))return!1;return!0},o=function(d){var I,D;return s(d)&&(D=Object.getPrototypeOf(d))&&(I=D.constructor)&&typeof I=="function"&&I instanceof I&&Function.prototype.toString.call(I)===Function.prototype.toString.call(Object)},t=function(d){return i(d.valueOf)?d.valueOf():d},ht.exports.assign=e,ht.exports.isFunction=i,ht.exports.isObject=s,ht.exports.isArray=r,ht.exports.isEmpty=n,ht.exports.isPlainObject=o,ht.exports.getValue=t}).call(Se)});var oe=B((Be,Re)=>{(function(){var e;Re.exports=e=(function(){function t(){}return t.prototype.hasFeature=function(r,n){return!0},t.prototype.createDocumentType=function(r,n,i){throw new Error("This DOM method is not implemented.")},t.prototype.createDocument=function(r,n,i){throw new Error("This DOM method is not implemented.")},t.prototype.createHTMLDocument=function(r){throw new Error("This DOM method is not implemented.")},t.prototype.getFeature=function(r,n){throw new Error("This DOM method is not implemented.")},t})()}).call(Be)});var Xe=B((Ue,qe)=>{(function(){var e;qe.exports=e=(function(){function t(){}return t.prototype.handleError=function(r){throw new Error(r)},t})()}).call(Ue)});var Ve=B((je,ke)=>{(function(){var e;ke.exports=e=(function(){function t(r){this.arr=r||[]}return Object.defineProperty(t.prototype,"length",{get:function(){return this.arr.length}}),t.prototype.item=function(r){return this.arr[r]||null},t.prototype.contains=function(r){return this.arr.indexOf(r)!==-1},t})()}).call(je)});var Ye=B((We,Ge)=>{(function(){var e,t,r;t=Xe(),r=Ve(),Ge.exports=e=(function(){function n(){var i;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new t,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(n.prototype,"parameterNames",{get:function(){return new r(Object.keys(this.defaultParams))}}),n.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},n.prototype.canSetParameter=function(i,s){return!0},n.prototype.setParameter=function(i,s){return s!=null?this.params[i]=s:delete this.params[i]},n})()}).call(We)});var V=B(($e,Ke)=>{(function(){Ke.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($e)});var se=B((He,ze)=>{(function(){var e,t,r;e=V(),r=Z(),ze.exports=t=(function(){function n(i,s,o){if(this.parent=i,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),s==null)throw new Error("Missing attribute name. "+this.debugInfo(s));this.name=this.stringify.name(s),this.value=this.stringify.attValue(o),this.type=e.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(n.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(n.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defineProperty(n.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(n.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(n.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(n.prototype,"specified",{get:function(){return!0}}),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(i){return this.options.writer.attribute(this,this.options.writer.filterOptions(i))},n.prototype.debugInfo=function(i){return i=i||this.name,i==null?"parent: <"+this.parent.name+">":"attribute: {"+i+"}, parent: <"+this.parent.name+">"},n.prototype.isEqualNode=function(i){return!(i.namespaceURI!==this.namespaceURI||i.prefix!==this.prefix||i.localName!==this.localName||i.value!==this.value)},n})()}).call(He)});var Ft=B((Qe,Ze)=>{(function(){var e;Ze.exports=e=(function(){function t(r){this.nodes=r}return Object.defineProperty(t.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.getNamedItem=function(r){return this.nodes[r]},t.prototype.setNamedItem=function(r){var n;return n=this.nodes[r.nodeName],this.nodes[r.nodeName]=r,n||null},t.prototype.removeNamedItem=function(r){var n;return n=this.nodes[r],delete this.nodes[r],n||null},t.prototype.item=function(r){return this.nodes[Object.keys(this.nodes)[r]]||null},t.prototype.getNamedItemNS=function(r,n){throw new Error("This DOM method is not implemented.")},t.prototype.setNamedItemNS=function(r){throw new Error("This DOM method is not implemented.")},t.prototype.removeNamedItemNS=function(r,n){throw new Error("This DOM method is not implemented.")},t})()}).call(Qe)});var St=B((Je,tr)=>{(function(){var e,t,r,n,i,s,o,c,p,d=function(D,T){for(var g in T)I.call(T,g)&&(D[g]=T[g]);function E(){this.constructor=D}return E.prototype=T.prototype,D.prototype=new E,D.__super__=T.prototype,D},I={}.hasOwnProperty;p=it(),c=p.isObject,o=p.isFunction,s=p.getValue,i=Z(),e=V(),t=se(),n=Ft(),tr.exports=r=(function(D){d(T,D);function T(g,E,N){var v,M,O,m;if(T.__super__.constructor.call(this,g),E==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(E),this.type=e.Element,this.attribs={},this.schemaTypeInfo=null,N!=null&&this.attribute(N),g.type===e.Document&&(this.isRoot=!0,this.documentObject=g,g.rootObject=this,g.children)){for(m=g.children,M=0,O=m.length;M<O;M++)if(v=m[M],v.type===e.DocType){v.name=this.name;break}}}return Object.defineProperty(T.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(T.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(T.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(T.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(T.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(T.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(T.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(T.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new n(this.attribs)),this.attributeMap}}),T.prototype.clone=function(){var g,E,N,v;N=Object.create(this),N.isRoot&&(N.documentObject=null),N.attribs={},v=this.attribs;for(E in v)I.call(v,E)&&(g=v[E],N.attribs[E]=g.clone());return N.children=[],this.children.forEach(function(M){var O;return O=M.clone(),O.parent=N,N.children.push(O)}),N},T.prototype.attribute=function(g,E){var N,v;if(g!=null&&(g=s(g)),c(g))for(N in g)I.call(g,N)&&(v=g[N],this.attribute(N,v));else o(E)&&(E=E.apply()),this.options.keepNullAttributes&&E==null?this.attribs[g]=new t(this,g,""):E!=null&&(this.attribs[g]=new t(this,g,E));return this},T.prototype.removeAttribute=function(g){var E,N,v;if(g==null)throw new Error("Missing attribute name. "+this.debugInfo());if(g=s(g),Array.isArray(g))for(N=0,v=g.length;N<v;N++)E=g[N],delete this.attribs[E];else delete this.attribs[g];return this},T.prototype.toString=function(g){return this.options.writer.element(this,this.options.writer.filterOptions(g))},T.prototype.att=function(g,E){return this.attribute(g,E)},T.prototype.a=function(g,E){return this.attribute(g,E)},T.prototype.getAttribute=function(g){return this.attribs.hasOwnProperty(g)?this.attribs[g].value:null},T.prototype.setAttribute=function(g,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getAttributeNode=function(g){return this.attribs.hasOwnProperty(g)?this.attribs[g]:null},T.prototype.setAttributeNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.removeAttributeNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getAttributeNS=function(g,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.setAttributeNS=function(g,E,N){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.removeAttributeNS=function(g,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getAttributeNodeNS=function(g,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.setAttributeNodeNS=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getElementsByTagNameNS=function(g,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.hasAttribute=function(g){return this.attribs.hasOwnProperty(g)},T.prototype.hasAttributeNS=function(g,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.setIdAttribute=function(g,E){return this.attribs.hasOwnProperty(g)?this.attribs[g].isId:E},T.prototype.setIdAttributeNS=function(g,E,N){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.setIdAttributeNode=function(g,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getElementsByTagNameNS=function(g,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getElementsByClassName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isEqualNode=function(g){var E,N,v;if(!T.__super__.isEqualNode.apply(this,arguments).isEqualNode(g)||g.namespaceURI!==this.namespaceURI||g.prefix!==this.prefix||g.localName!==this.localName||g.attribs.length!==this.attribs.length)return!1;for(E=N=0,v=this.attribs.length-1;0<=v?N<=v:N>=v;E=0<=v?++N:--N)if(!this.attribs[E].isEqualNode(g.attribs[E]))return!1;return!0},T})(i)}).call(Je)});var At=B((er,rr)=>{(function(){var e,t,r=function(i,s){for(var o in s)n.call(s,o)&&(i[o]=s[o]);function c(){this.constructor=i}return c.prototype=s.prototype,i.prototype=new c,i.__super__=s.prototype,i},n={}.hasOwnProperty;t=Z(),rr.exports=e=(function(i){r(s,i);function s(o){s.__super__.constructor.call(this,o),this.value=""}return Object.defineProperty(s.prototype,"data",{get:function(){return this.value},set:function(o){return this.value=o||""}}),Object.defineProperty(s.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(s.prototype,"textContent",{get:function(){return this.value},set:function(o){return this.value=o||""}}),s.prototype.clone=function(){return Object.create(this)},s.prototype.substringData=function(o,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.appendData=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.insertData=function(o,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.deleteData=function(o,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.replaceData=function(o,c,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.isEqualNode=function(o){return!(!s.__super__.isEqualNode.apply(this,arguments).isEqualNode(o)||o.data!==this.data)},s})(t)}).call(er)});var Bt=B((ir,nr)=>{(function(){var e,t,r,n=function(s,o){for(var c in o)i.call(o,c)&&(s[c]=o[c]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},i={}.hasOwnProperty;e=V(),r=At(),nr.exports=t=(function(s){n(o,s);function o(c,p){if(o.__super__.constructor.call(this,c),p==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=e.CData,this.value=this.stringify.cdata(p)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(c){return this.options.writer.cdata(this,this.options.writer.filterOptions(c))},o})(r)}).call(ir)});var Rt=B((or,sr)=>{(function(){var e,t,r,n=function(s,o){for(var c in o)i.call(o,c)&&(s[c]=o[c]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},i={}.hasOwnProperty;e=V(),t=At(),sr.exports=r=(function(s){n(o,s);function o(c,p){if(o.__super__.constructor.call(this,c),p==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=e.Comment,this.value=this.stringify.comment(p)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(c){return this.options.writer.comment(this,this.options.writer.filterOptions(c))},o})(t)}).call(or)});var Ut=B((ur,ar)=>{(function(){var e,t,r,n,i=function(o,c){for(var p in c)s.call(c,p)&&(o[p]=c[p]);function d(){this.constructor=o}return d.prototype=c.prototype,o.prototype=new d,o.__super__=c.prototype,o},s={}.hasOwnProperty;n=it().isObject,r=Z(),e=V(),ar.exports=t=(function(o){i(c,o);function c(p,d,I,D){var T;c.__super__.constructor.call(this,p),n(d)&&(T=d,d=T.version,I=T.encoding,D=T.standalone),d||(d="1.0"),this.type=e.Declaration,this.version=this.stringify.xmlVersion(d),I!=null&&(this.encoding=this.stringify.xmlEncoding(I)),D!=null&&(this.standalone=this.stringify.xmlStandalone(D))}return c.prototype.toString=function(p){return this.options.writer.declaration(this,this.options.writer.filterOptions(p))},c})(r)}).call(ur)});var qt=B((cr,lr)=>{(function(){var e,t,r,n=function(s,o){for(var c in o)i.call(o,c)&&(s[c]=o[c]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},i={}.hasOwnProperty;r=Z(),e=V(),lr.exports=t=(function(s){n(o,s);function o(c,p,d,I,D,T){if(o.__super__.constructor.call(this,c),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(d==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(p));if(!I)throw new Error("Missing DTD attribute type. "+this.debugInfo(p));if(!D)throw new Error("Missing DTD attribute default. "+this.debugInfo(p));if(D.indexOf("#")!==0&&(D="#"+D),!D.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(p));if(T&&!D.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(p));this.elementName=this.stringify.name(p),this.type=e.AttributeDeclaration,this.attributeName=this.stringify.name(d),this.attributeType=this.stringify.dtdAttType(I),T&&(this.defaultValue=this.stringify.dtdAttDefault(T)),this.defaultValueType=D}return o.prototype.toString=function(c){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(c))},o})(r)}).call(cr)});var Xt=B((fr,hr)=>{(function(){var e,t,r,n,i=function(o,c){for(var p in c)s.call(c,p)&&(o[p]=c[p]);function d(){this.constructor=o}return d.prototype=c.prototype,o.prototype=new d,o.__super__=c.prototype,o},s={}.hasOwnProperty;n=it().isObject,r=Z(),e=V(),hr.exports=t=(function(o){i(c,o);function c(p,d,I,D){if(c.__super__.constructor.call(this,p),I==null)throw new Error("Missing DTD entity name. "+this.debugInfo(I));if(D==null)throw new Error("Missing DTD entity value. "+this.debugInfo(I));if(this.pe=!!d,this.name=this.stringify.name(I),this.type=e.EntityDeclaration,!n(D))this.value=this.stringify.dtdEntityValue(D),this.internal=!0;else{if(!D.pubID&&!D.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(I));if(D.pubID&&!D.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(I));if(this.internal=!1,D.pubID!=null&&(this.pubID=this.stringify.dtdPubID(D.pubID)),D.sysID!=null&&(this.sysID=this.stringify.dtdSysID(D.sysID)),D.nData!=null&&(this.nData=this.stringify.dtdNData(D.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(I))}}return Object.defineProperty(c.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(c.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(c.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(c.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(c.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(c.prototype,"xmlVersion",{get:function(){return null}}),c.prototype.toString=function(p){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(p))},c})(r)}).call(fr)});var jt=B((pr,dr)=>{(function(){var e,t,r,n=function(s,o){for(var c in o)i.call(o,c)&&(s[c]=o[c]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},i={}.hasOwnProperty;r=Z(),e=V(),dr.exports=t=(function(s){n(o,s);function o(c,p,d){if(o.__super__.constructor.call(this,c),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());d||(d="(#PCDATA)"),Array.isArray(d)&&(d="("+d.join(",")+")"),this.name=this.stringify.name(p),this.type=e.ElementDeclaration,this.value=this.stringify.dtdElementValue(d)}return o.prototype.toString=function(c){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(c))},o})(r)}).call(pr)});var kt=B((yr,mr)=>{(function(){var e,t,r,n=function(s,o){for(var c in o)i.call(o,c)&&(s[c]=o[c]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},i={}.hasOwnProperty;r=Z(),e=V(),mr.exports=t=(function(s){n(o,s);function o(c,p,d){if(o.__super__.constructor.call(this,c),p==null)throw new Error("Missing DTD notation name. "+this.debugInfo(p));if(!d.pubID&&!d.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(p));this.name=this.stringify.name(p),this.type=e.NotationDeclaration,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.sysID))}return Object.defineProperty(o.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(o.prototype,"systemId",{get:function(){return this.sysID}}),o.prototype.toString=function(c){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(c))},o})(r)}).call(yr)});var Vt=B((gr,wr)=>{(function(){var e,t,r,n,i,s,o,c,p,d=function(D,T){for(var g in T)I.call(T,g)&&(D[g]=T[g]);function E(){this.constructor=D}return E.prototype=T.prototype,D.prototype=new E,D.__super__=T.prototype,D},I={}.hasOwnProperty;p=it().isObject,c=Z(),e=V(),t=qt(),n=Xt(),r=jt(),i=kt(),o=Ft(),wr.exports=s=(function(D){d(T,D);function T(g,E,N){var v,M,O,m,l,a;if(T.__super__.constructor.call(this,g),this.type=e.DocType,g.children){for(m=g.children,M=0,O=m.length;M<O;M++)if(v=m[M],v.type===e.Element){this.name=v.name;break}}this.documentObject=g,p(E)&&(l=E,E=l.pubID,N=l.sysID),N==null&&(a=[E,N],N=a[0],E=a[1]),E!=null&&(this.pubID=this.stringify.dtdPubID(E)),N!=null&&(this.sysID=this.stringify.dtdSysID(N))}return Object.defineProperty(T.prototype,"entities",{get:function(){var g,E,N,v,M;for(v={},M=this.children,E=0,N=M.length;E<N;E++)g=M[E],g.type===e.EntityDeclaration&&!g.pe&&(v[g.name]=g);return new o(v)}}),Object.defineProperty(T.prototype,"notations",{get:function(){var g,E,N,v,M;for(v={},M=this.children,E=0,N=M.length;E<N;E++)g=M[E],g.type===e.NotationDeclaration&&(v[g.name]=g);return new o(v)}}),Object.defineProperty(T.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(T.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(T.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),T.prototype.element=function(g,E){var N;return N=new r(this,g,E),this.children.push(N),this},T.prototype.attList=function(g,E,N,v,M){var O;return O=new t(this,g,E,N,v,M),this.children.push(O),this},T.prototype.entity=function(g,E){var N;return N=new n(this,!1,g,E),this.children.push(N),this},T.prototype.pEntity=function(g,E){var N;return N=new n(this,!0,g,E),this.children.push(N),this},T.prototype.notation=function(g,E){var N;return N=new i(this,g,E),this.children.push(N),this},T.prototype.toString=function(g){return this.options.writer.docType(this,this.options.writer.filterOptions(g))},T.prototype.ele=function(g,E){return this.element(g,E)},T.prototype.att=function(g,E,N,v,M){return this.attList(g,E,N,v,M)},T.prototype.ent=function(g,E){return this.entity(g,E)},T.prototype.pent=function(g,E){return this.pEntity(g,E)},T.prototype.not=function(g,E){return this.notation(g,E)},T.prototype.up=function(){return this.root()||this.documentObject},T.prototype.isEqualNode=function(g){return!(!T.__super__.isEqualNode.apply(this,arguments).isEqualNode(g)||g.name!==this.name||g.publicId!==this.publicId||g.systemId!==this.systemId)},T})(c)}).call(gr)});var Wt=B((Er,Tr)=>{(function(){var e,t,r,n=function(s,o){for(var c in o)i.call(o,c)&&(s[c]=o[c]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},i={}.hasOwnProperty;e=V(),t=Z(),Tr.exports=r=(function(s){n(o,s);function o(c,p){if(o.__super__.constructor.call(this,c),p==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=e.Raw,this.value=this.stringify.raw(p)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(c){return this.options.writer.raw(this,this.options.writer.filterOptions(c))},o})(t)}).call(Er)});var Gt=B((Dr,Ir)=>{(function(){var e,t,r,n=function(s,o){for(var c in o)i.call(o,c)&&(s[c]=o[c]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},i={}.hasOwnProperty;e=V(),t=At(),Ir.exports=r=(function(s){n(o,s);function o(c,p){if(o.__super__.constructor.call(this,c),p==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=e.Text,this.value=this.stringify.text(p)}return Object.defineProperty(o.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(o.prototype,"wholeText",{get:function(){var c,p,d;for(d="",p=this.previousSibling;p;)d=p.data+d,p=p.previousSibling;for(d+=this.data,c=this.nextSibling;c;)d=d+c.data,c=c.nextSibling;return d}}),o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(c){return this.options.writer.text(this,this.options.writer.filterOptions(c))},o.prototype.splitText=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceWholeText=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},o})(t)}).call(Dr)});var Yt=B((br,Nr)=>{(function(){var e,t,r,n=function(s,o){for(var c in o)i.call(o,c)&&(s[c]=o[c]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},i={}.hasOwnProperty;e=V(),t=At(),Nr.exports=r=(function(s){n(o,s);function o(c,p,d){if(o.__super__.constructor.call(this,c),p==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=e.ProcessingInstruction,this.target=this.stringify.insTarget(p),this.name=this.target,d&&(this.value=this.stringify.insValue(d))}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(c){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(c))},o.prototype.isEqualNode=function(c){return!(!o.__super__.isEqualNode.apply(this,arguments).isEqualNode(c)||c.target!==this.target)},o})(t)}).call(br)});var ue=B((xr,Or)=>{(function(){var e,t,r,n=function(s,o){for(var c in o)i.call(o,c)&&(s[c]=o[c]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},i={}.hasOwnProperty;r=Z(),e=V(),Or.exports=t=(function(s){n(o,s);function o(c){o.__super__.constructor.call(this,c),this.type=e.Dummy}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(c){return""},o})(r)}).call(xr)});var Lr=B((Cr,Ar)=>{(function(){var e;Ar.exports=e=(function(){function t(r){this.nodes=r}return Object.defineProperty(t.prototype,"length",{get:function(){return this.nodes.length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.item=function(r){return this.nodes[r]||null},t})()}).call(Cr)});var Pr=B((_r,Mr)=>{(function(){Mr.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(_r)});var Z=B((vr,Fr)=>{(function(){var e,t,r,n,i,s,o,c,p,d,I,D,T,g,E,N,v,M,O,m={}.hasOwnProperty;O=it(),M=O.isObject,v=O.isFunction,N=O.isEmpty,E=O.getValue,c=null,r=null,n=null,i=null,s=null,T=null,g=null,D=null,o=null,t=null,I=null,p=null,e=null,Fr.exports=d=(function(){function l(a){this.parent=a,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,c||(c=St(),r=Bt(),n=Rt(),i=Ut(),s=Vt(),T=Wt(),g=Gt(),D=Yt(),o=ue(),t=V(),I=Lr(),p=Ft(),e=Pr())}return Object.defineProperty(l.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(l.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(l.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(l.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(l.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new I(this.children)),this.childNodeList}}),Object.defineProperty(l.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(l.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(l.prototype,"previousSibling",{get:function(){var a;return a=this.parent.children.indexOf(this),this.parent.children[a-1]||null}}),Object.defineProperty(l.prototype,"nextSibling",{get:function(){var a;return a=this.parent.children.indexOf(this),this.parent.children[a+1]||null}}),Object.defineProperty(l.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(l.prototype,"textContent",{get:function(){var a,y,C,f,A;if(this.nodeType===t.Element||this.nodeType===t.DocumentFragment){for(A="",f=this.children,y=0,C=f.length;y<C;y++)a=f[y],a.textContent&&(A+=a.textContent);return A}else return null},set:function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),l.prototype.setParent=function(a){var y,C,f,A,w;for(this.parent=a,a&&(this.options=a.options,this.stringify=a.stringify),A=this.children,w=[],C=0,f=A.length;C<f;C++)y=A[C],w.push(y.setParent(this));return w},l.prototype.element=function(a,y,C){var f,A,w,x,P,F,R,U,S,W,q;if(F=null,y===null&&C==null&&(S=[{},null],y=S[0],C=S[1]),y==null&&(y={}),y=E(y),M(y)||(W=[y,C],C=W[0],y=W[1]),a!=null&&(a=E(a)),Array.isArray(a))for(w=0,R=a.length;w<R;w++)A=a[w],F=this.element(A);else if(v(a))F=this.element(a.apply());else if(M(a)){for(P in a)if(m.call(a,P))if(q=a[P],v(q)&&(q=q.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&P.indexOf(this.stringify.convertAttKey)===0)F=this.attribute(P.substr(this.stringify.convertAttKey.length),q);else if(!this.options.separateArrayItems&&Array.isArray(q)&&N(q))F=this.dummy();else if(M(q)&&N(q))F=this.element(P);else if(!this.options.keepNullNodes&&q==null)F=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(q))for(x=0,U=q.length;x<U;x++)A=q[x],f={},f[P]=A,F=this.element(f);else M(q)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&P.indexOf(this.stringify.convertTextKey)===0?F=this.element(q):(F=this.element(P),F.element(q)):F=this.element(P,q)}else!this.options.keepNullNodes&&C===null?F=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&a.indexOf(this.stringify.convertTextKey)===0?F=this.text(C):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&a.indexOf(this.stringify.convertCDataKey)===0?F=this.cdata(C):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&a.indexOf(this.stringify.convertCommentKey)===0?F=this.comment(C):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&a.indexOf(this.stringify.convertRawKey)===0?F=this.raw(C):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&a.indexOf(this.stringify.convertPIKey)===0?F=this.instruction(a.substr(this.stringify.convertPIKey.length),C):F=this.node(a,y,C);if(F==null)throw new Error("Could not create any elements with: "+a+". "+this.debugInfo());return F},l.prototype.insertBefore=function(a,y,C){var f,A,w,x,P;if(a?.type)return w=a,x=y,w.setParent(this),x?(A=children.indexOf(x),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(a));return A=this.parent.children.indexOf(this),P=this.parent.children.splice(A),f=this.parent.element(a,y,C),Array.prototype.push.apply(this.parent.children,P),f},l.prototype.insertAfter=function(a,y,C){var f,A,w;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(a));return A=this.parent.children.indexOf(this),w=this.parent.children.splice(A+1),f=this.parent.element(a,y,C),Array.prototype.push.apply(this.parent.children,w),f},l.prototype.remove=function(){var a,y;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return a=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[a,a-a+1].concat(y=[])),this.parent},l.prototype.node=function(a,y,C){var f,A;return a!=null&&(a=E(a)),y||(y={}),y=E(y),M(y)||(A=[y,C],C=A[0],y=A[1]),f=new c(this,a,y),C!=null&&f.text(C),this.children.push(f),f},l.prototype.text=function(a){var y;return M(a)&&this.element(a),y=new g(this,a),this.children.push(y),this},l.prototype.cdata=function(a){var y;return y=new r(this,a),this.children.push(y),this},l.prototype.comment=function(a){var y;return y=new n(this,a),this.children.push(y),this},l.prototype.commentBefore=function(a){var y,C,f;return C=this.parent.children.indexOf(this),f=this.parent.children.splice(C),y=this.parent.comment(a),Array.prototype.push.apply(this.parent.children,f),this},l.prototype.commentAfter=function(a){var y,C,f;return C=this.parent.children.indexOf(this),f=this.parent.children.splice(C+1),y=this.parent.comment(a),Array.prototype.push.apply(this.parent.children,f),this},l.prototype.raw=function(a){var y;return y=new T(this,a),this.children.push(y),this},l.prototype.dummy=function(){var a;return a=new o(this),a},l.prototype.instruction=function(a,y){var C,f,A,w,x;if(a!=null&&(a=E(a)),y!=null&&(y=E(y)),Array.isArray(a))for(w=0,x=a.length;w<x;w++)C=a[w],this.instruction(C);else if(M(a))for(C in a)m.call(a,C)&&(f=a[C],this.instruction(C,f));else v(y)&&(y=y.apply()),A=new D(this,a,y),this.children.push(A);return this},l.prototype.instructionBefore=function(a,y){var C,f,A;return f=this.parent.children.indexOf(this),A=this.parent.children.splice(f),C=this.parent.instruction(a,y),Array.prototype.push.apply(this.parent.children,A),this},l.prototype.instructionAfter=function(a,y){var C,f,A;return f=this.parent.children.indexOf(this),A=this.parent.children.splice(f+1),C=this.parent.instruction(a,y),Array.prototype.push.apply(this.parent.children,A),this},l.prototype.declaration=function(a,y,C){var f,A;return f=this.document(),A=new i(f,a,y,C),f.children.length===0?f.children.unshift(A):f.children[0].type===t.Declaration?f.children[0]=A:f.children.unshift(A),f.root()||f},l.prototype.dtd=function(a,y){var C,f,A,w,x,P,F,R,U,S;for(f=this.document(),A=new s(f,a,y),U=f.children,w=x=0,F=U.length;x<F;w=++x)if(C=U[w],C.type===t.DocType)return f.children[w]=A,A;for(S=f.children,w=P=0,R=S.length;P<R;w=++P)if(C=S[w],C.isRoot)return f.children.splice(w,0,A),A;return f.children.push(A),A},l.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},l.prototype.root=function(){var a;for(a=this;a;){if(a.type===t.Document)return a.rootObject;if(a.isRoot)return a;a=a.parent}},l.prototype.document=function(){var a;for(a=this;a;){if(a.type===t.Document)return a;a=a.parent}},l.prototype.end=function(a){return this.document().end(a)},l.prototype.prev=function(){var a;if(a=this.parent.children.indexOf(this),a<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[a-1]},l.prototype.next=function(){var a;if(a=this.parent.children.indexOf(this),a===-1||a===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[a+1]},l.prototype.importDocument=function(a){var y;return y=a.root().clone(),y.parent=this,y.isRoot=!1,this.children.push(y),this},l.prototype.debugInfo=function(a){var y,C;return a=a||this.name,a==null&&!((y=this.parent)!=null&&y.name)?"":a==null?"parent: <"+this.parent.name+">":(C=this.parent)!=null&&C.name?"node: <"+a+">, parent: <"+this.parent.name+">":"node: <"+a+">"},l.prototype.ele=function(a,y,C){return this.element(a,y,C)},l.prototype.nod=function(a,y,C){return this.node(a,y,C)},l.prototype.txt=function(a){return this.text(a)},l.prototype.dat=function(a){return this.cdata(a)},l.prototype.com=function(a){return this.comment(a)},l.prototype.ins=function(a,y){return this.instruction(a,y)},l.prototype.doc=function(){return this.document()},l.prototype.dec=function(a,y,C){return this.declaration(a,y,C)},l.prototype.e=function(a,y,C){return this.element(a,y,C)},l.prototype.n=function(a,y,C){return this.node(a,y,C)},l.prototype.t=function(a){return this.text(a)},l.prototype.d=function(a){return this.cdata(a)},l.prototype.c=function(a){return this.comment(a)},l.prototype.r=function(a){return this.raw(a)},l.prototype.i=function(a,y){return this.instruction(a,y)},l.prototype.u=function(){return this.up()},l.prototype.importXMLBuilder=function(a){return this.importDocument(a)},l.prototype.replaceChild=function(a,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.removeChild=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.appendChild=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.hasChildNodes=function(){return this.children.length!==0},l.prototype.cloneNode=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.isSupported=function(a,y){return!0},l.prototype.hasAttributes=function(){return this.attribs.length!==0},l.prototype.compareDocumentPosition=function(a){var y,C;return y=this,y===a?0:this.document()!==a.document()?(C=e.Disconnected|e.ImplementationSpecific,Math.random()<.5?C|=e.Preceding:C|=e.Following,C):y.isAncestor(a)?e.Contains|e.Preceding:y.isDescendant(a)?e.Contains|e.Following:y.isPreceding(a)?e.Preceding:e.Following},l.prototype.isSameNode=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.lookupPrefix=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.isDefaultNamespace=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.lookupNamespaceURI=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.isEqualNode=function(a){var y,C,f;if(a.nodeType!==this.nodeType||a.children.length!==this.children.length)return!1;for(y=C=0,f=this.children.length-1;0<=f?C<=f:C>=f;y=0<=f?++C:--C)if(!this.children[y].isEqualNode(a.children[y]))return!1;return!0},l.prototype.getFeature=function(a,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.setUserData=function(a,y,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.getUserData=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.contains=function(a){return a?a===this||this.isDescendant(a):!1},l.prototype.isDescendant=function(a){var y,C,f,A,w;for(w=this.children,f=0,A=w.length;f<A;f++)if(y=w[f],a===y||(C=y.isDescendant(a),C))return!0;return!1},l.prototype.isAncestor=function(a){return a.isDescendant(this)},l.prototype.isPreceding=function(a){var y,C;return y=this.treePosition(a),C=this.treePosition(this),y===-1||C===-1?!1:y<C},l.prototype.isFollowing=function(a){var y,C;return y=this.treePosition(a),C=this.treePosition(this),y===-1||C===-1?!1:y>C},l.prototype.treePosition=function(a){var y,C;return C=0,y=!1,this.foreachTreeNode(this.document(),function(f){if(C++,!y&&f===a)return y=!0}),y?C:-1},l.prototype.foreachTreeNode=function(a,y){var C,f,A,w,x;for(a||(a=this.document()),w=a.children,f=0,A=w.length;f<A;f++){if(C=w[f],x=y(C))return x;if(x=this.foreachTreeNode(C,y),x)return x}},l})()}).call(vr)});var ae=B((Sr,Br)=>{(function(){var e,t=function(n,i){return function(){return n.apply(i,arguments)}},r={}.hasOwnProperty;Br.exports=e=(function(){function n(i){this.assertLegalName=t(this.assertLegalName,this),this.assertLegalChar=t(this.assertLegalChar,this);var s,o,c;i||(i={}),this.options=i,this.options.version||(this.options.version="1.0"),o=i.stringify||{};for(s in o)r.call(o,s)&&(c=o[s],this[s]=c)}return n.prototype.name=function(i){return this.options.noValidation?i:this.assertLegalName(""+i||"")},n.prototype.text=function(i){return this.options.noValidation?i:this.assertLegalChar(this.textEscape(""+i||""))},n.prototype.cdata=function(i){return this.options.noValidation?i:(i=""+i||"",i=i.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(i))},n.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)},n.prototype.raw=function(i){return this.options.noValidation?i:""+i||""},n.prototype.attValue=function(i){return this.options.noValidation?i:this.assertLegalChar(this.attEscape(i=""+i||""))},n.prototype.insTarget=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.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)},n.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},n.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)},n.prototype.xmlStandalone=function(i){return this.options.noValidation?i:i?"yes":"no"},n.prototype.dtdPubID=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdSysID=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdElementValue=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdAttType=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdAttDefault=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdEntityValue=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdNData=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.convertAttKey="@",n.prototype.convertPIKey="?",n.prototype.convertTextKey="#text",n.prototype.convertCDataKey="#cdata",n.prototype.convertCommentKey="#comment",n.prototype.convertRawKey="#raw",n.prototype.assertLegalChar=function(i){var s,o;if(this.options.noValidation)return i;if(s="",this.options.version==="1.0"){if(s=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=i.match(s))throw new Error("Invalid character in string: "+i+" at index "+o.index)}else if(this.options.version==="1.1"&&(s=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=i.match(s)))throw new Error("Invalid character in string: "+i+" at index "+o.index);return i},n.prototype.assertLegalName=function(i){var s;if(this.options.noValidation)return i;if(this.assertLegalChar(i),s=/^([: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(s))throw new Error("Invalid character in name");return i},n.prototype.textEscape=function(i){var s;return this.options.noValidation?i:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,i.replace(s,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},n.prototype.attEscape=function(i){var s;return this.options.noValidation?i:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,i.replace(s,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},n})()}).call(Sr)});var Lt=B((Rr,Ur)=>{(function(){Ur.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(Rr)});var ce=B((qr,Xr)=>{(function(){var e,t,r,n,i,s,o,c,p,d,I,D,T,g,E,N,v,M={}.hasOwnProperty;v=it().assign,e=V(),p=Ut(),d=Vt(),r=Bt(),n=Rt(),D=St(),g=Wt(),E=Gt(),T=Yt(),I=ue(),i=qt(),s=jt(),o=Xt(),c=kt(),t=Lt(),Xr.exports=N=(function(){function O(m){var l,a,y;m||(m={}),this.options=m,a=m.writer||{};for(l in a)M.call(a,l)&&(y=a[l],this["_"+l]=this[l],this[l]=y)}return O.prototype.filterOptions=function(m){var l,a,y,C,f,A,w,x;return m||(m={}),m=v({},this.options,m),l={writer:this},l.pretty=m.pretty||!1,l.allowEmpty=m.allowEmpty||!1,l.indent=(a=m.indent)!=null?a:" ",l.newline=(y=m.newline)!=null?y:`
`,l.offset=(C=m.offset)!=null?C:0,l.dontPrettyTextNodes=(f=(A=m.dontPrettyTextNodes)!=null?A:m.dontprettytextnodes)!=null?f:0,l.spaceBeforeSlash=(w=(x=m.spaceBeforeSlash)!=null?x:m.spacebeforeslash)!=null?w:"",l.spaceBeforeSlash===!0&&(l.spaceBeforeSlash=" "),l.suppressPrettyCount=0,l.user={},l.state=t.None,l},O.prototype.indent=function(m,l,a){var y;return!l.pretty||l.suppressPrettyCount?"":l.pretty&&(y=(a||0)+l.offset+1,y>0)?new Array(y).join(l.indent):""},O.prototype.endline=function(m,l,a){return!l.pretty||l.suppressPrettyCount?"":l.newline},O.prototype.attribute=function(m,l,a){var y;return this.openAttribute(m,l,a),y=" "+m.name+'="'+m.value+'"',this.closeAttribute(m,l,a),y},O.prototype.cdata=function(m,l,a){var y;return this.openNode(m,l,a),l.state=t.OpenTag,y=this.indent(m,l,a)+"<![CDATA[",l.state=t.InsideTag,y+=m.value,l.state=t.CloseTag,y+="]]>"+this.endline(m,l,a),l.state=t.None,this.closeNode(m,l,a),y},O.prototype.comment=function(m,l,a){var y;return this.openNode(m,l,a),l.state=t.OpenTag,y=this.indent(m,l,a)+"<!-- ",l.state=t.InsideTag,y+=m.value,l.state=t.CloseTag,y+=" -->"+this.endline(m,l,a),l.state=t.None,this.closeNode(m,l,a),y},O.prototype.declaration=function(m,l,a){var y;return this.openNode(m,l,a),l.state=t.OpenTag,y=this.indent(m,l,a)+"<?xml",l.state=t.InsideTag,y+=' version="'+m.version+'"',m.encoding!=null&&(y+=' encoding="'+m.encoding+'"'),m.standalone!=null&&(y+=' standalone="'+m.standalone+'"'),l.state=t.CloseTag,y+=l.spaceBeforeSlash+"?>",y+=this.endline(m,l,a),l.state=t.None,this.closeNode(m,l,a),y},O.prototype.docType=function(m,l,a){var y,C,f,A,w;if(a||(a=0),this.openNode(m,l,a),l.state=t.OpenTag,A=this.indent(m,l,a),A+="<!DOCTYPE "+m.root().name,m.pubID&&m.sysID?A+=' PUBLIC "'+m.pubID+'" "'+m.sysID+'"':m.sysID&&(A+=' SYSTEM "'+m.sysID+'"'),m.children.length>0){for(A+=" [",A+=this.endline(m,l,a),l.state=t.InsideTag,w=m.children,C=0,f=w.length;C<f;C++)y=w[C],A+=this.writeChildNode(y,l,a+1);l.state=t.CloseTag,A+="]"}return l.state=t.CloseTag,A+=l.spaceBeforeSlash+">",A+=this.endline(m,l,a),l.state=t.None,this.closeNode(m,l,a),A},O.prototype.element=function(m,l,a){var y,C,f,A,w,x,P,F,R,U,S,W,q,yt;a||(a=0),U=!1,S="",this.openNode(m,l,a),l.state=t.OpenTag,S+=this.indent(m,l,a)+"<"+m.name,W=m.attribs;for(R in W)M.call(W,R)&&(y=W[R],S+=this.attribute(y,l,a));if(f=m.children.length,A=f===0?null:m.children[0],f===0||m.children.every(function(rt){return(rt.type===e.Text||rt.type===e.Raw)&&rt.value===""}))l.allowEmpty?(S+=">",l.state=t.CloseTag,S+="</"+m.name+">"+this.endline(m,l,a)):(l.state=t.CloseTag,S+=l.spaceBeforeSlash+"/>"+this.endline(m,l,a));else if(l.pretty&&f===1&&(A.type===e.Text||A.type===e.Raw)&&A.value!=null)S+=">",l.state=t.InsideTag,l.suppressPrettyCount++,U=!0,S+=this.writeChildNode(A,l,a+1),l.suppressPrettyCount--,U=!1,l.state=t.CloseTag,S+="</"+m.name+">"+this.endline(m,l,a);else{if(l.dontPrettyTextNodes){for(q=m.children,w=0,P=q.length;w<P;w++)if(C=q[w],(C.type===e.Text||C.type===e.Raw)&&C.value!=null){l.suppressPrettyCount++,U=!0;break}}for(S+=">"+this.endline(m,l,a),l.state=t.InsideTag,yt=m.children,x=0,F=yt.length;x<F;x++)C=yt[x],S+=this.writeChildNode(C,l,a+1);l.state=t.CloseTag,S+=this.indent(m,l,a)+"</"+m.name+">",U&&l.suppressPrettyCount--,S+=this.endline(m,l,a),l.state=t.None}return this.closeNode(m,l,a),S},O.prototype.writeChildNode=function(m,l,a){switch(m.type){case e.CData:return this.cdata(m,l,a);case e.Comment:return this.comment(m,l,a);case e.Element:return this.element(m,l,a);case e.Raw:return this.raw(m,l,a);case e.Text:return this.text(m,l,a);case e.ProcessingInstruction:return this.processingInstruction(m,l,a);case e.Dummy:return"";case e.Declaration:return this.declaration(m,l,a);case e.DocType:return this.docType(m,l,a);case e.AttributeDeclaration:return this.dtdAttList(m,l,a);case e.ElementDeclaration:return this.dtdElement(m,l,a);case e.EntityDeclaration:return this.dtdEntity(m,l,a);case e.NotationDeclaration:return this.dtdNotation(m,l,a);default:throw new Error("Unknown XML node type: "+m.constructor.name)}},O.prototype.processingInstruction=function(m,l,a){var y;return this.openNode(m,l,a),l.state=t.OpenTag,y=this.indent(m,l,a)+"<?",l.state=t.InsideTag,y+=m.target,m.value&&(y+=" "+m.value),l.state=t.CloseTag,y+=l.spaceBeforeSlash+"?>",y+=this.endline(m,l,a),l.state=t.None,this.closeNode(m,l,a),y},O.prototype.raw=function(m,l,a){var y;return this.openNode(m,l,a),l.state=t.OpenTag,y=this.indent(m,l,a),l.state=t.InsideTag,y+=m.value,l.state=t.CloseTag,y+=this.endline(m,l,a),l.state=t.None,this.closeNode(m,l,a),y},O.prototype.text=function(m,l,a){var y;return this.openNode(m,l,a),l.state=t.OpenTag,y=this.indent(m,l,a),l.state=t.InsideTag,y+=m.value,l.state=t.CloseTag,y+=this.endline(m,l,a),l.state=t.None,this.closeNode(m,l,a),y},O.prototype.dtdAttList=function(m,l,a){var y;return this.openNode(m,l,a),l.state=t.OpenTag,y=this.indent(m,l,a)+"<!ATTLIST",l.state=t.InsideTag,y+=" "+m.elementName+" "+m.attributeName+" "+m.attributeType,m.defaultValueType!=="#D