substack-feed-api 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -7
- package/dist/substackFeedApi.js +1148 -1145
- package/dist/substackFeedApi.umd.cjs +9 -9
- package/index.d.ts +4 -17
- package/package.json +2 -2
package/dist/substackFeedApi.js
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
var M = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
1
|
function ur(i) {
|
|
3
2
|
if (i.__esModule) return i;
|
|
4
3
|
var c = i.default;
|
|
5
4
|
if (typeof c == "function") {
|
|
6
|
-
var D = function
|
|
7
|
-
return this instanceof
|
|
5
|
+
var D = function f() {
|
|
6
|
+
return this instanceof f ? Reflect.construct(c, arguments, this.constructor) : c.apply(this, arguments);
|
|
8
7
|
};
|
|
9
8
|
D.prototype = c.prototype;
|
|
10
9
|
} else D = {};
|
|
11
|
-
return Object.defineProperty(D, "__esModule", { value: !0 }), Object.keys(i).forEach(function(
|
|
12
|
-
var
|
|
13
|
-
Object.defineProperty(D,
|
|
10
|
+
return Object.defineProperty(D, "__esModule", { value: !0 }), Object.keys(i).forEach(function(f) {
|
|
11
|
+
var h = Object.getOwnPropertyDescriptor(i, f);
|
|
12
|
+
Object.defineProperty(D, f, h.get ? h : {
|
|
14
13
|
enumerable: !0,
|
|
15
14
|
get: function() {
|
|
16
|
-
return i[
|
|
15
|
+
return i[f];
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
18
|
}), D;
|
|
20
19
|
}
|
|
21
|
-
var
|
|
22
|
-
function
|
|
20
|
+
var G = {}, tt = {}, ce;
|
|
21
|
+
function $t() {
|
|
23
22
|
return ce || (ce = 1, (function() {
|
|
24
|
-
|
|
23
|
+
tt.defaults = {
|
|
25
24
|
"0.1": {
|
|
26
25
|
explicitCharkey: !1,
|
|
27
26
|
trim: !0,
|
|
@@ -90,56 +89,56 @@ function Wt() {
|
|
|
90
89
|
cdata: !1
|
|
91
90
|
}
|
|
92
91
|
};
|
|
93
|
-
}).call(
|
|
92
|
+
}).call(tt)), tt;
|
|
94
93
|
}
|
|
95
|
-
var
|
|
94
|
+
var et = {}, Y = {}, K = {}, le;
|
|
96
95
|
function H() {
|
|
97
96
|
return le || (le = 1, (function() {
|
|
98
|
-
var i, c, D,
|
|
97
|
+
var i, c, D, f, h, t, e, o = [].slice, l = {}.hasOwnProperty;
|
|
99
98
|
i = function() {
|
|
100
|
-
var
|
|
101
|
-
if (
|
|
99
|
+
var b, m, y, d, g, O;
|
|
100
|
+
if (O = arguments[0], g = 2 <= arguments.length ? o.call(arguments, 1) : [], h(Object.assign))
|
|
102
101
|
Object.assign.apply(null, arguments);
|
|
103
102
|
else
|
|
104
|
-
for (
|
|
105
|
-
if (d = g[
|
|
103
|
+
for (b = 0, y = g.length; b < y; b++)
|
|
104
|
+
if (d = g[b], d != null)
|
|
106
105
|
for (m in d)
|
|
107
|
-
l.call(d, m) && (
|
|
108
|
-
return
|
|
109
|
-
},
|
|
110
|
-
return !!
|
|
111
|
-
}, t = function(
|
|
106
|
+
l.call(d, m) && (O[m] = d[m]);
|
|
107
|
+
return O;
|
|
108
|
+
}, h = function(b) {
|
|
109
|
+
return !!b && Object.prototype.toString.call(b) === "[object Function]";
|
|
110
|
+
}, t = function(b) {
|
|
112
111
|
var m;
|
|
113
|
-
return !!
|
|
114
|
-
}, D = function(
|
|
115
|
-
return
|
|
116
|
-
},
|
|
112
|
+
return !!b && ((m = typeof b) == "function" || m === "object");
|
|
113
|
+
}, D = function(b) {
|
|
114
|
+
return h(Array.isArray) ? Array.isArray(b) : Object.prototype.toString.call(b) === "[object Array]";
|
|
115
|
+
}, f = function(b) {
|
|
117
116
|
var m;
|
|
118
|
-
if (D(
|
|
119
|
-
return !
|
|
120
|
-
for (m in
|
|
121
|
-
if (l.call(
|
|
117
|
+
if (D(b))
|
|
118
|
+
return !b.length;
|
|
119
|
+
for (m in b)
|
|
120
|
+
if (l.call(b, m))
|
|
122
121
|
return !1;
|
|
123
122
|
return !0;
|
|
124
|
-
}, e = function(
|
|
123
|
+
}, e = function(b) {
|
|
125
124
|
var m, y;
|
|
126
|
-
return t(
|
|
127
|
-
}, c = function(
|
|
128
|
-
return
|
|
129
|
-
},
|
|
130
|
-
}).call(
|
|
125
|
+
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);
|
|
126
|
+
}, c = function(b) {
|
|
127
|
+
return h(b.valueOf) ? b.valueOf() : b;
|
|
128
|
+
}, K.assign = i, K.isFunction = h, K.isObject = t, K.isArray = D, K.isEmpty = f, K.isPlainObject = e, K.getValue = c;
|
|
129
|
+
}).call(K)), K;
|
|
131
130
|
}
|
|
132
|
-
var
|
|
133
|
-
function
|
|
131
|
+
var ot = { exports: {} }, ar = ot.exports, fe;
|
|
132
|
+
function He() {
|
|
134
133
|
return fe || (fe = 1, (function() {
|
|
135
|
-
|
|
134
|
+
ot.exports = function() {
|
|
136
135
|
function i() {
|
|
137
136
|
}
|
|
138
137
|
return i.prototype.hasFeature = function(c, D) {
|
|
139
138
|
return !0;
|
|
140
|
-
}, i.prototype.createDocumentType = function(c, D,
|
|
139
|
+
}, i.prototype.createDocumentType = function(c, D, f) {
|
|
141
140
|
throw new Error("This DOM method is not implemented.");
|
|
142
|
-
}, i.prototype.createDocument = function(c, D,
|
|
141
|
+
}, i.prototype.createDocument = function(c, D, f) {
|
|
143
142
|
throw new Error("This DOM method is not implemented.");
|
|
144
143
|
}, i.prototype.createHTMLDocument = function(c) {
|
|
145
144
|
throw new Error("This DOM method is not implemented.");
|
|
@@ -147,24 +146,24 @@ function ze() {
|
|
|
147
146
|
throw new Error("This DOM method is not implemented.");
|
|
148
147
|
}, i;
|
|
149
148
|
}();
|
|
150
|
-
}).call(
|
|
149
|
+
}).call(ar)), ot.exports;
|
|
151
150
|
}
|
|
152
|
-
var
|
|
153
|
-
function
|
|
154
|
-
return
|
|
155
|
-
|
|
151
|
+
var st = { exports: {} }, ut = { exports: {} }, at = { exports: {} }, cr = at.exports, pe;
|
|
152
|
+
function lr() {
|
|
153
|
+
return pe || (pe = 1, (function() {
|
|
154
|
+
at.exports = function() {
|
|
156
155
|
function i() {
|
|
157
156
|
}
|
|
158
157
|
return i.prototype.handleError = function(c) {
|
|
159
158
|
throw new Error(c);
|
|
160
159
|
}, i;
|
|
161
160
|
}();
|
|
162
|
-
}).call(
|
|
161
|
+
}).call(cr)), at.exports;
|
|
163
162
|
}
|
|
164
|
-
var
|
|
165
|
-
function
|
|
166
|
-
return
|
|
167
|
-
|
|
163
|
+
var ct = { exports: {} }, fr = ct.exports, he;
|
|
164
|
+
function pr() {
|
|
165
|
+
return he || (he = 1, (function() {
|
|
166
|
+
ct.exports = function() {
|
|
168
167
|
function i(c) {
|
|
169
168
|
this.arr = c || [];
|
|
170
169
|
}
|
|
@@ -178,13 +177,13 @@ function cr() {
|
|
|
178
177
|
return this.arr.indexOf(c) !== -1;
|
|
179
178
|
}, i;
|
|
180
179
|
}();
|
|
181
|
-
}).call(
|
|
180
|
+
}).call(fr)), ct.exports;
|
|
182
181
|
}
|
|
183
|
-
var de;
|
|
184
|
-
function
|
|
182
|
+
var hr = ut.exports, de;
|
|
183
|
+
function dr() {
|
|
185
184
|
return de || (de = 1, (function() {
|
|
186
185
|
var i, c;
|
|
187
|
-
i =
|
|
186
|
+
i = lr(), c = pr(), ut.exports = function() {
|
|
188
187
|
function D() {
|
|
189
188
|
this.defaultParams = {
|
|
190
189
|
"canonical-form": !1,
|
|
@@ -210,20 +209,20 @@ function lr() {
|
|
|
210
209
|
get: function() {
|
|
211
210
|
return new c(Object.keys(this.defaultParams));
|
|
212
211
|
}
|
|
213
|
-
}), D.prototype.getParameter = function(
|
|
214
|
-
return this.params.hasOwnProperty(
|
|
215
|
-
}, D.prototype.canSetParameter = function(
|
|
212
|
+
}), D.prototype.getParameter = function(f) {
|
|
213
|
+
return this.params.hasOwnProperty(f) ? this.params[f] : null;
|
|
214
|
+
}, D.prototype.canSetParameter = function(f, h) {
|
|
216
215
|
return !0;
|
|
217
|
-
}, D.prototype.setParameter = function(
|
|
218
|
-
return
|
|
216
|
+
}, D.prototype.setParameter = function(f, h) {
|
|
217
|
+
return h != null ? this.params[f] = h : delete this.params[f];
|
|
219
218
|
}, D;
|
|
220
219
|
}();
|
|
221
|
-
}).call(
|
|
220
|
+
}).call(hr)), ut.exports;
|
|
222
221
|
}
|
|
223
|
-
var
|
|
224
|
-
function
|
|
222
|
+
var lt = { exports: {} }, ft = { exports: {} }, pt = { exports: {} }, yr = pt.exports, ye;
|
|
223
|
+
function B() {
|
|
225
224
|
return ye || (ye = 1, (function() {
|
|
226
|
-
|
|
225
|
+
pt.exports = {
|
|
227
226
|
Element: 1,
|
|
228
227
|
Attribute: 2,
|
|
229
228
|
Text: 3,
|
|
@@ -242,17 +241,17 @@ function q() {
|
|
|
242
241
|
ElementDeclaration: 204,
|
|
243
242
|
Dummy: 205
|
|
244
243
|
};
|
|
245
|
-
}).call(
|
|
244
|
+
}).call(yr)), pt.exports;
|
|
246
245
|
}
|
|
247
|
-
var
|
|
248
|
-
function
|
|
246
|
+
var ht = { exports: {} }, mr = ht.exports, me;
|
|
247
|
+
function Qe() {
|
|
249
248
|
return me || (me = 1, (function() {
|
|
250
249
|
var i;
|
|
251
|
-
i =
|
|
252
|
-
function c(D,
|
|
253
|
-
if (this.parent = D, this.parent && (this.options = this.parent.options, this.stringify = this.parent.stringify),
|
|
254
|
-
throw new Error("Missing attribute name. " + this.debugInfo(
|
|
255
|
-
this.name = this.stringify.name(
|
|
250
|
+
i = B(), W(), ht.exports = function() {
|
|
251
|
+
function c(D, f, h) {
|
|
252
|
+
if (this.parent = D, this.parent && (this.options = this.parent.options, this.stringify = this.parent.stringify), f == null)
|
|
253
|
+
throw new Error("Missing attribute name. " + this.debugInfo(f));
|
|
254
|
+
this.name = this.stringify.name(f), this.value = this.stringify.attValue(h), this.type = i.Attribute, this.isId = !1, this.schemaTypeInfo = null;
|
|
256
255
|
}
|
|
257
256
|
return Object.defineProperty(c.prototype, "nodeType", {
|
|
258
257
|
get: function() {
|
|
@@ -295,12 +294,12 @@ function He() {
|
|
|
295
294
|
return !(D.namespaceURI !== this.namespaceURI || D.prefix !== this.prefix || D.localName !== this.localName || D.value !== this.value);
|
|
296
295
|
}, c;
|
|
297
296
|
}();
|
|
298
|
-
}).call(
|
|
297
|
+
}).call(mr)), ht.exports;
|
|
299
298
|
}
|
|
300
|
-
var
|
|
301
|
-
function
|
|
299
|
+
var dt = { exports: {} }, gr = dt.exports, ge;
|
|
300
|
+
function Wt() {
|
|
302
301
|
return ge || (ge = 1, (function() {
|
|
303
|
-
|
|
302
|
+
dt.exports = function() {
|
|
304
303
|
function i(c) {
|
|
305
304
|
this.nodes = c;
|
|
306
305
|
}
|
|
@@ -328,29 +327,29 @@ function Gt() {
|
|
|
328
327
|
throw new Error("This DOM method is not implemented.");
|
|
329
328
|
}, i;
|
|
330
329
|
}();
|
|
331
|
-
}).call(
|
|
330
|
+
}).call(gr)), dt.exports;
|
|
332
331
|
}
|
|
333
|
-
var we;
|
|
334
|
-
function
|
|
332
|
+
var wr = ft.exports, we;
|
|
333
|
+
function Gt() {
|
|
335
334
|
return we || (we = 1, (function() {
|
|
336
|
-
var i, c, D,
|
|
335
|
+
var i, c, D, f, h, t, e, o, l = function(m, y) {
|
|
337
336
|
for (var d in y)
|
|
338
|
-
|
|
337
|
+
b.call(y, d) && (m[d] = y[d]);
|
|
339
338
|
function g() {
|
|
340
339
|
this.constructor = m;
|
|
341
340
|
}
|
|
342
341
|
return g.prototype = y.prototype, m.prototype = new g(), m.__super__ = y.prototype, m;
|
|
343
|
-
},
|
|
344
|
-
o = H(), e = o.isObject, t = o.isFunction,
|
|
342
|
+
}, b = {}.hasOwnProperty;
|
|
343
|
+
o = H(), e = o.isObject, t = o.isFunction, h = o.getValue, f = W(), i = B(), c = Qe(), D = Wt(), ft.exports = function(m) {
|
|
345
344
|
l(y, m);
|
|
346
|
-
function y(d, g,
|
|
347
|
-
var
|
|
345
|
+
function y(d, g, O) {
|
|
346
|
+
var I, x, P, E;
|
|
348
347
|
if (y.__super__.constructor.call(this, d), g == null)
|
|
349
348
|
throw new Error("Missing element name. " + this.debugInfo());
|
|
350
|
-
if (this.name = this.stringify.name(g), this.type = i.Element, this.attribs = {}, this.schemaTypeInfo = null,
|
|
351
|
-
for (E = d.children,
|
|
352
|
-
if (
|
|
353
|
-
|
|
349
|
+
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)) {
|
|
350
|
+
for (E = d.children, x = 0, P = E.length; x < P; x++)
|
|
351
|
+
if (I = E[x], I.type === i.DocType) {
|
|
352
|
+
I.name = this.name;
|
|
354
353
|
break;
|
|
355
354
|
}
|
|
356
355
|
}
|
|
@@ -388,29 +387,29 @@ function Yt() {
|
|
|
388
387
|
return (!this.attributeMap || !this.attributeMap.nodes) && (this.attributeMap = new D(this.attribs)), this.attributeMap;
|
|
389
388
|
}
|
|
390
389
|
}), y.prototype.clone = function() {
|
|
391
|
-
var d, g,
|
|
392
|
-
|
|
393
|
-
for (g in
|
|
394
|
-
|
|
395
|
-
return
|
|
396
|
-
var
|
|
397
|
-
return
|
|
398
|
-
}),
|
|
390
|
+
var d, g, O, I;
|
|
391
|
+
O = Object.create(this), O.isRoot && (O.documentObject = null), O.attribs = {}, I = this.attribs;
|
|
392
|
+
for (g in I)
|
|
393
|
+
b.call(I, g) && (d = I[g], O.attribs[g] = d.clone());
|
|
394
|
+
return O.children = [], this.children.forEach(function(x) {
|
|
395
|
+
var P;
|
|
396
|
+
return P = x.clone(), P.parent = O, O.children.push(P);
|
|
397
|
+
}), O;
|
|
399
398
|
}, y.prototype.attribute = function(d, g) {
|
|
400
|
-
var
|
|
401
|
-
if (d != null && (d =
|
|
402
|
-
for (
|
|
403
|
-
|
|
399
|
+
var O, I;
|
|
400
|
+
if (d != null && (d = h(d)), e(d))
|
|
401
|
+
for (O in d)
|
|
402
|
+
b.call(d, O) && (I = d[O], this.attribute(O, I));
|
|
404
403
|
else
|
|
405
404
|
t(g) && (g = g.apply()), this.options.keepNullAttributes && g == null ? this.attribs[d] = new c(this, d, "") : g != null && (this.attribs[d] = new c(this, d, g));
|
|
406
405
|
return this;
|
|
407
406
|
}, y.prototype.removeAttribute = function(d) {
|
|
408
|
-
var g,
|
|
407
|
+
var g, O, I;
|
|
409
408
|
if (d == null)
|
|
410
409
|
throw new Error("Missing attribute name. " + this.debugInfo());
|
|
411
|
-
if (d =
|
|
412
|
-
for (
|
|
413
|
-
g = d[
|
|
410
|
+
if (d = h(d), Array.isArray(d))
|
|
411
|
+
for (O = 0, I = d.length; O < I; O++)
|
|
412
|
+
g = d[O], delete this.attribs[g];
|
|
414
413
|
else
|
|
415
414
|
delete this.attribs[d];
|
|
416
415
|
return this;
|
|
@@ -434,7 +433,7 @@ function Yt() {
|
|
|
434
433
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
435
434
|
}, y.prototype.getAttributeNS = function(d, g) {
|
|
436
435
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
437
|
-
}, y.prototype.setAttributeNS = function(d, g,
|
|
436
|
+
}, y.prototype.setAttributeNS = function(d, g, O) {
|
|
438
437
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
439
438
|
}, y.prototype.removeAttributeNS = function(d, g) {
|
|
440
439
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
@@ -450,7 +449,7 @@ function Yt() {
|
|
|
450
449
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
451
450
|
}, y.prototype.setIdAttribute = function(d, g) {
|
|
452
451
|
return this.attribs.hasOwnProperty(d) ? this.attribs[d].isId : g;
|
|
453
|
-
}, y.prototype.setIdAttributeNS = function(d, g,
|
|
452
|
+
}, y.prototype.setIdAttributeNS = function(d, g, O) {
|
|
454
453
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
455
454
|
}, y.prototype.setIdAttributeNode = function(d, g) {
|
|
456
455
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
@@ -461,82 +460,82 @@ function Yt() {
|
|
|
461
460
|
}, y.prototype.getElementsByClassName = function(d) {
|
|
462
461
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
463
462
|
}, y.prototype.isEqualNode = function(d) {
|
|
464
|
-
var g,
|
|
463
|
+
var g, O, I;
|
|
465
464
|
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)
|
|
466
465
|
return !1;
|
|
467
|
-
for (g =
|
|
466
|
+
for (g = O = 0, I = this.attribs.length - 1; 0 <= I ? O <= I : O >= I; g = 0 <= I ? ++O : --O)
|
|
468
467
|
if (!this.attribs[g].isEqualNode(d.attribs[g]))
|
|
469
468
|
return !1;
|
|
470
469
|
return !0;
|
|
471
470
|
}, y;
|
|
472
|
-
}(
|
|
473
|
-
}).call(
|
|
471
|
+
}(f);
|
|
472
|
+
}).call(wr)), ft.exports;
|
|
474
473
|
}
|
|
475
|
-
var
|
|
476
|
-
function
|
|
474
|
+
var yt = { exports: {} }, mt = { exports: {} }, Tr = mt.exports, Te;
|
|
475
|
+
function Ft() {
|
|
477
476
|
return Te || (Te = 1, (function() {
|
|
478
|
-
var i, c = function(
|
|
479
|
-
for (var t in
|
|
480
|
-
D.call(
|
|
477
|
+
var i, c = function(f, h) {
|
|
478
|
+
for (var t in h)
|
|
479
|
+
D.call(h, t) && (f[t] = h[t]);
|
|
481
480
|
function e() {
|
|
482
|
-
this.constructor =
|
|
481
|
+
this.constructor = f;
|
|
483
482
|
}
|
|
484
|
-
return e.prototype =
|
|
483
|
+
return e.prototype = h.prototype, f.prototype = new e(), f.__super__ = h.prototype, f;
|
|
485
484
|
}, D = {}.hasOwnProperty;
|
|
486
|
-
i =
|
|
487
|
-
c(
|
|
488
|
-
function
|
|
489
|
-
|
|
485
|
+
i = W(), mt.exports = function(f) {
|
|
486
|
+
c(h, f);
|
|
487
|
+
function h(t) {
|
|
488
|
+
h.__super__.constructor.call(this, t), this.value = "";
|
|
490
489
|
}
|
|
491
|
-
return Object.defineProperty(
|
|
490
|
+
return Object.defineProperty(h.prototype, "data", {
|
|
492
491
|
get: function() {
|
|
493
492
|
return this.value;
|
|
494
493
|
},
|
|
495
494
|
set: function(t) {
|
|
496
495
|
return this.value = t || "";
|
|
497
496
|
}
|
|
498
|
-
}), Object.defineProperty(
|
|
497
|
+
}), Object.defineProperty(h.prototype, "length", {
|
|
499
498
|
get: function() {
|
|
500
499
|
return this.value.length;
|
|
501
500
|
}
|
|
502
|
-
}), Object.defineProperty(
|
|
501
|
+
}), Object.defineProperty(h.prototype, "textContent", {
|
|
503
502
|
get: function() {
|
|
504
503
|
return this.value;
|
|
505
504
|
},
|
|
506
505
|
set: function(t) {
|
|
507
506
|
return this.value = t || "";
|
|
508
507
|
}
|
|
509
|
-
}),
|
|
508
|
+
}), h.prototype.clone = function() {
|
|
510
509
|
return Object.create(this);
|
|
511
|
-
},
|
|
510
|
+
}, h.prototype.substringData = function(t, e) {
|
|
512
511
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
513
|
-
},
|
|
512
|
+
}, h.prototype.appendData = function(t) {
|
|
514
513
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
515
|
-
},
|
|
514
|
+
}, h.prototype.insertData = function(t, e) {
|
|
516
515
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
517
|
-
},
|
|
516
|
+
}, h.prototype.deleteData = function(t, e) {
|
|
518
517
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
519
|
-
},
|
|
518
|
+
}, h.prototype.replaceData = function(t, e, o) {
|
|
520
519
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
521
|
-
},
|
|
522
|
-
return !(!
|
|
523
|
-
},
|
|
520
|
+
}, h.prototype.isEqualNode = function(t) {
|
|
521
|
+
return !(!h.__super__.isEqualNode.apply(this, arguments).isEqualNode(t) || t.data !== this.data);
|
|
522
|
+
}, h;
|
|
524
523
|
}(i);
|
|
525
|
-
}).call(
|
|
524
|
+
}).call(Tr)), mt.exports;
|
|
526
525
|
}
|
|
527
|
-
var De;
|
|
528
|
-
function
|
|
526
|
+
var Dr = yt.exports, De;
|
|
527
|
+
function Yt() {
|
|
529
528
|
return De || (De = 1, (function() {
|
|
530
|
-
var i, c, D = function(
|
|
529
|
+
var i, c, D = function(h, t) {
|
|
531
530
|
for (var e in t)
|
|
532
|
-
|
|
531
|
+
f.call(t, e) && (h[e] = t[e]);
|
|
533
532
|
function o() {
|
|
534
|
-
this.constructor =
|
|
533
|
+
this.constructor = h;
|
|
535
534
|
}
|
|
536
|
-
return o.prototype = t.prototype,
|
|
537
|
-
},
|
|
538
|
-
i =
|
|
539
|
-
D(t,
|
|
535
|
+
return o.prototype = t.prototype, h.prototype = new o(), h.__super__ = t.prototype, h;
|
|
536
|
+
}, f = {}.hasOwnProperty;
|
|
537
|
+
i = B(), c = Ft(), yt.exports = function(h) {
|
|
538
|
+
D(t, h);
|
|
540
539
|
function t(e, o) {
|
|
541
540
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
542
541
|
throw new Error("Missing CDATA text. " + this.debugInfo());
|
|
@@ -548,21 +547,21 @@ function $t() {
|
|
|
548
547
|
return this.options.writer.cdata(this, this.options.writer.filterOptions(e));
|
|
549
548
|
}, t;
|
|
550
549
|
}(c);
|
|
551
|
-
}).call(
|
|
550
|
+
}).call(Dr)), yt.exports;
|
|
552
551
|
}
|
|
553
|
-
var
|
|
552
|
+
var gt = { exports: {} }, Er = gt.exports, Ee;
|
|
554
553
|
function Kt() {
|
|
555
554
|
return Ee || (Ee = 1, (function() {
|
|
556
|
-
var i, c, D = function(
|
|
555
|
+
var i, c, D = function(h, t) {
|
|
557
556
|
for (var e in t)
|
|
558
|
-
|
|
557
|
+
f.call(t, e) && (h[e] = t[e]);
|
|
559
558
|
function o() {
|
|
560
|
-
this.constructor =
|
|
559
|
+
this.constructor = h;
|
|
561
560
|
}
|
|
562
|
-
return o.prototype = t.prototype,
|
|
563
|
-
},
|
|
564
|
-
i =
|
|
565
|
-
D(t,
|
|
561
|
+
return o.prototype = t.prototype, h.prototype = new o(), h.__super__ = t.prototype, h;
|
|
562
|
+
}, f = {}.hasOwnProperty;
|
|
563
|
+
i = B(), c = Ft(), gt.exports = function(h) {
|
|
564
|
+
D(t, h);
|
|
566
565
|
function t(e, o) {
|
|
567
566
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
568
567
|
throw new Error("Missing comment text. " + this.debugInfo());
|
|
@@ -574,50 +573,50 @@ function Kt() {
|
|
|
574
573
|
return this.options.writer.comment(this, this.options.writer.filterOptions(e));
|
|
575
574
|
}, t;
|
|
576
575
|
}(c);
|
|
577
|
-
}).call(
|
|
576
|
+
}).call(Er)), gt.exports;
|
|
578
577
|
}
|
|
579
|
-
var
|
|
578
|
+
var wt = { exports: {} }, br = wt.exports, be;
|
|
580
579
|
function zt() {
|
|
581
580
|
return be || (be = 1, (function() {
|
|
582
|
-
var i, c, D,
|
|
581
|
+
var i, c, D, f = function(t, e) {
|
|
583
582
|
for (var o in e)
|
|
584
|
-
|
|
583
|
+
h.call(e, o) && (t[o] = e[o]);
|
|
585
584
|
function l() {
|
|
586
585
|
this.constructor = t;
|
|
587
586
|
}
|
|
588
587
|
return l.prototype = e.prototype, t.prototype = new l(), t.__super__ = e.prototype, t;
|
|
589
|
-
},
|
|
590
|
-
D = H().isObject, c =
|
|
591
|
-
|
|
592
|
-
function e(o, l,
|
|
588
|
+
}, h = {}.hasOwnProperty;
|
|
589
|
+
D = H().isObject, c = W(), i = B(), wt.exports = function(t) {
|
|
590
|
+
f(e, t);
|
|
591
|
+
function e(o, l, b, m) {
|
|
593
592
|
var y;
|
|
594
|
-
e.__super__.constructor.call(this, o), D(l) && (y = l, l = y.version,
|
|
593
|
+
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));
|
|
595
594
|
}
|
|
596
595
|
return e.prototype.toString = function(o) {
|
|
597
596
|
return this.options.writer.declaration(this, this.options.writer.filterOptions(o));
|
|
598
597
|
}, e;
|
|
599
598
|
}(c);
|
|
600
|
-
}).call(
|
|
599
|
+
}).call(br)), wt.exports;
|
|
601
600
|
}
|
|
602
|
-
var
|
|
601
|
+
var Tt = { exports: {} }, Dt = { exports: {} }, Or = Dt.exports, Oe;
|
|
603
602
|
function Ht() {
|
|
604
603
|
return Oe || (Oe = 1, (function() {
|
|
605
|
-
var i, c, D = function(
|
|
604
|
+
var i, c, D = function(h, t) {
|
|
606
605
|
for (var e in t)
|
|
607
|
-
|
|
606
|
+
f.call(t, e) && (h[e] = t[e]);
|
|
608
607
|
function o() {
|
|
609
|
-
this.constructor =
|
|
608
|
+
this.constructor = h;
|
|
610
609
|
}
|
|
611
|
-
return o.prototype = t.prototype,
|
|
612
|
-
},
|
|
613
|
-
c =
|
|
614
|
-
D(t,
|
|
615
|
-
function t(e, o, l,
|
|
610
|
+
return o.prototype = t.prototype, h.prototype = new o(), h.__super__ = t.prototype, h;
|
|
611
|
+
}, f = {}.hasOwnProperty;
|
|
612
|
+
c = W(), i = B(), Dt.exports = function(h) {
|
|
613
|
+
D(t, h);
|
|
614
|
+
function t(e, o, l, b, m, y) {
|
|
616
615
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
617
616
|
throw new Error("Missing DTD element name. " + this.debugInfo());
|
|
618
617
|
if (l == null)
|
|
619
618
|
throw new Error("Missing DTD attribute name. " + this.debugInfo(o));
|
|
620
|
-
if (!
|
|
619
|
+
if (!b)
|
|
621
620
|
throw new Error("Missing DTD attribute type. " + this.debugInfo(o));
|
|
622
621
|
if (!m)
|
|
623
622
|
throw new Error("Missing DTD attribute default. " + this.debugInfo(o));
|
|
@@ -625,41 +624,41 @@ function Ht() {
|
|
|
625
624
|
throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(o));
|
|
626
625
|
if (y && !m.match(/^(#FIXED|#DEFAULT)$/))
|
|
627
626
|
throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(o));
|
|
628
|
-
this.elementName = this.stringify.name(o), this.type = i.AttributeDeclaration, this.attributeName = this.stringify.name(l), this.attributeType = this.stringify.dtdAttType(
|
|
627
|
+
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;
|
|
629
628
|
}
|
|
630
629
|
return t.prototype.toString = function(e) {
|
|
631
630
|
return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(e));
|
|
632
631
|
}, t;
|
|
633
632
|
}(c);
|
|
634
|
-
}).call(
|
|
633
|
+
}).call(Or)), Dt.exports;
|
|
635
634
|
}
|
|
636
|
-
var
|
|
635
|
+
var Et = { exports: {} }, Nr = Et.exports, Ne;
|
|
637
636
|
function Qt() {
|
|
638
637
|
return Ne || (Ne = 1, (function() {
|
|
639
|
-
var i, c, D,
|
|
638
|
+
var i, c, D, f = function(t, e) {
|
|
640
639
|
for (var o in e)
|
|
641
|
-
|
|
640
|
+
h.call(e, o) && (t[o] = e[o]);
|
|
642
641
|
function l() {
|
|
643
642
|
this.constructor = t;
|
|
644
643
|
}
|
|
645
644
|
return l.prototype = e.prototype, t.prototype = new l(), t.__super__ = e.prototype, t;
|
|
646
|
-
},
|
|
647
|
-
D = H().isObject, c =
|
|
648
|
-
|
|
649
|
-
function e(o, l,
|
|
650
|
-
if (e.__super__.constructor.call(this, o),
|
|
651
|
-
throw new Error("Missing DTD entity name. " + this.debugInfo(
|
|
645
|
+
}, h = {}.hasOwnProperty;
|
|
646
|
+
D = H().isObject, c = W(), i = B(), Et.exports = function(t) {
|
|
647
|
+
f(e, t);
|
|
648
|
+
function e(o, l, b, m) {
|
|
649
|
+
if (e.__super__.constructor.call(this, o), b == null)
|
|
650
|
+
throw new Error("Missing DTD entity name. " + this.debugInfo(b));
|
|
652
651
|
if (m == null)
|
|
653
|
-
throw new Error("Missing DTD entity value. " + this.debugInfo(
|
|
654
|
-
if (this.pe = !!l, this.name = this.stringify.name(
|
|
652
|
+
throw new Error("Missing DTD entity value. " + this.debugInfo(b));
|
|
653
|
+
if (this.pe = !!l, this.name = this.stringify.name(b), this.type = i.EntityDeclaration, !D(m))
|
|
655
654
|
this.value = this.stringify.dtdEntityValue(m), this.internal = !0;
|
|
656
655
|
else {
|
|
657
656
|
if (!m.pubID && !m.sysID)
|
|
658
|
-
throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(
|
|
657
|
+
throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(b));
|
|
659
658
|
if (m.pubID && !m.sysID)
|
|
660
|
-
throw new Error("System identifier is required for a public external entity. " + this.debugInfo(
|
|
659
|
+
throw new Error("System identifier is required for a public external entity. " + this.debugInfo(b));
|
|
661
660
|
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)
|
|
662
|
-
throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(
|
|
661
|
+
throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(b));
|
|
663
662
|
}
|
|
664
663
|
}
|
|
665
664
|
return Object.defineProperty(e.prototype, "publicId", {
|
|
@@ -690,21 +689,21 @@ function Qt() {
|
|
|
690
689
|
return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(o));
|
|
691
690
|
}, e;
|
|
692
691
|
}(c);
|
|
693
|
-
}).call(
|
|
692
|
+
}).call(Nr)), Et.exports;
|
|
694
693
|
}
|
|
695
|
-
var
|
|
694
|
+
var bt = { exports: {} }, vr = bt.exports, ve;
|
|
696
695
|
function Zt() {
|
|
697
696
|
return ve || (ve = 1, (function() {
|
|
698
|
-
var i, c, D = function(
|
|
697
|
+
var i, c, D = function(h, t) {
|
|
699
698
|
for (var e in t)
|
|
700
|
-
|
|
699
|
+
f.call(t, e) && (h[e] = t[e]);
|
|
701
700
|
function o() {
|
|
702
|
-
this.constructor =
|
|
701
|
+
this.constructor = h;
|
|
703
702
|
}
|
|
704
|
-
return o.prototype = t.prototype,
|
|
705
|
-
},
|
|
706
|
-
c =
|
|
707
|
-
D(t,
|
|
703
|
+
return o.prototype = t.prototype, h.prototype = new o(), h.__super__ = t.prototype, h;
|
|
704
|
+
}, f = {}.hasOwnProperty;
|
|
705
|
+
c = W(), i = B(), bt.exports = function(h) {
|
|
706
|
+
D(t, h);
|
|
708
707
|
function t(e, o, l) {
|
|
709
708
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
710
709
|
throw new Error("Missing DTD element name. " + this.debugInfo());
|
|
@@ -714,21 +713,21 @@ function Zt() {
|
|
|
714
713
|
return this.options.writer.dtdElement(this, this.options.writer.filterOptions(e));
|
|
715
714
|
}, t;
|
|
716
715
|
}(c);
|
|
717
|
-
}).call(
|
|
716
|
+
}).call(vr)), bt.exports;
|
|
718
717
|
}
|
|
719
|
-
var
|
|
718
|
+
var Ot = { exports: {} }, Lr = Ot.exports, Le;
|
|
720
719
|
function Jt() {
|
|
721
|
-
return
|
|
722
|
-
var i, c, D = function(
|
|
720
|
+
return Le || (Le = 1, (function() {
|
|
721
|
+
var i, c, D = function(h, t) {
|
|
723
722
|
for (var e in t)
|
|
724
|
-
|
|
723
|
+
f.call(t, e) && (h[e] = t[e]);
|
|
725
724
|
function o() {
|
|
726
|
-
this.constructor =
|
|
725
|
+
this.constructor = h;
|
|
727
726
|
}
|
|
728
|
-
return o.prototype = t.prototype,
|
|
729
|
-
},
|
|
730
|
-
c =
|
|
731
|
-
D(t,
|
|
727
|
+
return o.prototype = t.prototype, h.prototype = new o(), h.__super__ = t.prototype, h;
|
|
728
|
+
}, f = {}.hasOwnProperty;
|
|
729
|
+
c = W(), i = B(), Ot.exports = function(h) {
|
|
730
|
+
D(t, h);
|
|
732
731
|
function t(e, o, l) {
|
|
733
732
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
734
733
|
throw new Error("Missing DTD notation name. " + this.debugInfo(o));
|
|
@@ -748,45 +747,45 @@ function Jt() {
|
|
|
748
747
|
return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(e));
|
|
749
748
|
}, t;
|
|
750
749
|
}(c);
|
|
751
|
-
}).call(
|
|
750
|
+
}).call(Lr)), Ot.exports;
|
|
752
751
|
}
|
|
753
|
-
var
|
|
752
|
+
var Ir = Tt.exports, Ie;
|
|
754
753
|
function te() {
|
|
755
|
-
return
|
|
756
|
-
var i, c, D,
|
|
754
|
+
return Ie || (Ie = 1, (function() {
|
|
755
|
+
var i, c, D, f, h, t, e, o, l = function(m, y) {
|
|
757
756
|
for (var d in y)
|
|
758
|
-
|
|
757
|
+
b.call(y, d) && (m[d] = y[d]);
|
|
759
758
|
function g() {
|
|
760
759
|
this.constructor = m;
|
|
761
760
|
}
|
|
762
761
|
return g.prototype = y.prototype, m.prototype = new g(), m.__super__ = y.prototype, m;
|
|
763
|
-
},
|
|
764
|
-
o = H().isObject, e =
|
|
762
|
+
}, b = {}.hasOwnProperty;
|
|
763
|
+
o = H().isObject, e = W(), i = B(), c = Ht(), f = Qt(), D = Zt(), h = Jt(), t = Wt(), Tt.exports = function(m) {
|
|
765
764
|
l(y, m);
|
|
766
|
-
function y(d, g,
|
|
767
|
-
var
|
|
765
|
+
function y(d, g, O) {
|
|
766
|
+
var I, x, P, E, s, a;
|
|
768
767
|
if (y.__super__.constructor.call(this, d), this.type = i.DocType, d.children) {
|
|
769
|
-
for (E = d.children,
|
|
770
|
-
if (
|
|
771
|
-
this.name =
|
|
768
|
+
for (E = d.children, x = 0, P = E.length; x < P; x++)
|
|
769
|
+
if (I = E[x], I.type === i.Element) {
|
|
770
|
+
this.name = I.name;
|
|
772
771
|
break;
|
|
773
772
|
}
|
|
774
773
|
}
|
|
775
|
-
this.documentObject = d, o(g) && (s = g, g = s.pubID,
|
|
774
|
+
this.documentObject = d, o(g) && (s = g, g = s.pubID, O = s.sysID), O == null && (a = [g, O], O = a[0], g = a[1]), g != null && (this.pubID = this.stringify.dtdPubID(g)), O != null && (this.sysID = this.stringify.dtdSysID(O));
|
|
776
775
|
}
|
|
777
776
|
return Object.defineProperty(y.prototype, "entities", {
|
|
778
777
|
get: function() {
|
|
779
|
-
var d, g,
|
|
780
|
-
for (
|
|
781
|
-
d =
|
|
782
|
-
return new t(
|
|
778
|
+
var d, g, O, I, x;
|
|
779
|
+
for (I = {}, x = this.children, g = 0, O = x.length; g < O; g++)
|
|
780
|
+
d = x[g], d.type === i.EntityDeclaration && !d.pe && (I[d.name] = d);
|
|
781
|
+
return new t(I);
|
|
783
782
|
}
|
|
784
783
|
}), Object.defineProperty(y.prototype, "notations", {
|
|
785
784
|
get: function() {
|
|
786
|
-
var d, g,
|
|
787
|
-
for (
|
|
788
|
-
d =
|
|
789
|
-
return new t(
|
|
785
|
+
var d, g, O, I, x;
|
|
786
|
+
for (I = {}, x = this.children, g = 0, O = x.length; g < O; g++)
|
|
787
|
+
d = x[g], d.type === i.NotationDeclaration && (I[d.name] = d);
|
|
788
|
+
return new t(I);
|
|
790
789
|
}
|
|
791
790
|
}), Object.defineProperty(y.prototype, "publicId", {
|
|
792
791
|
get: function() {
|
|
@@ -801,26 +800,26 @@ function te() {
|
|
|
801
800
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
802
801
|
}
|
|
803
802
|
}), y.prototype.element = function(d, g) {
|
|
804
|
-
var
|
|
805
|
-
return
|
|
806
|
-
}, y.prototype.attList = function(d, g,
|
|
807
|
-
var
|
|
808
|
-
return
|
|
803
|
+
var O;
|
|
804
|
+
return O = new D(this, d, g), this.children.push(O), this;
|
|
805
|
+
}, y.prototype.attList = function(d, g, O, I, x) {
|
|
806
|
+
var P;
|
|
807
|
+
return P = new c(this, d, g, O, I, x), this.children.push(P), this;
|
|
809
808
|
}, y.prototype.entity = function(d, g) {
|
|
810
|
-
var
|
|
811
|
-
return
|
|
809
|
+
var O;
|
|
810
|
+
return O = new f(this, !1, d, g), this.children.push(O), this;
|
|
812
811
|
}, y.prototype.pEntity = function(d, g) {
|
|
813
|
-
var
|
|
814
|
-
return
|
|
812
|
+
var O;
|
|
813
|
+
return O = new f(this, !0, d, g), this.children.push(O), this;
|
|
815
814
|
}, y.prototype.notation = function(d, g) {
|
|
816
|
-
var
|
|
817
|
-
return
|
|
815
|
+
var O;
|
|
816
|
+
return O = new h(this, d, g), this.children.push(O), this;
|
|
818
817
|
}, y.prototype.toString = function(d) {
|
|
819
818
|
return this.options.writer.docType(this, this.options.writer.filterOptions(d));
|
|
820
819
|
}, y.prototype.ele = function(d, g) {
|
|
821
820
|
return this.element(d, g);
|
|
822
|
-
}, y.prototype.att = function(d, g,
|
|
823
|
-
return this.attList(d, g,
|
|
821
|
+
}, y.prototype.att = function(d, g, O, I, x) {
|
|
822
|
+
return this.attList(d, g, O, I, x);
|
|
824
823
|
}, y.prototype.ent = function(d, g) {
|
|
825
824
|
return this.entity(d, g);
|
|
826
825
|
}, y.prototype.pent = function(d, g) {
|
|
@@ -833,21 +832,21 @@ function te() {
|
|
|
833
832
|
return !(!y.__super__.isEqualNode.apply(this, arguments).isEqualNode(d) || d.name !== this.name || d.publicId !== this.publicId || d.systemId !== this.systemId);
|
|
834
833
|
}, y;
|
|
835
834
|
}(e);
|
|
836
|
-
}).call(
|
|
835
|
+
}).call(Ir)), Tt.exports;
|
|
837
836
|
}
|
|
838
|
-
var
|
|
837
|
+
var Nt = { exports: {} }, xr = Nt.exports, xe;
|
|
839
838
|
function ee() {
|
|
840
|
-
return
|
|
841
|
-
var i, c, D = function(
|
|
839
|
+
return xe || (xe = 1, (function() {
|
|
840
|
+
var i, c, D = function(h, t) {
|
|
842
841
|
for (var e in t)
|
|
843
|
-
|
|
842
|
+
f.call(t, e) && (h[e] = t[e]);
|
|
844
843
|
function o() {
|
|
845
|
-
this.constructor =
|
|
844
|
+
this.constructor = h;
|
|
846
845
|
}
|
|
847
|
-
return o.prototype = t.prototype,
|
|
848
|
-
},
|
|
849
|
-
i =
|
|
850
|
-
D(t,
|
|
846
|
+
return o.prototype = t.prototype, h.prototype = new o(), h.__super__ = t.prototype, h;
|
|
847
|
+
}, f = {}.hasOwnProperty;
|
|
848
|
+
i = B(), c = W(), Nt.exports = function(h) {
|
|
849
|
+
D(t, h);
|
|
851
850
|
function t(e, o) {
|
|
852
851
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
853
852
|
throw new Error("Missing raw text. " + this.debugInfo());
|
|
@@ -859,21 +858,21 @@ function ee() {
|
|
|
859
858
|
return this.options.writer.raw(this, this.options.writer.filterOptions(e));
|
|
860
859
|
}, t;
|
|
861
860
|
}(c);
|
|
862
|
-
}).call(
|
|
861
|
+
}).call(xr)), Nt.exports;
|
|
863
862
|
}
|
|
864
|
-
var
|
|
863
|
+
var vt = { exports: {} }, Ar = vt.exports, Ae;
|
|
865
864
|
function re() {
|
|
866
|
-
return
|
|
867
|
-
var i, c, D = function(
|
|
865
|
+
return Ae || (Ae = 1, (function() {
|
|
866
|
+
var i, c, D = function(h, t) {
|
|
868
867
|
for (var e in t)
|
|
869
|
-
|
|
868
|
+
f.call(t, e) && (h[e] = t[e]);
|
|
870
869
|
function o() {
|
|
871
|
-
this.constructor =
|
|
870
|
+
this.constructor = h;
|
|
872
871
|
}
|
|
873
|
-
return o.prototype = t.prototype,
|
|
874
|
-
},
|
|
875
|
-
i =
|
|
876
|
-
D(t,
|
|
872
|
+
return o.prototype = t.prototype, h.prototype = new o(), h.__super__ = t.prototype, h;
|
|
873
|
+
}, f = {}.hasOwnProperty;
|
|
874
|
+
i = B(), c = Ft(), vt.exports = function(h) {
|
|
875
|
+
D(t, h);
|
|
877
876
|
function t(e, o) {
|
|
878
877
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
879
878
|
throw new Error("Missing element text. " + this.debugInfo());
|
|
@@ -902,21 +901,21 @@ function re() {
|
|
|
902
901
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
903
902
|
}, t;
|
|
904
903
|
}(c);
|
|
905
|
-
}).call(
|
|
904
|
+
}).call(Ar)), vt.exports;
|
|
906
905
|
}
|
|
907
|
-
var
|
|
906
|
+
var Lt = { exports: {} }, Mr = Lt.exports, Me;
|
|
908
907
|
function ne() {
|
|
909
|
-
return
|
|
910
|
-
var i, c, D = function(
|
|
908
|
+
return Me || (Me = 1, (function() {
|
|
909
|
+
var i, c, D = function(h, t) {
|
|
911
910
|
for (var e in t)
|
|
912
|
-
|
|
911
|
+
f.call(t, e) && (h[e] = t[e]);
|
|
913
912
|
function o() {
|
|
914
|
-
this.constructor =
|
|
913
|
+
this.constructor = h;
|
|
915
914
|
}
|
|
916
|
-
return o.prototype = t.prototype,
|
|
917
|
-
},
|
|
918
|
-
i =
|
|
919
|
-
D(t,
|
|
915
|
+
return o.prototype = t.prototype, h.prototype = new o(), h.__super__ = t.prototype, h;
|
|
916
|
+
}, f = {}.hasOwnProperty;
|
|
917
|
+
i = B(), c = Ft(), Lt.exports = function(h) {
|
|
918
|
+
D(t, h);
|
|
920
919
|
function t(e, o, l) {
|
|
921
920
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
922
921
|
throw new Error("Missing instruction target. " + this.debugInfo());
|
|
@@ -930,21 +929,21 @@ function ne() {
|
|
|
930
929
|
return !(!t.__super__.isEqualNode.apply(this, arguments).isEqualNode(e) || e.target !== this.target);
|
|
931
930
|
}, t;
|
|
932
931
|
}(c);
|
|
933
|
-
}).call(
|
|
932
|
+
}).call(Mr)), Lt.exports;
|
|
934
933
|
}
|
|
935
|
-
var
|
|
936
|
-
function
|
|
937
|
-
return
|
|
938
|
-
var i, c, D = function(
|
|
934
|
+
var It = { exports: {} }, Pr = It.exports, Pe;
|
|
935
|
+
function Ze() {
|
|
936
|
+
return Pe || (Pe = 1, (function() {
|
|
937
|
+
var i, c, D = function(h, t) {
|
|
939
938
|
for (var e in t)
|
|
940
|
-
|
|
939
|
+
f.call(t, e) && (h[e] = t[e]);
|
|
941
940
|
function o() {
|
|
942
|
-
this.constructor =
|
|
941
|
+
this.constructor = h;
|
|
943
942
|
}
|
|
944
|
-
return o.prototype = t.prototype,
|
|
945
|
-
},
|
|
946
|
-
c =
|
|
947
|
-
D(t,
|
|
943
|
+
return o.prototype = t.prototype, h.prototype = new o(), h.__super__ = t.prototype, h;
|
|
944
|
+
}, f = {}.hasOwnProperty;
|
|
945
|
+
c = W(), i = B(), It.exports = function(h) {
|
|
946
|
+
D(t, h);
|
|
948
947
|
function t(e) {
|
|
949
948
|
t.__super__.constructor.call(this, e), this.type = i.Dummy;
|
|
950
949
|
}
|
|
@@ -954,12 +953,12 @@ function Qe() {
|
|
|
954
953
|
return "";
|
|
955
954
|
}, t;
|
|
956
955
|
}(c);
|
|
957
|
-
}).call(
|
|
956
|
+
}).call(Pr)), It.exports;
|
|
958
957
|
}
|
|
959
|
-
var
|
|
960
|
-
function
|
|
961
|
-
return
|
|
962
|
-
|
|
958
|
+
var xt = { exports: {} }, _r = xt.exports, _e;
|
|
959
|
+
function Cr() {
|
|
960
|
+
return _e || (_e = 1, (function() {
|
|
961
|
+
xt.exports = function() {
|
|
963
962
|
function i(c) {
|
|
964
963
|
this.nodes = c;
|
|
965
964
|
}
|
|
@@ -973,12 +972,12 @@ function fr() {
|
|
|
973
972
|
return this.nodes[c] || null;
|
|
974
973
|
}, i;
|
|
975
974
|
}();
|
|
976
|
-
}).call(
|
|
975
|
+
}).call(_r)), xt.exports;
|
|
977
976
|
}
|
|
978
|
-
var
|
|
979
|
-
function
|
|
980
|
-
return
|
|
981
|
-
|
|
977
|
+
var At = { exports: {} }, Sr = At.exports, Ce;
|
|
978
|
+
function Xr() {
|
|
979
|
+
return Ce || (Ce = 1, (function() {
|
|
980
|
+
At.exports = {
|
|
982
981
|
Disconnected: 1,
|
|
983
982
|
Preceding: 2,
|
|
984
983
|
Following: 4,
|
|
@@ -986,15 +985,15 @@ function hr() {
|
|
|
986
985
|
ContainedBy: 16,
|
|
987
986
|
ImplementationSpecific: 32
|
|
988
987
|
};
|
|
989
|
-
}).call(
|
|
988
|
+
}).call(Sr)), At.exports;
|
|
990
989
|
}
|
|
991
|
-
var Se;
|
|
992
|
-
function
|
|
990
|
+
var Fr = lt.exports, Se;
|
|
991
|
+
function W() {
|
|
993
992
|
return Se || (Se = 1, (function() {
|
|
994
|
-
var i, c, D,
|
|
995
|
-
|
|
993
|
+
var i, c, D, f, h, t, e, o, l, b, m, y, d, g, O, I, x, P = {}.hasOwnProperty;
|
|
994
|
+
x = H(), I = x.isObject, O = x.isFunction, g = x.isEmpty, d = x.getValue, o = null, D = null, f = null, h = null, t = null, m = null, y = null, b = null, e = null, c = null, l = null, i = null, lt.exports = function() {
|
|
996
995
|
function E(s) {
|
|
997
|
-
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 =
|
|
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 = Gt(), D = Yt(), f = Kt(), h = zt(), t = te(), m = ee(), y = re(), b = ne(), e = Ze(), c = B(), l = Cr(), Wt(), i = Xr());
|
|
998
997
|
}
|
|
999
998
|
return Object.defineProperty(E.prototype, "nodeName", {
|
|
1000
999
|
get: function() {
|
|
@@ -1040,11 +1039,11 @@ function Y() {
|
|
|
1040
1039
|
}
|
|
1041
1040
|
}), Object.defineProperty(E.prototype, "textContent", {
|
|
1042
1041
|
get: function() {
|
|
1043
|
-
var s, a,
|
|
1042
|
+
var s, a, p, T, L;
|
|
1044
1043
|
if (this.nodeType === c.Element || this.nodeType === c.DocumentFragment) {
|
|
1045
|
-
for (
|
|
1046
|
-
s = T[a], s.textContent && (
|
|
1047
|
-
return
|
|
1044
|
+
for (L = "", T = this.children, a = 0, p = T.length; a < p; a++)
|
|
1045
|
+
s = T[a], s.textContent && (L += s.textContent);
|
|
1046
|
+
return L;
|
|
1048
1047
|
} else
|
|
1049
1048
|
return null;
|
|
1050
1049
|
},
|
|
@@ -1052,71 +1051,71 @@ function Y() {
|
|
|
1052
1051
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1053
1052
|
}
|
|
1054
1053
|
}), E.prototype.setParent = function(s) {
|
|
1055
|
-
var a,
|
|
1056
|
-
for (this.parent = s, s && (this.options = s.options, this.stringify = s.stringify),
|
|
1057
|
-
a =
|
|
1054
|
+
var a, p, T, L, v;
|
|
1055
|
+
for (this.parent = s, s && (this.options = s.options, this.stringify = s.stringify), L = this.children, v = [], p = 0, T = L.length; p < T; p++)
|
|
1056
|
+
a = L[p], v.push(a.setParent(this));
|
|
1058
1057
|
return v;
|
|
1059
|
-
}, E.prototype.element = function(s, a,
|
|
1060
|
-
var T,
|
|
1061
|
-
if (
|
|
1062
|
-
for (v = 0,
|
|
1063
|
-
|
|
1064
|
-
else if (
|
|
1065
|
-
|
|
1066
|
-
else if (
|
|
1058
|
+
}, E.prototype.element = function(s, a, p) {
|
|
1059
|
+
var T, L, v, r, N, A, _, C, X, j, F;
|
|
1060
|
+
if (A = null, a === null && p == null && (X = [{}, null], a = X[0], p = X[1]), a == null && (a = {}), a = d(a), I(a) || (j = [a, p], p = j[0], a = j[1]), s != null && (s = d(s)), Array.isArray(s))
|
|
1061
|
+
for (v = 0, _ = s.length; v < _; v++)
|
|
1062
|
+
L = s[v], A = this.element(L);
|
|
1063
|
+
else if (O(s))
|
|
1064
|
+
A = this.element(s.apply());
|
|
1065
|
+
else if (I(s)) {
|
|
1067
1066
|
for (N in s)
|
|
1068
|
-
if (
|
|
1069
|
-
if (
|
|
1070
|
-
|
|
1071
|
-
else if (!this.options.separateArrayItems && Array.isArray(
|
|
1072
|
-
|
|
1073
|
-
else if (
|
|
1074
|
-
|
|
1075
|
-
else if (!this.options.keepNullNodes &&
|
|
1076
|
-
|
|
1077
|
-
else if (!this.options.separateArrayItems && Array.isArray(
|
|
1078
|
-
for (r = 0,
|
|
1079
|
-
|
|
1080
|
-
else
|
|
1081
|
-
} else !this.options.keepNullNodes &&
|
|
1082
|
-
if (
|
|
1067
|
+
if (P.call(s, N))
|
|
1068
|
+
if (F = s[N], O(F) && (F = F.apply()), !this.options.ignoreDecorators && this.stringify.convertAttKey && N.indexOf(this.stringify.convertAttKey) === 0)
|
|
1069
|
+
A = this.attribute(N.substr(this.stringify.convertAttKey.length), F);
|
|
1070
|
+
else if (!this.options.separateArrayItems && Array.isArray(F) && g(F))
|
|
1071
|
+
A = this.dummy();
|
|
1072
|
+
else if (I(F) && g(F))
|
|
1073
|
+
A = this.element(N);
|
|
1074
|
+
else if (!this.options.keepNullNodes && F == null)
|
|
1075
|
+
A = this.dummy();
|
|
1076
|
+
else if (!this.options.separateArrayItems && Array.isArray(F))
|
|
1077
|
+
for (r = 0, C = F.length; r < C; r++)
|
|
1078
|
+
L = F[r], T = {}, T[N] = L, A = this.element(T);
|
|
1079
|
+
else I(F) ? !this.options.ignoreDecorators && this.stringify.convertTextKey && N.indexOf(this.stringify.convertTextKey) === 0 ? A = this.element(F) : (A = this.element(N), A.element(F)) : A = this.element(N, F);
|
|
1080
|
+
} else !this.options.keepNullNodes && p === null ? A = this.dummy() : !this.options.ignoreDecorators && this.stringify.convertTextKey && s.indexOf(this.stringify.convertTextKey) === 0 ? A = this.text(p) : !this.options.ignoreDecorators && this.stringify.convertCDataKey && s.indexOf(this.stringify.convertCDataKey) === 0 ? A = this.cdata(p) : !this.options.ignoreDecorators && this.stringify.convertCommentKey && s.indexOf(this.stringify.convertCommentKey) === 0 ? A = this.comment(p) : !this.options.ignoreDecorators && this.stringify.convertRawKey && s.indexOf(this.stringify.convertRawKey) === 0 ? A = this.raw(p) : !this.options.ignoreDecorators && this.stringify.convertPIKey && s.indexOf(this.stringify.convertPIKey) === 0 ? A = this.instruction(s.substr(this.stringify.convertPIKey.length), p) : A = this.node(s, a, p);
|
|
1081
|
+
if (A == null)
|
|
1083
1082
|
throw new Error("Could not create any elements with: " + s + ". " + this.debugInfo());
|
|
1084
|
-
return
|
|
1085
|
-
}, E.prototype.insertBefore = function(s, a,
|
|
1086
|
-
var T,
|
|
1083
|
+
return A;
|
|
1084
|
+
}, E.prototype.insertBefore = function(s, a, p) {
|
|
1085
|
+
var T, L, v, r, N;
|
|
1087
1086
|
if (s != null && s.type)
|
|
1088
|
-
return v = s, r = a, v.setParent(this), r ? (
|
|
1087
|
+
return v = s, r = a, v.setParent(this), r ? (L = children.indexOf(r), N = children.splice(L), children.push(v), Array.prototype.push.apply(children, N)) : children.push(v), v;
|
|
1089
1088
|
if (this.isRoot)
|
|
1090
1089
|
throw new Error("Cannot insert elements at root level. " + this.debugInfo(s));
|
|
1091
|
-
return
|
|
1092
|
-
}, E.prototype.insertAfter = function(s, a,
|
|
1093
|
-
var T,
|
|
1090
|
+
return L = this.parent.children.indexOf(this), N = this.parent.children.splice(L), T = this.parent.element(s, a, p), Array.prototype.push.apply(this.parent.children, N), T;
|
|
1091
|
+
}, E.prototype.insertAfter = function(s, a, p) {
|
|
1092
|
+
var T, L, v;
|
|
1094
1093
|
if (this.isRoot)
|
|
1095
1094
|
throw new Error("Cannot insert elements at root level. " + this.debugInfo(s));
|
|
1096
|
-
return
|
|
1095
|
+
return L = this.parent.children.indexOf(this), v = this.parent.children.splice(L + 1), T = this.parent.element(s, a, p), Array.prototype.push.apply(this.parent.children, v), T;
|
|
1097
1096
|
}, E.prototype.remove = function() {
|
|
1098
1097
|
var s;
|
|
1099
1098
|
if (this.isRoot)
|
|
1100
1099
|
throw new Error("Cannot remove the root element. " + this.debugInfo());
|
|
1101
1100
|
return s = this.parent.children.indexOf(this), [].splice.apply(this.parent.children, [s, s - s + 1].concat([])), this.parent;
|
|
1102
|
-
}, E.prototype.node = function(s, a,
|
|
1103
|
-
var T,
|
|
1104
|
-
return s != null && (s = d(s)), a || (a = {}), a = d(a),
|
|
1101
|
+
}, E.prototype.node = function(s, a, p) {
|
|
1102
|
+
var T, L;
|
|
1103
|
+
return s != null && (s = d(s)), a || (a = {}), a = d(a), I(a) || (L = [a, p], p = L[0], a = L[1]), T = new o(this, s, a), p != null && T.text(p), this.children.push(T), T;
|
|
1105
1104
|
}, E.prototype.text = function(s) {
|
|
1106
1105
|
var a;
|
|
1107
|
-
return
|
|
1106
|
+
return I(s) && this.element(s), a = new y(this, s), this.children.push(a), this;
|
|
1108
1107
|
}, E.prototype.cdata = function(s) {
|
|
1109
1108
|
var a;
|
|
1110
1109
|
return a = new D(this, s), this.children.push(a), this;
|
|
1111
1110
|
}, E.prototype.comment = function(s) {
|
|
1112
1111
|
var a;
|
|
1113
|
-
return a = new
|
|
1112
|
+
return a = new f(this, s), this.children.push(a), this;
|
|
1114
1113
|
}, E.prototype.commentBefore = function(s) {
|
|
1115
|
-
var a,
|
|
1116
|
-
return a = this.parent.children.indexOf(this),
|
|
1114
|
+
var a, p;
|
|
1115
|
+
return a = this.parent.children.indexOf(this), p = this.parent.children.splice(a), this.parent.comment(s), Array.prototype.push.apply(this.parent.children, p), this;
|
|
1117
1116
|
}, E.prototype.commentAfter = function(s) {
|
|
1118
|
-
var a,
|
|
1119
|
-
return a = this.parent.children.indexOf(this),
|
|
1117
|
+
var a, p;
|
|
1118
|
+
return a = this.parent.children.indexOf(this), p = this.parent.children.splice(a + 1), this.parent.comment(s), Array.prototype.push.apply(this.parent.children, p), this;
|
|
1120
1119
|
}, E.prototype.raw = function(s) {
|
|
1121
1120
|
var a;
|
|
1122
1121
|
return a = new m(this, s), this.children.push(a), this;
|
|
@@ -1124,34 +1123,34 @@ function Y() {
|
|
|
1124
1123
|
var s;
|
|
1125
1124
|
return s = new e(this), s;
|
|
1126
1125
|
}, E.prototype.instruction = function(s, a) {
|
|
1127
|
-
var
|
|
1126
|
+
var p, T, L, v, r;
|
|
1128
1127
|
if (s != null && (s = d(s)), a != null && (a = d(a)), Array.isArray(s))
|
|
1129
1128
|
for (v = 0, r = s.length; v < r; v++)
|
|
1130
|
-
|
|
1131
|
-
else if (
|
|
1132
|
-
for (
|
|
1133
|
-
|
|
1129
|
+
p = s[v], this.instruction(p);
|
|
1130
|
+
else if (I(s))
|
|
1131
|
+
for (p in s)
|
|
1132
|
+
P.call(s, p) && (T = s[p], this.instruction(p, T));
|
|
1134
1133
|
else
|
|
1135
|
-
|
|
1134
|
+
O(a) && (a = a.apply()), L = new b(this, s, a), this.children.push(L);
|
|
1136
1135
|
return this;
|
|
1137
1136
|
}, E.prototype.instructionBefore = function(s, a) {
|
|
1138
|
-
var
|
|
1139
|
-
return
|
|
1137
|
+
var p, T;
|
|
1138
|
+
return p = this.parent.children.indexOf(this), T = this.parent.children.splice(p), this.parent.instruction(s, a), Array.prototype.push.apply(this.parent.children, T), this;
|
|
1140
1139
|
}, E.prototype.instructionAfter = function(s, a) {
|
|
1141
|
-
var
|
|
1142
|
-
return
|
|
1143
|
-
}, E.prototype.declaration = function(s, a,
|
|
1144
|
-
var T,
|
|
1145
|
-
return T = this.document(),
|
|
1140
|
+
var p, T;
|
|
1141
|
+
return p = this.parent.children.indexOf(this), T = this.parent.children.splice(p + 1), this.parent.instruction(s, a), Array.prototype.push.apply(this.parent.children, T), this;
|
|
1142
|
+
}, E.prototype.declaration = function(s, a, p) {
|
|
1143
|
+
var T, L;
|
|
1144
|
+
return T = this.document(), L = new h(T, s, a, p), T.children.length === 0 ? T.children.unshift(L) : T.children[0].type === c.Declaration ? T.children[0] = L : T.children.unshift(L), T.root() || T;
|
|
1146
1145
|
}, E.prototype.dtd = function(s, a) {
|
|
1147
|
-
var
|
|
1148
|
-
for (T = this.document(),
|
|
1149
|
-
if (
|
|
1150
|
-
return T.children[v] =
|
|
1151
|
-
for (X = T.children, v = N = 0,
|
|
1152
|
-
if (
|
|
1153
|
-
return T.children.splice(v, 0,
|
|
1154
|
-
return T.children.push(
|
|
1146
|
+
var p, T, L, v, r, N, A, _, C, X;
|
|
1147
|
+
for (T = this.document(), L = new t(T, s, a), C = T.children, v = r = 0, A = C.length; r < A; v = ++r)
|
|
1148
|
+
if (p = C[v], p.type === c.DocType)
|
|
1149
|
+
return T.children[v] = L, L;
|
|
1150
|
+
for (X = T.children, v = N = 0, _ = X.length; N < _; v = ++N)
|
|
1151
|
+
if (p = X[v], p.isRoot)
|
|
1152
|
+
return T.children.splice(v, 0, L), L;
|
|
1153
|
+
return T.children.push(L), L;
|
|
1155
1154
|
}, E.prototype.up = function() {
|
|
1156
1155
|
if (this.isRoot)
|
|
1157
1156
|
throw new Error("The root node has no parent. Use doc() if you need to get the document object.");
|
|
@@ -1188,12 +1187,12 @@ function Y() {
|
|
|
1188
1187
|
var a;
|
|
1189
1188
|
return a = s.root().clone(), a.parent = this, a.isRoot = !1, this.children.push(a), this;
|
|
1190
1189
|
}, E.prototype.debugInfo = function(s) {
|
|
1191
|
-
var a,
|
|
1192
|
-
return s = s || this.name, s == null && !((a = this.parent) != null && a.name) ? "" : s == null ? "parent: <" + this.parent.name + ">" : (
|
|
1193
|
-
}, E.prototype.ele = function(s, a,
|
|
1194
|
-
return this.element(s, a,
|
|
1195
|
-
}, E.prototype.nod = function(s, a,
|
|
1196
|
-
return this.node(s, a,
|
|
1190
|
+
var a, p;
|
|
1191
|
+
return s = s || this.name, s == null && !((a = this.parent) != null && a.name) ? "" : s == null ? "parent: <" + this.parent.name + ">" : (p = this.parent) != null && p.name ? "node: <" + s + ">, parent: <" + this.parent.name + ">" : "node: <" + s + ">";
|
|
1192
|
+
}, E.prototype.ele = function(s, a, p) {
|
|
1193
|
+
return this.element(s, a, p);
|
|
1194
|
+
}, E.prototype.nod = function(s, a, p) {
|
|
1195
|
+
return this.node(s, a, p);
|
|
1197
1196
|
}, E.prototype.txt = function(s) {
|
|
1198
1197
|
return this.text(s);
|
|
1199
1198
|
}, E.prototype.dat = function(s) {
|
|
@@ -1204,12 +1203,12 @@ function Y() {
|
|
|
1204
1203
|
return this.instruction(s, a);
|
|
1205
1204
|
}, E.prototype.doc = function() {
|
|
1206
1205
|
return this.document();
|
|
1207
|
-
}, E.prototype.dec = function(s, a,
|
|
1208
|
-
return this.declaration(s, a,
|
|
1209
|
-
}, E.prototype.e = function(s, a,
|
|
1210
|
-
return this.element(s, a,
|
|
1211
|
-
}, E.prototype.n = function(s, a,
|
|
1212
|
-
return this.node(s, a,
|
|
1206
|
+
}, E.prototype.dec = function(s, a, p) {
|
|
1207
|
+
return this.declaration(s, a, p);
|
|
1208
|
+
}, E.prototype.e = function(s, a, p) {
|
|
1209
|
+
return this.element(s, a, p);
|
|
1210
|
+
}, E.prototype.n = function(s, a, p) {
|
|
1211
|
+
return this.node(s, a, p);
|
|
1213
1212
|
}, E.prototype.t = function(s) {
|
|
1214
1213
|
return this.text(s);
|
|
1215
1214
|
}, E.prototype.d = function(s) {
|
|
@@ -1241,8 +1240,8 @@ function Y() {
|
|
|
1241
1240
|
}, E.prototype.hasAttributes = function() {
|
|
1242
1241
|
return this.attribs.length !== 0;
|
|
1243
1242
|
}, E.prototype.compareDocumentPosition = function(s) {
|
|
1244
|
-
var a,
|
|
1245
|
-
return a = this, a === s ? 0 : this.document() !== s.document() ? (
|
|
1243
|
+
var a, p;
|
|
1244
|
+
return a = this, a === s ? 0 : this.document() !== s.document() ? (p = i.Disconnected | i.ImplementationSpecific, Math.random() < 0.5 ? p |= i.Preceding : p |= i.Following, p) : a.isAncestor(s) ? i.Contains | i.Preceding : a.isDescendant(s) ? i.Contains | i.Following : a.isPreceding(s) ? i.Preceding : i.Following;
|
|
1246
1245
|
}, E.prototype.isSameNode = function(s) {
|
|
1247
1246
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1248
1247
|
}, E.prototype.lookupPrefix = function(s) {
|
|
@@ -1252,226 +1251,226 @@ function Y() {
|
|
|
1252
1251
|
}, E.prototype.lookupNamespaceURI = function(s) {
|
|
1253
1252
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1254
1253
|
}, E.prototype.isEqualNode = function(s) {
|
|
1255
|
-
var a,
|
|
1254
|
+
var a, p, T;
|
|
1256
1255
|
if (s.nodeType !== this.nodeType || s.children.length !== this.children.length)
|
|
1257
1256
|
return !1;
|
|
1258
|
-
for (a =
|
|
1257
|
+
for (a = p = 0, T = this.children.length - 1; 0 <= T ? p <= T : p >= T; a = 0 <= T ? ++p : --p)
|
|
1259
1258
|
if (!this.children[a].isEqualNode(s.children[a]))
|
|
1260
1259
|
return !1;
|
|
1261
1260
|
return !0;
|
|
1262
1261
|
}, E.prototype.getFeature = function(s, a) {
|
|
1263
1262
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1264
|
-
}, E.prototype.setUserData = function(s, a,
|
|
1263
|
+
}, E.prototype.setUserData = function(s, a, p) {
|
|
1265
1264
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1266
1265
|
}, E.prototype.getUserData = function(s) {
|
|
1267
1266
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1268
1267
|
}, E.prototype.contains = function(s) {
|
|
1269
1268
|
return s ? s === this || this.isDescendant(s) : !1;
|
|
1270
1269
|
}, E.prototype.isDescendant = function(s) {
|
|
1271
|
-
var a,
|
|
1272
|
-
for (v = this.children, T = 0,
|
|
1273
|
-
if (a = v[T], s === a || (
|
|
1270
|
+
var a, p, T, L, v;
|
|
1271
|
+
for (v = this.children, T = 0, L = v.length; T < L; T++)
|
|
1272
|
+
if (a = v[T], s === a || (p = a.isDescendant(s), p))
|
|
1274
1273
|
return !0;
|
|
1275
1274
|
return !1;
|
|
1276
1275
|
}, E.prototype.isAncestor = function(s) {
|
|
1277
1276
|
return s.isDescendant(this);
|
|
1278
1277
|
}, E.prototype.isPreceding = function(s) {
|
|
1279
|
-
var a,
|
|
1280
|
-
return a = this.treePosition(s),
|
|
1278
|
+
var a, p;
|
|
1279
|
+
return a = this.treePosition(s), p = this.treePosition(this), a === -1 || p === -1 ? !1 : a < p;
|
|
1281
1280
|
}, E.prototype.isFollowing = function(s) {
|
|
1282
|
-
var a,
|
|
1283
|
-
return a = this.treePosition(s),
|
|
1281
|
+
var a, p;
|
|
1282
|
+
return a = this.treePosition(s), p = this.treePosition(this), a === -1 || p === -1 ? !1 : a > p;
|
|
1284
1283
|
}, E.prototype.treePosition = function(s) {
|
|
1285
|
-
var a,
|
|
1286
|
-
return
|
|
1287
|
-
if (
|
|
1284
|
+
var a, p;
|
|
1285
|
+
return p = 0, a = !1, this.foreachTreeNode(this.document(), function(T) {
|
|
1286
|
+
if (p++, !a && T === s)
|
|
1288
1287
|
return a = !0;
|
|
1289
|
-
}), a ?
|
|
1288
|
+
}), a ? p : -1;
|
|
1290
1289
|
}, E.prototype.foreachTreeNode = function(s, a) {
|
|
1291
|
-
var
|
|
1292
|
-
for (s || (s = this.document()), v = s.children, T = 0,
|
|
1293
|
-
if (
|
|
1290
|
+
var p, T, L, v, r;
|
|
1291
|
+
for (s || (s = this.document()), v = s.children, T = 0, L = v.length; T < L; T++) {
|
|
1292
|
+
if (p = v[T], r = a(p))
|
|
1294
1293
|
return r;
|
|
1295
|
-
if (r = this.foreachTreeNode(
|
|
1294
|
+
if (r = this.foreachTreeNode(p, a), r)
|
|
1296
1295
|
return r;
|
|
1297
1296
|
}
|
|
1298
1297
|
}, E;
|
|
1299
1298
|
}();
|
|
1300
|
-
}).call(
|
|
1299
|
+
}).call(Fr)), lt.exports;
|
|
1301
1300
|
}
|
|
1302
|
-
var
|
|
1303
|
-
function
|
|
1304
|
-
return
|
|
1305
|
-
var i = function(D,
|
|
1301
|
+
var Mt = { exports: {} }, Rr = Mt.exports, Xe;
|
|
1302
|
+
function Je() {
|
|
1303
|
+
return Xe || (Xe = 1, (function() {
|
|
1304
|
+
var i = function(D, f) {
|
|
1306
1305
|
return function() {
|
|
1307
|
-
return D.apply(
|
|
1306
|
+
return D.apply(f, arguments);
|
|
1308
1307
|
};
|
|
1309
1308
|
}, c = {}.hasOwnProperty;
|
|
1310
|
-
|
|
1311
|
-
function D(
|
|
1309
|
+
Mt.exports = function() {
|
|
1310
|
+
function D(f) {
|
|
1312
1311
|
this.assertLegalName = i(this.assertLegalName, this), this.assertLegalChar = i(this.assertLegalChar, this);
|
|
1313
|
-
var
|
|
1314
|
-
|
|
1315
|
-
for (
|
|
1316
|
-
c.call(t,
|
|
1317
|
-
}
|
|
1318
|
-
return D.prototype.name = function(
|
|
1319
|
-
return this.options.noValidation ?
|
|
1320
|
-
}, D.prototype.text = function(
|
|
1321
|
-
return this.options.noValidation ?
|
|
1322
|
-
}, D.prototype.cdata = function(
|
|
1323
|
-
return this.options.noValidation ?
|
|
1324
|
-
}, D.prototype.comment = function(
|
|
1312
|
+
var h, t, e;
|
|
1313
|
+
f || (f = {}), this.options = f, this.options.version || (this.options.version = "1.0"), t = f.stringify || {};
|
|
1314
|
+
for (h in t)
|
|
1315
|
+
c.call(t, h) && (e = t[h], this[h] = e);
|
|
1316
|
+
}
|
|
1317
|
+
return D.prototype.name = function(f) {
|
|
1318
|
+
return this.options.noValidation ? f : this.assertLegalName("" + f || "");
|
|
1319
|
+
}, D.prototype.text = function(f) {
|
|
1320
|
+
return this.options.noValidation ? f : this.assertLegalChar(this.textEscape("" + f || ""));
|
|
1321
|
+
}, D.prototype.cdata = function(f) {
|
|
1322
|
+
return this.options.noValidation ? f : (f = "" + f || "", f = f.replace("]]>", "]]]]><![CDATA[>"), this.assertLegalChar(f));
|
|
1323
|
+
}, D.prototype.comment = function(f) {
|
|
1325
1324
|
if (this.options.noValidation)
|
|
1326
|
-
return
|
|
1327
|
-
if (
|
|
1328
|
-
throw new Error("Comment text cannot contain double-hypen: " +
|
|
1329
|
-
return this.assertLegalChar(
|
|
1330
|
-
}, D.prototype.raw = function(
|
|
1331
|
-
return this.options.noValidation ?
|
|
1332
|
-
}, D.prototype.attValue = function(
|
|
1333
|
-
return this.options.noValidation ?
|
|
1334
|
-
}, D.prototype.insTarget = function(
|
|
1335
|
-
return this.options.noValidation ?
|
|
1336
|
-
}, D.prototype.insValue = function(
|
|
1325
|
+
return f;
|
|
1326
|
+
if (f = "" + f || "", f.match(/--/))
|
|
1327
|
+
throw new Error("Comment text cannot contain double-hypen: " + f);
|
|
1328
|
+
return this.assertLegalChar(f);
|
|
1329
|
+
}, D.prototype.raw = function(f) {
|
|
1330
|
+
return this.options.noValidation ? f : "" + f || "";
|
|
1331
|
+
}, D.prototype.attValue = function(f) {
|
|
1332
|
+
return this.options.noValidation ? f : this.assertLegalChar(this.attEscape(f = "" + f || ""));
|
|
1333
|
+
}, D.prototype.insTarget = function(f) {
|
|
1334
|
+
return this.options.noValidation ? f : this.assertLegalChar("" + f || "");
|
|
1335
|
+
}, D.prototype.insValue = function(f) {
|
|
1337
1336
|
if (this.options.noValidation)
|
|
1338
|
-
return
|
|
1339
|
-
if (
|
|
1340
|
-
throw new Error("Invalid processing instruction value: " +
|
|
1341
|
-
return this.assertLegalChar(
|
|
1342
|
-
}, D.prototype.xmlVersion = function(
|
|
1337
|
+
return f;
|
|
1338
|
+
if (f = "" + f || "", f.match(/\?>/))
|
|
1339
|
+
throw new Error("Invalid processing instruction value: " + f);
|
|
1340
|
+
return this.assertLegalChar(f);
|
|
1341
|
+
}, D.prototype.xmlVersion = function(f) {
|
|
1343
1342
|
if (this.options.noValidation)
|
|
1344
|
-
return
|
|
1345
|
-
if (
|
|
1346
|
-
throw new Error("Invalid version number: " +
|
|
1347
|
-
return
|
|
1348
|
-
}, D.prototype.xmlEncoding = function(
|
|
1343
|
+
return f;
|
|
1344
|
+
if (f = "" + f || "", !f.match(/1\.[0-9]+/))
|
|
1345
|
+
throw new Error("Invalid version number: " + f);
|
|
1346
|
+
return f;
|
|
1347
|
+
}, D.prototype.xmlEncoding = function(f) {
|
|
1349
1348
|
if (this.options.noValidation)
|
|
1350
|
-
return
|
|
1351
|
-
if (
|
|
1352
|
-
throw new Error("Invalid encoding: " +
|
|
1353
|
-
return this.assertLegalChar(
|
|
1354
|
-
}, D.prototype.xmlStandalone = function(
|
|
1355
|
-
return this.options.noValidation ?
|
|
1356
|
-
}, D.prototype.dtdPubID = function(
|
|
1357
|
-
return this.options.noValidation ?
|
|
1358
|
-
}, D.prototype.dtdSysID = function(
|
|
1359
|
-
return this.options.noValidation ?
|
|
1360
|
-
}, D.prototype.dtdElementValue = function(
|
|
1361
|
-
return this.options.noValidation ?
|
|
1362
|
-
}, D.prototype.dtdAttType = function(
|
|
1363
|
-
return this.options.noValidation ?
|
|
1364
|
-
}, D.prototype.dtdAttDefault = function(
|
|
1365
|
-
return this.options.noValidation ?
|
|
1366
|
-
}, D.prototype.dtdEntityValue = function(
|
|
1367
|
-
return this.options.noValidation ?
|
|
1368
|
-
}, D.prototype.dtdNData = function(
|
|
1369
|
-
return this.options.noValidation ?
|
|
1370
|
-
}, 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(
|
|
1371
|
-
var
|
|
1349
|
+
return f;
|
|
1350
|
+
if (f = "" + f || "", !f.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))
|
|
1351
|
+
throw new Error("Invalid encoding: " + f);
|
|
1352
|
+
return this.assertLegalChar(f);
|
|
1353
|
+
}, D.prototype.xmlStandalone = function(f) {
|
|
1354
|
+
return this.options.noValidation ? f : f ? "yes" : "no";
|
|
1355
|
+
}, D.prototype.dtdPubID = function(f) {
|
|
1356
|
+
return this.options.noValidation ? f : this.assertLegalChar("" + f || "");
|
|
1357
|
+
}, D.prototype.dtdSysID = function(f) {
|
|
1358
|
+
return this.options.noValidation ? f : this.assertLegalChar("" + f || "");
|
|
1359
|
+
}, D.prototype.dtdElementValue = function(f) {
|
|
1360
|
+
return this.options.noValidation ? f : this.assertLegalChar("" + f || "");
|
|
1361
|
+
}, D.prototype.dtdAttType = function(f) {
|
|
1362
|
+
return this.options.noValidation ? f : this.assertLegalChar("" + f || "");
|
|
1363
|
+
}, D.prototype.dtdAttDefault = function(f) {
|
|
1364
|
+
return this.options.noValidation ? f : this.assertLegalChar("" + f || "");
|
|
1365
|
+
}, D.prototype.dtdEntityValue = function(f) {
|
|
1366
|
+
return this.options.noValidation ? f : this.assertLegalChar("" + f || "");
|
|
1367
|
+
}, D.prototype.dtdNData = function(f) {
|
|
1368
|
+
return this.options.noValidation ? f : this.assertLegalChar("" + f || "");
|
|
1369
|
+
}, D.prototype.convertAttKey = "@", D.prototype.convertPIKey = "?", D.prototype.convertTextKey = "#text", D.prototype.convertCDataKey = "#cdata", D.prototype.convertCommentKey = "#comment", D.prototype.convertRawKey = "#raw", D.prototype.assertLegalChar = function(f) {
|
|
1370
|
+
var h, t;
|
|
1372
1371
|
if (this.options.noValidation)
|
|
1373
|
-
return
|
|
1374
|
-
if (
|
|
1375
|
-
if (
|
|
1376
|
-
throw new Error("Invalid character in string: " +
|
|
1377
|
-
} else if (this.options.version === "1.1" && (
|
|
1378
|
-
throw new Error("Invalid character in string: " +
|
|
1379
|
-
return
|
|
1380
|
-
}, D.prototype.assertLegalName = function(
|
|
1381
|
-
var
|
|
1372
|
+
return f;
|
|
1373
|
+
if (h = "", this.options.version === "1.0") {
|
|
1374
|
+
if (h = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, t = f.match(h))
|
|
1375
|
+
throw new Error("Invalid character in string: " + f + " at index " + t.index);
|
|
1376
|
+
} else if (this.options.version === "1.1" && (h = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, t = f.match(h)))
|
|
1377
|
+
throw new Error("Invalid character in string: " + f + " at index " + t.index);
|
|
1378
|
+
return f;
|
|
1379
|
+
}, D.prototype.assertLegalName = function(f) {
|
|
1380
|
+
var h;
|
|
1382
1381
|
if (this.options.noValidation)
|
|
1383
|
-
return
|
|
1384
|
-
if (this.assertLegalChar(
|
|
1382
|
+
return f;
|
|
1383
|
+
if (this.assertLegalChar(f), h = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/, !f.match(h))
|
|
1385
1384
|
throw new Error("Invalid character in name");
|
|
1386
|
-
return
|
|
1387
|
-
}, D.prototype.textEscape = function(
|
|
1388
|
-
var
|
|
1389
|
-
return this.options.noValidation ?
|
|
1390
|
-
}, D.prototype.attEscape = function(
|
|
1391
|
-
var
|
|
1392
|
-
return this.options.noValidation ?
|
|
1385
|
+
return f;
|
|
1386
|
+
}, D.prototype.textEscape = function(f) {
|
|
1387
|
+
var h;
|
|
1388
|
+
return this.options.noValidation ? f : (h = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g, f.replace(h, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\r/g, "
"));
|
|
1389
|
+
}, D.prototype.attEscape = function(f) {
|
|
1390
|
+
var h;
|
|
1391
|
+
return this.options.noValidation ? f : (h = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g, f.replace(h, "&").replace(/</g, "<").replace(/"/g, """).replace(/\t/g, "	").replace(/\n/g, "
").replace(/\r/g, "
"));
|
|
1393
1392
|
}, D;
|
|
1394
1393
|
}();
|
|
1395
|
-
}).call(
|
|
1394
|
+
}).call(Rr)), Mt.exports;
|
|
1396
1395
|
}
|
|
1397
|
-
var
|
|
1398
|
-
function
|
|
1399
|
-
return
|
|
1400
|
-
|
|
1396
|
+
var Pt = { exports: {} }, _t = { exports: {} }, Ct = { exports: {} }, jr = Ct.exports, Fe;
|
|
1397
|
+
function Rt() {
|
|
1398
|
+
return Fe || (Fe = 1, (function() {
|
|
1399
|
+
Ct.exports = {
|
|
1401
1400
|
None: 0,
|
|
1402
1401
|
OpenTag: 1,
|
|
1403
1402
|
InsideTag: 2,
|
|
1404
1403
|
CloseTag: 3
|
|
1405
1404
|
};
|
|
1406
|
-
}).call(
|
|
1405
|
+
}).call(jr)), Ct.exports;
|
|
1407
1406
|
}
|
|
1408
|
-
var Re;
|
|
1409
|
-
function
|
|
1407
|
+
var Br = _t.exports, Re;
|
|
1408
|
+
function tr() {
|
|
1410
1409
|
return Re || (Re = 1, (function() {
|
|
1411
|
-
var i, c, D,
|
|
1412
|
-
D = H().assign, i =
|
|
1413
|
-
function
|
|
1410
|
+
var i, c, D, f = {}.hasOwnProperty;
|
|
1411
|
+
D = H().assign, i = B(), zt(), te(), Yt(), Kt(), Gt(), ee(), re(), ne(), Ze(), Ht(), Zt(), Qt(), Jt(), c = Rt(), _t.exports = function() {
|
|
1412
|
+
function h(t) {
|
|
1414
1413
|
var e, o, l;
|
|
1415
1414
|
t || (t = {}), this.options = t, o = t.writer || {};
|
|
1416
1415
|
for (e in o)
|
|
1417
|
-
|
|
1416
|
+
f.call(o, e) && (l = o[e], this["_" + e] = this[e], this[e] = l);
|
|
1418
1417
|
}
|
|
1419
|
-
return
|
|
1420
|
-
var e, o, l,
|
|
1418
|
+
return h.prototype.filterOptions = function(t) {
|
|
1419
|
+
var e, o, l, b, m, y, d, g;
|
|
1421
1420
|
return t || (t = {}), t = D({}, this.options, t), e = {
|
|
1422
1421
|
writer: this
|
|
1423
1422
|
}, e.pretty = t.pretty || !1, e.allowEmpty = t.allowEmpty || !1, e.indent = (o = t.indent) != null ? o : " ", e.newline = (l = t.newline) != null ? l : `
|
|
1424
|
-
`, e.offset = (
|
|
1425
|
-
},
|
|
1423
|
+
`, e.offset = (b = t.offset) != null ? b : 0, e.dontPrettyTextNodes = (m = (y = t.dontPrettyTextNodes) != null ? y : t.dontprettytextnodes) != null ? m : 0, e.spaceBeforeSlash = (d = (g = t.spaceBeforeSlash) != null ? g : t.spacebeforeslash) != null ? d : "", e.spaceBeforeSlash === !0 && (e.spaceBeforeSlash = " "), e.suppressPrettyCount = 0, e.user = {}, e.state = c.None, e;
|
|
1424
|
+
}, h.prototype.indent = function(t, e, o) {
|
|
1426
1425
|
var l;
|
|
1427
1426
|
return !e.pretty || e.suppressPrettyCount ? "" : e.pretty && (l = (o || 0) + e.offset + 1, l > 0) ? new Array(l).join(e.indent) : "";
|
|
1428
|
-
},
|
|
1427
|
+
}, h.prototype.endline = function(t, e, o) {
|
|
1429
1428
|
return !e.pretty || e.suppressPrettyCount ? "" : e.newline;
|
|
1430
|
-
},
|
|
1429
|
+
}, h.prototype.attribute = function(t, e, o) {
|
|
1431
1430
|
var l;
|
|
1432
1431
|
return this.openAttribute(t, e, o), l = " " + t.name + '="' + t.value + '"', this.closeAttribute(t, e, o), l;
|
|
1433
|
-
},
|
|
1432
|
+
}, h.prototype.cdata = function(t, e, o) {
|
|
1434
1433
|
var l;
|
|
1435
1434
|
return this.openNode(t, e, o), e.state = c.OpenTag, l = this.indent(t, e, o) + "<![CDATA[", e.state = c.InsideTag, l += t.value, e.state = c.CloseTag, l += "]]>" + this.endline(t, e, o), e.state = c.None, this.closeNode(t, e, o), l;
|
|
1436
|
-
},
|
|
1435
|
+
}, h.prototype.comment = function(t, e, o) {
|
|
1437
1436
|
var l;
|
|
1438
1437
|
return this.openNode(t, e, o), e.state = c.OpenTag, l = this.indent(t, e, o) + "<!-- ", e.state = c.InsideTag, l += t.value, e.state = c.CloseTag, l += " -->" + this.endline(t, e, o), e.state = c.None, this.closeNode(t, e, o), l;
|
|
1439
|
-
},
|
|
1438
|
+
}, h.prototype.declaration = function(t, e, o) {
|
|
1440
1439
|
var l;
|
|
1441
1440
|
return this.openNode(t, e, o), e.state = c.OpenTag, l = this.indent(t, e, o) + "<?xml", e.state = c.InsideTag, l += ' version="' + t.version + '"', t.encoding != null && (l += ' encoding="' + t.encoding + '"'), t.standalone != null && (l += ' standalone="' + t.standalone + '"'), e.state = c.CloseTag, l += e.spaceBeforeSlash + "?>", l += this.endline(t, e, o), e.state = c.None, this.closeNode(t, e, o), l;
|
|
1442
|
-
},
|
|
1443
|
-
var l,
|
|
1441
|
+
}, h.prototype.docType = function(t, e, o) {
|
|
1442
|
+
var l, b, m, y, d;
|
|
1444
1443
|
if (o || (o = 0), this.openNode(t, e, o), e.state = c.OpenTag, y = this.indent(t, e, o), y += "<!DOCTYPE " + t.root().name, t.pubID && t.sysID ? y += ' PUBLIC "' + t.pubID + '" "' + t.sysID + '"' : t.sysID && (y += ' SYSTEM "' + t.sysID + '"'), t.children.length > 0) {
|
|
1445
|
-
for (y += " [", y += this.endline(t, e, o), e.state = c.InsideTag, d = t.children,
|
|
1446
|
-
l = d[
|
|
1444
|
+
for (y += " [", y += this.endline(t, e, o), e.state = c.InsideTag, d = t.children, b = 0, m = d.length; b < m; b++)
|
|
1445
|
+
l = d[b], y += this.writeChildNode(l, e, o + 1);
|
|
1447
1446
|
e.state = c.CloseTag, y += "]";
|
|
1448
1447
|
}
|
|
1449
1448
|
return e.state = c.CloseTag, y += e.spaceBeforeSlash + ">", y += this.endline(t, e, o), e.state = c.None, this.closeNode(t, e, o), y;
|
|
1450
|
-
},
|
|
1451
|
-
var l,
|
|
1452
|
-
o || (o = 0),
|
|
1453
|
-
for (
|
|
1454
|
-
|
|
1449
|
+
}, h.prototype.element = function(t, e, o) {
|
|
1450
|
+
var l, b, m, y, d, g, O, I, x, P, E, s, a, p;
|
|
1451
|
+
o || (o = 0), P = !1, E = "", this.openNode(t, e, o), e.state = c.OpenTag, E += this.indent(t, e, o) + "<" + t.name, s = t.attribs;
|
|
1452
|
+
for (x in s)
|
|
1453
|
+
f.call(s, x) && (l = s[x], E += this.attribute(l, e, o));
|
|
1455
1454
|
if (m = t.children.length, y = m === 0 ? null : t.children[0], m === 0 || t.children.every(function(T) {
|
|
1456
1455
|
return (T.type === i.Text || T.type === i.Raw) && T.value === "";
|
|
1457
1456
|
}))
|
|
1458
1457
|
e.allowEmpty ? (E += ">", e.state = c.CloseTag, E += "</" + t.name + ">" + this.endline(t, e, o)) : (e.state = c.CloseTag, E += e.spaceBeforeSlash + "/>" + this.endline(t, e, o));
|
|
1459
1458
|
else if (e.pretty && m === 1 && (y.type === i.Text || y.type === i.Raw) && y.value != null)
|
|
1460
|
-
E += ">", e.state = c.InsideTag, e.suppressPrettyCount++,
|
|
1459
|
+
E += ">", e.state = c.InsideTag, e.suppressPrettyCount++, P = !0, E += this.writeChildNode(y, e, o + 1), e.suppressPrettyCount--, P = !1, e.state = c.CloseTag, E += "</" + t.name + ">" + this.endline(t, e, o);
|
|
1461
1460
|
else {
|
|
1462
1461
|
if (e.dontPrettyTextNodes) {
|
|
1463
|
-
for (a = t.children, d = 0,
|
|
1464
|
-
if (
|
|
1465
|
-
e.suppressPrettyCount++,
|
|
1462
|
+
for (a = t.children, d = 0, O = a.length; d < O; d++)
|
|
1463
|
+
if (b = a[d], (b.type === i.Text || b.type === i.Raw) && b.value != null) {
|
|
1464
|
+
e.suppressPrettyCount++, P = !0;
|
|
1466
1465
|
break;
|
|
1467
1466
|
}
|
|
1468
1467
|
}
|
|
1469
|
-
for (E += ">" + this.endline(t, e, o), e.state = c.InsideTag,
|
|
1470
|
-
|
|
1471
|
-
e.state = c.CloseTag, E += this.indent(t, e, o) + "</" + t.name + ">",
|
|
1468
|
+
for (E += ">" + this.endline(t, e, o), e.state = c.InsideTag, p = t.children, g = 0, I = p.length; g < I; g++)
|
|
1469
|
+
b = p[g], E += this.writeChildNode(b, e, o + 1);
|
|
1470
|
+
e.state = c.CloseTag, E += this.indent(t, e, o) + "</" + t.name + ">", P && e.suppressPrettyCount--, E += this.endline(t, e, o), e.state = c.None;
|
|
1472
1471
|
}
|
|
1473
1472
|
return this.closeNode(t, e, o), E;
|
|
1474
|
-
},
|
|
1473
|
+
}, h.prototype.writeChildNode = function(t, e, o) {
|
|
1475
1474
|
switch (t.type) {
|
|
1476
1475
|
case i.CData:
|
|
1477
1476
|
return this.cdata(t, e, o);
|
|
@@ -1502,83 +1501,83 @@ function Je() {
|
|
|
1502
1501
|
default:
|
|
1503
1502
|
throw new Error("Unknown XML node type: " + t.constructor.name);
|
|
1504
1503
|
}
|
|
1505
|
-
},
|
|
1504
|
+
}, h.prototype.processingInstruction = function(t, e, o) {
|
|
1506
1505
|
var l;
|
|
1507
1506
|
return this.openNode(t, e, o), e.state = c.OpenTag, l = this.indent(t, e, o) + "<?", e.state = c.InsideTag, l += t.target, t.value && (l += " " + t.value), e.state = c.CloseTag, l += e.spaceBeforeSlash + "?>", l += this.endline(t, e, o), e.state = c.None, this.closeNode(t, e, o), l;
|
|
1508
|
-
},
|
|
1507
|
+
}, h.prototype.raw = function(t, e, o) {
|
|
1509
1508
|
var l;
|
|
1510
1509
|
return this.openNode(t, e, o), e.state = c.OpenTag, l = this.indent(t, e, o), e.state = c.InsideTag, l += t.value, e.state = c.CloseTag, l += this.endline(t, e, o), e.state = c.None, this.closeNode(t, e, o), l;
|
|
1511
|
-
},
|
|
1510
|
+
}, h.prototype.text = function(t, e, o) {
|
|
1512
1511
|
var l;
|
|
1513
1512
|
return this.openNode(t, e, o), e.state = c.OpenTag, l = this.indent(t, e, o), e.state = c.InsideTag, l += t.value, e.state = c.CloseTag, l += this.endline(t, e, o), e.state = c.None, this.closeNode(t, e, o), l;
|
|
1514
|
-
},
|
|
1513
|
+
}, h.prototype.dtdAttList = function(t, e, o) {
|
|
1515
1514
|
var l;
|
|
1516
1515
|
return this.openNode(t, e, o), e.state = c.OpenTag, l = this.indent(t, e, o) + "<!ATTLIST", e.state = c.InsideTag, l += " " + t.elementName + " " + t.attributeName + " " + t.attributeType, t.defaultValueType !== "#DEFAULT" && (l += " " + t.defaultValueType), t.defaultValue && (l += ' "' + t.defaultValue + '"'), e.state = c.CloseTag, l += e.spaceBeforeSlash + ">" + this.endline(t, e, o), e.state = c.None, this.closeNode(t, e, o), l;
|
|
1517
|
-
},
|
|
1516
|
+
}, h.prototype.dtdElement = function(t, e, o) {
|
|
1518
1517
|
var l;
|
|
1519
1518
|
return this.openNode(t, e, o), e.state = c.OpenTag, l = this.indent(t, e, o) + "<!ELEMENT", e.state = c.InsideTag, l += " " + t.name + " " + t.value, e.state = c.CloseTag, l += e.spaceBeforeSlash + ">" + this.endline(t, e, o), e.state = c.None, this.closeNode(t, e, o), l;
|
|
1520
|
-
},
|
|
1519
|
+
}, h.prototype.dtdEntity = function(t, e, o) {
|
|
1521
1520
|
var l;
|
|
1522
1521
|
return this.openNode(t, e, o), e.state = c.OpenTag, l = this.indent(t, e, o) + "<!ENTITY", e.state = c.InsideTag, t.pe && (l += " %"), l += " " + t.name, t.value ? l += ' "' + t.value + '"' : (t.pubID && t.sysID ? l += ' PUBLIC "' + t.pubID + '" "' + t.sysID + '"' : t.sysID && (l += ' SYSTEM "' + t.sysID + '"'), t.nData && (l += " NDATA " + t.nData)), e.state = c.CloseTag, l += e.spaceBeforeSlash + ">" + this.endline(t, e, o), e.state = c.None, this.closeNode(t, e, o), l;
|
|
1523
|
-
},
|
|
1522
|
+
}, h.prototype.dtdNotation = function(t, e, o) {
|
|
1524
1523
|
var l;
|
|
1525
1524
|
return this.openNode(t, e, o), e.state = c.OpenTag, l = this.indent(t, e, o) + "<!NOTATION", e.state = c.InsideTag, l += " " + t.name, t.pubID && t.sysID ? l += ' PUBLIC "' + t.pubID + '" "' + t.sysID + '"' : t.pubID ? l += ' PUBLIC "' + t.pubID + '"' : t.sysID && (l += ' SYSTEM "' + t.sysID + '"'), e.state = c.CloseTag, l += e.spaceBeforeSlash + ">" + this.endline(t, e, o), e.state = c.None, this.closeNode(t, e, o), l;
|
|
1526
|
-
},
|
|
1527
|
-
},
|
|
1528
|
-
},
|
|
1529
|
-
},
|
|
1530
|
-
},
|
|
1525
|
+
}, h.prototype.openNode = function(t, e, o) {
|
|
1526
|
+
}, h.prototype.closeNode = function(t, e, o) {
|
|
1527
|
+
}, h.prototype.openAttribute = function(t, e, o) {
|
|
1528
|
+
}, h.prototype.closeAttribute = function(t, e, o) {
|
|
1529
|
+
}, h;
|
|
1531
1530
|
}();
|
|
1532
|
-
}).call(
|
|
1531
|
+
}).call(Br)), _t.exports;
|
|
1533
1532
|
}
|
|
1534
|
-
var je;
|
|
1533
|
+
var qr = Pt.exports, je;
|
|
1535
1534
|
function ie() {
|
|
1536
1535
|
return je || (je = 1, (function() {
|
|
1537
|
-
var i, c = function(
|
|
1538
|
-
for (var t in
|
|
1539
|
-
D.call(
|
|
1536
|
+
var i, c = function(f, h) {
|
|
1537
|
+
for (var t in h)
|
|
1538
|
+
D.call(h, t) && (f[t] = h[t]);
|
|
1540
1539
|
function e() {
|
|
1541
|
-
this.constructor =
|
|
1540
|
+
this.constructor = f;
|
|
1542
1541
|
}
|
|
1543
|
-
return e.prototype =
|
|
1542
|
+
return e.prototype = h.prototype, f.prototype = new e(), f.__super__ = h.prototype, f;
|
|
1544
1543
|
}, D = {}.hasOwnProperty;
|
|
1545
|
-
i =
|
|
1546
|
-
c(
|
|
1547
|
-
function
|
|
1548
|
-
|
|
1549
|
-
}
|
|
1550
|
-
return
|
|
1551
|
-
var o, l,
|
|
1552
|
-
for (e = this.filterOptions(e), m = "", y = t.children, l = 0,
|
|
1544
|
+
i = tr(), Pt.exports = function(f) {
|
|
1545
|
+
c(h, f);
|
|
1546
|
+
function h(t) {
|
|
1547
|
+
h.__super__.constructor.call(this, t);
|
|
1548
|
+
}
|
|
1549
|
+
return h.prototype.document = function(t, e) {
|
|
1550
|
+
var o, l, b, m, y;
|
|
1551
|
+
for (e = this.filterOptions(e), m = "", y = t.children, l = 0, b = y.length; l < b; l++)
|
|
1553
1552
|
o = y[l], m += this.writeChildNode(o, e, 0);
|
|
1554
1553
|
return e.pretty && m.slice(-e.newline.length) === e.newline && (m = m.slice(0, -e.newline.length)), m;
|
|
1555
|
-
},
|
|
1554
|
+
}, h;
|
|
1556
1555
|
}(i);
|
|
1557
|
-
}).call(
|
|
1556
|
+
}).call(qr)), Pt.exports;
|
|
1558
1557
|
}
|
|
1559
|
-
var Be;
|
|
1560
|
-
function
|
|
1558
|
+
var Ur = st.exports, Be;
|
|
1559
|
+
function er() {
|
|
1561
1560
|
return Be || (Be = 1, (function() {
|
|
1562
|
-
var i, c, D,
|
|
1561
|
+
var i, c, D, f, h, t, e, o = function(b, m) {
|
|
1563
1562
|
for (var y in m)
|
|
1564
|
-
l.call(m, y) && (
|
|
1563
|
+
l.call(m, y) && (b[y] = m[y]);
|
|
1565
1564
|
function d() {
|
|
1566
|
-
this.constructor =
|
|
1565
|
+
this.constructor = b;
|
|
1567
1566
|
}
|
|
1568
|
-
return d.prototype = m.prototype,
|
|
1567
|
+
return d.prototype = m.prototype, b.prototype = new d(), b.__super__ = m.prototype, b;
|
|
1569
1568
|
}, l = {}.hasOwnProperty;
|
|
1570
|
-
e = H().isPlainObject, D =
|
|
1571
|
-
o(m,
|
|
1569
|
+
e = H().isPlainObject, D = He(), c = dr(), f = W(), i = B(), t = Je(), h = ie(), st.exports = function(b) {
|
|
1570
|
+
o(m, b);
|
|
1572
1571
|
function m(y) {
|
|
1573
|
-
m.__super__.constructor.call(this, null), this.name = "#document", this.type = i.Document, this.documentURI = null, this.domConfig = new c(), y || (y = {}), y.writer || (y.writer = new
|
|
1572
|
+
m.__super__.constructor.call(this, null), this.name = "#document", this.type = i.Document, this.documentURI = null, this.domConfig = new c(), y || (y = {}), y.writer || (y.writer = new h()), this.options = y, this.stringify = new t(y);
|
|
1574
1573
|
}
|
|
1575
1574
|
return Object.defineProperty(m.prototype, "implementation", {
|
|
1576
1575
|
value: new D()
|
|
1577
1576
|
}), Object.defineProperty(m.prototype, "doctype", {
|
|
1578
1577
|
get: function() {
|
|
1579
|
-
var y, d, g,
|
|
1580
|
-
for (
|
|
1581
|
-
if (y =
|
|
1578
|
+
var y, d, g, O;
|
|
1579
|
+
for (O = this.children, d = 0, g = O.length; d < g; d++)
|
|
1580
|
+
if (y = O[d], y.type === i.DocType)
|
|
1582
1581
|
return y;
|
|
1583
1582
|
return null;
|
|
1584
1583
|
}
|
|
@@ -1676,22 +1675,22 @@ function tr() {
|
|
|
1676
1675
|
}, m.prototype.createTreeWalker = function(y, d, g) {
|
|
1677
1676
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1678
1677
|
}, m;
|
|
1679
|
-
}(
|
|
1680
|
-
}).call(
|
|
1678
|
+
}(f);
|
|
1679
|
+
}).call(Ur)), st.exports;
|
|
1681
1680
|
}
|
|
1682
|
-
var
|
|
1683
|
-
function
|
|
1681
|
+
var St = { exports: {} }, Vr = St.exports, qe;
|
|
1682
|
+
function kr() {
|
|
1684
1683
|
return qe || (qe = 1, (function() {
|
|
1685
|
-
var i, c, D,
|
|
1686
|
-
T = H(), a = T.isObject, s = T.isFunction,
|
|
1687
|
-
function v(r, N,
|
|
1688
|
-
var
|
|
1689
|
-
this.name = "?xml", this.type = i.Document, r || (r = {}),
|
|
1690
|
-
}, this.onEndCallback =
|
|
1684
|
+
var i, c, D, f, h, t, e, o, l, b, m, y, d, g, O, I, x, P, E, s, a, p, T, L = {}.hasOwnProperty;
|
|
1685
|
+
T = H(), a = T.isObject, s = T.isFunction, p = T.isPlainObject, E = T.getValue, i = B(), y = er(), d = Gt(), f = Yt(), h = Kt(), O = ee(), P = re(), g = ne(), b = zt(), m = te(), t = Ht(), o = Qt(), e = Zt(), l = Jt(), D = Qe(), x = Je(), I = ie(), c = Rt(), St.exports = function() {
|
|
1686
|
+
function v(r, N, A) {
|
|
1687
|
+
var _;
|
|
1688
|
+
this.name = "?xml", this.type = i.Document, r || (r = {}), _ = {}, r.writer ? p(r.writer) && (_ = r.writer, r.writer = new I()) : r.writer = new I(), this.options = r, this.writer = r.writer, this.writerOptions = this.writer.filterOptions(_), this.stringify = new x(r), this.onDataCallback = N || function() {
|
|
1689
|
+
}, this.onEndCallback = A || function() {
|
|
1691
1690
|
}, this.currentNode = null, this.currentLevel = -1, this.openTags = {}, this.documentStarted = !1, this.documentCompleted = !1, this.root = null;
|
|
1692
1691
|
}
|
|
1693
1692
|
return v.prototype.createChildNode = function(r) {
|
|
1694
|
-
var N,
|
|
1693
|
+
var N, A, _, C, X, j, F, S;
|
|
1695
1694
|
switch (r.type) {
|
|
1696
1695
|
case i.CData:
|
|
1697
1696
|
this.cdata(r.value);
|
|
@@ -1700,10 +1699,10 @@ function pr() {
|
|
|
1700
1699
|
this.comment(r.value);
|
|
1701
1700
|
break;
|
|
1702
1701
|
case i.Element:
|
|
1703
|
-
|
|
1704
|
-
for (
|
|
1705
|
-
|
|
1706
|
-
this.node(r.name,
|
|
1702
|
+
_ = {}, F = r.attribs;
|
|
1703
|
+
for (A in F)
|
|
1704
|
+
L.call(F, A) && (N = F[A], _[A] = N.value);
|
|
1705
|
+
this.node(r.name, _);
|
|
1707
1706
|
break;
|
|
1708
1707
|
case i.Dummy:
|
|
1709
1708
|
this.dummy();
|
|
@@ -1720,87 +1719,87 @@ function pr() {
|
|
|
1720
1719
|
default:
|
|
1721
1720
|
throw new Error("This XML node type is not supported in a JS object: " + r.constructor.name);
|
|
1722
1721
|
}
|
|
1723
|
-
for (
|
|
1724
|
-
|
|
1722
|
+
for (S = r.children, X = 0, j = S.length; X < j; X++)
|
|
1723
|
+
C = S[X], this.createChildNode(C), C.type === i.Element && this.up();
|
|
1725
1724
|
return this;
|
|
1726
1725
|
}, v.prototype.dummy = function() {
|
|
1727
1726
|
return this;
|
|
1728
|
-
}, v.prototype.node = function(r, N,
|
|
1729
|
-
var
|
|
1727
|
+
}, v.prototype.node = function(r, N, A) {
|
|
1728
|
+
var _;
|
|
1730
1729
|
if (r == null)
|
|
1731
1730
|
throw new Error("Missing node name.");
|
|
1732
1731
|
if (this.root && this.currentLevel === -1)
|
|
1733
1732
|
throw new Error("Document can only have one root node. " + this.debugInfo(r));
|
|
1734
|
-
return this.openCurrent(), r = E(r), N == null && (N = {}), N = E(N), a(N) || (
|
|
1735
|
-
}, v.prototype.element = function(r, N,
|
|
1736
|
-
var
|
|
1733
|
+
return this.openCurrent(), r = E(r), N == null && (N = {}), N = E(N), a(N) || (_ = [N, A], A = _[0], N = _[1]), this.currentNode = new d(this, r, N), this.currentNode.children = !1, this.currentLevel++, this.openTags[this.currentLevel] = this.currentNode, A != null && this.text(A), this;
|
|
1734
|
+
}, v.prototype.element = function(r, N, A) {
|
|
1735
|
+
var _, C, X, j, F, S;
|
|
1737
1736
|
if (this.currentNode && this.currentNode.type === i.DocType)
|
|
1738
1737
|
this.dtdElement.apply(this, arguments);
|
|
1739
1738
|
else if (Array.isArray(r) || a(r) || s(r))
|
|
1740
|
-
for (
|
|
1741
|
-
|
|
1739
|
+
for (j = this.options.noValidation, this.options.noValidation = !0, S = new y(this.options).element("TEMP_ROOT"), S.element(r), this.options.noValidation = j, F = S.children, C = 0, X = F.length; C < X; C++)
|
|
1740
|
+
_ = F[C], this.createChildNode(_), _.type === i.Element && this.up();
|
|
1742
1741
|
else
|
|
1743
|
-
this.node(r, N,
|
|
1742
|
+
this.node(r, N, A);
|
|
1744
1743
|
return this;
|
|
1745
1744
|
}, v.prototype.attribute = function(r, N) {
|
|
1746
|
-
var
|
|
1745
|
+
var A, _;
|
|
1747
1746
|
if (!this.currentNode || this.currentNode.children)
|
|
1748
1747
|
throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(r));
|
|
1749
1748
|
if (r != null && (r = E(r)), a(r))
|
|
1750
|
-
for (
|
|
1751
|
-
|
|
1749
|
+
for (A in r)
|
|
1750
|
+
L.call(r, A) && (_ = r[A], this.attribute(A, _));
|
|
1752
1751
|
else
|
|
1753
1752
|
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));
|
|
1754
1753
|
return this;
|
|
1755
1754
|
}, v.prototype.text = function(r) {
|
|
1756
1755
|
var N;
|
|
1757
|
-
return this.openCurrent(), N = new
|
|
1756
|
+
return this.openCurrent(), N = new P(this, r), this.onData(this.writer.text(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1758
1757
|
}, v.prototype.cdata = function(r) {
|
|
1759
1758
|
var N;
|
|
1760
|
-
return this.openCurrent(), N = new
|
|
1759
|
+
return this.openCurrent(), N = new f(this, r), this.onData(this.writer.cdata(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1761
1760
|
}, v.prototype.comment = function(r) {
|
|
1762
1761
|
var N;
|
|
1763
|
-
return this.openCurrent(), N = new
|
|
1762
|
+
return this.openCurrent(), N = new h(this, r), this.onData(this.writer.comment(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1764
1763
|
}, v.prototype.raw = function(r) {
|
|
1765
1764
|
var N;
|
|
1766
|
-
return this.openCurrent(), N = new
|
|
1765
|
+
return this.openCurrent(), N = new O(this, r), this.onData(this.writer.raw(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1767
1766
|
}, v.prototype.instruction = function(r, N) {
|
|
1768
|
-
var
|
|
1767
|
+
var A, _, C, X, j;
|
|
1769
1768
|
if (this.openCurrent(), r != null && (r = E(r)), N != null && (N = E(N)), Array.isArray(r))
|
|
1770
|
-
for (
|
|
1771
|
-
|
|
1769
|
+
for (A = 0, X = r.length; A < X; A++)
|
|
1770
|
+
_ = r[A], this.instruction(_);
|
|
1772
1771
|
else if (a(r))
|
|
1773
|
-
for (
|
|
1774
|
-
|
|
1772
|
+
for (_ in r)
|
|
1773
|
+
L.call(r, _) && (C = r[_], this.instruction(_, C));
|
|
1775
1774
|
else
|
|
1776
|
-
s(N) && (N = N.apply()),
|
|
1775
|
+
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);
|
|
1777
1776
|
return this;
|
|
1778
|
-
}, v.prototype.declaration = function(r, N,
|
|
1779
|
-
var
|
|
1777
|
+
}, v.prototype.declaration = function(r, N, A) {
|
|
1778
|
+
var _;
|
|
1780
1779
|
if (this.openCurrent(), this.documentStarted)
|
|
1781
1780
|
throw new Error("declaration() must be the first node.");
|
|
1782
|
-
return
|
|
1783
|
-
}, v.prototype.doctype = function(r, N,
|
|
1781
|
+
return _ = new b(this, r, N, A), this.onData(this.writer.declaration(_, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1782
|
+
}, v.prototype.doctype = function(r, N, A) {
|
|
1784
1783
|
if (this.openCurrent(), r == null)
|
|
1785
1784
|
throw new Error("Missing root node name.");
|
|
1786
1785
|
if (this.root)
|
|
1787
1786
|
throw new Error("dtd() must come before the root node.");
|
|
1788
|
-
return this.currentNode = new m(this, N,
|
|
1787
|
+
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;
|
|
1789
1788
|
}, v.prototype.dtdElement = function(r, N) {
|
|
1790
|
-
var
|
|
1791
|
-
return this.openCurrent(),
|
|
1792
|
-
}, v.prototype.attList = function(r, N,
|
|
1789
|
+
var A;
|
|
1790
|
+
return this.openCurrent(), A = new e(this, r, N), this.onData(this.writer.dtdElement(A, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1791
|
+
}, v.prototype.attList = function(r, N, A, _, C) {
|
|
1793
1792
|
var X;
|
|
1794
|
-
return this.openCurrent(), X = new t(this, r, N,
|
|
1793
|
+
return this.openCurrent(), X = new t(this, r, N, A, _, C), this.onData(this.writer.dtdAttList(X, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1795
1794
|
}, v.prototype.entity = function(r, N) {
|
|
1796
|
-
var
|
|
1797
|
-
return this.openCurrent(),
|
|
1795
|
+
var A;
|
|
1796
|
+
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;
|
|
1798
1797
|
}, v.prototype.pEntity = function(r, N) {
|
|
1799
|
-
var
|
|
1800
|
-
return this.openCurrent(),
|
|
1798
|
+
var A;
|
|
1799
|
+
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;
|
|
1801
1800
|
}, v.prototype.notation = function(r, N) {
|
|
1802
|
-
var
|
|
1803
|
-
return this.openCurrent(),
|
|
1801
|
+
var A;
|
|
1802
|
+
return this.openCurrent(), A = new l(this, r, N), this.onData(this.writer.dtdNotation(A, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1804
1803
|
}, v.prototype.up = function() {
|
|
1805
1804
|
if (this.currentLevel < 0)
|
|
1806
1805
|
throw new Error("The document node has no parent.");
|
|
@@ -1813,16 +1812,16 @@ function pr() {
|
|
|
1813
1812
|
if (this.currentNode)
|
|
1814
1813
|
return this.currentNode.children = !0, this.openNode(this.currentNode);
|
|
1815
1814
|
}, v.prototype.openNode = function(r) {
|
|
1816
|
-
var N,
|
|
1815
|
+
var N, A, _, C;
|
|
1817
1816
|
if (!r.isOpen) {
|
|
1818
|
-
if (!this.root && this.currentLevel === 0 && r.type === i.Element && (this.root = r),
|
|
1819
|
-
this.writerOptions.state = c.OpenTag,
|
|
1820
|
-
for (
|
|
1821
|
-
|
|
1822
|
-
|
|
1817
|
+
if (!this.root && this.currentLevel === 0 && r.type === i.Element && (this.root = r), A = "", r.type === i.Element) {
|
|
1818
|
+
this.writerOptions.state = c.OpenTag, A = this.writer.indent(r, this.writerOptions, this.currentLevel) + "<" + r.name, C = r.attribs;
|
|
1819
|
+
for (_ in C)
|
|
1820
|
+
L.call(C, _) && (N = C[_], A += this.writer.attribute(N, this.writerOptions, this.currentLevel));
|
|
1821
|
+
A += (r.children ? ">" : "/>") + this.writer.endline(r, this.writerOptions, this.currentLevel), this.writerOptions.state = c.InsideTag;
|
|
1823
1822
|
} else
|
|
1824
|
-
this.writerOptions.state = c.OpenTag,
|
|
1825
|
-
return this.onData(
|
|
1823
|
+
this.writerOptions.state = c.OpenTag, A = this.writer.indent(r, this.writerOptions, this.currentLevel) + "<!DOCTYPE " + r.rootNodeName, r.pubID && r.sysID ? A += ' PUBLIC "' + r.pubID + '" "' + r.sysID + '"' : r.sysID && (A += ' SYSTEM "' + r.sysID + '"'), r.children ? (A += " [", this.writerOptions.state = c.InsideTag) : (this.writerOptions.state = c.CloseTag, A += ">"), A += this.writer.endline(r, this.writerOptions, this.currentLevel);
|
|
1824
|
+
return this.onData(A, this.currentLevel), r.isOpen = !0;
|
|
1826
1825
|
}
|
|
1827
1826
|
}, v.prototype.closeNode = function(r) {
|
|
1828
1827
|
var N;
|
|
@@ -1836,8 +1835,8 @@ function pr() {
|
|
|
1836
1835
|
return r == null ? "" : "node: <" + r + ">";
|
|
1837
1836
|
}, v.prototype.ele = function() {
|
|
1838
1837
|
return this.element.apply(this, arguments);
|
|
1839
|
-
}, v.prototype.nod = function(r, N,
|
|
1840
|
-
return this.node(r, N,
|
|
1838
|
+
}, v.prototype.nod = function(r, N, A) {
|
|
1839
|
+
return this.node(r, N, A);
|
|
1841
1840
|
}, v.prototype.txt = function(r) {
|
|
1842
1841
|
return this.text(r);
|
|
1843
1842
|
}, v.prototype.dat = function(r) {
|
|
@@ -1846,14 +1845,14 @@ function pr() {
|
|
|
1846
1845
|
return this.comment(r);
|
|
1847
1846
|
}, v.prototype.ins = function(r, N) {
|
|
1848
1847
|
return this.instruction(r, N);
|
|
1849
|
-
}, v.prototype.dec = function(r, N,
|
|
1850
|
-
return this.declaration(r, N,
|
|
1851
|
-
}, v.prototype.dtd = function(r, N,
|
|
1852
|
-
return this.doctype(r, N,
|
|
1853
|
-
}, v.prototype.e = function(r, N,
|
|
1854
|
-
return this.element(r, N,
|
|
1855
|
-
}, v.prototype.n = function(r, N,
|
|
1856
|
-
return this.node(r, N,
|
|
1848
|
+
}, v.prototype.dec = function(r, N, A) {
|
|
1849
|
+
return this.declaration(r, N, A);
|
|
1850
|
+
}, v.prototype.dtd = function(r, N, A) {
|
|
1851
|
+
return this.doctype(r, N, A);
|
|
1852
|
+
}, v.prototype.e = function(r, N, A) {
|
|
1853
|
+
return this.element(r, N, A);
|
|
1854
|
+
}, v.prototype.n = function(r, N, A) {
|
|
1855
|
+
return this.node(r, N, A);
|
|
1857
1856
|
}, v.prototype.t = function(r) {
|
|
1858
1857
|
return this.text(r);
|
|
1859
1858
|
}, v.prototype.d = function(r) {
|
|
@@ -1876,150 +1875,150 @@ function pr() {
|
|
|
1876
1875
|
return this.notation(r, N);
|
|
1877
1876
|
}, v;
|
|
1878
1877
|
}();
|
|
1879
|
-
}).call(
|
|
1878
|
+
}).call(Vr)), St.exports;
|
|
1880
1879
|
}
|
|
1881
|
-
var
|
|
1882
|
-
function
|
|
1880
|
+
var Xt = { exports: {} }, $r = Xt.exports, Ue;
|
|
1881
|
+
function Wr() {
|
|
1883
1882
|
return Ue || (Ue = 1, (function() {
|
|
1884
|
-
var i, c, D,
|
|
1883
|
+
var i, c, D, f = function(t, e) {
|
|
1885
1884
|
for (var o in e)
|
|
1886
|
-
|
|
1885
|
+
h.call(e, o) && (t[o] = e[o]);
|
|
1887
1886
|
function l() {
|
|
1888
1887
|
this.constructor = t;
|
|
1889
1888
|
}
|
|
1890
1889
|
return l.prototype = e.prototype, t.prototype = new l(), t.__super__ = e.prototype, t;
|
|
1891
|
-
},
|
|
1892
|
-
i =
|
|
1893
|
-
|
|
1890
|
+
}, h = {}.hasOwnProperty;
|
|
1891
|
+
i = B(), D = tr(), c = Rt(), Xt.exports = function(t) {
|
|
1892
|
+
f(e, t);
|
|
1894
1893
|
function e(o, l) {
|
|
1895
1894
|
this.stream = o, e.__super__.constructor.call(this, l);
|
|
1896
1895
|
}
|
|
1897
|
-
return e.prototype.endline = function(o, l,
|
|
1898
|
-
return o.isLastRootNode && l.state === c.CloseTag ? "" : e.__super__.endline.call(this, o, l,
|
|
1896
|
+
return e.prototype.endline = function(o, l, b) {
|
|
1897
|
+
return o.isLastRootNode && l.state === c.CloseTag ? "" : e.__super__.endline.call(this, o, l, b);
|
|
1899
1898
|
}, e.prototype.document = function(o, l) {
|
|
1900
|
-
var
|
|
1901
|
-
for (
|
|
1902
|
-
|
|
1903
|
-
for (l = this.filterOptions(l),
|
|
1904
|
-
|
|
1905
|
-
return
|
|
1906
|
-
}, e.prototype.attribute = function(o, l,
|
|
1907
|
-
return this.stream.write(e.__super__.attribute.call(this, o, l,
|
|
1908
|
-
}, e.prototype.cdata = function(o, l,
|
|
1909
|
-
return this.stream.write(e.__super__.cdata.call(this, o, l,
|
|
1910
|
-
}, e.prototype.comment = function(o, l,
|
|
1911
|
-
return this.stream.write(e.__super__.comment.call(this, o, l,
|
|
1912
|
-
}, e.prototype.declaration = function(o, l,
|
|
1913
|
-
return this.stream.write(e.__super__.declaration.call(this, o, l,
|
|
1914
|
-
}, e.prototype.docType = function(o, l,
|
|
1899
|
+
var b, m, y, d, g, O, I, x, P;
|
|
1900
|
+
for (I = o.children, m = y = 0, g = I.length; y < g; m = ++y)
|
|
1901
|
+
b = I[m], b.isLastRootNode = m === o.children.length - 1;
|
|
1902
|
+
for (l = this.filterOptions(l), x = o.children, P = [], d = 0, O = x.length; d < O; d++)
|
|
1903
|
+
b = x[d], P.push(this.writeChildNode(b, l, 0));
|
|
1904
|
+
return P;
|
|
1905
|
+
}, e.prototype.attribute = function(o, l, b) {
|
|
1906
|
+
return this.stream.write(e.__super__.attribute.call(this, o, l, b));
|
|
1907
|
+
}, e.prototype.cdata = function(o, l, b) {
|
|
1908
|
+
return this.stream.write(e.__super__.cdata.call(this, o, l, b));
|
|
1909
|
+
}, e.prototype.comment = function(o, l, b) {
|
|
1910
|
+
return this.stream.write(e.__super__.comment.call(this, o, l, b));
|
|
1911
|
+
}, e.prototype.declaration = function(o, l, b) {
|
|
1912
|
+
return this.stream.write(e.__super__.declaration.call(this, o, l, b));
|
|
1913
|
+
}, e.prototype.docType = function(o, l, b) {
|
|
1915
1914
|
var m, y, d, g;
|
|
1916
|
-
if (
|
|
1917
|
-
for (this.stream.write(" ["), this.stream.write(this.endline(o, l,
|
|
1918
|
-
m = g[y], this.writeChildNode(m, l,
|
|
1915
|
+
if (b || (b = 0), this.openNode(o, l, b), l.state = c.OpenTag, this.stream.write(this.indent(o, l, b)), this.stream.write("<!DOCTYPE " + o.root().name), o.pubID && o.sysID ? this.stream.write(' PUBLIC "' + o.pubID + '" "' + o.sysID + '"') : o.sysID && this.stream.write(' SYSTEM "' + o.sysID + '"'), o.children.length > 0) {
|
|
1916
|
+
for (this.stream.write(" ["), this.stream.write(this.endline(o, l, b)), l.state = c.InsideTag, g = o.children, y = 0, d = g.length; y < d; y++)
|
|
1917
|
+
m = g[y], this.writeChildNode(m, l, b + 1);
|
|
1919
1918
|
l.state = c.CloseTag, this.stream.write("]");
|
|
1920
1919
|
}
|
|
1921
|
-
return l.state = c.CloseTag, this.stream.write(l.spaceBeforeSlash + ">"), this.stream.write(this.endline(o, l,
|
|
1922
|
-
}, e.prototype.element = function(o, l,
|
|
1923
|
-
var m, y, d, g,
|
|
1924
|
-
|
|
1925
|
-
for (
|
|
1926
|
-
|
|
1920
|
+
return l.state = c.CloseTag, this.stream.write(l.spaceBeforeSlash + ">"), this.stream.write(this.endline(o, l, b)), l.state = c.None, this.closeNode(o, l, b);
|
|
1921
|
+
}, e.prototype.element = function(o, l, b) {
|
|
1922
|
+
var m, y, d, g, O, I, x, P, E;
|
|
1923
|
+
b || (b = 0), this.openNode(o, l, b), l.state = c.OpenTag, this.stream.write(this.indent(o, l, b) + "<" + o.name), P = o.attribs;
|
|
1924
|
+
for (x in P)
|
|
1925
|
+
h.call(P, x) && (m = P[x], this.attribute(m, l, b));
|
|
1927
1926
|
if (d = o.children.length, g = d === 0 ? null : o.children[0], d === 0 || o.children.every(function(s) {
|
|
1928
1927
|
return (s.type === i.Text || s.type === i.Raw) && s.value === "";
|
|
1929
1928
|
}))
|
|
1930
1929
|
l.allowEmpty ? (this.stream.write(">"), l.state = c.CloseTag, this.stream.write("</" + o.name + ">")) : (l.state = c.CloseTag, this.stream.write(l.spaceBeforeSlash + "/>"));
|
|
1931
1930
|
else if (l.pretty && d === 1 && (g.type === i.Text || g.type === i.Raw) && g.value != null)
|
|
1932
|
-
this.stream.write(">"), l.state = c.InsideTag, l.suppressPrettyCount++, this.writeChildNode(g, l,
|
|
1931
|
+
this.stream.write(">"), l.state = c.InsideTag, l.suppressPrettyCount++, this.writeChildNode(g, l, b + 1), l.suppressPrettyCount--, l.state = c.CloseTag, this.stream.write("</" + o.name + ">");
|
|
1933
1932
|
else {
|
|
1934
|
-
for (this.stream.write(">" + this.endline(o, l,
|
|
1935
|
-
y = E[
|
|
1936
|
-
l.state = c.CloseTag, this.stream.write(this.indent(o, l,
|
|
1937
|
-
}
|
|
1938
|
-
return this.stream.write(this.endline(o, l,
|
|
1939
|
-
}, e.prototype.processingInstruction = function(o, l,
|
|
1940
|
-
return this.stream.write(e.__super__.processingInstruction.call(this, o, l,
|
|
1941
|
-
}, e.prototype.raw = function(o, l,
|
|
1942
|
-
return this.stream.write(e.__super__.raw.call(this, o, l,
|
|
1943
|
-
}, e.prototype.text = function(o, l,
|
|
1944
|
-
return this.stream.write(e.__super__.text.call(this, o, l,
|
|
1945
|
-
}, e.prototype.dtdAttList = function(o, l,
|
|
1946
|
-
return this.stream.write(e.__super__.dtdAttList.call(this, o, l,
|
|
1947
|
-
}, e.prototype.dtdElement = function(o, l,
|
|
1948
|
-
return this.stream.write(e.__super__.dtdElement.call(this, o, l,
|
|
1949
|
-
}, e.prototype.dtdEntity = function(o, l,
|
|
1950
|
-
return this.stream.write(e.__super__.dtdEntity.call(this, o, l,
|
|
1951
|
-
}, e.prototype.dtdNotation = function(o, l,
|
|
1952
|
-
return this.stream.write(e.__super__.dtdNotation.call(this, o, l,
|
|
1933
|
+
for (this.stream.write(">" + this.endline(o, l, b)), l.state = c.InsideTag, E = o.children, O = 0, I = E.length; O < I; O++)
|
|
1934
|
+
y = E[O], this.writeChildNode(y, l, b + 1);
|
|
1935
|
+
l.state = c.CloseTag, this.stream.write(this.indent(o, l, b) + "</" + o.name + ">");
|
|
1936
|
+
}
|
|
1937
|
+
return this.stream.write(this.endline(o, l, b)), l.state = c.None, this.closeNode(o, l, b);
|
|
1938
|
+
}, e.prototype.processingInstruction = function(o, l, b) {
|
|
1939
|
+
return this.stream.write(e.__super__.processingInstruction.call(this, o, l, b));
|
|
1940
|
+
}, e.prototype.raw = function(o, l, b) {
|
|
1941
|
+
return this.stream.write(e.__super__.raw.call(this, o, l, b));
|
|
1942
|
+
}, e.prototype.text = function(o, l, b) {
|
|
1943
|
+
return this.stream.write(e.__super__.text.call(this, o, l, b));
|
|
1944
|
+
}, e.prototype.dtdAttList = function(o, l, b) {
|
|
1945
|
+
return this.stream.write(e.__super__.dtdAttList.call(this, o, l, b));
|
|
1946
|
+
}, e.prototype.dtdElement = function(o, l, b) {
|
|
1947
|
+
return this.stream.write(e.__super__.dtdElement.call(this, o, l, b));
|
|
1948
|
+
}, e.prototype.dtdEntity = function(o, l, b) {
|
|
1949
|
+
return this.stream.write(e.__super__.dtdEntity.call(this, o, l, b));
|
|
1950
|
+
}, e.prototype.dtdNotation = function(o, l, b) {
|
|
1951
|
+
return this.stream.write(e.__super__.dtdNotation.call(this, o, l, b));
|
|
1953
1952
|
}, e;
|
|
1954
1953
|
}(D);
|
|
1955
|
-
}).call(
|
|
1954
|
+
}).call($r)), Xt.exports;
|
|
1956
1955
|
}
|
|
1957
1956
|
var Ve;
|
|
1958
|
-
function
|
|
1957
|
+
function Gr() {
|
|
1959
1958
|
return Ve || (Ve = 1, (function() {
|
|
1960
|
-
var i, c, D,
|
|
1961
|
-
|
|
1962
|
-
var
|
|
1959
|
+
var i, c, D, f, h, t, e, o, l, b;
|
|
1960
|
+
b = H(), o = b.assign, l = b.isFunction, D = He(), f = er(), h = kr(), e = ie(), t = Wr(), i = B(), c = Rt(), Y.create = function(m, y, d, g) {
|
|
1961
|
+
var O, I;
|
|
1963
1962
|
if (m == null)
|
|
1964
1963
|
throw new Error("Root element needs a name.");
|
|
1965
|
-
return g = o({}, y, d, g),
|
|
1966
|
-
},
|
|
1964
|
+
return g = o({}, y, d, g), O = new f(g), I = O.element(m), g.headless || (O.declaration(g), (g.pubID != null || g.sysID != null) && O.dtd(g)), I;
|
|
1965
|
+
}, Y.begin = function(m, y, d) {
|
|
1967
1966
|
var g;
|
|
1968
|
-
return l(m) && (g = [m, y], y = g[0], d = g[1], m = {}), y ? new
|
|
1969
|
-
},
|
|
1967
|
+
return l(m) && (g = [m, y], y = g[0], d = g[1], m = {}), y ? new h(m, y, d) : new f(m);
|
|
1968
|
+
}, Y.stringWriter = function(m) {
|
|
1970
1969
|
return new e(m);
|
|
1971
|
-
},
|
|
1970
|
+
}, Y.streamWriter = function(m, y) {
|
|
1972
1971
|
return new t(m, y);
|
|
1973
|
-
},
|
|
1974
|
-
}).call(
|
|
1972
|
+
}, Y.implementation = new D(), Y.nodeType = i, Y.writerState = c;
|
|
1973
|
+
}).call(Y)), Y;
|
|
1975
1974
|
}
|
|
1976
1975
|
var ke;
|
|
1977
|
-
function
|
|
1976
|
+
function Yr() {
|
|
1978
1977
|
return ke || (ke = 1, (function() {
|
|
1979
|
-
var i, c, D,
|
|
1980
|
-
i =
|
|
1978
|
+
var i, c, D, f, h, t = {}.hasOwnProperty;
|
|
1979
|
+
i = Gr(), c = $t().defaults, f = function(e) {
|
|
1981
1980
|
return typeof e == "string" && (e.indexOf("&") >= 0 || e.indexOf(">") >= 0 || e.indexOf("<") >= 0);
|
|
1982
|
-
},
|
|
1981
|
+
}, h = function(e) {
|
|
1983
1982
|
return "<![CDATA[" + D(e) + "]]>";
|
|
1984
1983
|
}, D = function(e) {
|
|
1985
1984
|
return e.replace("]]>", "]]]]><![CDATA[>");
|
|
1986
|
-
},
|
|
1985
|
+
}, et.Builder = function() {
|
|
1987
1986
|
function e(o) {
|
|
1988
|
-
var l,
|
|
1989
|
-
this.options = {},
|
|
1990
|
-
for (l in
|
|
1991
|
-
t.call(
|
|
1987
|
+
var l, b, m;
|
|
1988
|
+
this.options = {}, b = c["0.2"];
|
|
1989
|
+
for (l in b)
|
|
1990
|
+
t.call(b, l) && (m = b[l], this.options[l] = m);
|
|
1992
1991
|
for (l in o)
|
|
1993
1992
|
t.call(o, l) && (m = o[l], this.options[l] = m);
|
|
1994
1993
|
}
|
|
1995
1994
|
return e.prototype.buildObject = function(o) {
|
|
1996
|
-
var l,
|
|
1997
|
-
return l = this.options.attrkey,
|
|
1998
|
-
return function(
|
|
1999
|
-
var
|
|
2000
|
-
if (typeof
|
|
2001
|
-
g.options.cdata &&
|
|
2002
|
-
else if (Array.isArray(
|
|
2003
|
-
for (s in
|
|
2004
|
-
if (t.call(
|
|
2005
|
-
|
|
2006
|
-
for (a in
|
|
2007
|
-
E =
|
|
1995
|
+
var l, b, m, y, d;
|
|
1996
|
+
return l = this.options.attrkey, b = this.options.charkey, Object.keys(o).length === 1 && this.options.rootName === c["0.2"].rootName ? (d = Object.keys(o)[0], o = o[d]) : d = this.options.rootName, m = /* @__PURE__ */ function(g) {
|
|
1997
|
+
return function(O, I) {
|
|
1998
|
+
var x, P, E, s, a, p;
|
|
1999
|
+
if (typeof I != "object")
|
|
2000
|
+
g.options.cdata && f(I) ? O.raw(h(I)) : O.txt(I);
|
|
2001
|
+
else if (Array.isArray(I)) {
|
|
2002
|
+
for (s in I)
|
|
2003
|
+
if (t.call(I, s)) {
|
|
2004
|
+
P = I[s];
|
|
2005
|
+
for (a in P)
|
|
2006
|
+
E = P[a], O = m(O.ele(a), E).up();
|
|
2008
2007
|
}
|
|
2009
2008
|
} else
|
|
2010
|
-
for (a in
|
|
2011
|
-
if (t.call(
|
|
2012
|
-
if (
|
|
2013
|
-
if (typeof
|
|
2014
|
-
for (
|
|
2015
|
-
|
|
2016
|
-
} else if (a ===
|
|
2017
|
-
g.options.cdata &&
|
|
2018
|
-
else if (Array.isArray(
|
|
2019
|
-
for (s in
|
|
2020
|
-
t.call(
|
|
2021
|
-
else typeof
|
|
2022
|
-
return
|
|
2009
|
+
for (a in I)
|
|
2010
|
+
if (t.call(I, a))
|
|
2011
|
+
if (P = I[a], a === l) {
|
|
2012
|
+
if (typeof P == "object")
|
|
2013
|
+
for (x in P)
|
|
2014
|
+
p = P[x], O = O.att(x, p);
|
|
2015
|
+
} else if (a === b)
|
|
2016
|
+
g.options.cdata && f(P) ? O = O.raw(h(P)) : O = O.txt(P);
|
|
2017
|
+
else if (Array.isArray(P))
|
|
2018
|
+
for (s in P)
|
|
2019
|
+
t.call(P, s) && (E = P[s], typeof E == "string" ? g.options.cdata && f(E) ? O = O.ele(a).raw(h(E)).up() : O = O.ele(a, E).up() : O = m(O.ele(a), E).up());
|
|
2020
|
+
else typeof P == "object" ? O = m(O.ele(a), P).up() : typeof P == "string" && g.options.cdata && f(P) ? O = O.ele(a).raw(h(P)).up() : (P == null && (P = ""), O = O.ele(a, P.toString()).up());
|
|
2021
|
+
return O;
|
|
2023
2022
|
};
|
|
2024
2023
|
}(this), y = i.create(d, this.options.xmldec, this.options.doctype, {
|
|
2025
2024
|
headless: this.options.headless,
|
|
@@ -2027,20 +2026,20 @@ function mr() {
|
|
|
2027
2026
|
}), m(y, o).end(this.options.renderOpts);
|
|
2028
2027
|
}, e;
|
|
2029
2028
|
}();
|
|
2030
|
-
}).call(
|
|
2029
|
+
}).call(et)), et;
|
|
2031
2030
|
}
|
|
2032
|
-
var
|
|
2033
|
-
const
|
|
2031
|
+
var rt = {}, Vt = {};
|
|
2032
|
+
const Kr = {}, zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2034
2033
|
__proto__: null,
|
|
2035
|
-
default:
|
|
2036
|
-
}, Symbol.toStringTag, { value: "Module" })), kt = /* @__PURE__ */ ur(
|
|
2037
|
-
var
|
|
2038
|
-
function
|
|
2039
|
-
return
|
|
2034
|
+
default: Kr
|
|
2035
|
+
}, Symbol.toStringTag, { value: "Module" })), kt = /* @__PURE__ */ ur(zr);
|
|
2036
|
+
var $e;
|
|
2037
|
+
function Hr() {
|
|
2038
|
+
return $e || ($e = 1, function(i) {
|
|
2040
2039
|
(function(c) {
|
|
2041
2040
|
c.parser = function(u, n) {
|
|
2042
|
-
return new
|
|
2043
|
-
}, c.SAXParser =
|
|
2041
|
+
return new f(u, n);
|
|
2042
|
+
}, c.SAXParser = f, c.SAXStream = m, c.createStream = b, c.MAX_BUFFER_LENGTH = 64 * 1024;
|
|
2044
2043
|
var D = [
|
|
2045
2044
|
"comment",
|
|
2046
2045
|
"sgmlDecl",
|
|
@@ -2075,55 +2074,55 @@ function Tr() {
|
|
|
2075
2074
|
"opennamespace",
|
|
2076
2075
|
"closenamespace"
|
|
2077
2076
|
];
|
|
2078
|
-
function
|
|
2079
|
-
if (!(this instanceof
|
|
2080
|
-
return new
|
|
2081
|
-
var
|
|
2082
|
-
t(
|
|
2077
|
+
function f(u, n) {
|
|
2078
|
+
if (!(this instanceof f))
|
|
2079
|
+
return new f(u, n);
|
|
2080
|
+
var M = this;
|
|
2081
|
+
t(M), M.q = M.c = "", M.bufferCheckPosition = c.MAX_BUFFER_LENGTH, M.opt = n || {}, M.opt.lowercase = M.opt.lowercase || M.opt.lowercasetags, M.looseCase = M.opt.lowercase ? "toLowerCase" : "toUpperCase", M.tags = [], M.closed = M.closedRoot = M.sawRoot = !1, M.tag = M.error = null, M.strict = !!u, M.noscript = !!(u || M.opt.noscript), M.state = r.BEGIN, M.strictEntities = M.opt.strictEntities, M.ENTITIES = M.strictEntities ? Object.create(c.XML_ENTITIES) : Object.create(c.ENTITIES), M.attribList = [], M.opt.xmlns && (M.ns = Object.create(I)), M.opt.unquotedAttributeValues === void 0 && (M.opt.unquotedAttributeValues = !u), M.trackPosition = M.opt.position !== !1, M.trackPosition && (M.position = M.line = M.column = 0), A(M, "onready");
|
|
2083
2082
|
}
|
|
2084
2083
|
Object.create || (Object.create = function(u) {
|
|
2085
2084
|
function n() {
|
|
2086
2085
|
}
|
|
2087
2086
|
n.prototype = u;
|
|
2088
|
-
var
|
|
2089
|
-
return
|
|
2087
|
+
var M = new n();
|
|
2088
|
+
return M;
|
|
2090
2089
|
}), Object.keys || (Object.keys = function(u) {
|
|
2091
2090
|
var n = [];
|
|
2092
|
-
for (var
|
|
2091
|
+
for (var M in u) u.hasOwnProperty(M) && n.push(M);
|
|
2093
2092
|
return n;
|
|
2094
2093
|
});
|
|
2095
|
-
function
|
|
2096
|
-
for (var n = Math.max(c.MAX_BUFFER_LENGTH, 10),
|
|
2097
|
-
var
|
|
2098
|
-
if (
|
|
2094
|
+
function h(u) {
|
|
2095
|
+
for (var n = Math.max(c.MAX_BUFFER_LENGTH, 10), M = 0, w = 0, R = D.length; w < R; w++) {
|
|
2096
|
+
var q = u[D[w]].length;
|
|
2097
|
+
if (q > n)
|
|
2099
2098
|
switch (D[w]) {
|
|
2100
2099
|
case "textNode":
|
|
2101
|
-
|
|
2100
|
+
C(u);
|
|
2102
2101
|
break;
|
|
2103
2102
|
case "cdata":
|
|
2104
|
-
|
|
2103
|
+
_(u, "oncdata", u.cdata), u.cdata = "";
|
|
2105
2104
|
break;
|
|
2106
2105
|
case "script":
|
|
2107
|
-
|
|
2106
|
+
_(u, "onscript", u.script), u.script = "";
|
|
2108
2107
|
break;
|
|
2109
2108
|
default:
|
|
2110
|
-
|
|
2109
|
+
j(u, "Max buffer length exceeded: " + D[w]);
|
|
2111
2110
|
}
|
|
2112
|
-
|
|
2111
|
+
M = Math.max(M, q);
|
|
2113
2112
|
}
|
|
2114
|
-
var
|
|
2115
|
-
u.bufferCheckPosition =
|
|
2113
|
+
var U = c.MAX_BUFFER_LENGTH - M;
|
|
2114
|
+
u.bufferCheckPosition = U + u.position;
|
|
2116
2115
|
}
|
|
2117
2116
|
function t(u) {
|
|
2118
|
-
for (var n = 0,
|
|
2117
|
+
for (var n = 0, M = D.length; n < M; n++)
|
|
2119
2118
|
u[D[n]] = "";
|
|
2120
2119
|
}
|
|
2121
2120
|
function e(u) {
|
|
2122
|
-
|
|
2121
|
+
C(u), u.cdata !== "" && (_(u, "oncdata", u.cdata), u.cdata = ""), u.script !== "" && (_(u, "onscript", u.script), u.script = "");
|
|
2123
2122
|
}
|
|
2124
|
-
|
|
2123
|
+
f.prototype = {
|
|
2125
2124
|
end: function() {
|
|
2126
|
-
|
|
2125
|
+
F(this);
|
|
2127
2126
|
},
|
|
2128
2127
|
write: or,
|
|
2129
2128
|
resume: function() {
|
|
@@ -2148,27 +2147,27 @@ function Tr() {
|
|
|
2148
2147
|
var l = c.EVENTS.filter(function(u) {
|
|
2149
2148
|
return u !== "error" && u !== "end";
|
|
2150
2149
|
});
|
|
2151
|
-
function
|
|
2150
|
+
function b(u, n) {
|
|
2152
2151
|
return new m(u, n);
|
|
2153
2152
|
}
|
|
2154
2153
|
function m(u, n) {
|
|
2155
2154
|
if (!(this instanceof m))
|
|
2156
2155
|
return new m(u, n);
|
|
2157
|
-
o.apply(this), this._parser = new
|
|
2158
|
-
var
|
|
2156
|
+
o.apply(this), this._parser = new f(u, n), this.writable = !0, this.readable = !0;
|
|
2157
|
+
var M = this;
|
|
2159
2158
|
this._parser.onend = function() {
|
|
2160
|
-
|
|
2159
|
+
M.emit("end");
|
|
2161
2160
|
}, this._parser.onerror = function(w) {
|
|
2162
|
-
|
|
2161
|
+
M.emit("error", w), M._parser.error = null;
|
|
2163
2162
|
}, this._decoder = null, l.forEach(function(w) {
|
|
2164
|
-
Object.defineProperty(
|
|
2163
|
+
Object.defineProperty(M, "on" + w, {
|
|
2165
2164
|
get: function() {
|
|
2166
|
-
return
|
|
2165
|
+
return M._parser["on" + w];
|
|
2167
2166
|
},
|
|
2168
|
-
set: function(
|
|
2169
|
-
if (!
|
|
2170
|
-
return
|
|
2171
|
-
|
|
2167
|
+
set: function(R) {
|
|
2168
|
+
if (!R)
|
|
2169
|
+
return M.removeAllListeners(w), M._parser["on" + w] = R, R;
|
|
2170
|
+
M.on(w, R);
|
|
2172
2171
|
},
|
|
2173
2172
|
enumerable: !0,
|
|
2174
2173
|
configurable: !1
|
|
@@ -2191,28 +2190,28 @@ function Tr() {
|
|
|
2191
2190
|
}, m.prototype.end = function(u) {
|
|
2192
2191
|
return u && u.length && this.write(u), this._parser.end(), !0;
|
|
2193
2192
|
}, m.prototype.on = function(u, n) {
|
|
2194
|
-
var
|
|
2195
|
-
return !
|
|
2193
|
+
var M = this;
|
|
2194
|
+
return !M._parser["on" + u] && l.indexOf(u) !== -1 && (M._parser["on" + u] = function() {
|
|
2196
2195
|
var w = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
|
|
2197
|
-
w.splice(0, 0, u),
|
|
2198
|
-
}), o.prototype.on.call(
|
|
2196
|
+
w.splice(0, 0, u), M.emit.apply(M, w);
|
|
2197
|
+
}), o.prototype.on.call(M, u, n);
|
|
2199
2198
|
};
|
|
2200
|
-
var y = "[CDATA[", d = "DOCTYPE", g = "http://www.w3.org/XML/1998/namespace",
|
|
2199
|
+
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-]/;
|
|
2201
2200
|
function a(u) {
|
|
2202
2201
|
return u === " " || u === `
|
|
2203
2202
|
` || u === "\r" || u === " ";
|
|
2204
2203
|
}
|
|
2205
|
-
function
|
|
2204
|
+
function p(u) {
|
|
2206
2205
|
return u === '"' || u === "'";
|
|
2207
2206
|
}
|
|
2208
2207
|
function T(u) {
|
|
2209
2208
|
return u === ">" || a(u);
|
|
2210
2209
|
}
|
|
2211
|
-
function
|
|
2210
|
+
function L(u, n) {
|
|
2212
2211
|
return u.test(n);
|
|
2213
2212
|
}
|
|
2214
2213
|
function v(u, n) {
|
|
2215
|
-
return !
|
|
2214
|
+
return !L(u, n);
|
|
2216
2215
|
}
|
|
2217
2216
|
var r = 0;
|
|
2218
2217
|
c.STATE = {
|
|
@@ -2549,107 +2548,107 @@ function Tr() {
|
|
|
2549
2548
|
hearts: 9829,
|
|
2550
2549
|
diams: 9830
|
|
2551
2550
|
}, Object.keys(c.ENTITIES).forEach(function(u) {
|
|
2552
|
-
var n = c.ENTITIES[u],
|
|
2553
|
-
c.ENTITIES[u] =
|
|
2551
|
+
var n = c.ENTITIES[u], M = typeof n == "number" ? String.fromCharCode(n) : n;
|
|
2552
|
+
c.ENTITIES[u] = M;
|
|
2554
2553
|
});
|
|
2555
2554
|
for (var N in c.STATE)
|
|
2556
2555
|
c.STATE[c.STATE[N]] = N;
|
|
2557
2556
|
r = c.STATE;
|
|
2558
|
-
function
|
|
2559
|
-
u[n] && u[n](
|
|
2557
|
+
function A(u, n, M) {
|
|
2558
|
+
u[n] && u[n](M);
|
|
2560
2559
|
}
|
|
2561
|
-
function
|
|
2562
|
-
u.textNode &&
|
|
2560
|
+
function _(u, n, M) {
|
|
2561
|
+
u.textNode && C(u), A(u, n, M);
|
|
2563
2562
|
}
|
|
2564
|
-
function
|
|
2565
|
-
u.textNode = X(u.opt, u.textNode), u.textNode &&
|
|
2563
|
+
function C(u) {
|
|
2564
|
+
u.textNode = X(u.opt, u.textNode), u.textNode && A(u, "ontext", u.textNode), u.textNode = "";
|
|
2566
2565
|
}
|
|
2567
2566
|
function X(u, n) {
|
|
2568
2567
|
return u.trim && (n = n.trim()), u.normalize && (n = n.replace(/\s+/g, " ")), n;
|
|
2569
2568
|
}
|
|
2570
|
-
function
|
|
2571
|
-
return
|
|
2569
|
+
function j(u, n) {
|
|
2570
|
+
return C(u), u.trackPosition && (n += `
|
|
2572
2571
|
Line: ` + u.line + `
|
|
2573
2572
|
Column: ` + u.column + `
|
|
2574
|
-
Char: ` + u.c), n = new Error(n), u.error = n,
|
|
2573
|
+
Char: ` + u.c), n = new Error(n), u.error = n, A(u, "onerror", n), u;
|
|
2575
2574
|
}
|
|
2576
|
-
function
|
|
2577
|
-
return u.sawRoot && !u.closedRoot &&
|
|
2575
|
+
function F(u) {
|
|
2576
|
+
return u.sawRoot && !u.closedRoot && S(u, "Unclosed root tag"), u.state !== r.BEGIN && u.state !== r.BEGIN_WHITESPACE && u.state !== r.TEXT && j(u, "Unexpected end"), C(u), u.c = "", u.closed = !0, A(u, "onend"), f.call(u, u.strict, u.opt), u;
|
|
2578
2577
|
}
|
|
2579
|
-
function
|
|
2580
|
-
if (typeof u != "object" || !(u instanceof
|
|
2578
|
+
function S(u, n) {
|
|
2579
|
+
if (typeof u != "object" || !(u instanceof f))
|
|
2581
2580
|
throw new Error("bad call to strictFail");
|
|
2582
|
-
u.strict &&
|
|
2581
|
+
u.strict && j(u, n);
|
|
2583
2582
|
}
|
|
2584
2583
|
function nr(u) {
|
|
2585
2584
|
u.strict || (u.tagName = u.tagName[u.looseCase]());
|
|
2586
|
-
var n = u.tags[u.tags.length - 1] || u,
|
|
2587
|
-
u.opt.xmlns && (
|
|
2585
|
+
var n = u.tags[u.tags.length - 1] || u, M = u.tag = { name: u.tagName, attributes: {} };
|
|
2586
|
+
u.opt.xmlns && (M.ns = n.ns), u.attribList.length = 0, _(u, "onopentagstart", M);
|
|
2588
2587
|
}
|
|
2589
|
-
function
|
|
2590
|
-
var
|
|
2591
|
-
return n && u === "xmlns" && (
|
|
2588
|
+
function jt(u, n) {
|
|
2589
|
+
var M = u.indexOf(":"), w = M < 0 ? ["", u] : u.split(":"), R = w[0], q = w[1];
|
|
2590
|
+
return n && u === "xmlns" && (R = "xmlns", q = ""), { prefix: R, local: q };
|
|
2592
2591
|
}
|
|
2593
|
-
function
|
|
2592
|
+
function Bt(u) {
|
|
2594
2593
|
if (u.strict || (u.attribName = u.attribName[u.looseCase]()), u.attribList.indexOf(u.attribName) !== -1 || u.tag.attributes.hasOwnProperty(u.attribName)) {
|
|
2595
2594
|
u.attribName = u.attribValue = "";
|
|
2596
2595
|
return;
|
|
2597
2596
|
}
|
|
2598
2597
|
if (u.opt.xmlns) {
|
|
2599
|
-
var n =
|
|
2600
|
-
if (
|
|
2598
|
+
var n = jt(u.attribName, !0), M = n.prefix, w = n.local;
|
|
2599
|
+
if (M === "xmlns")
|
|
2601
2600
|
if (w === "xml" && u.attribValue !== g)
|
|
2602
|
-
|
|
2601
|
+
S(
|
|
2603
2602
|
u,
|
|
2604
2603
|
"xml: prefix must be bound to " + g + `
|
|
2605
2604
|
Actual: ` + u.attribValue
|
|
2606
2605
|
);
|
|
2607
|
-
else if (w === "xmlns" && u.attribValue !==
|
|
2608
|
-
|
|
2606
|
+
else if (w === "xmlns" && u.attribValue !== O)
|
|
2607
|
+
S(
|
|
2609
2608
|
u,
|
|
2610
|
-
"xmlns: prefix must be bound to " +
|
|
2609
|
+
"xmlns: prefix must be bound to " + O + `
|
|
2611
2610
|
Actual: ` + u.attribValue
|
|
2612
2611
|
);
|
|
2613
2612
|
else {
|
|
2614
|
-
var
|
|
2615
|
-
|
|
2613
|
+
var R = u.tag, q = u.tags[u.tags.length - 1] || u;
|
|
2614
|
+
R.ns === q.ns && (R.ns = Object.create(q.ns)), R.ns[w] = u.attribValue;
|
|
2616
2615
|
}
|
|
2617
2616
|
u.attribList.push([u.attribName, u.attribValue]);
|
|
2618
2617
|
} else
|
|
2619
|
-
u.tag.attributes[u.attribName] = u.attribValue,
|
|
2618
|
+
u.tag.attributes[u.attribName] = u.attribValue, _(u, "onattribute", {
|
|
2620
2619
|
name: u.attribName,
|
|
2621
2620
|
value: u.attribValue
|
|
2622
2621
|
});
|
|
2623
2622
|
u.attribName = u.attribValue = "";
|
|
2624
2623
|
}
|
|
2625
|
-
function
|
|
2624
|
+
function Z(u, n) {
|
|
2626
2625
|
if (u.opt.xmlns) {
|
|
2627
|
-
var
|
|
2628
|
-
|
|
2629
|
-
var
|
|
2630
|
-
|
|
2631
|
-
|
|
2626
|
+
var M = u.tag, w = jt(u.tagName);
|
|
2627
|
+
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);
|
|
2628
|
+
var R = u.tags[u.tags.length - 1] || u;
|
|
2629
|
+
M.ns && R.ns !== M.ns && Object.keys(M.ns).forEach(function(ae) {
|
|
2630
|
+
_(u, "onopennamespace", {
|
|
2632
2631
|
prefix: ae,
|
|
2633
|
-
uri:
|
|
2632
|
+
uri: M.ns[ae]
|
|
2634
2633
|
});
|
|
2635
2634
|
});
|
|
2636
|
-
for (var
|
|
2637
|
-
var
|
|
2638
|
-
name:
|
|
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, sr = V.local, ue = z === "" ? "" : M.ns[z] || "", Ut = {
|
|
2637
|
+
name: $,
|
|
2639
2638
|
value: J,
|
|
2640
|
-
prefix:
|
|
2639
|
+
prefix: z,
|
|
2641
2640
|
local: sr,
|
|
2642
2641
|
uri: ue
|
|
2643
2642
|
};
|
|
2644
|
-
|
|
2643
|
+
z && z !== "xmlns" && !ue && (S(u, "Unbound namespace prefix: " + JSON.stringify(z)), Ut.uri = z), u.tag.attributes[$] = Ut, _(u, "onattribute", Ut);
|
|
2645
2644
|
}
|
|
2646
2645
|
u.attribList.length = 0;
|
|
2647
2646
|
}
|
|
2648
|
-
u.tag.isSelfClosing = !!n, u.sawRoot = !0, u.tags.push(u.tag),
|
|
2647
|
+
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;
|
|
2649
2648
|
}
|
|
2650
|
-
function
|
|
2649
|
+
function qt(u) {
|
|
2651
2650
|
if (!u.tagName) {
|
|
2652
|
-
|
|
2651
|
+
S(u, "Weird empty close tag."), u.textNode += "</>", u.state = r.TEXT;
|
|
2653
2652
|
return;
|
|
2654
2653
|
}
|
|
2655
2654
|
if (u.script) {
|
|
@@ -2657,60 +2656,60 @@ Actual: ` + u.attribValue
|
|
|
2657
2656
|
u.script += "</" + u.tagName + ">", u.tagName = "", u.state = r.SCRIPT;
|
|
2658
2657
|
return;
|
|
2659
2658
|
}
|
|
2660
|
-
|
|
2661
|
-
}
|
|
2662
|
-
var n = u.tags.length,
|
|
2663
|
-
u.strict || (
|
|
2664
|
-
for (var w =
|
|
2665
|
-
var
|
|
2666
|
-
if (
|
|
2667
|
-
|
|
2659
|
+
_(u, "onscript", u.script), u.script = "";
|
|
2660
|
+
}
|
|
2661
|
+
var n = u.tags.length, M = u.tagName;
|
|
2662
|
+
u.strict || (M = M[u.looseCase]());
|
|
2663
|
+
for (var w = M; n--; ) {
|
|
2664
|
+
var R = u.tags[n];
|
|
2665
|
+
if (R.name !== w)
|
|
2666
|
+
S(u, "Unexpected close tag");
|
|
2668
2667
|
else
|
|
2669
2668
|
break;
|
|
2670
2669
|
}
|
|
2671
2670
|
if (n < 0) {
|
|
2672
|
-
|
|
2671
|
+
S(u, "Unmatched closing tag: " + u.tagName), u.textNode += "</" + u.tagName + ">", u.state = r.TEXT;
|
|
2673
2672
|
return;
|
|
2674
2673
|
}
|
|
2675
|
-
u.tagName =
|
|
2676
|
-
for (var
|
|
2677
|
-
var
|
|
2678
|
-
u.tagName = u.tag.name,
|
|
2679
|
-
var
|
|
2680
|
-
for (var
|
|
2681
|
-
|
|
2674
|
+
u.tagName = M;
|
|
2675
|
+
for (var q = u.tags.length; q-- > n; ) {
|
|
2676
|
+
var U = u.tag = u.tags.pop();
|
|
2677
|
+
u.tagName = u.tag.name, _(u, "onclosetag", u.tagName);
|
|
2678
|
+
var k = {};
|
|
2679
|
+
for (var $ in U.ns)
|
|
2680
|
+
k[$] = U.ns[$];
|
|
2682
2681
|
var J = u.tags[u.tags.length - 1] || u;
|
|
2683
|
-
u.opt.xmlns &&
|
|
2684
|
-
var
|
|
2685
|
-
|
|
2682
|
+
u.opt.xmlns && U.ns !== J.ns && Object.keys(U.ns).forEach(function(V) {
|
|
2683
|
+
var z = U.ns[V];
|
|
2684
|
+
_(u, "onclosenamespace", { prefix: V, uri: z });
|
|
2686
2685
|
});
|
|
2687
2686
|
}
|
|
2688
2687
|
n === 0 && (u.closedRoot = !0), u.tagName = u.attribValue = u.attribName = "", u.attribList.length = 0, u.state = r.TEXT;
|
|
2689
2688
|
}
|
|
2690
2689
|
function ir(u) {
|
|
2691
|
-
var n = u.entity,
|
|
2692
|
-
return u.ENTITIES[n] ? u.ENTITIES[n] : u.ENTITIES[
|
|
2690
|
+
var n = u.entity, M = n.toLowerCase(), w, R = "";
|
|
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));
|
|
2693
2692
|
}
|
|
2694
2693
|
function oe(u, n) {
|
|
2695
|
-
n === "<" ? (u.state = r.OPEN_WAKA, u.startTagPosition = u.position) : a(n) || (
|
|
2694
|
+
n === "<" ? (u.state = r.OPEN_WAKA, u.startTagPosition = u.position) : a(n) || (S(u, "Non-whitespace before first tag."), u.textNode = n, u.state = r.TEXT);
|
|
2696
2695
|
}
|
|
2697
2696
|
function se(u, n) {
|
|
2698
|
-
var
|
|
2699
|
-
return n < u.length && (
|
|
2697
|
+
var M = "";
|
|
2698
|
+
return n < u.length && (M = u.charAt(n)), M;
|
|
2700
2699
|
}
|
|
2701
2700
|
function or(u) {
|
|
2702
2701
|
var n = this;
|
|
2703
2702
|
if (this.error)
|
|
2704
2703
|
throw this.error;
|
|
2705
2704
|
if (n.closed)
|
|
2706
|
-
return
|
|
2705
|
+
return j(
|
|
2707
2706
|
n,
|
|
2708
2707
|
"Cannot write after close. Assign an onready handler."
|
|
2709
2708
|
);
|
|
2710
2709
|
if (u === null)
|
|
2711
|
-
return
|
|
2710
|
+
return F(n);
|
|
2712
2711
|
typeof u == "object" && (u = u.toString());
|
|
2713
|
-
for (var
|
|
2712
|
+
for (var M = 0, w = ""; w = se(u, M++), n.c = w, !!w; )
|
|
2714
2713
|
switch (n.trackPosition && (n.position++, w === `
|
|
2715
2714
|
` ? (n.line++, n.column = 0) : n.column++), n.state) {
|
|
2716
2715
|
case r.BEGIN:
|
|
@@ -2723,12 +2722,12 @@ Actual: ` + u.attribValue
|
|
|
2723
2722
|
continue;
|
|
2724
2723
|
case r.TEXT:
|
|
2725
2724
|
if (n.sawRoot && !n.closedRoot) {
|
|
2726
|
-
for (var
|
|
2727
|
-
w = se(u,
|
|
2725
|
+
for (var R = M - 1; w && w !== "<" && w !== "&"; )
|
|
2726
|
+
w = se(u, M++), w && n.trackPosition && (n.position++, w === `
|
|
2728
2727
|
` ? (n.line++, n.column = 0) : n.column++);
|
|
2729
|
-
n.textNode += u.substring(
|
|
2728
|
+
n.textNode += u.substring(R, M - 1);
|
|
2730
2729
|
}
|
|
2731
|
-
w === "<" && !(n.sawRoot && n.closedRoot && !n.strict) ? (n.state = r.OPEN_WAKA, n.startTagPosition = n.position) : (!a(w) && (!n.sawRoot || n.closedRoot) &&
|
|
2730
|
+
w === "<" && !(n.sawRoot && n.closedRoot && !n.strict) ? (n.state = r.OPEN_WAKA, n.startTagPosition = n.position) : (!a(w) && (!n.sawRoot || n.closedRoot) && S(n, "Text data outside of root node."), w === "&" ? n.state = r.TEXT_ENTITY : n.textNode += w);
|
|
2732
2731
|
continue;
|
|
2733
2732
|
case r.SCRIPT:
|
|
2734
2733
|
w === "<" ? n.state = r.SCRIPT_ENDING : n.script += w;
|
|
@@ -2739,16 +2738,16 @@ Actual: ` + u.attribValue
|
|
|
2739
2738
|
case r.OPEN_WAKA:
|
|
2740
2739
|
if (w === "!")
|
|
2741
2740
|
n.state = r.SGML_DECL, n.sgmlDecl = "";
|
|
2742
|
-
else if (!a(w)) if (
|
|
2741
|
+
else if (!a(w)) if (L(x, w))
|
|
2743
2742
|
n.state = r.OPEN_TAG, n.tagName = w;
|
|
2744
2743
|
else if (w === "/")
|
|
2745
2744
|
n.state = r.CLOSE_TAG, n.tagName = "";
|
|
2746
2745
|
else if (w === "?")
|
|
2747
2746
|
n.state = r.PROC_INST, n.procInstName = n.procInstBody = "";
|
|
2748
2747
|
else {
|
|
2749
|
-
if (
|
|
2750
|
-
var
|
|
2751
|
-
w = new Array(
|
|
2748
|
+
if (S(n, "Unencoded <"), n.startTagPosition + 1 < n.position) {
|
|
2749
|
+
var q = n.position - n.startTagPosition;
|
|
2750
|
+
w = new Array(q).join(" ") + w;
|
|
2752
2751
|
}
|
|
2753
2752
|
n.textNode += "<" + w, n.state = r.TEXT;
|
|
2754
2753
|
}
|
|
@@ -2758,22 +2757,22 @@ Actual: ` + u.attribValue
|
|
|
2758
2757
|
n.state = r.COMMENT, n.comment = "", n.sgmlDecl = "";
|
|
2759
2758
|
continue;
|
|
2760
2759
|
}
|
|
2761
|
-
n.doctype && n.doctype !== !0 && n.sgmlDecl ? (n.state = r.DOCTYPE_DTD, n.doctype += "<!" + n.sgmlDecl + w, n.sgmlDecl = "") : (n.sgmlDecl + w).toUpperCase() === y ? (
|
|
2760
|
+
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(
|
|
2762
2761
|
n,
|
|
2763
2762
|
"Inappropriately located doctype declaration"
|
|
2764
|
-
), n.doctype = "", n.sgmlDecl = "") : w === ">" ? (
|
|
2763
|
+
), n.doctype = "", n.sgmlDecl = "") : w === ">" ? (_(n, "onsgmldeclaration", n.sgmlDecl), n.sgmlDecl = "", n.state = r.TEXT) : (p(w) && (n.state = r.SGML_DECL_QUOTED), n.sgmlDecl += w);
|
|
2765
2764
|
continue;
|
|
2766
2765
|
case r.SGML_DECL_QUOTED:
|
|
2767
2766
|
w === n.q && (n.state = r.SGML_DECL, n.q = ""), n.sgmlDecl += w;
|
|
2768
2767
|
continue;
|
|
2769
2768
|
case r.DOCTYPE:
|
|
2770
|
-
w === ">" ? (n.state = r.TEXT,
|
|
2769
|
+
w === ">" ? (n.state = r.TEXT, _(n, "ondoctype", n.doctype), n.doctype = !0) : (n.doctype += w, w === "[" ? n.state = r.DOCTYPE_DTD : p(w) && (n.state = r.DOCTYPE_QUOTED, n.q = w));
|
|
2771
2770
|
continue;
|
|
2772
2771
|
case r.DOCTYPE_QUOTED:
|
|
2773
2772
|
n.doctype += w, w === n.q && (n.q = "", n.state = r.DOCTYPE);
|
|
2774
2773
|
continue;
|
|
2775
2774
|
case r.DOCTYPE_DTD:
|
|
2776
|
-
w === "]" ? (n.doctype += w, n.state = r.DOCTYPE) : w === "<" ? (n.state = r.OPEN_WAKA, n.startTagPosition = n.position) :
|
|
2775
|
+
w === "]" ? (n.doctype += w, n.state = r.DOCTYPE) : w === "<" ? (n.state = r.OPEN_WAKA, n.startTagPosition = n.position) : p(w) ? (n.doctype += w, n.state = r.DOCTYPE_DTD_QUOTED, n.q = w) : n.doctype += w;
|
|
2777
2776
|
continue;
|
|
2778
2777
|
case r.DOCTYPE_DTD_QUOTED:
|
|
2779
2778
|
n.doctype += w, w === n.q && (n.state = r.DOCTYPE_DTD, n.q = "");
|
|
@@ -2782,10 +2781,10 @@ Actual: ` + u.attribValue
|
|
|
2782
2781
|
w === "-" ? n.state = r.COMMENT_ENDING : n.comment += w;
|
|
2783
2782
|
continue;
|
|
2784
2783
|
case r.COMMENT_ENDING:
|
|
2785
|
-
w === "-" ? (n.state = r.COMMENT_ENDED, n.comment = X(n.opt, n.comment), n.comment &&
|
|
2784
|
+
w === "-" ? (n.state = r.COMMENT_ENDED, n.comment = X(n.opt, n.comment), n.comment && _(n, "oncomment", n.comment), n.comment = "") : (n.comment += "-" + w, n.state = r.COMMENT);
|
|
2786
2785
|
continue;
|
|
2787
2786
|
case r.COMMENT_ENDED:
|
|
2788
|
-
w !== ">" ? (
|
|
2787
|
+
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;
|
|
2789
2788
|
continue;
|
|
2790
2789
|
case r.CDATA:
|
|
2791
2790
|
w === "]" ? n.state = r.CDATA_ENDING : n.cdata += w;
|
|
@@ -2794,7 +2793,7 @@ Actual: ` + u.attribValue
|
|
|
2794
2793
|
w === "]" ? n.state = r.CDATA_ENDING_2 : (n.cdata += "]" + w, n.state = r.CDATA);
|
|
2795
2794
|
continue;
|
|
2796
2795
|
case r.CDATA_ENDING_2:
|
|
2797
|
-
w === ">" ? (n.cdata &&
|
|
2796
|
+
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);
|
|
2798
2797
|
continue;
|
|
2799
2798
|
case r.PROC_INST:
|
|
2800
2799
|
w === "?" ? n.state = r.PROC_INST_ENDING : a(w) ? n.state = r.PROC_INST_BODY : n.procInstName += w;
|
|
@@ -2805,24 +2804,24 @@ Actual: ` + u.attribValue
|
|
|
2805
2804
|
w === "?" ? n.state = r.PROC_INST_ENDING : n.procInstBody += w;
|
|
2806
2805
|
continue;
|
|
2807
2806
|
case r.PROC_INST_ENDING:
|
|
2808
|
-
w === ">" ? (
|
|
2807
|
+
w === ">" ? (_(n, "onprocessinginstruction", {
|
|
2809
2808
|
name: n.procInstName,
|
|
2810
2809
|
body: n.procInstBody
|
|
2811
2810
|
}), n.procInstName = n.procInstBody = "", n.state = r.TEXT) : (n.procInstBody += "?" + w, n.state = r.PROC_INST_BODY);
|
|
2812
2811
|
continue;
|
|
2813
2812
|
case r.OPEN_TAG:
|
|
2814
|
-
|
|
2813
|
+
L(P, w) ? n.tagName += w : (nr(n), w === ">" ? Z(n) : w === "/" ? n.state = r.OPEN_TAG_SLASH : (a(w) || S(n, "Invalid character in tag name"), n.state = r.ATTRIB));
|
|
2815
2814
|
continue;
|
|
2816
2815
|
case r.OPEN_TAG_SLASH:
|
|
2817
|
-
w === ">" ? (
|
|
2816
|
+
w === ">" ? (Z(n, !0), qt(n)) : (S(n, "Forward-slash in opening tag not followed by >"), n.state = r.ATTRIB);
|
|
2818
2817
|
continue;
|
|
2819
2818
|
case r.ATTRIB:
|
|
2820
2819
|
if (a(w))
|
|
2821
2820
|
continue;
|
|
2822
|
-
w === ">" ?
|
|
2821
|
+
w === ">" ? Z(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");
|
|
2823
2822
|
continue;
|
|
2824
2823
|
case r.ATTRIB_NAME:
|
|
2825
|
-
w === "=" ? n.state = r.ATTRIB_VALUE : w === ">" ? (
|
|
2824
|
+
w === "=" ? n.state = r.ATTRIB_VALUE : w === ">" ? (S(n, "Attribute without value"), n.attribValue = n.attribName, Bt(n), Z(n)) : a(w) ? n.state = r.ATTRIB_NAME_SAW_WHITE : L(P, w) ? n.attribName += w : S(n, "Invalid attribute name");
|
|
2826
2825
|
continue;
|
|
2827
2826
|
case r.ATTRIB_NAME_SAW_WHITE:
|
|
2828
2827
|
if (w === "=")
|
|
@@ -2830,121 +2829,121 @@ Actual: ` + u.attribValue
|
|
|
2830
2829
|
else {
|
|
2831
2830
|
if (a(w))
|
|
2832
2831
|
continue;
|
|
2833
|
-
|
|
2832
|
+
S(n, "Attribute without value"), n.tag.attributes[n.attribName] = "", n.attribValue = "", _(n, "onattribute", {
|
|
2834
2833
|
name: n.attribName,
|
|
2835
2834
|
value: ""
|
|
2836
|
-
}), n.attribName = "", w === ">" ?
|
|
2835
|
+
}), n.attribName = "", w === ">" ? Z(n) : L(x, w) ? (n.attribName = w, n.state = r.ATTRIB_NAME) : (S(n, "Invalid attribute name"), n.state = r.ATTRIB);
|
|
2837
2836
|
}
|
|
2838
2837
|
continue;
|
|
2839
2838
|
case r.ATTRIB_VALUE:
|
|
2840
2839
|
if (a(w))
|
|
2841
2840
|
continue;
|
|
2842
|
-
|
|
2841
|
+
p(w) ? (n.q = w, n.state = r.ATTRIB_VALUE_QUOTED) : (n.opt.unquotedAttributeValues || j(n, "Unquoted attribute value"), n.state = r.ATTRIB_VALUE_UNQUOTED, n.attribValue = w);
|
|
2843
2842
|
continue;
|
|
2844
2843
|
case r.ATTRIB_VALUE_QUOTED:
|
|
2845
2844
|
if (w !== n.q) {
|
|
2846
2845
|
w === "&" ? n.state = r.ATTRIB_VALUE_ENTITY_Q : n.attribValue += w;
|
|
2847
2846
|
continue;
|
|
2848
2847
|
}
|
|
2849
|
-
|
|
2848
|
+
Bt(n), n.q = "", n.state = r.ATTRIB_VALUE_CLOSED;
|
|
2850
2849
|
continue;
|
|
2851
2850
|
case r.ATTRIB_VALUE_CLOSED:
|
|
2852
|
-
a(w) ? n.state = r.ATTRIB : w === ">" ?
|
|
2851
|
+
a(w) ? n.state = r.ATTRIB : w === ">" ? Z(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");
|
|
2853
2852
|
continue;
|
|
2854
2853
|
case r.ATTRIB_VALUE_UNQUOTED:
|
|
2855
2854
|
if (!T(w)) {
|
|
2856
2855
|
w === "&" ? n.state = r.ATTRIB_VALUE_ENTITY_U : n.attribValue += w;
|
|
2857
2856
|
continue;
|
|
2858
2857
|
}
|
|
2859
|
-
|
|
2858
|
+
Bt(n), w === ">" ? Z(n) : n.state = r.ATTRIB;
|
|
2860
2859
|
continue;
|
|
2861
2860
|
case r.CLOSE_TAG:
|
|
2862
2861
|
if (n.tagName)
|
|
2863
|
-
w === ">" ?
|
|
2862
|
+
w === ">" ? qt(n) : L(P, w) ? n.tagName += w : n.script ? (n.script += "</" + n.tagName, n.tagName = "", n.state = r.SCRIPT) : (a(w) || S(n, "Invalid tagname in closing tag"), n.state = r.CLOSE_TAG_SAW_WHITE);
|
|
2864
2863
|
else {
|
|
2865
2864
|
if (a(w))
|
|
2866
2865
|
continue;
|
|
2867
|
-
v(
|
|
2866
|
+
v(x, w) ? n.script ? (n.script += "</" + w, n.state = r.SCRIPT) : S(n, "Invalid tagname in closing tag.") : n.tagName = w;
|
|
2868
2867
|
}
|
|
2869
2868
|
continue;
|
|
2870
2869
|
case r.CLOSE_TAG_SAW_WHITE:
|
|
2871
2870
|
if (a(w))
|
|
2872
2871
|
continue;
|
|
2873
|
-
w === ">" ?
|
|
2872
|
+
w === ">" ? qt(n) : S(n, "Invalid characters in closing tag");
|
|
2874
2873
|
continue;
|
|
2875
2874
|
case r.TEXT_ENTITY:
|
|
2876
2875
|
case r.ATTRIB_VALUE_ENTITY_Q:
|
|
2877
2876
|
case r.ATTRIB_VALUE_ENTITY_U:
|
|
2878
|
-
var
|
|
2877
|
+
var U, k;
|
|
2879
2878
|
switch (n.state) {
|
|
2880
2879
|
case r.TEXT_ENTITY:
|
|
2881
|
-
|
|
2880
|
+
U = r.TEXT, k = "textNode";
|
|
2882
2881
|
break;
|
|
2883
2882
|
case r.ATTRIB_VALUE_ENTITY_Q:
|
|
2884
|
-
|
|
2883
|
+
U = r.ATTRIB_VALUE_QUOTED, k = "attribValue";
|
|
2885
2884
|
break;
|
|
2886
2885
|
case r.ATTRIB_VALUE_ENTITY_U:
|
|
2887
|
-
|
|
2886
|
+
U = r.ATTRIB_VALUE_UNQUOTED, k = "attribValue";
|
|
2888
2887
|
break;
|
|
2889
2888
|
}
|
|
2890
2889
|
if (w === ";") {
|
|
2891
|
-
var
|
|
2892
|
-
n.opt.unparsedEntities && !Object.values(c.XML_ENTITIES).includes(
|
|
2893
|
-
} else
|
|
2890
|
+
var $ = ir(n);
|
|
2891
|
+
n.opt.unparsedEntities && !Object.values(c.XML_ENTITIES).includes($) ? (n.entity = "", n.state = U, n.write($)) : (n[k] += $, n.entity = "", n.state = U);
|
|
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);
|
|
2894
2893
|
continue;
|
|
2895
2894
|
default:
|
|
2896
2895
|
throw new Error(n, "Unknown state: " + n.state);
|
|
2897
2896
|
}
|
|
2898
|
-
return n.position >= n.bufferCheckPosition &&
|
|
2897
|
+
return n.position >= n.bufferCheckPosition && h(n), n;
|
|
2899
2898
|
}
|
|
2900
2899
|
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
|
|
2901
2900
|
String.fromCodePoint || function() {
|
|
2902
|
-
var u = String.fromCharCode, n = Math.floor,
|
|
2903
|
-
var w = 16384,
|
|
2904
|
-
if (
|
|
2901
|
+
var u = String.fromCharCode, n = Math.floor, M = function() {
|
|
2902
|
+
var w = 16384, R = [], q, U, k = -1, $ = arguments.length;
|
|
2903
|
+
if (!$)
|
|
2905
2904
|
return "";
|
|
2906
|
-
for (var J = ""; ++
|
|
2907
|
-
var
|
|
2908
|
-
if (!isFinite(
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
n(
|
|
2912
|
-
throw RangeError("Invalid code point: " +
|
|
2913
|
-
|
|
2905
|
+
for (var J = ""; ++k < $; ) {
|
|
2906
|
+
var V = Number(arguments[k]);
|
|
2907
|
+
if (!isFinite(V) || // `NaN`, `+Infinity`, or `-Infinity`
|
|
2908
|
+
V < 0 || // not a valid Unicode code point
|
|
2909
|
+
V > 1114111 || // not a valid Unicode code point
|
|
2910
|
+
n(V) !== V)
|
|
2911
|
+
throw RangeError("Invalid code point: " + V);
|
|
2912
|
+
V <= 65535 ? R.push(V) : (V -= 65536, q = (V >> 10) + 55296, U = V % 1024 + 56320, R.push(q, U)), (k + 1 === $ || R.length > w) && (J += u.apply(null, R), R.length = 0);
|
|
2914
2913
|
}
|
|
2915
2914
|
return J;
|
|
2916
2915
|
};
|
|
2917
2916
|
Object.defineProperty ? Object.defineProperty(String, "fromCodePoint", {
|
|
2918
|
-
value:
|
|
2917
|
+
value: M,
|
|
2919
2918
|
configurable: !0,
|
|
2920
2919
|
writable: !0
|
|
2921
|
-
}) : String.fromCodePoint =
|
|
2920
|
+
}) : String.fromCodePoint = M;
|
|
2922
2921
|
}();
|
|
2923
2922
|
})(i);
|
|
2924
|
-
}(
|
|
2923
|
+
}(Vt)), Vt;
|
|
2925
2924
|
}
|
|
2926
|
-
var
|
|
2927
|
-
function
|
|
2928
|
-
if (
|
|
2929
|
-
|
|
2930
|
-
var i = typeof Reflect == "object" ? Reflect : null, c = i && typeof i.apply == "function" ? i.apply : function(
|
|
2931
|
-
return Function.prototype.apply.call(
|
|
2925
|
+
var nt = { exports: {} }, We;
|
|
2926
|
+
function Qr() {
|
|
2927
|
+
if (We) return nt.exports;
|
|
2928
|
+
We = 1;
|
|
2929
|
+
var i = typeof Reflect == "object" ? Reflect : null, c = i && typeof i.apply == "function" ? i.apply : function(p, T, L) {
|
|
2930
|
+
return Function.prototype.apply.call(p, T, L);
|
|
2932
2931
|
}, D;
|
|
2933
|
-
i && typeof i.ownKeys == "function" ? D = i.ownKeys : Object.getOwnPropertySymbols ? D = function(
|
|
2934
|
-
return Object.getOwnPropertyNames(
|
|
2935
|
-
} : D = function(
|
|
2936
|
-
return Object.getOwnPropertyNames(
|
|
2932
|
+
i && typeof i.ownKeys == "function" ? D = i.ownKeys : Object.getOwnPropertySymbols ? D = function(p) {
|
|
2933
|
+
return Object.getOwnPropertyNames(p).concat(Object.getOwnPropertySymbols(p));
|
|
2934
|
+
} : D = function(p) {
|
|
2935
|
+
return Object.getOwnPropertyNames(p);
|
|
2937
2936
|
};
|
|
2938
|
-
function
|
|
2937
|
+
function f(a) {
|
|
2939
2938
|
console && console.warn && console.warn(a);
|
|
2940
2939
|
}
|
|
2941
|
-
var
|
|
2942
|
-
return
|
|
2940
|
+
var h = Number.isNaN || function(p) {
|
|
2941
|
+
return p !== p;
|
|
2943
2942
|
};
|
|
2944
2943
|
function t() {
|
|
2945
2944
|
t.init.call(this);
|
|
2946
2945
|
}
|
|
2947
|
-
|
|
2946
|
+
nt.exports = t, nt.exports.once = P, t.EventEmitter = t, t.prototype._events = void 0, t.prototype._eventsCount = 0, t.prototype._maxListeners = void 0;
|
|
2948
2947
|
var e = 10;
|
|
2949
2948
|
function o(a) {
|
|
2950
2949
|
if (typeof a != "function")
|
|
@@ -2956,25 +2955,25 @@ function Dr() {
|
|
|
2956
2955
|
return e;
|
|
2957
2956
|
},
|
|
2958
2957
|
set: function(a) {
|
|
2959
|
-
if (typeof a != "number" || a < 0 ||
|
|
2958
|
+
if (typeof a != "number" || a < 0 || h(a))
|
|
2960
2959
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + a + ".");
|
|
2961
2960
|
e = a;
|
|
2962
2961
|
}
|
|
2963
2962
|
}), t.init = function() {
|
|
2964
2963
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
2965
|
-
}, t.prototype.setMaxListeners = function(
|
|
2966
|
-
if (typeof
|
|
2967
|
-
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' +
|
|
2968
|
-
return this._maxListeners =
|
|
2964
|
+
}, t.prototype.setMaxListeners = function(p) {
|
|
2965
|
+
if (typeof p != "number" || p < 0 || h(p))
|
|
2966
|
+
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + p + ".");
|
|
2967
|
+
return this._maxListeners = p, this;
|
|
2969
2968
|
};
|
|
2970
2969
|
function l(a) {
|
|
2971
2970
|
return a._maxListeners === void 0 ? t.defaultMaxListeners : a._maxListeners;
|
|
2972
2971
|
}
|
|
2973
2972
|
t.prototype.getMaxListeners = function() {
|
|
2974
2973
|
return l(this);
|
|
2975
|
-
}, t.prototype.emit = function(
|
|
2976
|
-
for (var T = [],
|
|
2977
|
-
var v =
|
|
2974
|
+
}, t.prototype.emit = function(p) {
|
|
2975
|
+
for (var T = [], L = 1; L < arguments.length; L++) T.push(arguments[L]);
|
|
2976
|
+
var v = p === "error", r = this._events;
|
|
2978
2977
|
if (r !== void 0)
|
|
2979
2978
|
v = v && r.error === void 0;
|
|
2980
2979
|
else if (!v)
|
|
@@ -2983,107 +2982,107 @@ function Dr() {
|
|
|
2983
2982
|
var N;
|
|
2984
2983
|
if (T.length > 0 && (N = T[0]), N instanceof Error)
|
|
2985
2984
|
throw N;
|
|
2986
|
-
var
|
|
2987
|
-
throw
|
|
2985
|
+
var A = new Error("Unhandled error." + (N ? " (" + N.message + ")" : ""));
|
|
2986
|
+
throw A.context = N, A;
|
|
2988
2987
|
}
|
|
2989
|
-
var
|
|
2990
|
-
if (
|
|
2988
|
+
var _ = r[p];
|
|
2989
|
+
if (_ === void 0)
|
|
2991
2990
|
return !1;
|
|
2992
|
-
if (typeof
|
|
2993
|
-
c(
|
|
2991
|
+
if (typeof _ == "function")
|
|
2992
|
+
c(_, this, T);
|
|
2994
2993
|
else
|
|
2995
|
-
for (var
|
|
2996
|
-
c(X[
|
|
2994
|
+
for (var C = _.length, X = O(_, C), L = 0; L < C; ++L)
|
|
2995
|
+
c(X[L], this, T);
|
|
2997
2996
|
return !0;
|
|
2998
2997
|
};
|
|
2999
|
-
function
|
|
2998
|
+
function b(a, p, T, L) {
|
|
3000
2999
|
var v, r, N;
|
|
3001
3000
|
if (o(T), r = a._events, r === void 0 ? (r = a._events = /* @__PURE__ */ Object.create(null), a._eventsCount = 0) : (r.newListener !== void 0 && (a.emit(
|
|
3002
3001
|
"newListener",
|
|
3003
|
-
|
|
3002
|
+
p,
|
|
3004
3003
|
T.listener ? T.listener : T
|
|
3005
|
-
), r = a._events), N = r[
|
|
3006
|
-
N = r[
|
|
3007
|
-
else if (typeof N == "function" ? N = r[
|
|
3004
|
+
), r = a._events), N = r[p]), N === void 0)
|
|
3005
|
+
N = r[p] = T, ++a._eventsCount;
|
|
3006
|
+
else if (typeof N == "function" ? N = r[p] = L ? [T, N] : [N, T] : L ? N.unshift(T) : N.push(T), v = l(a), v > 0 && N.length > v && !N.warned) {
|
|
3008
3007
|
N.warned = !0;
|
|
3009
|
-
var
|
|
3010
|
-
|
|
3008
|
+
var A = new Error("Possible EventEmitter memory leak detected. " + N.length + " " + String(p) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3009
|
+
A.name = "MaxListenersExceededWarning", A.emitter = a, A.type = p, A.count = N.length, f(A);
|
|
3011
3010
|
}
|
|
3012
3011
|
return a;
|
|
3013
3012
|
}
|
|
3014
|
-
t.prototype.addListener = function(
|
|
3015
|
-
return
|
|
3016
|
-
}, t.prototype.on = t.prototype.addListener, t.prototype.prependListener = function(
|
|
3017
|
-
return
|
|
3013
|
+
t.prototype.addListener = function(p, T) {
|
|
3014
|
+
return b(this, p, T, !1);
|
|
3015
|
+
}, t.prototype.on = t.prototype.addListener, t.prototype.prependListener = function(p, T) {
|
|
3016
|
+
return b(this, p, T, !0);
|
|
3018
3017
|
};
|
|
3019
3018
|
function m() {
|
|
3020
3019
|
if (!this.fired)
|
|
3021
3020
|
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);
|
|
3022
3021
|
}
|
|
3023
|
-
function y(a,
|
|
3024
|
-
var
|
|
3025
|
-
return v.listener = T,
|
|
3022
|
+
function y(a, p, T) {
|
|
3023
|
+
var L = { fired: !1, wrapFn: void 0, target: a, type: p, listener: T }, v = m.bind(L);
|
|
3024
|
+
return v.listener = T, L.wrapFn = v, v;
|
|
3026
3025
|
}
|
|
3027
|
-
t.prototype.once = function(
|
|
3028
|
-
return o(T), this.on(
|
|
3029
|
-
}, t.prototype.prependOnceListener = function(
|
|
3030
|
-
return o(T), this.prependListener(
|
|
3031
|
-
}, t.prototype.removeListener = function(
|
|
3032
|
-
var
|
|
3026
|
+
t.prototype.once = function(p, T) {
|
|
3027
|
+
return o(T), this.on(p, y(this, p, T)), this;
|
|
3028
|
+
}, t.prototype.prependOnceListener = function(p, T) {
|
|
3029
|
+
return o(T), this.prependListener(p, y(this, p, T)), this;
|
|
3030
|
+
}, t.prototype.removeListener = function(p, T) {
|
|
3031
|
+
var L, v, r, N, A;
|
|
3033
3032
|
if (o(T), v = this._events, v === void 0)
|
|
3034
3033
|
return this;
|
|
3035
|
-
if (
|
|
3034
|
+
if (L = v[p], L === void 0)
|
|
3036
3035
|
return this;
|
|
3037
|
-
if (
|
|
3038
|
-
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete v[
|
|
3039
|
-
else if (typeof
|
|
3040
|
-
for (r = -1, N =
|
|
3041
|
-
if (
|
|
3042
|
-
|
|
3036
|
+
if (L === T || L.listener === T)
|
|
3037
|
+
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete v[p], v.removeListener && this.emit("removeListener", p, L.listener || T));
|
|
3038
|
+
else if (typeof L != "function") {
|
|
3039
|
+
for (r = -1, N = L.length - 1; N >= 0; N--)
|
|
3040
|
+
if (L[N] === T || L[N].listener === T) {
|
|
3041
|
+
A = L[N].listener, r = N;
|
|
3043
3042
|
break;
|
|
3044
3043
|
}
|
|
3045
3044
|
if (r < 0)
|
|
3046
3045
|
return this;
|
|
3047
|
-
r === 0 ?
|
|
3046
|
+
r === 0 ? L.shift() : I(L, r), L.length === 1 && (v[p] = L[0]), v.removeListener !== void 0 && this.emit("removeListener", p, A || T);
|
|
3048
3047
|
}
|
|
3049
3048
|
return this;
|
|
3050
|
-
}, t.prototype.off = t.prototype.removeListener, t.prototype.removeAllListeners = function(
|
|
3051
|
-
var T,
|
|
3052
|
-
if (
|
|
3049
|
+
}, t.prototype.off = t.prototype.removeListener, t.prototype.removeAllListeners = function(p) {
|
|
3050
|
+
var T, L, v;
|
|
3051
|
+
if (L = this._events, L === void 0)
|
|
3053
3052
|
return this;
|
|
3054
|
-
if (
|
|
3055
|
-
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) :
|
|
3053
|
+
if (L.removeListener === void 0)
|
|
3054
|
+
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : L[p] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete L[p]), this;
|
|
3056
3055
|
if (arguments.length === 0) {
|
|
3057
|
-
var r = Object.keys(
|
|
3056
|
+
var r = Object.keys(L), N;
|
|
3058
3057
|
for (v = 0; v < r.length; ++v)
|
|
3059
3058
|
N = r[v], N !== "removeListener" && this.removeAllListeners(N);
|
|
3060
3059
|
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
3061
3060
|
}
|
|
3062
|
-
if (T =
|
|
3063
|
-
this.removeListener(
|
|
3061
|
+
if (T = L[p], typeof T == "function")
|
|
3062
|
+
this.removeListener(p, T);
|
|
3064
3063
|
else if (T !== void 0)
|
|
3065
3064
|
for (v = T.length - 1; v >= 0; v--)
|
|
3066
|
-
this.removeListener(
|
|
3065
|
+
this.removeListener(p, T[v]);
|
|
3067
3066
|
return this;
|
|
3068
3067
|
};
|
|
3069
|
-
function d(a,
|
|
3070
|
-
var
|
|
3071
|
-
if (
|
|
3068
|
+
function d(a, p, T) {
|
|
3069
|
+
var L = a._events;
|
|
3070
|
+
if (L === void 0)
|
|
3072
3071
|
return [];
|
|
3073
|
-
var v =
|
|
3074
|
-
return v === void 0 ? [] : typeof v == "function" ? T ? [v.listener || v] : [v] : T ?
|
|
3072
|
+
var v = L[p];
|
|
3073
|
+
return v === void 0 ? [] : typeof v == "function" ? T ? [v.listener || v] : [v] : T ? x(v) : O(v, v.length);
|
|
3075
3074
|
}
|
|
3076
|
-
t.prototype.listeners = function(
|
|
3077
|
-
return d(this,
|
|
3078
|
-
}, t.prototype.rawListeners = function(
|
|
3079
|
-
return d(this,
|
|
3080
|
-
}, t.listenerCount = function(a,
|
|
3081
|
-
return typeof a.listenerCount == "function" ? a.listenerCount(
|
|
3075
|
+
t.prototype.listeners = function(p) {
|
|
3076
|
+
return d(this, p, !0);
|
|
3077
|
+
}, t.prototype.rawListeners = function(p) {
|
|
3078
|
+
return d(this, p, !1);
|
|
3079
|
+
}, t.listenerCount = function(a, p) {
|
|
3080
|
+
return typeof a.listenerCount == "function" ? a.listenerCount(p) : g.call(a, p);
|
|
3082
3081
|
}, t.prototype.listenerCount = g;
|
|
3083
3082
|
function g(a) {
|
|
3084
|
-
var
|
|
3085
|
-
if (
|
|
3086
|
-
var T =
|
|
3083
|
+
var p = this._events;
|
|
3084
|
+
if (p !== void 0) {
|
|
3085
|
+
var T = p[a];
|
|
3087
3086
|
if (typeof T == "function")
|
|
3088
3087
|
return 1;
|
|
3089
3088
|
if (T !== void 0)
|
|
@@ -3094,124 +3093,124 @@ function Dr() {
|
|
|
3094
3093
|
t.prototype.eventNames = function() {
|
|
3095
3094
|
return this._eventsCount > 0 ? D(this._events) : [];
|
|
3096
3095
|
};
|
|
3097
|
-
function
|
|
3098
|
-
for (var T = new Array(
|
|
3099
|
-
T[
|
|
3096
|
+
function O(a, p) {
|
|
3097
|
+
for (var T = new Array(p), L = 0; L < p; ++L)
|
|
3098
|
+
T[L] = a[L];
|
|
3100
3099
|
return T;
|
|
3101
3100
|
}
|
|
3102
|
-
function
|
|
3103
|
-
for (;
|
|
3104
|
-
a[
|
|
3101
|
+
function I(a, p) {
|
|
3102
|
+
for (; p + 1 < a.length; p++)
|
|
3103
|
+
a[p] = a[p + 1];
|
|
3105
3104
|
a.pop();
|
|
3106
3105
|
}
|
|
3107
|
-
function
|
|
3108
|
-
for (var
|
|
3109
|
-
|
|
3110
|
-
return
|
|
3106
|
+
function x(a) {
|
|
3107
|
+
for (var p = new Array(a.length), T = 0; T < p.length; ++T)
|
|
3108
|
+
p[T] = a[T].listener || a[T];
|
|
3109
|
+
return p;
|
|
3111
3110
|
}
|
|
3112
|
-
function
|
|
3113
|
-
return new Promise(function(T,
|
|
3111
|
+
function P(a, p) {
|
|
3112
|
+
return new Promise(function(T, L) {
|
|
3114
3113
|
function v(N) {
|
|
3115
|
-
a.removeListener(
|
|
3114
|
+
a.removeListener(p, r), L(N);
|
|
3116
3115
|
}
|
|
3117
3116
|
function r() {
|
|
3118
3117
|
typeof a.removeListener == "function" && a.removeListener("error", v), T([].slice.call(arguments));
|
|
3119
3118
|
}
|
|
3120
|
-
s(a,
|
|
3119
|
+
s(a, p, r, { once: !0 }), p !== "error" && E(a, v, { once: !0 });
|
|
3121
3120
|
});
|
|
3122
3121
|
}
|
|
3123
|
-
function E(a,
|
|
3124
|
-
typeof a.on == "function" && s(a, "error",
|
|
3122
|
+
function E(a, p, T) {
|
|
3123
|
+
typeof a.on == "function" && s(a, "error", p, T);
|
|
3125
3124
|
}
|
|
3126
|
-
function s(a,
|
|
3125
|
+
function s(a, p, T, L) {
|
|
3127
3126
|
if (typeof a.on == "function")
|
|
3128
|
-
|
|
3127
|
+
L.once ? a.once(p, T) : a.on(p, T);
|
|
3129
3128
|
else if (typeof a.addEventListener == "function")
|
|
3130
|
-
a.addEventListener(
|
|
3131
|
-
|
|
3129
|
+
a.addEventListener(p, function v(r) {
|
|
3130
|
+
L.once && a.removeEventListener(p, v), T(r);
|
|
3132
3131
|
});
|
|
3133
3132
|
else
|
|
3134
3133
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof a);
|
|
3135
3134
|
}
|
|
3136
|
-
return
|
|
3135
|
+
return nt.exports;
|
|
3137
3136
|
}
|
|
3138
|
-
var
|
|
3139
|
-
function
|
|
3140
|
-
return
|
|
3141
|
-
|
|
3137
|
+
var it = {}, Ge;
|
|
3138
|
+
function Zr() {
|
|
3139
|
+
return Ge || (Ge = 1, (function() {
|
|
3140
|
+
it.stripBOM = function(i) {
|
|
3142
3141
|
return i[0] === "\uFEFF" ? i.substring(1) : i;
|
|
3143
3142
|
};
|
|
3144
|
-
}).call(
|
|
3143
|
+
}).call(it)), it;
|
|
3145
3144
|
}
|
|
3146
|
-
var
|
|
3147
|
-
function
|
|
3148
|
-
return
|
|
3145
|
+
var Q = {}, Ye;
|
|
3146
|
+
function rr() {
|
|
3147
|
+
return Ye || (Ye = 1, (function() {
|
|
3149
3148
|
var i;
|
|
3150
|
-
i = new RegExp(/(?!xmlns)^.*:/),
|
|
3149
|
+
i = new RegExp(/(?!xmlns)^.*:/), Q.normalize = function(c) {
|
|
3151
3150
|
return c.toLowerCase();
|
|
3152
|
-
},
|
|
3151
|
+
}, Q.firstCharLowerCase = function(c) {
|
|
3153
3152
|
return c.charAt(0).toLowerCase() + c.slice(1);
|
|
3154
|
-
},
|
|
3153
|
+
}, Q.stripPrefix = function(c) {
|
|
3155
3154
|
return c.replace(i, "");
|
|
3156
|
-
},
|
|
3155
|
+
}, Q.parseNumbers = function(c) {
|
|
3157
3156
|
return isNaN(c) || (c = c % 1 === 0 ? parseInt(c, 10) : parseFloat(c)), c;
|
|
3158
|
-
},
|
|
3157
|
+
}, Q.parseBooleans = function(c) {
|
|
3159
3158
|
return /^(?:true|false)$/i.test(c) && (c = c.toLowerCase() === "true"), c;
|
|
3160
3159
|
};
|
|
3161
|
-
}).call(
|
|
3160
|
+
}).call(Q)), Q;
|
|
3162
3161
|
}
|
|
3163
3162
|
var Ke;
|
|
3164
|
-
function
|
|
3163
|
+
function Jr() {
|
|
3165
3164
|
return Ke || (Ke = 1, function(i) {
|
|
3166
3165
|
(function() {
|
|
3167
|
-
var c, D,
|
|
3166
|
+
var c, D, f, h, t, e, o, l, b, m = function(g, O) {
|
|
3168
3167
|
return function() {
|
|
3169
|
-
return g.apply(
|
|
3168
|
+
return g.apply(O, arguments);
|
|
3170
3169
|
};
|
|
3171
|
-
}, y = function(g,
|
|
3172
|
-
for (var
|
|
3173
|
-
d.call(
|
|
3174
|
-
function
|
|
3170
|
+
}, y = function(g, O) {
|
|
3171
|
+
for (var I in O)
|
|
3172
|
+
d.call(O, I) && (g[I] = O[I]);
|
|
3173
|
+
function x() {
|
|
3175
3174
|
this.constructor = g;
|
|
3176
3175
|
}
|
|
3177
|
-
return
|
|
3176
|
+
return x.prototype = O.prototype, g.prototype = new x(), g.__super__ = O.prototype, g;
|
|
3178
3177
|
}, d = {}.hasOwnProperty;
|
|
3179
|
-
l =
|
|
3178
|
+
l = Hr(), h = Qr(), c = Zr(), o = rr(), b = kt.setImmediate, D = $t().defaults, t = function(g) {
|
|
3180
3179
|
return typeof g == "object" && g != null && Object.keys(g).length === 0;
|
|
3181
|
-
}, e = function(g,
|
|
3182
|
-
var
|
|
3183
|
-
for (
|
|
3184
|
-
E = g[
|
|
3185
|
-
return
|
|
3186
|
-
},
|
|
3187
|
-
var
|
|
3188
|
-
return
|
|
3180
|
+
}, e = function(g, O, I) {
|
|
3181
|
+
var x, P, E;
|
|
3182
|
+
for (x = 0, P = g.length; x < P; x++)
|
|
3183
|
+
E = g[x], O = E(O, I);
|
|
3184
|
+
return O;
|
|
3185
|
+
}, f = function(g, O, I) {
|
|
3186
|
+
var x;
|
|
3187
|
+
return x = /* @__PURE__ */ Object.create(null), x.value = I, x.writable = !0, x.enumerable = !0, x.configurable = !0, Object.defineProperty(g, O, x);
|
|
3189
3188
|
}, i.Parser = function(g) {
|
|
3190
|
-
y(
|
|
3191
|
-
function
|
|
3189
|
+
y(O, g);
|
|
3190
|
+
function O(I) {
|
|
3192
3191
|
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);
|
|
3193
|
-
var
|
|
3192
|
+
var x, P, E;
|
|
3194
3193
|
if (!(this instanceof i.Parser))
|
|
3195
|
-
return new i.Parser(
|
|
3196
|
-
this.options = {},
|
|
3197
|
-
for (
|
|
3198
|
-
d.call(
|
|
3199
|
-
for (
|
|
3200
|
-
d.call(
|
|
3194
|
+
return new i.Parser(I);
|
|
3195
|
+
this.options = {}, P = D["0.2"];
|
|
3196
|
+
for (x in P)
|
|
3197
|
+
d.call(P, x) && (E = P[x], this.options[x] = E);
|
|
3198
|
+
for (x in I)
|
|
3199
|
+
d.call(I, x) && (E = I[x], this.options[x] = E);
|
|
3201
3200
|
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();
|
|
3202
3201
|
}
|
|
3203
|
-
return
|
|
3204
|
-
var
|
|
3202
|
+
return O.prototype.processAsync = function() {
|
|
3203
|
+
var I, x;
|
|
3205
3204
|
try {
|
|
3206
|
-
return this.remaining.length <= this.options.chunkSize ? (
|
|
3207
|
-
} catch (
|
|
3208
|
-
if (
|
|
3209
|
-
return this.saxParser.errThrown = !0, this.emit(
|
|
3205
|
+
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));
|
|
3206
|
+
} catch (P) {
|
|
3207
|
+
if (x = P, !this.saxParser.errThrown)
|
|
3208
|
+
return this.saxParser.errThrown = !0, this.emit(x);
|
|
3210
3209
|
}
|
|
3211
|
-
},
|
|
3212
|
-
return
|
|
3213
|
-
},
|
|
3214
|
-
var
|
|
3210
|
+
}, O.prototype.assignOrPush = function(I, x, P) {
|
|
3211
|
+
return x in I ? (I[x] instanceof Array || f(I, x, [I[x]]), I[x].push(P)) : this.options.explicitArray ? f(I, x, [P]) : f(I, x, P);
|
|
3212
|
+
}, O.prototype.reset = function() {
|
|
3213
|
+
var I, x, P, E;
|
|
3215
3214
|
return this.removeAllListeners(), this.saxParser = l.parser(this.options.strict, {
|
|
3216
3215
|
trim: !1,
|
|
3217
3216
|
normalize: !1,
|
|
@@ -3226,141 +3225,145 @@ function br() {
|
|
|
3226
3225
|
if (!s.saxParser.ended)
|
|
3227
3226
|
return s.saxParser.ended = !0, s.emit("end", s.resultObject);
|
|
3228
3227
|
};
|
|
3229
|
-
}(this), this.saxParser.ended = !1, this.EXPLICIT_CHARKEY = this.options.explicitCharkey, this.resultObject = null, E = [],
|
|
3228
|
+
}(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 = /* @__PURE__ */ function(s) {
|
|
3230
3229
|
return function(a) {
|
|
3231
|
-
var
|
|
3232
|
-
if (
|
|
3230
|
+
var p, T, L, v, r;
|
|
3231
|
+
if (L = {}, L[x] = "", !s.options.ignoreAttrs) {
|
|
3233
3232
|
r = a.attributes;
|
|
3234
|
-
for (
|
|
3235
|
-
d.call(r,
|
|
3233
|
+
for (p in r)
|
|
3234
|
+
d.call(r, p) && (!(I in L) && !s.options.mergeAttrs && (L[I] = {}), T = s.options.attrValueProcessors ? e(s.options.attrValueProcessors, a.attributes[p], p) : a.attributes[p], v = s.options.attrNameProcessors ? e(s.options.attrNameProcessors, p) : p, s.options.mergeAttrs ? s.assignOrPush(L, v, T) : f(L[I], v, T));
|
|
3236
3235
|
}
|
|
3237
|
-
return
|
|
3236
|
+
return L["#name"] = s.options.tagNameProcessors ? e(s.options.tagNameProcessors, a.name) : a.name, s.options.xmlns && (L[s.options.xmlnskey] = {
|
|
3238
3237
|
uri: a.uri,
|
|
3239
3238
|
local: a.local
|
|
3240
|
-
}), E.push(
|
|
3239
|
+
}), E.push(L);
|
|
3241
3240
|
};
|
|
3242
3241
|
}(this), this.saxParser.onclosetag = /* @__PURE__ */ function(s) {
|
|
3243
3242
|
return function() {
|
|
3244
|
-
var a,
|
|
3245
|
-
if (r = E.pop(), v = r["#name"], (!s.options.explicitChildren || !s.options.preserveChildrenOrder) && delete r["#name"], r.cdata === !0 && (a = r.cdata, delete r.cdata),
|
|
3246
|
-
var X,
|
|
3247
|
-
for (
|
|
3248
|
-
|
|
3249
|
-
return
|
|
3243
|
+
var a, p, T, L, v, r, N, A, _, C;
|
|
3244
|
+
if (r = E.pop(), v = r["#name"], (!s.options.explicitChildren || !s.options.preserveChildrenOrder) && delete r["#name"], r.cdata === !0 && (a = r.cdata, delete r.cdata), _ = E[E.length - 1], r[x].match(/^\s*$/) && !a ? (p = r[x], delete r[x]) : (s.options.trim && (r[x] = r[x].trim()), s.options.normalize && (r[x] = r[x].replace(/\s{2,}/g, " ").trim()), r[x] = s.options.valueProcessors ? e(s.options.valueProcessors, r[x], v) : r[x], Object.keys(r).length === 1 && x in r && !s.EXPLICIT_CHARKEY && (r = r[x])), t(r) && (typeof s.options.emptyTag == "function" ? r = s.options.emptyTag() : r = s.options.emptyTag !== "" ? s.options.emptyTag : p), s.options.validator != null && (C = "/" + function() {
|
|
3245
|
+
var X, j, F;
|
|
3246
|
+
for (F = [], X = 0, j = E.length; X < j; X++)
|
|
3247
|
+
L = E[X], F.push(L["#name"]);
|
|
3248
|
+
return F;
|
|
3250
3249
|
}().concat(v).join("/"), function() {
|
|
3251
3250
|
var X;
|
|
3252
3251
|
try {
|
|
3253
|
-
return r = s.options.validator(
|
|
3254
|
-
} catch (
|
|
3255
|
-
return X =
|
|
3252
|
+
return r = s.options.validator(C, _ && _[v], r);
|
|
3253
|
+
} catch (j) {
|
|
3254
|
+
return X = j, s.emit("error", X);
|
|
3256
3255
|
}
|
|
3257
3256
|
}()), s.options.explicitChildren && !s.options.mergeAttrs && typeof r == "object") {
|
|
3258
3257
|
if (!s.options.preserveChildrenOrder)
|
|
3259
|
-
|
|
3260
|
-
else if (
|
|
3261
|
-
|
|
3258
|
+
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;
|
|
3259
|
+
else if (_) {
|
|
3260
|
+
_[s.options.childkey] = _[s.options.childkey] || [], N = {};
|
|
3262
3261
|
for (T in r)
|
|
3263
|
-
d.call(r, T) &&
|
|
3264
|
-
|
|
3262
|
+
d.call(r, T) && f(N, T, r[T]);
|
|
3263
|
+
_[s.options.childkey].push(N), delete r["#name"], Object.keys(r).length === 1 && x in r && !s.EXPLICIT_CHARKEY && (r = r[x]);
|
|
3265
3264
|
}
|
|
3266
3265
|
}
|
|
3267
|
-
return E.length > 0 ? s.assignOrPush(
|
|
3266
|
+
return E.length > 0 ? s.assignOrPush(_, v, r) : (s.options.explicitRoot && (A = r, r = {}, f(r, v, A)), s.resultObject = r, s.saxParser.ended = !0, s.emit("end", s.resultObject));
|
|
3268
3267
|
};
|
|
3269
|
-
}(this),
|
|
3268
|
+
}(this), P = /* @__PURE__ */ function(s) {
|
|
3270
3269
|
return function(a) {
|
|
3271
|
-
var
|
|
3270
|
+
var p, T;
|
|
3272
3271
|
if (T = E[E.length - 1], T)
|
|
3273
|
-
return T[
|
|
3272
|
+
return T[x] += a, s.options.explicitChildren && s.options.preserveChildrenOrder && s.options.charsAsChildren && (s.options.includeWhiteChars || a.replace(/\\n/g, "").trim() !== "") && (T[s.options.childkey] = T[s.options.childkey] || [], p = {
|
|
3274
3273
|
"#name": "__text__"
|
|
3275
|
-
},
|
|
3274
|
+
}, p[x] = a, s.options.normalize && (p[x] = p[x].replace(/\s{2,}/g, " ").trim()), T[s.options.childkey].push(p)), T;
|
|
3276
3275
|
};
|
|
3277
|
-
}(this), this.saxParser.ontext =
|
|
3276
|
+
}(this), this.saxParser.ontext = P, this.saxParser.oncdata = /* @__PURE__ */ function(s) {
|
|
3278
3277
|
return function(a) {
|
|
3279
|
-
var
|
|
3280
|
-
if (
|
|
3281
|
-
return
|
|
3278
|
+
var p;
|
|
3279
|
+
if (p = P(a), p)
|
|
3280
|
+
return p.cdata = !0;
|
|
3282
3281
|
};
|
|
3283
3282
|
}();
|
|
3284
|
-
},
|
|
3285
|
-
var
|
|
3286
|
-
|
|
3287
|
-
return this.reset(),
|
|
3283
|
+
}, O.prototype.parseString = function(I, x) {
|
|
3284
|
+
var P;
|
|
3285
|
+
x != null && typeof x == "function" && (this.on("end", function(E) {
|
|
3286
|
+
return this.reset(), x(null, E);
|
|
3288
3287
|
}), this.on("error", function(E) {
|
|
3289
|
-
return this.reset(),
|
|
3288
|
+
return this.reset(), x(E);
|
|
3290
3289
|
}));
|
|
3291
3290
|
try {
|
|
3292
|
-
return
|
|
3291
|
+
return I = I.toString(), I.trim() === "" ? (this.emit("end", null), !0) : (I = c.stripBOM(I), this.options.async ? (this.remaining = I, b(this.processAsync), this.saxParser) : this.saxParser.write(I).close());
|
|
3293
3292
|
} catch (E) {
|
|
3294
|
-
if (
|
|
3293
|
+
if (P = E, this.saxParser.errThrown || this.saxParser.ended) {
|
|
3295
3294
|
if (this.saxParser.ended)
|
|
3296
|
-
throw
|
|
3297
|
-
} else return this.emit("error",
|
|
3295
|
+
throw P;
|
|
3296
|
+
} else return this.emit("error", P), this.saxParser.errThrown = !0;
|
|
3298
3297
|
}
|
|
3299
|
-
},
|
|
3300
|
-
return new Promise(/* @__PURE__ */ function(
|
|
3301
|
-
return function(
|
|
3302
|
-
return
|
|
3303
|
-
return s ? E(s) :
|
|
3298
|
+
}, O.prototype.parseStringPromise = function(I) {
|
|
3299
|
+
return new Promise(/* @__PURE__ */ function(x) {
|
|
3300
|
+
return function(P, E) {
|
|
3301
|
+
return x.parseString(I, function(s, a) {
|
|
3302
|
+
return s ? E(s) : P(a);
|
|
3304
3303
|
});
|
|
3305
3304
|
};
|
|
3306
3305
|
}(this));
|
|
3307
|
-
},
|
|
3308
|
-
}(
|
|
3309
|
-
var
|
|
3310
|
-
return
|
|
3311
|
-
}, i.parseStringPromise = function(g,
|
|
3312
|
-
var
|
|
3313
|
-
return typeof
|
|
3306
|
+
}, O;
|
|
3307
|
+
}(h), i.parseString = function(g, O, I) {
|
|
3308
|
+
var x, P, E;
|
|
3309
|
+
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);
|
|
3310
|
+
}, i.parseStringPromise = function(g, O) {
|
|
3311
|
+
var I, x;
|
|
3312
|
+
return typeof O == "object" && (I = O), x = new i.Parser(I), x.parseStringPromise(g);
|
|
3314
3313
|
};
|
|
3315
|
-
}).call(
|
|
3316
|
-
}(
|
|
3314
|
+
}).call(rt);
|
|
3315
|
+
}(rt)), rt;
|
|
3317
3316
|
}
|
|
3318
|
-
var
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
}).
|
|
3336
|
-
|
|
3317
|
+
var ze;
|
|
3318
|
+
function tn() {
|
|
3319
|
+
return ze || (ze = 1, (function() {
|
|
3320
|
+
var i, c, D, f, h = function(e, o) {
|
|
3321
|
+
for (var l in o)
|
|
3322
|
+
t.call(o, l) && (e[l] = o[l]);
|
|
3323
|
+
function b() {
|
|
3324
|
+
this.constructor = e;
|
|
3325
|
+
}
|
|
3326
|
+
return b.prototype = o.prototype, e.prototype = new b(), e.__super__ = o.prototype, e;
|
|
3327
|
+
}, t = {}.hasOwnProperty;
|
|
3328
|
+
c = $t(), i = Yr(), D = Jr(), f = rr(), G.defaults = c.defaults, G.processors = f, G.ValidationError = function(e) {
|
|
3329
|
+
h(o, e);
|
|
3330
|
+
function o(l) {
|
|
3331
|
+
this.message = l;
|
|
3332
|
+
}
|
|
3333
|
+
return o;
|
|
3334
|
+
}(Error), G.Builder = i.Builder, G.Parser = D.Parser, G.parseString = D.parseString, G.parseStringPromise = D.parseStringPromise;
|
|
3335
|
+
}).call(G)), G;
|
|
3336
|
+
}
|
|
3337
|
+
var en = tn();
|
|
3338
|
+
const rn = (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), nn = (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(on) && 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(sn) && 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(un) && 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(an), on = (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), sn = (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", un = (i) => typeof i == "object" && i !== null && i.hasOwnProperty("itunes:email") && Array.isArray(i["itunes:email"]) && i.hasOwnProperty("itunes:name") && Array.isArray(i["itunes:name"]), an = (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(cn) && 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(ln) && i.hasOwnProperty("content:encoded") && Array.isArray(i["content:encoded"]), cn = (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", ln = (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", fn = "https://api.allorigins.win/get?url=", pn = async (i, c = !1) => {
|
|
3337
3339
|
try {
|
|
3338
|
-
const
|
|
3339
|
-
if (
|
|
3340
|
+
const D = c ? `${fn}${encodeURIComponent(i)}` : i, f = await fetch(D);
|
|
3341
|
+
if (f.ok) return f.text();
|
|
3340
3342
|
} catch {
|
|
3341
3343
|
throw new Error("Error occurred fetching Feed from Substack");
|
|
3342
3344
|
}
|
|
3343
|
-
},
|
|
3344
|
-
|
|
3345
|
-
},
|
|
3345
|
+
}, hn = async (i = "", c) => {
|
|
3346
|
+
en.parseString(i, c);
|
|
3347
|
+
}, dn = (i) => ({
|
|
3346
3348
|
title: i.title[0],
|
|
3347
3349
|
description: i.description[0],
|
|
3348
3350
|
link: i.link[0],
|
|
3349
3351
|
pubDate: i.pubDate[0],
|
|
3350
3352
|
content: i["content:encoded"][0]
|
|
3351
|
-
}),
|
|
3352
|
-
const
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3353
|
+
}), yn = async (i, c = !1, D) => {
|
|
3354
|
+
const f = await pn(i, c);
|
|
3355
|
+
if (!D) return f;
|
|
3356
|
+
await hn(f, D);
|
|
3357
|
+
}, mn = (i, c) => {
|
|
3358
|
+
if (!rn(i)) throw new Error("Feed is not in the correct format");
|
|
3356
3359
|
try {
|
|
3357
|
-
return i.rss.channel.filter(
|
|
3360
|
+
return i.rss.channel.filter(nn).filter((D) => D.link[0] === c);
|
|
3358
3361
|
} catch {
|
|
3359
3362
|
throw new Error(`Error occurred fetching Feed by Link: ${c}`);
|
|
3360
3363
|
}
|
|
3361
|
-
},
|
|
3364
|
+
}, gn = (i) => i[0].item.map(dn);
|
|
3362
3365
|
export {
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
+
mn as getFeedByLink,
|
|
3367
|
+
gn as getPosts,
|
|
3368
|
+
yn as getSubstackFeed
|
|
3366
3369
|
};
|