substack-feed-api 1.0.10 → 1.0.14
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/dist/substackFeedApi.js +114 -116
- package/dist/substackFeedApi.umd.cjs +5 -5
- package/package.json +3 -1
package/dist/substackFeedApi.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function lr(i) {
|
|
2
2
|
if (i.__esModule) return i;
|
|
3
3
|
var a = i.default;
|
|
4
4
|
if (typeof a == "function") {
|
|
@@ -128,8 +128,8 @@ function H() {
|
|
|
128
128
|
}, K.assign = i, K.isFunction = h, K.isObject = t, K.isArray = D, K.isEmpty = p, K.isPlainObject = e, K.getValue = a;
|
|
129
129
|
}).call(K)), K;
|
|
130
130
|
}
|
|
131
|
-
var ot = { exports: {} },
|
|
132
|
-
function
|
|
131
|
+
var ot = { exports: {} }, fr = ot.exports, pe;
|
|
132
|
+
function Je() {
|
|
133
133
|
return pe || (pe = 1, (function() {
|
|
134
134
|
ot.exports = function() {
|
|
135
135
|
function i() {
|
|
@@ -146,10 +146,10 @@ function Ze() {
|
|
|
146
146
|
throw new Error("This DOM method is not implemented.");
|
|
147
147
|
}, i;
|
|
148
148
|
}();
|
|
149
|
-
}).call(
|
|
149
|
+
}).call(fr)), ot.exports;
|
|
150
150
|
}
|
|
151
|
-
var st = { exports: {} }, ut = { exports: {} }, at = { exports: {} },
|
|
152
|
-
function
|
|
151
|
+
var st = { exports: {} }, ut = { exports: {} }, at = { exports: {} }, pr = at.exports, he;
|
|
152
|
+
function hr() {
|
|
153
153
|
return he || (he = 1, (function() {
|
|
154
154
|
at.exports = function() {
|
|
155
155
|
function i() {
|
|
@@ -158,10 +158,10 @@ function pr() {
|
|
|
158
158
|
throw new Error(a);
|
|
159
159
|
}, i;
|
|
160
160
|
}();
|
|
161
|
-
}).call(
|
|
161
|
+
}).call(pr)), at.exports;
|
|
162
162
|
}
|
|
163
|
-
var ct = { exports: {} },
|
|
164
|
-
function
|
|
163
|
+
var ct = { exports: {} }, dr = ct.exports, de;
|
|
164
|
+
function yr() {
|
|
165
165
|
return de || (de = 1, (function() {
|
|
166
166
|
ct.exports = function() {
|
|
167
167
|
function i(a) {
|
|
@@ -177,13 +177,13 @@ function dr() {
|
|
|
177
177
|
return this.arr.indexOf(a) !== -1;
|
|
178
178
|
}, i;
|
|
179
179
|
}();
|
|
180
|
-
}).call(
|
|
180
|
+
}).call(dr)), ct.exports;
|
|
181
181
|
}
|
|
182
|
-
var
|
|
183
|
-
function
|
|
182
|
+
var mr = ut.exports, ye;
|
|
183
|
+
function gr() {
|
|
184
184
|
return ye || (ye = 1, (function() {
|
|
185
185
|
var i, a;
|
|
186
|
-
i =
|
|
186
|
+
i = hr(), a = yr(), ut.exports = function() {
|
|
187
187
|
function D() {
|
|
188
188
|
this.defaultParams = {
|
|
189
189
|
"canonical-form": !1,
|
|
@@ -217,9 +217,9 @@ function mr() {
|
|
|
217
217
|
return h != null ? this.params[p] = h : delete this.params[p];
|
|
218
218
|
}, D;
|
|
219
219
|
}();
|
|
220
|
-
}).call(
|
|
220
|
+
}).call(mr)), ut.exports;
|
|
221
221
|
}
|
|
222
|
-
var lt = { exports: {} }, ft = { exports: {} }, pt = { exports: {} },
|
|
222
|
+
var lt = { exports: {} }, ft = { exports: {} }, pt = { exports: {} }, wr = pt.exports, me;
|
|
223
223
|
function B() {
|
|
224
224
|
return me || (me = 1, (function() {
|
|
225
225
|
pt.exports = {
|
|
@@ -241,10 +241,10 @@ function B() {
|
|
|
241
241
|
ElementDeclaration: 204,
|
|
242
242
|
Dummy: 205
|
|
243
243
|
};
|
|
244
|
-
}).call(
|
|
244
|
+
}).call(wr)), pt.exports;
|
|
245
245
|
}
|
|
246
|
-
var ht = { exports: {} },
|
|
247
|
-
function
|
|
246
|
+
var ht = { exports: {} }, Tr = ht.exports, ge;
|
|
247
|
+
function tr() {
|
|
248
248
|
return ge || (ge = 1, (function() {
|
|
249
249
|
var i;
|
|
250
250
|
i = B(), W(), ht.exports = function() {
|
|
@@ -294,9 +294,9 @@ function Je() {
|
|
|
294
294
|
return !(D.namespaceURI !== this.namespaceURI || D.prefix !== this.prefix || D.localName !== this.localName || D.value !== this.value);
|
|
295
295
|
}, a;
|
|
296
296
|
}();
|
|
297
|
-
}).call(
|
|
297
|
+
}).call(Tr)), ht.exports;
|
|
298
298
|
}
|
|
299
|
-
var dt = { exports: {} },
|
|
299
|
+
var dt = { exports: {} }, Dr = dt.exports, we;
|
|
300
300
|
function Gt() {
|
|
301
301
|
return we || (we = 1, (function() {
|
|
302
302
|
dt.exports = function() {
|
|
@@ -327,9 +327,9 @@ function Gt() {
|
|
|
327
327
|
throw new Error("This DOM method is not implemented.");
|
|
328
328
|
}, i;
|
|
329
329
|
}();
|
|
330
|
-
}).call(
|
|
330
|
+
}).call(Dr)), dt.exports;
|
|
331
331
|
}
|
|
332
|
-
var
|
|
332
|
+
var Er = ft.exports, Te;
|
|
333
333
|
function Yt() {
|
|
334
334
|
return Te || (Te = 1, (function() {
|
|
335
335
|
var i, a, D, p, h, t, e, o, l = function(m, y) {
|
|
@@ -340,7 +340,7 @@ function Yt() {
|
|
|
340
340
|
}
|
|
341
341
|
return g.prototype = y.prototype, m.prototype = new g(), m.__super__ = y.prototype, m;
|
|
342
342
|
}, b = {}.hasOwnProperty;
|
|
343
|
-
o = H(), e = o.isObject, t = o.isFunction, h = o.getValue, p = W(), i = B(), a =
|
|
343
|
+
o = H(), e = o.isObject, t = o.isFunction, h = o.getValue, p = W(), i = B(), a = tr(), D = Gt(), ft.exports = function(m) {
|
|
344
344
|
l(y, m);
|
|
345
345
|
function y(d, g, O) {
|
|
346
346
|
var I, x, P, E;
|
|
@@ -469,9 +469,9 @@ function Yt() {
|
|
|
469
469
|
return !0;
|
|
470
470
|
}, y;
|
|
471
471
|
}(p);
|
|
472
|
-
}).call(
|
|
472
|
+
}).call(Er)), ft.exports;
|
|
473
473
|
}
|
|
474
|
-
var yt = { exports: {} }, mt = { exports: {} },
|
|
474
|
+
var yt = { exports: {} }, mt = { exports: {} }, br = mt.exports, De;
|
|
475
475
|
function Ft() {
|
|
476
476
|
return De || (De = 1, (function() {
|
|
477
477
|
var i, a = function(p, h) {
|
|
@@ -521,9 +521,9 @@ function Ft() {
|
|
|
521
521
|
return !(!h.__super__.isEqualNode.apply(this, arguments).isEqualNode(t) || t.data !== this.data);
|
|
522
522
|
}, h;
|
|
523
523
|
}(i);
|
|
524
|
-
}).call(
|
|
524
|
+
}).call(br)), mt.exports;
|
|
525
525
|
}
|
|
526
|
-
var
|
|
526
|
+
var Or = yt.exports, Ee;
|
|
527
527
|
function Kt() {
|
|
528
528
|
return Ee || (Ee = 1, (function() {
|
|
529
529
|
var i, a, D = function(h, t) {
|
|
@@ -547,9 +547,9 @@ function Kt() {
|
|
|
547
547
|
return this.options.writer.cdata(this, this.options.writer.filterOptions(e));
|
|
548
548
|
}, t;
|
|
549
549
|
}(a);
|
|
550
|
-
}).call(
|
|
550
|
+
}).call(Or)), yt.exports;
|
|
551
551
|
}
|
|
552
|
-
var gt = { exports: {} },
|
|
552
|
+
var gt = { exports: {} }, Nr = gt.exports, be;
|
|
553
553
|
function zt() {
|
|
554
554
|
return be || (be = 1, (function() {
|
|
555
555
|
var i, a, D = function(h, t) {
|
|
@@ -573,9 +573,9 @@ function zt() {
|
|
|
573
573
|
return this.options.writer.comment(this, this.options.writer.filterOptions(e));
|
|
574
574
|
}, t;
|
|
575
575
|
}(a);
|
|
576
|
-
}).call(
|
|
576
|
+
}).call(Nr)), gt.exports;
|
|
577
577
|
}
|
|
578
|
-
var wt = { exports: {} },
|
|
578
|
+
var wt = { exports: {} }, vr = wt.exports, Oe;
|
|
579
579
|
function Ht() {
|
|
580
580
|
return Oe || (Oe = 1, (function() {
|
|
581
581
|
var i, a, D, p = function(t, e) {
|
|
@@ -596,9 +596,9 @@ function Ht() {
|
|
|
596
596
|
return this.options.writer.declaration(this, this.options.writer.filterOptions(o));
|
|
597
597
|
}, e;
|
|
598
598
|
}(a);
|
|
599
|
-
}).call(
|
|
599
|
+
}).call(vr)), wt.exports;
|
|
600
600
|
}
|
|
601
|
-
var Tt = { exports: {} }, Dt = { exports: {} },
|
|
601
|
+
var Tt = { exports: {} }, Dt = { exports: {} }, Lr = Dt.exports, Ne;
|
|
602
602
|
function Qt() {
|
|
603
603
|
return Ne || (Ne = 1, (function() {
|
|
604
604
|
var i, a, D = function(h, t) {
|
|
@@ -630,9 +630,9 @@ function Qt() {
|
|
|
630
630
|
return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(e));
|
|
631
631
|
}, t;
|
|
632
632
|
}(a);
|
|
633
|
-
}).call(
|
|
633
|
+
}).call(Lr)), Dt.exports;
|
|
634
634
|
}
|
|
635
|
-
var Et = { exports: {} },
|
|
635
|
+
var Et = { exports: {} }, Ir = Et.exports, ve;
|
|
636
636
|
function Zt() {
|
|
637
637
|
return ve || (ve = 1, (function() {
|
|
638
638
|
var i, a, D, p = function(t, e) {
|
|
@@ -689,9 +689,9 @@ function Zt() {
|
|
|
689
689
|
return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(o));
|
|
690
690
|
}, e;
|
|
691
691
|
}(a);
|
|
692
|
-
}).call(
|
|
692
|
+
}).call(Ir)), Et.exports;
|
|
693
693
|
}
|
|
694
|
-
var bt = { exports: {} },
|
|
694
|
+
var bt = { exports: {} }, xr = bt.exports, Le;
|
|
695
695
|
function Jt() {
|
|
696
696
|
return Le || (Le = 1, (function() {
|
|
697
697
|
var i, a, D = function(h, t) {
|
|
@@ -713,9 +713,9 @@ function Jt() {
|
|
|
713
713
|
return this.options.writer.dtdElement(this, this.options.writer.filterOptions(e));
|
|
714
714
|
}, t;
|
|
715
715
|
}(a);
|
|
716
|
-
}).call(
|
|
716
|
+
}).call(xr)), bt.exports;
|
|
717
717
|
}
|
|
718
|
-
var Ot = { exports: {} },
|
|
718
|
+
var Ot = { exports: {} }, Ar = Ot.exports, Ie;
|
|
719
719
|
function te() {
|
|
720
720
|
return Ie || (Ie = 1, (function() {
|
|
721
721
|
var i, a, D = function(h, t) {
|
|
@@ -747,9 +747,9 @@ function te() {
|
|
|
747
747
|
return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(e));
|
|
748
748
|
}, t;
|
|
749
749
|
}(a);
|
|
750
|
-
}).call(
|
|
750
|
+
}).call(Ar)), Ot.exports;
|
|
751
751
|
}
|
|
752
|
-
var
|
|
752
|
+
var Mr = Tt.exports, xe;
|
|
753
753
|
function ee() {
|
|
754
754
|
return xe || (xe = 1, (function() {
|
|
755
755
|
var i, a, D, p, h, t, e, o, l = function(m, y) {
|
|
@@ -832,9 +832,9 @@ function ee() {
|
|
|
832
832
|
return !(!y.__super__.isEqualNode.apply(this, arguments).isEqualNode(d) || d.name !== this.name || d.publicId !== this.publicId || d.systemId !== this.systemId);
|
|
833
833
|
}, y;
|
|
834
834
|
}(e);
|
|
835
|
-
}).call(
|
|
835
|
+
}).call(Mr)), Tt.exports;
|
|
836
836
|
}
|
|
837
|
-
var Nt = { exports: {} },
|
|
837
|
+
var Nt = { exports: {} }, Pr = Nt.exports, Ae;
|
|
838
838
|
function re() {
|
|
839
839
|
return Ae || (Ae = 1, (function() {
|
|
840
840
|
var i, a, D = function(h, t) {
|
|
@@ -858,9 +858,9 @@ function re() {
|
|
|
858
858
|
return this.options.writer.raw(this, this.options.writer.filterOptions(e));
|
|
859
859
|
}, t;
|
|
860
860
|
}(a);
|
|
861
|
-
}).call(
|
|
861
|
+
}).call(Pr)), Nt.exports;
|
|
862
862
|
}
|
|
863
|
-
var vt = { exports: {} },
|
|
863
|
+
var vt = { exports: {} }, _r = vt.exports, Me;
|
|
864
864
|
function ne() {
|
|
865
865
|
return Me || (Me = 1, (function() {
|
|
866
866
|
var i, a, D = function(h, t) {
|
|
@@ -901,9 +901,9 @@ function ne() {
|
|
|
901
901
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
902
902
|
}, t;
|
|
903
903
|
}(a);
|
|
904
|
-
}).call(
|
|
904
|
+
}).call(_r)), vt.exports;
|
|
905
905
|
}
|
|
906
|
-
var Lt = { exports: {} },
|
|
906
|
+
var Lt = { exports: {} }, Cr = Lt.exports, Pe;
|
|
907
907
|
function ie() {
|
|
908
908
|
return Pe || (Pe = 1, (function() {
|
|
909
909
|
var i, a, D = function(h, t) {
|
|
@@ -929,10 +929,10 @@ function ie() {
|
|
|
929
929
|
return !(!t.__super__.isEqualNode.apply(this, arguments).isEqualNode(e) || e.target !== this.target);
|
|
930
930
|
}, t;
|
|
931
931
|
}(a);
|
|
932
|
-
}).call(
|
|
932
|
+
}).call(Cr)), Lt.exports;
|
|
933
933
|
}
|
|
934
|
-
var It = { exports: {} },
|
|
935
|
-
function
|
|
934
|
+
var It = { exports: {} }, Sr = It.exports, _e;
|
|
935
|
+
function er() {
|
|
936
936
|
return _e || (_e = 1, (function() {
|
|
937
937
|
var i, a, D = function(h, t) {
|
|
938
938
|
for (var e in t)
|
|
@@ -953,10 +953,10 @@ function tr() {
|
|
|
953
953
|
return "";
|
|
954
954
|
}, t;
|
|
955
955
|
}(a);
|
|
956
|
-
}).call(
|
|
956
|
+
}).call(Sr)), It.exports;
|
|
957
957
|
}
|
|
958
|
-
var xt = { exports: {} },
|
|
959
|
-
function
|
|
958
|
+
var xt = { exports: {} }, Xr = xt.exports, Ce;
|
|
959
|
+
function Fr() {
|
|
960
960
|
return Ce || (Ce = 1, (function() {
|
|
961
961
|
xt.exports = function() {
|
|
962
962
|
function i(a) {
|
|
@@ -972,10 +972,10 @@ function Xr() {
|
|
|
972
972
|
return this.nodes[a] || null;
|
|
973
973
|
}, i;
|
|
974
974
|
}();
|
|
975
|
-
}).call(
|
|
975
|
+
}).call(Xr)), xt.exports;
|
|
976
976
|
}
|
|
977
|
-
var At = { exports: {} },
|
|
978
|
-
function
|
|
977
|
+
var At = { exports: {} }, Rr = At.exports, Se;
|
|
978
|
+
function jr() {
|
|
979
979
|
return Se || (Se = 1, (function() {
|
|
980
980
|
At.exports = {
|
|
981
981
|
Disconnected: 1,
|
|
@@ -985,15 +985,15 @@ function Rr() {
|
|
|
985
985
|
ContainedBy: 16,
|
|
986
986
|
ImplementationSpecific: 32
|
|
987
987
|
};
|
|
988
|
-
}).call(
|
|
988
|
+
}).call(Rr)), At.exports;
|
|
989
989
|
}
|
|
990
|
-
var
|
|
990
|
+
var Br = lt.exports, Xe;
|
|
991
991
|
function W() {
|
|
992
992
|
return Xe || (Xe = 1, (function() {
|
|
993
993
|
var i, a, D, p, h, t, e, o, l, b, m, y, d, g, O, I, x, P = {}.hasOwnProperty;
|
|
994
994
|
x = H(), I = x.isObject, O = x.isFunction, g = x.isEmpty, d = x.getValue, o = null, D = null, p = null, h = null, t = null, m = null, y = null, b = null, e = null, a = null, l = null, i = null, lt.exports = function() {
|
|
995
995
|
function E(s) {
|
|
996
|
-
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 = Yt(), D = Kt(), p = zt(), h = Ht(), t = ee(), m = re(), y = ne(), b = ie(), e =
|
|
996
|
+
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 = Yt(), D = Kt(), p = zt(), h = Ht(), t = ee(), m = re(), y = ne(), b = ie(), e = er(), a = B(), l = Fr(), Gt(), i = jr());
|
|
997
997
|
}
|
|
998
998
|
return Object.defineProperty(E.prototype, "nodeName", {
|
|
999
999
|
get: function() {
|
|
@@ -1296,10 +1296,10 @@ function W() {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
}, E;
|
|
1298
1298
|
}();
|
|
1299
|
-
}).call(
|
|
1299
|
+
}).call(Br)), lt.exports;
|
|
1300
1300
|
}
|
|
1301
|
-
var Mt = { exports: {} },
|
|
1302
|
-
function
|
|
1301
|
+
var Mt = { exports: {} }, qr = Mt.exports, Fe;
|
|
1302
|
+
function rr() {
|
|
1303
1303
|
return Fe || (Fe = 1, (function() {
|
|
1304
1304
|
var i = function(D, p) {
|
|
1305
1305
|
return function() {
|
|
@@ -1391,9 +1391,9 @@ function er() {
|
|
|
1391
1391
|
return this.options.noValidation ? p : (h = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g, p.replace(h, "&").replace(/</g, "<").replace(/"/g, """).replace(/\t/g, "	").replace(/\n/g, "
").replace(/\r/g, "
"));
|
|
1392
1392
|
}, D;
|
|
1393
1393
|
}();
|
|
1394
|
-
}).call(
|
|
1394
|
+
}).call(qr)), Mt.exports;
|
|
1395
1395
|
}
|
|
1396
|
-
var Pt = { exports: {} }, _t = { exports: {} }, Ct = { exports: {} },
|
|
1396
|
+
var Pt = { exports: {} }, _t = { exports: {} }, Ct = { exports: {} }, Ur = Ct.exports, Re;
|
|
1397
1397
|
function Rt() {
|
|
1398
1398
|
return Re || (Re = 1, (function() {
|
|
1399
1399
|
Ct.exports = {
|
|
@@ -1402,13 +1402,13 @@ function Rt() {
|
|
|
1402
1402
|
InsideTag: 2,
|
|
1403
1403
|
CloseTag: 3
|
|
1404
1404
|
};
|
|
1405
|
-
}).call(
|
|
1405
|
+
}).call(Ur)), Ct.exports;
|
|
1406
1406
|
}
|
|
1407
|
-
var
|
|
1408
|
-
function
|
|
1407
|
+
var Vr = _t.exports, je;
|
|
1408
|
+
function nr() {
|
|
1409
1409
|
return je || (je = 1, (function() {
|
|
1410
1410
|
var i, a, D, p = {}.hasOwnProperty;
|
|
1411
|
-
D = H().assign, i = B(), Ht(), ee(), Kt(), zt(), Yt(), re(), ne(), ie(),
|
|
1411
|
+
D = H().assign, i = B(), Ht(), ee(), Kt(), zt(), Yt(), re(), ne(), ie(), er(), Qt(), Jt(), Zt(), te(), a = Rt(), _t.exports = function() {
|
|
1412
1412
|
function h(t) {
|
|
1413
1413
|
var e, o, l;
|
|
1414
1414
|
t || (t = {}), this.options = t, o = t.writer || {};
|
|
@@ -1528,9 +1528,9 @@ function rr() {
|
|
|
1528
1528
|
}, h.prototype.closeAttribute = function(t, e, o) {
|
|
1529
1529
|
}, h;
|
|
1530
1530
|
}();
|
|
1531
|
-
}).call(
|
|
1531
|
+
}).call(Vr)), _t.exports;
|
|
1532
1532
|
}
|
|
1533
|
-
var
|
|
1533
|
+
var kr = Pt.exports, Be;
|
|
1534
1534
|
function oe() {
|
|
1535
1535
|
return Be || (Be = 1, (function() {
|
|
1536
1536
|
var i, a = function(p, h) {
|
|
@@ -1541,7 +1541,7 @@ function oe() {
|
|
|
1541
1541
|
}
|
|
1542
1542
|
return e.prototype = h.prototype, p.prototype = new e(), p.__super__ = h.prototype, p;
|
|
1543
1543
|
}, D = {}.hasOwnProperty;
|
|
1544
|
-
i =
|
|
1544
|
+
i = nr(), Pt.exports = function(p) {
|
|
1545
1545
|
a(h, p);
|
|
1546
1546
|
function h(t) {
|
|
1547
1547
|
h.__super__.constructor.call(this, t);
|
|
@@ -1553,10 +1553,10 @@ function oe() {
|
|
|
1553
1553
|
return e.pretty && m.slice(-e.newline.length) === e.newline && (m = m.slice(0, -e.newline.length)), m;
|
|
1554
1554
|
}, h;
|
|
1555
1555
|
}(i);
|
|
1556
|
-
}).call(
|
|
1556
|
+
}).call(kr)), Pt.exports;
|
|
1557
1557
|
}
|
|
1558
|
-
var
|
|
1559
|
-
function
|
|
1558
|
+
var $r = st.exports, qe;
|
|
1559
|
+
function ir() {
|
|
1560
1560
|
return qe || (qe = 1, (function() {
|
|
1561
1561
|
var i, a, D, p, h, t, e, o = function(b, m) {
|
|
1562
1562
|
for (var y in m)
|
|
@@ -1566,7 +1566,7 @@ function nr() {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
return d.prototype = m.prototype, b.prototype = new d(), b.__super__ = m.prototype, b;
|
|
1568
1568
|
}, l = {}.hasOwnProperty;
|
|
1569
|
-
e = H().isPlainObject, D =
|
|
1569
|
+
e = H().isPlainObject, D = Je(), a = gr(), p = W(), i = B(), t = rr(), h = oe(), st.exports = function(b) {
|
|
1570
1570
|
o(m, b);
|
|
1571
1571
|
function m(y) {
|
|
1572
1572
|
m.__super__.constructor.call(this, null), this.name = "#document", this.type = i.Document, this.documentURI = null, this.domConfig = new a(), y || (y = {}), y.writer || (y.writer = new h()), this.options = y, this.stringify = new t(y);
|
|
@@ -1676,13 +1676,13 @@ function nr() {
|
|
|
1676
1676
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1677
1677
|
}, m;
|
|
1678
1678
|
}(p);
|
|
1679
|
-
}).call(
|
|
1679
|
+
}).call($r)), st.exports;
|
|
1680
1680
|
}
|
|
1681
|
-
var St = { exports: {} },
|
|
1682
|
-
function
|
|
1681
|
+
var St = { exports: {} }, Wr = St.exports, Ue;
|
|
1682
|
+
function Gr() {
|
|
1683
1683
|
return Ue || (Ue = 1, (function() {
|
|
1684
1684
|
var i, a, D, p, h, t, e, o, l, b, m, y, d, g, O, I, x, P, E, s, c, f, T, L = {}.hasOwnProperty;
|
|
1685
|
-
T = H(), c = T.isObject, s = T.isFunction, f = T.isPlainObject, E = T.getValue, i = B(), y =
|
|
1685
|
+
T = H(), c = T.isObject, s = T.isFunction, f = T.isPlainObject, E = T.getValue, i = B(), y = ir(), d = Yt(), p = Kt(), h = zt(), O = re(), P = ne(), g = ie(), b = Ht(), m = ee(), t = Qt(), o = Zt(), e = Jt(), l = te(), D = tr(), x = rr(), I = oe(), a = Rt(), St.exports = function() {
|
|
1686
1686
|
function v(r, N, A) {
|
|
1687
1687
|
var _;
|
|
1688
1688
|
this.name = "?xml", this.type = i.Document, r || (r = {}), _ = {}, r.writer ? f(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() {
|
|
@@ -1875,10 +1875,10 @@ function Wr() {
|
|
|
1875
1875
|
return this.notation(r, N);
|
|
1876
1876
|
}, v;
|
|
1877
1877
|
}();
|
|
1878
|
-
}).call(
|
|
1878
|
+
}).call(Wr)), St.exports;
|
|
1879
1879
|
}
|
|
1880
|
-
var Xt = { exports: {} },
|
|
1881
|
-
function
|
|
1880
|
+
var Xt = { exports: {} }, Yr = Xt.exports, Ve;
|
|
1881
|
+
function Kr() {
|
|
1882
1882
|
return Ve || (Ve = 1, (function() {
|
|
1883
1883
|
var i, a, D, p = function(t, e) {
|
|
1884
1884
|
for (var o in e)
|
|
@@ -1888,7 +1888,7 @@ function Yr() {
|
|
|
1888
1888
|
}
|
|
1889
1889
|
return l.prototype = e.prototype, t.prototype = new l(), t.__super__ = e.prototype, t;
|
|
1890
1890
|
}, h = {}.hasOwnProperty;
|
|
1891
|
-
i = B(), D =
|
|
1891
|
+
i = B(), D = nr(), a = Rt(), Xt.exports = function(t) {
|
|
1892
1892
|
p(e, t);
|
|
1893
1893
|
function e(o, l) {
|
|
1894
1894
|
this.stream = o, e.__super__.constructor.call(this, l);
|
|
@@ -1951,13 +1951,13 @@ function Yr() {
|
|
|
1951
1951
|
return this.stream.write(e.__super__.dtdNotation.call(this, o, l, b));
|
|
1952
1952
|
}, e;
|
|
1953
1953
|
}(D);
|
|
1954
|
-
}).call(
|
|
1954
|
+
}).call(Yr)), Xt.exports;
|
|
1955
1955
|
}
|
|
1956
1956
|
var ke;
|
|
1957
|
-
function
|
|
1957
|
+
function zr() {
|
|
1958
1958
|
return ke || (ke = 1, (function() {
|
|
1959
1959
|
var i, a, D, p, h, t, e, o, l, b;
|
|
1960
|
-
b = H(), o = b.assign, l = b.isFunction, D =
|
|
1960
|
+
b = H(), o = b.assign, l = b.isFunction, D = Je(), p = ir(), h = Gr(), e = oe(), t = Kr(), i = B(), a = Rt(), Y.create = function(m, y, d, g) {
|
|
1961
1961
|
var O, I;
|
|
1962
1962
|
if (m == null)
|
|
1963
1963
|
throw new Error("Root element needs a name.");
|
|
@@ -1973,10 +1973,10 @@ function Kr() {
|
|
|
1973
1973
|
}).call(Y)), Y;
|
|
1974
1974
|
}
|
|
1975
1975
|
var $e;
|
|
1976
|
-
function
|
|
1976
|
+
function Hr() {
|
|
1977
1977
|
return $e || ($e = 1, (function() {
|
|
1978
1978
|
var i, a, D, p, h, t = {}.hasOwnProperty;
|
|
1979
|
-
i =
|
|
1979
|
+
i = zr(), a = Wt().defaults, p = function(e) {
|
|
1980
1980
|
return typeof e == "string" && (e.indexOf("&") >= 0 || e.indexOf(">") >= 0 || e.indexOf("<") >= 0);
|
|
1981
1981
|
}, h = function(e) {
|
|
1982
1982
|
return "<![CDATA[" + D(e) + "]]>";
|
|
@@ -2029,12 +2029,12 @@ function zr() {
|
|
|
2029
2029
|
}).call(et)), et;
|
|
2030
2030
|
}
|
|
2031
2031
|
var rt = {}, Vt = {};
|
|
2032
|
-
const
|
|
2032
|
+
const Qr = {}, Zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2033
2033
|
__proto__: null,
|
|
2034
|
-
default:
|
|
2035
|
-
}, Symbol.toStringTag, { value: "Module" })), kt = /* @__PURE__ */
|
|
2034
|
+
default: Qr
|
|
2035
|
+
}, Symbol.toStringTag, { value: "Module" })), kt = /* @__PURE__ */ lr(Zr);
|
|
2036
2036
|
var We;
|
|
2037
|
-
function
|
|
2037
|
+
function Jr() {
|
|
2038
2038
|
return We || (We = 1, function(i) {
|
|
2039
2039
|
(function(a) {
|
|
2040
2040
|
a.parser = function(u, n) {
|
|
@@ -2124,7 +2124,7 @@ function Zr() {
|
|
|
2124
2124
|
end: function() {
|
|
2125
2125
|
F(this);
|
|
2126
2126
|
},
|
|
2127
|
-
write:
|
|
2127
|
+
write: ar,
|
|
2128
2128
|
resume: function() {
|
|
2129
2129
|
return this.error = null, this;
|
|
2130
2130
|
},
|
|
@@ -2580,7 +2580,7 @@ Char: ` + u.c), n = new Error(n), u.error = n, A(u, "onerror", n), u;
|
|
|
2580
2580
|
throw new Error("bad call to strictFail");
|
|
2581
2581
|
u.strict && j(u, n);
|
|
2582
2582
|
}
|
|
2583
|
-
function
|
|
2583
|
+
function sr(u) {
|
|
2584
2584
|
u.strict || (u.tagName = u.tagName[u.looseCase]());
|
|
2585
2585
|
var n = u.tags[u.tags.length - 1] || u, M = u.tag = { name: u.tagName, attributes: {} };
|
|
2586
2586
|
u.opt.xmlns && (M.ns = n.ns), u.attribList.length = 0, _(u, "onopentagstart", M);
|
|
@@ -2633,11 +2633,11 @@ Actual: ` + u.attribValue
|
|
|
2633
2633
|
});
|
|
2634
2634
|
});
|
|
2635
2635
|
for (var q = 0, U = u.attribList.length; q < U; q++) {
|
|
2636
|
-
var k = u.attribList[q], $ = k[0], J = k[1], V = jt($, !0), z = V.prefix,
|
|
2636
|
+
var k = u.attribList[q], $ = k[0], J = k[1], V = jt($, !0), z = V.prefix, cr = V.local, ae = z === "" ? "" : M.ns[z] || "", Ut = {
|
|
2637
2637
|
name: $,
|
|
2638
2638
|
value: J,
|
|
2639
2639
|
prefix: z,
|
|
2640
|
-
local:
|
|
2640
|
+
local: cr,
|
|
2641
2641
|
uri: ae
|
|
2642
2642
|
};
|
|
2643
2643
|
z && z !== "xmlns" && !ae && (S(u, "Unbound namespace prefix: " + JSON.stringify(z)), Ut.uri = z), u.tag.attributes[$] = Ut, _(u, "onattribute", Ut);
|
|
@@ -2686,7 +2686,7 @@ Actual: ` + u.attribValue
|
|
|
2686
2686
|
}
|
|
2687
2687
|
n === 0 && (u.closedRoot = !0), u.tagName = u.attribValue = u.attribName = "", u.attribList.length = 0, u.state = r.TEXT;
|
|
2688
2688
|
}
|
|
2689
|
-
function
|
|
2689
|
+
function ur(u) {
|
|
2690
2690
|
var n = u.entity, M = n.toLowerCase(), w, R = "";
|
|
2691
2691
|
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));
|
|
2692
2692
|
}
|
|
@@ -2697,7 +2697,7 @@ Actual: ` + u.attribValue
|
|
|
2697
2697
|
var M = "";
|
|
2698
2698
|
return n < u.length && (M = u.charAt(n)), M;
|
|
2699
2699
|
}
|
|
2700
|
-
function
|
|
2700
|
+
function ar(u) {
|
|
2701
2701
|
var n = this;
|
|
2702
2702
|
if (this.error)
|
|
2703
2703
|
throw this.error;
|
|
@@ -2810,7 +2810,7 @@ Actual: ` + u.attribValue
|
|
|
2810
2810
|
}), n.procInstName = n.procInstBody = "", n.state = r.TEXT) : (n.procInstBody += "?" + w, n.state = r.PROC_INST_BODY);
|
|
2811
2811
|
continue;
|
|
2812
2812
|
case r.OPEN_TAG:
|
|
2813
|
-
L(P, w) ? n.tagName += w : (
|
|
2813
|
+
L(P, w) ? n.tagName += w : (sr(n), w === ">" ? Z(n) : w === "/" ? n.state = r.OPEN_TAG_SLASH : (c(w) || S(n, "Invalid character in tag name"), n.state = r.ATTRIB));
|
|
2814
2814
|
continue;
|
|
2815
2815
|
case r.OPEN_TAG_SLASH:
|
|
2816
2816
|
w === ">" ? (Z(n, !0), qt(n)) : (S(n, "Forward-slash in opening tag not followed by >"), n.state = r.ATTRIB);
|
|
@@ -2887,7 +2887,7 @@ Actual: ` + u.attribValue
|
|
|
2887
2887
|
break;
|
|
2888
2888
|
}
|
|
2889
2889
|
if (w === ";") {
|
|
2890
|
-
var $ =
|
|
2890
|
+
var $ = ur(n);
|
|
2891
2891
|
n.opt.unparsedEntities && !Object.values(a.XML_ENTITIES).includes($) ? (n.entity = "", n.state = U, n.write($)) : (n[k] += $, n.entity = "", n.state = U);
|
|
2892
2892
|
} 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);
|
|
2893
2893
|
continue;
|
|
@@ -2923,7 +2923,7 @@ Actual: ` + u.attribValue
|
|
|
2923
2923
|
}(Vt)), Vt;
|
|
2924
2924
|
}
|
|
2925
2925
|
var nt = { exports: {} }, Ge;
|
|
2926
|
-
function
|
|
2926
|
+
function tn() {
|
|
2927
2927
|
if (Ge) return nt.exports;
|
|
2928
2928
|
Ge = 1;
|
|
2929
2929
|
var i = typeof Reflect == "object" ? Reflect : null, a = i && typeof i.apply == "function" ? i.apply : function(f, T, L) {
|
|
@@ -3135,7 +3135,7 @@ function Jr() {
|
|
|
3135
3135
|
return nt.exports;
|
|
3136
3136
|
}
|
|
3137
3137
|
var it = {}, Ye;
|
|
3138
|
-
function
|
|
3138
|
+
function en() {
|
|
3139
3139
|
return Ye || (Ye = 1, (function() {
|
|
3140
3140
|
it.stripBOM = function(i) {
|
|
3141
3141
|
return i[0] === "\uFEFF" ? i.substring(1) : i;
|
|
@@ -3143,7 +3143,7 @@ function tn() {
|
|
|
3143
3143
|
}).call(it)), it;
|
|
3144
3144
|
}
|
|
3145
3145
|
var Q = {}, Ke;
|
|
3146
|
-
function
|
|
3146
|
+
function or() {
|
|
3147
3147
|
return Ke || (Ke = 1, (function() {
|
|
3148
3148
|
var i;
|
|
3149
3149
|
i = new RegExp(/(?!xmlns)^.*:/), Q.normalize = function(a) {
|
|
@@ -3160,7 +3160,7 @@ function ir() {
|
|
|
3160
3160
|
}).call(Q)), Q;
|
|
3161
3161
|
}
|
|
3162
3162
|
var ze;
|
|
3163
|
-
function
|
|
3163
|
+
function rn() {
|
|
3164
3164
|
return ze || (ze = 1, function(i) {
|
|
3165
3165
|
(function() {
|
|
3166
3166
|
var a, D, p, h, t, e, o, l, b, m = function(g, O) {
|
|
@@ -3175,7 +3175,7 @@ function en() {
|
|
|
3175
3175
|
}
|
|
3176
3176
|
return x.prototype = O.prototype, g.prototype = new x(), g.__super__ = O.prototype, g;
|
|
3177
3177
|
}, d = {}.hasOwnProperty;
|
|
3178
|
-
l =
|
|
3178
|
+
l = Jr(), h = tn(), a = en(), o = or(), b = kt.setImmediate, D = Wt().defaults, t = function(g) {
|
|
3179
3179
|
return typeof g == "object" && g != null && Object.keys(g).length === 0;
|
|
3180
3180
|
}, e = function(g, O, I) {
|
|
3181
3181
|
var x, P, E;
|
|
@@ -3315,7 +3315,7 @@ function en() {
|
|
|
3315
3315
|
}(rt)), rt;
|
|
3316
3316
|
}
|
|
3317
3317
|
var He;
|
|
3318
|
-
function
|
|
3318
|
+
function nn() {
|
|
3319
3319
|
return He || (He = 1, (function() {
|
|
3320
3320
|
var i, a, D, p, h = function(e, o) {
|
|
3321
3321
|
for (var l in o)
|
|
@@ -3325,7 +3325,7 @@ function rn() {
|
|
|
3325
3325
|
}
|
|
3326
3326
|
return b.prototype = o.prototype, e.prototype = new b(), e.__super__ = o.prototype, e;
|
|
3327
3327
|
}, t = {}.hasOwnProperty;
|
|
3328
|
-
a = Wt(), i =
|
|
3328
|
+
a = Wt(), i = Hr(), D = rn(), p = or(), G.defaults = a.defaults, G.processors = p, G.ValidationError = function(e) {
|
|
3329
3329
|
h(o, e);
|
|
3330
3330
|
function o(l) {
|
|
3331
3331
|
this.message = l;
|
|
@@ -3334,7 +3334,7 @@ function rn() {
|
|
|
3334
3334
|
}(Error), G.Builder = i.Builder, G.Parser = D.Parser, G.parseString = D.parseString, G.parseStringPromise = D.parseStringPromise;
|
|
3335
3335
|
}).call(G)), G;
|
|
3336
3336
|
}
|
|
3337
|
-
var
|
|
3337
|
+
var Qe = nn();
|
|
3338
3338
|
const on = (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), sn = (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(un) && 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(an) && 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(cn) && 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(ln), un = (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), an = (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", cn = (i) => typeof i == "object" && i !== null && i.hasOwnProperty("itunes:email") && Array.isArray(i["itunes:email"]) && i.hasOwnProperty("itunes:name") && Array.isArray(i["itunes:name"]), ln = (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(fn) && 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(pn) && i.hasOwnProperty("content:encoded") && Array.isArray(i["content:encoded"]), fn = (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", pn = (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", hn = (i) => i && i.contents && i.status.http_code == 200, dn = "https://api.allorigins.win/get?url=", $t = typeof document < "u", yn = async (i) => {
|
|
3339
3339
|
try {
|
|
3340
3340
|
const a = $t ? `${dn}${encodeURIComponent(i)}` : i, D = await fetch(a);
|
|
@@ -3342,8 +3342,9 @@ const on = (i) => i !== null && typeof i == "object" && i.hasOwnProperty("rss")
|
|
|
3342
3342
|
} catch {
|
|
3343
3343
|
throw new Error("Error occurred fetching Feed from Substack");
|
|
3344
3344
|
}
|
|
3345
|
-
},
|
|
3346
|
-
|
|
3345
|
+
}, Ze = async (i = "", a) => {
|
|
3346
|
+
if (!a) return Qe.parseStringPromise(i);
|
|
3347
|
+
Qe.parseString(i, a);
|
|
3347
3348
|
}, mn = (i) => ({
|
|
3348
3349
|
title: i.title[0],
|
|
3349
3350
|
description: i.description[0],
|
|
@@ -3352,14 +3353,11 @@ const on = (i) => i !== null && typeof i == "object" && i.hasOwnProperty("rss")
|
|
|
3352
3353
|
content: i["content:encoded"][0]
|
|
3353
3354
|
}), gn = async (i, a) => {
|
|
3354
3355
|
const D = await yn(i);
|
|
3355
|
-
if (
|
|
3356
|
-
|
|
3357
|
-
await Qe(D, a);
|
|
3358
|
-
return;
|
|
3359
|
-
}
|
|
3356
|
+
if (!$t)
|
|
3357
|
+
return Ze(D, a);
|
|
3360
3358
|
if (!hn(D))
|
|
3361
3359
|
throw new Error("Error occurred fetching Feed from Substack");
|
|
3362
|
-
await
|
|
3360
|
+
await Ze(D.contents, a);
|
|
3363
3361
|
}, wn = (i, a) => {
|
|
3364
3362
|
if (!on(i)) throw new Error("Feed is not in the correct format");
|
|
3365
3363
|
try {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
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 a=i.default;if(typeof a=="function"){var D=function p(){return this instanceof p?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};D.prototype=a.prototype}else D={};return Object.defineProperty(D,"__esModule",{value:!0}),Object.keys(i).forEach(function(p){var h=Object.getOwnPropertyDescriptor(i,p);Object.defineProperty(D,p,h.get?h:{enumerable:!0,get:function(){return i[p]}})}),D}var G={},rt={},ae;function qt(){return ae||(ae=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={},ce;function z(){return ce||(ce=1,(function(){var i,a,D,p,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]"},p=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)},a=function(b){return h(b.valueOf)?b.valueOf():b},K.assign=i,K.isFunction=h,K.isObject=t,K.isArray=D,K.isEmpty=p,K.isPlainObject=e,K.getValue=a}).call(K)),K}var it={exports:{}},ur=it.exports,le;function fe(){return le||(le=1,(function(){it.exports=function(){function i(){}return i.prototype.hasFeature=function(a,D){return!0},i.prototype.createDocumentType=function(a,D,p){throw new Error("This DOM method is not implemented.")},i.prototype.createDocument=function(a,D,p){throw new Error("This DOM method is not implemented.")},i.prototype.createHTMLDocument=function(a){throw new Error("This DOM method is not implemented.")},i.prototype.getFeature=function(a,D){throw new Error("This DOM method is not implemented.")},i}()}).call(ur)),it.exports}var ot={exports:{}},st={exports:{}},ut={exports:{}},ar=ut.exports,pe;function cr(){return pe||(pe=1,(function(){ut.exports=function(){function i(){}return i.prototype.handleError=function(a){throw new Error(a)},i}()}).call(ar)),ut.exports}var at={exports:{}},lr=at.exports,he;function fr(){return he||(he=1,(function(){at.exports=function(){function i(a){this.arr=a||[]}return Object.defineProperty(i.prototype,"length",{get:function(){return this.arr.length}}),i.prototype.item=function(a){return this.arr[a]||null},i.prototype.contains=function(a){return this.arr.indexOf(a)!==-1},i}()}).call(lr)),at.exports}var pr=st.exports,de;function hr(){return de||(de=1,(function(){var i,a;i=cr(),a=fr(),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 a(Object.keys(this.defaultParams))}}),D.prototype.getParameter=function(p){return this.params.hasOwnProperty(p)?this.params[p]:null},D.prototype.canSetParameter=function(p,h){return!0},D.prototype.setParameter=function(p,h){return h!=null?this.params[p]=h:delete this.params[p]},D}()}).call(pr)),st.exports}var ct={exports:{}},lt={exports:{}},ft={exports:{}},dr=ft.exports,ye;function B(){return ye||(ye=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(dr)),ft.exports}var pt={exports:{}},yr=pt.exports,me;function ge(){return me||(me=1,(function(){var i;i=B(),W(),pt.exports=function(){function a(D,p,h){if(this.parent=D,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),p==null)throw new Error("Missing attribute name. "+this.debugInfo(p));this.name=this.stringify.name(p),this.value=this.stringify.attValue(h),this.type=i.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(a.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(a.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(a.prototype,"textContent",{get:function(){return this.value},set:function(D){return this.value=D||""}}),Object.defineProperty(a.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(a.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(a.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(a.prototype,"specified",{get:function(){return!0}}),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(D){return this.options.writer.attribute(this,this.options.writer.filterOptions(D))},a.prototype.debugInfo=function(D){return D=D||this.name,D==null?"parent: <"+this.parent.name+">":"attribute: {"+D+"}, parent: <"+this.parent.name+">"},a.prototype.isEqualNode=function(D){return!(D.namespaceURI!==this.namespaceURI||D.prefix!==this.prefix||D.localName!==this.localName||D.value!==this.value)},a}()}).call(yr)),pt.exports}var ht={exports:{}},mr=ht.exports,we;function Ut(){return we||(we=1,(function(){ht.exports=function(){function i(a){this.nodes=a}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(a){return this.nodes[a]},i.prototype.setNamedItem=function(a){var D;return D=this.nodes[a.nodeName],this.nodes[a.nodeName]=a,D||null},i.prototype.removeNamedItem=function(a){var D;return D=this.nodes[a],delete this.nodes[a],D||null},i.prototype.item=function(a){return this.nodes[Object.keys(this.nodes)[a]]||null},i.prototype.getNamedItemNS=function(a,D){throw new Error("This DOM method is not implemented.")},i.prototype.setNamedItemNS=function(a){throw new Error("This DOM method is not implemented.")},i.prototype.removeNamedItemNS=function(a,D){throw new Error("This DOM method is not implemented.")},i}()}).call(mr)),ht.exports}var gr=lt.exports,Te;function Vt(){return Te||(Te=1,(function(){var i,a,D,p,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,p=W(),i=B(),a=ge(),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 a(this,d,""):g!=null&&(this.attribs[d]=new a(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}(p)}).call(gr)),lt.exports}var dt={exports:{}},yt={exports:{}},wr=yt.exports,De;function mt(){return De||(De=1,(function(){var i,a=function(p,h){for(var t in h)D.call(h,t)&&(p[t]=h[t]);function e(){this.constructor=p}return e.prototype=h.prototype,p.prototype=new e,p.__super__=h.prototype,p},D={}.hasOwnProperty;i=W(),yt.exports=function(p){a(h,p);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(wr)),yt.exports}var Tr=dt.exports,Ee;function kt(){return Ee||(Ee=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;i=B(),a=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}(a)}).call(Tr)),dt.exports}var gt={exports:{}},Dr=gt.exports,be;function $t(){return be||(be=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;i=B(),a=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}(a)}).call(Dr)),gt.exports}var wt={exports:{}},Er=wt.exports,Oe;function Wt(){return Oe||(Oe=1,(function(){var i,a,D,p=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,a=W(),i=B(),wt.exports=function(t){p(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}(a)}).call(Er)),wt.exports}var Tt={exports:{}},Dt={exports:{}},br=Dt.exports,Ne;function Gt(){return Ne||(Ne=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;a=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}(a)}).call(br)),Dt.exports}var Et={exports:{}},Or=Et.exports,ve;function Yt(){return ve||(ve=1,(function(){var i,a,D,p=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,a=W(),i=B(),Et.exports=function(t){p(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}(a)}).call(Or)),Et.exports}var bt={exports:{}},Nr=bt.exports,Le;function Kt(){return Le||(Le=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;a=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}(a)}).call(Nr)),bt.exports}var Ot={exports:{}},vr=Ot.exports,Ie;function zt(){return Ie||(Ie=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;a=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}(a)}).call(vr)),Ot.exports}var Lr=Tt.exports,xe;function Ht(){return xe||(xe=1,(function(){var i,a,D,p,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(),a=Gt(),p=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,c;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&&(c=[g,O],O=c[0],g=c[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 a(this,d,g,O,I,x),this.children.push(P),this},y.prototype.entity=function(d,g){var O;return O=new p(this,!1,d,g),this.children.push(O),this},y.prototype.pEntity=function(d,g){var O;return O=new p(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(Lr)),Tt.exports}var Nt={exports:{}},Ir=Nt.exports,Ae;function Qt(){return Ae||(Ae=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;i=B(),a=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}(a)}).call(Ir)),Nt.exports}var vt={exports:{}},xr=vt.exports,Me;function Zt(){return Me||(Me=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;i=B(),a=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}(a)}).call(xr)),vt.exports}var Lt={exports:{}},Ar=Lt.exports,Pe;function Jt(){return Pe||(Pe=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;i=B(),a=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}(a)}).call(Ar)),Lt.exports}var It={exports:{}},Mr=It.exports,_e;function Ce(){return _e||(_e=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;a=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}(a)}).call(Mr)),It.exports}var xt={exports:{}},Pr=xt.exports,Se;function _r(){return Se||(Se=1,(function(){xt.exports=function(){function i(a){this.nodes=a}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(a){return this.nodes[a]||null},i}()}).call(Pr)),xt.exports}var At={exports:{}},Cr=At.exports,Fe;function Sr(){return Fe||(Fe=1,(function(){At.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(Cr)),At.exports}var Fr=ct.exports,Xe;function W(){return Xe||(Xe=1,(function(){var i,a,D,p,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,p=null,h=null,t=null,m=null,y=null,b=null,e=null,a=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(),p=$t(),h=Wt(),t=Ht(),m=Qt(),y=Zt(),b=Jt(),e=Ce(),a=B(),l=_r(),Ut(),i=Sr())}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,c,f,T,L;if(this.nodeType===a.Element||this.nodeType===a.DocumentFragment){for(L="",T=this.children,c=0,f=T.length;c<f;c++)s=T[c],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 c,f,T,L,v;for(this.parent=s,s&&(this.options=s.options,this.stringify=s.stringify),L=this.children,v=[],f=0,T=L.length;f<T;f++)c=L[f],v.push(c.setParent(this));return v},E.prototype.element=function(s,c,f){var T,L,v,r,N,A,_,C,F,j,X;if(A=null,c===null&&f==null&&(F=[{},null],c=F[0],f=F[1]),c==null&&(c={}),c=d(c),I(c)||(j=[c,f],f=j[0],c=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(X=s[N],O(X)&&(X=X.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&N.indexOf(this.stringify.convertAttKey)===0)A=this.attribute(N.substr(this.stringify.convertAttKey.length),X);else if(!this.options.separateArrayItems&&Array.isArray(X)&&g(X))A=this.dummy();else if(I(X)&&g(X))A=this.element(N);else if(!this.options.keepNullNodes&&X==null)A=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(X))for(r=0,C=X.length;r<C;r++)L=X[r],T={},T[N]=L,A=this.element(T);else I(X)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&N.indexOf(this.stringify.convertTextKey)===0?A=this.element(X):(A=this.element(N),A.element(X)):A=this.element(N,X)}else!this.options.keepNullNodes&&f===null?A=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&s.indexOf(this.stringify.convertTextKey)===0?A=this.text(f):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&s.indexOf(this.stringify.convertCDataKey)===0?A=this.cdata(f):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&s.indexOf(this.stringify.convertCommentKey)===0?A=this.comment(f):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&s.indexOf(this.stringify.convertRawKey)===0?A=this.raw(f):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&s.indexOf(this.stringify.convertPIKey)===0?A=this.instruction(s.substr(this.stringify.convertPIKey.length),f):A=this.node(s,c,f);if(A==null)throw new Error("Could not create any elements with: "+s+". "+this.debugInfo());return A},E.prototype.insertBefore=function(s,c,f){var T,L,v,r,N;if(s!=null&&s.type)return v=s,r=c,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,c,f),Array.prototype.push.apply(this.parent.children,N),T},E.prototype.insertAfter=function(s,c,f){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,c,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,c,f){var T,L;return s!=null&&(s=d(s)),c||(c={}),c=d(c),I(c)||(L=[c,f],f=L[0],c=L[1]),T=new o(this,s,c),f!=null&&T.text(f),this.children.push(T),T},E.prototype.text=function(s){var c;return I(s)&&this.element(s),c=new y(this,s),this.children.push(c),this},E.prototype.cdata=function(s){var c;return c=new D(this,s),this.children.push(c),this},E.prototype.comment=function(s){var c;return c=new p(this,s),this.children.push(c),this},E.prototype.commentBefore=function(s){var c,f;return c=this.parent.children.indexOf(this),f=this.parent.children.splice(c),this.parent.comment(s),Array.prototype.push.apply(this.parent.children,f),this},E.prototype.commentAfter=function(s){var c,f;return c=this.parent.children.indexOf(this),f=this.parent.children.splice(c+1),this.parent.comment(s),Array.prototype.push.apply(this.parent.children,f),this},E.prototype.raw=function(s){var c;return c=new m(this,s),this.children.push(c),this},E.prototype.dummy=function(){var s;return s=new e(this),s},E.prototype.instruction=function(s,c){var f,T,L,v,r;if(s!=null&&(s=d(s)),c!=null&&(c=d(c)),Array.isArray(s))for(v=0,r=s.length;v<r;v++)f=s[v],this.instruction(f);else if(I(s))for(f in s)P.call(s,f)&&(T=s[f],this.instruction(f,T));else O(c)&&(c=c.apply()),L=new b(this,s,c),this.children.push(L);return this},E.prototype.instructionBefore=function(s,c){var f,T;return f=this.parent.children.indexOf(this),T=this.parent.children.splice(f),this.parent.instruction(s,c),Array.prototype.push.apply(this.parent.children,T),this},E.prototype.instructionAfter=function(s,c){var f,T;return f=this.parent.children.indexOf(this),T=this.parent.children.splice(f+1),this.parent.instruction(s,c),Array.prototype.push.apply(this.parent.children,T),this},E.prototype.declaration=function(s,c,f){var T,L;return T=this.document(),L=new h(T,s,c,f),T.children.length===0?T.children.unshift(L):T.children[0].type===a.Declaration?T.children[0]=L:T.children.unshift(L),T.root()||T},E.prototype.dtd=function(s,c){var f,T,L,v,r,N,A,_,C,F;for(T=this.document(),L=new t(T,s,c),C=T.children,v=r=0,A=C.length;r<A;v=++r)if(f=C[v],f.type===a.DocType)return T.children[v]=L,L;for(F=T.children,v=N=0,_=F.length;N<_;v=++N)if(f=F[v],f.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===a.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===a.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 c;return c=s.root().clone(),c.parent=this,c.isRoot=!1,this.children.push(c),this},E.prototype.debugInfo=function(s){var c,f;return s=s||this.name,s==null&&!((c=this.parent)!=null&&c.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,c,f){return this.element(s,c,f)},E.prototype.nod=function(s,c,f){return this.node(s,c,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,c){return this.instruction(s,c)},E.prototype.doc=function(){return this.document()},E.prototype.dec=function(s,c,f){return this.declaration(s,c,f)},E.prototype.e=function(s,c,f){return this.element(s,c,f)},E.prototype.n=function(s,c,f){return this.node(s,c,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,c){return this.instruction(s,c)},E.prototype.u=function(){return this.up()},E.prototype.importXMLBuilder=function(s){return this.importDocument(s)},E.prototype.replaceChild=function(s,c){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,c){return!0},E.prototype.hasAttributes=function(){return this.attribs.length!==0},E.prototype.compareDocumentPosition=function(s){var c,f;return c=this,c===s?0:this.document()!==s.document()?(f=i.Disconnected|i.ImplementationSpecific,Math.random()<.5?f|=i.Preceding:f|=i.Following,f):c.isAncestor(s)?i.Contains|i.Preceding:c.isDescendant(s)?i.Contains|i.Following:c.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 c,f,T;if(s.nodeType!==this.nodeType||s.children.length!==this.children.length)return!1;for(c=f=0,T=this.children.length-1;0<=T?f<=T:f>=T;c=0<=T?++f:--f)if(!this.children[c].isEqualNode(s.children[c]))return!1;return!0},E.prototype.getFeature=function(s,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setUserData=function(s,c,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 c,f,T,L,v;for(v=this.children,T=0,L=v.length;T<L;T++)if(c=v[T],s===c||(f=c.isDescendant(s),f))return!0;return!1},E.prototype.isAncestor=function(s){return s.isDescendant(this)},E.prototype.isPreceding=function(s){var c,f;return c=this.treePosition(s),f=this.treePosition(this),c===-1||f===-1?!1:c<f},E.prototype.isFollowing=function(s){var c,f;return c=this.treePosition(s),f=this.treePosition(this),c===-1||f===-1?!1:c>f},E.prototype.treePosition=function(s){var c,f;return f=0,c=!1,this.foreachTreeNode(this.document(),function(T){if(f++,!c&&T===s)return c=!0}),c?f:-1},E.prototype.foreachTreeNode=function(s,c){var f,T,L,v,r;for(s||(s=this.document()),v=s.children,T=0,L=v.length;T<L;T++){if(f=v[T],r=c(f))return r;if(r=this.foreachTreeNode(f,c),r)return r}},E}()}).call(Fr)),ct.exports}var Mt={exports:{}},Xr=Mt.exports,Re;function je(){return Re||(Re=1,(function(){var i=function(D,p){return function(){return D.apply(p,arguments)}},a={}.hasOwnProperty;Mt.exports=function(){function D(p){this.assertLegalName=i(this.assertLegalName,this),this.assertLegalChar=i(this.assertLegalChar,this);var h,t,e;p||(p={}),this.options=p,this.options.version||(this.options.version="1.0"),t=p.stringify||{};for(h in t)a.call(t,h)&&(e=t[h],this[h]=e)}return D.prototype.name=function(p){return this.options.noValidation?p:this.assertLegalName(""+p||"")},D.prototype.text=function(p){return this.options.noValidation?p:this.assertLegalChar(this.textEscape(""+p||""))},D.prototype.cdata=function(p){return this.options.noValidation?p:(p=""+p||"",p=p.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(p))},D.prototype.comment=function(p){if(this.options.noValidation)return p;if(p=""+p||"",p.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+p);return this.assertLegalChar(p)},D.prototype.raw=function(p){return this.options.noValidation?p:""+p||""},D.prototype.attValue=function(p){return this.options.noValidation?p:this.assertLegalChar(this.attEscape(p=""+p||""))},D.prototype.insTarget=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.insValue=function(p){if(this.options.noValidation)return p;if(p=""+p||"",p.match(/\?>/))throw new Error("Invalid processing instruction value: "+p);return this.assertLegalChar(p)},D.prototype.xmlVersion=function(p){if(this.options.noValidation)return p;if(p=""+p||"",!p.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+p);return p},D.prototype.xmlEncoding=function(p){if(this.options.noValidation)return p;if(p=""+p||"",!p.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+p);return this.assertLegalChar(p)},D.prototype.xmlStandalone=function(p){return this.options.noValidation?p:p?"yes":"no"},D.prototype.dtdPubID=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdSysID=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdElementValue=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdAttType=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdAttDefault=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdEntityValue=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdNData=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},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(p){var h,t;if(this.options.noValidation)return p;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=p.match(h))throw new Error("Invalid character in string: "+p+" at index "+t.index)}else if(this.options.version==="1.1"&&(h=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=p.match(h)))throw new Error("Invalid character in string: "+p+" at index "+t.index);return p},D.prototype.assertLegalName=function(p){var h;if(this.options.noValidation)return p;if(this.assertLegalChar(p),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])*$/,!p.match(h))throw new Error("Invalid character in name");return p},D.prototype.textEscape=function(p){var h;return this.options.noValidation?p:(h=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(h,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},D.prototype.attEscape=function(p){var h;return this.options.noValidation?p:(h=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(h,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},D}()}).call(Xr)),Mt.exports}var Pt={exports:{}},_t={exports:{}},Ct={exports:{}},Rr=Ct.exports,Be;function St(){return Be||(Be=1,(function(){Ct.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(Rr)),Ct.exports}var jr=_t.exports,qe;function Ue(){return qe||(qe=1,(function(){var i,a,D,p={}.hasOwnProperty;D=z().assign,i=B(),Wt(),Ht(),kt(),$t(),Vt(),Qt(),Zt(),Jt(),Ce(),Gt(),Kt(),Yt(),zt(),a=St(),_t.exports=function(){function h(t){var e,o,l;t||(t={}),this.options=t,o=t.writer||{};for(e in o)p.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=a.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=a.OpenTag,l=this.indent(t,e,o)+"<![CDATA[",e.state=a.InsideTag,l+=t.value,e.state=a.CloseTag,l+="]]>"+this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.comment=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o)+"<!-- ",e.state=a.InsideTag,l+=t.value,e.state=a.CloseTag,l+=" -->"+this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.declaration=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o)+"<?xml",e.state=a.InsideTag,l+=' version="'+t.version+'"',t.encoding!=null&&(l+=' encoding="'+t.encoding+'"'),t.standalone!=null&&(l+=' standalone="'+t.standalone+'"'),e.state=a.CloseTag,l+=e.spaceBeforeSlash+"?>",l+=this.endline(t,e,o),e.state=a.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=a.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=a.InsideTag,d=t.children,b=0,m=d.length;b<m;b++)l=d[b],y+=this.writeChildNode(l,e,o+1);e.state=a.CloseTag,y+="]"}return e.state=a.CloseTag,y+=e.spaceBeforeSlash+">",y+=this.endline(t,e,o),e.state=a.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,c,f;o||(o=0),P=!1,E="",this.openNode(t,e,o),e.state=a.OpenTag,E+=this.indent(t,e,o)+"<"+t.name,s=t.attribs;for(x in s)p.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=a.CloseTag,E+="</"+t.name+">"+this.endline(t,e,o)):(e.state=a.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=a.InsideTag,e.suppressPrettyCount++,P=!0,E+=this.writeChildNode(y,e,o+1),e.suppressPrettyCount--,P=!1,e.state=a.CloseTag,E+="</"+t.name+">"+this.endline(t,e,o);else{if(e.dontPrettyTextNodes){for(c=t.children,d=0,O=c.length;d<O;d++)if(b=c[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=a.InsideTag,f=t.children,g=0,I=f.length;g<I;g++)b=f[g],E+=this.writeChildNode(b,e,o+1);e.state=a.CloseTag,E+=this.indent(t,e,o)+"</"+t.name+">",P&&e.suppressPrettyCount--,E+=this.endline(t,e,o),e.state=a.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=a.OpenTag,l=this.indent(t,e,o)+"<?",e.state=a.InsideTag,l+=t.target,t.value&&(l+=" "+t.value),e.state=a.CloseTag,l+=e.spaceBeforeSlash+"?>",l+=this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.raw=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o),e.state=a.InsideTag,l+=t.value,e.state=a.CloseTag,l+=this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.text=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o),e.state=a.InsideTag,l+=t.value,e.state=a.CloseTag,l+=this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.dtdAttList=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o)+"<!ATTLIST",e.state=a.InsideTag,l+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,t.defaultValueType!=="#DEFAULT"&&(l+=" "+t.defaultValueType),t.defaultValue&&(l+=' "'+t.defaultValue+'"'),e.state=a.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.dtdElement=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o)+"<!ELEMENT",e.state=a.InsideTag,l+=" "+t.name+" "+t.value,e.state=a.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.dtdEntity=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o)+"<!ENTITY",e.state=a.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=a.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.dtdNotation=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o)+"<!NOTATION",e.state=a.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=a.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=a.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(jr)),_t.exports}var Br=Pt.exports,Ve;function te(){return Ve||(Ve=1,(function(){var i,a=function(p,h){for(var t in h)D.call(h,t)&&(p[t]=h[t]);function e(){this.constructor=p}return e.prototype=h.prototype,p.prototype=new e,p.__super__=h.prototype,p},D={}.hasOwnProperty;i=Ue(),Pt.exports=function(p){a(h,p);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(Br)),Pt.exports}var qr=ot.exports,ke;function $e(){return ke||(ke=1,(function(){var i,a,D,p,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=fe(),a=hr(),p=W(),i=B(),t=je(),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 a,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}(p)}).call(qr)),ot.exports}var Ft={exports:{}},Ur=Ft.exports,We;function Vr(){return We||(We=1,(function(){var i,a,D,p,h,t,e,o,l,b,m,y,d,g,O,I,x,P,E,s,c,f,T,L={}.hasOwnProperty;T=z(),c=T.isObject,s=T.isFunction,f=T.isPlainObject,E=T.getValue,i=B(),y=$e(),d=Vt(),p=kt(),h=$t(),O=Qt(),P=Zt(),g=Jt(),b=Wt(),m=Ht(),t=Gt(),o=Yt(),e=Kt(),l=zt(),D=ge(),x=je(),I=te(),a=St(),Ft.exports=function(){function v(r,N,A){var _;this.name="?xml",this.type=i.Document,r||(r={}),_={},r.writer?f(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,F,j,X,S;switch(r.type){case i.CData:this.cdata(r.value);break;case i.Comment:this.comment(r.value);break;case i.Element:_={},X=r.attribs;for(A in X)L.call(X,A)&&(N=X[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,F=0,j=S.length;F<j;F++)C=S[F],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),c(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,F,j,X,S;if(this.currentNode&&this.currentNode.type===i.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(r)||c(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,X=S.children,C=0,F=X.length;C<F;C++)_=X[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)),c(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 p(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,F,j;if(this.openCurrent(),r!=null&&(r=E(r)),N!=null&&(N=E(N)),Array.isArray(r))for(A=0,F=r.length;A<F;A++)_=r[A],this.instruction(_);else if(c(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 F;return this.openCurrent(),F=new t(this,r,N,A,_,C),this.onData(this.writer.dtdAttList(F,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=a.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=a.InsideTag}else this.writerOptions.state=a.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=a.InsideTag):(this.writerOptions.state=a.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=a.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=a.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(Ur)),Ft.exports}var Xt={exports:{}},kr=Xt.exports,Ge;function $r(){return Ge||(Ge=1,(function(){var i,a,D,p=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=Ue(),a=St(),Xt.exports=function(t){p(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===a.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=a.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=a.InsideTag,g=o.children,y=0,d=g.length;y<d;y++)m=g[y],this.writeChildNode(m,l,b+1);l.state=a.CloseTag,this.stream.write("]")}return l.state=a.CloseTag,this.stream.write(l.spaceBeforeSlash+">"),this.stream.write(this.endline(o,l,b)),l.state=a.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=a.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=a.CloseTag,this.stream.write("</"+o.name+">")):(l.state=a.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=a.InsideTag,l.suppressPrettyCount++,this.writeChildNode(g,l,b+1),l.suppressPrettyCount--,l.state=a.CloseTag,this.stream.write("</"+o.name+">");else{for(this.stream.write(">"+this.endline(o,l,b)),l.state=a.InsideTag,E=o.children,O=0,I=E.length;O<I;O++)y=E[O],this.writeChildNode(y,l,b+1);l.state=a.CloseTag,this.stream.write(this.indent(o,l,b)+"</"+o.name+">")}return this.stream.write(this.endline(o,l,b)),l.state=a.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(kr)),Xt.exports}var Ye;function Wr(){return Ye||(Ye=1,(function(){var i,a,D,p,h,t,e,o,l,b;b=z(),o=b.assign,l=b.isFunction,D=fe(),p=$e(),h=Vr(),e=te(),t=$r(),i=B(),a=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 p(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 p(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=a}).call(Y)),Y}var Ke;function Gr(){return Ke||(Ke=1,(function(){var i,a,D,p,h,t={}.hasOwnProperty;i=Wr(),a=qt().defaults,p=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=a["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===a["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,c,f;if(typeof I!="object")g.options.cdata&&p(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(c in P)E=P[c],O=m(O.ele(c),E).up()}}else for(c in I)if(t.call(I,c))if(P=I[c],c===l){if(typeof P=="object")for(x in P)f=P[x],O=O.att(x,f)}else if(c===b)g.options.cdata&&p(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&&p(E)?O=O.ele(c).raw(h(E)).up():O=O.ele(c,E).up():O=m(O.ele(c),E).up());else typeof P=="object"?O=m(O.ele(c),P).up():typeof P=="string"&&g.options.cdata&&p(P)?O=O.ele(c).raw(h(P)).up():(P==null&&(P=""),O=O.ele(c,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 ze;function Yr(){return ze||(ze=1,function(i){(function(a){a.parser=function(u,n){return new p(u,n)},a.SAXParser=p,a.SAXStream=m,a.createStream=b,a.MAX_BUFFER_LENGTH=64*1024;var D=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];a.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function p(u,n){if(!(this instanceof p))return new p(u,n);var M=this;t(M),M.q=M.c="",M.bufferCheckPosition=a.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(a.XML_ENTITIES):Object.create(a.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(a.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=a.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="")}p.prototype={end:function(){X(this)},write:gn,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=a.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 p(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 c(u){return u===" "||u===`
|
|
2
|
+
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(rt)),rt}var nt={},Y={},K={},ce;function z(){return ce||(ce=1,(function(){var i,a,D,p,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]"},p=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)},a=function(b){return h(b.valueOf)?b.valueOf():b},K.assign=i,K.isFunction=h,K.isObject=t,K.isArray=D,K.isEmpty=p,K.isPlainObject=e,K.getValue=a}).call(K)),K}var it={exports:{}},ar=it.exports,le;function fe(){return le||(le=1,(function(){it.exports=function(){function i(){}return i.prototype.hasFeature=function(a,D){return!0},i.prototype.createDocumentType=function(a,D,p){throw new Error("This DOM method is not implemented.")},i.prototype.createDocument=function(a,D,p){throw new Error("This DOM method is not implemented.")},i.prototype.createHTMLDocument=function(a){throw new Error("This DOM method is not implemented.")},i.prototype.getFeature=function(a,D){throw new Error("This DOM method is not implemented.")},i}()}).call(ar)),it.exports}var ot={exports:{}},st={exports:{}},ut={exports:{}},cr=ut.exports,pe;function lr(){return pe||(pe=1,(function(){ut.exports=function(){function i(){}return i.prototype.handleError=function(a){throw new Error(a)},i}()}).call(cr)),ut.exports}var at={exports:{}},fr=at.exports,he;function pr(){return he||(he=1,(function(){at.exports=function(){function i(a){this.arr=a||[]}return Object.defineProperty(i.prototype,"length",{get:function(){return this.arr.length}}),i.prototype.item=function(a){return this.arr[a]||null},i.prototype.contains=function(a){return this.arr.indexOf(a)!==-1},i}()}).call(fr)),at.exports}var hr=st.exports,de;function dr(){return de||(de=1,(function(){var i,a;i=lr(),a=pr(),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 a(Object.keys(this.defaultParams))}}),D.prototype.getParameter=function(p){return this.params.hasOwnProperty(p)?this.params[p]:null},D.prototype.canSetParameter=function(p,h){return!0},D.prototype.setParameter=function(p,h){return h!=null?this.params[p]=h:delete this.params[p]},D}()}).call(hr)),st.exports}var ct={exports:{}},lt={exports:{}},ft={exports:{}},yr=ft.exports,ye;function B(){return ye||(ye=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(yr)),ft.exports}var pt={exports:{}},mr=pt.exports,me;function ge(){return me||(me=1,(function(){var i;i=B(),W(),pt.exports=function(){function a(D,p,h){if(this.parent=D,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),p==null)throw new Error("Missing attribute name. "+this.debugInfo(p));this.name=this.stringify.name(p),this.value=this.stringify.attValue(h),this.type=i.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(a.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(a.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(a.prototype,"textContent",{get:function(){return this.value},set:function(D){return this.value=D||""}}),Object.defineProperty(a.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(a.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(a.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(a.prototype,"specified",{get:function(){return!0}}),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(D){return this.options.writer.attribute(this,this.options.writer.filterOptions(D))},a.prototype.debugInfo=function(D){return D=D||this.name,D==null?"parent: <"+this.parent.name+">":"attribute: {"+D+"}, parent: <"+this.parent.name+">"},a.prototype.isEqualNode=function(D){return!(D.namespaceURI!==this.namespaceURI||D.prefix!==this.prefix||D.localName!==this.localName||D.value!==this.value)},a}()}).call(mr)),pt.exports}var ht={exports:{}},gr=ht.exports,we;function Ut(){return we||(we=1,(function(){ht.exports=function(){function i(a){this.nodes=a}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(a){return this.nodes[a]},i.prototype.setNamedItem=function(a){var D;return D=this.nodes[a.nodeName],this.nodes[a.nodeName]=a,D||null},i.prototype.removeNamedItem=function(a){var D;return D=this.nodes[a],delete this.nodes[a],D||null},i.prototype.item=function(a){return this.nodes[Object.keys(this.nodes)[a]]||null},i.prototype.getNamedItemNS=function(a,D){throw new Error("This DOM method is not implemented.")},i.prototype.setNamedItemNS=function(a){throw new Error("This DOM method is not implemented.")},i.prototype.removeNamedItemNS=function(a,D){throw new Error("This DOM method is not implemented.")},i}()}).call(gr)),ht.exports}var wr=lt.exports,Te;function Vt(){return Te||(Te=1,(function(){var i,a,D,p,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,p=W(),i=B(),a=ge(),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 a(this,d,""):g!=null&&(this.attribs[d]=new a(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}(p)}).call(wr)),lt.exports}var dt={exports:{}},yt={exports:{}},Tr=yt.exports,De;function mt(){return De||(De=1,(function(){var i,a=function(p,h){for(var t in h)D.call(h,t)&&(p[t]=h[t]);function e(){this.constructor=p}return e.prototype=h.prototype,p.prototype=new e,p.__super__=h.prototype,p},D={}.hasOwnProperty;i=W(),yt.exports=function(p){a(h,p);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(Tr)),yt.exports}var Dr=dt.exports,Ee;function kt(){return Ee||(Ee=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;i=B(),a=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}(a)}).call(Dr)),dt.exports}var gt={exports:{}},Er=gt.exports,be;function $t(){return be||(be=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;i=B(),a=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}(a)}).call(Er)),gt.exports}var wt={exports:{}},br=wt.exports,Oe;function Wt(){return Oe||(Oe=1,(function(){var i,a,D,p=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,a=W(),i=B(),wt.exports=function(t){p(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}(a)}).call(br)),wt.exports}var Tt={exports:{}},Dt={exports:{}},Or=Dt.exports,Ne;function Gt(){return Ne||(Ne=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;a=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}(a)}).call(Or)),Dt.exports}var Et={exports:{}},Nr=Et.exports,ve;function Yt(){return ve||(ve=1,(function(){var i,a,D,p=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,a=W(),i=B(),Et.exports=function(t){p(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}(a)}).call(Nr)),Et.exports}var bt={exports:{}},vr=bt.exports,Le;function Kt(){return Le||(Le=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;a=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}(a)}).call(vr)),bt.exports}var Ot={exports:{}},Lr=Ot.exports,Ie;function zt(){return Ie||(Ie=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;a=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}(a)}).call(Lr)),Ot.exports}var Ir=Tt.exports,xe;function Ht(){return xe||(xe=1,(function(){var i,a,D,p,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(),a=Gt(),p=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,c;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&&(c=[g,O],O=c[0],g=c[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 a(this,d,g,O,I,x),this.children.push(P),this},y.prototype.entity=function(d,g){var O;return O=new p(this,!1,d,g),this.children.push(O),this},y.prototype.pEntity=function(d,g){var O;return O=new p(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(Ir)),Tt.exports}var Nt={exports:{}},xr=Nt.exports,Ae;function Qt(){return Ae||(Ae=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;i=B(),a=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}(a)}).call(xr)),Nt.exports}var vt={exports:{}},Ar=vt.exports,Me;function Zt(){return Me||(Me=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;i=B(),a=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}(a)}).call(Ar)),vt.exports}var Lt={exports:{}},Mr=Lt.exports,Pe;function Jt(){return Pe||(Pe=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;i=B(),a=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}(a)}).call(Mr)),Lt.exports}var It={exports:{}},Pr=It.exports,_e;function Ce(){return _e||(_e=1,(function(){var i,a,D=function(h,t){for(var e in t)p.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},p={}.hasOwnProperty;a=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}(a)}).call(Pr)),It.exports}var xt={exports:{}},_r=xt.exports,Se;function Cr(){return Se||(Se=1,(function(){xt.exports=function(){function i(a){this.nodes=a}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(a){return this.nodes[a]||null},i}()}).call(_r)),xt.exports}var At={exports:{}},Sr=At.exports,Fe;function Fr(){return Fe||(Fe=1,(function(){At.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(Sr)),At.exports}var Xr=ct.exports,Xe;function W(){return Xe||(Xe=1,(function(){var i,a,D,p,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,p=null,h=null,t=null,m=null,y=null,b=null,e=null,a=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(),p=$t(),h=Wt(),t=Ht(),m=Qt(),y=Zt(),b=Jt(),e=Ce(),a=B(),l=Cr(),Ut(),i=Fr())}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,c,f,T,L;if(this.nodeType===a.Element||this.nodeType===a.DocumentFragment){for(L="",T=this.children,c=0,f=T.length;c<f;c++)s=T[c],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 c,f,T,L,v;for(this.parent=s,s&&(this.options=s.options,this.stringify=s.stringify),L=this.children,v=[],f=0,T=L.length;f<T;f++)c=L[f],v.push(c.setParent(this));return v},E.prototype.element=function(s,c,f){var T,L,v,r,N,A,_,C,F,j,X;if(A=null,c===null&&f==null&&(F=[{},null],c=F[0],f=F[1]),c==null&&(c={}),c=d(c),I(c)||(j=[c,f],f=j[0],c=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(X=s[N],O(X)&&(X=X.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&N.indexOf(this.stringify.convertAttKey)===0)A=this.attribute(N.substr(this.stringify.convertAttKey.length),X);else if(!this.options.separateArrayItems&&Array.isArray(X)&&g(X))A=this.dummy();else if(I(X)&&g(X))A=this.element(N);else if(!this.options.keepNullNodes&&X==null)A=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(X))for(r=0,C=X.length;r<C;r++)L=X[r],T={},T[N]=L,A=this.element(T);else I(X)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&N.indexOf(this.stringify.convertTextKey)===0?A=this.element(X):(A=this.element(N),A.element(X)):A=this.element(N,X)}else!this.options.keepNullNodes&&f===null?A=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&s.indexOf(this.stringify.convertTextKey)===0?A=this.text(f):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&s.indexOf(this.stringify.convertCDataKey)===0?A=this.cdata(f):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&s.indexOf(this.stringify.convertCommentKey)===0?A=this.comment(f):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&s.indexOf(this.stringify.convertRawKey)===0?A=this.raw(f):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&s.indexOf(this.stringify.convertPIKey)===0?A=this.instruction(s.substr(this.stringify.convertPIKey.length),f):A=this.node(s,c,f);if(A==null)throw new Error("Could not create any elements with: "+s+". "+this.debugInfo());return A},E.prototype.insertBefore=function(s,c,f){var T,L,v,r,N;if(s!=null&&s.type)return v=s,r=c,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,c,f),Array.prototype.push.apply(this.parent.children,N),T},E.prototype.insertAfter=function(s,c,f){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,c,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,c,f){var T,L;return s!=null&&(s=d(s)),c||(c={}),c=d(c),I(c)||(L=[c,f],f=L[0],c=L[1]),T=new o(this,s,c),f!=null&&T.text(f),this.children.push(T),T},E.prototype.text=function(s){var c;return I(s)&&this.element(s),c=new y(this,s),this.children.push(c),this},E.prototype.cdata=function(s){var c;return c=new D(this,s),this.children.push(c),this},E.prototype.comment=function(s){var c;return c=new p(this,s),this.children.push(c),this},E.prototype.commentBefore=function(s){var c,f;return c=this.parent.children.indexOf(this),f=this.parent.children.splice(c),this.parent.comment(s),Array.prototype.push.apply(this.parent.children,f),this},E.prototype.commentAfter=function(s){var c,f;return c=this.parent.children.indexOf(this),f=this.parent.children.splice(c+1),this.parent.comment(s),Array.prototype.push.apply(this.parent.children,f),this},E.prototype.raw=function(s){var c;return c=new m(this,s),this.children.push(c),this},E.prototype.dummy=function(){var s;return s=new e(this),s},E.prototype.instruction=function(s,c){var f,T,L,v,r;if(s!=null&&(s=d(s)),c!=null&&(c=d(c)),Array.isArray(s))for(v=0,r=s.length;v<r;v++)f=s[v],this.instruction(f);else if(I(s))for(f in s)P.call(s,f)&&(T=s[f],this.instruction(f,T));else O(c)&&(c=c.apply()),L=new b(this,s,c),this.children.push(L);return this},E.prototype.instructionBefore=function(s,c){var f,T;return f=this.parent.children.indexOf(this),T=this.parent.children.splice(f),this.parent.instruction(s,c),Array.prototype.push.apply(this.parent.children,T),this},E.prototype.instructionAfter=function(s,c){var f,T;return f=this.parent.children.indexOf(this),T=this.parent.children.splice(f+1),this.parent.instruction(s,c),Array.prototype.push.apply(this.parent.children,T),this},E.prototype.declaration=function(s,c,f){var T,L;return T=this.document(),L=new h(T,s,c,f),T.children.length===0?T.children.unshift(L):T.children[0].type===a.Declaration?T.children[0]=L:T.children.unshift(L),T.root()||T},E.prototype.dtd=function(s,c){var f,T,L,v,r,N,A,_,C,F;for(T=this.document(),L=new t(T,s,c),C=T.children,v=r=0,A=C.length;r<A;v=++r)if(f=C[v],f.type===a.DocType)return T.children[v]=L,L;for(F=T.children,v=N=0,_=F.length;N<_;v=++N)if(f=F[v],f.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===a.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===a.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 c;return c=s.root().clone(),c.parent=this,c.isRoot=!1,this.children.push(c),this},E.prototype.debugInfo=function(s){var c,f;return s=s||this.name,s==null&&!((c=this.parent)!=null&&c.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,c,f){return this.element(s,c,f)},E.prototype.nod=function(s,c,f){return this.node(s,c,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,c){return this.instruction(s,c)},E.prototype.doc=function(){return this.document()},E.prototype.dec=function(s,c,f){return this.declaration(s,c,f)},E.prototype.e=function(s,c,f){return this.element(s,c,f)},E.prototype.n=function(s,c,f){return this.node(s,c,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,c){return this.instruction(s,c)},E.prototype.u=function(){return this.up()},E.prototype.importXMLBuilder=function(s){return this.importDocument(s)},E.prototype.replaceChild=function(s,c){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,c){return!0},E.prototype.hasAttributes=function(){return this.attribs.length!==0},E.prototype.compareDocumentPosition=function(s){var c,f;return c=this,c===s?0:this.document()!==s.document()?(f=i.Disconnected|i.ImplementationSpecific,Math.random()<.5?f|=i.Preceding:f|=i.Following,f):c.isAncestor(s)?i.Contains|i.Preceding:c.isDescendant(s)?i.Contains|i.Following:c.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 c,f,T;if(s.nodeType!==this.nodeType||s.children.length!==this.children.length)return!1;for(c=f=0,T=this.children.length-1;0<=T?f<=T:f>=T;c=0<=T?++f:--f)if(!this.children[c].isEqualNode(s.children[c]))return!1;return!0},E.prototype.getFeature=function(s,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setUserData=function(s,c,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 c,f,T,L,v;for(v=this.children,T=0,L=v.length;T<L;T++)if(c=v[T],s===c||(f=c.isDescendant(s),f))return!0;return!1},E.prototype.isAncestor=function(s){return s.isDescendant(this)},E.prototype.isPreceding=function(s){var c,f;return c=this.treePosition(s),f=this.treePosition(this),c===-1||f===-1?!1:c<f},E.prototype.isFollowing=function(s){var c,f;return c=this.treePosition(s),f=this.treePosition(this),c===-1||f===-1?!1:c>f},E.prototype.treePosition=function(s){var c,f;return f=0,c=!1,this.foreachTreeNode(this.document(),function(T){if(f++,!c&&T===s)return c=!0}),c?f:-1},E.prototype.foreachTreeNode=function(s,c){var f,T,L,v,r;for(s||(s=this.document()),v=s.children,T=0,L=v.length;T<L;T++){if(f=v[T],r=c(f))return r;if(r=this.foreachTreeNode(f,c),r)return r}},E}()}).call(Xr)),ct.exports}var Mt={exports:{}},Rr=Mt.exports,Re;function je(){return Re||(Re=1,(function(){var i=function(D,p){return function(){return D.apply(p,arguments)}},a={}.hasOwnProperty;Mt.exports=function(){function D(p){this.assertLegalName=i(this.assertLegalName,this),this.assertLegalChar=i(this.assertLegalChar,this);var h,t,e;p||(p={}),this.options=p,this.options.version||(this.options.version="1.0"),t=p.stringify||{};for(h in t)a.call(t,h)&&(e=t[h],this[h]=e)}return D.prototype.name=function(p){return this.options.noValidation?p:this.assertLegalName(""+p||"")},D.prototype.text=function(p){return this.options.noValidation?p:this.assertLegalChar(this.textEscape(""+p||""))},D.prototype.cdata=function(p){return this.options.noValidation?p:(p=""+p||"",p=p.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(p))},D.prototype.comment=function(p){if(this.options.noValidation)return p;if(p=""+p||"",p.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+p);return this.assertLegalChar(p)},D.prototype.raw=function(p){return this.options.noValidation?p:""+p||""},D.prototype.attValue=function(p){return this.options.noValidation?p:this.assertLegalChar(this.attEscape(p=""+p||""))},D.prototype.insTarget=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.insValue=function(p){if(this.options.noValidation)return p;if(p=""+p||"",p.match(/\?>/))throw new Error("Invalid processing instruction value: "+p);return this.assertLegalChar(p)},D.prototype.xmlVersion=function(p){if(this.options.noValidation)return p;if(p=""+p||"",!p.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+p);return p},D.prototype.xmlEncoding=function(p){if(this.options.noValidation)return p;if(p=""+p||"",!p.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+p);return this.assertLegalChar(p)},D.prototype.xmlStandalone=function(p){return this.options.noValidation?p:p?"yes":"no"},D.prototype.dtdPubID=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdSysID=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdElementValue=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdAttType=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdAttDefault=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdEntityValue=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdNData=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},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(p){var h,t;if(this.options.noValidation)return p;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=p.match(h))throw new Error("Invalid character in string: "+p+" at index "+t.index)}else if(this.options.version==="1.1"&&(h=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=p.match(h)))throw new Error("Invalid character in string: "+p+" at index "+t.index);return p},D.prototype.assertLegalName=function(p){var h;if(this.options.noValidation)return p;if(this.assertLegalChar(p),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])*$/,!p.match(h))throw new Error("Invalid character in name");return p},D.prototype.textEscape=function(p){var h;return this.options.noValidation?p:(h=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(h,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},D.prototype.attEscape=function(p){var h;return this.options.noValidation?p:(h=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(h,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},D}()}).call(Rr)),Mt.exports}var Pt={exports:{}},_t={exports:{}},Ct={exports:{}},jr=Ct.exports,Be;function St(){return Be||(Be=1,(function(){Ct.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(jr)),Ct.exports}var Br=_t.exports,qe;function Ue(){return qe||(qe=1,(function(){var i,a,D,p={}.hasOwnProperty;D=z().assign,i=B(),Wt(),Ht(),kt(),$t(),Vt(),Qt(),Zt(),Jt(),Ce(),Gt(),Kt(),Yt(),zt(),a=St(),_t.exports=function(){function h(t){var e,o,l;t||(t={}),this.options=t,o=t.writer||{};for(e in o)p.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=a.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=a.OpenTag,l=this.indent(t,e,o)+"<![CDATA[",e.state=a.InsideTag,l+=t.value,e.state=a.CloseTag,l+="]]>"+this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.comment=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o)+"<!-- ",e.state=a.InsideTag,l+=t.value,e.state=a.CloseTag,l+=" -->"+this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.declaration=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o)+"<?xml",e.state=a.InsideTag,l+=' version="'+t.version+'"',t.encoding!=null&&(l+=' encoding="'+t.encoding+'"'),t.standalone!=null&&(l+=' standalone="'+t.standalone+'"'),e.state=a.CloseTag,l+=e.spaceBeforeSlash+"?>",l+=this.endline(t,e,o),e.state=a.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=a.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=a.InsideTag,d=t.children,b=0,m=d.length;b<m;b++)l=d[b],y+=this.writeChildNode(l,e,o+1);e.state=a.CloseTag,y+="]"}return e.state=a.CloseTag,y+=e.spaceBeforeSlash+">",y+=this.endline(t,e,o),e.state=a.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,c,f;o||(o=0),P=!1,E="",this.openNode(t,e,o),e.state=a.OpenTag,E+=this.indent(t,e,o)+"<"+t.name,s=t.attribs;for(x in s)p.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=a.CloseTag,E+="</"+t.name+">"+this.endline(t,e,o)):(e.state=a.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=a.InsideTag,e.suppressPrettyCount++,P=!0,E+=this.writeChildNode(y,e,o+1),e.suppressPrettyCount--,P=!1,e.state=a.CloseTag,E+="</"+t.name+">"+this.endline(t,e,o);else{if(e.dontPrettyTextNodes){for(c=t.children,d=0,O=c.length;d<O;d++)if(b=c[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=a.InsideTag,f=t.children,g=0,I=f.length;g<I;g++)b=f[g],E+=this.writeChildNode(b,e,o+1);e.state=a.CloseTag,E+=this.indent(t,e,o)+"</"+t.name+">",P&&e.suppressPrettyCount--,E+=this.endline(t,e,o),e.state=a.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=a.OpenTag,l=this.indent(t,e,o)+"<?",e.state=a.InsideTag,l+=t.target,t.value&&(l+=" "+t.value),e.state=a.CloseTag,l+=e.spaceBeforeSlash+"?>",l+=this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.raw=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o),e.state=a.InsideTag,l+=t.value,e.state=a.CloseTag,l+=this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.text=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o),e.state=a.InsideTag,l+=t.value,e.state=a.CloseTag,l+=this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.dtdAttList=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o)+"<!ATTLIST",e.state=a.InsideTag,l+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,t.defaultValueType!=="#DEFAULT"&&(l+=" "+t.defaultValueType),t.defaultValue&&(l+=' "'+t.defaultValue+'"'),e.state=a.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.dtdElement=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o)+"<!ELEMENT",e.state=a.InsideTag,l+=" "+t.name+" "+t.value,e.state=a.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.dtdEntity=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o)+"<!ENTITY",e.state=a.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=a.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=a.None,this.closeNode(t,e,o),l},h.prototype.dtdNotation=function(t,e,o){var l;return this.openNode(t,e,o),e.state=a.OpenTag,l=this.indent(t,e,o)+"<!NOTATION",e.state=a.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=a.CloseTag,l+=e.spaceBeforeSlash+">"+this.endline(t,e,o),e.state=a.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(Br)),_t.exports}var qr=Pt.exports,Ve;function te(){return Ve||(Ve=1,(function(){var i,a=function(p,h){for(var t in h)D.call(h,t)&&(p[t]=h[t]);function e(){this.constructor=p}return e.prototype=h.prototype,p.prototype=new e,p.__super__=h.prototype,p},D={}.hasOwnProperty;i=Ue(),Pt.exports=function(p){a(h,p);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(qr)),Pt.exports}var Ur=ot.exports,ke;function $e(){return ke||(ke=1,(function(){var i,a,D,p,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=fe(),a=dr(),p=W(),i=B(),t=je(),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 a,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}(p)}).call(Ur)),ot.exports}var Ft={exports:{}},Vr=Ft.exports,We;function kr(){return We||(We=1,(function(){var i,a,D,p,h,t,e,o,l,b,m,y,d,g,O,I,x,P,E,s,c,f,T,L={}.hasOwnProperty;T=z(),c=T.isObject,s=T.isFunction,f=T.isPlainObject,E=T.getValue,i=B(),y=$e(),d=Vt(),p=kt(),h=$t(),O=Qt(),P=Zt(),g=Jt(),b=Wt(),m=Ht(),t=Gt(),o=Yt(),e=Kt(),l=zt(),D=ge(),x=je(),I=te(),a=St(),Ft.exports=function(){function v(r,N,A){var _;this.name="?xml",this.type=i.Document,r||(r={}),_={},r.writer?f(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,F,j,X,S;switch(r.type){case i.CData:this.cdata(r.value);break;case i.Comment:this.comment(r.value);break;case i.Element:_={},X=r.attribs;for(A in X)L.call(X,A)&&(N=X[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,F=0,j=S.length;F<j;F++)C=S[F],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),c(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,F,j,X,S;if(this.currentNode&&this.currentNode.type===i.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(r)||c(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,X=S.children,C=0,F=X.length;C<F;C++)_=X[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)),c(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 p(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,F,j;if(this.openCurrent(),r!=null&&(r=E(r)),N!=null&&(N=E(N)),Array.isArray(r))for(A=0,F=r.length;A<F;A++)_=r[A],this.instruction(_);else if(c(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 F;return this.openCurrent(),F=new t(this,r,N,A,_,C),this.onData(this.writer.dtdAttList(F,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=a.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=a.InsideTag}else this.writerOptions.state=a.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=a.InsideTag):(this.writerOptions.state=a.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=a.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=a.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(Vr)),Ft.exports}var Xt={exports:{}},$r=Xt.exports,Ge;function Wr(){return Ge||(Ge=1,(function(){var i,a,D,p=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=Ue(),a=St(),Xt.exports=function(t){p(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===a.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=a.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=a.InsideTag,g=o.children,y=0,d=g.length;y<d;y++)m=g[y],this.writeChildNode(m,l,b+1);l.state=a.CloseTag,this.stream.write("]")}return l.state=a.CloseTag,this.stream.write(l.spaceBeforeSlash+">"),this.stream.write(this.endline(o,l,b)),l.state=a.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=a.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=a.CloseTag,this.stream.write("</"+o.name+">")):(l.state=a.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=a.InsideTag,l.suppressPrettyCount++,this.writeChildNode(g,l,b+1),l.suppressPrettyCount--,l.state=a.CloseTag,this.stream.write("</"+o.name+">");else{for(this.stream.write(">"+this.endline(o,l,b)),l.state=a.InsideTag,E=o.children,O=0,I=E.length;O<I;O++)y=E[O],this.writeChildNode(y,l,b+1);l.state=a.CloseTag,this.stream.write(this.indent(o,l,b)+"</"+o.name+">")}return this.stream.write(this.endline(o,l,b)),l.state=a.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($r)),Xt.exports}var Ye;function Gr(){return Ye||(Ye=1,(function(){var i,a,D,p,h,t,e,o,l,b;b=z(),o=b.assign,l=b.isFunction,D=fe(),p=$e(),h=kr(),e=te(),t=Wr(),i=B(),a=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 p(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 p(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=a}).call(Y)),Y}var Ke;function Yr(){return Ke||(Ke=1,(function(){var i,a,D,p,h,t={}.hasOwnProperty;i=Gr(),a=qt().defaults,p=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=a["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===a["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,c,f;if(typeof I!="object")g.options.cdata&&p(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(c in P)E=P[c],O=m(O.ele(c),E).up()}}else for(c in I)if(t.call(I,c))if(P=I[c],c===l){if(typeof P=="object")for(x in P)f=P[x],O=O.att(x,f)}else if(c===b)g.options.cdata&&p(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&&p(E)?O=O.ele(c).raw(h(E)).up():O=O.ele(c,E).up():O=m(O.ele(c),E).up());else typeof P=="object"?O=m(O.ele(c),P).up():typeof P=="string"&&g.options.cdata&&p(P)?O=O.ele(c).raw(h(P)).up():(P==null&&(P=""),O=O.ele(c,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 ze;function Kr(){return ze||(ze=1,function(i){(function(a){a.parser=function(u,n){return new p(u,n)},a.SAXParser=p,a.SAXStream=m,a.createStream=b,a.MAX_BUFFER_LENGTH=64*1024;var D=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];a.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function p(u,n){if(!(this instanceof p))return new p(u,n);var M=this;t(M),M.q=M.c="",M.bufferCheckPosition=a.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(a.XML_ENTITIES):Object.create(a.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(a.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=a.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="")}p.prototype={end:function(){X(this)},write:gn,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=a.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 p(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 c(u){return u===" "||u===`
|
|
4
4
|
`||u==="\r"||u===" "}function f(u){return u==='"'||u==="'"}function T(u){return u===">"||c(u)}function L(u,n){return u.test(n)}function v(u,n){return!L(u,n)}var r=0;a.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++},a.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},a.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(a.ENTITIES).forEach(function(u){var n=a.ENTITIES[u],M=typeof n=="number"?String.fromCharCode(n):n;a.ENTITIES[u]=M});for(var N in a.STATE)a.STATE[a.STATE[N]]=N;r=a.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=F(u.opt,u.textNode),u.textNode&&A(u,"ontext",u.textNode),u.textNode=""}function F(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
7
|
Char: `+u.c),n=new Error(n),u.error=n,A(u,"onerror",n),u}function X(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"),p.call(u,u.strict,u.opt),u}function S(u,n){if(typeof u!="object"||!(u instanceof p))throw new Error("bad call to strictFail");u.strict&&j(u,n)}function yn(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 ie(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 oe(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=ie(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
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=ie(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(
|
|
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(R,M-1)}w==="<"&&!(n.sawRoot&&n.closedRoot&&!n.strict)?(n.state=r.OPEN_WAKA,n.startTagPosition=n.position):(!c(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(!c(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):(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,_(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=F(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:c(w)?n.state=r.PROC_INST_BODY:n.procInstName+=w;continue;case r.PROC_INST_BODY:if(!n.procInstBody&&c(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:(yn(n),w===">"?J(n):w==="/"?n.state=r.OPEN_TAG_SLASH:(c(w)||S(n,"Invalid character in tag name"),n.state=r.ATTRIB));continue;case r.OPEN_TAG_SLASH:w===">"?(J(n,!0),se(n)):(S(n,"Forward-slash in opening tag not followed by >"),n.state=r.ATTRIB);continue;case r.ATTRIB:if(c(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,oe(n),J(n)):c(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(c(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(c(w))continue;f(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}oe(n),n.q="",n.state=r.ATTRIB_VALUE_CLOSED;continue;case r.ATTRIB_VALUE_CLOSED:c(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}oe(n),w===">"?J(n):n.state=r.ATTRIB;continue;case r.CLOSE_TAG:if(n.tagName)w===">"?se(n):L(P,w)?n.tagName+=w:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=r.SCRIPT):(c(w)||S(n,"Invalid tagname in closing tag"),n.state=r.CLOSE_TAG_SAW_WHITE);else{if(c(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(c(w))continue;w===">"?se(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 $=mn(n);n.opt.unparsedEntities&&!Object.values(a.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:{}},He;function Kr(){if(He)return jt.exports;He=1;var i=typeof Reflect=="object"?Reflect:null,a=i&&typeof i.apply=="function"?i.apply:function(f,T,L){return Function.prototype.apply.call(f,T,L)},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 p(c){console&&console.warn&&console.warn(c)}var h=Number.isNaN||function(f){return f!==f};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(c){if(typeof c!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof c)}Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return e},set:function(c){if(typeof c!="number"||c<0||h(c))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+c+".");e=c}}),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||h(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(c){return c._maxListeners===void 0?t.defaultMaxListeners:c._maxListeners}t.prototype.getMaxListeners=function(){return l(this)},t.prototype.emit=function(f){for(var T=[],L=1;L<arguments.length;L++)T.push(arguments[L]);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 A=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw A.context=N,A}var _=r[f];if(_===void 0)return!1;if(typeof _=="function")a(_,this,T);else for(var C=_.length,F=O(_,C),L=0;L<C;++L)a(F[L],this,T);return!0};function b(c,f,T,L){var v,r,N;if(o(T),r=c._events,r===void 0?(r=c._events=Object.create(null),c._eventsCount=0):(r.newListener!==void 0&&(c.emit("newListener",f,T.listener?T.listener:T),r=c._events),N=r[f]),N===void 0)N=r[f]=T,++c._eventsCount;else if(typeof N=="function"?N=r[f]=L?[T,N]:[N,T]:L?N.unshift(T):N.push(T),v=l(c),v>0&&N.length>v&&!N.warned){N.warned=!0;var A=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(f)+" listeners added. Use emitter.setMaxListeners() to increase limit");A.name="MaxListenersExceededWarning",A.emitter=c,A.type=f,A.count=N.length,p(A)}return c}t.prototype.addListener=function(f,T){return b(this,f,T,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(f,T){return b(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(c,f,T){var L={fired:!1,wrapFn:void 0,target:c,type:f,listener:T},v=m.bind(L);return v.listener=T,L.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 L,v,r,N,A;if(o(T),v=this._events,v===void 0)return this;if(L=v[f],L===void 0)return this;if(L===T||L.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete v[f],v.removeListener&&this.emit("removeListener",f,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[f]=L[0]),v.removeListener!==void 0&&this.emit("removeListener",f,A||T)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(f){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[f]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete L[f]),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[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(c,f,T){var L=c._events;if(L===void 0)return[];var v=L[f];return v===void 0?[]:typeof v=="function"?T?[v.listener||v]:[v]:T?x(v):O(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(c,f){return typeof c.listenerCount=="function"?c.listenerCount(f):g.call(c,f)},t.prototype.listenerCount=g;function g(c){var f=this._events;if(f!==void 0){var T=f[c];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(c,f){for(var T=new Array(f),L=0;L<f;++L)T[L]=c[L];return T}function I(c,f){for(;f+1<c.length;f++)c[f]=c[f+1];c.pop()}function x(c){for(var f=new Array(c.length),T=0;T<f.length;++T)f[T]=c[T].listener||c[T];return f}function P(c,f){return new Promise(function(T,L){function v(N){c.removeListener(f,r),L(N)}function r(){typeof c.removeListener=="function"&&c.removeListener("error",v),T([].slice.call(arguments))}s(c,f,r,{once:!0}),f!=="error"&&E(c,v,{once:!0})})}function E(c,f,T){typeof c.on=="function"&&s(c,"error",f,T)}function s(c,f,T,L){if(typeof c.on=="function")L.once?c.once(f,T):c.on(f,T);else if(typeof c.addEventListener=="function")c.addEventListener(f,function v(r){L.once&&c.removeEventListener(f,v),T(r)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof c)}return jt.exports}var Bt={},Qe;function zr(){return Qe||(Qe=1,(function(){Bt.stripBOM=function(i){return i[0]==="\uFEFF"?i.substring(1):i}}).call(Bt)),Bt}var Z={},Ze;function Je(){return Ze||(Ze=1,(function(){var i;i=new RegExp(/(?!xmlns)^.*:/),Z.normalize=function(a){return a.toLowerCase()},Z.firstCharLowerCase=function(a){return a.charAt(0).toLowerCase()+a.slice(1)},Z.stripPrefix=function(a){return a.replace(i,"")},Z.parseNumbers=function(a){return isNaN(a)||(a=a%1===0?parseInt(a,10):parseFloat(a)),a},Z.parseBooleans=function(a){return/^(?:true|false)$/i.test(a)&&(a=a.toLowerCase()==="true"),a}}).call(Z)),Z}var tr;function Hr(){return tr||(tr=1,function(i){(function(){var a,D,p,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=Yr(),h=Kr(),a=zr(),o=Je(),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},p=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||p(I,x,[I[x]]),I[x].push(P)):this.options.explicitArray?p(I,x,[P]):p(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(c){if(s.saxParser.resume(),!s.saxParser.errThrown)return s.saxParser.errThrown=!0,s.emit("error",c)}}(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(c){var f,T,L,v,r;if(L={},L[x]="",!s.options.ignoreAttrs){r=c.attributes;for(f in r)d.call(r,f)&&(!(I in L)&&!s.options.mergeAttrs&&(L[I]={}),T=s.options.attrValueProcessors?e(s.options.attrValueProcessors,c.attributes[f],f):c.attributes[f],v=s.options.attrNameProcessors?e(s.options.attrNameProcessors,f):f,s.options.mergeAttrs?s.assignOrPush(L,v,T):p(L[I],v,T))}return L["#name"]=s.options.tagNameProcessors?e(s.options.tagNameProcessors,c.name):c.name,s.options.xmlns&&(L[s.options.xmlnskey]={uri:c.uri,local:c.local}),E.push(L)}}(this),this.saxParser.onclosetag=function(s){return function(){var c,f,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&&(c=r.cdata,delete r.cdata),_=E[E.length-1],r[x].match(/^\s*$/)&&!c?(f=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:f),s.options.validator!=null&&(C="/"+function(){var F,j,X;for(X=[],F=0,j=E.length;F<j;F++)L=E[F],X.push(L["#name"]);return X}().concat(v).join("/"),function(){var F;try{return r=s.options.validator(C,_&&_[v],r)}catch(j){return F=j,s.emit("error",F)}}()),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)&&p(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={},p(r,v,A)),s.resultObject=r,s.saxParser.ended=!0,s.emit("end",s.resultObject))}}(this),P=function(s){return function(c){var f,T;if(T=E[E.length-1],T)return T[x]+=c,s.options.explicitChildren&&s.options.preserveChildrenOrder&&s.options.charsAsChildren&&(s.options.includeWhiteChars||c.replace(/\\n/g,"").trim()!=="")&&(T[s.options.childkey]=T[s.options.childkey]||[],f={"#name":"__text__"},f[x]=c,s.options.normalize&&(f[x]=f[x].replace(/\s{2,}/g," ").trim()),T[s.options.childkey].push(f)),T}}(this),this.saxParser.ontext=P,this.saxParser.oncdata=function(s){return function(c){var f;if(f=P(c),f)return f.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=a.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,c){return s?E(s):P(c)})}}(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 er;function Qr(){return er||(er=1,(function(){var i,a,D,p,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;a=qt(),i=Gr(),D=Hr(),p=Je(),G.defaults=a.defaults,G.processors=p,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 Zr=Qr();const Jr=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),tn=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(en)&&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(rn)&&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(nn)&&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(on),en=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),rn=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",nn=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("itunes:email")&&Array.isArray(i["itunes:email"])&&i.hasOwnProperty("itunes:name")&&Array.isArray(i["itunes:name"]),on=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(sn)&&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(un)&&i.hasOwnProperty("content:encoded")&&Array.isArray(i["content:encoded"]),sn=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",un=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",an=i=>i&&i.contents&&i.status.http_code==200,cn="https://api.allorigins.win/get?url=",ne=typeof document<"u",ln=async i=>{try{const a=ne?`${cn}${encodeURIComponent(i)}`:i,D=await fetch(a);if(D.ok)return ne?D.json():D.text()}catch{throw new Error("Error occurred fetching Feed from Substack")}},rr=async(i="",a)=>{Zr.parseString(i,a)},fn=i=>({title:i.title[0],description:i.description[0],link:i.link[0],pubDate:i.pubDate[0],content:i["content:encoded"][0]}),pn=async(i,a)=>{const D=await ln(i);if(!a)return D;if(!ne){await rr(D,a);return}if(!an(D))throw new Error("Error occurred fetching Feed from Substack");await rr(D.contents,a)},hn=(i,a)=>{if(!Jr(i))throw new Error("Feed is not in the correct format");try{return i.rss.channel.filter(tn).filter(D=>D.link[0]===a)}catch{throw new Error(`Error occurred fetching Feed by Link: ${a}`)}},dn=i=>i[0].item.map(fn);Q.getFeedByLink=hn,Q.getPosts=dn,Q.getSubstackFeed=pn,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|
|
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=ie(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(ur){_(u,"onopennamespace",{prefix:ur,uri:M.ns[ur]})});for(var q=0,U=u.attribList.length;q<U;q++){var k=u.attribList[q],$=k[0],tt=k[1],V=ie($,!0),H=V.prefix,wn=V.local,sr=H===""?"":M.ns[H]||"",ue={name:$,value:tt,prefix:H,local:wn,uri:sr};H&&H!=="xmlns"&&!sr&&(S(u,"Unbound namespace prefix: "+JSON.stringify(H)),ue.uri=H),u.tag.attributes[$]=ue,_(u,"onattribute",ue)}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 se(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 mn(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 ir(u,n){n==="<"?(u.state=r.OPEN_WAKA,u.startTagPosition=u.position):c(n)||(S(u,"Non-whitespace before first tag."),u.textNode=n,u.state=r.TEXT)}function or(u,n){var M="";return n<u.length&&(M=u.charAt(n)),M}function gn(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 X(n);typeof u=="object"&&(u=u.toString());for(var M=0,w="";w=or(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;ir(n,w);continue;case r.BEGIN_WHITESPACE:ir(n,w);continue;case r.TEXT:if(n.sawRoot&&!n.closedRoot){for(var R=M-1;w&&w!=="<"&&w!=="&";)w=or(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):(!c(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(!c(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):(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,_(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=F(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:c(w)?n.state=r.PROC_INST_BODY:n.procInstName+=w;continue;case r.PROC_INST_BODY:if(!n.procInstBody&&c(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:(yn(n),w===">"?J(n):w==="/"?n.state=r.OPEN_TAG_SLASH:(c(w)||S(n,"Invalid character in tag name"),n.state=r.ATTRIB));continue;case r.OPEN_TAG_SLASH:w===">"?(J(n,!0),se(n)):(S(n,"Forward-slash in opening tag not followed by >"),n.state=r.ATTRIB);continue;case r.ATTRIB:if(c(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,oe(n),J(n)):c(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(c(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(c(w))continue;f(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}oe(n),n.q="",n.state=r.ATTRIB_VALUE_CLOSED;continue;case r.ATTRIB_VALUE_CLOSED:c(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}oe(n),w===">"?J(n):n.state=r.ATTRIB;continue;case r.CLOSE_TAG:if(n.tagName)w===">"?se(n):L(P,w)?n.tagName+=w:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=r.SCRIPT):(c(w)||S(n,"Invalid tagname in closing tag"),n.state=r.CLOSE_TAG_SAW_WHITE);else{if(c(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(c(w))continue;w===">"?se(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 $=mn(n);n.opt.unparsedEntities&&!Object.values(a.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:{}},He;function zr(){if(He)return jt.exports;He=1;var i=typeof Reflect=="object"?Reflect:null,a=i&&typeof i.apply=="function"?i.apply:function(f,T,L){return Function.prototype.apply.call(f,T,L)},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 p(c){console&&console.warn&&console.warn(c)}var h=Number.isNaN||function(f){return f!==f};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(c){if(typeof c!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof c)}Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return e},set:function(c){if(typeof c!="number"||c<0||h(c))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+c+".");e=c}}),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||h(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(c){return c._maxListeners===void 0?t.defaultMaxListeners:c._maxListeners}t.prototype.getMaxListeners=function(){return l(this)},t.prototype.emit=function(f){for(var T=[],L=1;L<arguments.length;L++)T.push(arguments[L]);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 A=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw A.context=N,A}var _=r[f];if(_===void 0)return!1;if(typeof _=="function")a(_,this,T);else for(var C=_.length,F=O(_,C),L=0;L<C;++L)a(F[L],this,T);return!0};function b(c,f,T,L){var v,r,N;if(o(T),r=c._events,r===void 0?(r=c._events=Object.create(null),c._eventsCount=0):(r.newListener!==void 0&&(c.emit("newListener",f,T.listener?T.listener:T),r=c._events),N=r[f]),N===void 0)N=r[f]=T,++c._eventsCount;else if(typeof N=="function"?N=r[f]=L?[T,N]:[N,T]:L?N.unshift(T):N.push(T),v=l(c),v>0&&N.length>v&&!N.warned){N.warned=!0;var A=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(f)+" listeners added. Use emitter.setMaxListeners() to increase limit");A.name="MaxListenersExceededWarning",A.emitter=c,A.type=f,A.count=N.length,p(A)}return c}t.prototype.addListener=function(f,T){return b(this,f,T,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(f,T){return b(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(c,f,T){var L={fired:!1,wrapFn:void 0,target:c,type:f,listener:T},v=m.bind(L);return v.listener=T,L.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 L,v,r,N,A;if(o(T),v=this._events,v===void 0)return this;if(L=v[f],L===void 0)return this;if(L===T||L.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete v[f],v.removeListener&&this.emit("removeListener",f,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[f]=L[0]),v.removeListener!==void 0&&this.emit("removeListener",f,A||T)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(f){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[f]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete L[f]),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[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(c,f,T){var L=c._events;if(L===void 0)return[];var v=L[f];return v===void 0?[]:typeof v=="function"?T?[v.listener||v]:[v]:T?x(v):O(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(c,f){return typeof c.listenerCount=="function"?c.listenerCount(f):g.call(c,f)},t.prototype.listenerCount=g;function g(c){var f=this._events;if(f!==void 0){var T=f[c];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(c,f){for(var T=new Array(f),L=0;L<f;++L)T[L]=c[L];return T}function I(c,f){for(;f+1<c.length;f++)c[f]=c[f+1];c.pop()}function x(c){for(var f=new Array(c.length),T=0;T<f.length;++T)f[T]=c[T].listener||c[T];return f}function P(c,f){return new Promise(function(T,L){function v(N){c.removeListener(f,r),L(N)}function r(){typeof c.removeListener=="function"&&c.removeListener("error",v),T([].slice.call(arguments))}s(c,f,r,{once:!0}),f!=="error"&&E(c,v,{once:!0})})}function E(c,f,T){typeof c.on=="function"&&s(c,"error",f,T)}function s(c,f,T,L){if(typeof c.on=="function")L.once?c.once(f,T):c.on(f,T);else if(typeof c.addEventListener=="function")c.addEventListener(f,function v(r){L.once&&c.removeEventListener(f,v),T(r)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof c)}return jt.exports}var Bt={},Qe;function Hr(){return Qe||(Qe=1,(function(){Bt.stripBOM=function(i){return i[0]==="\uFEFF"?i.substring(1):i}}).call(Bt)),Bt}var Z={},Ze;function Je(){return Ze||(Ze=1,(function(){var i;i=new RegExp(/(?!xmlns)^.*:/),Z.normalize=function(a){return a.toLowerCase()},Z.firstCharLowerCase=function(a){return a.charAt(0).toLowerCase()+a.slice(1)},Z.stripPrefix=function(a){return a.replace(i,"")},Z.parseNumbers=function(a){return isNaN(a)||(a=a%1===0?parseInt(a,10):parseFloat(a)),a},Z.parseBooleans=function(a){return/^(?:true|false)$/i.test(a)&&(a=a.toLowerCase()==="true"),a}}).call(Z)),Z}var tr;function Qr(){return tr||(tr=1,function(i){(function(){var a,D,p,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=Kr(),h=zr(),a=Hr(),o=Je(),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},p=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||p(I,x,[I[x]]),I[x].push(P)):this.options.explicitArray?p(I,x,[P]):p(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(c){if(s.saxParser.resume(),!s.saxParser.errThrown)return s.saxParser.errThrown=!0,s.emit("error",c)}}(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(c){var f,T,L,v,r;if(L={},L[x]="",!s.options.ignoreAttrs){r=c.attributes;for(f in r)d.call(r,f)&&(!(I in L)&&!s.options.mergeAttrs&&(L[I]={}),T=s.options.attrValueProcessors?e(s.options.attrValueProcessors,c.attributes[f],f):c.attributes[f],v=s.options.attrNameProcessors?e(s.options.attrNameProcessors,f):f,s.options.mergeAttrs?s.assignOrPush(L,v,T):p(L[I],v,T))}return L["#name"]=s.options.tagNameProcessors?e(s.options.tagNameProcessors,c.name):c.name,s.options.xmlns&&(L[s.options.xmlnskey]={uri:c.uri,local:c.local}),E.push(L)}}(this),this.saxParser.onclosetag=function(s){return function(){var c,f,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&&(c=r.cdata,delete r.cdata),_=E[E.length-1],r[x].match(/^\s*$/)&&!c?(f=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:f),s.options.validator!=null&&(C="/"+function(){var F,j,X;for(X=[],F=0,j=E.length;F<j;F++)L=E[F],X.push(L["#name"]);return X}().concat(v).join("/"),function(){var F;try{return r=s.options.validator(C,_&&_[v],r)}catch(j){return F=j,s.emit("error",F)}}()),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)&&p(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={},p(r,v,A)),s.resultObject=r,s.saxParser.ended=!0,s.emit("end",s.resultObject))}}(this),P=function(s){return function(c){var f,T;if(T=E[E.length-1],T)return T[x]+=c,s.options.explicitChildren&&s.options.preserveChildrenOrder&&s.options.charsAsChildren&&(s.options.includeWhiteChars||c.replace(/\\n/g,"").trim()!=="")&&(T[s.options.childkey]=T[s.options.childkey]||[],f={"#name":"__text__"},f[x]=c,s.options.normalize&&(f[x]=f[x].replace(/\s{2,}/g," ").trim()),T[s.options.childkey].push(f)),T}}(this),this.saxParser.ontext=P,this.saxParser.oncdata=function(s){return function(c){var f;if(f=P(c),f)return f.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=a.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,c){return s?E(s):P(c)})}}(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 er;function Zr(){return er||(er=1,(function(){var i,a,D,p,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;a=qt(),i=Yr(),D=Qr(),p=Je(),G.defaults=a.defaults,G.processors=p,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 rr=Zr();const Jr=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),tn=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(en)&&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(rn)&&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(nn)&&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(on),en=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),rn=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",nn=i=>typeof i=="object"&&i!==null&&i.hasOwnProperty("itunes:email")&&Array.isArray(i["itunes:email"])&&i.hasOwnProperty("itunes:name")&&Array.isArray(i["itunes:name"]),on=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(sn)&&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(un)&&i.hasOwnProperty("content:encoded")&&Array.isArray(i["content:encoded"]),sn=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",un=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",an=i=>i&&i.contents&&i.status.http_code==200,cn="https://api.allorigins.win/get?url=",ne=typeof document<"u",ln=async i=>{try{const a=ne?`${cn}${encodeURIComponent(i)}`:i,D=await fetch(a);if(D.ok)return ne?D.json():D.text()}catch{throw new Error("Error occurred fetching Feed from Substack")}},nr=async(i="",a)=>{if(!a)return rr.parseStringPromise(i);rr.parseString(i,a)},fn=i=>({title:i.title[0],description:i.description[0],link:i.link[0],pubDate:i.pubDate[0],content:i["content:encoded"][0]}),pn=async(i,a)=>{const D=await ln(i);if(!ne)return nr(D,a);if(!an(D))throw new Error("Error occurred fetching Feed from Substack");await nr(D.contents,a)},hn=(i,a)=>{if(!Jr(i))throw new Error("Feed is not in the correct format");try{return i.rss.channel.filter(tn).filter(D=>D.link[0]===a)}catch{throw new Error(`Error occurred fetching Feed by Link: ${a}`)}},dn=i=>i[0].item.map(fn);Q.getFeedByLink=hn,Q.getPosts=dn,Q.getSubstackFeed=pn,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "substack-feed-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"@types/xml2js": "^0.4.14",
|
|
33
33
|
"eslint": "^8.57.0",
|
|
34
34
|
"events": "^3.3.0",
|
|
35
|
+
"fetch-mock-jest": "^1.5.1",
|
|
35
36
|
"jest": "^29.7.0",
|
|
36
37
|
"prettier": "3.3.2",
|
|
37
38
|
"ts-jest": "^29.2.5",
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
"xml2js": "^0.6.2"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
45
|
+
"node-fetch": "^3.3.2",
|
|
44
46
|
"ts-node": "^10.9.2",
|
|
45
47
|
"tsconfig-paths": "^4.2.0"
|
|
46
48
|
}
|