substack-feed-api 1.0.0 → 1.0.3
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/README.md +103 -1
- package/dist/substackFeedApi.js +1148 -1145
- package/dist/substackFeedApi.umd.cjs +9 -9
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(function(Q,
|
|
2
|
-
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(M)),it}var st={},$={},K={},ue;function z(){return ue||(ue=1,(function(){var i,c,D,h,p,t,e,o=[].slice,l={}.hasOwnProperty;i=function(){var O,m,y,d,g,b;if(b=arguments[0],g=2<=arguments.length?o.call(arguments,1):[],p(Object.assign))Object.assign.apply(null,arguments);else for(O=0,y=g.length;O<y;O++)if(d=g[O],d!=null)for(m in d)l.call(d,m)&&(b[m]=d[m]);return b},p=function(O){return!!O&&Object.prototype.toString.call(O)==="[object Function]"},t=function(O){var m;return!!O&&((m=typeof O)=="function"||m==="object")},D=function(O){return p(Array.isArray)?Array.isArray(O):Object.prototype.toString.call(O)==="[object Array]"},h=function(O){var m;if(D(O))return!O.length;for(m in O)if(l.call(O,m))return!1;return!0},e=function(O){var m,y;return t(O)&&(y=Object.getPrototypeOf(O))&&(m=y.constructor)&&typeof m=="function"&&m instanceof m&&Function.prototype.toString.call(m)===Function.prototype.toString.call(Object)},c=function(O){return p(O.valueOf)?O.valueOf():O},K.assign=i,K.isFunction=p,K.isObject=t,K.isArray=D,K.isEmpty=h,K.isPlainObject=e,K.getValue=c}).call(M)),K}var ut={exports:{}},ae;function ce(){return ae||(ae=1,(function(){ut.exports=function(){function i(){}return i.prototype.hasFeature=function(c,D){return!0},i.prototype.createDocumentType=function(c,D,h){throw new Error("This DOM method is not implemented.")},i.prototype.createDocument=function(c,D,h){throw new Error("This DOM method is not implemented.")},i.prototype.createHTMLDocument=function(c){throw new Error("This DOM method is not implemented.")},i.prototype.getFeature=function(c,D){throw new Error("This DOM method is not implemented.")},i}()}).call(M)),ut.exports}var at={exports:{}},ct={exports:{}},lt={exports:{}},le;function or(){return le||(le=1,(function(){lt.exports=function(){function i(){}return i.prototype.handleError=function(c){throw new Error(c)},i}()}).call(M)),lt.exports}var ft={exports:{}},fe;function sr(){return fe||(fe=1,(function(){ft.exports=function(){function i(c){this.arr=c||[]}return Object.defineProperty(i.prototype,"length",{get:function(){return this.arr.length}}),i.prototype.item=function(c){return this.arr[c]||null},i.prototype.contains=function(c){return this.arr.indexOf(c)!==-1},i}()}).call(M)),ft.exports}var he;function ur(){return he||(he=1,(function(){var i,c;i=or(),c=sr(),ct.exports=function(){function D(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new i,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=Object.create(this.defaultParams)}return Object.defineProperty(D.prototype,"parameterNames",{get:function(){return new c(Object.keys(this.defaultParams))}}),D.prototype.getParameter=function(h){return this.params.hasOwnProperty(h)?this.params[h]:null},D.prototype.canSetParameter=function(h,p){return!0},D.prototype.setParameter=function(h,p){return p!=null?this.params[h]=p:delete this.params[h]},D}()}).call(M)),ct.exports}var ht={exports:{}},pt={exports:{}},dt={exports:{}},pe;function q(){return pe||(pe=1,(function(){dt.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(M)),dt.exports}var yt={exports:{}},de;function ye(){return de||(de=1,(function(){var i;i=q(),Y(),yt.exports=function(){function c(D,h,p){if(this.parent=D,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),h==null)throw new Error("Missing attribute name. "+this.debugInfo(h));this.name=this.stringify.name(h),this.value=this.stringify.attValue(p),this.type=i.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(c.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(c.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(c.prototype,"textContent",{get:function(){return this.value},set:function(D){return this.value=D||""}}),Object.defineProperty(c.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(c.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(c.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(c.prototype,"specified",{get:function(){return!0}}),c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(D){return this.options.writer.attribute(this,this.options.writer.filterOptions(D))},c.prototype.debugInfo=function(D){return D=D||this.name,D==null?"parent: <"+this.parent.name+">":"attribute: {"+D+"}, parent: <"+this.parent.name+">"},c.prototype.isEqualNode=function(D){return!(D.namespaceURI!==this.namespaceURI||D.prefix!==this.prefix||D.localName!==this.localName||D.value!==this.value)},c}()}).call(M)),yt.exports}var mt={exports:{}},me;function gt(){return me||(me=1,(function(){mt.exports=function(){function i(c){this.nodes=c}return Object.defineProperty(i.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),i.prototype.clone=function(){return this.nodes=null},i.prototype.getNamedItem=function(c){return this.nodes[c]},i.prototype.setNamedItem=function(c){var D;return D=this.nodes[c.nodeName],this.nodes[c.nodeName]=c,D||null},i.prototype.removeNamedItem=function(c){var D;return D=this.nodes[c],delete this.nodes[c],D||null},i.prototype.item=function(c){return this.nodes[Object.keys(this.nodes)[c]]||null},i.prototype.getNamedItemNS=function(c,D){throw new Error("This DOM method is not implemented.")},i.prototype.setNamedItemNS=function(c){throw new Error("This DOM method is not implemented.")},i.prototype.removeNamedItemNS=function(c,D){throw new Error("This DOM method is not implemented.")},i}()}).call(M)),mt.exports}var ge;function wt(){return ge||(ge=1,(function(){var i,c,D,h,p,t,e,o,l=function(m,y){for(var d in y)O.call(y,d)&&(m[d]=y[d]);function g(){this.constructor=m}return g.prototype=y.prototype,m.prototype=new g,m.__super__=y.prototype,m},O={}.hasOwnProperty;o=z(),e=o.isObject,t=o.isFunction,p=o.getValue,h=Y(),i=q(),c=ye(),D=gt(),pt.exports=function(m){l(y,m);function y(d,g,b){var L,A,x,E;if(y.__super__.constructor.call(this,d),g==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(g),this.type=i.Element,this.attribs={},this.schemaTypeInfo=null,b!=null&&this.attribute(b),d.type===i.Document&&(this.isRoot=!0,this.documentObject=d,d.rootObject=this,d.children)){for(E=d.children,A=0,x=E.length;A<x;A++)if(L=E[A],L.type===i.DocType){L.name=this.name;break}}}return Object.defineProperty(y.prototype,"tagName",{get:function(){return this.name}}),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,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new D(this.attribs)),this.attributeMap}}),y.prototype.clone=function(){var d,g,b,L;b=Object.create(this),b.isRoot&&(b.documentObject=null),b.attribs={},L=this.attribs;for(g in L)O.call(L,g)&&(d=L[g],b.attribs[g]=d.clone());return b.children=[],this.children.forEach(function(A){var x;return x=A.clone(),x.parent=b,b.children.push(x)}),b},y.prototype.attribute=function(d,g){var b,L;if(d!=null&&(d=p(d)),e(d))for(b in d)O.call(d,b)&&(L=d[b],this.attribute(b,L));else t(g)&&(g=g.apply()),this.options.keepNullAttributes&&g==null?this.attribs[d]=new c(this,d,""):g!=null&&(this.attribs[d]=new c(this,d,g));return this},y.prototype.removeAttribute=function(d){var g,b,L;if(d==null)throw new Error("Missing attribute name. "+this.debugInfo());if(d=p(d),Array.isArray(d))for(b=0,L=d.length;b<L;b++)g=d[b],delete this.attribs[g];else delete this.attribs[d];return this},y.prototype.toString=function(d){return this.options.writer.element(this,this.options.writer.filterOptions(d))},y.prototype.att=function(d,g){return this.attribute(d,g)},y.prototype.a=function(d,g){return this.attribute(d,g)},y.prototype.getAttribute=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d].value:null},y.prototype.setAttribute=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNode=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d]:null},y.prototype.setAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.removeAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNS=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setAttributeNS=function(d,g,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.removeAttributeNS=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNodeNS=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setAttributeNodeNS=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagNameNS=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.hasAttribute=function(d){return this.attribs.hasOwnProperty(d)},y.prototype.hasAttributeNS=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setIdAttribute=function(d,g){return this.attribs.hasOwnProperty(d)?this.attribs[d].isId:g},y.prototype.setIdAttributeNS=function(d,g,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setIdAttributeNode=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagNameNS=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByClassName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.isEqualNode=function(d){var g,b,L;if(!y.__super__.isEqualNode.apply(this,arguments).isEqualNode(d)||d.namespaceURI!==this.namespaceURI||d.prefix!==this.prefix||d.localName!==this.localName||d.attribs.length!==this.attribs.length)return!1;for(g=b=0,L=this.attribs.length-1;0<=L?b<=L:b>=L;g=0<=L?++b:--b)if(!this.attribs[g].isEqualNode(d.attribs[g]))return!1;return!0},y}(h)}).call(M)),pt.exports}var Tt={exports:{}},Dt={exports:{}},we;function et(){return we||(we=1,(function(){var i,c=function(h,p){for(var t in p)D.call(p,t)&&(h[t]=p[t]);function e(){this.constructor=h}return e.prototype=p.prototype,h.prototype=new e,h.__super__=p.prototype,h},D={}.hasOwnProperty;i=Y(),Dt.exports=function(h){c(p,h);function p(t){p.__super__.constructor.call(this,t),this.value=""}return Object.defineProperty(p.prototype,"data",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(p.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(p.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),p.prototype.clone=function(){return Object.create(this)},p.prototype.substringData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.appendData=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.insertData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.deleteData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.replaceData=function(t,e,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.isEqualNode=function(t){return!(!p.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)||t.data!==this.data)},p}(i)}).call(M)),Dt.exports}var Te;function Et(){return Te||(Te=1,(function(){var i,c,D=function(p,t){for(var e in t)h.call(t,e)&&(p[e]=t[e]);function o(){this.constructor=p}return o.prototype=t.prototype,p.prototype=new o,p.__super__=t.prototype,p},h={}.hasOwnProperty;i=q(),c=et(),Tt.exports=function(p){D(t,p);function t(e,o){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=i.CData,this.value=this.stringify.cdata(o)}return t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.cdata(this,this.options.writer.filterOptions(e))},t}(c)}).call(M)),Tt.exports}var bt={exports:{}},De;function Ot(){return De||(De=1,(function(){var i,c,D=function(p,t){for(var e in t)h.call(t,e)&&(p[e]=t[e]);function o(){this.constructor=p}return o.prototype=t.prototype,p.prototype=new o,p.__super__=t.prototype,p},h={}.hasOwnProperty;i=q(),c=et(),bt.exports=function(p){D(t,p);function t(e,o){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=i.Comment,this.value=this.stringify.comment(o)}return t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.comment(this,this.options.writer.filterOptions(e))},t}(c)}).call(M)),bt.exports}var Nt={exports:{}},Ee;function vt(){return Ee||(Ee=1,(function(){var i,c,D,h=function(t,e){for(var o in e)p.call(e,o)&&(t[o]=e[o]);function l(){this.constructor=t}return l.prototype=e.prototype,t.prototype=new l,t.__super__=e.prototype,t},p={}.hasOwnProperty;D=z().isObject,c=Y(),i=q(),Nt.exports=function(t){h(e,t);function e(o,l,O,m){var y;e.__super__.constructor.call(this,o),D(l)&&(y=l,l=y.version,O=y.encoding,m=y.standalone),l||(l="1.0"),this.type=i.Declaration,this.version=this.stringify.xmlVersion(l),O!=null&&(this.encoding=this.stringify.xmlEncoding(O)),m!=null&&(this.standalone=this.stringify.xmlStandalone(m))}return e.prototype.toString=function(o){return this.options.writer.declaration(this,this.options.writer.filterOptions(o))},e}(c)}).call(M)),Nt.exports}var It={exports:{}},Lt={exports:{}},be;function At(){return be||(be=1,(function(){var i,c,D=function(p,t){for(var e in t)h.call(t,e)&&(p[e]=t[e]);function o(){this.constructor=p}return o.prototype=t.prototype,p.prototype=new o,p.__super__=t.prototype,p},h={}.hasOwnProperty;c=Y(),i=q(),Lt.exports=function(p){D(t,p);function t(e,o,l,O,m,y){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(l==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(o));if(!O)throw new Error("Missing DTD attribute type. "+this.debugInfo(o));if(!m)throw new Error("Missing DTD attribute default. "+this.debugInfo(o));if(m.indexOf("#")!==0&&(m="#"+m),!m.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(o));if(y&&!m.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(o));this.elementName=this.stringify.name(o),this.type=i.AttributeDeclaration,this.attributeName=this.stringify.name(l),this.attributeType=this.stringify.dtdAttType(O),y&&(this.defaultValue=this.stringify.dtdAttDefault(y)),this.defaultValueType=m}return t.prototype.toString=function(e){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(e))},t}(c)}).call(M)),Lt.exports}var Pt={exports:{}},Oe;function _t(){return Oe||(Oe=1,(function(){var i,c,D,h=function(t,e){for(var o in e)p.call(e,o)&&(t[o]=e[o]);function l(){this.constructor=t}return l.prototype=e.prototype,t.prototype=new l,t.__super__=e.prototype,t},p={}.hasOwnProperty;D=z().isObject,c=Y(),i=q(),Pt.exports=function(t){h(e,t);function e(o,l,O,m){if(e.__super__.constructor.call(this,o),O==null)throw new Error("Missing DTD entity name. "+this.debugInfo(O));if(m==null)throw new Error("Missing DTD entity value. "+this.debugInfo(O));if(this.pe=!!l,this.name=this.stringify.name(O),this.type=i.EntityDeclaration,!D(m))this.value=this.stringify.dtdEntityValue(m),this.internal=!0;else{if(!m.pubID&&!m.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(O));if(m.pubID&&!m.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(O));if(this.internal=!1,m.pubID!=null&&(this.pubID=this.stringify.dtdPubID(m.pubID)),m.sysID!=null&&(this.sysID=this.stringify.dtdSysID(m.sysID)),m.nData!=null&&(this.nData=this.stringify.dtdNData(m.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(O))}}return Object.defineProperty(e.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(e.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(e.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(e.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(e.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(e.prototype,"xmlVersion",{get:function(){return null}}),e.prototype.toString=function(o){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(o))},e}(c)}).call(M)),Pt.exports}var xt={exports:{}},Ne;function Ct(){return Ne||(Ne=1,(function(){var i,c,D=function(p,t){for(var e in t)h.call(t,e)&&(p[e]=t[e]);function o(){this.constructor=p}return o.prototype=t.prototype,p.prototype=new o,p.__super__=t.prototype,p},h={}.hasOwnProperty;c=Y(),i=q(),xt.exports=function(p){D(t,p);function t(e,o,l){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());l||(l="(#PCDATA)"),Array.isArray(l)&&(l="("+l.join(",")+")"),this.name=this.stringify.name(o),this.type=i.ElementDeclaration,this.value=this.stringify.dtdElementValue(l)}return t.prototype.toString=function(e){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(e))},t}(c)}).call(M)),xt.exports}var Mt={exports:{}},ve;function St(){return ve||(ve=1,(function(){var i,c,D=function(p,t){for(var e in t)h.call(t,e)&&(p[e]=t[e]);function o(){this.constructor=p}return o.prototype=t.prototype,p.prototype=new o,p.__super__=t.prototype,p},h={}.hasOwnProperty;c=Y(),i=q(),Mt.exports=function(p){D(t,p);function t(e,o,l){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing DTD notation name. "+this.debugInfo(o));if(!l.pubID&&!l.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(o));this.name=this.stringify.name(o),this.type=i.NotationDeclaration,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID))}return Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),t.prototype.toString=function(e){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(e))},t}(c)}).call(M)),Mt.exports}var Ie;function Ft(){return Ie||(Ie=1,(function(){var i,c,D,h,p,t,e,o,l=function(m,y){for(var d in y)O.call(y,d)&&(m[d]=y[d]);function g(){this.constructor=m}return g.prototype=y.prototype,m.prototype=new g,m.__super__=y.prototype,m},O={}.hasOwnProperty;o=z().isObject,e=Y(),i=q(),c=At(),h=_t(),D=Ct(),p=St(),t=gt(),It.exports=function(m){l(y,m);function y(d,g,b){var L,A,x,E,s,a;if(y.__super__.constructor.call(this,d),this.type=i.DocType,d.children){for(E=d.children,A=0,x=E.length;A<x;A++)if(L=E[A],L.type===i.Element){this.name=L.name;break}}this.documentObject=d,o(g)&&(s=g,g=s.pubID,b=s.sysID),b==null&&(a=[g,b],b=a[0],g=a[1]),g!=null&&(this.pubID=this.stringify.dtdPubID(g)),b!=null&&(this.sysID=this.stringify.dtdSysID(b))}return Object.defineProperty(y.prototype,"entities",{get:function(){var d,g,b,L,A;for(L={},A=this.children,g=0,b=A.length;g<b;g++)d=A[g],d.type===i.EntityDeclaration&&!d.pe&&(L[d.name]=d);return new t(L)}}),Object.defineProperty(y.prototype,"notations",{get:function(){var d,g,b,L,A;for(L={},A=this.children,g=0,b=A.length;g<b;g++)d=A[g],d.type===i.NotationDeclaration&&(L[d.name]=d);return new t(L)}}),Object.defineProperty(y.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(y.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(y.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),y.prototype.element=function(d,g){var b;return b=new D(this,d,g),this.children.push(b),this},y.prototype.attList=function(d,g,b,L,A){var x;return x=new c(this,d,g,b,L,A),this.children.push(x),this},y.prototype.entity=function(d,g){var b;return b=new h(this,!1,d,g),this.children.push(b),this},y.prototype.pEntity=function(d,g){var b;return b=new h(this,!0,d,g),this.children.push(b),this},y.prototype.notation=function(d,g){var b;return b=new p(this,d,g),this.children.push(b),this},y.prototype.toString=function(d){return this.options.writer.docType(this,this.options.writer.filterOptions(d))},y.prototype.ele=function(d,g){return this.element(d,g)},y.prototype.att=function(d,g,b,L,A){return this.attList(d,g,b,L,A)},y.prototype.ent=function(d,g){return this.entity(d,g)},y.prototype.pent=function(d,g){return this.pEntity(d,g)},y.prototype.not=function(d,g){return this.notation(d,g)},y.prototype.up=function(){return this.root()||this.documentObject},y.prototype.isEqualNode=function(d){return!(!y.__super__.isEqualNode.apply(this,arguments).isEqualNode(d)||d.name!==this.name||d.publicId!==this.publicId||d.systemId!==this.systemId)},y}(e)}).call(M)),It.exports}var Xt={exports:{}},Le;function Rt(){return Le||(Le=1,(function(){var i,c,D=function(p,t){for(var e in t)h.call(t,e)&&(p[e]=t[e]);function o(){this.constructor=p}return o.prototype=t.prototype,p.prototype=new o,p.__super__=t.prototype,p},h={}.hasOwnProperty;i=q(),c=Y(),Xt.exports=function(p){D(t,p);function t(e,o){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=i.Raw,this.value=this.stringify.raw(o)}return t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.raw(this,this.options.writer.filterOptions(e))},t}(c)}).call(M)),Xt.exports}var jt={exports:{}},Ae;function Bt(){return Ae||(Ae=1,(function(){var i,c,D=function(p,t){for(var e in t)h.call(t,e)&&(p[e]=t[e]);function o(){this.constructor=p}return o.prototype=t.prototype,p.prototype=new o,p.__super__=t.prototype,p},h={}.hasOwnProperty;i=q(),c=et(),jt.exports=function(p){D(t,p);function t(e,o){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=i.Text,this.value=this.stringify.text(o)}return Object.defineProperty(t.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"wholeText",{get:function(){var e,o,l;for(l="",o=this.previousSibling;o;)l=o.data+l,o=o.previousSibling;for(l+=this.data,e=this.nextSibling;e;)l=l+e.data,e=e.nextSibling;return l}}),t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.text(this,this.options.writer.filterOptions(e))},t.prototype.splitText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceWholeText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t}(c)}).call(M)),jt.exports}var qt={exports:{}},Pe;function Ut(){return Pe||(Pe=1,(function(){var i,c,D=function(p,t){for(var e in t)h.call(t,e)&&(p[e]=t[e]);function o(){this.constructor=p}return o.prototype=t.prototype,p.prototype=new o,p.__super__=t.prototype,p},h={}.hasOwnProperty;i=q(),c=et(),qt.exports=function(p){D(t,p);function t(e,o,l){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=i.ProcessingInstruction,this.target=this.stringify.insTarget(o),this.name=this.target,l&&(this.value=this.stringify.insValue(l))}return t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(e))},t.prototype.isEqualNode=function(e){return!(!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)||e.target!==this.target)},t}(c)}).call(M)),qt.exports}var Vt={exports:{}},_e;function xe(){return _e||(_e=1,(function(){var i,c,D=function(p,t){for(var e in t)h.call(t,e)&&(p[e]=t[e]);function o(){this.constructor=p}return o.prototype=t.prototype,p.prototype=new o,p.__super__=t.prototype,p},h={}.hasOwnProperty;c=Y(),i=q(),Vt.exports=function(p){D(t,p);function t(e){t.__super__.constructor.call(this,e),this.type=i.Dummy}return t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return""},t}(c)}).call(M)),Vt.exports}var kt={exports:{}},Ce;function ar(){return Ce||(Ce=1,(function(){kt.exports=function(){function i(c){this.nodes=c}return Object.defineProperty(i.prototype,"length",{get:function(){return this.nodes.length||0}}),i.prototype.clone=function(){return this.nodes=null},i.prototype.item=function(c){return this.nodes[c]||null},i}()}).call(M)),kt.exports}var Wt={exports:{}},Me;function cr(){return Me||(Me=1,(function(){Wt.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(M)),Wt.exports}var Se;function Y(){return Se||(Se=1,(function(){var i,c,D,h,p,t,e,o,l,O,m,y,d,g,b,L,A,x={}.hasOwnProperty;A=z(),L=A.isObject,b=A.isFunction,g=A.isEmpty,d=A.getValue,o=null,D=null,h=null,p=null,t=null,m=null,y=null,O=null,e=null,c=null,l=null,i=null,ht.exports=function(){function E(s){this.parent=s,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,o||(o=wt(),D=Et(),h=Ot(),p=vt(),t=Ft(),m=Rt(),y=Bt(),O=Ut(),e=xe(),c=q(),l=ar(),gt(),i=cr())}return Object.defineProperty(E.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(E.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(E.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(E.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(E.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new l(this.children)),this.childNodeList}}),Object.defineProperty(E.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(E.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(E.prototype,"previousSibling",{get:function(){var s;return s=this.parent.children.indexOf(this),this.parent.children[s-1]||null}}),Object.defineProperty(E.prototype,"nextSibling",{get:function(){var s;return s=this.parent.children.indexOf(this),this.parent.children[s+1]||null}}),Object.defineProperty(E.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(E.prototype,"textContent",{get:function(){var s,a,f,T,I;if(this.nodeType===c.Element||this.nodeType===c.DocumentFragment){for(I="",T=this.children,a=0,f=T.length;a<f;a++)s=T[a],s.textContent&&(I+=s.textContent);return I}else return null},set:function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),E.prototype.setParent=function(s){var a,f,T,I,v;for(this.parent=s,s&&(this.options=s.options,this.stringify=s.stringify),I=this.children,v=[],f=0,T=I.length;f<T;f++)a=I[f],v.push(a.setParent(this));return v},E.prototype.element=function(s,a,f){var T,I,v,r,N,P,C,S,X,B,R;if(P=null,a===null&&f==null&&(X=[{},null],a=X[0],f=X[1]),a==null&&(a={}),a=d(a),L(a)||(B=[a,f],f=B[0],a=B[1]),s!=null&&(s=d(s)),Array.isArray(s))for(v=0,C=s.length;v<C;v++)I=s[v],P=this.element(I);else if(b(s))P=this.element(s.apply());else if(L(s)){for(N in s)if(x.call(s,N))if(R=s[N],b(R)&&(R=R.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&N.indexOf(this.stringify.convertAttKey)===0)P=this.attribute(N.substr(this.stringify.convertAttKey.length),R);else if(!this.options.separateArrayItems&&Array.isArray(R)&&g(R))P=this.dummy();else if(L(R)&&g(R))P=this.element(N);else if(!this.options.keepNullNodes&&R==null)P=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(R))for(r=0,S=R.length;r<S;r++)I=R[r],T={},T[N]=I,P=this.element(T);else L(R)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&N.indexOf(this.stringify.convertTextKey)===0?P=this.element(R):(P=this.element(N),P.element(R)):P=this.element(N,R)}else!this.options.keepNullNodes&&f===null?P=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&s.indexOf(this.stringify.convertTextKey)===0?P=this.text(f):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&s.indexOf(this.stringify.convertCDataKey)===0?P=this.cdata(f):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&s.indexOf(this.stringify.convertCommentKey)===0?P=this.comment(f):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&s.indexOf(this.stringify.convertRawKey)===0?P=this.raw(f):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&s.indexOf(this.stringify.convertPIKey)===0?P=this.instruction(s.substr(this.stringify.convertPIKey.length),f):P=this.node(s,a,f);if(P==null)throw new Error("Could not create any elements with: "+s+". "+this.debugInfo());return P},E.prototype.insertBefore=function(s,a,f){var T,I,v,r,N;if(s!=null&&s.type)return v=s,r=a,v.setParent(this),r?(I=children.indexOf(r),N=children.splice(I),children.push(v),Array.prototype.push.apply(children,N)):children.push(v),v;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(s));return I=this.parent.children.indexOf(this),N=this.parent.children.splice(I),T=this.parent.element(s,a,f),Array.prototype.push.apply(this.parent.children,N),T},E.prototype.insertAfter=function(s,a,f){var T,I,v;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(s));return I=this.parent.children.indexOf(this),v=this.parent.children.splice(I+1),T=this.parent.element(s,a,f),Array.prototype.push.apply(this.parent.children,v),T},E.prototype.remove=function(){var s;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return s=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[s,s-s+1].concat([])),this.parent},E.prototype.node=function(s,a,f){var T,I;return s!=null&&(s=d(s)),a||(a={}),a=d(a),L(a)||(I=[a,f],f=I[0],a=I[1]),T=new o(this,s,a),f!=null&&T.text(f),this.children.push(T),T},E.prototype.text=function(s){var a;return L(s)&&this.element(s),a=new y(this,s),this.children.push(a),this},E.prototype.cdata=function(s){var a;return a=new D(this,s),this.children.push(a),this},E.prototype.comment=function(s){var a;return a=new h(this,s),this.children.push(a),this},E.prototype.commentBefore=function(s){var a,f;return a=this.parent.children.indexOf(this),f=this.parent.children.splice(a),this.parent.comment(s),Array.prototype.push.apply(this.parent.children,f),this},E.prototype.commentAfter=function(s){var a,f;return a=this.parent.children.indexOf(this),f=this.parent.children.splice(a+1),this.parent.comment(s),Array.prototype.push.apply(this.parent.children,f),this},E.prototype.raw=function(s){var a;return a=new m(this,s),this.children.push(a),this},E.prototype.dummy=function(){var s;return s=new e(this),s},E.prototype.instruction=function(s,a){var f,T,I,v,r;if(s!=null&&(s=d(s)),a!=null&&(a=d(a)),Array.isArray(s))for(v=0,r=s.length;v<r;v++)f=s[v],this.instruction(f);else if(L(s))for(f in s)x.call(s,f)&&(T=s[f],this.instruction(f,T));else b(a)&&(a=a.apply()),I=new O(this,s,a),this.children.push(I);return this},E.prototype.instructionBefore=function(s,a){var f,T;return f=this.parent.children.indexOf(this),T=this.parent.children.splice(f),this.parent.instruction(s,a),Array.prototype.push.apply(this.parent.children,T),this},E.prototype.instructionAfter=function(s,a){var f,T;return f=this.parent.children.indexOf(this),T=this.parent.children.splice(f+1),this.parent.instruction(s,a),Array.prototype.push.apply(this.parent.children,T),this},E.prototype.declaration=function(s,a,f){var T,I;return T=this.document(),I=new p(T,s,a,f),T.children.length===0?T.children.unshift(I):T.children[0].type===c.Declaration?T.children[0]=I:T.children.unshift(I),T.root()||T},E.prototype.dtd=function(s,a){var f,T,I,v,r,N,P,C,S,X;for(T=this.document(),I=new t(T,s,a),S=T.children,v=r=0,P=S.length;r<P;v=++r)if(f=S[v],f.type===c.DocType)return T.children[v]=I,I;for(X=T.children,v=N=0,C=X.length;N<C;v=++N)if(f=X[v],f.isRoot)return T.children.splice(v,0,I),I;return T.children.push(I),I},E.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},E.prototype.root=function(){var s;for(s=this;s;){if(s.type===c.Document)return s.rootObject;if(s.isRoot)return s;s=s.parent}},E.prototype.document=function(){var s;for(s=this;s;){if(s.type===c.Document)return s;s=s.parent}},E.prototype.end=function(s){return this.document().end(s)},E.prototype.prev=function(){var s;if(s=this.parent.children.indexOf(this),s<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[s-1]},E.prototype.next=function(){var s;if(s=this.parent.children.indexOf(this),s===-1||s===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[s+1]},E.prototype.importDocument=function(s){var a;return a=s.root().clone(),a.parent=this,a.isRoot=!1,this.children.push(a),this},E.prototype.debugInfo=function(s){var a,f;return s=s||this.name,s==null&&!((a=this.parent)!=null&&a.name)?"":s==null?"parent: <"+this.parent.name+">":(f=this.parent)!=null&&f.name?"node: <"+s+">, parent: <"+this.parent.name+">":"node: <"+s+">"},E.prototype.ele=function(s,a,f){return this.element(s,a,f)},E.prototype.nod=function(s,a,f){return this.node(s,a,f)},E.prototype.txt=function(s){return this.text(s)},E.prototype.dat=function(s){return this.cdata(s)},E.prototype.com=function(s){return this.comment(s)},E.prototype.ins=function(s,a){return this.instruction(s,a)},E.prototype.doc=function(){return this.document()},E.prototype.dec=function(s,a,f){return this.declaration(s,a,f)},E.prototype.e=function(s,a,f){return this.element(s,a,f)},E.prototype.n=function(s,a,f){return this.node(s,a,f)},E.prototype.t=function(s){return this.text(s)},E.prototype.d=function(s){return this.cdata(s)},E.prototype.c=function(s){return this.comment(s)},E.prototype.r=function(s){return this.raw(s)},E.prototype.i=function(s,a){return this.instruction(s,a)},E.prototype.u=function(){return this.up()},E.prototype.importXMLBuilder=function(s){return this.importDocument(s)},E.prototype.replaceChild=function(s,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeChild=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.appendChild=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.hasChildNodes=function(){return this.children.length!==0},E.prototype.cloneNode=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isSupported=function(s,a){return!0},E.prototype.hasAttributes=function(){return this.attribs.length!==0},E.prototype.compareDocumentPosition=function(s){var a,f;return a=this,a===s?0:this.document()!==s.document()?(f=i.Disconnected|i.ImplementationSpecific,Math.random()<.5?f|=i.Preceding:f|=i.Following,f):a.isAncestor(s)?i.Contains|i.Preceding:a.isDescendant(s)?i.Contains|i.Following:a.isPreceding(s)?i.Preceding:i.Following},E.prototype.isSameNode=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupPrefix=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isDefaultNamespace=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupNamespaceURI=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isEqualNode=function(s){var a,f,T;if(s.nodeType!==this.nodeType||s.children.length!==this.children.length)return!1;for(a=f=0,T=this.children.length-1;0<=T?f<=T:f>=T;a=0<=T?++f:--f)if(!this.children[a].isEqualNode(s.children[a]))return!1;return!0},E.prototype.getFeature=function(s,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setUserData=function(s,a,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getUserData=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.contains=function(s){return s?s===this||this.isDescendant(s):!1},E.prototype.isDescendant=function(s){var a,f,T,I,v;for(v=this.children,T=0,I=v.length;T<I;T++)if(a=v[T],s===a||(f=a.isDescendant(s),f))return!0;return!1},E.prototype.isAncestor=function(s){return s.isDescendant(this)},E.prototype.isPreceding=function(s){var a,f;return a=this.treePosition(s),f=this.treePosition(this),a===-1||f===-1?!1:a<f},E.prototype.isFollowing=function(s){var a,f;return a=this.treePosition(s),f=this.treePosition(this),a===-1||f===-1?!1:a>f},E.prototype.treePosition=function(s){var a,f;return f=0,a=!1,this.foreachTreeNode(this.document(),function(T){if(f++,!a&&T===s)return a=!0}),a?f:-1},E.prototype.foreachTreeNode=function(s,a){var f,T,I,v,r;for(s||(s=this.document()),v=s.children,T=0,I=v.length;T<I;T++){if(f=v[T],r=a(f))return r;if(r=this.foreachTreeNode(f,a),r)return r}},E}()}).call(M)),ht.exports}var Gt={exports:{}},Fe;function Xe(){return Fe||(Fe=1,(function(){var i=function(D,h){return function(){return D.apply(h,arguments)}},c={}.hasOwnProperty;Gt.exports=function(){function D(h){this.assertLegalName=i(this.assertLegalName,this),this.assertLegalChar=i(this.assertLegalChar,this);var p,t,e;h||(h={}),this.options=h,this.options.version||(this.options.version="1.0"),t=h.stringify||{};for(p in t)c.call(t,p)&&(e=t[p],this[p]=e)}return D.prototype.name=function(h){return this.options.noValidation?h:this.assertLegalName(""+h||"")},D.prototype.text=function(h){return this.options.noValidation?h:this.assertLegalChar(this.textEscape(""+h||""))},D.prototype.cdata=function(h){return this.options.noValidation?h:(h=""+h||"",h=h.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(h))},D.prototype.comment=function(h){if(this.options.noValidation)return h;if(h=""+h||"",h.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+h);return this.assertLegalChar(h)},D.prototype.raw=function(h){return this.options.noValidation?h:""+h||""},D.prototype.attValue=function(h){return this.options.noValidation?h:this.assertLegalChar(this.attEscape(h=""+h||""))},D.prototype.insTarget=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},D.prototype.insValue=function(h){if(this.options.noValidation)return h;if(h=""+h||"",h.match(/\?>/))throw new Error("Invalid processing instruction value: "+h);return this.assertLegalChar(h)},D.prototype.xmlVersion=function(h){if(this.options.noValidation)return h;if(h=""+h||"",!h.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+h);return h},D.prototype.xmlEncoding=function(h){if(this.options.noValidation)return h;if(h=""+h||"",!h.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+h);return this.assertLegalChar(h)},D.prototype.xmlStandalone=function(h){return this.options.noValidation?h:h?"yes":"no"},D.prototype.dtdPubID=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},D.prototype.dtdSysID=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},D.prototype.dtdElementValue=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},D.prototype.dtdAttType=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},D.prototype.dtdAttDefault=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},D.prototype.dtdEntityValue=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},D.prototype.dtdNData=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},D.prototype.convertAttKey="@",D.prototype.convertPIKey="?",D.prototype.convertTextKey="#text",D.prototype.convertCDataKey="#cdata",D.prototype.convertCommentKey="#comment",D.prototype.convertRawKey="#raw",D.prototype.assertLegalChar=function(h){var p,t;if(this.options.noValidation)return h;if(p="",this.options.version==="1.0"){if(p=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=h.match(p))throw new Error("Invalid character in string: "+h+" at index "+t.index)}else if(this.options.version==="1.1"&&(p=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=h.match(p)))throw new Error("Invalid character in string: "+h+" at index "+t.index);return h},D.prototype.assertLegalName=function(h){var p;if(this.options.noValidation)return h;if(this.assertLegalChar(h),p=/^([: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])*$/,!h.match(p))throw new Error("Invalid character in name");return h},D.prototype.textEscape=function(h){var p;return this.options.noValidation?h:(p=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,h.replace(p,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},D.prototype.attEscape=function(h){var p;return this.options.noValidation?h:(p=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,h.replace(p,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},D}()}).call(M)),Gt.exports}var Yt={exports:{}},$t={exports:{}},Kt={exports:{}},Re;function rt(){return Re||(Re=1,(function(){Kt.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(M)),Kt.exports}var je;function Be(){return je||(je=1,(function(){var i,c,D,h={}.hasOwnProperty;D=z().assign,i=q(),vt(),Ft(),Et(),Ot(),wt(),Rt(),Bt(),Ut(),xe(),At(),Ct(),_t(),St(),c=rt(),$t.exports=function(){function p(t){var e,o,l;t||(t={}),this.options=t,o=t.writer||{};for(e in o)h.call(o,e)&&(l=o[e],this["_"+e]=this[e],this[e]=l)}return p.prototype.filterOptions=function(t){var e,o,l,O,m,y,d,g;return t||(t={}),t=D({},this.options,t),e={writer:this},e.pretty=t.pretty||!1,e.allowEmpty=t.allowEmpty||!1,e.indent=(o=t.indent)!=null?o:" ",e.newline=(l=t.newline)!=null?l:`
|
|
3
|
-
`,e.offset=(O=t.offset)!=null?O:0,e.dontPrettyTextNodes=(m=(y=t.dontPrettyTextNodes)!=null?y:t.dontprettytextnodes)!=null?m:0,e.spaceBeforeSlash=(d=(g=t.spaceBeforeSlash)!=null?g:t.spacebeforeslash)!=null?d:"",e.spaceBeforeSlash===!0&&(e.spaceBeforeSlash=" "),e.suppressPrettyCount=0,e.user={},e.state=c.None,e},p.prototype.indent=function(t,e,o){var l;return!e.pretty||e.suppressPrettyCount?"":e.pretty&&(l=(o||0)+e.offset+1,l>0)?new Array(l).join(e.indent):""},p.prototype.endline=function(t,e,o){return!e.pretty||e.suppressPrettyCount?"":e.newline},p.prototype.attribute=function(t,e,o){var l;return this.openAttribute(t,e,o),l=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,e,o),l},p.prototype.cdata=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<![CDATA[",e.state=c.InsideTag,l+=t.value,e.state=c.CloseTag,l+="]]>"+this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},p.prototype.comment=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<!-- ",e.state=c.InsideTag,l+=t.value,e.state=c.CloseTag,l+=" -->"+this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},p.prototype.declaration=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<?xml",e.state=c.InsideTag,l+=' version="'+t.version+'"',t.encoding!=null&&(l+=' encoding="'+t.encoding+'"'),t.standalone!=null&&(l+=' standalone="'+t.standalone+'"'),e.state=c.CloseTag,l+=e.spaceBeforeSlash+"?>",l+=this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},p.prototype.docType=function(t,e,o){var l,O,m,y,d;if(o||(o=0),this.openNode(t,e,o),e.state=c.OpenTag,y=this.indent(t,e,o),y+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?y+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(y+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(y+=" [",y+=this.endline(t,e,o),e.state=c.InsideTag,d=t.children,O=0,m=d.length;O<m;O++)l=d[O],y+=this.writeChildNode(l,e,o+1);e.state=c.CloseTag,y+="]"}return e.state=c.CloseTag,y+=e.spaceBeforeSlash+">",y+=this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),y},p.prototype.element=function(t,e,o){var l,O,m,y,d,g,b,L,A,x,E,s,a,f;o||(o=0),x=!1,E="",this.openNode(t,e,o),e.state=c.OpenTag,E+=this.indent(t,e,o)+"<"+t.name,s=t.attribs;for(A in s)h.call(s,A)&&(l=s[A],E+=this.attribute(l,e,o));if(m=t.children.length,y=m===0?null:t.children[0],m===0||t.children.every(function(T){return(T.type===i.Text||T.type===i.Raw)&&T.value===""}))e.allowEmpty?(E+=">",e.state=c.CloseTag,E+="</"+t.name+">"+this.endline(t,e,o)):(e.state=c.CloseTag,E+=e.spaceBeforeSlash+"/>"+this.endline(t,e,o));else if(e.pretty&&m===1&&(y.type===i.Text||y.type===i.Raw)&&y.value!=null)E+=">",e.state=c.InsideTag,e.suppressPrettyCount++,x=!0,E+=this.writeChildNode(y,e,o+1),e.suppressPrettyCount--,x=!1,e.state=c.CloseTag,E+="</"+t.name+">"+this.endline(t,e,o);else{if(e.dontPrettyTextNodes){for(a=t.children,d=0,b=a.length;d<b;d++)if(O=a[d],(O.type===i.Text||O.type===i.Raw)&&O.value!=null){e.suppressPrettyCount++,x=!0;break}}for(E+=">"+this.endline(t,e,o),e.state=c.InsideTag,f=t.children,g=0,L=f.length;g<L;g++)O=f[g],E+=this.writeChildNode(O,e,o+1);e.state=c.CloseTag,E+=this.indent(t,e,o)+"</"+t.name+">",x&&e.suppressPrettyCount--,E+=this.endline(t,e,o),e.state=c.None}return this.closeNode(t,e,o),E},p.prototype.writeChildNode=function(t,e,o){switch(t.type){case i.CData:return this.cdata(t,e,o);case i.Comment:return this.comment(t,e,o);case i.Element:return this.element(t,e,o);case i.Raw:return this.raw(t,e,o);case i.Text:return this.text(t,e,o);case i.ProcessingInstruction:return this.processingInstruction(t,e,o);case i.Dummy:return"";case i.Declaration:return this.declaration(t,e,o);case i.DocType:return this.docType(t,e,o);case i.AttributeDeclaration:return this.dtdAttList(t,e,o);case i.ElementDeclaration:return this.dtdElement(t,e,o);case i.EntityDeclaration:return this.dtdEntity(t,e,o);case i.NotationDeclaration:return this.dtdNotation(t,e,o);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},p.prototype.processingInstruction=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<?",e.state=c.InsideTag,l+=t.target,t.value&&(l+=" "+t.value),e.state=c.CloseTag,l+=e.spaceBeforeSlash+"?>",l+=this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},p.prototype.raw=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o),e.state=c.InsideTag,l+=t.value,e.state=c.CloseTag,l+=this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},p.prototype.text=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o),e.state=c.InsideTag,l+=t.value,e.state=c.CloseTag,l+=this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},p.prototype.dtdAttList=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<!ATTLIST",e.state=c.InsideTag,l+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,t.defaultValueType!=="#DEFAULT"&&(l+=" "+t.defaultValueType),t.defaultValue&&(l+=' "'+t.defaultValue+'"'),e.state=c.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},p.prototype.dtdElement=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<!ELEMENT",e.state=c.InsideTag,l+=" "+t.name+" "+t.value,e.state=c.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},p.prototype.dtdEntity=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<!ENTITY",e.state=c.InsideTag,t.pe&&(l+=" %"),l+=" "+t.name,t.value?l+=' "'+t.value+'"':(t.pubID&&t.sysID?l+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(l+=' SYSTEM "'+t.sysID+'"'),t.nData&&(l+=" NDATA "+t.nData)),e.state=c.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},p.prototype.dtdNotation=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<!NOTATION",e.state=c.InsideTag,l+=" "+t.name,t.pubID&&t.sysID?l+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?l+=' PUBLIC "'+t.pubID+'"':t.sysID&&(l+=' SYSTEM "'+t.sysID+'"'),e.state=c.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},p.prototype.openNode=function(t,e,o){},p.prototype.closeNode=function(t,e,o){},p.prototype.openAttribute=function(t,e,o){},p.prototype.closeAttribute=function(t,e,o){},p}()}).call(M)),$t.exports}var qe;function zt(){return qe||(qe=1,(function(){var i,c=function(h,p){for(var t in p)D.call(p,t)&&(h[t]=p[t]);function e(){this.constructor=h}return e.prototype=p.prototype,h.prototype=new e,h.__super__=p.prototype,h},D={}.hasOwnProperty;i=Be(),Yt.exports=function(h){c(p,h);function p(t){p.__super__.constructor.call(this,t)}return p.prototype.document=function(t,e){var o,l,O,m,y;for(e=this.filterOptions(e),m="",y=t.children,l=0,O=y.length;l<O;l++)o=y[l],m+=this.writeChildNode(o,e,0);return e.pretty&&m.slice(-e.newline.length)===e.newline&&(m=m.slice(0,-e.newline.length)),m},p}(i)}).call(M)),Yt.exports}var Ue;function Ve(){return Ue||(Ue=1,(function(){var i,c,D,h,p,t,e,o=function(O,m){for(var y in m)l.call(m,y)&&(O[y]=m[y]);function d(){this.constructor=O}return d.prototype=m.prototype,O.prototype=new d,O.__super__=m.prototype,O},l={}.hasOwnProperty;e=z().isPlainObject,D=ce(),c=ur(),h=Y(),i=q(),t=Xe(),p=zt(),at.exports=function(O){o(m,O);function m(y){m.__super__.constructor.call(this,null),this.name="#document",this.type=i.Document,this.documentURI=null,this.domConfig=new c,y||(y={}),y.writer||(y.writer=new p),this.options=y,this.stringify=new t(y)}return Object.defineProperty(m.prototype,"implementation",{value:new D}),Object.defineProperty(m.prototype,"doctype",{get:function(){var y,d,g,b;for(b=this.children,d=0,g=b.length;d<g;d++)if(y=b[d],y.type===i.DocType)return y;return null}}),Object.defineProperty(m.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(m.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(m.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(m.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===i.Declaration?this.children[0].encoding:null}}),Object.defineProperty(m.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===i.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(m.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===i.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(m.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(m.prototype,"origin",{get:function(){return null}}),Object.defineProperty(m.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(m.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(m.prototype,"contentType",{get:function(){return null}}),m.prototype.end=function(y){var d;return d={},y?e(y)&&(d=y,y=this.options.writer):y=this.options.writer,y.document(this,y.filterOptions(d))},m.prototype.toString=function(y){return this.options.writer.document(this,this.options.writer.filterOptions(y))},m.prototype.createElement=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createTextNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createComment=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createCDATASection=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createProcessingInstruction=function(y,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createAttribute=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createEntityReference=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.importNode=function(y,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createElementNS=function(y,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createAttributeNS=function(y,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagNameNS=function(y,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementById=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.adoptNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.renameNode=function(y,d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByClassName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createEvent=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createNodeIterator=function(y,d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createTreeWalker=function(y,d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m}(h)}).call(M)),at.exports}var Ht={exports:{}},ke;function lr(){return ke||(ke=1,(function(){var i,c,D,h,p,t,e,o,l,O,m,y,d,g,b,L,A,x,E,s,a,f,T,I={}.hasOwnProperty;T=z(),a=T.isObject,s=T.isFunction,f=T.isPlainObject,E=T.getValue,i=q(),y=Ve(),d=wt(),h=Et(),p=Ot(),b=Rt(),x=Bt(),g=Ut(),O=vt(),m=Ft(),t=At(),o=_t(),e=Ct(),l=St(),D=ye(),A=Xe(),L=zt(),c=rt(),Ht.exports=function(){function v(r,N,P){var C;this.name="?xml",this.type=i.Document,r||(r={}),C={},r.writer?f(r.writer)&&(C=r.writer,r.writer=new L):r.writer=new L,this.options=r,this.writer=r.writer,this.writerOptions=this.writer.filterOptions(C),this.stringify=new A(r),this.onDataCallback=N||function(){},this.onEndCallback=P||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return v.prototype.createChildNode=function(r){var N,P,C,S,X,B,R,F;switch(r.type){case i.CData:this.cdata(r.value);break;case i.Comment:this.comment(r.value);break;case i.Element:C={},R=r.attribs;for(P in R)I.call(R,P)&&(N=R[P],C[P]=N.value);this.node(r.name,C);break;case i.Dummy:this.dummy();break;case i.Raw:this.raw(r.value);break;case i.Text:this.text(r.value);break;case i.ProcessingInstruction:this.instruction(r.target,r.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+r.constructor.name)}for(F=r.children,X=0,B=F.length;X<B;X++)S=F[X],this.createChildNode(S),S.type===i.Element&&this.up();return this},v.prototype.dummy=function(){return this},v.prototype.node=function(r,N,P){var C;if(r==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(r));return this.openCurrent(),r=E(r),N==null&&(N={}),N=E(N),a(N)||(C=[N,P],P=C[0],N=C[1]),this.currentNode=new d(this,r,N),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,P!=null&&this.text(P),this},v.prototype.element=function(r,N,P){var C,S,X,B,R,F;if(this.currentNode&&this.currentNode.type===i.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(r)||a(r)||s(r))for(B=this.options.noValidation,this.options.noValidation=!0,F=new y(this.options).element("TEMP_ROOT"),F.element(r),this.options.noValidation=B,R=F.children,S=0,X=R.length;S<X;S++)C=R[S],this.createChildNode(C),C.type===i.Element&&this.up();else this.node(r,N,P);return this},v.prototype.attribute=function(r,N){var P,C;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(r));if(r!=null&&(r=E(r)),a(r))for(P in r)I.call(r,P)&&(C=r[P],this.attribute(P,C));else s(N)&&(N=N.apply()),this.options.keepNullAttributes&&N==null?this.currentNode.attribs[r]=new D(this,r,""):N!=null&&(this.currentNode.attribs[r]=new D(this,r,N));return this},v.prototype.text=function(r){var N;return this.openCurrent(),N=new x(this,r),this.onData(this.writer.text(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.cdata=function(r){var N;return this.openCurrent(),N=new h(this,r),this.onData(this.writer.cdata(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.comment=function(r){var N;return this.openCurrent(),N=new p(this,r),this.onData(this.writer.comment(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.raw=function(r){var N;return this.openCurrent(),N=new b(this,r),this.onData(this.writer.raw(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.instruction=function(r,N){var P,C,S,X,B;if(this.openCurrent(),r!=null&&(r=E(r)),N!=null&&(N=E(N)),Array.isArray(r))for(P=0,X=r.length;P<X;P++)C=r[P],this.instruction(C);else if(a(r))for(C in r)I.call(r,C)&&(S=r[C],this.instruction(C,S));else s(N)&&(N=N.apply()),B=new g(this,r,N),this.onData(this.writer.processingInstruction(B,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},v.prototype.declaration=function(r,N,P){var C;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return C=new O(this,r,N,P),this.onData(this.writer.declaration(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.doctype=function(r,N,P){if(this.openCurrent(),r==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 m(this,N,P),this.currentNode.rootNodeName=r,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},v.prototype.dtdElement=function(r,N){var P;return this.openCurrent(),P=new e(this,r,N),this.onData(this.writer.dtdElement(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.attList=function(r,N,P,C,S){var X;return this.openCurrent(),X=new t(this,r,N,P,C,S),this.onData(this.writer.dtdAttList(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.entity=function(r,N){var P;return this.openCurrent(),P=new o(this,!1,r,N),this.onData(this.writer.dtdEntity(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.pEntity=function(r,N){var P;return this.openCurrent(),P=new o(this,!0,r,N),this.onData(this.writer.dtdEntity(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.notation=function(r,N){var P;return this.openCurrent(),P=new l(this,r,N),this.onData(this.writer.dtdNotation(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.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},v.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},v.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},v.prototype.openNode=function(r){var N,P,C,S;if(!r.isOpen){if(!this.root&&this.currentLevel===0&&r.type===i.Element&&(this.root=r),P="",r.type===i.Element){this.writerOptions.state=c.OpenTag,P=this.writer.indent(r,this.writerOptions,this.currentLevel)+"<"+r.name,S=r.attribs;for(C in S)I.call(S,C)&&(N=S[C],P+=this.writer.attribute(N,this.writerOptions,this.currentLevel));P+=(r.children?">":"/>")+this.writer.endline(r,this.writerOptions,this.currentLevel),this.writerOptions.state=c.InsideTag}else this.writerOptions.state=c.OpenTag,P=this.writer.indent(r,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+r.rootNodeName,r.pubID&&r.sysID?P+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.sysID&&(P+=' SYSTEM "'+r.sysID+'"'),r.children?(P+=" [",this.writerOptions.state=c.InsideTag):(this.writerOptions.state=c.CloseTag,P+=">"),P+=this.writer.endline(r,this.writerOptions,this.currentLevel);return this.onData(P,this.currentLevel),r.isOpen=!0}},v.prototype.closeNode=function(r){var N;if(!r.isClosed)return N="",this.writerOptions.state=c.CloseTag,r.type===i.Element?N=this.writer.indent(r,this.writerOptions,this.currentLevel)+"</"+r.name+">"+this.writer.endline(r,this.writerOptions,this.currentLevel):N=this.writer.indent(r,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(r,this.writerOptions,this.currentLevel),this.writerOptions.state=c.None,this.onData(N,this.currentLevel),r.isClosed=!0},v.prototype.onData=function(r,N){return this.documentStarted=!0,this.onDataCallback(r,N+1)},v.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},v.prototype.debugInfo=function(r){return r==null?"":"node: <"+r+">"},v.prototype.ele=function(){return this.element.apply(this,arguments)},v.prototype.nod=function(r,N,P){return this.node(r,N,P)},v.prototype.txt=function(r){return this.text(r)},v.prototype.dat=function(r){return this.cdata(r)},v.prototype.com=function(r){return this.comment(r)},v.prototype.ins=function(r,N){return this.instruction(r,N)},v.prototype.dec=function(r,N,P){return this.declaration(r,N,P)},v.prototype.dtd=function(r,N,P){return this.doctype(r,N,P)},v.prototype.e=function(r,N,P){return this.element(r,N,P)},v.prototype.n=function(r,N,P){return this.node(r,N,P)},v.prototype.t=function(r){return this.text(r)},v.prototype.d=function(r){return this.cdata(r)},v.prototype.c=function(r){return this.comment(r)},v.prototype.r=function(r){return this.raw(r)},v.prototype.i=function(r,N){return this.instruction(r,N)},v.prototype.att=function(){return this.currentNode&&this.currentNode.type===i.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},v.prototype.a=function(){return this.currentNode&&this.currentNode.type===i.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},v.prototype.ent=function(r,N){return this.entity(r,N)},v.prototype.pent=function(r,N){return this.pEntity(r,N)},v.prototype.not=function(r,N){return this.notation(r,N)},v}()}).call(M)),Ht.exports}var Qt={exports:{}},We;function fr(){return We||(We=1,(function(){var i,c,D,h=function(t,e){for(var o in e)p.call(e,o)&&(t[o]=e[o]);function l(){this.constructor=t}return l.prototype=e.prototype,t.prototype=new l,t.__super__=e.prototype,t},p={}.hasOwnProperty;i=q(),D=Be(),c=rt(),Qt.exports=function(t){h(e,t);function e(o,l){this.stream=o,e.__super__.constructor.call(this,l)}return e.prototype.endline=function(o,l,O){return o.isLastRootNode&&l.state===c.CloseTag?"":e.__super__.endline.call(this,o,l,O)},e.prototype.document=function(o,l){var O,m,y,d,g,b,L,A,x;for(L=o.children,m=y=0,g=L.length;y<g;m=++y)O=L[m],O.isLastRootNode=m===o.children.length-1;for(l=this.filterOptions(l),A=o.children,x=[],d=0,b=A.length;d<b;d++)O=A[d],x.push(this.writeChildNode(O,l,0));return x},e.prototype.attribute=function(o,l,O){return this.stream.write(e.__super__.attribute.call(this,o,l,O))},e.prototype.cdata=function(o,l,O){return this.stream.write(e.__super__.cdata.call(this,o,l,O))},e.prototype.comment=function(o,l,O){return this.stream.write(e.__super__.comment.call(this,o,l,O))},e.prototype.declaration=function(o,l,O){return this.stream.write(e.__super__.declaration.call(this,o,l,O))},e.prototype.docType=function(o,l,O){var m,y,d,g;if(O||(O=0),this.openNode(o,l,O),l.state=c.OpenTag,this.stream.write(this.indent(o,l,O)),this.stream.write("<!DOCTYPE "+o.root().name),o.pubID&&o.sysID?this.stream.write(' PUBLIC "'+o.pubID+'" "'+o.sysID+'"'):o.sysID&&this.stream.write(' SYSTEM "'+o.sysID+'"'),o.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(o,l,O)),l.state=c.InsideTag,g=o.children,y=0,d=g.length;y<d;y++)m=g[y],this.writeChildNode(m,l,O+1);l.state=c.CloseTag,this.stream.write("]")}return l.state=c.CloseTag,this.stream.write(l.spaceBeforeSlash+">"),this.stream.write(this.endline(o,l,O)),l.state=c.None,this.closeNode(o,l,O)},e.prototype.element=function(o,l,O){var m,y,d,g,b,L,A,x,E;O||(O=0),this.openNode(o,l,O),l.state=c.OpenTag,this.stream.write(this.indent(o,l,O)+"<"+o.name),x=o.attribs;for(A in x)p.call(x,A)&&(m=x[A],this.attribute(m,l,O));if(d=o.children.length,g=d===0?null:o.children[0],d===0||o.children.every(function(s){return(s.type===i.Text||s.type===i.Raw)&&s.value===""}))l.allowEmpty?(this.stream.write(">"),l.state=c.CloseTag,this.stream.write("</"+o.name+">")):(l.state=c.CloseTag,this.stream.write(l.spaceBeforeSlash+"/>"));else if(l.pretty&&d===1&&(g.type===i.Text||g.type===i.Raw)&&g.value!=null)this.stream.write(">"),l.state=c.InsideTag,l.suppressPrettyCount++,this.writeChildNode(g,l,O+1),l.suppressPrettyCount--,l.state=c.CloseTag,this.stream.write("</"+o.name+">");else{for(this.stream.write(">"+this.endline(o,l,O)),l.state=c.InsideTag,E=o.children,b=0,L=E.length;b<L;b++)y=E[b],this.writeChildNode(y,l,O+1);l.state=c.CloseTag,this.stream.write(this.indent(o,l,O)+"</"+o.name+">")}return this.stream.write(this.endline(o,l,O)),l.state=c.None,this.closeNode(o,l,O)},e.prototype.processingInstruction=function(o,l,O){return this.stream.write(e.__super__.processingInstruction.call(this,o,l,O))},e.prototype.raw=function(o,l,O){return this.stream.write(e.__super__.raw.call(this,o,l,O))},e.prototype.text=function(o,l,O){return this.stream.write(e.__super__.text.call(this,o,l,O))},e.prototype.dtdAttList=function(o,l,O){return this.stream.write(e.__super__.dtdAttList.call(this,o,l,O))},e.prototype.dtdElement=function(o,l,O){return this.stream.write(e.__super__.dtdElement.call(this,o,l,O))},e.prototype.dtdEntity=function(o,l,O){return this.stream.write(e.__super__.dtdEntity.call(this,o,l,O))},e.prototype.dtdNotation=function(o,l,O){return this.stream.write(e.__super__.dtdNotation.call(this,o,l,O))},e}(D)}).call(M)),Qt.exports}var Ge;function hr(){return Ge||(Ge=1,(function(){var i,c,D,h,p,t,e,o,l,O;O=z(),o=O.assign,l=O.isFunction,D=ce(),h=Ve(),p=lr(),e=zt(),t=fr(),i=q(),c=rt(),$.create=function(m,y,d,g){var b,L;if(m==null)throw new Error("Root element needs a name.");return g=o({},y,d,g),b=new h(g),L=b.element(m),g.headless||(b.declaration(g),(g.pubID!=null||g.sysID!=null)&&b.dtd(g)),L},$.begin=function(m,y,d){var g;return l(m)&&(g=[m,y],y=g[0],d=g[1],m={}),y?new p(m,y,d):new h(m)},$.stringWriter=function(m){return new e(m)},$.streamWriter=function(m,y){return new t(m,y)},$.implementation=new D,$.nodeType=i,$.writerState=c}).call(M)),$}var Ye;function pr(){return Ye||(Ye=1,(function(){var i,c,D,h,p,t={}.hasOwnProperty;i=hr(),c=ot().defaults,h=function(e){return typeof e=="string"&&(e.indexOf("&")>=0||e.indexOf(">")>=0||e.indexOf("<")>=0)},p=function(e){return"<![CDATA["+D(e)+"]]>"},D=function(e){return e.replace("]]>","]]]]><![CDATA[>")},st.Builder=function(){function e(o){var l,O,m;this.options={},O=c["0.2"];for(l in O)t.call(O,l)&&(m=O[l],this.options[l]=m);for(l in o)t.call(o,l)&&(m=o[l],this.options[l]=m)}return e.prototype.buildObject=function(o){var l,O,m,y,d;return l=this.options.attrkey,O=this.options.charkey,Object.keys(o).length===1&&this.options.rootName===c["0.2"].rootName?(d=Object.keys(o)[0],o=o[d]):d=this.options.rootName,m=function(g){return function(b,L){var A,x,E,s,a,f;if(typeof L!="object")g.options.cdata&&h(L)?b.raw(p(L)):b.txt(L);else if(Array.isArray(L)){for(s in L)if(t.call(L,s)){x=L[s];for(a in x)E=x[a],b=m(b.ele(a),E).up()}}else for(a in L)if(t.call(L,a))if(x=L[a],a===l){if(typeof x=="object")for(A in x)f=x[A],b=b.att(A,f)}else if(a===O)g.options.cdata&&h(x)?b=b.raw(p(x)):b=b.txt(x);else if(Array.isArray(x))for(s in x)t.call(x,s)&&(E=x[s],typeof E=="string"?g.options.cdata&&h(E)?b=b.ele(a).raw(p(E)).up():b=b.ele(a,E).up():b=m(b.ele(a),E).up());else typeof x=="object"?b=m(b.ele(a),x).up():typeof x=="string"&&g.options.cdata&&h(x)?b=b.ele(a).raw(p(x)).up():(x==null&&(x=""),b=b.ele(a,x.toString()).up());return b}}(this),y=i.create(d,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),m(y,o).end(this.options.renderOpts)},e}()}).call(M)),st}var Zt={},Jt={};const te=ir(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var $e;function dr(){return $e||($e=1,function(i){(function(c){c.parser=function(u,n){return new h(u,n)},c.SAXParser=h,c.SAXStream=m,c.createStream=O,c.MAX_BUFFER_LENGTH=64*1024;var D=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];c.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function h(u,n){if(!(this instanceof h))return new h(u,n);var _=this;t(_),_.q=_.c="",_.bufferCheckPosition=c.MAX_BUFFER_LENGTH,_.opt=n||{},_.opt.lowercase=_.opt.lowercase||_.opt.lowercasetags,_.looseCase=_.opt.lowercase?"toLowerCase":"toUpperCase",_.tags=[],_.closed=_.closedRoot=_.sawRoot=!1,_.tag=_.error=null,_.strict=!!u,_.noscript=!!(u||_.opt.noscript),_.state=r.BEGIN,_.strictEntities=_.opt.strictEntities,_.ENTITIES=_.strictEntities?Object.create(c.XML_ENTITIES):Object.create(c.ENTITIES),_.attribList=[],_.opt.xmlns&&(_.ns=Object.create(L)),_.opt.unquotedAttributeValues===void 0&&(_.opt.unquotedAttributeValues=!u),_.trackPosition=_.opt.position!==!1,_.trackPosition&&(_.position=_.line=_.column=0),P(_,"onready")}Object.create||(Object.create=function(u){function n(){}n.prototype=u;var _=new n;return _}),Object.keys||(Object.keys=function(u){var n=[];for(var _ in u)u.hasOwnProperty(_)&&n.push(_);return n});function p(u){for(var n=Math.max(c.MAX_BUFFER_LENGTH,10),_=0,w=0,j=D.length;w<j;w++){var U=u[D[w]].length;if(U>n)switch(D[w]){case"textNode":S(u);break;case"cdata":C(u,"oncdata",u.cdata),u.cdata="";break;case"script":C(u,"onscript",u.script),u.script="";break;default:B(u,"Max buffer length exceeded: "+D[w])}_=Math.max(_,U)}var V=c.MAX_BUFFER_LENGTH-_;u.bufferCheckPosition=V+u.position}function t(u){for(var n=0,_=D.length;n<_;n++)u[D[n]]=""}function e(u){S(u),u.cdata!==""&&(C(u,"oncdata",u.cdata),u.cdata=""),u.script!==""&&(C(u,"onscript",u.script),u.script="")}h.prototype={end:function(){R(this)},write:Fr,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){e(this)}};var o;try{o=te.Stream}catch{o=function(){}}o||(o=function(){});var l=c.EVENTS.filter(function(u){return u!=="error"&&u!=="end"});function O(u,n){return new m(u,n)}function m(u,n){if(!(this instanceof m))return new m(u,n);o.apply(this),this._parser=new h(u,n),this.writable=!0,this.readable=!0;var _=this;this._parser.onend=function(){_.emit("end")},this._parser.onerror=function(w){_.emit("error",w),_._parser.error=null},this._decoder=null,l.forEach(function(w){Object.defineProperty(_,"on"+w,{get:function(){return _._parser["on"+w]},set:function(j){if(!j)return _.removeAllListeners(w),_._parser["on"+w]=j,j;_.on(w,j)},enumerable:!0,configurable:!1})})}m.prototype=Object.create(o.prototype,{constructor:{value:m}}),m.prototype.write=function(u){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(u)){if(!this._decoder){var n=te.StringDecoder;this._decoder=new n("utf8")}u=this._decoder.write(u)}return this._parser.write(u.toString()),this.emit("data",u),!0},m.prototype.end=function(u){return u&&u.length&&this.write(u),this._parser.end(),!0},m.prototype.on=function(u,n){var _=this;return!_._parser["on"+u]&&l.indexOf(u)!==-1&&(_._parser["on"+u]=function(){var w=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);w.splice(0,0,u),_.emit.apply(_,w)}),o.prototype.on.call(_,u,n)};var y="[CDATA[",d="DOCTYPE",g="http://www.w3.org/XML/1998/namespace",b="http://www.w3.org/2000/xmlns/",L={xml:g,xmlns:b},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]/,x=/[:_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-]/,E=/[#:_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]/,s=/[#:_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 a(u){return u===" "||u===`
|
|
4
|
-
`||u==="\r"||u===" "}function
|
|
1
|
+
(function(Q,et){typeof exports=="object"&&typeof module<"u"?et(exports):typeof define=="function"&&define.amd?define(["exports"],et):(Q=typeof globalThis<"u"?globalThis:Q||self,et(Q.SubstackFeedAPI={}))})(this,function(Q){"use strict";function et(i){if(i.__esModule)return i;var c=i.default;if(typeof c=="function"){var D=function f(){return this instanceof f?Reflect.construct(c,arguments,this.constructor):c.apply(this,arguments)};D.prototype=c.prototype}else D={};return Object.defineProperty(D,"__esModule",{value:!0}),Object.keys(i).forEach(function(f){var h=Object.getOwnPropertyDescriptor(i,f);Object.defineProperty(D,f,h.get?h:{enumerable:!0,get:function(){return i[f]}})}),D}var G={},rt={},ue;function qt(){return ue||(ue=1,(function(){rt.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(rt)),rt}var nt={},Y={},K={},ae;function z(){return ae||(ae=1,(function(){var i,c,D,f,h,t,e,o=[].slice,l={}.hasOwnProperty;i=function(){var b,m,y,d,g,O;if(O=arguments[0],g=2<=arguments.length?o.call(arguments,1):[],h(Object.assign))Object.assign.apply(null,arguments);else for(b=0,y=g.length;b<y;b++)if(d=g[b],d!=null)for(m in d)l.call(d,m)&&(O[m]=d[m]);return O},h=function(b){return!!b&&Object.prototype.toString.call(b)==="[object Function]"},t=function(b){var m;return!!b&&((m=typeof b)=="function"||m==="object")},D=function(b){return h(Array.isArray)?Array.isArray(b):Object.prototype.toString.call(b)==="[object Array]"},f=function(b){var m;if(D(b))return!b.length;for(m in b)if(l.call(b,m))return!1;return!0},e=function(b){var m,y;return t(b)&&(y=Object.getPrototypeOf(b))&&(m=y.constructor)&&typeof m=="function"&&m instanceof m&&Function.prototype.toString.call(m)===Function.prototype.toString.call(Object)},c=function(b){return h(b.valueOf)?b.valueOf():b},K.assign=i,K.isFunction=h,K.isObject=t,K.isArray=D,K.isEmpty=f,K.isPlainObject=e,K.getValue=c}).call(K)),K}var it={exports:{}},or=it.exports,ce;function le(){return ce||(ce=1,(function(){it.exports=function(){function i(){}return i.prototype.hasFeature=function(c,D){return!0},i.prototype.createDocumentType=function(c,D,f){throw new Error("This DOM method is not implemented.")},i.prototype.createDocument=function(c,D,f){throw new Error("This DOM method is not implemented.")},i.prototype.createHTMLDocument=function(c){throw new Error("This DOM method is not implemented.")},i.prototype.getFeature=function(c,D){throw new Error("This DOM method is not implemented.")},i}()}).call(or)),it.exports}var ot={exports:{}},st={exports:{}},ut={exports:{}},sr=ut.exports,fe;function ur(){return fe||(fe=1,(function(){ut.exports=function(){function i(){}return i.prototype.handleError=function(c){throw new Error(c)},i}()}).call(sr)),ut.exports}var at={exports:{}},ar=at.exports,pe;function cr(){return pe||(pe=1,(function(){at.exports=function(){function i(c){this.arr=c||[]}return Object.defineProperty(i.prototype,"length",{get:function(){return this.arr.length}}),i.prototype.item=function(c){return this.arr[c]||null},i.prototype.contains=function(c){return this.arr.indexOf(c)!==-1},i}()}).call(ar)),at.exports}var lr=st.exports,he;function fr(){return he||(he=1,(function(){var i,c;i=ur(),c=cr(),st.exports=function(){function D(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new i,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=Object.create(this.defaultParams)}return Object.defineProperty(D.prototype,"parameterNames",{get:function(){return new c(Object.keys(this.defaultParams))}}),D.prototype.getParameter=function(f){return this.params.hasOwnProperty(f)?this.params[f]:null},D.prototype.canSetParameter=function(f,h){return!0},D.prototype.setParameter=function(f,h){return h!=null?this.params[f]=h:delete this.params[f]},D}()}).call(lr)),st.exports}var ct={exports:{}},lt={exports:{}},ft={exports:{}},pr=ft.exports,de;function B(){return de||(de=1,(function(){ft.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(pr)),ft.exports}var pt={exports:{}},hr=pt.exports,ye;function me(){return ye||(ye=1,(function(){var i;i=B(),W(),pt.exports=function(){function c(D,f,h){if(this.parent=D,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(h),this.type=i.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(c.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(c.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(c.prototype,"textContent",{get:function(){return this.value},set:function(D){return this.value=D||""}}),Object.defineProperty(c.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(c.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(c.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(c.prototype,"specified",{get:function(){return!0}}),c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(D){return this.options.writer.attribute(this,this.options.writer.filterOptions(D))},c.prototype.debugInfo=function(D){return D=D||this.name,D==null?"parent: <"+this.parent.name+">":"attribute: {"+D+"}, parent: <"+this.parent.name+">"},c.prototype.isEqualNode=function(D){return!(D.namespaceURI!==this.namespaceURI||D.prefix!==this.prefix||D.localName!==this.localName||D.value!==this.value)},c}()}).call(hr)),pt.exports}var ht={exports:{}},dr=ht.exports,ge;function Ut(){return ge||(ge=1,(function(){ht.exports=function(){function i(c){this.nodes=c}return Object.defineProperty(i.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),i.prototype.clone=function(){return this.nodes=null},i.prototype.getNamedItem=function(c){return this.nodes[c]},i.prototype.setNamedItem=function(c){var D;return D=this.nodes[c.nodeName],this.nodes[c.nodeName]=c,D||null},i.prototype.removeNamedItem=function(c){var D;return D=this.nodes[c],delete this.nodes[c],D||null},i.prototype.item=function(c){return this.nodes[Object.keys(this.nodes)[c]]||null},i.prototype.getNamedItemNS=function(c,D){throw new Error("This DOM method is not implemented.")},i.prototype.setNamedItemNS=function(c){throw new Error("This DOM method is not implemented.")},i.prototype.removeNamedItemNS=function(c,D){throw new Error("This DOM method is not implemented.")},i}()}).call(dr)),ht.exports}var yr=lt.exports,we;function Vt(){return we||(we=1,(function(){var i,c,D,f,h,t,e,o,l=function(m,y){for(var d in y)b.call(y,d)&&(m[d]=y[d]);function g(){this.constructor=m}return g.prototype=y.prototype,m.prototype=new g,m.__super__=y.prototype,m},b={}.hasOwnProperty;o=z(),e=o.isObject,t=o.isFunction,h=o.getValue,f=W(),i=B(),c=me(),D=Ut(),lt.exports=function(m){l(y,m);function y(d,g,O){var I,x,P,E;if(y.__super__.constructor.call(this,d),g==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(g),this.type=i.Element,this.attribs={},this.schemaTypeInfo=null,O!=null&&this.attribute(O),d.type===i.Document&&(this.isRoot=!0,this.documentObject=d,d.rootObject=this,d.children)){for(E=d.children,x=0,P=E.length;x<P;x++)if(I=E[x],I.type===i.DocType){I.name=this.name;break}}}return Object.defineProperty(y.prototype,"tagName",{get:function(){return this.name}}),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,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new D(this.attribs)),this.attributeMap}}),y.prototype.clone=function(){var d,g,O,I;O=Object.create(this),O.isRoot&&(O.documentObject=null),O.attribs={},I=this.attribs;for(g in I)b.call(I,g)&&(d=I[g],O.attribs[g]=d.clone());return O.children=[],this.children.forEach(function(x){var P;return P=x.clone(),P.parent=O,O.children.push(P)}),O},y.prototype.attribute=function(d,g){var O,I;if(d!=null&&(d=h(d)),e(d))for(O in d)b.call(d,O)&&(I=d[O],this.attribute(O,I));else t(g)&&(g=g.apply()),this.options.keepNullAttributes&&g==null?this.attribs[d]=new c(this,d,""):g!=null&&(this.attribs[d]=new c(this,d,g));return this},y.prototype.removeAttribute=function(d){var g,O,I;if(d==null)throw new Error("Missing attribute name. "+this.debugInfo());if(d=h(d),Array.isArray(d))for(O=0,I=d.length;O<I;O++)g=d[O],delete this.attribs[g];else delete this.attribs[d];return this},y.prototype.toString=function(d){return this.options.writer.element(this,this.options.writer.filterOptions(d))},y.prototype.att=function(d,g){return this.attribute(d,g)},y.prototype.a=function(d,g){return this.attribute(d,g)},y.prototype.getAttribute=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d].value:null},y.prototype.setAttribute=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNode=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d]:null},y.prototype.setAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.removeAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNS=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setAttributeNS=function(d,g,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.removeAttributeNS=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNodeNS=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setAttributeNodeNS=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagNameNS=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.hasAttribute=function(d){return this.attribs.hasOwnProperty(d)},y.prototype.hasAttributeNS=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setIdAttribute=function(d,g){return this.attribs.hasOwnProperty(d)?this.attribs[d].isId:g},y.prototype.setIdAttributeNS=function(d,g,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setIdAttributeNode=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagNameNS=function(d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByClassName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.isEqualNode=function(d){var g,O,I;if(!y.__super__.isEqualNode.apply(this,arguments).isEqualNode(d)||d.namespaceURI!==this.namespaceURI||d.prefix!==this.prefix||d.localName!==this.localName||d.attribs.length!==this.attribs.length)return!1;for(g=O=0,I=this.attribs.length-1;0<=I?O<=I:O>=I;g=0<=I?++O:--O)if(!this.attribs[g].isEqualNode(d.attribs[g]))return!1;return!0},y}(f)}).call(yr)),lt.exports}var dt={exports:{}},yt={exports:{}},mr=yt.exports,Te;function mt(){return Te||(Te=1,(function(){var i,c=function(f,h){for(var t in h)D.call(h,t)&&(f[t]=h[t]);function e(){this.constructor=f}return e.prototype=h.prototype,f.prototype=new e,f.__super__=h.prototype,f},D={}.hasOwnProperty;i=W(),yt.exports=function(f){c(h,f);function h(t){h.__super__.constructor.call(this,t),this.value=""}return Object.defineProperty(h.prototype,"data",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(h.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(h.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),h.prototype.clone=function(){return Object.create(this)},h.prototype.substringData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.appendData=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.insertData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.deleteData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.replaceData=function(t,e,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.isEqualNode=function(t){return!(!h.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)||t.data!==this.data)},h}(i)}).call(mr)),yt.exports}var gr=dt.exports,De;function kt(){return De||(De=1,(function(){var i,c,D=function(h,t){for(var e in t)f.call(t,e)&&(h[e]=t[e]);function o(){this.constructor=h}return o.prototype=t.prototype,h.prototype=new o,h.__super__=t.prototype,h},f={}.hasOwnProperty;i=B(),c=mt(),dt.exports=function(h){D(t,h);function t(e,o){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=i.CData,this.value=this.stringify.cdata(o)}return t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.cdata(this,this.options.writer.filterOptions(e))},t}(c)}).call(gr)),dt.exports}var gt={exports:{}},wr=gt.exports,Ee;function $t(){return Ee||(Ee=1,(function(){var i,c,D=function(h,t){for(var e in t)f.call(t,e)&&(h[e]=t[e]);function o(){this.constructor=h}return o.prototype=t.prototype,h.prototype=new o,h.__super__=t.prototype,h},f={}.hasOwnProperty;i=B(),c=mt(),gt.exports=function(h){D(t,h);function t(e,o){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=i.Comment,this.value=this.stringify.comment(o)}return t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.comment(this,this.options.writer.filterOptions(e))},t}(c)}).call(wr)),gt.exports}var wt={exports:{}},Tr=wt.exports,be;function Wt(){return be||(be=1,(function(){var i,c,D,f=function(t,e){for(var o in e)h.call(e,o)&&(t[o]=e[o]);function l(){this.constructor=t}return l.prototype=e.prototype,t.prototype=new l,t.__super__=e.prototype,t},h={}.hasOwnProperty;D=z().isObject,c=W(),i=B(),wt.exports=function(t){f(e,t);function e(o,l,b,m){var y;e.__super__.constructor.call(this,o),D(l)&&(y=l,l=y.version,b=y.encoding,m=y.standalone),l||(l="1.0"),this.type=i.Declaration,this.version=this.stringify.xmlVersion(l),b!=null&&(this.encoding=this.stringify.xmlEncoding(b)),m!=null&&(this.standalone=this.stringify.xmlStandalone(m))}return e.prototype.toString=function(o){return this.options.writer.declaration(this,this.options.writer.filterOptions(o))},e}(c)}).call(Tr)),wt.exports}var Tt={exports:{}},Dt={exports:{}},Dr=Dt.exports,Oe;function Gt(){return Oe||(Oe=1,(function(){var i,c,D=function(h,t){for(var e in t)f.call(t,e)&&(h[e]=t[e]);function o(){this.constructor=h}return o.prototype=t.prototype,h.prototype=new o,h.__super__=t.prototype,h},f={}.hasOwnProperty;c=W(),i=B(),Dt.exports=function(h){D(t,h);function t(e,o,l,b,m,y){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(l==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(o));if(!b)throw new Error("Missing DTD attribute type. "+this.debugInfo(o));if(!m)throw new Error("Missing DTD attribute default. "+this.debugInfo(o));if(m.indexOf("#")!==0&&(m="#"+m),!m.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(o));if(y&&!m.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(o));this.elementName=this.stringify.name(o),this.type=i.AttributeDeclaration,this.attributeName=this.stringify.name(l),this.attributeType=this.stringify.dtdAttType(b),y&&(this.defaultValue=this.stringify.dtdAttDefault(y)),this.defaultValueType=m}return t.prototype.toString=function(e){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(e))},t}(c)}).call(Dr)),Dt.exports}var Et={exports:{}},Er=Et.exports,Ne;function Yt(){return Ne||(Ne=1,(function(){var i,c,D,f=function(t,e){for(var o in e)h.call(e,o)&&(t[o]=e[o]);function l(){this.constructor=t}return l.prototype=e.prototype,t.prototype=new l,t.__super__=e.prototype,t},h={}.hasOwnProperty;D=z().isObject,c=W(),i=B(),Et.exports=function(t){f(e,t);function e(o,l,b,m){if(e.__super__.constructor.call(this,o),b==null)throw new Error("Missing DTD entity name. "+this.debugInfo(b));if(m==null)throw new Error("Missing DTD entity value. "+this.debugInfo(b));if(this.pe=!!l,this.name=this.stringify.name(b),this.type=i.EntityDeclaration,!D(m))this.value=this.stringify.dtdEntityValue(m),this.internal=!0;else{if(!m.pubID&&!m.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(b));if(m.pubID&&!m.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(b));if(this.internal=!1,m.pubID!=null&&(this.pubID=this.stringify.dtdPubID(m.pubID)),m.sysID!=null&&(this.sysID=this.stringify.dtdSysID(m.sysID)),m.nData!=null&&(this.nData=this.stringify.dtdNData(m.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(b))}}return Object.defineProperty(e.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(e.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(e.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(e.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(e.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(e.prototype,"xmlVersion",{get:function(){return null}}),e.prototype.toString=function(o){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(o))},e}(c)}).call(Er)),Et.exports}var bt={exports:{}},br=bt.exports,ve;function Kt(){return ve||(ve=1,(function(){var i,c,D=function(h,t){for(var e in t)f.call(t,e)&&(h[e]=t[e]);function o(){this.constructor=h}return o.prototype=t.prototype,h.prototype=new o,h.__super__=t.prototype,h},f={}.hasOwnProperty;c=W(),i=B(),bt.exports=function(h){D(t,h);function t(e,o,l){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());l||(l="(#PCDATA)"),Array.isArray(l)&&(l="("+l.join(",")+")"),this.name=this.stringify.name(o),this.type=i.ElementDeclaration,this.value=this.stringify.dtdElementValue(l)}return t.prototype.toString=function(e){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(e))},t}(c)}).call(br)),bt.exports}var Ot={exports:{}},Or=Ot.exports,Le;function zt(){return Le||(Le=1,(function(){var i,c,D=function(h,t){for(var e in t)f.call(t,e)&&(h[e]=t[e]);function o(){this.constructor=h}return o.prototype=t.prototype,h.prototype=new o,h.__super__=t.prototype,h},f={}.hasOwnProperty;c=W(),i=B(),Ot.exports=function(h){D(t,h);function t(e,o,l){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing DTD notation name. "+this.debugInfo(o));if(!l.pubID&&!l.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(o));this.name=this.stringify.name(o),this.type=i.NotationDeclaration,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID))}return Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),t.prototype.toString=function(e){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(e))},t}(c)}).call(Or)),Ot.exports}var Nr=Tt.exports,Ie;function Ht(){return Ie||(Ie=1,(function(){var i,c,D,f,h,t,e,o,l=function(m,y){for(var d in y)b.call(y,d)&&(m[d]=y[d]);function g(){this.constructor=m}return g.prototype=y.prototype,m.prototype=new g,m.__super__=y.prototype,m},b={}.hasOwnProperty;o=z().isObject,e=W(),i=B(),c=Gt(),f=Yt(),D=Kt(),h=zt(),t=Ut(),Tt.exports=function(m){l(y,m);function y(d,g,O){var I,x,P,E,s,a;if(y.__super__.constructor.call(this,d),this.type=i.DocType,d.children){for(E=d.children,x=0,P=E.length;x<P;x++)if(I=E[x],I.type===i.Element){this.name=I.name;break}}this.documentObject=d,o(g)&&(s=g,g=s.pubID,O=s.sysID),O==null&&(a=[g,O],O=a[0],g=a[1]),g!=null&&(this.pubID=this.stringify.dtdPubID(g)),O!=null&&(this.sysID=this.stringify.dtdSysID(O))}return Object.defineProperty(y.prototype,"entities",{get:function(){var d,g,O,I,x;for(I={},x=this.children,g=0,O=x.length;g<O;g++)d=x[g],d.type===i.EntityDeclaration&&!d.pe&&(I[d.name]=d);return new t(I)}}),Object.defineProperty(y.prototype,"notations",{get:function(){var d,g,O,I,x;for(I={},x=this.children,g=0,O=x.length;g<O;g++)d=x[g],d.type===i.NotationDeclaration&&(I[d.name]=d);return new t(I)}}),Object.defineProperty(y.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(y.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(y.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),y.prototype.element=function(d,g){var O;return O=new D(this,d,g),this.children.push(O),this},y.prototype.attList=function(d,g,O,I,x){var P;return P=new c(this,d,g,O,I,x),this.children.push(P),this},y.prototype.entity=function(d,g){var O;return O=new f(this,!1,d,g),this.children.push(O),this},y.prototype.pEntity=function(d,g){var O;return O=new f(this,!0,d,g),this.children.push(O),this},y.prototype.notation=function(d,g){var O;return O=new h(this,d,g),this.children.push(O),this},y.prototype.toString=function(d){return this.options.writer.docType(this,this.options.writer.filterOptions(d))},y.prototype.ele=function(d,g){return this.element(d,g)},y.prototype.att=function(d,g,O,I,x){return this.attList(d,g,O,I,x)},y.prototype.ent=function(d,g){return this.entity(d,g)},y.prototype.pent=function(d,g){return this.pEntity(d,g)},y.prototype.not=function(d,g){return this.notation(d,g)},y.prototype.up=function(){return this.root()||this.documentObject},y.prototype.isEqualNode=function(d){return!(!y.__super__.isEqualNode.apply(this,arguments).isEqualNode(d)||d.name!==this.name||d.publicId!==this.publicId||d.systemId!==this.systemId)},y}(e)}).call(Nr)),Tt.exports}var Nt={exports:{}},vr=Nt.exports,xe;function Qt(){return xe||(xe=1,(function(){var i,c,D=function(h,t){for(var e in t)f.call(t,e)&&(h[e]=t[e]);function o(){this.constructor=h}return o.prototype=t.prototype,h.prototype=new o,h.__super__=t.prototype,h},f={}.hasOwnProperty;i=B(),c=W(),Nt.exports=function(h){D(t,h);function t(e,o){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=i.Raw,this.value=this.stringify.raw(o)}return t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.raw(this,this.options.writer.filterOptions(e))},t}(c)}).call(vr)),Nt.exports}var vt={exports:{}},Lr=vt.exports,Ae;function Zt(){return Ae||(Ae=1,(function(){var i,c,D=function(h,t){for(var e in t)f.call(t,e)&&(h[e]=t[e]);function o(){this.constructor=h}return o.prototype=t.prototype,h.prototype=new o,h.__super__=t.prototype,h},f={}.hasOwnProperty;i=B(),c=mt(),vt.exports=function(h){D(t,h);function t(e,o){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=i.Text,this.value=this.stringify.text(o)}return Object.defineProperty(t.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"wholeText",{get:function(){var e,o,l;for(l="",o=this.previousSibling;o;)l=o.data+l,o=o.previousSibling;for(l+=this.data,e=this.nextSibling;e;)l=l+e.data,e=e.nextSibling;return l}}),t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.text(this,this.options.writer.filterOptions(e))},t.prototype.splitText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceWholeText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t}(c)}).call(Lr)),vt.exports}var Lt={exports:{}},Ir=Lt.exports,Me;function Jt(){return Me||(Me=1,(function(){var i,c,D=function(h,t){for(var e in t)f.call(t,e)&&(h[e]=t[e]);function o(){this.constructor=h}return o.prototype=t.prototype,h.prototype=new o,h.__super__=t.prototype,h},f={}.hasOwnProperty;i=B(),c=mt(),Lt.exports=function(h){D(t,h);function t(e,o,l){if(t.__super__.constructor.call(this,e),o==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=i.ProcessingInstruction,this.target=this.stringify.insTarget(o),this.name=this.target,l&&(this.value=this.stringify.insValue(l))}return t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(e))},t.prototype.isEqualNode=function(e){return!(!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)||e.target!==this.target)},t}(c)}).call(Ir)),Lt.exports}var It={exports:{}},xr=It.exports,Pe;function _e(){return Pe||(Pe=1,(function(){var i,c,D=function(h,t){for(var e in t)f.call(t,e)&&(h[e]=t[e]);function o(){this.constructor=h}return o.prototype=t.prototype,h.prototype=new o,h.__super__=t.prototype,h},f={}.hasOwnProperty;c=W(),i=B(),It.exports=function(h){D(t,h);function t(e){t.__super__.constructor.call(this,e),this.type=i.Dummy}return t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return""},t}(c)}).call(xr)),It.exports}var xt={exports:{}},Ar=xt.exports,Ce;function Mr(){return Ce||(Ce=1,(function(){xt.exports=function(){function i(c){this.nodes=c}return Object.defineProperty(i.prototype,"length",{get:function(){return this.nodes.length||0}}),i.prototype.clone=function(){return this.nodes=null},i.prototype.item=function(c){return this.nodes[c]||null},i}()}).call(Ar)),xt.exports}var At={exports:{}},Pr=At.exports,Se;function _r(){return Se||(Se=1,(function(){At.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(Pr)),At.exports}var Cr=ct.exports,Xe;function W(){return Xe||(Xe=1,(function(){var i,c,D,f,h,t,e,o,l,b,m,y,d,g,O,I,x,P={}.hasOwnProperty;x=z(),I=x.isObject,O=x.isFunction,g=x.isEmpty,d=x.getValue,o=null,D=null,f=null,h=null,t=null,m=null,y=null,b=null,e=null,c=null,l=null,i=null,ct.exports=function(){function E(s){this.parent=s,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,o||(o=Vt(),D=kt(),f=$t(),h=Wt(),t=Ht(),m=Qt(),y=Zt(),b=Jt(),e=_e(),c=B(),l=Mr(),Ut(),i=_r())}return Object.defineProperty(E.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(E.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(E.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(E.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(E.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new l(this.children)),this.childNodeList}}),Object.defineProperty(E.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(E.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(E.prototype,"previousSibling",{get:function(){var s;return s=this.parent.children.indexOf(this),this.parent.children[s-1]||null}}),Object.defineProperty(E.prototype,"nextSibling",{get:function(){var s;return s=this.parent.children.indexOf(this),this.parent.children[s+1]||null}}),Object.defineProperty(E.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(E.prototype,"textContent",{get:function(){var s,a,p,T,L;if(this.nodeType===c.Element||this.nodeType===c.DocumentFragment){for(L="",T=this.children,a=0,p=T.length;a<p;a++)s=T[a],s.textContent&&(L+=s.textContent);return L}else return null},set:function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),E.prototype.setParent=function(s){var a,p,T,L,v;for(this.parent=s,s&&(this.options=s.options,this.stringify=s.stringify),L=this.children,v=[],p=0,T=L.length;p<T;p++)a=L[p],v.push(a.setParent(this));return v},E.prototype.element=function(s,a,p){var T,L,v,r,N,A,_,C,X,j,F;if(A=null,a===null&&p==null&&(X=[{},null],a=X[0],p=X[1]),a==null&&(a={}),a=d(a),I(a)||(j=[a,p],p=j[0],a=j[1]),s!=null&&(s=d(s)),Array.isArray(s))for(v=0,_=s.length;v<_;v++)L=s[v],A=this.element(L);else if(O(s))A=this.element(s.apply());else if(I(s)){for(N in s)if(P.call(s,N))if(F=s[N],O(F)&&(F=F.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&N.indexOf(this.stringify.convertAttKey)===0)A=this.attribute(N.substr(this.stringify.convertAttKey.length),F);else if(!this.options.separateArrayItems&&Array.isArray(F)&&g(F))A=this.dummy();else if(I(F)&&g(F))A=this.element(N);else if(!this.options.keepNullNodes&&F==null)A=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(F))for(r=0,C=F.length;r<C;r++)L=F[r],T={},T[N]=L,A=this.element(T);else I(F)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&N.indexOf(this.stringify.convertTextKey)===0?A=this.element(F):(A=this.element(N),A.element(F)):A=this.element(N,F)}else!this.options.keepNullNodes&&p===null?A=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&s.indexOf(this.stringify.convertTextKey)===0?A=this.text(p):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&s.indexOf(this.stringify.convertCDataKey)===0?A=this.cdata(p):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&s.indexOf(this.stringify.convertCommentKey)===0?A=this.comment(p):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&s.indexOf(this.stringify.convertRawKey)===0?A=this.raw(p):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&s.indexOf(this.stringify.convertPIKey)===0?A=this.instruction(s.substr(this.stringify.convertPIKey.length),p):A=this.node(s,a,p);if(A==null)throw new Error("Could not create any elements with: "+s+". "+this.debugInfo());return A},E.prototype.insertBefore=function(s,a,p){var T,L,v,r,N;if(s!=null&&s.type)return v=s,r=a,v.setParent(this),r?(L=children.indexOf(r),N=children.splice(L),children.push(v),Array.prototype.push.apply(children,N)):children.push(v),v;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(s));return L=this.parent.children.indexOf(this),N=this.parent.children.splice(L),T=this.parent.element(s,a,p),Array.prototype.push.apply(this.parent.children,N),T},E.prototype.insertAfter=function(s,a,p){var T,L,v;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(s));return L=this.parent.children.indexOf(this),v=this.parent.children.splice(L+1),T=this.parent.element(s,a,p),Array.prototype.push.apply(this.parent.children,v),T},E.prototype.remove=function(){var s;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return s=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[s,s-s+1].concat([])),this.parent},E.prototype.node=function(s,a,p){var T,L;return s!=null&&(s=d(s)),a||(a={}),a=d(a),I(a)||(L=[a,p],p=L[0],a=L[1]),T=new o(this,s,a),p!=null&&T.text(p),this.children.push(T),T},E.prototype.text=function(s){var a;return I(s)&&this.element(s),a=new y(this,s),this.children.push(a),this},E.prototype.cdata=function(s){var a;return a=new D(this,s),this.children.push(a),this},E.prototype.comment=function(s){var a;return a=new f(this,s),this.children.push(a),this},E.prototype.commentBefore=function(s){var a,p;return a=this.parent.children.indexOf(this),p=this.parent.children.splice(a),this.parent.comment(s),Array.prototype.push.apply(this.parent.children,p),this},E.prototype.commentAfter=function(s){var a,p;return a=this.parent.children.indexOf(this),p=this.parent.children.splice(a+1),this.parent.comment(s),Array.prototype.push.apply(this.parent.children,p),this},E.prototype.raw=function(s){var a;return a=new m(this,s),this.children.push(a),this},E.prototype.dummy=function(){var s;return s=new e(this),s},E.prototype.instruction=function(s,a){var p,T,L,v,r;if(s!=null&&(s=d(s)),a!=null&&(a=d(a)),Array.isArray(s))for(v=0,r=s.length;v<r;v++)p=s[v],this.instruction(p);else if(I(s))for(p in s)P.call(s,p)&&(T=s[p],this.instruction(p,T));else O(a)&&(a=a.apply()),L=new b(this,s,a),this.children.push(L);return this},E.prototype.instructionBefore=function(s,a){var p,T;return p=this.parent.children.indexOf(this),T=this.parent.children.splice(p),this.parent.instruction(s,a),Array.prototype.push.apply(this.parent.children,T),this},E.prototype.instructionAfter=function(s,a){var p,T;return p=this.parent.children.indexOf(this),T=this.parent.children.splice(p+1),this.parent.instruction(s,a),Array.prototype.push.apply(this.parent.children,T),this},E.prototype.declaration=function(s,a,p){var T,L;return T=this.document(),L=new h(T,s,a,p),T.children.length===0?T.children.unshift(L):T.children[0].type===c.Declaration?T.children[0]=L:T.children.unshift(L),T.root()||T},E.prototype.dtd=function(s,a){var p,T,L,v,r,N,A,_,C,X;for(T=this.document(),L=new t(T,s,a),C=T.children,v=r=0,A=C.length;r<A;v=++r)if(p=C[v],p.type===c.DocType)return T.children[v]=L,L;for(X=T.children,v=N=0,_=X.length;N<_;v=++N)if(p=X[v],p.isRoot)return T.children.splice(v,0,L),L;return T.children.push(L),L},E.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},E.prototype.root=function(){var s;for(s=this;s;){if(s.type===c.Document)return s.rootObject;if(s.isRoot)return s;s=s.parent}},E.prototype.document=function(){var s;for(s=this;s;){if(s.type===c.Document)return s;s=s.parent}},E.prototype.end=function(s){return this.document().end(s)},E.prototype.prev=function(){var s;if(s=this.parent.children.indexOf(this),s<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[s-1]},E.prototype.next=function(){var s;if(s=this.parent.children.indexOf(this),s===-1||s===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[s+1]},E.prototype.importDocument=function(s){var a;return a=s.root().clone(),a.parent=this,a.isRoot=!1,this.children.push(a),this},E.prototype.debugInfo=function(s){var a,p;return s=s||this.name,s==null&&!((a=this.parent)!=null&&a.name)?"":s==null?"parent: <"+this.parent.name+">":(p=this.parent)!=null&&p.name?"node: <"+s+">, parent: <"+this.parent.name+">":"node: <"+s+">"},E.prototype.ele=function(s,a,p){return this.element(s,a,p)},E.prototype.nod=function(s,a,p){return this.node(s,a,p)},E.prototype.txt=function(s){return this.text(s)},E.prototype.dat=function(s){return this.cdata(s)},E.prototype.com=function(s){return this.comment(s)},E.prototype.ins=function(s,a){return this.instruction(s,a)},E.prototype.doc=function(){return this.document()},E.prototype.dec=function(s,a,p){return this.declaration(s,a,p)},E.prototype.e=function(s,a,p){return this.element(s,a,p)},E.prototype.n=function(s,a,p){return this.node(s,a,p)},E.prototype.t=function(s){return this.text(s)},E.prototype.d=function(s){return this.cdata(s)},E.prototype.c=function(s){return this.comment(s)},E.prototype.r=function(s){return this.raw(s)},E.prototype.i=function(s,a){return this.instruction(s,a)},E.prototype.u=function(){return this.up()},E.prototype.importXMLBuilder=function(s){return this.importDocument(s)},E.prototype.replaceChild=function(s,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeChild=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.appendChild=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.hasChildNodes=function(){return this.children.length!==0},E.prototype.cloneNode=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isSupported=function(s,a){return!0},E.prototype.hasAttributes=function(){return this.attribs.length!==0},E.prototype.compareDocumentPosition=function(s){var a,p;return a=this,a===s?0:this.document()!==s.document()?(p=i.Disconnected|i.ImplementationSpecific,Math.random()<.5?p|=i.Preceding:p|=i.Following,p):a.isAncestor(s)?i.Contains|i.Preceding:a.isDescendant(s)?i.Contains|i.Following:a.isPreceding(s)?i.Preceding:i.Following},E.prototype.isSameNode=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupPrefix=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isDefaultNamespace=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupNamespaceURI=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isEqualNode=function(s){var a,p,T;if(s.nodeType!==this.nodeType||s.children.length!==this.children.length)return!1;for(a=p=0,T=this.children.length-1;0<=T?p<=T:p>=T;a=0<=T?++p:--p)if(!this.children[a].isEqualNode(s.children[a]))return!1;return!0},E.prototype.getFeature=function(s,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setUserData=function(s,a,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getUserData=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.contains=function(s){return s?s===this||this.isDescendant(s):!1},E.prototype.isDescendant=function(s){var a,p,T,L,v;for(v=this.children,T=0,L=v.length;T<L;T++)if(a=v[T],s===a||(p=a.isDescendant(s),p))return!0;return!1},E.prototype.isAncestor=function(s){return s.isDescendant(this)},E.prototype.isPreceding=function(s){var a,p;return a=this.treePosition(s),p=this.treePosition(this),a===-1||p===-1?!1:a<p},E.prototype.isFollowing=function(s){var a,p;return a=this.treePosition(s),p=this.treePosition(this),a===-1||p===-1?!1:a>p},E.prototype.treePosition=function(s){var a,p;return p=0,a=!1,this.foreachTreeNode(this.document(),function(T){if(p++,!a&&T===s)return a=!0}),a?p:-1},E.prototype.foreachTreeNode=function(s,a){var p,T,L,v,r;for(s||(s=this.document()),v=s.children,T=0,L=v.length;T<L;T++){if(p=v[T],r=a(p))return r;if(r=this.foreachTreeNode(p,a),r)return r}},E}()}).call(Cr)),ct.exports}var Mt={exports:{}},Sr=Mt.exports,Fe;function Re(){return Fe||(Fe=1,(function(){var i=function(D,f){return function(){return D.apply(f,arguments)}},c={}.hasOwnProperty;Mt.exports=function(){function D(f){this.assertLegalName=i(this.assertLegalName,this),this.assertLegalChar=i(this.assertLegalChar,this);var h,t,e;f||(f={}),this.options=f,this.options.version||(this.options.version="1.0"),t=f.stringify||{};for(h in t)c.call(t,h)&&(e=t[h],this[h]=e)}return D.prototype.name=function(f){return this.options.noValidation?f:this.assertLegalName(""+f||"")},D.prototype.text=function(f){return this.options.noValidation?f:this.assertLegalChar(this.textEscape(""+f||""))},D.prototype.cdata=function(f){return this.options.noValidation?f:(f=""+f||"",f=f.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(f))},D.prototype.comment=function(f){if(this.options.noValidation)return f;if(f=""+f||"",f.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+f);return this.assertLegalChar(f)},D.prototype.raw=function(f){return this.options.noValidation?f:""+f||""},D.prototype.attValue=function(f){return this.options.noValidation?f:this.assertLegalChar(this.attEscape(f=""+f||""))},D.prototype.insTarget=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},D.prototype.insValue=function(f){if(this.options.noValidation)return f;if(f=""+f||"",f.match(/\?>/))throw new Error("Invalid processing instruction value: "+f);return this.assertLegalChar(f)},D.prototype.xmlVersion=function(f){if(this.options.noValidation)return f;if(f=""+f||"",!f.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+f);return f},D.prototype.xmlEncoding=function(f){if(this.options.noValidation)return f;if(f=""+f||"",!f.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+f);return this.assertLegalChar(f)},D.prototype.xmlStandalone=function(f){return this.options.noValidation?f:f?"yes":"no"},D.prototype.dtdPubID=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},D.prototype.dtdSysID=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},D.prototype.dtdElementValue=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},D.prototype.dtdAttType=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},D.prototype.dtdAttDefault=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},D.prototype.dtdEntityValue=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},D.prototype.dtdNData=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},D.prototype.convertAttKey="@",D.prototype.convertPIKey="?",D.prototype.convertTextKey="#text",D.prototype.convertCDataKey="#cdata",D.prototype.convertCommentKey="#comment",D.prototype.convertRawKey="#raw",D.prototype.assertLegalChar=function(f){var h,t;if(this.options.noValidation)return f;if(h="",this.options.version==="1.0"){if(h=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=f.match(h))throw new Error("Invalid character in string: "+f+" at index "+t.index)}else if(this.options.version==="1.1"&&(h=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=f.match(h)))throw new Error("Invalid character in string: "+f+" at index "+t.index);return f},D.prototype.assertLegalName=function(f){var h;if(this.options.noValidation)return f;if(this.assertLegalChar(f),h=/^([: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])*$/,!f.match(h))throw new Error("Invalid character in name");return f},D.prototype.textEscape=function(f){var h;return this.options.noValidation?f:(h=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,f.replace(h,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},D.prototype.attEscape=function(f){var h;return this.options.noValidation?f:(h=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,f.replace(h,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},D}()}).call(Sr)),Mt.exports}var Pt={exports:{}},_t={exports:{}},Ct={exports:{}},Xr=Ct.exports,je;function St(){return je||(je=1,(function(){Ct.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(Xr)),Ct.exports}var Fr=_t.exports,Be;function qe(){return Be||(Be=1,(function(){var i,c,D,f={}.hasOwnProperty;D=z().assign,i=B(),Wt(),Ht(),kt(),$t(),Vt(),Qt(),Zt(),Jt(),_e(),Gt(),Kt(),Yt(),zt(),c=St(),_t.exports=function(){function h(t){var e,o,l;t||(t={}),this.options=t,o=t.writer||{};for(e in o)f.call(o,e)&&(l=o[e],this["_"+e]=this[e],this[e]=l)}return h.prototype.filterOptions=function(t){var e,o,l,b,m,y,d,g;return t||(t={}),t=D({},this.options,t),e={writer:this},e.pretty=t.pretty||!1,e.allowEmpty=t.allowEmpty||!1,e.indent=(o=t.indent)!=null?o:" ",e.newline=(l=t.newline)!=null?l:`
|
|
3
|
+
`,e.offset=(b=t.offset)!=null?b:0,e.dontPrettyTextNodes=(m=(y=t.dontPrettyTextNodes)!=null?y:t.dontprettytextnodes)!=null?m:0,e.spaceBeforeSlash=(d=(g=t.spaceBeforeSlash)!=null?g:t.spacebeforeslash)!=null?d:"",e.spaceBeforeSlash===!0&&(e.spaceBeforeSlash=" "),e.suppressPrettyCount=0,e.user={},e.state=c.None,e},h.prototype.indent=function(t,e,o){var l;return!e.pretty||e.suppressPrettyCount?"":e.pretty&&(l=(o||0)+e.offset+1,l>0)?new Array(l).join(e.indent):""},h.prototype.endline=function(t,e,o){return!e.pretty||e.suppressPrettyCount?"":e.newline},h.prototype.attribute=function(t,e,o){var l;return this.openAttribute(t,e,o),l=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,e,o),l},h.prototype.cdata=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<![CDATA[",e.state=c.InsideTag,l+=t.value,e.state=c.CloseTag,l+="]]>"+this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},h.prototype.comment=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<!-- ",e.state=c.InsideTag,l+=t.value,e.state=c.CloseTag,l+=" -->"+this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},h.prototype.declaration=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<?xml",e.state=c.InsideTag,l+=' version="'+t.version+'"',t.encoding!=null&&(l+=' encoding="'+t.encoding+'"'),t.standalone!=null&&(l+=' standalone="'+t.standalone+'"'),e.state=c.CloseTag,l+=e.spaceBeforeSlash+"?>",l+=this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},h.prototype.docType=function(t,e,o){var l,b,m,y,d;if(o||(o=0),this.openNode(t,e,o),e.state=c.OpenTag,y=this.indent(t,e,o),y+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?y+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(y+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(y+=" [",y+=this.endline(t,e,o),e.state=c.InsideTag,d=t.children,b=0,m=d.length;b<m;b++)l=d[b],y+=this.writeChildNode(l,e,o+1);e.state=c.CloseTag,y+="]"}return e.state=c.CloseTag,y+=e.spaceBeforeSlash+">",y+=this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),y},h.prototype.element=function(t,e,o){var l,b,m,y,d,g,O,I,x,P,E,s,a,p;o||(o=0),P=!1,E="",this.openNode(t,e,o),e.state=c.OpenTag,E+=this.indent(t,e,o)+"<"+t.name,s=t.attribs;for(x in s)f.call(s,x)&&(l=s[x],E+=this.attribute(l,e,o));if(m=t.children.length,y=m===0?null:t.children[0],m===0||t.children.every(function(T){return(T.type===i.Text||T.type===i.Raw)&&T.value===""}))e.allowEmpty?(E+=">",e.state=c.CloseTag,E+="</"+t.name+">"+this.endline(t,e,o)):(e.state=c.CloseTag,E+=e.spaceBeforeSlash+"/>"+this.endline(t,e,o));else if(e.pretty&&m===1&&(y.type===i.Text||y.type===i.Raw)&&y.value!=null)E+=">",e.state=c.InsideTag,e.suppressPrettyCount++,P=!0,E+=this.writeChildNode(y,e,o+1),e.suppressPrettyCount--,P=!1,e.state=c.CloseTag,E+="</"+t.name+">"+this.endline(t,e,o);else{if(e.dontPrettyTextNodes){for(a=t.children,d=0,O=a.length;d<O;d++)if(b=a[d],(b.type===i.Text||b.type===i.Raw)&&b.value!=null){e.suppressPrettyCount++,P=!0;break}}for(E+=">"+this.endline(t,e,o),e.state=c.InsideTag,p=t.children,g=0,I=p.length;g<I;g++)b=p[g],E+=this.writeChildNode(b,e,o+1);e.state=c.CloseTag,E+=this.indent(t,e,o)+"</"+t.name+">",P&&e.suppressPrettyCount--,E+=this.endline(t,e,o),e.state=c.None}return this.closeNode(t,e,o),E},h.prototype.writeChildNode=function(t,e,o){switch(t.type){case i.CData:return this.cdata(t,e,o);case i.Comment:return this.comment(t,e,o);case i.Element:return this.element(t,e,o);case i.Raw:return this.raw(t,e,o);case i.Text:return this.text(t,e,o);case i.ProcessingInstruction:return this.processingInstruction(t,e,o);case i.Dummy:return"";case i.Declaration:return this.declaration(t,e,o);case i.DocType:return this.docType(t,e,o);case i.AttributeDeclaration:return this.dtdAttList(t,e,o);case i.ElementDeclaration:return this.dtdElement(t,e,o);case i.EntityDeclaration:return this.dtdEntity(t,e,o);case i.NotationDeclaration:return this.dtdNotation(t,e,o);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},h.prototype.processingInstruction=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<?",e.state=c.InsideTag,l+=t.target,t.value&&(l+=" "+t.value),e.state=c.CloseTag,l+=e.spaceBeforeSlash+"?>",l+=this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},h.prototype.raw=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o),e.state=c.InsideTag,l+=t.value,e.state=c.CloseTag,l+=this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},h.prototype.text=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o),e.state=c.InsideTag,l+=t.value,e.state=c.CloseTag,l+=this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},h.prototype.dtdAttList=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<!ATTLIST",e.state=c.InsideTag,l+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,t.defaultValueType!=="#DEFAULT"&&(l+=" "+t.defaultValueType),t.defaultValue&&(l+=' "'+t.defaultValue+'"'),e.state=c.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},h.prototype.dtdElement=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<!ELEMENT",e.state=c.InsideTag,l+=" "+t.name+" "+t.value,e.state=c.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},h.prototype.dtdEntity=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<!ENTITY",e.state=c.InsideTag,t.pe&&(l+=" %"),l+=" "+t.name,t.value?l+=' "'+t.value+'"':(t.pubID&&t.sysID?l+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(l+=' SYSTEM "'+t.sysID+'"'),t.nData&&(l+=" NDATA "+t.nData)),e.state=c.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},h.prototype.dtdNotation=function(t,e,o){var l;return this.openNode(t,e,o),e.state=c.OpenTag,l=this.indent(t,e,o)+"<!NOTATION",e.state=c.InsideTag,l+=" "+t.name,t.pubID&&t.sysID?l+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?l+=' PUBLIC "'+t.pubID+'"':t.sysID&&(l+=' SYSTEM "'+t.sysID+'"'),e.state=c.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=c.None,this.closeNode(t,e,o),l},h.prototype.openNode=function(t,e,o){},h.prototype.closeNode=function(t,e,o){},h.prototype.openAttribute=function(t,e,o){},h.prototype.closeAttribute=function(t,e,o){},h}()}).call(Fr)),_t.exports}var Rr=Pt.exports,Ue;function te(){return Ue||(Ue=1,(function(){var i,c=function(f,h){for(var t in h)D.call(h,t)&&(f[t]=h[t]);function e(){this.constructor=f}return e.prototype=h.prototype,f.prototype=new e,f.__super__=h.prototype,f},D={}.hasOwnProperty;i=qe(),Pt.exports=function(f){c(h,f);function h(t){h.__super__.constructor.call(this,t)}return h.prototype.document=function(t,e){var o,l,b,m,y;for(e=this.filterOptions(e),m="",y=t.children,l=0,b=y.length;l<b;l++)o=y[l],m+=this.writeChildNode(o,e,0);return e.pretty&&m.slice(-e.newline.length)===e.newline&&(m=m.slice(0,-e.newline.length)),m},h}(i)}).call(Rr)),Pt.exports}var jr=ot.exports,Ve;function ke(){return Ve||(Ve=1,(function(){var i,c,D,f,h,t,e,o=function(b,m){for(var y in m)l.call(m,y)&&(b[y]=m[y]);function d(){this.constructor=b}return d.prototype=m.prototype,b.prototype=new d,b.__super__=m.prototype,b},l={}.hasOwnProperty;e=z().isPlainObject,D=le(),c=fr(),f=W(),i=B(),t=Re(),h=te(),ot.exports=function(b){o(m,b);function m(y){m.__super__.constructor.call(this,null),this.name="#document",this.type=i.Document,this.documentURI=null,this.domConfig=new c,y||(y={}),y.writer||(y.writer=new h),this.options=y,this.stringify=new t(y)}return Object.defineProperty(m.prototype,"implementation",{value:new D}),Object.defineProperty(m.prototype,"doctype",{get:function(){var y,d,g,O;for(O=this.children,d=0,g=O.length;d<g;d++)if(y=O[d],y.type===i.DocType)return y;return null}}),Object.defineProperty(m.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(m.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(m.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(m.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===i.Declaration?this.children[0].encoding:null}}),Object.defineProperty(m.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===i.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(m.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===i.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(m.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(m.prototype,"origin",{get:function(){return null}}),Object.defineProperty(m.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(m.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(m.prototype,"contentType",{get:function(){return null}}),m.prototype.end=function(y){var d;return d={},y?e(y)&&(d=y,y=this.options.writer):y=this.options.writer,y.document(this,y.filterOptions(d))},m.prototype.toString=function(y){return this.options.writer.document(this,this.options.writer.filterOptions(y))},m.prototype.createElement=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createTextNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createComment=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createCDATASection=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createProcessingInstruction=function(y,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createAttribute=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createEntityReference=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.importNode=function(y,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createElementNS=function(y,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createAttributeNS=function(y,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagNameNS=function(y,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementById=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.adoptNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.renameNode=function(y,d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByClassName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createEvent=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createNodeIterator=function(y,d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createTreeWalker=function(y,d,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m}(f)}).call(jr)),ot.exports}var Xt={exports:{}},Br=Xt.exports,$e;function qr(){return $e||($e=1,(function(){var i,c,D,f,h,t,e,o,l,b,m,y,d,g,O,I,x,P,E,s,a,p,T,L={}.hasOwnProperty;T=z(),a=T.isObject,s=T.isFunction,p=T.isPlainObject,E=T.getValue,i=B(),y=ke(),d=Vt(),f=kt(),h=$t(),O=Qt(),P=Zt(),g=Jt(),b=Wt(),m=Ht(),t=Gt(),o=Yt(),e=Kt(),l=zt(),D=me(),x=Re(),I=te(),c=St(),Xt.exports=function(){function v(r,N,A){var _;this.name="?xml",this.type=i.Document,r||(r={}),_={},r.writer?p(r.writer)&&(_=r.writer,r.writer=new I):r.writer=new I,this.options=r,this.writer=r.writer,this.writerOptions=this.writer.filterOptions(_),this.stringify=new x(r),this.onDataCallback=N||function(){},this.onEndCallback=A||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return v.prototype.createChildNode=function(r){var N,A,_,C,X,j,F,S;switch(r.type){case i.CData:this.cdata(r.value);break;case i.Comment:this.comment(r.value);break;case i.Element:_={},F=r.attribs;for(A in F)L.call(F,A)&&(N=F[A],_[A]=N.value);this.node(r.name,_);break;case i.Dummy:this.dummy();break;case i.Raw:this.raw(r.value);break;case i.Text:this.text(r.value);break;case i.ProcessingInstruction:this.instruction(r.target,r.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+r.constructor.name)}for(S=r.children,X=0,j=S.length;X<j;X++)C=S[X],this.createChildNode(C),C.type===i.Element&&this.up();return this},v.prototype.dummy=function(){return this},v.prototype.node=function(r,N,A){var _;if(r==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(r));return this.openCurrent(),r=E(r),N==null&&(N={}),N=E(N),a(N)||(_=[N,A],A=_[0],N=_[1]),this.currentNode=new d(this,r,N),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,A!=null&&this.text(A),this},v.prototype.element=function(r,N,A){var _,C,X,j,F,S;if(this.currentNode&&this.currentNode.type===i.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(r)||a(r)||s(r))for(j=this.options.noValidation,this.options.noValidation=!0,S=new y(this.options).element("TEMP_ROOT"),S.element(r),this.options.noValidation=j,F=S.children,C=0,X=F.length;C<X;C++)_=F[C],this.createChildNode(_),_.type===i.Element&&this.up();else this.node(r,N,A);return this},v.prototype.attribute=function(r,N){var A,_;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(r));if(r!=null&&(r=E(r)),a(r))for(A in r)L.call(r,A)&&(_=r[A],this.attribute(A,_));else s(N)&&(N=N.apply()),this.options.keepNullAttributes&&N==null?this.currentNode.attribs[r]=new D(this,r,""):N!=null&&(this.currentNode.attribs[r]=new D(this,r,N));return this},v.prototype.text=function(r){var N;return this.openCurrent(),N=new P(this,r),this.onData(this.writer.text(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.cdata=function(r){var N;return this.openCurrent(),N=new f(this,r),this.onData(this.writer.cdata(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.comment=function(r){var N;return this.openCurrent(),N=new h(this,r),this.onData(this.writer.comment(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.raw=function(r){var N;return this.openCurrent(),N=new O(this,r),this.onData(this.writer.raw(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.instruction=function(r,N){var A,_,C,X,j;if(this.openCurrent(),r!=null&&(r=E(r)),N!=null&&(N=E(N)),Array.isArray(r))for(A=0,X=r.length;A<X;A++)_=r[A],this.instruction(_);else if(a(r))for(_ in r)L.call(r,_)&&(C=r[_],this.instruction(_,C));else s(N)&&(N=N.apply()),j=new g(this,r,N),this.onData(this.writer.processingInstruction(j,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},v.prototype.declaration=function(r,N,A){var _;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return _=new b(this,r,N,A),this.onData(this.writer.declaration(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.doctype=function(r,N,A){if(this.openCurrent(),r==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 m(this,N,A),this.currentNode.rootNodeName=r,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},v.prototype.dtdElement=function(r,N){var A;return this.openCurrent(),A=new e(this,r,N),this.onData(this.writer.dtdElement(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.attList=function(r,N,A,_,C){var X;return this.openCurrent(),X=new t(this,r,N,A,_,C),this.onData(this.writer.dtdAttList(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.entity=function(r,N){var A;return this.openCurrent(),A=new o(this,!1,r,N),this.onData(this.writer.dtdEntity(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.pEntity=function(r,N){var A;return this.openCurrent(),A=new o(this,!0,r,N),this.onData(this.writer.dtdEntity(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.notation=function(r,N){var A;return this.openCurrent(),A=new l(this,r,N),this.onData(this.writer.dtdNotation(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.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},v.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},v.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},v.prototype.openNode=function(r){var N,A,_,C;if(!r.isOpen){if(!this.root&&this.currentLevel===0&&r.type===i.Element&&(this.root=r),A="",r.type===i.Element){this.writerOptions.state=c.OpenTag,A=this.writer.indent(r,this.writerOptions,this.currentLevel)+"<"+r.name,C=r.attribs;for(_ in C)L.call(C,_)&&(N=C[_],A+=this.writer.attribute(N,this.writerOptions,this.currentLevel));A+=(r.children?">":"/>")+this.writer.endline(r,this.writerOptions,this.currentLevel),this.writerOptions.state=c.InsideTag}else this.writerOptions.state=c.OpenTag,A=this.writer.indent(r,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+r.rootNodeName,r.pubID&&r.sysID?A+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.sysID&&(A+=' SYSTEM "'+r.sysID+'"'),r.children?(A+=" [",this.writerOptions.state=c.InsideTag):(this.writerOptions.state=c.CloseTag,A+=">"),A+=this.writer.endline(r,this.writerOptions,this.currentLevel);return this.onData(A,this.currentLevel),r.isOpen=!0}},v.prototype.closeNode=function(r){var N;if(!r.isClosed)return N="",this.writerOptions.state=c.CloseTag,r.type===i.Element?N=this.writer.indent(r,this.writerOptions,this.currentLevel)+"</"+r.name+">"+this.writer.endline(r,this.writerOptions,this.currentLevel):N=this.writer.indent(r,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(r,this.writerOptions,this.currentLevel),this.writerOptions.state=c.None,this.onData(N,this.currentLevel),r.isClosed=!0},v.prototype.onData=function(r,N){return this.documentStarted=!0,this.onDataCallback(r,N+1)},v.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},v.prototype.debugInfo=function(r){return r==null?"":"node: <"+r+">"},v.prototype.ele=function(){return this.element.apply(this,arguments)},v.prototype.nod=function(r,N,A){return this.node(r,N,A)},v.prototype.txt=function(r){return this.text(r)},v.prototype.dat=function(r){return this.cdata(r)},v.prototype.com=function(r){return this.comment(r)},v.prototype.ins=function(r,N){return this.instruction(r,N)},v.prototype.dec=function(r,N,A){return this.declaration(r,N,A)},v.prototype.dtd=function(r,N,A){return this.doctype(r,N,A)},v.prototype.e=function(r,N,A){return this.element(r,N,A)},v.prototype.n=function(r,N,A){return this.node(r,N,A)},v.prototype.t=function(r){return this.text(r)},v.prototype.d=function(r){return this.cdata(r)},v.prototype.c=function(r){return this.comment(r)},v.prototype.r=function(r){return this.raw(r)},v.prototype.i=function(r,N){return this.instruction(r,N)},v.prototype.att=function(){return this.currentNode&&this.currentNode.type===i.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},v.prototype.a=function(){return this.currentNode&&this.currentNode.type===i.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},v.prototype.ent=function(r,N){return this.entity(r,N)},v.prototype.pent=function(r,N){return this.pEntity(r,N)},v.prototype.not=function(r,N){return this.notation(r,N)},v}()}).call(Br)),Xt.exports}var Ft={exports:{}},Ur=Ft.exports,We;function Vr(){return We||(We=1,(function(){var i,c,D,f=function(t,e){for(var o in e)h.call(e,o)&&(t[o]=e[o]);function l(){this.constructor=t}return l.prototype=e.prototype,t.prototype=new l,t.__super__=e.prototype,t},h={}.hasOwnProperty;i=B(),D=qe(),c=St(),Ft.exports=function(t){f(e,t);function e(o,l){this.stream=o,e.__super__.constructor.call(this,l)}return e.prototype.endline=function(o,l,b){return o.isLastRootNode&&l.state===c.CloseTag?"":e.__super__.endline.call(this,o,l,b)},e.prototype.document=function(o,l){var b,m,y,d,g,O,I,x,P;for(I=o.children,m=y=0,g=I.length;y<g;m=++y)b=I[m],b.isLastRootNode=m===o.children.length-1;for(l=this.filterOptions(l),x=o.children,P=[],d=0,O=x.length;d<O;d++)b=x[d],P.push(this.writeChildNode(b,l,0));return P},e.prototype.attribute=function(o,l,b){return this.stream.write(e.__super__.attribute.call(this,o,l,b))},e.prototype.cdata=function(o,l,b){return this.stream.write(e.__super__.cdata.call(this,o,l,b))},e.prototype.comment=function(o,l,b){return this.stream.write(e.__super__.comment.call(this,o,l,b))},e.prototype.declaration=function(o,l,b){return this.stream.write(e.__super__.declaration.call(this,o,l,b))},e.prototype.docType=function(o,l,b){var m,y,d,g;if(b||(b=0),this.openNode(o,l,b),l.state=c.OpenTag,this.stream.write(this.indent(o,l,b)),this.stream.write("<!DOCTYPE "+o.root().name),o.pubID&&o.sysID?this.stream.write(' PUBLIC "'+o.pubID+'" "'+o.sysID+'"'):o.sysID&&this.stream.write(' SYSTEM "'+o.sysID+'"'),o.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(o,l,b)),l.state=c.InsideTag,g=o.children,y=0,d=g.length;y<d;y++)m=g[y],this.writeChildNode(m,l,b+1);l.state=c.CloseTag,this.stream.write("]")}return l.state=c.CloseTag,this.stream.write(l.spaceBeforeSlash+">"),this.stream.write(this.endline(o,l,b)),l.state=c.None,this.closeNode(o,l,b)},e.prototype.element=function(o,l,b){var m,y,d,g,O,I,x,P,E;b||(b=0),this.openNode(o,l,b),l.state=c.OpenTag,this.stream.write(this.indent(o,l,b)+"<"+o.name),P=o.attribs;for(x in P)h.call(P,x)&&(m=P[x],this.attribute(m,l,b));if(d=o.children.length,g=d===0?null:o.children[0],d===0||o.children.every(function(s){return(s.type===i.Text||s.type===i.Raw)&&s.value===""}))l.allowEmpty?(this.stream.write(">"),l.state=c.CloseTag,this.stream.write("</"+o.name+">")):(l.state=c.CloseTag,this.stream.write(l.spaceBeforeSlash+"/>"));else if(l.pretty&&d===1&&(g.type===i.Text||g.type===i.Raw)&&g.value!=null)this.stream.write(">"),l.state=c.InsideTag,l.suppressPrettyCount++,this.writeChildNode(g,l,b+1),l.suppressPrettyCount--,l.state=c.CloseTag,this.stream.write("</"+o.name+">");else{for(this.stream.write(">"+this.endline(o,l,b)),l.state=c.InsideTag,E=o.children,O=0,I=E.length;O<I;O++)y=E[O],this.writeChildNode(y,l,b+1);l.state=c.CloseTag,this.stream.write(this.indent(o,l,b)+"</"+o.name+">")}return this.stream.write(this.endline(o,l,b)),l.state=c.None,this.closeNode(o,l,b)},e.prototype.processingInstruction=function(o,l,b){return this.stream.write(e.__super__.processingInstruction.call(this,o,l,b))},e.prototype.raw=function(o,l,b){return this.stream.write(e.__super__.raw.call(this,o,l,b))},e.prototype.text=function(o,l,b){return this.stream.write(e.__super__.text.call(this,o,l,b))},e.prototype.dtdAttList=function(o,l,b){return this.stream.write(e.__super__.dtdAttList.call(this,o,l,b))},e.prototype.dtdElement=function(o,l,b){return this.stream.write(e.__super__.dtdElement.call(this,o,l,b))},e.prototype.dtdEntity=function(o,l,b){return this.stream.write(e.__super__.dtdEntity.call(this,o,l,b))},e.prototype.dtdNotation=function(o,l,b){return this.stream.write(e.__super__.dtdNotation.call(this,o,l,b))},e}(D)}).call(Ur)),Ft.exports}var Ge;function kr(){return Ge||(Ge=1,(function(){var i,c,D,f,h,t,e,o,l,b;b=z(),o=b.assign,l=b.isFunction,D=le(),f=ke(),h=qr(),e=te(),t=Vr(),i=B(),c=St(),Y.create=function(m,y,d,g){var O,I;if(m==null)throw new Error("Root element needs a name.");return g=o({},y,d,g),O=new f(g),I=O.element(m),g.headless||(O.declaration(g),(g.pubID!=null||g.sysID!=null)&&O.dtd(g)),I},Y.begin=function(m,y,d){var g;return l(m)&&(g=[m,y],y=g[0],d=g[1],m={}),y?new h(m,y,d):new f(m)},Y.stringWriter=function(m){return new e(m)},Y.streamWriter=function(m,y){return new t(m,y)},Y.implementation=new D,Y.nodeType=i,Y.writerState=c}).call(Y)),Y}var Ye;function $r(){return Ye||(Ye=1,(function(){var i,c,D,f,h,t={}.hasOwnProperty;i=kr(),c=qt().defaults,f=function(e){return typeof e=="string"&&(e.indexOf("&")>=0||e.indexOf(">")>=0||e.indexOf("<")>=0)},h=function(e){return"<![CDATA["+D(e)+"]]>"},D=function(e){return e.replace("]]>","]]]]><![CDATA[>")},nt.Builder=function(){function e(o){var l,b,m;this.options={},b=c["0.2"];for(l in b)t.call(b,l)&&(m=b[l],this.options[l]=m);for(l in o)t.call(o,l)&&(m=o[l],this.options[l]=m)}return e.prototype.buildObject=function(o){var l,b,m,y,d;return l=this.options.attrkey,b=this.options.charkey,Object.keys(o).length===1&&this.options.rootName===c["0.2"].rootName?(d=Object.keys(o)[0],o=o[d]):d=this.options.rootName,m=function(g){return function(O,I){var x,P,E,s,a,p;if(typeof I!="object")g.options.cdata&&f(I)?O.raw(h(I)):O.txt(I);else if(Array.isArray(I)){for(s in I)if(t.call(I,s)){P=I[s];for(a in P)E=P[a],O=m(O.ele(a),E).up()}}else for(a in I)if(t.call(I,a))if(P=I[a],a===l){if(typeof P=="object")for(x in P)p=P[x],O=O.att(x,p)}else if(a===b)g.options.cdata&&f(P)?O=O.raw(h(P)):O=O.txt(P);else if(Array.isArray(P))for(s in P)t.call(P,s)&&(E=P[s],typeof E=="string"?g.options.cdata&&f(E)?O=O.ele(a).raw(h(E)).up():O=O.ele(a,E).up():O=m(O.ele(a),E).up());else typeof P=="object"?O=m(O.ele(a),P).up():typeof P=="string"&&g.options.cdata&&f(P)?O=O.ele(a).raw(h(P)).up():(P==null&&(P=""),O=O.ele(a,P.toString()).up());return O}}(this),y=i.create(d,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),m(y,o).end(this.options.renderOpts)},e}()}).call(nt)),nt}var Rt={},ee={};const re=et(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ke;function Wr(){return Ke||(Ke=1,function(i){(function(c){c.parser=function(u,n){return new f(u,n)},c.SAXParser=f,c.SAXStream=m,c.createStream=b,c.MAX_BUFFER_LENGTH=64*1024;var D=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];c.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function f(u,n){if(!(this instanceof f))return new f(u,n);var M=this;t(M),M.q=M.c="",M.bufferCheckPosition=c.MAX_BUFFER_LENGTH,M.opt=n||{},M.opt.lowercase=M.opt.lowercase||M.opt.lowercasetags,M.looseCase=M.opt.lowercase?"toLowerCase":"toUpperCase",M.tags=[],M.closed=M.closedRoot=M.sawRoot=!1,M.tag=M.error=null,M.strict=!!u,M.noscript=!!(u||M.opt.noscript),M.state=r.BEGIN,M.strictEntities=M.opt.strictEntities,M.ENTITIES=M.strictEntities?Object.create(c.XML_ENTITIES):Object.create(c.ENTITIES),M.attribList=[],M.opt.xmlns&&(M.ns=Object.create(I)),M.opt.unquotedAttributeValues===void 0&&(M.opt.unquotedAttributeValues=!u),M.trackPosition=M.opt.position!==!1,M.trackPosition&&(M.position=M.line=M.column=0),A(M,"onready")}Object.create||(Object.create=function(u){function n(){}n.prototype=u;var M=new n;return M}),Object.keys||(Object.keys=function(u){var n=[];for(var M in u)u.hasOwnProperty(M)&&n.push(M);return n});function h(u){for(var n=Math.max(c.MAX_BUFFER_LENGTH,10),M=0,w=0,R=D.length;w<R;w++){var q=u[D[w]].length;if(q>n)switch(D[w]){case"textNode":C(u);break;case"cdata":_(u,"oncdata",u.cdata),u.cdata="";break;case"script":_(u,"onscript",u.script),u.script="";break;default:j(u,"Max buffer length exceeded: "+D[w])}M=Math.max(M,q)}var U=c.MAX_BUFFER_LENGTH-M;u.bufferCheckPosition=U+u.position}function t(u){for(var n=0,M=D.length;n<M;n++)u[D[n]]=""}function e(u){C(u),u.cdata!==""&&(_(u,"oncdata",u.cdata),u.cdata=""),u.script!==""&&(_(u,"onscript",u.script),u.script="")}f.prototype={end:function(){F(this)},write:yn,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){e(this)}};var o;try{o=re.Stream}catch{o=function(){}}o||(o=function(){});var l=c.EVENTS.filter(function(u){return u!=="error"&&u!=="end"});function b(u,n){return new m(u,n)}function m(u,n){if(!(this instanceof m))return new m(u,n);o.apply(this),this._parser=new f(u,n),this.writable=!0,this.readable=!0;var M=this;this._parser.onend=function(){M.emit("end")},this._parser.onerror=function(w){M.emit("error",w),M._parser.error=null},this._decoder=null,l.forEach(function(w){Object.defineProperty(M,"on"+w,{get:function(){return M._parser["on"+w]},set:function(R){if(!R)return M.removeAllListeners(w),M._parser["on"+w]=R,R;M.on(w,R)},enumerable:!0,configurable:!1})})}m.prototype=Object.create(o.prototype,{constructor:{value:m}}),m.prototype.write=function(u){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(u)){if(!this._decoder){var n=re.StringDecoder;this._decoder=new n("utf8")}u=this._decoder.write(u)}return this._parser.write(u.toString()),this.emit("data",u),!0},m.prototype.end=function(u){return u&&u.length&&this.write(u),this._parser.end(),!0},m.prototype.on=function(u,n){var M=this;return!M._parser["on"+u]&&l.indexOf(u)!==-1&&(M._parser["on"+u]=function(){var w=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);w.splice(0,0,u),M.emit.apply(M,w)}),o.prototype.on.call(M,u,n)};var y="[CDATA[",d="DOCTYPE",g="http://www.w3.org/XML/1998/namespace",O="http://www.w3.org/2000/xmlns/",I={xml:g,xmlns:O},x=/[:_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]/,P=/[:_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-]/,E=/[#:_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]/,s=/[#:_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 a(u){return u===" "||u===`
|
|
4
|
+
`||u==="\r"||u===" "}function p(u){return u==='"'||u==="'"}function T(u){return u===">"||a(u)}function L(u,n){return u.test(n)}function v(u,n){return!L(u,n)}var r=0;c.STATE={BEGIN:r++,BEGIN_WHITESPACE:r++,TEXT:r++,TEXT_ENTITY:r++,OPEN_WAKA:r++,SGML_DECL:r++,SGML_DECL_QUOTED:r++,DOCTYPE:r++,DOCTYPE_QUOTED:r++,DOCTYPE_DTD:r++,DOCTYPE_DTD_QUOTED:r++,COMMENT_STARTING:r++,COMMENT:r++,COMMENT_ENDING:r++,COMMENT_ENDED:r++,CDATA:r++,CDATA_ENDING:r++,CDATA_ENDING_2:r++,PROC_INST:r++,PROC_INST_BODY:r++,PROC_INST_ENDING:r++,OPEN_TAG:r++,OPEN_TAG_SLASH:r++,ATTRIB:r++,ATTRIB_NAME:r++,ATTRIB_NAME_SAW_WHITE:r++,ATTRIB_VALUE:r++,ATTRIB_VALUE_QUOTED:r++,ATTRIB_VALUE_CLOSED:r++,ATTRIB_VALUE_UNQUOTED:r++,ATTRIB_VALUE_ENTITY_Q:r++,ATTRIB_VALUE_ENTITY_U:r++,CLOSE_TAG:r++,CLOSE_TAG_SAW_WHITE:r++,SCRIPT:r++,SCRIPT_ENDING:r++},c.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},c.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(c.ENTITIES).forEach(function(u){var n=c.ENTITIES[u],M=typeof n=="number"?String.fromCharCode(n):n;c.ENTITIES[u]=M});for(var N in c.STATE)c.STATE[c.STATE[N]]=N;r=c.STATE;function A(u,n,M){u[n]&&u[n](M)}function _(u,n,M){u.textNode&&C(u),A(u,n,M)}function C(u){u.textNode=X(u.opt,u.textNode),u.textNode&&A(u,"ontext",u.textNode),u.textNode=""}function X(u,n){return u.trim&&(n=n.trim()),u.normalize&&(n=n.replace(/\s+/g," ")),n}function j(u,n){return C(u),u.trackPosition&&(n+=`
|
|
5
5
|
Line: `+u.line+`
|
|
6
6
|
Column: `+u.column+`
|
|
7
|
-
Char: `+u.c),n=new Error(n),u.error=n,
|
|
8
|
-
Actual: `+u.attribValue);else if(w==="xmlns"&&u.attribValue!==
|
|
9
|
-
Actual: `+u.attribValue);else{var
|
|
10
|
-
`?(n.line++,n.column=0):n.column++),n.state){case r.BEGIN:if(n.state=r.BEGIN_WHITESPACE,w==="\uFEFF")continue;
|
|
11
|
-
`?(n.line++,n.column=0):n.column++);n.textNode+=u.substring(j,_-1)}w==="<"&&!(n.sawRoot&&n.closedRoot&&!n.strict)?(n.state=r.OPEN_WAKA,n.startTagPosition=n.position):(!a(w)&&(!n.sawRoot||n.closedRoot)&&F(n,"Text data outside of root node."),w==="&"?n.state=r.TEXT_ENTITY:n.textNode+=w);continue;case r.SCRIPT:w==="<"?n.state=r.SCRIPT_ENDING:n.script+=w;continue;case r.SCRIPT_ENDING:w==="/"?n.state=r.CLOSE_TAG:(n.script+="<"+w,n.state=r.SCRIPT);continue;case r.OPEN_WAKA:if(w==="!")n.state=r.SGML_DECL,n.sgmlDecl="";else if(!a(w))if(I(A,w))n.state=r.OPEN_TAG,n.tagName=w;else if(w==="/")n.state=r.CLOSE_TAG,n.tagName="";else if(w==="?")n.state=r.PROC_INST,n.procInstName=n.procInstBody="";else{if(F(n,"Unencoded <"),n.startTagPosition+1<n.position){var U=n.position-n.startTagPosition;w=new Array(U).join(" ")+w}n.textNode+="<"+w,n.state=r.TEXT}continue;case r.SGML_DECL:if(n.sgmlDecl+w==="--"){n.state=r.COMMENT,n.comment="",n.sgmlDecl="";continue}n.doctype&&n.doctype!==!0&&n.sgmlDecl?(n.state=r.DOCTYPE_DTD,n.doctype+="<!"+n.sgmlDecl+w,n.sgmlDecl=""):(n.sgmlDecl+w).toUpperCase()===y?(C(n,"onopencdata"),n.state=r.CDATA,n.sgmlDecl="",n.cdata=""):(n.sgmlDecl+w).toUpperCase()===d?(n.state=r.DOCTYPE,(n.doctype||n.sawRoot)&&F(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):w===">"?(C(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=r.TEXT):(f(w)&&(n.state=r.SGML_DECL_QUOTED),n.sgmlDecl+=w);continue;case r.SGML_DECL_QUOTED:w===n.q&&(n.state=r.SGML_DECL,n.q=""),n.sgmlDecl+=w;continue;case r.DOCTYPE:w===">"?(n.state=r.TEXT,C(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=w,w==="["?n.state=r.DOCTYPE_DTD:f(w)&&(n.state=r.DOCTYPE_QUOTED,n.q=w));continue;case r.DOCTYPE_QUOTED:n.doctype+=w,w===n.q&&(n.q="",n.state=r.DOCTYPE);continue;case r.DOCTYPE_DTD:w==="]"?(n.doctype+=w,n.state=r.DOCTYPE):w==="<"?(n.state=r.OPEN_WAKA,n.startTagPosition=n.position):f(w)?(n.doctype+=w,n.state=r.DOCTYPE_DTD_QUOTED,n.q=w):n.doctype+=w;continue;case r.DOCTYPE_DTD_QUOTED:n.doctype+=w,w===n.q&&(n.state=r.DOCTYPE_DTD,n.q="");continue;case r.COMMENT:w==="-"?n.state=r.COMMENT_ENDING:n.comment+=w;continue;case r.COMMENT_ENDING:w==="-"?(n.state=r.COMMENT_ENDED,n.comment=X(n.opt,n.comment),n.comment&&C(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+w,n.state=r.COMMENT);continue;case r.COMMENT_ENDED:w!==">"?(F(n,"Malformed comment"),n.comment+="--"+w,n.state=r.COMMENT):n.doctype&&n.doctype!==!0?n.state=r.DOCTYPE_DTD:n.state=r.TEXT;continue;case r.CDATA:w==="]"?n.state=r.CDATA_ENDING:n.cdata+=w;continue;case r.CDATA_ENDING:w==="]"?n.state=r.CDATA_ENDING_2:(n.cdata+="]"+w,n.state=r.CDATA);continue;case r.CDATA_ENDING_2:w===">"?(n.cdata&&C(n,"oncdata",n.cdata),C(n,"onclosecdata"),n.cdata="",n.state=r.TEXT):w==="]"?n.cdata+="]":(n.cdata+="]]"+w,n.state=r.CDATA);continue;case r.PROC_INST:w==="?"?n.state=r.PROC_INST_ENDING:a(w)?n.state=r.PROC_INST_BODY:n.procInstName+=w;continue;case r.PROC_INST_BODY:if(!n.procInstBody&&a(w))continue;w==="?"?n.state=r.PROC_INST_ENDING:n.procInstBody+=w;continue;case r.PROC_INST_ENDING:w===">"?(C(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=r.TEXT):(n.procInstBody+="?"+w,n.state=r.PROC_INST_BODY);continue;case r.OPEN_TAG:I(x,w)?n.tagName+=w:(Mr(n),w===">"?J(n):w==="/"?n.state=r.OPEN_TAG_SLASH:(a(w)||F(n,"Invalid character in tag name"),n.state=r.ATTRIB));continue;case r.OPEN_TAG_SLASH:w===">"?(J(n,!0),ie(n)):(F(n,"Forward-slash in opening tag not followed by >"),n.state=r.ATTRIB);continue;case r.ATTRIB:if(a(w))continue;w===">"?J(n):w==="/"?n.state=r.OPEN_TAG_SLASH:I(A,w)?(n.attribName=w,n.attribValue="",n.state=r.ATTRIB_NAME):F(n,"Invalid attribute name");continue;case r.ATTRIB_NAME:w==="="?n.state=r.ATTRIB_VALUE:w===">"?(F(n,"Attribute without value"),n.attribValue=n.attribName,ne(n),J(n)):a(w)?n.state=r.ATTRIB_NAME_SAW_WHITE:I(x,w)?n.attribName+=w:F(n,"Invalid attribute name");continue;case r.ATTRIB_NAME_SAW_WHITE:if(w==="=")n.state=r.ATTRIB_VALUE;else{if(a(w))continue;F(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",C(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",w===">"?J(n):I(A,w)?(n.attribName=w,n.state=r.ATTRIB_NAME):(F(n,"Invalid attribute name"),n.state=r.ATTRIB)}continue;case r.ATTRIB_VALUE:if(a(w))continue;f(w)?(n.q=w,n.state=r.ATTRIB_VALUE_QUOTED):(n.opt.unquotedAttributeValues||B(n,"Unquoted attribute value"),n.state=r.ATTRIB_VALUE_UNQUOTED,n.attribValue=w);continue;case r.ATTRIB_VALUE_QUOTED:if(w!==n.q){w==="&"?n.state=r.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=w;continue}ne(n),n.q="",n.state=r.ATTRIB_VALUE_CLOSED;continue;case r.ATTRIB_VALUE_CLOSED:a(w)?n.state=r.ATTRIB:w===">"?J(n):w==="/"?n.state=r.OPEN_TAG_SLASH:I(A,w)?(F(n,"No whitespace between attributes"),n.attribName=w,n.attribValue="",n.state=r.ATTRIB_NAME):F(n,"Invalid attribute name");continue;case r.ATTRIB_VALUE_UNQUOTED:if(!T(w)){w==="&"?n.state=r.ATTRIB_VALUE_ENTITY_U:n.attribValue+=w;continue}ne(n),w===">"?J(n):n.state=r.ATTRIB;continue;case r.CLOSE_TAG:if(n.tagName)w===">"?ie(n):I(x,w)?n.tagName+=w:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=r.SCRIPT):(a(w)||F(n,"Invalid tagname in closing tag"),n.state=r.CLOSE_TAG_SAW_WHITE);else{if(a(w))continue;v(A,w)?n.script?(n.script+="</"+w,n.state=r.SCRIPT):F(n,"Invalid tagname in closing tag."):n.tagName=w}continue;case r.CLOSE_TAG_SAW_WHITE:if(a(w))continue;w===">"?ie(n):F(n,"Invalid characters in closing tag");continue;case r.TEXT_ENTITY:case r.ATTRIB_VALUE_ENTITY_Q:case r.ATTRIB_VALUE_ENTITY_U:var V,W;switch(n.state){case r.TEXT_ENTITY:V=r.TEXT,W="textNode";break;case r.ATTRIB_VALUE_ENTITY_Q:V=r.ATTRIB_VALUE_QUOTED,W="attribValue";break;case r.ATTRIB_VALUE_ENTITY_U:V=r.ATTRIB_VALUE_UNQUOTED,W="attribValue";break}if(w===";"){var G=Sr(n);n.opt.unparsedEntities&&!Object.values(c.XML_ENTITIES).includes(G)?(n.entity="",n.state=V,n.write(G)):(n[W]+=G,n.entity="",n.state=V)}else I(n.entity.length?s:E,w)?n.entity+=w:(F(n,"Invalid character in entity name"),n[W]+="&"+n.entity+w,n.entity="",n.state=V);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&p(n),n}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var u=String.fromCharCode,n=Math.floor,_=function(){var w=16384,j=[],U,V,W=-1,G=arguments.length;if(!G)return"";for(var tt="";++W<G;){var k=Number(arguments[W]);if(!isFinite(k)||k<0||k>1114111||n(k)!==k)throw RangeError("Invalid code point: "+k);k<=65535?j.push(k):(k-=65536,U=(k>>10)+55296,V=k%1024+56320,j.push(U,V)),(W+1===G||j.length>w)&&(tt+=u.apply(null,j),j.length=0)}return tt};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:_,configurable:!0,writable:!0}):String.fromCodePoint=_}()})(i)}(Jt)),Jt}var nt={exports:{}},Ke;function yr(){if(Ke)return nt.exports;Ke=1;var i=typeof Reflect=="object"?Reflect:null,c=i&&typeof i.apply=="function"?i.apply:function(f,T,I){return Function.prototype.apply.call(f,T,I)},D;i&&typeof i.ownKeys=="function"?D=i.ownKeys:Object.getOwnPropertySymbols?D=function(f){return Object.getOwnPropertyNames(f).concat(Object.getOwnPropertySymbols(f))}:D=function(f){return Object.getOwnPropertyNames(f)};function h(a){console&&console.warn&&console.warn(a)}var p=Number.isNaN||function(f){return f!==f};function t(){t.init.call(this)}nt.exports=t,nt.exports.once=x,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._eventsCount=0,t.prototype._maxListeners=void 0;var e=10;function o(a){if(typeof a!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a)}Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return e},set:function(a){if(typeof a!="number"||a<0||p(a))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+a+".");e=a}}),t.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},t.prototype.setMaxListeners=function(f){if(typeof f!="number"||f<0||p(f))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+f+".");return this._maxListeners=f,this};function l(a){return a._maxListeners===void 0?t.defaultMaxListeners:a._maxListeners}t.prototype.getMaxListeners=function(){return l(this)},t.prototype.emit=function(f){for(var T=[],I=1;I<arguments.length;I++)T.push(arguments[I]);var v=f==="error",r=this._events;if(r!==void 0)v=v&&r.error===void 0;else if(!v)return!1;if(v){var N;if(T.length>0&&(N=T[0]),N instanceof Error)throw N;var P=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw P.context=N,P}var C=r[f];if(C===void 0)return!1;if(typeof C=="function")c(C,this,T);else for(var S=C.length,X=b(C,S),I=0;I<S;++I)c(X[I],this,T);return!0};function O(a,f,T,I){var v,r,N;if(o(T),r=a._events,r===void 0?(r=a._events=Object.create(null),a._eventsCount=0):(r.newListener!==void 0&&(a.emit("newListener",f,T.listener?T.listener:T),r=a._events),N=r[f]),N===void 0)N=r[f]=T,++a._eventsCount;else if(typeof N=="function"?N=r[f]=I?[T,N]:[N,T]:I?N.unshift(T):N.push(T),v=l(a),v>0&&N.length>v&&!N.warned){N.warned=!0;var P=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(f)+" listeners added. Use emitter.setMaxListeners() to increase limit");P.name="MaxListenersExceededWarning",P.emitter=a,P.type=f,P.count=N.length,h(P)}return a}t.prototype.addListener=function(f,T){return O(this,f,T,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(f,T){return O(this,f,T,!0)};function m(){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 y(a,f,T){var I={fired:!1,wrapFn:void 0,target:a,type:f,listener:T},v=m.bind(I);return v.listener=T,I.wrapFn=v,v}t.prototype.once=function(f,T){return o(T),this.on(f,y(this,f,T)),this},t.prototype.prependOnceListener=function(f,T){return o(T),this.prependListener(f,y(this,f,T)),this},t.prototype.removeListener=function(f,T){var I,v,r,N,P;if(o(T),v=this._events,v===void 0)return this;if(I=v[f],I===void 0)return this;if(I===T||I.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete v[f],v.removeListener&&this.emit("removeListener",f,I.listener||T));else if(typeof I!="function"){for(r=-1,N=I.length-1;N>=0;N--)if(I[N]===T||I[N].listener===T){P=I[N].listener,r=N;break}if(r<0)return this;r===0?I.shift():L(I,r),I.length===1&&(v[f]=I[0]),v.removeListener!==void 0&&this.emit("removeListener",f,P||T)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(f){var T,I,v;if(I=this._events,I===void 0)return this;if(I.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):I[f]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete I[f]),this;if(arguments.length===0){var r=Object.keys(I),N;for(v=0;v<r.length;++v)N=r[v],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(T=I[f],typeof T=="function")this.removeListener(f,T);else if(T!==void 0)for(v=T.length-1;v>=0;v--)this.removeListener(f,T[v]);return this};function d(a,f,T){var I=a._events;if(I===void 0)return[];var v=I[f];return v===void 0?[]:typeof v=="function"?T?[v.listener||v]:[v]:T?A(v):b(v,v.length)}t.prototype.listeners=function(f){return d(this,f,!0)},t.prototype.rawListeners=function(f){return d(this,f,!1)},t.listenerCount=function(a,f){return typeof a.listenerCount=="function"?a.listenerCount(f):g.call(a,f)},t.prototype.listenerCount=g;function g(a){var f=this._events;if(f!==void 0){var T=f[a];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}t.prototype.eventNames=function(){return this._eventsCount>0?D(this._events):[]};function b(a,f){for(var T=new Array(f),I=0;I<f;++I)T[I]=a[I];return T}function L(a,f){for(;f+1<a.length;f++)a[f]=a[f+1];a.pop()}function A(a){for(var f=new Array(a.length),T=0;T<f.length;++T)f[T]=a[T].listener||a[T];return f}function x(a,f){return new Promise(function(T,I){function v(N){a.removeListener(f,r),I(N)}function r(){typeof a.removeListener=="function"&&a.removeListener("error",v),T([].slice.call(arguments))}s(a,f,r,{once:!0}),f!=="error"&&E(a,v,{once:!0})})}function E(a,f,T){typeof a.on=="function"&&s(a,"error",f,T)}function s(a,f,T,I){if(typeof a.on=="function")I.once?a.once(f,T):a.on(f,T);else if(typeof a.addEventListener=="function")a.addEventListener(f,function v(r){I.once&&a.removeEventListener(f,v),T(r)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof a)}return nt.exports}var ee={},ze;function mr(){return ze||(ze=1,(function(){ee.stripBOM=function(i){return i[0]==="\uFEFF"?i.substring(1):i}}).call(M)),ee}var Z={},He;function Qe(){return He||(He=1,(function(){var i;i=new RegExp(/(?!xmlns)^.*:/),Z.normalize=function(c){return c.toLowerCase()},Z.firstCharLowerCase=function(c){return c.charAt(0).toLowerCase()+c.slice(1)},Z.stripPrefix=function(c){return c.replace(i,"")},Z.parseNumbers=function(c){return isNaN(c)||(c=c%1===0?parseInt(c,10):parseFloat(c)),c},Z.parseBooleans=function(c){return/^(?:true|false)$/i.test(c)&&(c=c.toLowerCase()==="true"),c}}).call(M)),Z}var Ze;function gr(){return Ze||(Ze=1,function(i){(function(){var c,D,h,p,t,e,o,l,O,m=function(g,b){return function(){return g.apply(b,arguments)}},y=function(g,b){for(var L in b)d.call(b,L)&&(g[L]=b[L]);function A(){this.constructor=g}return A.prototype=b.prototype,g.prototype=new A,g.__super__=b.prototype,g},d={}.hasOwnProperty;l=dr(),p=yr(),c=mr(),o=Qe(),O=te.setImmediate,D=ot().defaults,t=function(g){return typeof g=="object"&&g!=null&&Object.keys(g).length===0},e=function(g,b,L){var A,x,E;for(A=0,x=g.length;A<x;A++)E=g[A],b=E(b,L);return b},h=function(g,b,L){var A;return A=Object.create(null),A.value=L,A.writable=!0,A.enumerable=!0,A.configurable=!0,Object.defineProperty(g,b,A)},i.Parser=function(g){y(b,g);function b(L){this.parseStringPromise=m(this.parseStringPromise,this),this.parseString=m(this.parseString,this),this.reset=m(this.reset,this),this.assignOrPush=m(this.assignOrPush,this),this.processAsync=m(this.processAsync,this);var A,x,E;if(!(this instanceof i.Parser))return new i.Parser(L);this.options={},x=D["0.2"];for(A in x)d.call(x,A)&&(E=x[A],this.options[A]=E);for(A in L)d.call(L,A)&&(E=L[A],this.options[A]=E);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(o.normalize)),this.reset()}return b.prototype.processAsync=function(){var L,A;try{return this.remaining.length<=this.options.chunkSize?(L=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(L),this.saxParser.close()):(L=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(L),O(this.processAsync))}catch(x){if(A=x,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(A)}},b.prototype.assignOrPush=function(L,A,x){return A in L?(L[A]instanceof Array||h(L,A,[L[A]]),L[A].push(x)):this.options.explicitArray?h(L,A,[x]):h(L,A,x)},b.prototype.reset=function(){var L,A,x,E;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(s){return function(a){if(s.saxParser.resume(),!s.saxParser.errThrown)return s.saxParser.errThrown=!0,s.emit("error",a)}}(this),this.saxParser.onend=function(s){return function(){if(!s.saxParser.ended)return s.saxParser.ended=!0,s.emit("end",s.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,E=[],L=this.options.attrkey,A=this.options.charkey,this.saxParser.onopentag=function(s){return function(a){var f,T,I,v,r;if(I={},I[A]="",!s.options.ignoreAttrs){r=a.attributes;for(f in r)d.call(r,f)&&(!(L in I)&&!s.options.mergeAttrs&&(I[L]={}),T=s.options.attrValueProcessors?e(s.options.attrValueProcessors,a.attributes[f],f):a.attributes[f],v=s.options.attrNameProcessors?e(s.options.attrNameProcessors,f):f,s.options.mergeAttrs?s.assignOrPush(I,v,T):h(I[L],v,T))}return I["#name"]=s.options.tagNameProcessors?e(s.options.tagNameProcessors,a.name):a.name,s.options.xmlns&&(I[s.options.xmlnskey]={uri:a.uri,local:a.local}),E.push(I)}}(this),this.saxParser.onclosetag=function(s){return function(){var a,f,T,I,v,r,N,P,C,S;if(r=E.pop(),v=r["#name"],(!s.options.explicitChildren||!s.options.preserveChildrenOrder)&&delete r["#name"],r.cdata===!0&&(a=r.cdata,delete r.cdata),C=E[E.length-1],r[A].match(/^\s*$/)&&!a?(f=r[A],delete r[A]):(s.options.trim&&(r[A]=r[A].trim()),s.options.normalize&&(r[A]=r[A].replace(/\s{2,}/g," ").trim()),r[A]=s.options.valueProcessors?e(s.options.valueProcessors,r[A],v):r[A],Object.keys(r).length===1&&A in r&&!s.EXPLICIT_CHARKEY&&(r=r[A])),t(r)&&(typeof s.options.emptyTag=="function"?r=s.options.emptyTag():r=s.options.emptyTag!==""?s.options.emptyTag:f),s.options.validator!=null&&(S="/"+function(){var X,B,R;for(R=[],X=0,B=E.length;X<B;X++)I=E[X],R.push(I["#name"]);return R}().concat(v).join("/"),function(){var X;try{return r=s.options.validator(S,C&&C[v],r)}catch(B){return X=B,s.emit("error",X)}}()),s.options.explicitChildren&&!s.options.mergeAttrs&&typeof r=="object"){if(!s.options.preserveChildrenOrder)I={},s.options.attrkey in r&&(I[s.options.attrkey]=r[s.options.attrkey],delete r[s.options.attrkey]),!s.options.charsAsChildren&&s.options.charkey in r&&(I[s.options.charkey]=r[s.options.charkey],delete r[s.options.charkey]),Object.getOwnPropertyNames(r).length>0&&(I[s.options.childkey]=r),r=I;else if(C){C[s.options.childkey]=C[s.options.childkey]||[],N={};for(T in r)d.call(r,T)&&h(N,T,r[T]);C[s.options.childkey].push(N),delete r["#name"],Object.keys(r).length===1&&A in r&&!s.EXPLICIT_CHARKEY&&(r=r[A])}}return E.length>0?s.assignOrPush(C,v,r):(s.options.explicitRoot&&(P=r,r={},h(r,v,P)),s.resultObject=r,s.saxParser.ended=!0,s.emit("end",s.resultObject))}}(this),x=function(s){return function(a){var f,T;if(T=E[E.length-1],T)return T[A]+=a,s.options.explicitChildren&&s.options.preserveChildrenOrder&&s.options.charsAsChildren&&(s.options.includeWhiteChars||a.replace(/\\n/g,"").trim()!=="")&&(T[s.options.childkey]=T[s.options.childkey]||[],f={"#name":"__text__"},f[A]=a,s.options.normalize&&(f[A]=f[A].replace(/\s{2,}/g," ").trim()),T[s.options.childkey].push(f)),T}}(this),this.saxParser.ontext=x,this.saxParser.oncdata=function(s){return function(a){var f;if(f=x(a),f)return f.cdata=!0}}()},b.prototype.parseString=function(L,A){var x;A!=null&&typeof A=="function"&&(this.on("end",function(E){return this.reset(),A(null,E)}),this.on("error",function(E){return this.reset(),A(E)}));try{return L=L.toString(),L.trim()===""?(this.emit("end",null),!0):(L=c.stripBOM(L),this.options.async?(this.remaining=L,O(this.processAsync),this.saxParser):this.saxParser.write(L).close())}catch(E){if(x=E,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw x}else return this.emit("error",x),this.saxParser.errThrown=!0}},b.prototype.parseStringPromise=function(L){return new Promise(function(A){return function(x,E){return A.parseString(L,function(s,a){return s?E(s):x(a)})}}(this))},b}(p),i.parseString=function(g,b,L){var A,x,E;return L!=null?(typeof L=="function"&&(A=L),typeof b=="object"&&(x=b)):(typeof b=="function"&&(A=b),x={}),E=new i.Parser(x),E.parseString(g,A)},i.parseStringPromise=function(g,b){var L,A;return typeof b=="object"&&(L=b),A=new i.Parser(L),A.parseStringPromise(g)}}).call(M)}(Zt)),Zt}var Je;(function(){var i,c,D,h=function(t,e){for(var o in e)p.call(e,o)&&(t[o]=e[o]);function l(){this.constructor=t}return l.prototype=e.prototype,t.prototype=new l,t.__super__=e.prototype,t},p={}.hasOwnProperty;c=ot(),i=pr(),D=gr(),Qe(),c.defaults,function(t){h(e,t);function e(o){this.message=o}return e}(Error),i.Builder,D.Parser,Je=D.parseString,D.parseStringPromise}).call(M);const wr=i=>i!==null&&typeof i=="object"&&i.hasOwnProperty("rss")&&typeof i.rss=="object"&&i.rss!==null&&i.rss.hasOwnProperty("channel")&&Array.isArray(i.rss.channel),Tr=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("title")&&Array.isArray(i.title)&&i.hasOwnProperty("description")&&Array.isArray(i.description)&&i.hasOwnProperty("link")&&Array.isArray(i.link)&&i.hasOwnProperty("image")&&Array.isArray(i.image)&&i.image.every(Dr)&&i.hasOwnProperty("generator")&&Array.isArray(i.generator)&&i.hasOwnProperty("lastBuildDate")&&Array.isArray(i.lastBuildDate)&&i.hasOwnProperty("atom:link")&&Array.isArray(i["atom:link"])&&i["atom:link"].every(Er)&&i.hasOwnProperty("copyright")&&Array.isArray(i.copyright)&&i.hasOwnProperty("language")&&Array.isArray(i.language)&&i.hasOwnProperty("webMaster")&&Array.isArray(i.webMaster)&&i.hasOwnProperty("itunes:owner")&&Array.isArray(i["itunes:owner"])&&i["itunes:owner"].every(br)&&i.hasOwnProperty("itunes:author")&&Array.isArray(i["itunes:author"])&&i.hasOwnProperty("googleplay:owner")&&Array.isArray(i["googleplay:owner"])&&i.hasOwnProperty("googleplay:email")&&Array.isArray(i["googleplay:email"])&&i.hasOwnProperty("googleplay:author")&&Array.isArray(i["googleplay:author"])&&i.hasOwnProperty("item")&&Array.isArray(i.item)&&i.item.every(Or),Dr=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("url")&&Array.isArray(i.url)&&i.hasOwnProperty("title")&&Array.isArray(i.title)&&i.hasOwnProperty("link")&&Array.isArray(i.link),Er=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("$")&&typeof i.$=="object"&&i.$!==null&&i.$.hasOwnProperty("href")&&typeof i.$.href=="string"&&i.$.hasOwnProperty("rel")&&typeof i.$.rel=="string"&&i.$.hasOwnProperty("type")&&typeof i.$.type=="string",br=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("itunes:email")&&Array.isArray(i["itunes:email"])&&i.hasOwnProperty("itunes:name")&&Array.isArray(i["itunes:name"]),Or=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("title")&&Array.isArray(i.title)&&i.hasOwnProperty("description")&&Array.isArray(i.description)&&i.hasOwnProperty("link")&&Array.isArray(i.link)&&i.hasOwnProperty("guid")&&Array.isArray(i.guid)&&i.guid.every(Nr)&&i.hasOwnProperty("dc:creator")&&Array.isArray(i["dc:creator"])&&i.hasOwnProperty("pubDate")&&Array.isArray(i.pubDate)&&i.hasOwnProperty("enclosure")&&Array.isArray(i.enclosure)&&i.enclosure.every(vr)&&i.hasOwnProperty("content:encoded")&&Array.isArray(i["content:encoded"]),Nr=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("_")&&typeof i._=="string"&&i.hasOwnProperty("$")&&typeof i.$=="object"&&i.$!==null&&i.$.hasOwnProperty("isPermaLink")&&typeof i.$.isPermaLink=="string",vr=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("$")&&typeof i.$=="object"&&i.$!==null&&i.$.hasOwnProperty("url")&&typeof i.$.url=="string"&&i.$.hasOwnProperty("length")&&typeof i.$.length=="string"&&i.$.hasOwnProperty("type")&&typeof i.$.type=="string",Ir="https://corsproxy.io/?",Lr=async i=>{try{const c=await fetch(`${Ir}${encodeURIComponent(i)}`);if(c.ok)return c.text()}catch{throw new Error("Error occurred fetching Feed from Substack")}},Ar=async(i="",c)=>{Je(i,c)},Pr=i=>({title:i.title[0],description:i.description[0],link:i.link[0],pubDate:i.pubDate[0],content:i["content:encoded"][0]}),_r=async(i,c)=>{const D=await Lr(i);await Ar(D,c)},xr=(i,c)=>{if(!wr(i))throw new Error("Feed is not in the correct format");try{return i.rss.channel.filter(Tr).filter(D=>D.link[0]===c)}catch{throw new Error(`Error occurred fetching Feed by Link: ${c}`)}},Cr=i=>i[0].item.map(Pr);Q.getFeedByLink=xr,Q.getPosts=Cr,Q.getSubstackFeed=_r,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|
|
7
|
+
Char: `+u.c),n=new Error(n),u.error=n,A(u,"onerror",n),u}function F(u){return u.sawRoot&&!u.closedRoot&&S(u,"Unclosed root tag"),u.state!==r.BEGIN&&u.state!==r.BEGIN_WHITESPACE&&u.state!==r.TEXT&&j(u,"Unexpected end"),C(u),u.c="",u.closed=!0,A(u,"onend"),f.call(u,u.strict,u.opt),u}function S(u,n){if(typeof u!="object"||!(u instanceof f))throw new Error("bad call to strictFail");u.strict&&j(u,n)}function hn(u){u.strict||(u.tagName=u.tagName[u.looseCase]());var n=u.tags[u.tags.length-1]||u,M=u.tag={name:u.tagName,attributes:{}};u.opt.xmlns&&(M.ns=n.ns),u.attribList.length=0,_(u,"onopentagstart",M)}function ne(u,n){var M=u.indexOf(":"),w=M<0?["",u]:u.split(":"),R=w[0],q=w[1];return n&&u==="xmlns"&&(R="xmlns",q=""),{prefix:R,local:q}}function ie(u){if(u.strict||(u.attribName=u.attribName[u.looseCase]()),u.attribList.indexOf(u.attribName)!==-1||u.tag.attributes.hasOwnProperty(u.attribName)){u.attribName=u.attribValue="";return}if(u.opt.xmlns){var n=ne(u.attribName,!0),M=n.prefix,w=n.local;if(M==="xmlns")if(w==="xml"&&u.attribValue!==g)S(u,"xml: prefix must be bound to "+g+`
|
|
8
|
+
Actual: `+u.attribValue);else if(w==="xmlns"&&u.attribValue!==O)S(u,"xmlns: prefix must be bound to "+O+`
|
|
9
|
+
Actual: `+u.attribValue);else{var R=u.tag,q=u.tags[u.tags.length-1]||u;R.ns===q.ns&&(R.ns=Object.create(q.ns)),R.ns[w]=u.attribValue}u.attribList.push([u.attribName,u.attribValue])}else u.tag.attributes[u.attribName]=u.attribValue,_(u,"onattribute",{name:u.attribName,value:u.attribValue});u.attribName=u.attribValue=""}function J(u,n){if(u.opt.xmlns){var M=u.tag,w=ne(u.tagName);M.prefix=w.prefix,M.local=w.local,M.uri=M.ns[w.prefix]||"",M.prefix&&!M.uri&&(S(u,"Unbound namespace prefix: "+JSON.stringify(u.tagName)),M.uri=w.prefix);var R=u.tags[u.tags.length-1]||u;M.ns&&R.ns!==M.ns&&Object.keys(M.ns).forEach(function(ir){_(u,"onopennamespace",{prefix:ir,uri:M.ns[ir]})});for(var q=0,U=u.attribList.length;q<U;q++){var k=u.attribList[q],$=k[0],tt=k[1],V=ne($,!0),H=V.prefix,mn=V.local,nr=H===""?"":M.ns[H]||"",se={name:$,value:tt,prefix:H,local:mn,uri:nr};H&&H!=="xmlns"&&!nr&&(S(u,"Unbound namespace prefix: "+JSON.stringify(H)),se.uri=H),u.tag.attributes[$]=se,_(u,"onattribute",se)}u.attribList.length=0}u.tag.isSelfClosing=!!n,u.sawRoot=!0,u.tags.push(u.tag),_(u,"onopentag",u.tag),n||(!u.noscript&&u.tagName.toLowerCase()==="script"?u.state=r.SCRIPT:u.state=r.TEXT,u.tag=null,u.tagName=""),u.attribName=u.attribValue="",u.attribList.length=0}function oe(u){if(!u.tagName){S(u,"Weird empty close tag."),u.textNode+="</>",u.state=r.TEXT;return}if(u.script){if(u.tagName!=="script"){u.script+="</"+u.tagName+">",u.tagName="",u.state=r.SCRIPT;return}_(u,"onscript",u.script),u.script=""}var n=u.tags.length,M=u.tagName;u.strict||(M=M[u.looseCase]());for(var w=M;n--;){var R=u.tags[n];if(R.name!==w)S(u,"Unexpected close tag");else break}if(n<0){S(u,"Unmatched closing tag: "+u.tagName),u.textNode+="</"+u.tagName+">",u.state=r.TEXT;return}u.tagName=M;for(var q=u.tags.length;q-- >n;){var U=u.tag=u.tags.pop();u.tagName=u.tag.name,_(u,"onclosetag",u.tagName);var k={};for(var $ in U.ns)k[$]=U.ns[$];var tt=u.tags[u.tags.length-1]||u;u.opt.xmlns&&U.ns!==tt.ns&&Object.keys(U.ns).forEach(function(V){var H=U.ns[V];_(u,"onclosenamespace",{prefix:V,uri:H})})}n===0&&(u.closedRoot=!0),u.tagName=u.attribValue=u.attribName="",u.attribList.length=0,u.state=r.TEXT}function dn(u){var n=u.entity,M=n.toLowerCase(),w,R="";return u.ENTITIES[n]?u.ENTITIES[n]:u.ENTITIES[M]?u.ENTITIES[M]:(n=M,n.charAt(0)==="#"&&(n.charAt(1)==="x"?(n=n.slice(2),w=parseInt(n,16),R=w.toString(16)):(n=n.slice(1),w=parseInt(n,10),R=w.toString(10))),n=n.replace(/^0+/,""),isNaN(w)||R.toLowerCase()!==n?(S(u,"Invalid character entity"),"&"+u.entity+";"):String.fromCodePoint(w))}function er(u,n){n==="<"?(u.state=r.OPEN_WAKA,u.startTagPosition=u.position):a(n)||(S(u,"Non-whitespace before first tag."),u.textNode=n,u.state=r.TEXT)}function rr(u,n){var M="";return n<u.length&&(M=u.charAt(n)),M}function yn(u){var n=this;if(this.error)throw this.error;if(n.closed)return j(n,"Cannot write after close. Assign an onready handler.");if(u===null)return F(n);typeof u=="object"&&(u=u.toString());for(var M=0,w="";w=rr(u,M++),n.c=w,!!w;)switch(n.trackPosition&&(n.position++,w===`
|
|
10
|
+
`?(n.line++,n.column=0):n.column++),n.state){case r.BEGIN:if(n.state=r.BEGIN_WHITESPACE,w==="\uFEFF")continue;er(n,w);continue;case r.BEGIN_WHITESPACE:er(n,w);continue;case r.TEXT:if(n.sawRoot&&!n.closedRoot){for(var R=M-1;w&&w!=="<"&&w!=="&";)w=rr(u,M++),w&&n.trackPosition&&(n.position++,w===`
|
|
11
|
+
`?(n.line++,n.column=0):n.column++);n.textNode+=u.substring(R,M-1)}w==="<"&&!(n.sawRoot&&n.closedRoot&&!n.strict)?(n.state=r.OPEN_WAKA,n.startTagPosition=n.position):(!a(w)&&(!n.sawRoot||n.closedRoot)&&S(n,"Text data outside of root node."),w==="&"?n.state=r.TEXT_ENTITY:n.textNode+=w);continue;case r.SCRIPT:w==="<"?n.state=r.SCRIPT_ENDING:n.script+=w;continue;case r.SCRIPT_ENDING:w==="/"?n.state=r.CLOSE_TAG:(n.script+="<"+w,n.state=r.SCRIPT);continue;case r.OPEN_WAKA:if(w==="!")n.state=r.SGML_DECL,n.sgmlDecl="";else if(!a(w))if(L(x,w))n.state=r.OPEN_TAG,n.tagName=w;else if(w==="/")n.state=r.CLOSE_TAG,n.tagName="";else if(w==="?")n.state=r.PROC_INST,n.procInstName=n.procInstBody="";else{if(S(n,"Unencoded <"),n.startTagPosition+1<n.position){var q=n.position-n.startTagPosition;w=new Array(q).join(" ")+w}n.textNode+="<"+w,n.state=r.TEXT}continue;case r.SGML_DECL:if(n.sgmlDecl+w==="--"){n.state=r.COMMENT,n.comment="",n.sgmlDecl="";continue}n.doctype&&n.doctype!==!0&&n.sgmlDecl?(n.state=r.DOCTYPE_DTD,n.doctype+="<!"+n.sgmlDecl+w,n.sgmlDecl=""):(n.sgmlDecl+w).toUpperCase()===y?(_(n,"onopencdata"),n.state=r.CDATA,n.sgmlDecl="",n.cdata=""):(n.sgmlDecl+w).toUpperCase()===d?(n.state=r.DOCTYPE,(n.doctype||n.sawRoot)&&S(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):w===">"?(_(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=r.TEXT):(p(w)&&(n.state=r.SGML_DECL_QUOTED),n.sgmlDecl+=w);continue;case r.SGML_DECL_QUOTED:w===n.q&&(n.state=r.SGML_DECL,n.q=""),n.sgmlDecl+=w;continue;case r.DOCTYPE:w===">"?(n.state=r.TEXT,_(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=w,w==="["?n.state=r.DOCTYPE_DTD:p(w)&&(n.state=r.DOCTYPE_QUOTED,n.q=w));continue;case r.DOCTYPE_QUOTED:n.doctype+=w,w===n.q&&(n.q="",n.state=r.DOCTYPE);continue;case r.DOCTYPE_DTD:w==="]"?(n.doctype+=w,n.state=r.DOCTYPE):w==="<"?(n.state=r.OPEN_WAKA,n.startTagPosition=n.position):p(w)?(n.doctype+=w,n.state=r.DOCTYPE_DTD_QUOTED,n.q=w):n.doctype+=w;continue;case r.DOCTYPE_DTD_QUOTED:n.doctype+=w,w===n.q&&(n.state=r.DOCTYPE_DTD,n.q="");continue;case r.COMMENT:w==="-"?n.state=r.COMMENT_ENDING:n.comment+=w;continue;case r.COMMENT_ENDING:w==="-"?(n.state=r.COMMENT_ENDED,n.comment=X(n.opt,n.comment),n.comment&&_(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+w,n.state=r.COMMENT);continue;case r.COMMENT_ENDED:w!==">"?(S(n,"Malformed comment"),n.comment+="--"+w,n.state=r.COMMENT):n.doctype&&n.doctype!==!0?n.state=r.DOCTYPE_DTD:n.state=r.TEXT;continue;case r.CDATA:w==="]"?n.state=r.CDATA_ENDING:n.cdata+=w;continue;case r.CDATA_ENDING:w==="]"?n.state=r.CDATA_ENDING_2:(n.cdata+="]"+w,n.state=r.CDATA);continue;case r.CDATA_ENDING_2:w===">"?(n.cdata&&_(n,"oncdata",n.cdata),_(n,"onclosecdata"),n.cdata="",n.state=r.TEXT):w==="]"?n.cdata+="]":(n.cdata+="]]"+w,n.state=r.CDATA);continue;case r.PROC_INST:w==="?"?n.state=r.PROC_INST_ENDING:a(w)?n.state=r.PROC_INST_BODY:n.procInstName+=w;continue;case r.PROC_INST_BODY:if(!n.procInstBody&&a(w))continue;w==="?"?n.state=r.PROC_INST_ENDING:n.procInstBody+=w;continue;case r.PROC_INST_ENDING:w===">"?(_(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=r.TEXT):(n.procInstBody+="?"+w,n.state=r.PROC_INST_BODY);continue;case r.OPEN_TAG:L(P,w)?n.tagName+=w:(hn(n),w===">"?J(n):w==="/"?n.state=r.OPEN_TAG_SLASH:(a(w)||S(n,"Invalid character in tag name"),n.state=r.ATTRIB));continue;case r.OPEN_TAG_SLASH:w===">"?(J(n,!0),oe(n)):(S(n,"Forward-slash in opening tag not followed by >"),n.state=r.ATTRIB);continue;case r.ATTRIB:if(a(w))continue;w===">"?J(n):w==="/"?n.state=r.OPEN_TAG_SLASH:L(x,w)?(n.attribName=w,n.attribValue="",n.state=r.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case r.ATTRIB_NAME:w==="="?n.state=r.ATTRIB_VALUE:w===">"?(S(n,"Attribute without value"),n.attribValue=n.attribName,ie(n),J(n)):a(w)?n.state=r.ATTRIB_NAME_SAW_WHITE:L(P,w)?n.attribName+=w:S(n,"Invalid attribute name");continue;case r.ATTRIB_NAME_SAW_WHITE:if(w==="=")n.state=r.ATTRIB_VALUE;else{if(a(w))continue;S(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",_(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",w===">"?J(n):L(x,w)?(n.attribName=w,n.state=r.ATTRIB_NAME):(S(n,"Invalid attribute name"),n.state=r.ATTRIB)}continue;case r.ATTRIB_VALUE:if(a(w))continue;p(w)?(n.q=w,n.state=r.ATTRIB_VALUE_QUOTED):(n.opt.unquotedAttributeValues||j(n,"Unquoted attribute value"),n.state=r.ATTRIB_VALUE_UNQUOTED,n.attribValue=w);continue;case r.ATTRIB_VALUE_QUOTED:if(w!==n.q){w==="&"?n.state=r.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=w;continue}ie(n),n.q="",n.state=r.ATTRIB_VALUE_CLOSED;continue;case r.ATTRIB_VALUE_CLOSED:a(w)?n.state=r.ATTRIB:w===">"?J(n):w==="/"?n.state=r.OPEN_TAG_SLASH:L(x,w)?(S(n,"No whitespace between attributes"),n.attribName=w,n.attribValue="",n.state=r.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case r.ATTRIB_VALUE_UNQUOTED:if(!T(w)){w==="&"?n.state=r.ATTRIB_VALUE_ENTITY_U:n.attribValue+=w;continue}ie(n),w===">"?J(n):n.state=r.ATTRIB;continue;case r.CLOSE_TAG:if(n.tagName)w===">"?oe(n):L(P,w)?n.tagName+=w:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=r.SCRIPT):(a(w)||S(n,"Invalid tagname in closing tag"),n.state=r.CLOSE_TAG_SAW_WHITE);else{if(a(w))continue;v(x,w)?n.script?(n.script+="</"+w,n.state=r.SCRIPT):S(n,"Invalid tagname in closing tag."):n.tagName=w}continue;case r.CLOSE_TAG_SAW_WHITE:if(a(w))continue;w===">"?oe(n):S(n,"Invalid characters in closing tag");continue;case r.TEXT_ENTITY:case r.ATTRIB_VALUE_ENTITY_Q:case r.ATTRIB_VALUE_ENTITY_U:var U,k;switch(n.state){case r.TEXT_ENTITY:U=r.TEXT,k="textNode";break;case r.ATTRIB_VALUE_ENTITY_Q:U=r.ATTRIB_VALUE_QUOTED,k="attribValue";break;case r.ATTRIB_VALUE_ENTITY_U:U=r.ATTRIB_VALUE_UNQUOTED,k="attribValue";break}if(w===";"){var $=dn(n);n.opt.unparsedEntities&&!Object.values(c.XML_ENTITIES).includes($)?(n.entity="",n.state=U,n.write($)):(n[k]+=$,n.entity="",n.state=U)}else L(n.entity.length?s:E,w)?n.entity+=w:(S(n,"Invalid character in entity name"),n[k]+="&"+n.entity+w,n.entity="",n.state=U);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&h(n),n}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var u=String.fromCharCode,n=Math.floor,M=function(){var w=16384,R=[],q,U,k=-1,$=arguments.length;if(!$)return"";for(var tt="";++k<$;){var V=Number(arguments[k]);if(!isFinite(V)||V<0||V>1114111||n(V)!==V)throw RangeError("Invalid code point: "+V);V<=65535?R.push(V):(V-=65536,q=(V>>10)+55296,U=V%1024+56320,R.push(q,U)),(k+1===$||R.length>w)&&(tt+=u.apply(null,R),R.length=0)}return tt};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:M,configurable:!0,writable:!0}):String.fromCodePoint=M}()})(i)}(ee)),ee}var jt={exports:{}},ze;function Gr(){if(ze)return jt.exports;ze=1;var i=typeof Reflect=="object"?Reflect:null,c=i&&typeof i.apply=="function"?i.apply:function(p,T,L){return Function.prototype.apply.call(p,T,L)},D;i&&typeof i.ownKeys=="function"?D=i.ownKeys:Object.getOwnPropertySymbols?D=function(p){return Object.getOwnPropertyNames(p).concat(Object.getOwnPropertySymbols(p))}:D=function(p){return Object.getOwnPropertyNames(p)};function f(a){console&&console.warn&&console.warn(a)}var h=Number.isNaN||function(p){return p!==p};function t(){t.init.call(this)}jt.exports=t,jt.exports.once=P,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._eventsCount=0,t.prototype._maxListeners=void 0;var e=10;function o(a){if(typeof a!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a)}Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return e},set:function(a){if(typeof a!="number"||a<0||h(a))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+a+".");e=a}}),t.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},t.prototype.setMaxListeners=function(p){if(typeof p!="number"||p<0||h(p))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+p+".");return this._maxListeners=p,this};function l(a){return a._maxListeners===void 0?t.defaultMaxListeners:a._maxListeners}t.prototype.getMaxListeners=function(){return l(this)},t.prototype.emit=function(p){for(var T=[],L=1;L<arguments.length;L++)T.push(arguments[L]);var v=p==="error",r=this._events;if(r!==void 0)v=v&&r.error===void 0;else if(!v)return!1;if(v){var N;if(T.length>0&&(N=T[0]),N instanceof Error)throw N;var A=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw A.context=N,A}var _=r[p];if(_===void 0)return!1;if(typeof _=="function")c(_,this,T);else for(var C=_.length,X=O(_,C),L=0;L<C;++L)c(X[L],this,T);return!0};function b(a,p,T,L){var v,r,N;if(o(T),r=a._events,r===void 0?(r=a._events=Object.create(null),a._eventsCount=0):(r.newListener!==void 0&&(a.emit("newListener",p,T.listener?T.listener:T),r=a._events),N=r[p]),N===void 0)N=r[p]=T,++a._eventsCount;else if(typeof N=="function"?N=r[p]=L?[T,N]:[N,T]:L?N.unshift(T):N.push(T),v=l(a),v>0&&N.length>v&&!N.warned){N.warned=!0;var A=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");A.name="MaxListenersExceededWarning",A.emitter=a,A.type=p,A.count=N.length,f(A)}return a}t.prototype.addListener=function(p,T){return b(this,p,T,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(p,T){return b(this,p,T,!0)};function m(){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 y(a,p,T){var L={fired:!1,wrapFn:void 0,target:a,type:p,listener:T},v=m.bind(L);return v.listener=T,L.wrapFn=v,v}t.prototype.once=function(p,T){return o(T),this.on(p,y(this,p,T)),this},t.prototype.prependOnceListener=function(p,T){return o(T),this.prependListener(p,y(this,p,T)),this},t.prototype.removeListener=function(p,T){var L,v,r,N,A;if(o(T),v=this._events,v===void 0)return this;if(L=v[p],L===void 0)return this;if(L===T||L.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete v[p],v.removeListener&&this.emit("removeListener",p,L.listener||T));else if(typeof L!="function"){for(r=-1,N=L.length-1;N>=0;N--)if(L[N]===T||L[N].listener===T){A=L[N].listener,r=N;break}if(r<0)return this;r===0?L.shift():I(L,r),L.length===1&&(v[p]=L[0]),v.removeListener!==void 0&&this.emit("removeListener",p,A||T)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(p){var T,L,v;if(L=this._events,L===void 0)return this;if(L.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):L[p]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete L[p]),this;if(arguments.length===0){var r=Object.keys(L),N;for(v=0;v<r.length;++v)N=r[v],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(T=L[p],typeof T=="function")this.removeListener(p,T);else if(T!==void 0)for(v=T.length-1;v>=0;v--)this.removeListener(p,T[v]);return this};function d(a,p,T){var L=a._events;if(L===void 0)return[];var v=L[p];return v===void 0?[]:typeof v=="function"?T?[v.listener||v]:[v]:T?x(v):O(v,v.length)}t.prototype.listeners=function(p){return d(this,p,!0)},t.prototype.rawListeners=function(p){return d(this,p,!1)},t.listenerCount=function(a,p){return typeof a.listenerCount=="function"?a.listenerCount(p):g.call(a,p)},t.prototype.listenerCount=g;function g(a){var p=this._events;if(p!==void 0){var T=p[a];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}t.prototype.eventNames=function(){return this._eventsCount>0?D(this._events):[]};function O(a,p){for(var T=new Array(p),L=0;L<p;++L)T[L]=a[L];return T}function I(a,p){for(;p+1<a.length;p++)a[p]=a[p+1];a.pop()}function x(a){for(var p=new Array(a.length),T=0;T<p.length;++T)p[T]=a[T].listener||a[T];return p}function P(a,p){return new Promise(function(T,L){function v(N){a.removeListener(p,r),L(N)}function r(){typeof a.removeListener=="function"&&a.removeListener("error",v),T([].slice.call(arguments))}s(a,p,r,{once:!0}),p!=="error"&&E(a,v,{once:!0})})}function E(a,p,T){typeof a.on=="function"&&s(a,"error",p,T)}function s(a,p,T,L){if(typeof a.on=="function")L.once?a.once(p,T):a.on(p,T);else if(typeof a.addEventListener=="function")a.addEventListener(p,function v(r){L.once&&a.removeEventListener(p,v),T(r)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof a)}return jt.exports}var Bt={},He;function Yr(){return He||(He=1,(function(){Bt.stripBOM=function(i){return i[0]==="\uFEFF"?i.substring(1):i}}).call(Bt)),Bt}var Z={},Qe;function Ze(){return Qe||(Qe=1,(function(){var i;i=new RegExp(/(?!xmlns)^.*:/),Z.normalize=function(c){return c.toLowerCase()},Z.firstCharLowerCase=function(c){return c.charAt(0).toLowerCase()+c.slice(1)},Z.stripPrefix=function(c){return c.replace(i,"")},Z.parseNumbers=function(c){return isNaN(c)||(c=c%1===0?parseInt(c,10):parseFloat(c)),c},Z.parseBooleans=function(c){return/^(?:true|false)$/i.test(c)&&(c=c.toLowerCase()==="true"),c}}).call(Z)),Z}var Je;function Kr(){return Je||(Je=1,function(i){(function(){var c,D,f,h,t,e,o,l,b,m=function(g,O){return function(){return g.apply(O,arguments)}},y=function(g,O){for(var I in O)d.call(O,I)&&(g[I]=O[I]);function x(){this.constructor=g}return x.prototype=O.prototype,g.prototype=new x,g.__super__=O.prototype,g},d={}.hasOwnProperty;l=Wr(),h=Gr(),c=Yr(),o=Ze(),b=re.setImmediate,D=qt().defaults,t=function(g){return typeof g=="object"&&g!=null&&Object.keys(g).length===0},e=function(g,O,I){var x,P,E;for(x=0,P=g.length;x<P;x++)E=g[x],O=E(O,I);return O},f=function(g,O,I){var x;return x=Object.create(null),x.value=I,x.writable=!0,x.enumerable=!0,x.configurable=!0,Object.defineProperty(g,O,x)},i.Parser=function(g){y(O,g);function O(I){this.parseStringPromise=m(this.parseStringPromise,this),this.parseString=m(this.parseString,this),this.reset=m(this.reset,this),this.assignOrPush=m(this.assignOrPush,this),this.processAsync=m(this.processAsync,this);var x,P,E;if(!(this instanceof i.Parser))return new i.Parser(I);this.options={},P=D["0.2"];for(x in P)d.call(P,x)&&(E=P[x],this.options[x]=E);for(x in I)d.call(I,x)&&(E=I[x],this.options[x]=E);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(o.normalize)),this.reset()}return O.prototype.processAsync=function(){var I,x;try{return this.remaining.length<=this.options.chunkSize?(I=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(I),this.saxParser.close()):(I=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(I),b(this.processAsync))}catch(P){if(x=P,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(x)}},O.prototype.assignOrPush=function(I,x,P){return x in I?(I[x]instanceof Array||f(I,x,[I[x]]),I[x].push(P)):this.options.explicitArray?f(I,x,[P]):f(I,x,P)},O.prototype.reset=function(){var I,x,P,E;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(s){return function(a){if(s.saxParser.resume(),!s.saxParser.errThrown)return s.saxParser.errThrown=!0,s.emit("error",a)}}(this),this.saxParser.onend=function(s){return function(){if(!s.saxParser.ended)return s.saxParser.ended=!0,s.emit("end",s.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,E=[],I=this.options.attrkey,x=this.options.charkey,this.saxParser.onopentag=function(s){return function(a){var p,T,L,v,r;if(L={},L[x]="",!s.options.ignoreAttrs){r=a.attributes;for(p in r)d.call(r,p)&&(!(I in L)&&!s.options.mergeAttrs&&(L[I]={}),T=s.options.attrValueProcessors?e(s.options.attrValueProcessors,a.attributes[p],p):a.attributes[p],v=s.options.attrNameProcessors?e(s.options.attrNameProcessors,p):p,s.options.mergeAttrs?s.assignOrPush(L,v,T):f(L[I],v,T))}return L["#name"]=s.options.tagNameProcessors?e(s.options.tagNameProcessors,a.name):a.name,s.options.xmlns&&(L[s.options.xmlnskey]={uri:a.uri,local:a.local}),E.push(L)}}(this),this.saxParser.onclosetag=function(s){return function(){var a,p,T,L,v,r,N,A,_,C;if(r=E.pop(),v=r["#name"],(!s.options.explicitChildren||!s.options.preserveChildrenOrder)&&delete r["#name"],r.cdata===!0&&(a=r.cdata,delete r.cdata),_=E[E.length-1],r[x].match(/^\s*$/)&&!a?(p=r[x],delete r[x]):(s.options.trim&&(r[x]=r[x].trim()),s.options.normalize&&(r[x]=r[x].replace(/\s{2,}/g," ").trim()),r[x]=s.options.valueProcessors?e(s.options.valueProcessors,r[x],v):r[x],Object.keys(r).length===1&&x in r&&!s.EXPLICIT_CHARKEY&&(r=r[x])),t(r)&&(typeof s.options.emptyTag=="function"?r=s.options.emptyTag():r=s.options.emptyTag!==""?s.options.emptyTag:p),s.options.validator!=null&&(C="/"+function(){var X,j,F;for(F=[],X=0,j=E.length;X<j;X++)L=E[X],F.push(L["#name"]);return F}().concat(v).join("/"),function(){var X;try{return r=s.options.validator(C,_&&_[v],r)}catch(j){return X=j,s.emit("error",X)}}()),s.options.explicitChildren&&!s.options.mergeAttrs&&typeof r=="object"){if(!s.options.preserveChildrenOrder)L={},s.options.attrkey in r&&(L[s.options.attrkey]=r[s.options.attrkey],delete r[s.options.attrkey]),!s.options.charsAsChildren&&s.options.charkey in r&&(L[s.options.charkey]=r[s.options.charkey],delete r[s.options.charkey]),Object.getOwnPropertyNames(r).length>0&&(L[s.options.childkey]=r),r=L;else if(_){_[s.options.childkey]=_[s.options.childkey]||[],N={};for(T in r)d.call(r,T)&&f(N,T,r[T]);_[s.options.childkey].push(N),delete r["#name"],Object.keys(r).length===1&&x in r&&!s.EXPLICIT_CHARKEY&&(r=r[x])}}return E.length>0?s.assignOrPush(_,v,r):(s.options.explicitRoot&&(A=r,r={},f(r,v,A)),s.resultObject=r,s.saxParser.ended=!0,s.emit("end",s.resultObject))}}(this),P=function(s){return function(a){var p,T;if(T=E[E.length-1],T)return T[x]+=a,s.options.explicitChildren&&s.options.preserveChildrenOrder&&s.options.charsAsChildren&&(s.options.includeWhiteChars||a.replace(/\\n/g,"").trim()!=="")&&(T[s.options.childkey]=T[s.options.childkey]||[],p={"#name":"__text__"},p[x]=a,s.options.normalize&&(p[x]=p[x].replace(/\s{2,}/g," ").trim()),T[s.options.childkey].push(p)),T}}(this),this.saxParser.ontext=P,this.saxParser.oncdata=function(s){return function(a){var p;if(p=P(a),p)return p.cdata=!0}}()},O.prototype.parseString=function(I,x){var P;x!=null&&typeof x=="function"&&(this.on("end",function(E){return this.reset(),x(null,E)}),this.on("error",function(E){return this.reset(),x(E)}));try{return I=I.toString(),I.trim()===""?(this.emit("end",null),!0):(I=c.stripBOM(I),this.options.async?(this.remaining=I,b(this.processAsync),this.saxParser):this.saxParser.write(I).close())}catch(E){if(P=E,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw P}else return this.emit("error",P),this.saxParser.errThrown=!0}},O.prototype.parseStringPromise=function(I){return new Promise(function(x){return function(P,E){return x.parseString(I,function(s,a){return s?E(s):P(a)})}}(this))},O}(h),i.parseString=function(g,O,I){var x,P,E;return I!=null?(typeof I=="function"&&(x=I),typeof O=="object"&&(P=O)):(typeof O=="function"&&(x=O),P={}),E=new i.Parser(P),E.parseString(g,x)},i.parseStringPromise=function(g,O){var I,x;return typeof O=="object"&&(I=O),x=new i.Parser(I),x.parseStringPromise(g)}}).call(Rt)}(Rt)),Rt}var tr;function zr(){return tr||(tr=1,(function(){var i,c,D,f,h=function(e,o){for(var l in o)t.call(o,l)&&(e[l]=o[l]);function b(){this.constructor=e}return b.prototype=o.prototype,e.prototype=new b,e.__super__=o.prototype,e},t={}.hasOwnProperty;c=qt(),i=$r(),D=Kr(),f=Ze(),G.defaults=c.defaults,G.processors=f,G.ValidationError=function(e){h(o,e);function o(l){this.message=l}return o}(Error),G.Builder=i.Builder,G.Parser=D.Parser,G.parseString=D.parseString,G.parseStringPromise=D.parseStringPromise}).call(G)),G}var Hr=zr();const Qr=i=>i!==null&&typeof i=="object"&&i.hasOwnProperty("rss")&&typeof i.rss=="object"&&i.rss!==null&&i.rss.hasOwnProperty("channel")&&Array.isArray(i.rss.channel),Zr=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("title")&&Array.isArray(i.title)&&i.hasOwnProperty("description")&&Array.isArray(i.description)&&i.hasOwnProperty("link")&&Array.isArray(i.link)&&i.hasOwnProperty("image")&&Array.isArray(i.image)&&i.image.every(Jr)&&i.hasOwnProperty("generator")&&Array.isArray(i.generator)&&i.hasOwnProperty("lastBuildDate")&&Array.isArray(i.lastBuildDate)&&i.hasOwnProperty("atom:link")&&Array.isArray(i["atom:link"])&&i["atom:link"].every(tn)&&i.hasOwnProperty("copyright")&&Array.isArray(i.copyright)&&i.hasOwnProperty("language")&&Array.isArray(i.language)&&i.hasOwnProperty("webMaster")&&Array.isArray(i.webMaster)&&i.hasOwnProperty("itunes:owner")&&Array.isArray(i["itunes:owner"])&&i["itunes:owner"].every(en)&&i.hasOwnProperty("itunes:author")&&Array.isArray(i["itunes:author"])&&i.hasOwnProperty("googleplay:owner")&&Array.isArray(i["googleplay:owner"])&&i.hasOwnProperty("googleplay:email")&&Array.isArray(i["googleplay:email"])&&i.hasOwnProperty("googleplay:author")&&Array.isArray(i["googleplay:author"])&&i.hasOwnProperty("item")&&Array.isArray(i.item)&&i.item.every(rn),Jr=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("url")&&Array.isArray(i.url)&&i.hasOwnProperty("title")&&Array.isArray(i.title)&&i.hasOwnProperty("link")&&Array.isArray(i.link),tn=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("$")&&typeof i.$=="object"&&i.$!==null&&i.$.hasOwnProperty("href")&&typeof i.$.href=="string"&&i.$.hasOwnProperty("rel")&&typeof i.$.rel=="string"&&i.$.hasOwnProperty("type")&&typeof i.$.type=="string",en=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("itunes:email")&&Array.isArray(i["itunes:email"])&&i.hasOwnProperty("itunes:name")&&Array.isArray(i["itunes:name"]),rn=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("title")&&Array.isArray(i.title)&&i.hasOwnProperty("description")&&Array.isArray(i.description)&&i.hasOwnProperty("link")&&Array.isArray(i.link)&&i.hasOwnProperty("guid")&&Array.isArray(i.guid)&&i.guid.every(nn)&&i.hasOwnProperty("dc:creator")&&Array.isArray(i["dc:creator"])&&i.hasOwnProperty("pubDate")&&Array.isArray(i.pubDate)&&i.hasOwnProperty("enclosure")&&Array.isArray(i.enclosure)&&i.enclosure.every(on)&&i.hasOwnProperty("content:encoded")&&Array.isArray(i["content:encoded"]),nn=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("_")&&typeof i._=="string"&&i.hasOwnProperty("$")&&typeof i.$=="object"&&i.$!==null&&i.$.hasOwnProperty("isPermaLink")&&typeof i.$.isPermaLink=="string",on=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("$")&&typeof i.$=="object"&&i.$!==null&&i.$.hasOwnProperty("url")&&typeof i.$.url=="string"&&i.$.hasOwnProperty("length")&&typeof i.$.length=="string"&&i.$.hasOwnProperty("type")&&typeof i.$.type=="string",sn="https://api.allorigins.win/get?url=",un=async(i,c=!1)=>{try{const D=c?`${sn}${encodeURIComponent(i)}`:i,f=await fetch(D);if(f.ok)return f.text()}catch{throw new Error("Error occurred fetching Feed from Substack")}},an=async(i="",c)=>{Hr.parseString(i,c)},cn=i=>({title:i.title[0],description:i.description[0],link:i.link[0],pubDate:i.pubDate[0],content:i["content:encoded"][0]}),ln=async(i,c=!1,D)=>{const f=await un(i,c);if(!D)return f;await an(f,D)},fn=(i,c)=>{if(!Qr(i))throw new Error("Feed is not in the correct format");try{return i.rss.channel.filter(Zr).filter(D=>D.link[0]===c)}catch{throw new Error(`Error occurred fetching Feed by Link: ${c}`)}},pn=i=>i[0].item.map(cn);Q.getFeedByLink=fn,Q.getPosts=pn,Q.getSubstackFeed=ln,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|