math-rich-editor-pack 0.1.2 → 0.1.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.
@@ -0,0 +1,3989 @@
1
+ import { g as jt } from "./_commonjsHelpers-DaMA6jEr.js";
2
+ function Qt(W, Y) {
3
+ for (var L = 0; L < Y.length; L++) {
4
+ const o = Y[L];
5
+ if (typeof o != "string" && !Array.isArray(o)) {
6
+ for (const U in o)
7
+ if (U !== "default" && !(U in W)) {
8
+ const P = Object.getOwnPropertyDescriptor(o, U);
9
+ P && Object.defineProperty(W, U, P.get ? P : {
10
+ enumerable: !0,
11
+ get: () => o[U]
12
+ });
13
+ }
14
+ }
15
+ }
16
+ return Object.freeze(Object.defineProperty(W, Symbol.toStringTag, { value: "Module" }));
17
+ }
18
+ var Nt, Ot;
19
+ function Wt() {
20
+ return Ot || (Ot = 1, Nt = {
21
+ ELEMENT_NODE: 1,
22
+ ATTRIBUTE_NODE: 2,
23
+ TEXT_NODE: 3,
24
+ CDATA_SECTION_NODE: 4,
25
+ ENTITY_REFERENCE_NODE: 5,
26
+ ENTITY_NODE: 6,
27
+ PROCESSING_INSTRUCTION_NODE: 7,
28
+ COMMENT_NODE: 8,
29
+ DOCUMENT_NODE: 9,
30
+ DOCUMENT_TYPE_NODE: 10,
31
+ DOCUMENT_FRAGMENT_NODE: 11,
32
+ NOTATION_NODE: 12
33
+ }), Nt;
34
+ }
35
+ var vt, Pt;
36
+ function Jt() {
37
+ if (Pt) return vt;
38
+ Pt = 1;
39
+ let {
40
+ ELEMENT_NODE: W,
41
+ TEXT_NODE: Y,
42
+ CDATA_SECTION_NODE: L,
43
+ DOCUMENT_NODE: o,
44
+ DOCUMENT_FRAGMENT_NODE: U
45
+ } = Wt();
46
+ return vt = class {
47
+ constructor({ mode: O = "function" } = {}) {
48
+ this.templates = [], this.mode = O, this.lookupText = null, this.lookupDocument = null, this.lookupElement = {};
49
+ }
50
+ match(O, R) {
51
+ if (Array.isArray(O) || (O = [O]), this.mode === "function") {
52
+ if (O.find((x) => typeof x != "function")) throw new Error("All matchers must be functions");
53
+ this.templates.push({ matcher: O, template: R });
54
+ } else if (this.mode === "lookup") {
55
+ if (O.find((x) => !x.nt)) throw new Error("All matchers must be objects with a type");
56
+ O.forEach(({ nt: x, ns: d, ln: b }) => {
57
+ if (x === "text") {
58
+ if (this.lookupText) throw new Error("You can only have one text lookup template");
59
+ this.lookupText = R;
60
+ } else if (x === "document") {
61
+ if (this.lookupDocument) throw new Error("You can only have one document lookup template");
62
+ this.lookupDocument = R;
63
+ } else if (x === "element") {
64
+ if (this.lookupElement[d] || (this.lookupElement[d] = {}), this.lookupElement[d][b])
65
+ throw new Error(`You can only have one element lookup template ${d}|${b}`);
66
+ this.lookupElement[d][b] = R;
67
+ } else throw new Error(`Unknown lookup node type "${x}"`);
68
+ });
69
+ } else throw new Error(`Unknown mode ${this.mode}`);
70
+ return this;
71
+ }
72
+ result(O) {
73
+ this.res = O;
74
+ }
75
+ findMatch(O) {
76
+ let R = O.nodeType;
77
+ if (this.mode === "function")
78
+ for (let x = 0; x < this.templates.length; x++) {
79
+ let d = this.templates[x];
80
+ if (!d.matcher.some((c) => c(O))) continue;
81
+ this.stack.unshift(O);
82
+ let b = d.template(O, this.out[0], this);
83
+ return this.stack.shift(), b;
84
+ }
85
+ else if (this.mode === "lookup") {
86
+ if ((R === Y || R === L) && this.lookupText) {
87
+ this.stack.unshift(O);
88
+ let x = this.lookupText(O, this.out[0], this);
89
+ return this.stack.shift(), x;
90
+ }
91
+ if (R === o && this.lookupDocument) {
92
+ this.stack.unshift(O);
93
+ let x = this.lookupDocument(O, this.out[0], this);
94
+ return this.stack.shift(), x;
95
+ }
96
+ if (R === W) {
97
+ let { namespaceURI: x, localName: d } = O, b = this.lookupElement[x] && this.lookupElement[x][d] || this.lookupElement[""] && this.lookupElement[""]["*"];
98
+ if (b) {
99
+ this.stack.unshift(O);
100
+ let c = b(O, this.out[0], this);
101
+ return this.stack.shift(), c;
102
+ }
103
+ }
104
+ } else throw new Error(`Unknown mode ${this.mode}`);
105
+ if (R === Y || R === L) {
106
+ let x = this.out[0];
107
+ if (x) {
108
+ let d = x.ownerDocument.createTextNode(O.textContent);
109
+ x.appendChild(d);
110
+ }
111
+ return O;
112
+ }
113
+ if (R === W || R === o || R === U) {
114
+ this.stack.unshift(O);
115
+ let x = this.walk(this.out[0]);
116
+ return this.stack.shift(), x;
117
+ }
118
+ }
119
+ walk(O, R) {
120
+ this.out.unshift(O);
121
+ let x = [];
122
+ if (R)
123
+ Array.isArray(R) || (R = [R]), R.forEach((d) => x.push(this.findMatch(d)));
124
+ else {
125
+ let d = this.stack[0], b = d.firstChild;
126
+ for (; b; )
127
+ x.push(this.findMatch(b)), b = b.nextSibling;
128
+ }
129
+ return this.out.shift(), x;
130
+ }
131
+ run(O, R) {
132
+ if (this.stack = [], this.out = [], this.res = null, R)
133
+ process.nextTick(() => {
134
+ this.findMatch(O), R(null, this.res);
135
+ });
136
+ else
137
+ return this.findMatch(O), this.res;
138
+ }
139
+ }, vt;
140
+ }
141
+ var Ct, _t;
142
+ function Bt() {
143
+ return _t || (_t = 1, Ct = function(Y, L = {}) {
144
+ let o = /^(\w+):(.+)/.exec(Y);
145
+ return o && L[o[1]] ? { ns: L[o[1]], ln: o[2] } : { qn: Y };
146
+ }), Ct;
147
+ }
148
+ var wt, Lt;
149
+ function Kt() {
150
+ if (Lt) return wt;
151
+ Lt = 1;
152
+ let W = Bt();
153
+ return wt = function(L, o = {}, U = {}) {
154
+ return {
155
+ el: (P, O = {}, R) => {
156
+ let x = W(P, U), d = x.ns ? L.createElementNS(x.ns, P) : L.createElement(P);
157
+ return Object.keys(O).forEach((b) => {
158
+ if (O[b] == null || O[b] === "") return;
159
+ let c = W(b, U);
160
+ c.ns ? d.setAttributeNS(c.ns, b, O[b]) : d.setAttribute(b, O[b]);
161
+ }), R && R.appendChild(d), d;
162
+ },
163
+ amap: (P, O = {}) => (Object.keys(o).forEach((R) => {
164
+ let x = W(R, U);
165
+ x.ns && P.hasAttributeNS(x.ns, x.ln) ? O[o[R]] = P.getAttributeNS(x.ns, x.ln) : x.qn && P.hasAttribute(R) && (O[o[R]] = P.getAttribute(R));
166
+ }), O)
167
+ };
168
+ }, wt;
169
+ }
170
+ var bt, It;
171
+ function zt() {
172
+ if (It) return bt;
173
+ It = 1;
174
+ let { ELEMENT_NODE: W, TEXT_NODE: Y, CDATA_SECTION_NODE: L, DOCUMENT_NODE: o } = Wt(), U = Bt(), P = (O) => O.toLowerCase();
175
+ return bt = class {
176
+ constructor(R = {}, x = !1) {
177
+ this.ns = R, this.ci = x;
178
+ }
179
+ text() {
180
+ return (R) => R.nodeType === Y || R.nodeType === L;
181
+ }
182
+ document() {
183
+ return (R) => R.nodeType === o;
184
+ }
185
+ el(R) {
186
+ let x = U(R, this.ns);
187
+ return x.ns ? (d) => d.nodeType === W && (d.namespaceURI === x.ns || x.ns === "*") && ((this.ci ? P(d.localName) === P(x.ln) : d.localName === x.ln) || x.ln === "*") : (d) => d.nodeType === W && ((this.ci ? P(d.nodeName) === P(R) : d.nodeName === R) || R === "*");
188
+ }
189
+ }, bt;
190
+ }
191
+ var gt = {}, kt;
192
+ function Zt() {
193
+ return kt || (kt = 1, gt.document = function() {
194
+ return document;
195
+ }, gt.implementation = function() {
196
+ return document.implementation;
197
+ }), gt;
198
+ }
199
+ var Dt = {}, Mt;
200
+ function $t() {
201
+ return Mt || (Mt = 1, (function(W) {
202
+ var Y = W;
203
+ (function(L) {
204
+ o.prototype = new Object(), o.prototype.constructor = o, o.superclass = Object.prototype;
205
+ function o() {
206
+ this.init();
207
+ }
208
+ o.prototype.init = function() {
209
+ this.reduceActions = [], this.reduceActions[3] = function(t) {
210
+ return new d(t[0], t[2]);
211
+ }, this.reduceActions[5] = function(t) {
212
+ return new b(t[0], t[2]);
213
+ }, this.reduceActions[7] = function(t) {
214
+ return new c(t[0], t[2]);
215
+ }, this.reduceActions[8] = function(t) {
216
+ return new st(t[0], t[2]);
217
+ }, this.reduceActions[10] = function(t) {
218
+ return new Z(t[0], t[2]);
219
+ }, this.reduceActions[11] = function(t) {
220
+ return new ut(t[0], t[2]);
221
+ }, this.reduceActions[12] = function(t) {
222
+ return new G(t[0], t[2]);
223
+ }, this.reduceActions[13] = function(t) {
224
+ return new Q(t[0], t[2]);
225
+ }, this.reduceActions[15] = function(t) {
226
+ return new K(t[0], t[2]);
227
+ }, this.reduceActions[16] = function(t) {
228
+ return new z(t[0], t[2]);
229
+ }, this.reduceActions[18] = function(t) {
230
+ return new $(t[0], t[2]);
231
+ }, this.reduceActions[19] = function(t) {
232
+ return new J(t[0], t[2]);
233
+ }, this.reduceActions[20] = function(t) {
234
+ return new ot(t[0], t[2]);
235
+ }, this.reduceActions[22] = function(t) {
236
+ return new R(t[1]);
237
+ }, this.reduceActions[24] = function(t) {
238
+ return new nt(t[0], t[2]);
239
+ }, this.reduceActions[25] = function(t) {
240
+ return new X(void 0, void 0, t[0]);
241
+ }, this.reduceActions[27] = function(t) {
242
+ return t[0].locationPath = t[2], t[0];
243
+ }, this.reduceActions[28] = function(t) {
244
+ return t[0].locationPath = t[2], t[0].locationPath.steps.unshift(new v(v.DESCENDANTORSELF, new B(B.NODE, void 0), [])), t[0];
245
+ }, this.reduceActions[29] = function(t) {
246
+ return new X(t[0], [], void 0);
247
+ }, this.reduceActions[30] = function(t) {
248
+ return p.instance_of(t[0], X) ? (t[0].filterPredicates == null && (t[0].filterPredicates = []), t[0].filterPredicates.push(t[1]), t[0]) : new X(t[0], [t[1]], void 0);
249
+ }, this.reduceActions[32] = function(t) {
250
+ return t[1];
251
+ }, this.reduceActions[33] = function(t) {
252
+ return new D(t[0]);
253
+ }, this.reduceActions[34] = function(t) {
254
+ return new h(t[0]);
255
+ }, this.reduceActions[36] = function(t) {
256
+ return new it(t[0], []);
257
+ }, this.reduceActions[37] = function(t) {
258
+ return new it(t[0], t[2]);
259
+ }, this.reduceActions[38] = function(t) {
260
+ return [t[0]];
261
+ }, this.reduceActions[39] = function(t) {
262
+ return t[2].unshift(t[0]), t[2];
263
+ }, this.reduceActions[43] = function(t) {
264
+ return new ht(!0, []);
265
+ }, this.reduceActions[44] = function(t) {
266
+ return t[1].absolute = !0, t[1];
267
+ }, this.reduceActions[46] = function(t) {
268
+ return new ht(!1, [t[0]]);
269
+ }, this.reduceActions[47] = function(t) {
270
+ return t[0].steps.push(t[2]), t[0];
271
+ }, this.reduceActions[49] = function(t) {
272
+ return new v(t[0], t[1], []);
273
+ }, this.reduceActions[50] = function(t) {
274
+ return new v(v.CHILD, t[0], []);
275
+ }, this.reduceActions[51] = function(t) {
276
+ return new v(t[0], t[1], t[2]);
277
+ }, this.reduceActions[52] = function(t) {
278
+ return new v(v.CHILD, t[0], t[1]);
279
+ }, this.reduceActions[54] = function(t) {
280
+ return [t[0]];
281
+ }, this.reduceActions[55] = function(t) {
282
+ return t[1].unshift(t[0]), t[1];
283
+ }, this.reduceActions[56] = function(t) {
284
+ return t[0] == "ancestor" ? v.ANCESTOR : t[0] == "ancestor-or-self" ? v.ANCESTORORSELF : t[0] == "attribute" ? v.ATTRIBUTE : t[0] == "child" ? v.CHILD : t[0] == "descendant" ? v.DESCENDANT : t[0] == "descendant-or-self" ? v.DESCENDANTORSELF : t[0] == "following" ? v.FOLLOWING : t[0] == "following-sibling" ? v.FOLLOWINGSIBLING : t[0] == "namespace" ? v.NAMESPACE : t[0] == "parent" ? v.PARENT : t[0] == "preceding" ? v.PRECEDING : t[0] == "preceding-sibling" ? v.PRECEDINGSIBLING : t[0] == "self" ? v.SELF : -1;
285
+ }, this.reduceActions[57] = function(t) {
286
+ return v.ATTRIBUTE;
287
+ }, this.reduceActions[59] = function(t) {
288
+ return t[0] == "comment" ? new B(B.COMMENT, void 0) : t[0] == "text" ? new B(B.TEXT, void 0) : t[0] == "processing-instruction" ? new B(B.PI, void 0) : t[0] == "node" ? new B(B.NODE, void 0) : new B(-1, void 0);
289
+ }, this.reduceActions[60] = function(t) {
290
+ return new B(B.PI, t[2]);
291
+ }, this.reduceActions[61] = function(t) {
292
+ return t[1];
293
+ }, this.reduceActions[63] = function(t) {
294
+ return t[1].absolute = !0, t[1].steps.unshift(new v(v.DESCENDANTORSELF, new B(B.NODE, void 0), [])), t[1];
295
+ }, this.reduceActions[64] = function(t) {
296
+ return t[0].steps.push(new v(v.DESCENDANTORSELF, new B(B.NODE, void 0), [])), t[0].steps.push(t[2]), t[0];
297
+ }, this.reduceActions[65] = function(t) {
298
+ return new v(v.SELF, new B(B.NODE, void 0), []);
299
+ }, this.reduceActions[66] = function(t) {
300
+ return new v(v.PARENT, new B(B.NODE, void 0), []);
301
+ }, this.reduceActions[67] = function(t) {
302
+ return new ft(t[1]);
303
+ }, this.reduceActions[68] = function(t) {
304
+ return new B(B.NAMETESTANY, void 0);
305
+ }, this.reduceActions[69] = function(t) {
306
+ var e = t[0].substring(0, t[0].indexOf(":"));
307
+ return new B(B.NAMETESTPREFIXANY, e);
308
+ }, this.reduceActions[70] = function(t) {
309
+ return new B(B.NAMETESTQNAME, t[0]);
310
+ };
311
+ }, o.actionTable = [
312
+ " s s sssssssss s ss s ss",
313
+ " s ",
314
+ "r rrrrrrrrr rrrrrrr rr r ",
315
+ " rrrrr ",
316
+ " s s sssssssss s ss s ss",
317
+ "rs rrrrrrrr s sssssrrrrrr rrs rs ",
318
+ " s s sssssssss s ss s ss",
319
+ " s ",
320
+ " s ",
321
+ "r rrrrrrrrr rrrrrrr rr rr ",
322
+ "r rrrrrrrrr rrrrrrr rr rr ",
323
+ "r rrrrrrrrr rrrrrrr rr rr ",
324
+ "r rrrrrrrrr rrrrrrr rr rr ",
325
+ "r rrrrrrrrr rrrrrrr rr rr ",
326
+ " s ",
327
+ " s ",
328
+ " s s sssss s s ",
329
+ "r rrrrrrrrr rrrrrrr rr r ",
330
+ "a ",
331
+ "r s rr r ",
332
+ "r sr rr r ",
333
+ "r s rr s rr r ",
334
+ "r rssrr rss rr r ",
335
+ "r rrrrr rrrss rr r ",
336
+ "r rrrrrsss rrrrr rr r ",
337
+ "r rrrrrrrr rrrrr rr r ",
338
+ "r rrrrrrrr rrrrrs rr r ",
339
+ "r rrrrrrrr rrrrrr rr r ",
340
+ "r rrrrrrrr rrrrrr rr r ",
341
+ "r srrrrrrrr rrrrrrs rr sr ",
342
+ "r srrrrrrrr rrrrrrs rr r ",
343
+ "r rrrrrrrrr rrrrrrr rr rr ",
344
+ "r rrrrrrrrr rrrrrrr rr rr ",
345
+ "r rrrrrrrrr rrrrrrr rr rr ",
346
+ "r rrrrrrrr rrrrrr rr r ",
347
+ "r rrrrrrrr rrrrrr rr r ",
348
+ "r rrrrrrrrr rrrrrrr rr r ",
349
+ "r rrrrrrrrr rrrrrrr rr r ",
350
+ " sssss ",
351
+ "r rrrrrrrrr rrrrrrr rr sr ",
352
+ "r rrrrrrrrr rrrrrrr rr r ",
353
+ "r rrrrrrrrr rrrrrrr rr rr ",
354
+ "r rrrrrrrrr rrrrrrr rr rr ",
355
+ " s ",
356
+ "r srrrrrrrr rrrrrrs rr r ",
357
+ "r rrrrrrrr rrrrr rr r ",
358
+ " s ",
359
+ " s ",
360
+ " rrrrr ",
361
+ " s s sssssssss s sss s ss",
362
+ "r srrrrrrrr rrrrrrs rr r ",
363
+ " s s sssssssss s ss s ss",
364
+ " s s sssssssss s ss s ss",
365
+ " s s sssssssss s ss s ss",
366
+ " s s sssssssss s ss s ss",
367
+ " s s sssssssss s ss s ss",
368
+ " s s sssssssss s ss s ss",
369
+ " s s sssssssss s ss s ss",
370
+ " s s sssssssss s ss s ss",
371
+ " s s sssssssss s ss s ss",
372
+ " s s sssssssss s ss s ss",
373
+ " s s sssssssss s ss s ss",
374
+ " s s sssssssss s ss s ss",
375
+ " s s sssssssss s ss s ss",
376
+ " s s sssssssss ss s ss",
377
+ " s s sssssssss s ss s ss",
378
+ " s s sssss s s ",
379
+ " s s sssss s s ",
380
+ "r rrrrrrrrr rrrrrrr rr rr ",
381
+ " s s sssss s s ",
382
+ " s s sssss s s ",
383
+ "r rrrrrrrrr rrrrrrr rr sr ",
384
+ "r rrrrrrrrr rrrrrrr rr sr ",
385
+ "r rrrrrrrrr rrrrrrr rr r ",
386
+ "r rrrrrrrrr rrrrrrr rr rr ",
387
+ " s ",
388
+ "r rrrrrrrrr rrrrrrr rr rr ",
389
+ "r rrrrrrrrr rrrrrrr rr rr ",
390
+ " rr ",
391
+ " s ",
392
+ " rs ",
393
+ "r sr rr r ",
394
+ "r s rr s rr r ",
395
+ "r rssrr rss rr r ",
396
+ "r rssrr rss rr r ",
397
+ "r rrrrr rrrss rr r ",
398
+ "r rrrrr rrrss rr r ",
399
+ "r rrrrr rrrss rr r ",
400
+ "r rrrrr rrrss rr r ",
401
+ "r rrrrrsss rrrrr rr r ",
402
+ "r rrrrrsss rrrrr rr r ",
403
+ "r rrrrrrrr rrrrr rr r ",
404
+ "r rrrrrrrr rrrrr rr r ",
405
+ "r rrrrrrrr rrrrr rr r ",
406
+ "r rrrrrrrr rrrrrr rr r ",
407
+ " r ",
408
+ " s ",
409
+ "r srrrrrrrr rrrrrrs rr r ",
410
+ "r srrrrrrrr rrrrrrs rr r ",
411
+ "r rrrrrrrrr rrrrrrr rr r ",
412
+ "r rrrrrrrrr rrrrrrr rr r ",
413
+ "r rrrrrrrrr rrrrrrr rr r ",
414
+ "r rrrrrrrrr rrrrrrr rr r ",
415
+ "r rrrrrrrrr rrrrrrr rr rr ",
416
+ "r rrrrrrrrr rrrrrrr rr rr ",
417
+ " s s sssssssss s ss s ss",
418
+ "r rrrrrrrrr rrrrrrr rr rr ",
419
+ " r "
420
+ ], o.actionTableNumber = [
421
+ ` 1 0 /.-,+*)(' & %$ # "!`,
422
+ " J ",
423
+ "a aaaaaaaaa aaaaaaa aa a ",
424
+ " YYYYY ",
425
+ ` 1 0 /.-,+*)(' & %$ # "!`,
426
+ `K1 KKKKKKKK . +*)('KKKKKK KK# K" `,
427
+ ` 1 0 /.-,+*)(' & %$ # "!`,
428
+ " N ",
429
+ " O ",
430
+ "e eeeeeeeee eeeeeee ee ee ",
431
+ "f fffffffff fffffff ff ff ",
432
+ "d ddddddddd ddddddd dd dd ",
433
+ "B BBBBBBBBB BBBBBBB BB BB ",
434
+ "A AAAAAAAAA AAAAAAA AA AA ",
435
+ " P ",
436
+ " Q ",
437
+ ` 1 . +*)(' # " `,
438
+ "b bbbbbbbbb bbbbbbb bb b ",
439
+ " ",
440
+ "! S !! ! ",
441
+ '" T" "" " ',
442
+ "$ V $$ U $$ $ ",
443
+ "& &ZY&& &XW && & ",
444
+ ") ))))) )))\\[ )) ) ",
445
+ ". ....._^] ..... .. . ",
446
+ "1 11111111 11111 11 1 ",
447
+ "5 55555555 55555` 55 5 ",
448
+ "7 77777777 777777 77 7 ",
449
+ "9 99999999 999999 99 9 ",
450
+ ": c:::::::: ::::::b :: a: ",
451
+ "I fIIIIIIII IIIIIIe II I ",
452
+ "= ========= ======= == == ",
453
+ "? ????????? ??????? ?? ?? ",
454
+ "C CCCCCCCCC CCCCCCC CC CC ",
455
+ "J JJJJJJJJ JJJJJJ JJ J ",
456
+ "M MMMMMMMM MMMMMM MM M ",
457
+ "N NNNNNNNNN NNNNNNN NN N ",
458
+ "P PPPPPPPPP PPPPPPP PP P ",
459
+ " +*)(' ",
460
+ "R RRRRRRRRR RRRRRRR RR aR ",
461
+ "U UUUUUUUUU UUUUUUU UU U ",
462
+ "Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ",
463
+ "c ccccccccc ccccccc cc cc ",
464
+ " j ",
465
+ "L fLLLLLLLL LLLLLLe LL L ",
466
+ "6 66666666 66666 66 6 ",
467
+ " k ",
468
+ " l ",
469
+ " XXXXX ",
470
+ ` 1 0 /.-,+*)(' & %$m # "!`,
471
+ "_ f________ ______e __ _ ",
472
+ ` 1 0 /.-,+*)(' & %$ # "!`,
473
+ ` 1 0 /.-,+*)(' & %$ # "!`,
474
+ ` 1 0 /.-,+*)(' & %$ # "!`,
475
+ ` 1 0 /.-,+*)(' & %$ # "!`,
476
+ ` 1 0 /.-,+*)(' & %$ # "!`,
477
+ ` 1 0 /.-,+*)(' & %$ # "!`,
478
+ ` 1 0 /.-,+*)(' & %$ # "!`,
479
+ ` 1 0 /.-,+*)(' & %$ # "!`,
480
+ ` 1 0 /.-,+*)(' & %$ # "!`,
481
+ ` 1 0 /.-,+*)(' & %$ # "!`,
482
+ ` 1 0 /.-,+*)(' & %$ # "!`,
483
+ ` 1 0 /.-,+*)(' & %$ # "!`,
484
+ ` 1 0 /.-,+*)(' & %$ # "!`,
485
+ ` 1 0 /.-,+*)(' %$ # "!`,
486
+ ` 1 0 /.-,+*)(' & %$ # "!`,
487
+ ` 1 . +*)(' # " `,
488
+ ` 1 . +*)(' # " `,
489
+ "> >>>>>>>>> >>>>>>> >> >> ",
490
+ ` 1 . +*)(' # " `,
491
+ ` 1 . +*)(' # " `,
492
+ "Q QQQQQQQQQ QQQQQQQ QQ aQ ",
493
+ "V VVVVVVVVV VVVVVVV VV aV ",
494
+ "T TTTTTTTTT TTTTTTT TT T ",
495
+ "@ @@@@@@@@@ @@@@@@@ @@ @@ ",
496
+ " ‡ ",
497
+ "[ [[[[[[[[[ [[[[[[[ [[ [[ ",
498
+ "D DDDDDDDDD DDDDDDD DD DD ",
499
+ " HH ",
500
+ " ˆ ",
501
+ " F‰ ",
502
+ "# T# ## # ",
503
+ "% V %% U %% % ",
504
+ "' 'ZY'' 'XW '' ' ",
505
+ "( (ZY(( (XW (( ( ",
506
+ "+ +++++ +++\\[ ++ + ",
507
+ "* ***** ***\\[ ** * ",
508
+ "- ----- ---\\[ -- - ",
509
+ ", ,,,,, ,,,\\[ ,, , ",
510
+ "0 00000_^] 00000 00 0 ",
511
+ "/ /////_^] ///// // / ",
512
+ "2 22222222 22222 22 2 ",
513
+ "3 33333333 33333 33 3 ",
514
+ "4 44444444 44444 44 4 ",
515
+ "8 88888888 888888 88 8 ",
516
+ " ^ ",
517
+ " Š ",
518
+ "; f;;;;;;;; ;;;;;;e ;; ; ",
519
+ "< f<<<<<<<< <<<<<<e << < ",
520
+ "O OOOOOOOOO OOOOOOO OO O ",
521
+ "` ````````` ``````` `` ` ",
522
+ "S SSSSSSSSS SSSSSSS SS S ",
523
+ "W WWWWWWWWW WWWWWWW WW W ",
524
+ "\\ \\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\ \\\\ \\\\ ",
525
+ "E EEEEEEEEE EEEEEEE EE EE ",
526
+ ` 1 0 /.-,+*)(' & %$ # "!`,
527
+ "] ]]]]]]]]] ]]]]]]] ]] ]] ",
528
+ " G "
529
+ ], o.gotoTable = [
530
+ "3456789:;<=>?@ AB CDEFGH IJ ",
531
+ " ",
532
+ " ",
533
+ " ",
534
+ "L456789:;<=>?@ AB CDEFGH IJ ",
535
+ " M EFGH IJ ",
536
+ " N;<=>?@ AB CDEFGH IJ ",
537
+ " ",
538
+ " ",
539
+ " ",
540
+ " ",
541
+ " ",
542
+ " ",
543
+ " ",
544
+ " ",
545
+ " ",
546
+ " S EFGH IJ ",
547
+ " ",
548
+ " ",
549
+ " ",
550
+ " ",
551
+ " ",
552
+ " ",
553
+ " ",
554
+ " ",
555
+ " ",
556
+ " ",
557
+ " ",
558
+ " ",
559
+ " e ",
560
+ " ",
561
+ " ",
562
+ " ",
563
+ " ",
564
+ " ",
565
+ " ",
566
+ " ",
567
+ " ",
568
+ " h J ",
569
+ " i j ",
570
+ " ",
571
+ " ",
572
+ " ",
573
+ " ",
574
+ " ",
575
+ " ",
576
+ " ",
577
+ " ",
578
+ " ",
579
+ "o456789:;<=>?@ ABpqCDEFGH IJ ",
580
+ " ",
581
+ " r6789:;<=>?@ AB CDEFGH IJ ",
582
+ " s789:;<=>?@ AB CDEFGH IJ ",
583
+ " t89:;<=>?@ AB CDEFGH IJ ",
584
+ " u89:;<=>?@ AB CDEFGH IJ ",
585
+ " v9:;<=>?@ AB CDEFGH IJ ",
586
+ " w9:;<=>?@ AB CDEFGH IJ ",
587
+ " x9:;<=>?@ AB CDEFGH IJ ",
588
+ " y9:;<=>?@ AB CDEFGH IJ ",
589
+ " z:;<=>?@ AB CDEFGH IJ ",
590
+ " {:;<=>?@ AB CDEFGH IJ ",
591
+ " |;<=>?@ AB CDEFGH IJ ",
592
+ " };<=>?@ AB CDEFGH IJ ",
593
+ " ~;<=>?@ AB CDEFGH IJ ",
594
+ " =>?@ AB CDEFGH IJ ",
595
+ "€456789:;<=>?@ AB CDEFGH IJ",
596
+ " ‚ EFGH IJ ",
597
+ " ƒ EFGH IJ ",
598
+ " ",
599
+ " „ GH IJ ",
600
+ " … GH IJ ",
601
+ " i † ",
602
+ " i ‡ ",
603
+ " ",
604
+ " ",
605
+ " ",
606
+ " ",
607
+ " ",
608
+ " ",
609
+ " ",
610
+ " ",
611
+ " ",
612
+ " ",
613
+ " ",
614
+ " ",
615
+ " ",
616
+ " ",
617
+ " ",
618
+ " ",
619
+ " ",
620
+ " ",
621
+ " ",
622
+ " ",
623
+ " ",
624
+ " ",
625
+ " ",
626
+ " ",
627
+ " ",
628
+ " ",
629
+ " ",
630
+ " ",
631
+ " ",
632
+ " ",
633
+ " ",
634
+ " ",
635
+ "o456789:;<=>?@ ABŒqCDEFGH IJ ",
636
+ " ",
637
+ " "
638
+ ], o.productions = [
639
+ [1, 1, 2],
640
+ [2, 1, 3],
641
+ [3, 1, 4],
642
+ [3, 3, 3, -9, 4],
643
+ [4, 1, 5],
644
+ [4, 3, 4, -8, 5],
645
+ [5, 1, 6],
646
+ [5, 3, 5, -22, 6],
647
+ [5, 3, 5, -5, 6],
648
+ [6, 1, 7],
649
+ [6, 3, 6, -23, 7],
650
+ [6, 3, 6, -24, 7],
651
+ [6, 3, 6, -6, 7],
652
+ [6, 3, 6, -7, 7],
653
+ [7, 1, 8],
654
+ [7, 3, 7, -25, 8],
655
+ [7, 3, 7, -26, 8],
656
+ [8, 1, 9],
657
+ [8, 3, 8, -12, 9],
658
+ [8, 3, 8, -11, 9],
659
+ [8, 3, 8, -10, 9],
660
+ [9, 1, 10],
661
+ [9, 2, -26, 9],
662
+ [10, 1, 11],
663
+ [10, 3, 10, -27, 11],
664
+ [11, 1, 12],
665
+ [11, 1, 13],
666
+ [11, 3, 13, -28, 14],
667
+ [11, 3, 13, -4, 14],
668
+ [13, 1, 15],
669
+ [13, 2, 13, 16],
670
+ [15, 1, 17],
671
+ [15, 3, -29, 2, -30],
672
+ [15, 1, -15],
673
+ [15, 1, -16],
674
+ [15, 1, 18],
675
+ [18, 3, -13, -29, -30],
676
+ [18, 4, -13, -29, 19, -30],
677
+ [19, 1, 20],
678
+ [19, 3, 20, -31, 19],
679
+ [20, 1, 2],
680
+ [12, 1, 14],
681
+ [12, 1, 21],
682
+ [21, 1, -28],
683
+ [21, 2, -28, 14],
684
+ [21, 1, 22],
685
+ [14, 1, 23],
686
+ [14, 3, 14, -28, 23],
687
+ [14, 1, 24],
688
+ [23, 2, 25, 26],
689
+ [23, 1, 26],
690
+ [23, 3, 25, 26, 27],
691
+ [23, 2, 26, 27],
692
+ [23, 1, 28],
693
+ [27, 1, 16],
694
+ [27, 2, 16, 27],
695
+ [25, 2, -14, -3],
696
+ [25, 1, -32],
697
+ [26, 1, 29],
698
+ [26, 3, -20, -29, -30],
699
+ [26, 4, -21, -29, -15, -30],
700
+ [16, 3, -33, 30, -34],
701
+ [30, 1, 2],
702
+ [22, 2, -4, 14],
703
+ [24, 3, 14, -4, 23],
704
+ [28, 1, -35],
705
+ [28, 1, -2],
706
+ [17, 2, -36, -18],
707
+ [29, 1, -17],
708
+ [29, 1, -19],
709
+ [29, 1, -18]
710
+ ], o.DOUBLEDOT = 2, o.DOUBLECOLON = 3, o.DOUBLESLASH = 4, o.NOTEQUAL = 5, o.LESSTHANOREQUAL = 6, o.GREATERTHANOREQUAL = 7, o.AND = 8, o.OR = 9, o.MOD = 10, o.DIV = 11, o.MULTIPLYOPERATOR = 12, o.FUNCTIONNAME = 13, o.AXISNAME = 14, o.LITERAL = 15, o.NUMBER = 16, o.ASTERISKNAMETEST = 17, o.QNAME = 18, o.NCNAMECOLONASTERISK = 19, o.NODETYPE = 20, o.PROCESSINGINSTRUCTIONWITHLITERAL = 21, o.EQUALS = 22, o.LESSTHAN = 23, o.GREATERTHAN = 24, o.PLUS = 25, o.MINUS = 26, o.BAR = 27, o.SLASH = 28, o.LEFTPARENTHESIS = 29, o.RIGHTPARENTHESIS = 30, o.COMMA = 31, o.AT = 32, o.LEFTBRACKET = 33, o.RIGHTBRACKET = 34, o.DOT = 35, o.DOLLAR = 36, o.prototype.tokenize = function(t) {
711
+ for (var e = [], r = [], i = t + "\0", a = 0, n = i.charAt(a++); ; ) {
712
+ for (; n == " " || n == " " || n == "\r" || n == `
713
+ `; )
714
+ n = i.charAt(a++);
715
+ if (n == "\0" || a >= i.length)
716
+ break;
717
+ if (n == "(") {
718
+ e.push(o.LEFTPARENTHESIS), r.push(n), n = i.charAt(a++);
719
+ continue;
720
+ }
721
+ if (n == ")") {
722
+ e.push(o.RIGHTPARENTHESIS), r.push(n), n = i.charAt(a++);
723
+ continue;
724
+ }
725
+ if (n == "[") {
726
+ e.push(o.LEFTBRACKET), r.push(n), n = i.charAt(a++);
727
+ continue;
728
+ }
729
+ if (n == "]") {
730
+ e.push(o.RIGHTBRACKET), r.push(n), n = i.charAt(a++);
731
+ continue;
732
+ }
733
+ if (n == "@") {
734
+ e.push(o.AT), r.push(n), n = i.charAt(a++);
735
+ continue;
736
+ }
737
+ if (n == ",") {
738
+ e.push(o.COMMA), r.push(n), n = i.charAt(a++);
739
+ continue;
740
+ }
741
+ if (n == "|") {
742
+ e.push(o.BAR), r.push(n), n = i.charAt(a++);
743
+ continue;
744
+ }
745
+ if (n == "+") {
746
+ e.push(o.PLUS), r.push(n), n = i.charAt(a++);
747
+ continue;
748
+ }
749
+ if (n == "-") {
750
+ e.push(o.MINUS), r.push(n), n = i.charAt(a++);
751
+ continue;
752
+ }
753
+ if (n == "=") {
754
+ e.push(o.EQUALS), r.push(n), n = i.charAt(a++);
755
+ continue;
756
+ }
757
+ if (n == "$") {
758
+ e.push(o.DOLLAR), r.push(n), n = i.charAt(a++);
759
+ continue;
760
+ }
761
+ if (n == ".") {
762
+ if (n = i.charAt(a++), n == ".") {
763
+ e.push(o.DOUBLEDOT), r.push(".."), n = i.charAt(a++);
764
+ continue;
765
+ }
766
+ if (n >= "0" && n <= "9") {
767
+ var w = "." + n;
768
+ for (n = i.charAt(a++); n >= "0" && n <= "9"; )
769
+ w += n, n = i.charAt(a++);
770
+ e.push(o.NUMBER), r.push(w);
771
+ continue;
772
+ }
773
+ e.push(o.DOT), r.push(".");
774
+ continue;
775
+ }
776
+ if (n == "'" || n == '"') {
777
+ for (var q = n, _ = ""; a < i.length && (n = i.charAt(a)) !== q; )
778
+ _ += n, a += 1;
779
+ if (n !== q)
780
+ throw j.fromMessage("Unterminated string literal: " + q + _);
781
+ a += 1, e.push(o.LITERAL), r.push(_), n = i.charAt(a++);
782
+ continue;
783
+ }
784
+ if (n >= "0" && n <= "9") {
785
+ var w = n;
786
+ for (n = i.charAt(a++); n >= "0" && n <= "9"; )
787
+ w += n, n = i.charAt(a++);
788
+ if (n == "." && i.charAt(a) >= "0" && i.charAt(a) <= "9")
789
+ for (w += n, w += i.charAt(a++), n = i.charAt(a++); n >= "0" && n <= "9"; )
790
+ w += n, n = i.charAt(a++);
791
+ e.push(o.NUMBER), r.push(w);
792
+ continue;
793
+ }
794
+ if (n == "*") {
795
+ if (e.length > 0) {
796
+ var s = e[e.length - 1];
797
+ if (s != o.AT && s != o.DOUBLECOLON && s != o.LEFTPARENTHESIS && s != o.LEFTBRACKET && s != o.AND && s != o.OR && s != o.MOD && s != o.DIV && s != o.MULTIPLYOPERATOR && s != o.SLASH && s != o.DOUBLESLASH && s != o.BAR && s != o.PLUS && s != o.MINUS && s != o.EQUALS && s != o.NOTEQUAL && s != o.LESSTHAN && s != o.LESSTHANOREQUAL && s != o.GREATERTHAN && s != o.GREATERTHANOREQUAL) {
798
+ e.push(o.MULTIPLYOPERATOR), r.push(n), n = i.charAt(a++);
799
+ continue;
800
+ }
801
+ }
802
+ e.push(o.ASTERISKNAMETEST), r.push(n), n = i.charAt(a++);
803
+ continue;
804
+ }
805
+ if (n == ":" && i.charAt(a) == ":") {
806
+ e.push(o.DOUBLECOLON), r.push("::"), a++, n = i.charAt(a++);
807
+ continue;
808
+ }
809
+ if (n == "/") {
810
+ if (n = i.charAt(a++), n == "/") {
811
+ e.push(o.DOUBLESLASH), r.push("//"), n = i.charAt(a++);
812
+ continue;
813
+ }
814
+ e.push(o.SLASH), r.push("/");
815
+ continue;
816
+ }
817
+ if (n == "!" && i.charAt(a) == "=") {
818
+ e.push(o.NOTEQUAL), r.push("!="), a++, n = i.charAt(a++);
819
+ continue;
820
+ }
821
+ if (n == "<") {
822
+ if (i.charAt(a) == "=") {
823
+ e.push(o.LESSTHANOREQUAL), r.push("<="), a++, n = i.charAt(a++);
824
+ continue;
825
+ }
826
+ e.push(o.LESSTHAN), r.push("<"), n = i.charAt(a++);
827
+ continue;
828
+ }
829
+ if (n == ">") {
830
+ if (i.charAt(a) == "=") {
831
+ e.push(o.GREATERTHANOREQUAL), r.push(">="), a++, n = i.charAt(a++);
832
+ continue;
833
+ }
834
+ e.push(o.GREATERTHAN), r.push(">"), n = i.charAt(a++);
835
+ continue;
836
+ }
837
+ if (n == "_" || p.isLetter(n.charCodeAt(0))) {
838
+ var k = n;
839
+ for (n = i.charAt(a++); p.isNCNameChar(n.charCodeAt(0)); )
840
+ k += n, n = i.charAt(a++);
841
+ if (e.length > 0) {
842
+ var s = e[e.length - 1];
843
+ if (s != o.AT && s != o.DOUBLECOLON && s != o.LEFTPARENTHESIS && s != o.LEFTBRACKET && s != o.AND && s != o.OR && s != o.MOD && s != o.DIV && s != o.MULTIPLYOPERATOR && s != o.SLASH && s != o.DOUBLESLASH && s != o.BAR && s != o.PLUS && s != o.MINUS && s != o.EQUALS && s != o.NOTEQUAL && s != o.LESSTHAN && s != o.LESSTHANOREQUAL && s != o.GREATERTHAN && s != o.GREATERTHANOREQUAL) {
844
+ if (k == "and") {
845
+ e.push(o.AND), r.push(k);
846
+ continue;
847
+ }
848
+ if (k == "or") {
849
+ e.push(o.OR), r.push(k);
850
+ continue;
851
+ }
852
+ if (k == "mod") {
853
+ e.push(o.MOD), r.push(k);
854
+ continue;
855
+ }
856
+ if (k == "div") {
857
+ e.push(o.DIV), r.push(k);
858
+ continue;
859
+ }
860
+ }
861
+ }
862
+ if (n == ":") {
863
+ if (i.charAt(a) == "*") {
864
+ e.push(o.NCNAMECOLONASTERISK), r.push(k + ":*"), a++, n = i.charAt(a++);
865
+ continue;
866
+ }
867
+ if (i.charAt(a) == "_" || p.isLetter(i.charCodeAt(a))) {
868
+ for (k += ":", n = i.charAt(a++); p.isNCNameChar(n.charCodeAt(0)); )
869
+ k += n, n = i.charAt(a++);
870
+ if (n == "(") {
871
+ e.push(o.FUNCTIONNAME), r.push(k);
872
+ continue;
873
+ }
874
+ e.push(o.QNAME), r.push(k);
875
+ continue;
876
+ }
877
+ if (i.charAt(a) == ":") {
878
+ e.push(o.AXISNAME), r.push(k);
879
+ continue;
880
+ }
881
+ }
882
+ if (n == "(") {
883
+ if (k == "comment" || k == "text" || k == "node") {
884
+ e.push(o.NODETYPE), r.push(k);
885
+ continue;
886
+ }
887
+ if (k == "processing-instruction") {
888
+ i.charAt(a) == ")" ? e.push(o.NODETYPE) : e.push(o.PROCESSINGINSTRUCTIONWITHLITERAL), r.push(k);
889
+ continue;
890
+ }
891
+ e.push(o.FUNCTIONNAME), r.push(k);
892
+ continue;
893
+ }
894
+ e.push(o.QNAME), r.push(k);
895
+ continue;
896
+ }
897
+ throw new Error("Unexpected character " + n);
898
+ }
899
+ return e.push(1), r.push("[EOF]"), [e, r];
900
+ }, o.SHIFT = "s", o.REDUCE = "r", o.ACCEPT = "a", o.prototype.parse = function(_) {
901
+ var e, r, i = this.tokenize(_);
902
+ if (i != null) {
903
+ e = i[0], r = i[1];
904
+ var a = 0, n = [], w = [], q = [], _, s, k;
905
+ for (n.push(0), w.push(1), q.push("_S"), s = e[a], k = r[a++]; ; )
906
+ switch (_ = n[n.length - 1], o.actionTable[_].charAt(s - 1)) {
907
+ case o.SHIFT:
908
+ w.push(-s), q.push(k), n.push(o.actionTableNumber[_].charCodeAt(s - 1) - 32), s = e[a], k = r[a++];
909
+ break;
910
+ case o.REDUCE:
911
+ for (var tt = o.productions[o.actionTableNumber[_].charCodeAt(s - 1) - 32][1], at = [], et = 0; et < tt; et++)
912
+ w.pop(), at.unshift(q.pop()), n.pop();
913
+ var rt = n[n.length - 1];
914
+ w.push(o.productions[o.actionTableNumber[_].charCodeAt(s - 1) - 32][0]), this.reduceActions[o.actionTableNumber[_].charCodeAt(s - 1) - 32] == null ? q.push(at[0]) : q.push(this.reduceActions[o.actionTableNumber[_].charCodeAt(s - 1) - 32](at)), n.push(o.gotoTable[rt].charCodeAt(o.productions[o.actionTableNumber[_].charCodeAt(s - 1) - 32][0] - 2) - 33);
915
+ break;
916
+ case o.ACCEPT:
917
+ return new U(q.pop());
918
+ default:
919
+ throw new Error("XPath parse error");
920
+ }
921
+ }
922
+ }, U.prototype = new Object(), U.prototype.constructor = U, U.superclass = Object.prototype;
923
+ function U(t) {
924
+ this.expression = t;
925
+ }
926
+ U.prototype.toString = function() {
927
+ return this.expression.toString();
928
+ }, U.prototype.evaluate = function(t) {
929
+ if (t.contextNode = t.expressionContextNode, t.contextSize = 1, t.contextPosition = 1, t.caseInsensitive = !1, t.contextNode != null) {
930
+ var e = t.contextNode;
931
+ e.nodeType != 9 && (e = e.ownerDocument);
932
+ try {
933
+ t.caseInsensitive = e.implementation.hasFeature("HTML", "2.0");
934
+ } catch {
935
+ t.caseInsensitive = !0;
936
+ }
937
+ }
938
+ return this.expression.evaluate(t);
939
+ }, U.XML_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace", U.XMLNS_NAMESPACE_URI = "http://www.w3.org/2000/xmlns/", P.prototype = new Object(), P.prototype.constructor = P, P.superclass = Object.prototype;
940
+ function P() {
941
+ }
942
+ P.prototype.init = function() {
943
+ }, P.prototype.toString = function() {
944
+ return "<Expression>";
945
+ }, P.prototype.evaluate = function(t) {
946
+ throw new Error("Could not evaluate expression.");
947
+ }, O.prototype = new P(), O.prototype.constructor = O, O.superclass = P.prototype;
948
+ function O(t) {
949
+ arguments.length > 0 && this.init(t);
950
+ }
951
+ O.prototype.init = function(t) {
952
+ this.rhs = t;
953
+ }, R.prototype = new O(), R.prototype.constructor = R, R.superclass = O.prototype;
954
+ function R(t) {
955
+ arguments.length > 0 && this.init(t);
956
+ }
957
+ R.prototype.init = function(t) {
958
+ R.superclass.init.call(this, t);
959
+ }, R.prototype.evaluate = function(t) {
960
+ return this.rhs.evaluate(t).number().negate();
961
+ }, R.prototype.toString = function() {
962
+ return "-" + this.rhs.toString();
963
+ }, x.prototype = new P(), x.prototype.constructor = x, x.superclass = P.prototype;
964
+ function x(t, e) {
965
+ arguments.length > 0 && this.init(t, e);
966
+ }
967
+ x.prototype.init = function(t, e) {
968
+ this.lhs = t, this.rhs = e;
969
+ }, d.prototype = new x(), d.prototype.constructor = d, d.superclass = x.prototype;
970
+ function d(t, e) {
971
+ arguments.length > 0 && this.init(t, e);
972
+ }
973
+ d.prototype.init = function(t, e) {
974
+ d.superclass.init.call(this, t, e);
975
+ }, d.prototype.toString = function() {
976
+ return "(" + this.lhs.toString() + " or " + this.rhs.toString() + ")";
977
+ }, d.prototype.evaluate = function(t) {
978
+ var e = this.lhs.evaluate(t).bool();
979
+ return e.booleanValue() ? e : this.rhs.evaluate(t).bool();
980
+ }, b.prototype = new x(), b.prototype.constructor = b, b.superclass = x.prototype;
981
+ function b(t, e) {
982
+ arguments.length > 0 && this.init(t, e);
983
+ }
984
+ b.prototype.init = function(t, e) {
985
+ b.superclass.init.call(this, t, e);
986
+ }, b.prototype.toString = function() {
987
+ return "(" + this.lhs.toString() + " and " + this.rhs.toString() + ")";
988
+ }, b.prototype.evaluate = function(t) {
989
+ var e = this.lhs.evaluate(t).bool();
990
+ return e.booleanValue() ? this.rhs.evaluate(t).bool() : e;
991
+ }, c.prototype = new x(), c.prototype.constructor = c, c.superclass = x.prototype;
992
+ function c(t, e) {
993
+ arguments.length > 0 && this.init(t, e);
994
+ }
995
+ c.prototype.init = function(t, e) {
996
+ c.superclass.init.call(this, t, e);
997
+ }, c.prototype.toString = function() {
998
+ return "(" + this.lhs.toString() + " = " + this.rhs.toString() + ")";
999
+ }, c.prototype.evaluate = function(t) {
1000
+ return this.lhs.evaluate(t).equals(this.rhs.evaluate(t));
1001
+ }, st.prototype = new x(), st.prototype.constructor = st, st.superclass = x.prototype;
1002
+ function st(t, e) {
1003
+ arguments.length > 0 && this.init(t, e);
1004
+ }
1005
+ st.prototype.init = function(t, e) {
1006
+ st.superclass.init.call(this, t, e);
1007
+ }, st.prototype.toString = function() {
1008
+ return "(" + this.lhs.toString() + " != " + this.rhs.toString() + ")";
1009
+ }, st.prototype.evaluate = function(t) {
1010
+ return this.lhs.evaluate(t).notequal(this.rhs.evaluate(t));
1011
+ }, Z.prototype = new x(), Z.prototype.constructor = Z, Z.superclass = x.prototype;
1012
+ function Z(t, e) {
1013
+ arguments.length > 0 && this.init(t, e);
1014
+ }
1015
+ Z.prototype.init = function(t, e) {
1016
+ Z.superclass.init.call(this, t, e);
1017
+ }, Z.prototype.evaluate = function(t) {
1018
+ return this.lhs.evaluate(t).lessthan(this.rhs.evaluate(t));
1019
+ }, Z.prototype.toString = function() {
1020
+ return "(" + this.lhs.toString() + " < " + this.rhs.toString() + ")";
1021
+ }, ut.prototype = new x(), ut.prototype.constructor = ut, ut.superclass = x.prototype;
1022
+ function ut(t, e) {
1023
+ arguments.length > 0 && this.init(t, e);
1024
+ }
1025
+ ut.prototype.init = function(t, e) {
1026
+ ut.superclass.init.call(this, t, e);
1027
+ }, ut.prototype.evaluate = function(t) {
1028
+ return this.lhs.evaluate(t).greaterthan(this.rhs.evaluate(t));
1029
+ }, ut.prototype.toString = function() {
1030
+ return "(" + this.lhs.toString() + " > " + this.rhs.toString() + ")";
1031
+ }, G.prototype = new x(), G.prototype.constructor = G, G.superclass = x.prototype;
1032
+ function G(t, e) {
1033
+ arguments.length > 0 && this.init(t, e);
1034
+ }
1035
+ G.prototype.init = function(t, e) {
1036
+ G.superclass.init.call(this, t, e);
1037
+ }, G.prototype.evaluate = function(t) {
1038
+ return this.lhs.evaluate(t).lessthanorequal(this.rhs.evaluate(t));
1039
+ }, G.prototype.toString = function() {
1040
+ return "(" + this.lhs.toString() + " <= " + this.rhs.toString() + ")";
1041
+ }, Q.prototype = new x(), Q.prototype.constructor = Q, Q.superclass = x.prototype;
1042
+ function Q(t, e) {
1043
+ arguments.length > 0 && this.init(t, e);
1044
+ }
1045
+ Q.prototype.init = function(t, e) {
1046
+ Q.superclass.init.call(this, t, e);
1047
+ }, Q.prototype.evaluate = function(t) {
1048
+ return this.lhs.evaluate(t).greaterthanorequal(this.rhs.evaluate(t));
1049
+ }, Q.prototype.toString = function() {
1050
+ return "(" + this.lhs.toString() + " >= " + this.rhs.toString() + ")";
1051
+ }, K.prototype = new x(), K.prototype.constructor = K, K.superclass = x.prototype;
1052
+ function K(t, e) {
1053
+ arguments.length > 0 && this.init(t, e);
1054
+ }
1055
+ K.prototype.init = function(t, e) {
1056
+ K.superclass.init.call(this, t, e);
1057
+ }, K.prototype.evaluate = function(t) {
1058
+ return this.lhs.evaluate(t).number().plus(this.rhs.evaluate(t).number());
1059
+ }, K.prototype.toString = function() {
1060
+ return "(" + this.lhs.toString() + " + " + this.rhs.toString() + ")";
1061
+ }, z.prototype = new x(), z.prototype.constructor = z, z.superclass = x.prototype;
1062
+ function z(t, e) {
1063
+ arguments.length > 0 && this.init(t, e);
1064
+ }
1065
+ z.prototype.init = function(t, e) {
1066
+ z.superclass.init.call(this, t, e);
1067
+ }, z.prototype.evaluate = function(t) {
1068
+ return this.lhs.evaluate(t).number().minus(this.rhs.evaluate(t).number());
1069
+ }, z.prototype.toString = function() {
1070
+ return "(" + this.lhs.toString() + " - " + this.rhs.toString() + ")";
1071
+ }, $.prototype = new x(), $.prototype.constructor = $, $.superclass = x.prototype;
1072
+ function $(t, e) {
1073
+ arguments.length > 0 && this.init(t, e);
1074
+ }
1075
+ $.prototype.init = function(t, e) {
1076
+ $.superclass.init.call(this, t, e);
1077
+ }, $.prototype.evaluate = function(t) {
1078
+ return this.lhs.evaluate(t).number().multiply(this.rhs.evaluate(t).number());
1079
+ }, $.prototype.toString = function() {
1080
+ return "(" + this.lhs.toString() + " * " + this.rhs.toString() + ")";
1081
+ }, J.prototype = new x(), J.prototype.constructor = J, J.superclass = x.prototype;
1082
+ function J(t, e) {
1083
+ arguments.length > 0 && this.init(t, e);
1084
+ }
1085
+ J.prototype.init = function(t, e) {
1086
+ J.superclass.init.call(this, t, e);
1087
+ }, J.prototype.evaluate = function(t) {
1088
+ return this.lhs.evaluate(t).number().div(this.rhs.evaluate(t).number());
1089
+ }, J.prototype.toString = function() {
1090
+ return "(" + this.lhs.toString() + " div " + this.rhs.toString() + ")";
1091
+ }, ot.prototype = new x(), ot.prototype.constructor = ot, ot.superclass = x.prototype;
1092
+ function ot(t, e) {
1093
+ arguments.length > 0 && this.init(t, e);
1094
+ }
1095
+ ot.prototype.init = function(t, e) {
1096
+ ot.superclass.init.call(this, t, e);
1097
+ }, ot.prototype.evaluate = function(t) {
1098
+ return this.lhs.evaluate(t).number().mod(this.rhs.evaluate(t).number());
1099
+ }, ot.prototype.toString = function() {
1100
+ return "(" + this.lhs.toString() + " mod " + this.rhs.toString() + ")";
1101
+ }, nt.prototype = new x(), nt.prototype.constructor = nt, nt.superclass = x.prototype;
1102
+ function nt(t, e) {
1103
+ arguments.length > 0 && this.init(t, e);
1104
+ }
1105
+ nt.prototype.init = function(t, e) {
1106
+ nt.superclass.init.call(this, t, e);
1107
+ }, nt.prototype.evaluate = function(t) {
1108
+ return this.lhs.evaluate(t).nodeset().union(this.rhs.evaluate(t).nodeset());
1109
+ }, nt.prototype.toString = function() {
1110
+ return this.lhs.toString() + " | " + this.rhs.toString();
1111
+ }, X.prototype = new P(), X.prototype.constructor = X, X.superclass = P.prototype;
1112
+ function X(t, e, r) {
1113
+ arguments.length > 0 && this.init(t, e, r);
1114
+ }
1115
+ X.prototype.init = function(t, e, r) {
1116
+ X.superclass.init.call(this), this.filter = t, this.filterPredicates = e, this.locationPath = r;
1117
+ };
1118
+ function xt(t) {
1119
+ for (; t && t.parentNode; )
1120
+ t = t.parentNode;
1121
+ return t;
1122
+ }
1123
+ X.prototype.evaluate = function(t) {
1124
+ var e, r = new y();
1125
+ if (r.variableResolver = t.variableResolver, r.functionResolver = t.functionResolver, r.namespaceResolver = t.namespaceResolver, r.expressionContextNode = t.expressionContextNode, r.virtualRoot = t.virtualRoot, r.caseInsensitive = t.caseInsensitive, this.filter == null)
1126
+ e = [t.contextNode];
1127
+ else {
1128
+ var pt = this.filter.evaluate(t);
1129
+ if (!p.instance_of(pt, u)) {
1130
+ if (this.filterPredicates != null && this.filterPredicates.length > 0 || this.locationPath != null)
1131
+ throw new Error("Path expression filter must evaluate to a nodset if predicates or location path are used");
1132
+ return pt;
1133
+ }
1134
+ if (e = pt.toUnsortedArray(), this.filterPredicates != null)
1135
+ for (var i = 0; i < this.filterPredicates.length; i++) {
1136
+ var a = this.filterPredicates[i], n = [];
1137
+ for (r.contextSize = e.length, r.contextPosition = 1; r.contextPosition <= r.contextSize; r.contextPosition++)
1138
+ r.contextNode = e[r.contextPosition - 1], this.predicateMatches(a, r) && n.push(r.contextNode);
1139
+ e = n;
1140
+ }
1141
+ }
1142
+ if (this.locationPath != null) {
1143
+ if (this.locationPath.absolute)
1144
+ if (e[0].nodeType != 9)
1145
+ if (r.virtualRoot != null)
1146
+ e = [r.virtualRoot];
1147
+ else if (e[0].ownerDocument == null) {
1148
+ for (var w = e[0]; w.parentNode != null; )
1149
+ w = w.parentNode;
1150
+ e = [w];
1151
+ } else
1152
+ e = [e[0].ownerDocument];
1153
+ else
1154
+ e = [e[0]];
1155
+ for (var q = 0; q < this.locationPath.steps.length; q++) {
1156
+ for (var _ = this.locationPath.steps[q], n = [], i = 0; i < e.length; i++)
1157
+ switch (r.contextNode = e[i], _.axis) {
1158
+ case v.ANCESTOR:
1159
+ if (r.contextNode === r.virtualRoot)
1160
+ break;
1161
+ var s;
1162
+ for (r.contextNode.nodeType == 2 ? s = this.getOwnerElement(r.contextNode) : s = r.contextNode.parentNode; s != null && (_.nodeTest.matches(s, r) && n.push(s), s !== r.virtualRoot); )
1163
+ s = s.parentNode;
1164
+ break;
1165
+ case v.ANCESTORORSELF:
1166
+ for (var s = r.contextNode; s != null && (_.nodeTest.matches(s, r) && n.push(s), s !== r.virtualRoot); s = s.nodeType == 2 ? this.getOwnerElement(s) : s.parentNode)
1167
+ ;
1168
+ break;
1169
+ case v.ATTRIBUTE:
1170
+ var k = r.contextNode.attributes;
1171
+ if (k != null)
1172
+ for (var tt = 0; tt < k.length; tt++) {
1173
+ var s = k.item(tt);
1174
+ _.nodeTest.matches(s, r) && n.push(s);
1175
+ }
1176
+ break;
1177
+ case v.CHILD:
1178
+ for (var s = r.contextNode.firstChild; s != null; s = s.nextSibling)
1179
+ _.nodeTest.matches(s, r) && n.push(s);
1180
+ break;
1181
+ case v.DESCENDANT:
1182
+ for (var H = [r.contextNode.firstChild]; H.length > 0; )
1183
+ for (var s = H.pop(); s != null; )
1184
+ _.nodeTest.matches(s, r) && n.push(s), s.firstChild != null ? (H.push(s.nextSibling), s = s.firstChild) : s = s.nextSibling;
1185
+ break;
1186
+ case v.DESCENDANTORSELF:
1187
+ _.nodeTest.matches(r.contextNode, r) && n.push(r.contextNode);
1188
+ for (var H = [r.contextNode.firstChild]; H.length > 0; )
1189
+ for (var s = H.pop(); s != null; )
1190
+ _.nodeTest.matches(s, r) && n.push(s), s.firstChild != null ? (H.push(s.nextSibling), s = s.firstChild) : s = s.nextSibling;
1191
+ break;
1192
+ case v.FOLLOWING:
1193
+ if (r.contextNode === r.virtualRoot)
1194
+ break;
1195
+ var H = [];
1196
+ r.contextNode.firstChild != null ? H.unshift(r.contextNode.firstChild) : H.unshift(r.contextNode.nextSibling);
1197
+ for (var s = r.contextNode.parentNode; s != null && s.nodeType != 9 && s !== r.virtualRoot; s = s.parentNode)
1198
+ H.unshift(s.nextSibling);
1199
+ do
1200
+ for (var s = H.pop(); s != null; )
1201
+ _.nodeTest.matches(s, r) && n.push(s), s.firstChild != null ? (H.push(s.nextSibling), s = s.firstChild) : s = s.nextSibling;
1202
+ while (H.length > 0);
1203
+ break;
1204
+ case v.FOLLOWINGSIBLING:
1205
+ if (r.contextNode === r.virtualRoot)
1206
+ break;
1207
+ for (var s = r.contextNode.nextSibling; s != null; s = s.nextSibling)
1208
+ _.nodeTest.matches(s, r) && n.push(s);
1209
+ break;
1210
+ case v.NAMESPACE:
1211
+ var w = {};
1212
+ if (r.contextNode.nodeType == 1) {
1213
+ w.xml = U.XML_NAMESPACE_URI, w.xmlns = U.XMLNS_NAMESPACE_URI;
1214
+ for (var s = r.contextNode; s != null && s.nodeType == 1; s = s.parentNode)
1215
+ for (var tt = 0; tt < s.attributes.length; tt++) {
1216
+ var at = s.attributes.item(tt), et = String(at.name);
1217
+ if (et == "xmlns")
1218
+ w[""] == null && (w[""] = at.value);
1219
+ else if (et.length > 6 && et.substring(0, 6) == "xmlns:") {
1220
+ var rt = et.substring(6, et.length);
1221
+ w[rt] == null && (w[rt] = at.value);
1222
+ }
1223
+ }
1224
+ for (var rt in w) {
1225
+ var dt = new m(rt, w[rt], r.contextNode);
1226
+ _.nodeTest.matches(dt, r) && n.push(dt);
1227
+ }
1228
+ }
1229
+ break;
1230
+ case v.PARENT:
1231
+ s = null, r.contextNode !== r.virtualRoot && (r.contextNode.nodeType == 2 ? s = this.getOwnerElement(r.contextNode) : s = r.contextNode.parentNode), s != null && _.nodeTest.matches(s, r) && n.push(s);
1232
+ break;
1233
+ case v.PRECEDING:
1234
+ var H;
1235
+ r.virtualRoot != null ? H = [r.virtualRoot] : H = [xt(r.contextNode)];
1236
+ t: for (; H.length > 0; )
1237
+ for (var s = H.pop(); s != null; ) {
1238
+ if (s == r.contextNode)
1239
+ break t;
1240
+ _.nodeTest.matches(s, r) && n.unshift(s), s.firstChild != null ? (H.push(s.nextSibling), s = s.firstChild) : s = s.nextSibling;
1241
+ }
1242
+ break;
1243
+ case v.PRECEDINGSIBLING:
1244
+ if (r.contextNode === r.virtualRoot)
1245
+ break;
1246
+ for (var s = r.contextNode.previousSibling; s != null; s = s.previousSibling)
1247
+ _.nodeTest.matches(s, r) && n.push(s);
1248
+ break;
1249
+ case v.SELF:
1250
+ _.nodeTest.matches(r.contextNode, r) && n.push(r.contextNode);
1251
+ break;
1252
+ }
1253
+ e = n;
1254
+ for (var i = 0; i < _.predicates.length; i++) {
1255
+ var a = _.predicates[i], n = [];
1256
+ for (r.contextSize = e.length, r.contextPosition = 1; r.contextPosition <= r.contextSize; r.contextPosition++)
1257
+ r.contextNode = e[r.contextPosition - 1], this.predicateMatches(a, r) && n.push(r.contextNode);
1258
+ e = n;
1259
+ }
1260
+ }
1261
+ }
1262
+ var pt = new u();
1263
+ return pt.addArray(e), pt;
1264
+ }, X.prototype.predicateMatches = function(t, e) {
1265
+ var r = t.evaluate(e);
1266
+ return p.instance_of(r, h) ? e.contextPosition == r.numberValue() : r.booleanValue();
1267
+ }, X.prototype.toString = function() {
1268
+ if (this.filter != null) {
1269
+ var t = this.filter.toString();
1270
+ if (p.instance_of(this.filter, D) && (t = "'" + t + "'"), this.filterPredicates != null)
1271
+ for (var e = 0; e < this.filterPredicates.length; e++)
1272
+ t = t + "[" + this.filterPredicates[e].toString() + "]";
1273
+ return this.locationPath != null && (this.locationPath.absolute || (t += "/"), t += this.locationPath.toString()), t;
1274
+ }
1275
+ return this.locationPath.toString();
1276
+ }, X.prototype.getOwnerElement = function(t) {
1277
+ if (t.ownerElement)
1278
+ return t.ownerElement;
1279
+ try {
1280
+ if (t.selectSingleNode)
1281
+ return t.selectSingleNode("..");
1282
+ } catch {
1283
+ }
1284
+ for (var e = t.nodeType == 9 ? t : t.ownerDocument, r = e.getElementsByTagName("*"), i = 0; i < r.length; i++)
1285
+ for (var a = r.item(i), n = a.attributes, w = 0; w < n.length; w++) {
1286
+ var q = n.item(w);
1287
+ if (q === t)
1288
+ return a;
1289
+ }
1290
+ return null;
1291
+ }, ht.prototype = new Object(), ht.prototype.constructor = ht, ht.superclass = Object.prototype;
1292
+ function ht(t, e) {
1293
+ arguments.length > 0 && this.init(t, e);
1294
+ }
1295
+ ht.prototype.init = function(t, e) {
1296
+ this.absolute = t, this.steps = e;
1297
+ }, ht.prototype.toString = function() {
1298
+ var t;
1299
+ this.absolute ? t = "/" : t = "";
1300
+ for (var e = 0; e < this.steps.length; e++)
1301
+ e != 0 && (t += "/"), t += this.steps[e].toString();
1302
+ return t;
1303
+ }, v.prototype = new Object(), v.prototype.constructor = v, v.superclass = Object.prototype;
1304
+ function v(t, e, r) {
1305
+ arguments.length > 0 && this.init(t, e, r);
1306
+ }
1307
+ v.prototype.init = function(t, e, r) {
1308
+ this.axis = t, this.nodeTest = e, this.predicates = r;
1309
+ }, v.prototype.toString = function() {
1310
+ var t;
1311
+ switch (this.axis) {
1312
+ case v.ANCESTOR:
1313
+ t = "ancestor";
1314
+ break;
1315
+ case v.ANCESTORORSELF:
1316
+ t = "ancestor-or-self";
1317
+ break;
1318
+ case v.ATTRIBUTE:
1319
+ t = "attribute";
1320
+ break;
1321
+ case v.CHILD:
1322
+ t = "child";
1323
+ break;
1324
+ case v.DESCENDANT:
1325
+ t = "descendant";
1326
+ break;
1327
+ case v.DESCENDANTORSELF:
1328
+ t = "descendant-or-self";
1329
+ break;
1330
+ case v.FOLLOWING:
1331
+ t = "following";
1332
+ break;
1333
+ case v.FOLLOWINGSIBLING:
1334
+ t = "following-sibling";
1335
+ break;
1336
+ case v.NAMESPACE:
1337
+ t = "namespace";
1338
+ break;
1339
+ case v.PARENT:
1340
+ t = "parent";
1341
+ break;
1342
+ case v.PRECEDING:
1343
+ t = "preceding";
1344
+ break;
1345
+ case v.PRECEDINGSIBLING:
1346
+ t = "preceding-sibling";
1347
+ break;
1348
+ case v.SELF:
1349
+ t = "self";
1350
+ break;
1351
+ }
1352
+ t += "::", t += this.nodeTest.toString();
1353
+ for (var e = 0; e < this.predicates.length; e++)
1354
+ t += "[" + this.predicates[e].toString() + "]";
1355
+ return t;
1356
+ }, v.ANCESTOR = 0, v.ANCESTORORSELF = 1, v.ATTRIBUTE = 2, v.CHILD = 3, v.DESCENDANT = 4, v.DESCENDANTORSELF = 5, v.FOLLOWING = 6, v.FOLLOWINGSIBLING = 7, v.NAMESPACE = 8, v.PARENT = 9, v.PRECEDING = 10, v.PRECEDINGSIBLING = 11, v.SELF = 12, B.prototype = new Object(), B.prototype.constructor = B, B.superclass = Object.prototype;
1357
+ function B(t, e) {
1358
+ arguments.length > 0 && this.init(t, e);
1359
+ }
1360
+ B.prototype.init = function(t, e) {
1361
+ this.type = t, this.value = e;
1362
+ }, B.prototype.toString = function() {
1363
+ switch (this.type) {
1364
+ case B.NAMETESTANY:
1365
+ return "*";
1366
+ case B.NAMETESTPREFIXANY:
1367
+ return this.value + ":*";
1368
+ case B.NAMETESTRESOLVEDANY:
1369
+ return "{" + this.value + "}*";
1370
+ case B.NAMETESTQNAME:
1371
+ return this.value;
1372
+ case B.NAMETESTRESOLVEDNAME:
1373
+ return "{" + this.namespaceURI + "}" + this.value;
1374
+ case B.COMMENT:
1375
+ return "comment()";
1376
+ case B.TEXT:
1377
+ return "text()";
1378
+ case B.PI:
1379
+ return this.value != null ? 'processing-instruction("' + this.value + '")' : "processing-instruction()";
1380
+ case B.NODE:
1381
+ return "node()";
1382
+ }
1383
+ return "<unknown nodetest type>";
1384
+ }, B.prototype.matches = function(t, e) {
1385
+ var r = t.nodeType;
1386
+ switch (this.type) {
1387
+ case B.NAMETESTANY:
1388
+ return r === 2 || r === 1 || r === m.XPATH_NAMESPACE_NODE;
1389
+ case B.NAMETESTPREFIXANY:
1390
+ if (r === 2 || r === 1) {
1391
+ var i = e.namespaceResolver.getNamespace(this.value, e.expressionContextNode);
1392
+ if (i == null)
1393
+ throw new Error("Cannot resolve QName " + this.value);
1394
+ return i === (t.namespaceURI || "");
1395
+ }
1396
+ return !1;
1397
+ case B.NAMETESTQNAME:
1398
+ if (r === 2 || r === 1 || r === m.XPATH_NAMESPACE_NODE) {
1399
+ var a = p.resolveQName(this.value, e.namespaceResolver, e.expressionContextNode, !1);
1400
+ if (a[0] == null)
1401
+ throw new Error("Cannot resolve QName " + this.value);
1402
+ a[0] = String(a[0]) || null, a[1] = String(a[1]);
1403
+ var n = [
1404
+ String(t.namespaceURI || "") || null,
1405
+ // localName will be null if the node was created with DOM1 createElement()
1406
+ String(t.localName || t.nodeName)
1407
+ ];
1408
+ return e.caseInsensitive ? a[0] === n[0] && a[1].toLowerCase() === n[1].toLowerCase() : a[0] === n[0] && a[1] === n[1];
1409
+ }
1410
+ return !1;
1411
+ case B.COMMENT:
1412
+ return r === 8;
1413
+ case B.TEXT:
1414
+ return r === 3 || r == 4;
1415
+ case B.PI:
1416
+ return r === 7 && (this.value == null || t.nodeName == this.value);
1417
+ case B.NODE:
1418
+ return r === 9 || r === 1 || r === 2 || r === 3 || r === 4 || r === 8 || r === 7;
1419
+ }
1420
+ return !1;
1421
+ }, B.NAMETESTANY = 0, B.NAMETESTPREFIXANY = 1, B.NAMETESTQNAME = 2, B.COMMENT = 3, B.TEXT = 4, B.PI = 5, B.NODE = 6, ft.prototype = new P(), ft.prototype.constructor = ft, ft.superclass = P.prototype;
1422
+ function ft(t) {
1423
+ arguments.length > 0 && this.init(t);
1424
+ }
1425
+ ft.prototype.init = function(t) {
1426
+ this.variable = t;
1427
+ }, ft.prototype.toString = function() {
1428
+ return "$" + this.variable;
1429
+ }, ft.prototype.evaluate = function(t) {
1430
+ var e = p.resolveQName(this.variable, t.namespaceResolver, t.contextNode, !1);
1431
+ if (e[0] == null)
1432
+ throw new Error("Cannot resolve QName " + fn);
1433
+ var r = t.variableResolver.getVariable(e[1], e[0]);
1434
+ if (!r)
1435
+ throw j.fromMessage("Undeclared variable: " + this.toString());
1436
+ return r;
1437
+ }, it.prototype = new P(), it.prototype.constructor = it, it.superclass = P.prototype;
1438
+ function it(t, e) {
1439
+ arguments.length > 0 && this.init(t, e);
1440
+ }
1441
+ it.prototype.init = function(t, e) {
1442
+ this.functionName = t, this.arguments = e;
1443
+ }, it.prototype.toString = function() {
1444
+ for (var t = this.functionName + "(", e = 0; e < this.arguments.length; e++)
1445
+ e > 0 && (t += ", "), t += this.arguments[e].toString();
1446
+ return t + ")";
1447
+ }, it.prototype.evaluate = function(t) {
1448
+ var e = T.getFunctionFromContext(this.functionName, t);
1449
+ if (!e)
1450
+ throw new Error("Unknown function " + this.functionName);
1451
+ var r = [t].concat(this.arguments);
1452
+ return e.apply(t.functionResolver.thisArg, r);
1453
+ }, D.prototype = new P(), D.prototype.constructor = D, D.superclass = P.prototype;
1454
+ function D(t) {
1455
+ arguments.length > 0 && this.init(t);
1456
+ }
1457
+ D.prototype.init = function(t) {
1458
+ this.str = String(t);
1459
+ }, D.prototype.toString = function() {
1460
+ return this.str;
1461
+ }, D.prototype.evaluate = function(t) {
1462
+ return this;
1463
+ }, D.prototype.string = function() {
1464
+ return this;
1465
+ }, D.prototype.number = function() {
1466
+ return new h(this.str);
1467
+ }, D.prototype.bool = function() {
1468
+ return new A(this.str);
1469
+ }, D.prototype.nodeset = function() {
1470
+ throw new Error("Cannot convert string to nodeset");
1471
+ }, D.prototype.stringValue = function() {
1472
+ return this.str;
1473
+ }, D.prototype.numberValue = function() {
1474
+ return this.number().numberValue();
1475
+ }, D.prototype.booleanValue = function() {
1476
+ return this.bool().booleanValue();
1477
+ }, D.prototype.equals = function(t) {
1478
+ return p.instance_of(t, A) ? this.bool().equals(t) : p.instance_of(t, h) ? this.number().equals(t) : p.instance_of(t, u) ? t.compareWithString(this, f.equals) : new A(this.str == t.str);
1479
+ }, D.prototype.notequal = function(t) {
1480
+ return p.instance_of(t, A) ? this.bool().notequal(t) : p.instance_of(t, h) ? this.number().notequal(t) : p.instance_of(t, u) ? t.compareWithString(this, f.notequal) : new A(this.str != t.str);
1481
+ }, D.prototype.lessthan = function(t) {
1482
+ return p.instance_of(t, u) ? t.compareWithNumber(this.number(), f.greaterthanorequal) : this.number().lessthan(t.number());
1483
+ }, D.prototype.greaterthan = function(t) {
1484
+ return p.instance_of(t, u) ? t.compareWithNumber(this.number(), f.lessthanorequal) : this.number().greaterthan(t.number());
1485
+ }, D.prototype.lessthanorequal = function(t) {
1486
+ return p.instance_of(t, u) ? t.compareWithNumber(this.number(), f.greaterthan) : this.number().lessthanorequal(t.number());
1487
+ }, D.prototype.greaterthanorequal = function(t) {
1488
+ return p.instance_of(t, u) ? t.compareWithNumber(this.number(), f.lessthan) : this.number().greaterthanorequal(t.number());
1489
+ }, h.prototype = new P(), h.prototype.constructor = h, h.superclass = P.prototype;
1490
+ function h(t) {
1491
+ arguments.length > 0 && this.init(t);
1492
+ }
1493
+ h.prototype.init = function(t) {
1494
+ this.num = typeof t == "string" ? this.parse(t) : Number(t);
1495
+ }, h.prototype.numberFormat = /^\s*-?[0-9]*\.?[0-9]+\s*$/, h.prototype.parse = function(t) {
1496
+ return this.numberFormat.test(t) ? parseFloat(t) : Number.NaN;
1497
+ };
1498
+ function F(t) {
1499
+ for (var e = t.split("e-"), r = e[0].replace(".", ""), i = Number(e[1]), a = 0; a < i - 1; a += 1)
1500
+ r = "0" + r;
1501
+ return "0." + r;
1502
+ }
1503
+ function g(t) {
1504
+ for (var e = t.split("e"), r = e[0].replace(".", ""), i = Number(e[1]), a = i + 1 - r.length, n = 0; n < a; n += 1)
1505
+ r += "0";
1506
+ return r;
1507
+ }
1508
+ h.prototype.toString = function() {
1509
+ var t = this.num.toString();
1510
+ return t.indexOf("e-") !== -1 ? F(t) : t.indexOf("e") !== -1 ? g(t) : t;
1511
+ }, h.prototype.evaluate = function(t) {
1512
+ return this;
1513
+ }, h.prototype.string = function() {
1514
+ return new D(this.toString());
1515
+ }, h.prototype.number = function() {
1516
+ return this;
1517
+ }, h.prototype.bool = function() {
1518
+ return new A(this.num);
1519
+ }, h.prototype.nodeset = function() {
1520
+ throw new Error("Cannot convert number to nodeset");
1521
+ }, h.prototype.stringValue = function() {
1522
+ return this.string().stringValue();
1523
+ }, h.prototype.numberValue = function() {
1524
+ return this.num;
1525
+ }, h.prototype.booleanValue = function() {
1526
+ return this.bool().booleanValue();
1527
+ }, h.prototype.negate = function() {
1528
+ return new h(-this.num);
1529
+ }, h.prototype.equals = function(t) {
1530
+ return p.instance_of(t, A) ? this.bool().equals(t) : p.instance_of(t, D) ? this.equals(t.number()) : p.instance_of(t, u) ? t.compareWithNumber(this, f.equals) : new A(this.num == t.num);
1531
+ }, h.prototype.notequal = function(t) {
1532
+ return p.instance_of(t, A) ? this.bool().notequal(t) : p.instance_of(t, D) ? this.notequal(t.number()) : p.instance_of(t, u) ? t.compareWithNumber(this, f.notequal) : new A(this.num != t.num);
1533
+ }, h.prototype.lessthan = function(t) {
1534
+ return p.instance_of(t, u) ? t.compareWithNumber(this, f.greaterthanorequal) : p.instance_of(t, A) || p.instance_of(t, D) ? this.lessthan(t.number()) : new A(this.num < t.num);
1535
+ }, h.prototype.greaterthan = function(t) {
1536
+ return p.instance_of(t, u) ? t.compareWithNumber(this, f.lessthanorequal) : p.instance_of(t, A) || p.instance_of(t, D) ? this.greaterthan(t.number()) : new A(this.num > t.num);
1537
+ }, h.prototype.lessthanorequal = function(t) {
1538
+ return p.instance_of(t, u) ? t.compareWithNumber(this, f.greaterthan) : p.instance_of(t, A) || p.instance_of(t, D) ? this.lessthanorequal(t.number()) : new A(this.num <= t.num);
1539
+ }, h.prototype.greaterthanorequal = function(t) {
1540
+ return p.instance_of(t, u) ? t.compareWithNumber(this, f.lessthan) : p.instance_of(t, A) || p.instance_of(t, D) ? this.greaterthanorequal(t.number()) : new A(this.num >= t.num);
1541
+ }, h.prototype.plus = function(t) {
1542
+ return new h(this.num + t.num);
1543
+ }, h.prototype.minus = function(t) {
1544
+ return new h(this.num - t.num);
1545
+ }, h.prototype.multiply = function(t) {
1546
+ return new h(this.num * t.num);
1547
+ }, h.prototype.div = function(t) {
1548
+ return new h(this.num / t.num);
1549
+ }, h.prototype.mod = function(t) {
1550
+ return new h(this.num % t.num);
1551
+ }, A.prototype = new P(), A.prototype.constructor = A, A.superclass = P.prototype;
1552
+ function A(t) {
1553
+ arguments.length > 0 && this.init(t);
1554
+ }
1555
+ A.prototype.init = function(t) {
1556
+ this.b = !!t;
1557
+ }, A.prototype.toString = function() {
1558
+ return this.b.toString();
1559
+ }, A.prototype.evaluate = function(t) {
1560
+ return this;
1561
+ }, A.prototype.string = function() {
1562
+ return new D(this.b);
1563
+ }, A.prototype.number = function() {
1564
+ return new h(this.b);
1565
+ }, A.prototype.bool = function() {
1566
+ return this;
1567
+ }, A.prototype.nodeset = function() {
1568
+ throw new Error("Cannot convert boolean to nodeset");
1569
+ }, A.prototype.stringValue = function() {
1570
+ return this.string().stringValue();
1571
+ }, A.prototype.numberValue = function() {
1572
+ return this.num().numberValue();
1573
+ }, A.prototype.booleanValue = function() {
1574
+ return this.b;
1575
+ }, A.prototype.not = function() {
1576
+ return new A(!this.b);
1577
+ }, A.prototype.equals = function(t) {
1578
+ return p.instance_of(t, D) || p.instance_of(t, h) ? this.equals(t.bool()) : p.instance_of(t, u) ? t.compareWithBoolean(this, f.equals) : new A(this.b == t.b);
1579
+ }, A.prototype.notequal = function(t) {
1580
+ return p.instance_of(t, D) || p.instance_of(t, h) ? this.notequal(t.bool()) : p.instance_of(t, u) ? t.compareWithBoolean(this, f.notequal) : new A(this.b != t.b);
1581
+ }, A.prototype.lessthan = function(t) {
1582
+ return p.instance_of(t, u) ? t.compareWithNumber(this.number(), f.greaterthanorequal) : this.number().lessthan(t.number());
1583
+ }, A.prototype.greaterthan = function(t) {
1584
+ return p.instance_of(t, u) ? t.compareWithNumber(this.number(), f.lessthanorequal) : this.number().greaterthan(t.number());
1585
+ }, A.prototype.lessthanorequal = function(t) {
1586
+ return p.instance_of(t, u) ? t.compareWithNumber(this.number(), f.greaterthan) : this.number().lessthanorequal(t.number());
1587
+ }, A.prototype.greaterthanorequal = function(t) {
1588
+ return p.instance_of(t, u) ? t.compareWithNumber(this.number(), f.lessthan) : this.number().greaterthanorequal(t.number());
1589
+ }, l.prototype = new Object(), l.prototype.constructor = l, l.superclass = Object.prototype;
1590
+ function l(t) {
1591
+ this.init(t);
1592
+ }
1593
+ l.prototype.init = function(t) {
1594
+ this.left = null, this.right = null, this.node = t, this.depth = 1;
1595
+ }, l.prototype.balance = function() {
1596
+ var t = this.left == null ? 0 : this.left.depth, e = this.right == null ? 0 : this.right.depth;
1597
+ if (t > e + 1) {
1598
+ var r = this.left.left == null ? 0 : this.left.left.depth, i = this.left.right == null ? 0 : this.left.right.depth;
1599
+ r < i && this.left.rotateRR(), this.rotateLL();
1600
+ } else if (t + 1 < e) {
1601
+ var a = this.right.right == null ? 0 : this.right.right.depth, n = this.right.left == null ? 0 : this.right.left.depth;
1602
+ n > a && this.right.rotateLL(), this.rotateRR();
1603
+ }
1604
+ }, l.prototype.rotateLL = function() {
1605
+ var t = this.node, e = this.right;
1606
+ this.node = this.left.node, this.right = this.left, this.left = this.left.left, this.right.left = this.right.right, this.right.right = e, this.right.node = t, this.right.updateInNewLocation(), this.updateInNewLocation();
1607
+ }, l.prototype.rotateRR = function() {
1608
+ var t = this.node, e = this.left;
1609
+ this.node = this.right.node, this.left = this.right, this.right = this.right.right, this.left.right = this.left.left, this.left.left = e, this.left.node = t, this.left.updateInNewLocation(), this.updateInNewLocation();
1610
+ }, l.prototype.updateInNewLocation = function() {
1611
+ this.getDepthFromChildren();
1612
+ }, l.prototype.getDepthFromChildren = function() {
1613
+ this.depth = this.node == null ? 0 : 1, this.left != null && (this.depth = this.left.depth + 1), this.right != null && this.depth <= this.right.depth && (this.depth = this.right.depth + 1);
1614
+ };
1615
+ function E(t, e) {
1616
+ if (t === e)
1617
+ return 0;
1618
+ if (t.compareDocumentPosition) {
1619
+ var r = t.compareDocumentPosition(e);
1620
+ return r & 1 || r & 10 ? 1 : r & 20 ? -1 : 0;
1621
+ }
1622
+ for (var i = 0, a = 0, n = t; n != null; n = n.parentNode || n.ownerElement)
1623
+ i++;
1624
+ for (var w = e; w != null; w = w.parentNode || w.ownerElement)
1625
+ a++;
1626
+ if (i > a) {
1627
+ for (; i > a; )
1628
+ t = t.parentNode || t.ownerElement, i--;
1629
+ if (t === e)
1630
+ return 1;
1631
+ } else if (a > i) {
1632
+ for (; a > i; )
1633
+ e = e.parentNode || e.ownerElement, a--;
1634
+ if (t === e)
1635
+ return -1;
1636
+ }
1637
+ for (var q = t.parentNode || t.ownerElement, _ = e.parentNode || e.ownerElement; q !== _; )
1638
+ t = q, e = _, q = t.parentNode || t.ownerElement, _ = e.parentNode || e.ownerElement;
1639
+ var s = p.isAttribute(t), k = p.isAttribute(e);
1640
+ if (s && !k)
1641
+ return -1;
1642
+ if (!s && k)
1643
+ return 1;
1644
+ if (q)
1645
+ for (var tt = s ? q.attributes : q.childNodes, at = tt.length, et = 0; et < at; et += 1) {
1646
+ var rt = tt[et];
1647
+ if (rt === t)
1648
+ return -1;
1649
+ if (rt === e)
1650
+ return 1;
1651
+ }
1652
+ throw new Error("Unexpected: could not determine node order");
1653
+ }
1654
+ l.prototype.add = function(t) {
1655
+ if (t === this.node)
1656
+ return !1;
1657
+ var e = E(t, this.node), r = !1;
1658
+ return e == -1 ? this.left == null ? (this.left = new l(t), r = !0) : (r = this.left.add(t), r && this.balance()) : e == 1 && (this.right == null ? (this.right = new l(t), r = !0) : (r = this.right.add(t), r && this.balance())), r && this.getDepthFromChildren(), r;
1659
+ }, u.prototype = new P(), u.prototype.constructor = u, u.superclass = P.prototype;
1660
+ function u() {
1661
+ this.init();
1662
+ }
1663
+ u.prototype.init = function() {
1664
+ this.tree = null, this.nodes = [], this.size = 0;
1665
+ }, u.prototype.toString = function() {
1666
+ var t = this.first();
1667
+ return t == null ? "" : this.stringForNode(t);
1668
+ }, u.prototype.evaluate = function(t) {
1669
+ return this;
1670
+ }, u.prototype.string = function() {
1671
+ return new D(this.toString());
1672
+ }, u.prototype.stringValue = function() {
1673
+ return this.toString();
1674
+ }, u.prototype.number = function() {
1675
+ return new h(this.string());
1676
+ }, u.prototype.numberValue = function() {
1677
+ return Number(this.string());
1678
+ }, u.prototype.bool = function() {
1679
+ return new A(this.booleanValue());
1680
+ }, u.prototype.booleanValue = function() {
1681
+ return !!this.size;
1682
+ }, u.prototype.nodeset = function() {
1683
+ return this;
1684
+ }, u.prototype.stringForNode = function(t) {
1685
+ return t.nodeType == 9 || t.nodeType == 1 || t.nodeType === 11 ? this.stringForContainerNode(t) : t.nodeType === 2 ? t.value || t.nodeValue : t.isNamespaceNode ? t.namespace : t.nodeValue;
1686
+ }, u.prototype.stringForContainerNode = function(t) {
1687
+ for (var e = "", r = t.firstChild; r != null; r = r.nextSibling) {
1688
+ var i = r.nodeType;
1689
+ (i === 1 || i === 3 || i === 4 || i === 9 || i === 11) && (e += this.stringForNode(r));
1690
+ }
1691
+ return e;
1692
+ }, u.prototype.buildTree = function() {
1693
+ if (!this.tree && this.nodes.length) {
1694
+ this.tree = new l(this.nodes[0]);
1695
+ for (var t = 1; t < this.nodes.length; t += 1)
1696
+ this.tree.add(this.nodes[t]);
1697
+ }
1698
+ return this.tree;
1699
+ }, u.prototype.first = function() {
1700
+ var t = this.buildTree();
1701
+ if (t == null)
1702
+ return null;
1703
+ for (; t.left != null; )
1704
+ t = t.left;
1705
+ return t.node;
1706
+ }, u.prototype.add = function(t) {
1707
+ for (var e = 0; e < this.nodes.length; e += 1)
1708
+ if (t === this.nodes[e])
1709
+ return;
1710
+ this.tree = null, this.nodes.push(t), this.size += 1;
1711
+ }, u.prototype.addArray = function(t) {
1712
+ for (var e = 0; e < t.length; e += 1)
1713
+ this.add(t[e]);
1714
+ }, u.prototype.toArray = function() {
1715
+ var t = [];
1716
+ return this.toArrayRec(this.buildTree(), t), t;
1717
+ }, u.prototype.toArrayRec = function(t, e) {
1718
+ t != null && (this.toArrayRec(t.left, e), e.push(t.node), this.toArrayRec(t.right, e));
1719
+ }, u.prototype.toUnsortedArray = function() {
1720
+ return this.nodes.slice();
1721
+ }, u.prototype.compareWithString = function(t, e) {
1722
+ for (var r = this.toUnsortedArray(), i = 0; i < r.length; i++) {
1723
+ var a = r[i], n = new D(this.stringForNode(a)), w = e(n, t);
1724
+ if (w.booleanValue())
1725
+ return w;
1726
+ }
1727
+ return new A(!1);
1728
+ }, u.prototype.compareWithNumber = function(t, e) {
1729
+ for (var r = this.toUnsortedArray(), i = 0; i < r.length; i++) {
1730
+ var a = r[i], n = new h(this.stringForNode(a)), w = e(n, t);
1731
+ if (w.booleanValue())
1732
+ return w;
1733
+ }
1734
+ return new A(!1);
1735
+ }, u.prototype.compareWithBoolean = function(t, e) {
1736
+ return e(this.bool(), t);
1737
+ }, u.prototype.compareWithNodeSet = function(t, e) {
1738
+ for (var r = this.toUnsortedArray(), i = function(q, _) {
1739
+ return e(_, q);
1740
+ }, a = 0; a < r.length; a++) {
1741
+ var n = new D(this.stringForNode(r[a])), w = t.compareWithString(n, i);
1742
+ if (w.booleanValue())
1743
+ return w;
1744
+ }
1745
+ return new A(!1);
1746
+ }, u.prototype.equals = function(t) {
1747
+ return p.instance_of(t, D) ? this.compareWithString(t, f.equals) : p.instance_of(t, h) ? this.compareWithNumber(t, f.equals) : p.instance_of(t, A) ? this.compareWithBoolean(t, f.equals) : this.compareWithNodeSet(t, f.equals);
1748
+ }, u.prototype.notequal = function(t) {
1749
+ return p.instance_of(t, D) ? this.compareWithString(t, f.notequal) : p.instance_of(t, h) ? this.compareWithNumber(t, f.notequal) : p.instance_of(t, A) ? this.compareWithBoolean(t, f.notequal) : this.compareWithNodeSet(t, f.notequal);
1750
+ }, u.prototype.lessthan = function(t) {
1751
+ return p.instance_of(t, D) ? this.compareWithNumber(t.number(), f.lessthan) : p.instance_of(t, h) ? this.compareWithNumber(t, f.lessthan) : p.instance_of(t, A) ? this.compareWithBoolean(t, f.lessthan) : this.compareWithNodeSet(t, f.lessthan);
1752
+ }, u.prototype.greaterthan = function(t) {
1753
+ return p.instance_of(t, D) ? this.compareWithNumber(t.number(), f.greaterthan) : p.instance_of(t, h) ? this.compareWithNumber(t, f.greaterthan) : p.instance_of(t, A) ? this.compareWithBoolean(t, f.greaterthan) : this.compareWithNodeSet(t, f.greaterthan);
1754
+ }, u.prototype.lessthanorequal = function(t) {
1755
+ return p.instance_of(t, D) ? this.compareWithNumber(t.number(), f.lessthanorequal) : p.instance_of(t, h) ? this.compareWithNumber(t, f.lessthanorequal) : p.instance_of(t, A) ? this.compareWithBoolean(t, f.lessthanorequal) : this.compareWithNodeSet(t, f.lessthanorequal);
1756
+ }, u.prototype.greaterthanorequal = function(t) {
1757
+ return p.instance_of(t, D) ? this.compareWithNumber(t.number(), f.greaterthanorequal) : p.instance_of(t, h) ? this.compareWithNumber(t, f.greaterthanorequal) : p.instance_of(t, A) ? this.compareWithBoolean(t, f.greaterthanorequal) : this.compareWithNodeSet(t, f.greaterthanorequal);
1758
+ }, u.prototype.union = function(t) {
1759
+ var e = new u();
1760
+ return e.addArray(this.toUnsortedArray()), e.addArray(t.toUnsortedArray()), e;
1761
+ }, m.prototype = new Object(), m.prototype.constructor = m, m.superclass = Object.prototype;
1762
+ function m(t, e, r) {
1763
+ this.isXPathNamespace = !0, this.ownerDocument = r.ownerDocument, this.nodeName = "#namespace", this.prefix = t, this.localName = t, this.namespaceURI = e, this.nodeValue = e, this.ownerElement = r, this.nodeType = m.XPATH_NAMESPACE_NODE;
1764
+ }
1765
+ m.prototype.toString = function() {
1766
+ return '{ "' + this.prefix + '", "' + this.namespaceURI + '" }';
1767
+ };
1768
+ var f = new Object();
1769
+ f.equals = function(t, e) {
1770
+ return t.equals(e);
1771
+ }, f.notequal = function(t, e) {
1772
+ return t.notequal(e);
1773
+ }, f.lessthan = function(t, e) {
1774
+ return t.lessthan(e);
1775
+ }, f.greaterthan = function(t, e) {
1776
+ return t.greaterthan(e);
1777
+ }, f.lessthanorequal = function(t, e) {
1778
+ return t.lessthanorequal(e);
1779
+ }, f.greaterthanorequal = function(t, e) {
1780
+ return t.greaterthanorequal(e);
1781
+ }, y.prototype = new Object(), y.prototype.constructor = y, y.superclass = Object.prototype;
1782
+ function y(t, e, r) {
1783
+ this.variableResolver = t ?? new S(), this.namespaceResolver = e ?? new M(), this.functionResolver = r ?? new T();
1784
+ }
1785
+ S.prototype = new Object(), S.prototype.constructor = S, S.superclass = Object.prototype;
1786
+ function S() {
1787
+ }
1788
+ S.prototype.getVariable = function(t, e) {
1789
+ return null;
1790
+ }, T.prototype = new Object(), T.prototype.constructor = T, T.superclass = Object.prototype;
1791
+ function T(t) {
1792
+ this.thisArg = t ?? C, this.functions = new Object(), this.addStandardFunctions();
1793
+ }
1794
+ T.prototype.addStandardFunctions = function() {
1795
+ this.functions["{}last"] = C.last, this.functions["{}position"] = C.position, this.functions["{}count"] = C.count, this.functions["{}id"] = C.id, this.functions["{}local-name"] = C.localName, this.functions["{}namespace-uri"] = C.namespaceURI, this.functions["{}name"] = C.name, this.functions["{}string"] = C.string, this.functions["{}concat"] = C.concat, this.functions["{}starts-with"] = C.startsWith, this.functions["{}contains"] = C.contains, this.functions["{}substring-before"] = C.substringBefore, this.functions["{}substring-after"] = C.substringAfter, this.functions["{}substring"] = C.substring, this.functions["{}string-length"] = C.stringLength, this.functions["{}normalize-space"] = C.normalizeSpace, this.functions["{}translate"] = C.translate, this.functions["{}boolean"] = C.boolean_, this.functions["{}not"] = C.not, this.functions["{}true"] = C.true_, this.functions["{}false"] = C.false_, this.functions["{}lang"] = C.lang, this.functions["{}number"] = C.number, this.functions["{}sum"] = C.sum, this.functions["{}floor"] = C.floor, this.functions["{}ceiling"] = C.ceiling, this.functions["{}round"] = C.round;
1796
+ }, T.prototype.addFunction = function(t, e, r) {
1797
+ this.functions["{" + t + "}" + e] = r;
1798
+ }, T.getFunctionFromContext = function(t, e) {
1799
+ var r = p.resolveQName(t, e.namespaceResolver, e.contextNode, !1);
1800
+ if (r[0] === null)
1801
+ throw new Error("Cannot resolve QName " + name);
1802
+ return e.functionResolver.getFunction(r[1], r[0]);
1803
+ }, T.prototype.getFunction = function(t, e) {
1804
+ return this.functions["{" + e + "}" + t];
1805
+ }, M.prototype = new Object(), M.prototype.constructor = M, M.superclass = Object.prototype;
1806
+ function M() {
1807
+ }
1808
+ M.prototype.getNamespace = function(t, e) {
1809
+ if (t == "xml")
1810
+ return U.XML_NAMESPACE_URI;
1811
+ if (t == "xmlns")
1812
+ return U.XMLNS_NAMESPACE_URI;
1813
+ for (e.nodeType == 9 ? e = e.documentElement : e.nodeType == 2 ? e = X.prototype.getOwnerElement(e) : e.nodeType != 1 && (e = e.parentNode); e != null && e.nodeType == 1; ) {
1814
+ for (var r = e.attributes, i = 0; i < r.length; i++) {
1815
+ var a = r.item(i), n = a.name || a.nodeName;
1816
+ if (n === "xmlns" && t === "" || n === "xmlns:" + t)
1817
+ return String(a.value || a.nodeValue);
1818
+ }
1819
+ e = e.parentNode;
1820
+ }
1821
+ return null;
1822
+ };
1823
+ var C = new Object();
1824
+ C.last = function() {
1825
+ var t = arguments[0];
1826
+ if (arguments.length != 1)
1827
+ throw new Error("Function last expects ()");
1828
+ return new h(t.contextSize);
1829
+ }, C.position = function() {
1830
+ var t = arguments[0];
1831
+ if (arguments.length != 1)
1832
+ throw new Error("Function position expects ()");
1833
+ return new h(t.contextPosition);
1834
+ }, C.count = function() {
1835
+ var t = arguments[0], e;
1836
+ if (arguments.length != 2 || !p.instance_of(e = arguments[1].evaluate(t), u))
1837
+ throw new Error("Function count expects (node-set)");
1838
+ return new h(e.size);
1839
+ }, C.id = function() {
1840
+ var t = arguments[0], e;
1841
+ if (arguments.length != 2)
1842
+ throw new Error("Function id expects (object)");
1843
+ e = arguments[1].evaluate(t), p.instance_of(e, u) ? e = e.toArray().join(" ") : e = e.stringValue();
1844
+ for (var r = e.split(/[\x0d\x0a\x09\x20]+/), i = new u(), a = t.contextNode.nodeType == 9 ? t.contextNode : t.contextNode.ownerDocument, n = 0; n < r.length; n++) {
1845
+ var w;
1846
+ a.getElementById ? w = a.getElementById(r[n]) : w = p.getElementById(a, r[n]), w != null && i.add(w);
1847
+ }
1848
+ return i;
1849
+ }, C.localName = function() {
1850
+ var t = arguments[0], e;
1851
+ if (arguments.length == 1)
1852
+ e = t.contextNode;
1853
+ else if (arguments.length == 2)
1854
+ e = arguments[1].evaluate(t).first();
1855
+ else
1856
+ throw new Error("Function local-name expects (node-set?)");
1857
+ return e == null ? new D("") : new D(e.localName || // standard elements and attributes
1858
+ e.baseName || // IE
1859
+ e.target || // processing instructions
1860
+ e.nodeName || // DOM1 elements
1861
+ "");
1862
+ }, C.namespaceURI = function() {
1863
+ var t = arguments[0], e;
1864
+ if (arguments.length == 1)
1865
+ e = t.contextNode;
1866
+ else if (arguments.length == 2)
1867
+ e = arguments[1].evaluate(t).first();
1868
+ else
1869
+ throw new Error("Function namespace-uri expects (node-set?)");
1870
+ return e == null ? new D("") : new D(e.namespaceURI);
1871
+ }, C.name = function() {
1872
+ var t = arguments[0], e;
1873
+ if (arguments.length == 1)
1874
+ e = t.contextNode;
1875
+ else if (arguments.length == 2)
1876
+ e = arguments[1].evaluate(t).first();
1877
+ else
1878
+ throw new Error("Function name expects (node-set?)");
1879
+ return e == null ? new D("") : e.nodeType == 1 ? new D(e.nodeName) : e.nodeType == 2 ? new D(e.name || e.nodeName) : e.nodeType === 7 ? new D(e.target || e.nodeName) : e.localName == null ? new D("") : new D(e.localName);
1880
+ }, C.string = function() {
1881
+ var t = arguments[0];
1882
+ if (arguments.length == 1)
1883
+ return new D(u.prototype.stringForNode(t.contextNode));
1884
+ if (arguments.length == 2)
1885
+ return arguments[1].evaluate(t).string();
1886
+ throw new Error("Function string expects (object?)");
1887
+ }, C.concat = function() {
1888
+ var t = arguments[0];
1889
+ if (arguments.length < 3)
1890
+ throw new Error("Function concat expects (string, string, string*)");
1891
+ for (var e = "", r = 1; r < arguments.length; r++)
1892
+ e += arguments[r].evaluate(t).stringValue();
1893
+ return new D(e);
1894
+ }, C.startsWith = function() {
1895
+ var t = arguments[0];
1896
+ if (arguments.length != 3)
1897
+ throw new Error("Function startsWith expects (string, string)");
1898
+ var e = arguments[1].evaluate(t).stringValue(), r = arguments[2].evaluate(t).stringValue();
1899
+ return new A(e.substring(0, r.length) == r);
1900
+ }, C.contains = function() {
1901
+ var t = arguments[0];
1902
+ if (arguments.length != 3)
1903
+ throw new Error("Function contains expects (string, string)");
1904
+ var e = arguments[1].evaluate(t).stringValue(), r = arguments[2].evaluate(t).stringValue();
1905
+ return new A(e.indexOf(r) !== -1);
1906
+ }, C.substringBefore = function() {
1907
+ var t = arguments[0];
1908
+ if (arguments.length != 3)
1909
+ throw new Error("Function substring-before expects (string, string)");
1910
+ var e = arguments[1].evaluate(t).stringValue(), r = arguments[2].evaluate(t).stringValue();
1911
+ return new D(e.substring(0, e.indexOf(r)));
1912
+ }, C.substringAfter = function() {
1913
+ var t = arguments[0];
1914
+ if (arguments.length != 3)
1915
+ throw new Error("Function substring-after expects (string, string)");
1916
+ var e = arguments[1].evaluate(t).stringValue(), r = arguments[2].evaluate(t).stringValue();
1917
+ if (r.length == 0)
1918
+ return new D(e);
1919
+ var i = e.indexOf(r);
1920
+ return i == -1 ? new D("") : new D(e.substring(i + r.length));
1921
+ }, C.substring = function() {
1922
+ var t = arguments[0];
1923
+ if (!(arguments.length == 3 || arguments.length == 4))
1924
+ throw new Error("Function substring expects (string, number, number?)");
1925
+ var e = arguments[1].evaluate(t).stringValue(), r = Math.round(arguments[2].evaluate(t).numberValue()) - 1, i = arguments.length == 4 ? r + Math.round(arguments[3].evaluate(t).numberValue()) : void 0;
1926
+ return new D(e.substring(r, i));
1927
+ }, C.stringLength = function() {
1928
+ var t = arguments[0], e;
1929
+ if (arguments.length == 1)
1930
+ e = u.prototype.stringForNode(t.contextNode);
1931
+ else if (arguments.length == 2)
1932
+ e = arguments[1].evaluate(t).stringValue();
1933
+ else
1934
+ throw new Error("Function string-length expects (string?)");
1935
+ return new h(e.length);
1936
+ }, C.normalizeSpace = function() {
1937
+ var t = arguments[0], e;
1938
+ if (arguments.length == 1)
1939
+ e = u.prototype.stringForNode(t.contextNode);
1940
+ else if (arguments.length == 2)
1941
+ e = arguments[1].evaluate(t).stringValue();
1942
+ else
1943
+ throw new Error("Function normalize-space expects (string?)");
1944
+ for (var r = 0, i = e.length - 1; p.isSpace(e.charCodeAt(i)); )
1945
+ i--;
1946
+ for (var a = ""; r <= i && p.isSpace(e.charCodeAt(r)); )
1947
+ r++;
1948
+ for (; r <= i; )
1949
+ if (p.isSpace(e.charCodeAt(r)))
1950
+ for (a += " "; r <= i && p.isSpace(e.charCodeAt(r)); )
1951
+ r++;
1952
+ else
1953
+ a += e.charAt(r), r++;
1954
+ return new D(a);
1955
+ }, C.translate = function() {
1956
+ var t = arguments[0];
1957
+ if (arguments.length != 4)
1958
+ throw new Error("Function translate expects (string, string, string)");
1959
+ for (var e = arguments[1].evaluate(t).stringValue(), r = arguments[2].evaluate(t).stringValue(), i = arguments[3].evaluate(t).stringValue(), a = [], n = 0; n < r.length; n++) {
1960
+ var w = r.charCodeAt(n);
1961
+ if (a[w] == null) {
1962
+ var q = n > i.length ? "" : i.charAt(n);
1963
+ a[w] = q;
1964
+ }
1965
+ }
1966
+ for (var _ = "", n = 0; n < e.length; n++) {
1967
+ var t = e.charCodeAt(n), s = a[t];
1968
+ s == null ? _ += e.charAt(n) : _ += s;
1969
+ }
1970
+ return new D(_);
1971
+ }, C.boolean_ = function() {
1972
+ var t = arguments[0];
1973
+ if (arguments.length != 2)
1974
+ throw new Error("Function boolean expects (object)");
1975
+ return arguments[1].evaluate(t).bool();
1976
+ }, C.not = function() {
1977
+ var t = arguments[0];
1978
+ if (arguments.length != 2)
1979
+ throw new Error("Function not expects (object)");
1980
+ return arguments[1].evaluate(t).bool().not();
1981
+ }, C.true_ = function() {
1982
+ if (arguments.length != 1)
1983
+ throw new Error("Function true expects ()");
1984
+ return new A(!0);
1985
+ }, C.false_ = function() {
1986
+ if (arguments.length != 1)
1987
+ throw new Error("Function false expects ()");
1988
+ return new A(!1);
1989
+ }, C.lang = function() {
1990
+ var t = arguments[0];
1991
+ if (arguments.length != 2)
1992
+ throw new Error("Function lang expects (string)");
1993
+ for (var e, r = t.contextNode; r != null && r.nodeType != 9; r = r.parentNode) {
1994
+ var i = r.getAttributeNS(U.XML_NAMESPACE_URI, "lang");
1995
+ if (i != null) {
1996
+ e = String(i);
1997
+ break;
1998
+ }
1999
+ }
2000
+ if (e == null)
2001
+ return new A(!1);
2002
+ var a = arguments[1].evaluate(t).stringValue();
2003
+ return new A(e.substring(0, a.length) == a && (e.length == a.length || e.charAt(a.length) == "-"));
2004
+ }, C.number = function() {
2005
+ var t = arguments[0];
2006
+ if (!(arguments.length == 1 || arguments.length == 2))
2007
+ throw new Error("Function number expects (object?)");
2008
+ return arguments.length == 1 ? new h(u.prototype.stringForNode(t.contextNode)) : arguments[1].evaluate(t).number();
2009
+ }, C.sum = function() {
2010
+ var t = arguments[0], e;
2011
+ if (arguments.length != 2 || !p.instance_of(e = arguments[1].evaluate(t), u))
2012
+ throw new Error("Function sum expects (node-set)");
2013
+ e = e.toUnsortedArray();
2014
+ for (var r = 0, i = 0; i < e.length; i++)
2015
+ r += new h(u.prototype.stringForNode(e[i])).numberValue();
2016
+ return new h(r);
2017
+ }, C.floor = function() {
2018
+ var t = arguments[0];
2019
+ if (arguments.length != 2)
2020
+ throw new Error("Function floor expects (number)");
2021
+ return new h(Math.floor(arguments[1].evaluate(t).numberValue()));
2022
+ }, C.ceiling = function() {
2023
+ var t = arguments[0];
2024
+ if (arguments.length != 2)
2025
+ throw new Error("Function ceiling expects (number)");
2026
+ return new h(Math.ceil(arguments[1].evaluate(t).numberValue()));
2027
+ }, C.round = function() {
2028
+ var t = arguments[0];
2029
+ if (arguments.length != 2)
2030
+ throw new Error("Function round expects (number)");
2031
+ return new h(Math.round(arguments[1].evaluate(t).numberValue()));
2032
+ };
2033
+ var p = new Object();
2034
+ p.isAttribute = function(t) {
2035
+ return t && (t.nodeType === 2 || t.ownerElement);
2036
+ }, p.splitQName = function(t) {
2037
+ var e = t.indexOf(":");
2038
+ return e == -1 ? [null, t] : [t.substring(0, e), t.substring(e + 1)];
2039
+ }, p.resolveQName = function(t, e, r, i) {
2040
+ var a = p.splitQName(t);
2041
+ return a[0] != null ? a[0] = e.getNamespace(a[0], r) : i ? (a[0] = e.getNamespace("", r), a[0] == null && (a[0] = "")) : a[0] = "", a;
2042
+ }, p.isSpace = function(t) {
2043
+ return t == 9 || t == 13 || t == 10 || t == 32;
2044
+ }, p.isLetter = function(t) {
2045
+ return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t >= 192 && t <= 214 || t >= 216 && t <= 246 || t >= 248 && t <= 255 || t >= 256 && t <= 305 || t >= 308 && t <= 318 || t >= 321 && t <= 328 || t >= 330 && t <= 382 || t >= 384 && t <= 451 || t >= 461 && t <= 496 || t >= 500 && t <= 501 || t >= 506 && t <= 535 || t >= 592 && t <= 680 || t >= 699 && t <= 705 || t == 902 || t >= 904 && t <= 906 || t == 908 || t >= 910 && t <= 929 || t >= 931 && t <= 974 || t >= 976 && t <= 982 || t == 986 || t == 988 || t == 990 || t == 992 || t >= 994 && t <= 1011 || t >= 1025 && t <= 1036 || t >= 1038 && t <= 1103 || t >= 1105 && t <= 1116 || t >= 1118 && t <= 1153 || t >= 1168 && t <= 1220 || t >= 1223 && t <= 1224 || t >= 1227 && t <= 1228 || t >= 1232 && t <= 1259 || t >= 1262 && t <= 1269 || t >= 1272 && t <= 1273 || t >= 1329 && t <= 1366 || t == 1369 || t >= 1377 && t <= 1414 || t >= 1488 && t <= 1514 || t >= 1520 && t <= 1522 || t >= 1569 && t <= 1594 || t >= 1601 && t <= 1610 || t >= 1649 && t <= 1719 || t >= 1722 && t <= 1726 || t >= 1728 && t <= 1742 || t >= 1744 && t <= 1747 || t == 1749 || t >= 1765 && t <= 1766 || t >= 2309 && t <= 2361 || t == 2365 || t >= 2392 && t <= 2401 || t >= 2437 && t <= 2444 || t >= 2447 && t <= 2448 || t >= 2451 && t <= 2472 || t >= 2474 && t <= 2480 || t == 2482 || t >= 2486 && t <= 2489 || t >= 2524 && t <= 2525 || t >= 2527 && t <= 2529 || t >= 2544 && t <= 2545 || t >= 2565 && t <= 2570 || t >= 2575 && t <= 2576 || t >= 2579 && t <= 2600 || t >= 2602 && t <= 2608 || t >= 2610 && t <= 2611 || t >= 2613 && t <= 2614 || t >= 2616 && t <= 2617 || t >= 2649 && t <= 2652 || t == 2654 || t >= 2674 && t <= 2676 || t >= 2693 && t <= 2699 || t == 2701 || t >= 2703 && t <= 2705 || t >= 2707 && t <= 2728 || t >= 2730 && t <= 2736 || t >= 2738 && t <= 2739 || t >= 2741 && t <= 2745 || t == 2749 || t == 2784 || t >= 2821 && t <= 2828 || t >= 2831 && t <= 2832 || t >= 2835 && t <= 2856 || t >= 2858 && t <= 2864 || t >= 2866 && t <= 2867 || t >= 2870 && t <= 2873 || t == 2877 || t >= 2908 && t <= 2909 || t >= 2911 && t <= 2913 || t >= 2949 && t <= 2954 || t >= 2958 && t <= 2960 || t >= 2962 && t <= 2965 || t >= 2969 && t <= 2970 || t == 2972 || t >= 2974 && t <= 2975 || t >= 2979 && t <= 2980 || t >= 2984 && t <= 2986 || t >= 2990 && t <= 2997 || t >= 2999 && t <= 3001 || t >= 3077 && t <= 3084 || t >= 3086 && t <= 3088 || t >= 3090 && t <= 3112 || t >= 3114 && t <= 3123 || t >= 3125 && t <= 3129 || t >= 3168 && t <= 3169 || t >= 3205 && t <= 3212 || t >= 3214 && t <= 3216 || t >= 3218 && t <= 3240 || t >= 3242 && t <= 3251 || t >= 3253 && t <= 3257 || t == 3294 || t >= 3296 && t <= 3297 || t >= 3333 && t <= 3340 || t >= 3342 && t <= 3344 || t >= 3346 && t <= 3368 || t >= 3370 && t <= 3385 || t >= 3424 && t <= 3425 || t >= 3585 && t <= 3630 || t == 3632 || t >= 3634 && t <= 3635 || t >= 3648 && t <= 3653 || t >= 3713 && t <= 3714 || t == 3716 || t >= 3719 && t <= 3720 || t == 3722 || t == 3725 || t >= 3732 && t <= 3735 || t >= 3737 && t <= 3743 || t >= 3745 && t <= 3747 || t == 3749 || t == 3751 || t >= 3754 && t <= 3755 || t >= 3757 && t <= 3758 || t == 3760 || t >= 3762 && t <= 3763 || t == 3773 || t >= 3776 && t <= 3780 || t >= 3904 && t <= 3911 || t >= 3913 && t <= 3945 || t >= 4256 && t <= 4293 || t >= 4304 && t <= 4342 || t == 4352 || t >= 4354 && t <= 4355 || t >= 4357 && t <= 4359 || t == 4361 || t >= 4363 && t <= 4364 || t >= 4366 && t <= 4370 || t == 4412 || t == 4414 || t == 4416 || t == 4428 || t == 4430 || t == 4432 || t >= 4436 && t <= 4437 || t == 4441 || t >= 4447 && t <= 4449 || t == 4451 || t == 4453 || t == 4455 || t == 4457 || t >= 4461 && t <= 4462 || t >= 4466 && t <= 4467 || t == 4469 || t == 4510 || t == 4520 || t == 4523 || t >= 4526 && t <= 4527 || t >= 4535 && t <= 4536 || t == 4538 || t >= 4540 && t <= 4546 || t == 4587 || t == 4592 || t == 4601 || t >= 7680 && t <= 7835 || t >= 7840 && t <= 7929 || t >= 7936 && t <= 7957 || t >= 7960 && t <= 7965 || t >= 7968 && t <= 8005 || t >= 8008 && t <= 8013 || t >= 8016 && t <= 8023 || t == 8025 || t == 8027 || t == 8029 || t >= 8031 && t <= 8061 || t >= 8064 && t <= 8116 || t >= 8118 && t <= 8124 || t == 8126 || t >= 8130 && t <= 8132 || t >= 8134 && t <= 8140 || t >= 8144 && t <= 8147 || t >= 8150 && t <= 8155 || t >= 8160 && t <= 8172 || t >= 8178 && t <= 8180 || t >= 8182 && t <= 8188 || t == 8486 || t >= 8490 && t <= 8491 || t == 8494 || t >= 8576 && t <= 8578 || t >= 12353 && t <= 12436 || t >= 12449 && t <= 12538 || t >= 12549 && t <= 12588 || t >= 44032 && t <= 55203 || t >= 19968 && t <= 40869 || t == 12295 || t >= 12321 && t <= 12329;
2046
+ }, p.isNCNameChar = function(t) {
2047
+ return t >= 48 && t <= 57 || t >= 1632 && t <= 1641 || t >= 1776 && t <= 1785 || t >= 2406 && t <= 2415 || t >= 2534 && t <= 2543 || t >= 2662 && t <= 2671 || t >= 2790 && t <= 2799 || t >= 2918 && t <= 2927 || t >= 3047 && t <= 3055 || t >= 3174 && t <= 3183 || t >= 3302 && t <= 3311 || t >= 3430 && t <= 3439 || t >= 3664 && t <= 3673 || t >= 3792 && t <= 3801 || t >= 3872 && t <= 3881 || t == 46 || t == 45 || t == 95 || p.isLetter(t) || t >= 768 && t <= 837 || t >= 864 && t <= 865 || t >= 1155 && t <= 1158 || t >= 1425 && t <= 1441 || t >= 1443 && t <= 1465 || t >= 1467 && t <= 1469 || t == 1471 || t >= 1473 && t <= 1474 || t == 1476 || t >= 1611 && t <= 1618 || t == 1648 || t >= 1750 && t <= 1756 || t >= 1757 && t <= 1759 || t >= 1760 && t <= 1764 || t >= 1767 && t <= 1768 || t >= 1770 && t <= 1773 || t >= 2305 && t <= 2307 || t == 2364 || t >= 2366 && t <= 2380 || t == 2381 || t >= 2385 && t <= 2388 || t >= 2402 && t <= 2403 || t >= 2433 && t <= 2435 || t == 2492 || t == 2494 || t == 2495 || t >= 2496 && t <= 2500 || t >= 2503 && t <= 2504 || t >= 2507 && t <= 2509 || t == 2519 || t >= 2530 && t <= 2531 || t == 2562 || t == 2620 || t == 2622 || t == 2623 || t >= 2624 && t <= 2626 || t >= 2631 && t <= 2632 || t >= 2635 && t <= 2637 || t >= 2672 && t <= 2673 || t >= 2689 && t <= 2691 || t == 2748 || t >= 2750 && t <= 2757 || t >= 2759 && t <= 2761 || t >= 2763 && t <= 2765 || t >= 2817 && t <= 2819 || t == 2876 || t >= 2878 && t <= 2883 || t >= 2887 && t <= 2888 || t >= 2891 && t <= 2893 || t >= 2902 && t <= 2903 || t >= 2946 && t <= 2947 || t >= 3006 && t <= 3010 || t >= 3014 && t <= 3016 || t >= 3018 && t <= 3021 || t == 3031 || t >= 3073 && t <= 3075 || t >= 3134 && t <= 3140 || t >= 3142 && t <= 3144 || t >= 3146 && t <= 3149 || t >= 3157 && t <= 3158 || t >= 3202 && t <= 3203 || t >= 3262 && t <= 3268 || t >= 3270 && t <= 3272 || t >= 3274 && t <= 3277 || t >= 3285 && t <= 3286 || t >= 3330 && t <= 3331 || t >= 3390 && t <= 3395 || t >= 3398 && t <= 3400 || t >= 3402 && t <= 3405 || t == 3415 || t == 3633 || t >= 3636 && t <= 3642 || t >= 3655 && t <= 3662 || t == 3761 || t >= 3764 && t <= 3769 || t >= 3771 && t <= 3772 || t >= 3784 && t <= 3789 || t >= 3864 && t <= 3865 || t == 3893 || t == 3895 || t == 3897 || t == 3902 || t == 3903 || t >= 3953 && t <= 3972 || t >= 3974 && t <= 3979 || t >= 3984 && t <= 3989 || t == 3991 || t >= 3993 && t <= 4013 || t >= 4017 && t <= 4023 || t == 4025 || t >= 8400 && t <= 8412 || t == 8417 || t >= 12330 && t <= 12335 || t == 12441 || t == 12442 || t == 183 || t == 720 || t == 721 || t == 903 || t == 1600 || t == 3654 || t == 3782 || t == 12293 || t >= 12337 && t <= 12341 || t >= 12445 && t <= 12446 || t >= 12540 && t <= 12542;
2048
+ }, p.coalesceText = function(t) {
2049
+ for (var e = t.firstChild; e != null; e = e.nextSibling)
2050
+ if (e.nodeType == 3 || e.nodeType == 4) {
2051
+ var r = e.nodeValue, i = e;
2052
+ for (e = e.nextSibling; e != null && (e.nodeType == 3 || e.nodeType == 4); ) {
2053
+ r += e.nodeValue;
2054
+ var a = e;
2055
+ e = e.nextSibling, a.parentNode.removeChild(a);
2056
+ }
2057
+ if (i.nodeType == 4) {
2058
+ var n = i.parentNode;
2059
+ if (i.nextSibling == null)
2060
+ n.removeChild(i), n.appendChild(n.ownerDocument.createTextNode(r));
2061
+ else {
2062
+ var w = i.nextSibling;
2063
+ n.removeChild(i), n.insertBefore(n.ownerDocument.createTextNode(r), w);
2064
+ }
2065
+ } else
2066
+ i.nodeValue = r;
2067
+ if (e == null)
2068
+ break;
2069
+ } else e.nodeType == 1 && p.coalesceText(e);
2070
+ }, p.instance_of = function(t, e) {
2071
+ for (; t != null; ) {
2072
+ if (t.constructor === e)
2073
+ return !0;
2074
+ if (t === Object)
2075
+ return !1;
2076
+ t = t.constructor.superclass;
2077
+ }
2078
+ return !1;
2079
+ }, p.getElementById = function(t, e) {
2080
+ if (t.nodeType == 1 && (t.getAttribute("id") == e || t.getAttributeNS(null, "id") == e))
2081
+ return t;
2082
+ for (var r = t.firstChild; r != null; r = r.nextSibling) {
2083
+ var i = p.getElementById(r, e);
2084
+ if (i != null)
2085
+ return i;
2086
+ }
2087
+ return null;
2088
+ };
2089
+ var j = (function() {
2090
+ function t(r, i) {
2091
+ var a = i ? ": " + i.toString() : "";
2092
+ switch (r) {
2093
+ case e.INVALID_EXPRESSION_ERR:
2094
+ return "Invalid expression" + a;
2095
+ case e.TYPE_ERR:
2096
+ return "Type error" + a;
2097
+ }
2098
+ return null;
2099
+ }
2100
+ function e(r, i, a) {
2101
+ var n = Error.call(this, t(r, i) || a);
2102
+ return n.code = r, n.exception = i, n;
2103
+ }
2104
+ return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e.superclass = Error, e.prototype.toString = function() {
2105
+ return this.message;
2106
+ }, e.fromMessage = function(r, i) {
2107
+ return new e(null, i, r);
2108
+ }, e.INVALID_EXPRESSION_ERR = 51, e.TYPE_ERR = 52, e;
2109
+ })();
2110
+ mt.prototype = {}, mt.prototype.constructor = mt, mt.superclass = Object.prototype;
2111
+ function mt(t, e, r) {
2112
+ this.xpath = r.parse(t), this.context = new y(), this.context.namespaceResolver = new At(e);
2113
+ }
2114
+ mt.prototype.evaluate = function(t, e, r) {
2115
+ this.context.expressionContextNode = t;
2116
+ var i = this.xpath.evaluate(this.context);
2117
+ return new I(i, e);
2118
+ }, At.prototype = {}, At.prototype.constructor = At, At.superclass = Object.prototype;
2119
+ function At(t) {
2120
+ this.xpathNSResolver = t;
2121
+ }
2122
+ At.prototype.getNamespace = function(t, e) {
2123
+ return this.xpathNSResolver == null ? null : this.xpathNSResolver.lookupNamespaceURI(t);
2124
+ }, Et.prototype = {}, Et.prototype.constructor = Et, Et.superclass = Object.prototype;
2125
+ function Et(t) {
2126
+ this.node = t, this.namespaceResolver = new M();
2127
+ }
2128
+ Et.prototype.lookupNamespaceURI = function(t) {
2129
+ return this.namespaceResolver.getNamespace(t, this.node);
2130
+ }, I.prototype = {}, I.prototype.constructor = I, I.superclass = Object.prototype;
2131
+ function I(t, e) {
2132
+ switch (e == I.ANY_TYPE && (t.constructor === D ? e = I.STRING_TYPE : t.constructor === h ? e = I.NUMBER_TYPE : t.constructor === A ? e = I.BOOLEAN_TYPE : t.constructor === u && (e = I.UNORDERED_NODE_ITERATOR_TYPE)), this.resultType = e, e) {
2133
+ case I.NUMBER_TYPE:
2134
+ this.numberValue = t.numberValue();
2135
+ return;
2136
+ case I.STRING_TYPE:
2137
+ this.stringValue = t.stringValue();
2138
+ return;
2139
+ case I.BOOLEAN_TYPE:
2140
+ this.booleanValue = t.booleanValue();
2141
+ return;
2142
+ case I.ANY_UNORDERED_NODE_TYPE:
2143
+ case I.FIRST_ORDERED_NODE_TYPE:
2144
+ if (t.constructor === u) {
2145
+ this.singleNodeValue = t.first();
2146
+ return;
2147
+ }
2148
+ break;
2149
+ case I.UNORDERED_NODE_ITERATOR_TYPE:
2150
+ case I.ORDERED_NODE_ITERATOR_TYPE:
2151
+ if (t.constructor === u) {
2152
+ this.invalidIteratorState = !1, this.nodes = t.toArray(), this.iteratorIndex = 0;
2153
+ return;
2154
+ }
2155
+ break;
2156
+ case I.UNORDERED_NODE_SNAPSHOT_TYPE:
2157
+ case I.ORDERED_NODE_SNAPSHOT_TYPE:
2158
+ if (t.constructor === u) {
2159
+ this.nodes = t.toArray(), this.snapshotLength = this.nodes.length;
2160
+ return;
2161
+ }
2162
+ break;
2163
+ }
2164
+ throw new j(j.TYPE_ERR);
2165
+ }
2166
+ I.prototype.iterateNext = function() {
2167
+ if (this.resultType != I.UNORDERED_NODE_ITERATOR_TYPE && this.resultType != I.ORDERED_NODE_ITERATOR_TYPE)
2168
+ throw new j(j.TYPE_ERR);
2169
+ return this.nodes[this.iteratorIndex++];
2170
+ }, I.prototype.snapshotItem = function(t) {
2171
+ if (this.resultType != I.UNORDERED_NODE_SNAPSHOT_TYPE && this.resultType != I.ORDERED_NODE_SNAPSHOT_TYPE)
2172
+ throw new j(j.TYPE_ERR);
2173
+ return this.nodes[t];
2174
+ }, I.ANY_TYPE = 0, I.NUMBER_TYPE = 1, I.STRING_TYPE = 2, I.BOOLEAN_TYPE = 3, I.UNORDERED_NODE_ITERATOR_TYPE = 4, I.ORDERED_NODE_ITERATOR_TYPE = 5, I.UNORDERED_NODE_SNAPSHOT_TYPE = 6, I.ORDERED_NODE_SNAPSHOT_TYPE = 7, I.ANY_UNORDERED_NODE_TYPE = 8, I.FIRST_ORDERED_NODE_TYPE = 9;
2175
+ function St(t, e) {
2176
+ t.createExpression = function(r, i) {
2177
+ try {
2178
+ return new mt(r, i, e);
2179
+ } catch (a) {
2180
+ throw new j(j.INVALID_EXPRESSION_ERR, a);
2181
+ }
2182
+ }, t.createNSResolver = function(r) {
2183
+ return new Et(r);
2184
+ }, t.evaluate = function(r, i, a, n, w) {
2185
+ if (n < 0 || n > 9)
2186
+ throw { code: 0, toString: function() {
2187
+ return "Request type not supported";
2188
+ } };
2189
+ return t.createExpression(r, a, e).evaluate(i, n, w);
2190
+ };
2191
+ }
2192
+ try {
2193
+ var Rt = !0;
2194
+ try {
2195
+ document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("XPath", null) && (Rt = !1);
2196
+ } catch {
2197
+ }
2198
+ Rt && St(document, new o());
2199
+ } catch {
2200
+ }
2201
+ St(L, new o()), (function() {
2202
+ var t = new o(), e = new M(), r = new T(), i = new S();
2203
+ function a(N) {
2204
+ return {
2205
+ getNamespace: function(V, lt) {
2206
+ var ct = N(V, lt);
2207
+ return ct || e.getNamespace(V, lt);
2208
+ }
2209
+ };
2210
+ }
2211
+ function n(N) {
2212
+ return a(N.getNamespace.bind(N));
2213
+ }
2214
+ function w(N) {
2215
+ return a(function(V) {
2216
+ return N[V];
2217
+ });
2218
+ }
2219
+ function q(N) {
2220
+ return N && typeof N.getNamespace == "function" ? n(N) : typeof N == "function" ? a(N) : typeof N == "object" ? w(N) : e;
2221
+ }
2222
+ function _(N) {
2223
+ if (N === null || typeof N > "u" || N instanceof D || N instanceof A || N instanceof h || N instanceof u)
2224
+ return N;
2225
+ switch (typeof N) {
2226
+ case "string":
2227
+ return new D(N);
2228
+ case "boolean":
2229
+ return new A(N);
2230
+ case "number":
2231
+ return new h(N);
2232
+ }
2233
+ var V = new u();
2234
+ return V.addArray([].concat(N)), V;
2235
+ }
2236
+ function s(N) {
2237
+ return function(V) {
2238
+ var lt = Array.prototype.slice.call(arguments, 1).map(function(Xt) {
2239
+ return Xt.evaluate(V);
2240
+ }), ct = N.apply(this, [].concat(V, lt));
2241
+ return _(ct);
2242
+ };
2243
+ }
2244
+ function k(N) {
2245
+ return {
2246
+ getFunction: function(V, lt) {
2247
+ var ct = N(V, lt);
2248
+ return ct ? s(ct) : r.getFunction(V, lt);
2249
+ }
2250
+ };
2251
+ }
2252
+ function tt(N) {
2253
+ return k(N.getFunction.bind(N));
2254
+ }
2255
+ function at(N) {
2256
+ return k(function(V) {
2257
+ return N[V];
2258
+ });
2259
+ }
2260
+ function et(N) {
2261
+ return N && typeof N.getFunction == "function" ? tt(N) : typeof N == "function" ? k(N) : typeof N == "object" ? at(N) : r;
2262
+ }
2263
+ function rt(N) {
2264
+ return {
2265
+ getVariable: function(V, lt) {
2266
+ var ct = N(V, lt);
2267
+ return _(ct);
2268
+ }
2269
+ };
2270
+ }
2271
+ function dt(N) {
2272
+ if (N) {
2273
+ if (typeof N.getVariable == "function")
2274
+ return rt(N.getVariable.bind(N));
2275
+ if (typeof N == "function")
2276
+ return rt(N);
2277
+ if (typeof N == "object")
2278
+ return rt(function(V) {
2279
+ return N[V];
2280
+ });
2281
+ }
2282
+ return i;
2283
+ }
2284
+ function H(N) {
2285
+ var V = new y();
2286
+ return N ? (V.namespaceResolver = q(N.namespaces), V.functionResolver = et(N.functions), V.variableResolver = dt(N.variables), V.expressionContextNode = N.node) : V.namespaceResolver = e, V;
2287
+ }
2288
+ function pt(N, V) {
2289
+ var lt = H(V);
2290
+ return N.evaluate(lt);
2291
+ }
2292
+ var Gt = {
2293
+ evaluate: function(N) {
2294
+ return pt(this.expression, N);
2295
+ },
2296
+ evaluateNumber: function(N) {
2297
+ return this.evaluate(N).numberValue();
2298
+ },
2299
+ evaluateString: function(N) {
2300
+ return this.evaluate(N).stringValue();
2301
+ },
2302
+ evaluateBoolean: function(N) {
2303
+ return this.evaluate(N).booleanValue();
2304
+ },
2305
+ evaluateNodeSet: function(N) {
2306
+ return this.evaluate(N).nodeset();
2307
+ },
2308
+ select: function(N) {
2309
+ return this.evaluateNodeSet(N).toArray();
2310
+ },
2311
+ select1: function(N) {
2312
+ return this.select(N)[0];
2313
+ }
2314
+ };
2315
+ function Yt(N) {
2316
+ var V = t.parse(N);
2317
+ return Object.create(Gt, {
2318
+ expression: {
2319
+ value: V
2320
+ }
2321
+ });
2322
+ }
2323
+ L.parse = Yt;
2324
+ })(), L.XPath = U, L.XPathParser = o, L.XPathResult = I, L.Step = v, L.NodeTest = B, L.BarOperation = nt, L.NamespaceResolver = M, L.FunctionResolver = T, L.VariableResolver = S, L.Utilities = p, L.XPathContext = y, L.XNodeSet = u, L.XBoolean = A, L.XString = D, L.XNumber = h, L.select = function(t, e, r) {
2325
+ return L.selectWithResolver(t, e, null, r);
2326
+ }, L.useNamespaces = function(t) {
2327
+ var e = {
2328
+ mappings: t || {},
2329
+ lookupNamespaceURI: function(r) {
2330
+ return this.mappings[r];
2331
+ }
2332
+ };
2333
+ return function(r, i, a) {
2334
+ return L.selectWithResolver(r, i, e, a);
2335
+ };
2336
+ }, L.selectWithResolver = function(t, e, r, i) {
2337
+ var a = new mt(t, r, new o()), n = I.ANY_TYPE, w = a.evaluate(e, n, null);
2338
+ return w.resultType == I.STRING_TYPE ? w = w.stringValue : w.resultType == I.NUMBER_TYPE ? w = w.numberValue : w.resultType == I.BOOLEAN_TYPE ? w = w.booleanValue : (w = w.nodes, i && (w = w[0])), w;
2339
+ }, L.select1 = function(t, e) {
2340
+ return L.select(t, e, !0);
2341
+ };
2342
+ })(Y);
2343
+ })(Dt)), Dt;
2344
+ }
2345
+ var Ft = {}, yt, Ut;
2346
+ function te() {
2347
+ if (Ut) return yt;
2348
+ Ut = 1;
2349
+ var W = /[|\\{}()[\]^$+*?.]/g;
2350
+ return yt = function(Y) {
2351
+ if (typeof Y != "string")
2352
+ throw new TypeError("Expected a string");
2353
+ return Y.replace(W, "\\$&");
2354
+ }, yt;
2355
+ }
2356
+ var Vt;
2357
+ function ee() {
2358
+ if (Vt) return Ft;
2359
+ Vt = 1;
2360
+ let W = te(), Y = [
2361
+ "¨",
2362
+ "!",
2363
+ '"',
2364
+ "#",
2365
+ "&",
2366
+ "(",
2367
+ ")",
2368
+ "+",
2369
+ ",",
2370
+ "-",
2371
+ ".",
2372
+ "/",
2373
+ ":",
2374
+ ";",
2375
+ "<",
2376
+ "=",
2377
+ ">",
2378
+ "?",
2379
+ "@",
2380
+ "[",
2381
+ "\\",
2382
+ "]",
2383
+ "^",
2384
+ "_",
2385
+ "`",
2386
+ "{",
2387
+ "|",
2388
+ "}",
2389
+ "~",
2390
+ "¡",
2391
+ "¦",
2392
+ "¬",
2393
+ "¯",
2394
+ "°",
2395
+ "±",
2396
+ "²",
2397
+ "³",
2398
+ "´",
2399
+ "·",
2400
+ "¹",
2401
+ "¿",
2402
+ "×",
2403
+ "~",
2404
+ "÷",
2405
+ "ˇ",
2406
+ "˘",
2407
+ "˙",
2408
+ "˜",
2409
+ "˝",
2410
+ "̀",
2411
+ "́",
2412
+ "̂",
2413
+ "̃",
2414
+ "̄",
2415
+ "̅",
2416
+ "̆",
2417
+ "̇",
2418
+ "̈",
2419
+ "̉",
2420
+ "̊",
2421
+ "̋",
2422
+ "̌",
2423
+ "̍",
2424
+ "̎",
2425
+ "̏",
2426
+ "̐",
2427
+ "̑",
2428
+ "̒",
2429
+ "̓",
2430
+ "̔",
2431
+ "̕",
2432
+ "̖",
2433
+ "̗",
2434
+ "̘",
2435
+ "̙",
2436
+ "̚",
2437
+ "̛",
2438
+ "̜",
2439
+ "̝",
2440
+ "̞",
2441
+ "̟",
2442
+ "̠",
2443
+ "̡",
2444
+ "̢",
2445
+ "̣",
2446
+ "̤",
2447
+ "̥",
2448
+ "̦",
2449
+ "̧",
2450
+ "̨",
2451
+ "̩",
2452
+ "̪",
2453
+ "̫",
2454
+ "̬",
2455
+ "̭",
2456
+ "̮",
2457
+ "̯",
2458
+ "̰",
2459
+ "̱",
2460
+ "̲",
2461
+ "̳",
2462
+ "̴",
2463
+ "̵",
2464
+ "̶",
2465
+ "̷",
2466
+ "̸",
2467
+ "̿",
2468
+ " ",
2469
+ " ",
2470
+ " ",
2471
+ " ",
2472
+ " ",
2473
+ " ",
2474
+ " ",
2475
+ " ",
2476
+ " ",
2477
+ "‐",
2478
+ "‒",
2479
+ "–",
2480
+ "—",
2481
+ "‖",
2482
+ "†",
2483
+ "‡",
2484
+ "•",
2485
+ "․",
2486
+ "‥",
2487
+ "…",
2488
+ "′",
2489
+ "″",
2490
+ "‴",
2491
+ "‼",
2492
+ "⁀",
2493
+ "⁄",
2494
+ "⁎",
2495
+ "⁏",
2496
+ "⁐",
2497
+ "⁗",
2498
+ "⁡",
2499
+ "⁢",
2500
+ "⁣",
2501
+ "⁰",
2502
+ "⁴",
2503
+ "⁵",
2504
+ "⁶",
2505
+ "⁷",
2506
+ "⁸",
2507
+ "⁹",
2508
+ "⁺",
2509
+ "⁻",
2510
+ "⁼",
2511
+ "⁽",
2512
+ "⁾",
2513
+ "₀",
2514
+ "₁",
2515
+ "₂",
2516
+ "₃",
2517
+ "₄",
2518
+ "₅",
2519
+ "₆",
2520
+ "₇",
2521
+ "₈",
2522
+ "₉",
2523
+ "₊",
2524
+ "₋",
2525
+ "₌",
2526
+ "₍",
2527
+ "₎",
2528
+ "⃐",
2529
+ "⃑",
2530
+ "⃒",
2531
+ "⃓",
2532
+ "⃔",
2533
+ "⃕",
2534
+ "⃖",
2535
+ "⃗",
2536
+ "⃘",
2537
+ "⃙",
2538
+ "⃚",
2539
+ "⃛",
2540
+ "⃜",
2541
+ "⃝",
2542
+ "⃞",
2543
+ "⃟",
2544
+ "⃠",
2545
+ "⃡",
2546
+ "⃤",
2547
+ "⃥",
2548
+ "⃦",
2549
+ "⃧",
2550
+ "⃨",
2551
+ "⃩",
2552
+ "⃪",
2553
+ "⅀",
2554
+ "ⅆ",
2555
+ "←",
2556
+ "↑",
2557
+ "→",
2558
+ "↓",
2559
+ "↔",
2560
+ "↕",
2561
+ "↖",
2562
+ "↗",
2563
+ "↘",
2564
+ "↙",
2565
+ "↚",
2566
+ "↛",
2567
+ "↜",
2568
+ "↝",
2569
+ "↞",
2570
+ "↟",
2571
+ "↠",
2572
+ "↡",
2573
+ "↢",
2574
+ "↣",
2575
+ "↤",
2576
+ "↥",
2577
+ "↦",
2578
+ "↧",
2579
+ "↨",
2580
+ "↩",
2581
+ "↪",
2582
+ "↫",
2583
+ "↬",
2584
+ "↭",
2585
+ "↮",
2586
+ "↯",
2587
+ "↰",
2588
+ "↱",
2589
+ "↲",
2590
+ "↳",
2591
+ "↶",
2592
+ "↷",
2593
+ "↺",
2594
+ "↻",
2595
+ "↼",
2596
+ "↽",
2597
+ "↾",
2598
+ "↿",
2599
+ "⇀",
2600
+ "⇁",
2601
+ "⇂",
2602
+ "⇃",
2603
+ "⇄",
2604
+ "⇅",
2605
+ "⇆",
2606
+ "⇇",
2607
+ "⇈",
2608
+ "⇉",
2609
+ "⇊",
2610
+ "⇋",
2611
+ "⇌",
2612
+ "⇍",
2613
+ "⇎",
2614
+ "⇏",
2615
+ "⇐",
2616
+ "⇑",
2617
+ "⇒",
2618
+ "⇓",
2619
+ "⇔",
2620
+ "⇕",
2621
+ "⇖",
2622
+ "⇗",
2623
+ "⇘",
2624
+ "⇙",
2625
+ "⇚",
2626
+ "⇛",
2627
+ "⇜",
2628
+ "⇝",
2629
+ "⇞",
2630
+ "⇟",
2631
+ "⇠",
2632
+ "⇡",
2633
+ "⇢",
2634
+ "⇣",
2635
+ "⇤",
2636
+ "⇥",
2637
+ "⇦",
2638
+ "⇧",
2639
+ "⇨",
2640
+ "⇩",
2641
+ "⇳",
2642
+ "⇴",
2643
+ "⇵",
2644
+ "⇶",
2645
+ "⇷",
2646
+ "⇸",
2647
+ "⇹",
2648
+ "⇺",
2649
+ "⇻",
2650
+ "⇼",
2651
+ "⇽",
2652
+ "⇾",
2653
+ "⇿",
2654
+ "∀",
2655
+ "∁",
2656
+ "∂",
2657
+ "∃",
2658
+ "∄",
2659
+ "∆",
2660
+ "∇",
2661
+ "∈",
2662
+ "∉",
2663
+ "∊",
2664
+ "∋",
2665
+ "∌",
2666
+ "∍",
2667
+ "∏",
2668
+ "∐",
2669
+ "∑",
2670
+ "−",
2671
+ "∓",
2672
+ "∔",
2673
+ "∕",
2674
+ "∖",
2675
+ "∗",
2676
+ "∘",
2677
+ "∙",
2678
+ "√",
2679
+ "∛",
2680
+ "∜",
2681
+ "∝",
2682
+ "∣",
2683
+ "∤",
2684
+ "∥",
2685
+ "∦",
2686
+ "∧",
2687
+ "∨",
2688
+ "∩",
2689
+ "∪",
2690
+ "∫",
2691
+ "∬",
2692
+ "∭",
2693
+ "∮",
2694
+ "∯",
2695
+ "∰",
2696
+ "∱",
2697
+ "∲",
2698
+ "∳",
2699
+ "∴",
2700
+ "∵",
2701
+ "∶",
2702
+ "∷",
2703
+ "∸",
2704
+ "∹",
2705
+ "∺",
2706
+ "∻",
2707
+ "∼",
2708
+ "∽",
2709
+ "∾",
2710
+ "≀",
2711
+ "≁",
2712
+ "≂",
2713
+ "≃",
2714
+ "≄",
2715
+ "≅",
2716
+ "≆",
2717
+ "≇",
2718
+ "≈",
2719
+ "≉",
2720
+ "≊",
2721
+ "≋",
2722
+ "≌",
2723
+ "≍",
2724
+ "≎",
2725
+ "≏",
2726
+ "≐",
2727
+ "≑",
2728
+ "≒",
2729
+ "≓",
2730
+ "≔",
2731
+ "≕",
2732
+ "≖",
2733
+ "≗",
2734
+ "≘",
2735
+ "≙",
2736
+ "≚",
2737
+ "≛",
2738
+ "≜",
2739
+ "≝",
2740
+ "≞",
2741
+ "≟",
2742
+ "≠",
2743
+ "≡",
2744
+ "≢",
2745
+ "≣",
2746
+ "≤",
2747
+ "≥",
2748
+ "≦",
2749
+ "≧",
2750
+ "≨",
2751
+ "≩",
2752
+ "≪",
2753
+ "≫",
2754
+ "≬",
2755
+ "≭",
2756
+ "≮",
2757
+ "≯",
2758
+ "≰",
2759
+ "≱",
2760
+ "≲",
2761
+ "≳",
2762
+ "≴",
2763
+ "≵",
2764
+ "≶",
2765
+ "≷",
2766
+ "≸",
2767
+ "≹",
2768
+ "≺",
2769
+ "≻",
2770
+ "≼",
2771
+ "≽",
2772
+ "≾",
2773
+ "≿",
2774
+ "⊀",
2775
+ "⊁",
2776
+ "⊂",
2777
+ "⊃",
2778
+ "⊄",
2779
+ "⊅",
2780
+ "⊆",
2781
+ "⊇",
2782
+ "⊈",
2783
+ "⊉",
2784
+ "⊊",
2785
+ "⊋",
2786
+ "⊌",
2787
+ "⊍",
2788
+ "⊎",
2789
+ "⊏",
2790
+ "⊐",
2791
+ "⊑",
2792
+ "⊒",
2793
+ "⊓",
2794
+ "⊔",
2795
+ "⊕",
2796
+ "⊖",
2797
+ "⊗",
2798
+ "⊘",
2799
+ "⊙",
2800
+ "⊚",
2801
+ "⊛",
2802
+ "⊜",
2803
+ "⊝",
2804
+ "⊞",
2805
+ "⊟",
2806
+ "⊠",
2807
+ "⊡",
2808
+ "⊢",
2809
+ "⊣",
2810
+ "⊥",
2811
+ "⊦",
2812
+ "⊧",
2813
+ "⊨",
2814
+ "⊩",
2815
+ "⊪",
2816
+ "⊫",
2817
+ "⊬",
2818
+ "⊭",
2819
+ "⊮",
2820
+ "⊯",
2821
+ "⊰",
2822
+ "⊱",
2823
+ "⊲",
2824
+ "⊳",
2825
+ "⊴",
2826
+ "⊵",
2827
+ "⊶",
2828
+ "⊷",
2829
+ "⊸",
2830
+ "⊹",
2831
+ "⊺",
2832
+ "⊻",
2833
+ "⊼",
2834
+ "⊽",
2835
+ "⋀",
2836
+ "⋁",
2837
+ "⋂",
2838
+ "⋃",
2839
+ "⋄",
2840
+ "⋅",
2841
+ "⋆",
2842
+ "⋇",
2843
+ "⋈",
2844
+ "⋉",
2845
+ "⋊",
2846
+ "⋋",
2847
+ "⋌",
2848
+ "⋍",
2849
+ "⋎",
2850
+ "⋏",
2851
+ "⋐",
2852
+ "⋑",
2853
+ "⋒",
2854
+ "⋓",
2855
+ "⋔",
2856
+ "⋕",
2857
+ "⋖",
2858
+ "⋗",
2859
+ "⋘",
2860
+ "⋙",
2861
+ "⋚",
2862
+ "⋛",
2863
+ "⋜",
2864
+ "⋝",
2865
+ "⋞",
2866
+ "⋟",
2867
+ "⋠",
2868
+ "⋡",
2869
+ "⋢",
2870
+ "⋣",
2871
+ "⋤",
2872
+ "⋥",
2873
+ "⋦",
2874
+ "⋧",
2875
+ "⋨",
2876
+ "⋩",
2877
+ "⋪",
2878
+ "⋫",
2879
+ "⋬",
2880
+ "⋭",
2881
+ "⋮",
2882
+ "⋯",
2883
+ "⋰",
2884
+ "⋱",
2885
+ "⋲",
2886
+ "⋳",
2887
+ "⋴",
2888
+ "⋵",
2889
+ "⋶",
2890
+ "⋷",
2891
+ "⋸",
2892
+ "⋹",
2893
+ "⋺",
2894
+ "⋻",
2895
+ "⋼",
2896
+ "⋽",
2897
+ "⋾",
2898
+ "⋿",
2899
+ "⌅",
2900
+ "⌆",
2901
+ "⌈",
2902
+ "⌉",
2903
+ "⌊",
2904
+ "⌋",
2905
+ "⌜",
2906
+ "⌝",
2907
+ "⌞",
2908
+ "⌟",
2909
+ "⌢",
2910
+ "⌣",
2911
+ "〈",
2912
+ "〉",
2913
+ "⌽",
2914
+ "⌿",
2915
+ "⎰",
2916
+ "⎱",
2917
+ "⏜",
2918
+ "⏝",
2919
+ "⏞",
2920
+ "⏟",
2921
+ "⏠",
2922
+ "│",
2923
+ "├",
2924
+ "┤",
2925
+ "┬",
2926
+ "┴",
2927
+ "▁",
2928
+ "█",
2929
+ "▒",
2930
+ "■",
2931
+ "□",
2932
+ "▭",
2933
+ "▲",
2934
+ "△",
2935
+ "▴",
2936
+ "▵",
2937
+ "▶",
2938
+ "▷",
2939
+ "▸",
2940
+ "▹",
2941
+ "▼",
2942
+ "▽",
2943
+ "▾",
2944
+ "▿",
2945
+ "◀",
2946
+ "◁",
2947
+ "◂",
2948
+ "◃",
2949
+ "◄",
2950
+ "◅",
2951
+ "◊",
2952
+ "○",
2953
+ "◦",
2954
+ "◫",
2955
+ "◬",
2956
+ "◸",
2957
+ "◹",
2958
+ "◺",
2959
+ "◻",
2960
+ "◼",
2961
+ "◽",
2962
+ "◾",
2963
+ "◿",
2964
+ "★",
2965
+ "☆",
2966
+ "❲",
2967
+ "❳",
2968
+ "⟑",
2969
+ "⟒",
2970
+ "⟓",
2971
+ "⟔",
2972
+ "⟕",
2973
+ "⟖",
2974
+ "⟗",
2975
+ "⟘",
2976
+ "⟙",
2977
+ "⟚",
2978
+ "⟛",
2979
+ "⟜",
2980
+ "⟝",
2981
+ "⟞",
2982
+ "⟟",
2983
+ "⟠",
2984
+ "⟡",
2985
+ "⟢",
2986
+ "⟣",
2987
+ "⟤",
2988
+ "⟥",
2989
+ "⟦",
2990
+ "⟧",
2991
+ "⟨",
2992
+ "⟩",
2993
+ "⟪",
2994
+ "⟫",
2995
+ "⟰",
2996
+ "⟱",
2997
+ "⟲",
2998
+ "⟳",
2999
+ "⟴",
3000
+ "⟵",
3001
+ "⟶",
3002
+ "⟷",
3003
+ "⟸",
3004
+ "⟹",
3005
+ "⟺",
3006
+ "⟻",
3007
+ "⟼",
3008
+ "⟽",
3009
+ "⟾",
3010
+ "⟿",
3011
+ "⤀",
3012
+ "⤁",
3013
+ "⤂",
3014
+ "⤃",
3015
+ "⤄",
3016
+ "⤅",
3017
+ "⤆",
3018
+ "⤇",
3019
+ "⤈",
3020
+ "⤉",
3021
+ "⤊",
3022
+ "⤋",
3023
+ "⤌",
3024
+ "⤍",
3025
+ "⤎",
3026
+ "⤏",
3027
+ "⤐",
3028
+ "⤑",
3029
+ "⤒",
3030
+ "⤓",
3031
+ "⤔",
3032
+ "⤕",
3033
+ "⤖",
3034
+ "⤗",
3035
+ "⤘",
3036
+ "⤙",
3037
+ "⤚",
3038
+ "⤛",
3039
+ "⤜",
3040
+ "⤝",
3041
+ "⤞",
3042
+ "⤟",
3043
+ "⤠",
3044
+ "⤡",
3045
+ "⤢",
3046
+ "⤣",
3047
+ "⤤",
3048
+ "⤥",
3049
+ "⤦",
3050
+ "⤧",
3051
+ "⤨",
3052
+ "⤩",
3053
+ "⤪",
3054
+ "⤫",
3055
+ "⤬",
3056
+ "⤭",
3057
+ "⤮",
3058
+ "⤯",
3059
+ "⤰",
3060
+ "⤱",
3061
+ "⤲",
3062
+ "⤳",
3063
+ "⤴",
3064
+ "⤵",
3065
+ "⤶",
3066
+ "⤷",
3067
+ "⤸",
3068
+ "⤹",
3069
+ "⤺",
3070
+ "⤻",
3071
+ "⤼",
3072
+ "⤽",
3073
+ "⤾",
3074
+ "⤿",
3075
+ "⥀",
3076
+ "⥁",
3077
+ "⥂",
3078
+ "⥃",
3079
+ "⥄",
3080
+ "⥅",
3081
+ "⥆",
3082
+ "⥇",
3083
+ "⥈",
3084
+ "⥉",
3085
+ "⥊",
3086
+ "⥋",
3087
+ "⥌",
3088
+ "⥍",
3089
+ "⥎",
3090
+ "⥏",
3091
+ "⥐",
3092
+ "⥑",
3093
+ "⥒",
3094
+ "⥓",
3095
+ "⥔",
3096
+ "⥕",
3097
+ "⥖",
3098
+ "⥗",
3099
+ "⥘",
3100
+ "⥙",
3101
+ "⥚",
3102
+ "⥛",
3103
+ "⥜",
3104
+ "⥝",
3105
+ "⥞",
3106
+ "⥟",
3107
+ "⥠",
3108
+ "⥡",
3109
+ "⥢",
3110
+ "⥣",
3111
+ "⥤",
3112
+ "⥥",
3113
+ "⥦",
3114
+ "⥧",
3115
+ "⥨",
3116
+ "⥩",
3117
+ "⥪",
3118
+ "⥫",
3119
+ "⥬",
3120
+ "⥭",
3121
+ "⥮",
3122
+ "⥯",
3123
+ "⥰",
3124
+ "⥱",
3125
+ "⥲",
3126
+ "⥳",
3127
+ "⥴",
3128
+ "⥵",
3129
+ "⥶",
3130
+ "⥷",
3131
+ "⥸",
3132
+ "⥹",
3133
+ "⥺",
3134
+ "⥻",
3135
+ "⥼",
3136
+ "⥽",
3137
+ "⥾",
3138
+ "⥿",
3139
+ "⦀",
3140
+ "⦂",
3141
+ "⦃",
3142
+ "⦄",
3143
+ "⦅",
3144
+ "⦆",
3145
+ "⦇",
3146
+ "⦈",
3147
+ "⦉",
3148
+ "⦊",
3149
+ "⦋",
3150
+ "⦌",
3151
+ "⦍",
3152
+ "⦎",
3153
+ "⦏",
3154
+ "⦐",
3155
+ "⦑",
3156
+ "⦒",
3157
+ "⦓",
3158
+ "⦔",
3159
+ "⦕",
3160
+ "⦖",
3161
+ "⦗",
3162
+ "⦘",
3163
+ "⦙",
3164
+ "⦚",
3165
+ "⦶",
3166
+ "⦷",
3167
+ "⦸",
3168
+ "⦹",
3169
+ "⧀",
3170
+ "⧁",
3171
+ "⧄",
3172
+ "⧅",
3173
+ "⧆",
3174
+ "⧇",
3175
+ "⧈",
3176
+ "⧎",
3177
+ "⧏",
3178
+ "⧐",
3179
+ "⧑",
3180
+ "⧒",
3181
+ "⧓",
3182
+ "⧔",
3183
+ "⧕",
3184
+ "⧖",
3185
+ "⧗",
3186
+ "⧘",
3187
+ "⧙",
3188
+ "⧚",
3189
+ "⧛",
3190
+ "⧟",
3191
+ "⧡",
3192
+ "⧢",
3193
+ "⧣",
3194
+ "⧤",
3195
+ "⧥",
3196
+ "⧦",
3197
+ "⧫",
3198
+ "⧴",
3199
+ "⧵",
3200
+ "⧶",
3201
+ "⧷",
3202
+ "⧸",
3203
+ "⧹",
3204
+ "⧺",
3205
+ "⧻",
3206
+ "⧼",
3207
+ "⧽",
3208
+ "⧾",
3209
+ "⧿",
3210
+ "⨀",
3211
+ "⨁",
3212
+ "⨂",
3213
+ "⨃",
3214
+ "⨄",
3215
+ "⨅",
3216
+ "⨆",
3217
+ "⨇",
3218
+ "⨈",
3219
+ "⨉",
3220
+ "⨊",
3221
+ "⨋",
3222
+ "⨌",
3223
+ "⨍",
3224
+ "⨎",
3225
+ "⨏",
3226
+ "⨐",
3227
+ "⨑",
3228
+ "⨒",
3229
+ "⨓",
3230
+ "⨔",
3231
+ "⨕",
3232
+ "⨖",
3233
+ "⨗",
3234
+ "⨘",
3235
+ "⨙",
3236
+ "⨚",
3237
+ "⨛",
3238
+ "⨜",
3239
+ "⨝",
3240
+ "⨞",
3241
+ "⨟",
3242
+ "⨠",
3243
+ "⨡",
3244
+ "⨢",
3245
+ "⨣",
3246
+ "⨤",
3247
+ "⨥",
3248
+ "⨦",
3249
+ "⨧",
3250
+ "⨨",
3251
+ "⨩",
3252
+ "⨪",
3253
+ "⨫",
3254
+ "⨬",
3255
+ "⨭",
3256
+ "⨮",
3257
+ "⨯",
3258
+ "⨰",
3259
+ "⨱",
3260
+ "⨲",
3261
+ "⨳",
3262
+ "⨴",
3263
+ "⨵",
3264
+ "⨶",
3265
+ "⨷",
3266
+ "⨸",
3267
+ "⨹",
3268
+ "⨺",
3269
+ "⨻",
3270
+ "⨼",
3271
+ "⨽",
3272
+ "⨾",
3273
+ "⨿",
3274
+ "⩀",
3275
+ "⩁",
3276
+ "⩂",
3277
+ "⩃",
3278
+ "⩄",
3279
+ "⩅",
3280
+ "⩆",
3281
+ "⩇",
3282
+ "⩈",
3283
+ "⩉",
3284
+ "⩊",
3285
+ "⩋",
3286
+ "⩌",
3287
+ "⩍",
3288
+ "⩎",
3289
+ "⩏",
3290
+ "⩐",
3291
+ "⩑",
3292
+ "⩒",
3293
+ "⩓",
3294
+ "⩔",
3295
+ "⩕",
3296
+ "⩖",
3297
+ "⩗",
3298
+ "⩘",
3299
+ "⩙",
3300
+ "⩚",
3301
+ "⩛",
3302
+ "⩜",
3303
+ "⩝",
3304
+ "⩞",
3305
+ "⩟",
3306
+ "⩠",
3307
+ "⩡",
3308
+ "⩢",
3309
+ "⩣",
3310
+ "⩤",
3311
+ "⩥",
3312
+ "⩦",
3313
+ "⩧",
3314
+ "⩨",
3315
+ "⩩",
3316
+ "⩪",
3317
+ "⩫",
3318
+ "⩬",
3319
+ "⩭",
3320
+ "⩮",
3321
+ "⩯",
3322
+ "⩰",
3323
+ "⩱",
3324
+ "⩲",
3325
+ "⩳",
3326
+ "⩴",
3327
+ "⩵",
3328
+ "⩶",
3329
+ "⩷",
3330
+ "⩸",
3331
+ "⩹",
3332
+ "⩺",
3333
+ "⩻",
3334
+ "⩼",
3335
+ "⩽",
3336
+ "⩾",
3337
+ "⩿",
3338
+ "⪀",
3339
+ "⪁",
3340
+ "⪂",
3341
+ "⪃",
3342
+ "⪄",
3343
+ "⪅",
3344
+ "⪆",
3345
+ "⪇",
3346
+ "⪈",
3347
+ "⪉",
3348
+ "⪊",
3349
+ "⪋",
3350
+ "⪌",
3351
+ "⪍",
3352
+ "⪎",
3353
+ "⪏",
3354
+ "⪐",
3355
+ "⪑",
3356
+ "⪒",
3357
+ "⪓",
3358
+ "⪔",
3359
+ "⪕",
3360
+ "⪖",
3361
+ "⪗",
3362
+ "⪘",
3363
+ "⪙",
3364
+ "⪚",
3365
+ "⪛",
3366
+ "⪜",
3367
+ "⪝",
3368
+ "⪞",
3369
+ "⪟",
3370
+ "⪠",
3371
+ "⪡",
3372
+ "⪢",
3373
+ "⪣",
3374
+ "⪤",
3375
+ "⪥",
3376
+ "⪦",
3377
+ "⪧",
3378
+ "⪨",
3379
+ "⪩",
3380
+ "⪪",
3381
+ "⪫",
3382
+ "⪬",
3383
+ "⪭",
3384
+ "⪮",
3385
+ "⪯",
3386
+ "⪰",
3387
+ "⪱",
3388
+ "⪲",
3389
+ "⪳",
3390
+ "⪴",
3391
+ "⪵",
3392
+ "⪶",
3393
+ "⪷",
3394
+ "⪸",
3395
+ "⪹",
3396
+ "⪺",
3397
+ "⪻",
3398
+ "⪼",
3399
+ "⪽",
3400
+ "⪾",
3401
+ "⪿",
3402
+ "⫀",
3403
+ "⫁",
3404
+ "⫂",
3405
+ "⫃",
3406
+ "⫄",
3407
+ "⫅",
3408
+ "⫆",
3409
+ "⫇",
3410
+ "⫈",
3411
+ "⫉",
3412
+ "⫊",
3413
+ "⫋",
3414
+ "⫌",
3415
+ "⫍",
3416
+ "⫎",
3417
+ "⫏",
3418
+ "⫐",
3419
+ "⫑",
3420
+ "⫒",
3421
+ "⫓",
3422
+ "⫔",
3423
+ "⫕",
3424
+ "⫖",
3425
+ "⫗",
3426
+ "⫘",
3427
+ "⫙",
3428
+ "⫚",
3429
+ "⫛",
3430
+ "⫝̸",
3431
+ "⫝",
3432
+ "⫞",
3433
+ "⫟",
3434
+ "⫠",
3435
+ "⫢",
3436
+ "⫣",
3437
+ "⫤",
3438
+ "⫥",
3439
+ "⫦",
3440
+ "⫧",
3441
+ "⫨",
3442
+ "⫩",
3443
+ "⫪",
3444
+ "⫫",
3445
+ "⫬",
3446
+ "⫭",
3447
+ "⫮",
3448
+ "⫯",
3449
+ "⫰",
3450
+ "⫲",
3451
+ "⫳",
3452
+ "⫴",
3453
+ "⫵",
3454
+ "⫶",
3455
+ "⫷",
3456
+ "⫸",
3457
+ "⫹",
3458
+ "⫺",
3459
+ "⫻",
3460
+ "⫼",
3461
+ "⫽",
3462
+ "⫾",
3463
+ "⫿",
3464
+ "⬄",
3465
+ "⬆",
3466
+ "⬇",
3467
+ "⬌",
3468
+ "⬍",
3469
+ "〔",
3470
+ "〕",
3471
+ "〖",
3472
+ "〗",
3473
+ "〘",
3474
+ "〙",
3475
+ "!",
3476
+ "&",
3477
+ "(",
3478
+ ")",
3479
+ "+",
3480
+ ",",
3481
+ "-",
3482
+ ".",
3483
+ "/",
3484
+ ":",
3485
+ ";",
3486
+ "<",
3487
+ "=",
3488
+ ">",
3489
+ "?",
3490
+ "@",
3491
+ "[",
3492
+ "\",
3493
+ "]",
3494
+ "^",
3495
+ "_",
3496
+ "{",
3497
+ "|",
3498
+ "}"
3499
+ ];
3500
+ return Ft.oprx = new RegExp(Y.map((L) => W(L)).join("|")), Ft;
3501
+ }
3502
+ var Tt, qt;
3503
+ function re() {
3504
+ if (qt) return Tt;
3505
+ qt = 1;
3506
+ let W = Jt(), Y = Kt(), L = Bt(), o = zt(), U = Zt(), P = $t(), { oprx: O } = ee(), R = "http://www.w3.org/1998/Math/MathML", x = {
3507
+ m: "http://schemas.openxmlformats.org/officeDocument/2006/math"
3508
+ }, d = P.useNamespaces(x), b = (h, F, g, A = !1) => {
3509
+ let l = d(h, g)[0];
3510
+ if (!l) return A ? void 0 : "";
3511
+ let E = L(F, x);
3512
+ return E.ns ? l.getAttributeNS(E.ns, E.ln) : l.getAttribute(E.qn);
3513
+ }, c;
3514
+ Tt = function(F) {
3515
+ let g = new o(x);
3516
+ return new W().match(g.document(), D).match(
3517
+ g.el("m:oMathPara"),
3518
+ (l, E, u) => {
3519
+ D(l, E, u), u.res.setAttribute("display", "block"), u.walk(E);
3520
+ }
3521
+ ).match(
3522
+ g.el("m:oMath"),
3523
+ (l, E, u) => {
3524
+ D(l, E, u);
3525
+ let m = l.parentNode;
3526
+ m && m.namespaceURI === x.m && m.localName === "oMathPara" && u.res.setAttribute("display", "block"), u.walk(E);
3527
+ }
3528
+ ).match(
3529
+ g.el("m:f"),
3530
+ (l, E, u) => {
3531
+ let m = (b("./m:fPr[last()]/m:type", "m:val", l) || "").toLowerCase(), f = m === "lin" ? c("mrow", {}, E) : c("mfrac", st(m), E), y = c("mrow", {}, f);
3532
+ if (u.walk(y, d("m:num[1]", l)), m === "lin") {
3533
+ let T = c("mo", {}, f);
3534
+ T.textContent = "/";
3535
+ }
3536
+ let S = c("mrow", {}, f);
3537
+ u.walk(S, d("m:den[1]", l));
3538
+ }
3539
+ ).match(
3540
+ g.el("m:r"),
3541
+ (l, E) => {
3542
+ let u = b("m:rPr[last()]/m:nor", "m:val", l) || !1;
3543
+ if (u && (u = G(u)), u) {
3544
+ let m = c("mtext", {}, E);
3545
+ m.textContent = Z(d(".//m:t", l).map((f) => f.textContent).join(""));
3546
+ } else
3547
+ d(".//m:t", l).forEach((m) => {
3548
+ K(l, E, {
3549
+ toParse: d("./text()", m).map((f) => f.data).join(""),
3550
+ scr: b("../m:rPr[last()]/m:scr", "m:val", m),
3551
+ sty: b("../m:rPr[last()]/m:sty", "m:val", m),
3552
+ nor: !1
3553
+ });
3554
+ });
3555
+ }
3556
+ ).match(
3557
+ g.el("m:limLow"),
3558
+ (l, E, u) => {
3559
+ let m = c("munder", {}, E), f = c("mrow", {}, m), y = c("mrow", {}, m);
3560
+ u.walk(f, d("m:e[1]", l)), u.walk(y, d("m:lim[1]", l));
3561
+ }
3562
+ ).match(
3563
+ g.el("m:limUpp"),
3564
+ (l, E, u) => {
3565
+ let m = c("mover", {}, E), f = c("mrow", {}, m), y = c("mrow", {}, m);
3566
+ u.walk(f, d("m:e[1]", l)), u.walk(y, d("m:lim[1]", l));
3567
+ }
3568
+ ).match(
3569
+ g.el("m:sSub"),
3570
+ (l, E, u) => {
3571
+ let m = c("msub", {}, E), f = c("mrow", {}, m), y = c("mrow", {}, m);
3572
+ u.walk(f, d("m:e[1]", l)), u.walk(y, d("m:sub[1]", l));
3573
+ }
3574
+ ).match(
3575
+ g.el("m:sSup"),
3576
+ (l, E, u) => {
3577
+ let m = c("msup", {}, E), f = c("mrow", {}, m), y = c("mrow", {}, m);
3578
+ u.walk(f, d("m:e[1]", l)), u.walk(y, d("m:sup[1]", l));
3579
+ }
3580
+ ).match(
3581
+ g.el("m:sSubSup"),
3582
+ (l, E, u) => {
3583
+ let m = c("msubsup", {}, E), f = c("mrow", {}, m), y = c("mrow", {}, m), S = c("mrow", {}, m);
3584
+ u.walk(f, d("m:e[1]", l)), u.walk(y, d("m:sub[1]", l)), u.walk(S, d("m:sup[1]", l));
3585
+ }
3586
+ ).match(
3587
+ g.el("m:sPre"),
3588
+ (l, E, u) => {
3589
+ let m = c("mmultiscripts", {}, E), f = c("mrow", {}, m);
3590
+ u.walk(f, d("m:e[1]", l)), c("mprescripts", {}, m), nt(u, m, d("m:sub[1]", l)), nt(u, m, d("m:sup[1]", l));
3591
+ }
3592
+ ).match(
3593
+ g.el("m:m"),
3594
+ (l, E, u) => {
3595
+ let m = b("m:mPr[last()]/m:mcs/m:mc/m:mcPr[last()]/m:mcJc", "m:val", l).toLowerCase(), f = c("mtable", m && m !== "center" ? { columnalign: m } : {}, E);
3596
+ d("m:mr", l).forEach((y) => {
3597
+ let S = c("mtr", {}, f);
3598
+ d("m:e", y).forEach((T) => {
3599
+ let M = c("mtd", {}, S);
3600
+ u.walk(M, T);
3601
+ });
3602
+ });
3603
+ }
3604
+ ).match(
3605
+ g.el("m:rad"),
3606
+ (l, E, u) => {
3607
+ let m = b("m:radPr[last()]/m:degHide", "m:val", l) || !1;
3608
+ if (m && (m = G(m)), m) {
3609
+ let f = c("msqrt", {}, E);
3610
+ u.walk(f, d("m:e[1]", l));
3611
+ } else {
3612
+ let f = c("mroot", {}, E), y = c("mrow", {}, f), S = c("mrow", {}, f);
3613
+ u.walk(y, d("m:e[1]", l)), u.walk(S, d("m:deg[1]", l));
3614
+ }
3615
+ }
3616
+ ).match(
3617
+ g.el("m:nary"),
3618
+ (l, E, u) => {
3619
+ let m = b("m:naryPr[last()]/m:subHide", "m:val", l) || !1;
3620
+ m && (m = G(m));
3621
+ let f = b("m:naryPr[last()]/m:supHide", "m:val", l) || !1;
3622
+ f && (f = G(f));
3623
+ let y = b("m:naryPr[last()]/m:limLoc", "m:val", l).toLowerCase();
3624
+ y = y === "" || y === "subsup";
3625
+ let S = b("m:naryPr[last()]/m:grow", "m:val", l) || !1;
3626
+ S && (S = G(S));
3627
+ let T = c("mrow", {}, E);
3628
+ if (f && m)
3629
+ X(l, T, l, S);
3630
+ else if (m) {
3631
+ let C = c(y ? "msup" : "mover", {}, T);
3632
+ X(l, C, l, S);
3633
+ let p = c("mrow", {}, C);
3634
+ u.walk(p, d("m:sup[1]", l));
3635
+ } else if (f) {
3636
+ let C = c(y ? "msub" : "munder", {}, T);
3637
+ X(l, C, l, S);
3638
+ let p = c("mrow", {}, C);
3639
+ u.walk(p, d("m:sub[1]", l));
3640
+ } else {
3641
+ let C = c(y ? "msubsup" : "munderover", {}, T);
3642
+ X(l, C, l, S);
3643
+ let p = c("mrow", {}, C), j = c("mrow", {}, C);
3644
+ u.walk(p, d("m:sub[1]", l)), u.walk(j, d("m:sup[1]", l));
3645
+ }
3646
+ let M = c("mrow", {}, T);
3647
+ u.walk(M, d("m:e[1]", l));
3648
+ }
3649
+ ).match(
3650
+ g.el("m:d"),
3651
+ (l, E, u) => {
3652
+ let m = {}, f = b("m:dPr[1]/m:begChr", "m:val", l, !0), y = b("m:dPr[1]/m:endChr", "m:val", l, !0), S = b("m:dPr[1]/m:sepChr", "m:val", l) || "|";
3653
+ typeof f < "u" && f !== "(" && (m.open = f), typeof y < "u" && y !== ")" && (m.close = y), S !== "," && (m.separators = S);
3654
+ let T = c("mfenced", m, E);
3655
+ d("m:e", l).forEach((M) => {
3656
+ let C = c("mrow", {}, T);
3657
+ u.walk(C, M);
3658
+ });
3659
+ }
3660
+ ).match(
3661
+ g.el("m:eqArr"),
3662
+ (l, E, u) => {
3663
+ let m = c("mtable", {}, E);
3664
+ d("m:e", l).forEach((f) => {
3665
+ let y = c("mtr", {}, m), S = c("mtd", {}, y), T = b("m:argPr[last()]/m:scrLvl", "m:val", f), M;
3666
+ T !== "0" || !T ? M = c("mrow", {}, S) : M = c("mstyle", { scriptlevel: T }, S), c("maligngroup", {}, M), xt(u, l, M, 1, d("*[1]", f)[0]);
3667
+ });
3668
+ }
3669
+ ).match(
3670
+ g.el("m:func"),
3671
+ (l, E, u) => {
3672
+ let m = c("mrow", {}, E), f = c("mrow", {}, m);
3673
+ d("m:fName", l).forEach((T) => u.walk(f, T));
3674
+ let y = c("mo", {}, m);
3675
+ y.textContent = "⁡";
3676
+ let S = c("mrow", {}, m);
3677
+ u.walk(S, d("m:e", l));
3678
+ }
3679
+ ).match(
3680
+ g.el("m:acc"),
3681
+ (l, E, u) => {
3682
+ let m = c("mover", { accent: "true" }, E), f = c("mrow", {}, m), y = b("m:accPr/m:chr", "m:val", l).substr(0, 1) || "̂", S = B(y);
3683
+ if (u.walk(f, d("m:e[1]", l)), y.length === 0)
3684
+ c("mo", {}, m);
3685
+ else {
3686
+ let T = b("m:rPr[last()]/m:nor", "m:val", l) || !1;
3687
+ T && (T = G(T)), K(l, m, {
3688
+ toParse: S,
3689
+ scr: b("m:e[1]/*/m:rPr[last()]/m:scr", "m:val", l),
3690
+ sty: b("m:e[1]/*/m:rPr[last()]/m:sty", "m:val", l),
3691
+ nor: T
3692
+ });
3693
+ }
3694
+ }
3695
+ ).match(
3696
+ g.el("m:groupChr"),
3697
+ (l, E, u) => {
3698
+ let m = d("m:groupChrPr[last()]", l)[0], f = b("m:pos", "m:val", m).toLowerCase(), y = b("m:vertJc", "m:val", m).toLowerCase(), S = b("m:chr", "m:val", m), T = S ? S.substr(0, 1) : "⏟", M = (p) => {
3699
+ let j = c("mrow", {}, p);
3700
+ u.walk(j, d("m:e[1]", l));
3701
+ }, C = (p) => {
3702
+ let j = c("mo", {}, p);
3703
+ j.textContent = T;
3704
+ };
3705
+ if (f === "top")
3706
+ if (y === "bot") {
3707
+ let p = c("mover", { accent: "false" }, E);
3708
+ M(p), C(p);
3709
+ } else {
3710
+ let p = c("munder", { accentunder: "false" }, E);
3711
+ C(p), M(p);
3712
+ }
3713
+ else if (y === "bot") {
3714
+ let p = c("mover", { accent: "false" }, E);
3715
+ C(p), M(p);
3716
+ } else {
3717
+ let p = c("munder", { accentunder: "false" }, E);
3718
+ M(p), C(p);
3719
+ }
3720
+ }
3721
+ ).match(
3722
+ g.el("m:borderBox"),
3723
+ (l, E, u) => {
3724
+ let m = Q(b("m:borderBoxPr[last()]/m:hideTop[last()]", "m:val", l).toLowerCase()), f = Q(b("m:borderBoxPr[last()]/m:hideBot[last()]", "m:val", l).toLowerCase()), y = Q(b(
3725
+ "m:borderBoxPr[last()]/m:hideLeft[last()]",
3726
+ "m:val",
3727
+ l
3728
+ ).toLowerCase()), S = Q(b(
3729
+ "m:borderBoxPr[last()]/m:hideRight[last()]",
3730
+ "m:val",
3731
+ l
3732
+ ).toLowerCase()), T = Q(b("m:borderBoxPr[last()]/m:strikeH[last()]", "m:val", l).toLowerCase()), M = Q(b("m:borderBoxPr[last()]/m:strikeV[last()]", "m:val", l).toLowerCase()), C = Q(b(
3733
+ "m:borderBoxPr[last()]/m:strikeBLTR[last()]",
3734
+ "m:val",
3735
+ l
3736
+ ).toLowerCase()), p = Q(b(
3737
+ "m:borderBoxPr[last()]/m:strikeTLBR[last()]",
3738
+ "m:val",
3739
+ l
3740
+ ).toLowerCase()), j;
3741
+ m && f && y && S && !T && !M && !C && !p ? j = c("mrow", {}, E) : j = c("menclose", ft({
3742
+ hideTop: m,
3743
+ hideBot: f,
3744
+ hideLeft: y,
3745
+ hideRight: S,
3746
+ strikeH: T,
3747
+ strikeV: M,
3748
+ strikeBLTR: C,
3749
+ strikeTLBR: p
3750
+ }), E), u.walk(j, d("m:e[1]", l));
3751
+ }
3752
+ ).match(
3753
+ g.el("m:bar"),
3754
+ (l, E, u) => {
3755
+ if (b("m:barPr/m:pos", "m:val", l).toLowerCase() === "top") {
3756
+ let f = c("mover", { accent: "false" }, E), y = c("mrow", {}, f), S = c("mo", {}, f);
3757
+ u.walk(y, d("m:e[1]", l)), S.textContent = "¯";
3758
+ } else {
3759
+ let f = c("munder", { underaccent: "false" }, E), y = c("mrow", {}, f), S = c("mo", {}, f);
3760
+ u.walk(y, d("m:e[1]", l)), S.textContent = "_";
3761
+ }
3762
+ }
3763
+ ).match(
3764
+ [g.el("m:e"), g.el("m:den"), g.el("m:num"), g.el("m:lim"), g.el("m:sup"), g.el("m:sub")],
3765
+ (l, E, u) => {
3766
+ let m = b("m:argPr[last()]/m:scrLvl", "m:val", l);
3767
+ if (!m)
3768
+ u.walk(E);
3769
+ else {
3770
+ let f = c("mstyle", { scriptlevel: m }, E);
3771
+ u.walk(f);
3772
+ }
3773
+ }
3774
+ ).match(
3775
+ g.el("m:phant"),
3776
+ (l, E, u) => {
3777
+ let m = b("m:phantPr[last()]/m:zeroWid[last()]", "m:val", l).toLowerCase() || !1;
3778
+ m && (m = G(m));
3779
+ let f = b("m:phantPr[last()]/m:zeroAsc[last()]", "m:val", l).toLowerCase() || !1;
3780
+ f && (f = G(f));
3781
+ let y = b("m:phantPr[last()]/m:zeroDesc[last()]", "m:val", l).toLowerCase() || !1;
3782
+ y && (y = G(y));
3783
+ let S = G(b("m:phantPr[last()]/m:show[last()]", "m:val", l).toLowerCase()), T;
3784
+ if (S)
3785
+ T = c("mpadded", it({ zeroWid: m, zeroAsc: f, zeroDesc: y }), E);
3786
+ else if (!m && !f && !y)
3787
+ T = c("mphantom", {}, E);
3788
+ else {
3789
+ let C = c("mphantom", {}, E);
3790
+ T = c("mpadded", it({ zeroWid: m, zeroAsc: f, zeroDesc: y }), C);
3791
+ }
3792
+ let M = c("mrow", {}, T);
3793
+ u.walk(M, d("m:e", l));
3794
+ }
3795
+ ).run(F);
3796
+ };
3797
+ function st(h) {
3798
+ return h === "skw" || h === "lin" ? { bevelled: "true" } : h === "nobar" ? { linethickness: "0pt" } : {};
3799
+ }
3800
+ function Z(h) {
3801
+ if (h)
3802
+ return h.replace(/\s/g, " ");
3803
+ }
3804
+ function ut(h) {
3805
+ if (h != null) {
3806
+ if (h = h.toLowerCase(), h === "on" || h === "1" || h === "true") return !0;
3807
+ if (h === "off" || h === "0" || h === "false") return !1;
3808
+ }
3809
+ }
3810
+ function G(h) {
3811
+ return ut(h) !== !1;
3812
+ }
3813
+ function Q(h) {
3814
+ return ut(h) || !1;
3815
+ }
3816
+ function K(h, F, { toParse: g = "", scr: A, sty: l, nor: E }) {
3817
+ if (!g.length) return;
3818
+ let u = $(g, O), m = $(g, /\d/), f = u === 1;
3819
+ if (!f && !(m === 1)) {
3820
+ let S;
3821
+ d("ancestor::m:fName", h)[0] ? !u && !m ? S = g.length : S = Math.min(u || Number.MAX_VALUE, m || Number.MAX_VALUE) - 1 : S = 1;
3822
+ let T = c("mi", J({ scr: A, sty: l, nor: E, charToPrint: S, tokenType: "mi" }), F);
3823
+ T.textContent = Z(g.substr(0, S)), K(h, F, { toParse: g.substr(S), scr: A, sty: l, nor: E });
3824
+ } else if (f) {
3825
+ let S = c("mo", J({ nor: E, tokenType: "mo" }), F);
3826
+ S.textContent = g.substr(0, 1), K(h, F, { toParse: g.substr(1), scr: A, sty: l, nor: E });
3827
+ } else {
3828
+ let S = ot(g), T = c("mn", J({ scr: A, sty: "p", nor: E, tokenType: "mn" }), F);
3829
+ T.textContent = S, K(h, F, { toParse: g.substr(S.length), scr: A, sty: l, nor: E });
3830
+ }
3831
+ }
3832
+ function z(h, F, { toParse: g = "", scr: A, sty: l, nor: E, align: u }) {
3833
+ if (g.length)
3834
+ if (g[0] === "&")
3835
+ c(u ? "malignmark" : "maligngroup", {}, F), z(h, F, {
3836
+ toParse: g.substr(1),
3837
+ align: !u,
3838
+ scr: A,
3839
+ sty: l,
3840
+ nor: E
3841
+ });
3842
+ else {
3843
+ let m = $(g, O), f = $(g, /\d/), y = m === 1;
3844
+ if (!y && !(f === 1)) {
3845
+ if (E) {
3846
+ let T = c("mtext", {}, F);
3847
+ T.textContent = Z(g.substr(0, 1));
3848
+ } else {
3849
+ let T = c("mi", J({ scr: A, sty: l, nor: E, charToPrint: 1, tokenType: "mi" }), F);
3850
+ T.textContent = Z(g.substr(0, 1));
3851
+ }
3852
+ z(h, F, { toParse: g.substr(1), scr: A, sty: l, nor: E, align: u });
3853
+ } else if (y) {
3854
+ if (E) {
3855
+ let T = c("mtext", {}, F);
3856
+ T.textContent = g.substr(0, 1);
3857
+ } else {
3858
+ let T = c("mo", J({ nor: E, charToPrint: 1, tokenType: "mo" }), F);
3859
+ T.textContent = g.substr(0, 1);
3860
+ }
3861
+ z(h, F, { toParse: g.substr(1), scr: A, sty: l, nor: E, align: u });
3862
+ } else {
3863
+ let T = ot(g);
3864
+ if (E) {
3865
+ let M = c("mtext", {}, F);
3866
+ M.textContent = g.substr(0, T.length);
3867
+ } else {
3868
+ let M = c("mn", J({ sty: "p", nor: E, charToPrint: 1, tokenType: "mn" }), F);
3869
+ M.textContent = g.substr(0, T.length);
3870
+ }
3871
+ z(h, F, { toParse: g.substr(T.length), scr: A, sty: l, nor: E, align: u });
3872
+ }
3873
+ }
3874
+ }
3875
+ function $(h, F) {
3876
+ let g = F.exec(h);
3877
+ return g ? g.index + 1 : 0;
3878
+ }
3879
+ function J({ scr: h, sty: F, nor: g, charToPrint: A = 0, tokenType: l }) {
3880
+ let E = {};
3881
+ if (g) E.mathvariant = "normal";
3882
+ else {
3883
+ let u, m = F === "b" || F === "bi" ? "bold" : "normal", f = F === "b" || F === "p" ? "normal" : "italic";
3884
+ if (l !== "mn" && (h === "monospace" ? u = "monospace" : h === "sans-serif" && F === "i" ? u = "sans-serif-italic" : h === "sans-serif" && F === "b" ? u = "bold-sans-serif" : h === "sans-serif" && F === "bi" ? u = "sans-serif-bold-italic" : h === "sans-serif" ? u = "sans-serif" : h === "fraktur" && (F === "b" || F === "i") ? u = "bold-fraktur" : h === "fraktur" ? u = "fraktur" : h === "double-struck" ? u = "double-struck" : h === "script" && (F === "b" || F === "i") ? u = "bold-script" : h === "script" ? u = "script" : (h === "roman" || !h) && (F === "b" ? u = "bold" : F === "i" ? u = "italic" : F === "p" ? u = "normal" : F === "bi" && (u = "bold-italic"))), l === "mo" && u !== "normal" || l === "mi" && A === 1 && (u === "italic" || !u))
3885
+ return E;
3886
+ l === "mi" && A > 1 && (u === "italic" || !u) ? E.mathvariant = "italic" : u && u !== "italic" ? E.mathvariant = u : (f === "italic" && !(l === "mi" && A === 1) && (E.fontstyle = "italic"), m === "bold" && (E.fontweight = "bold"));
3887
+ }
3888
+ return E;
3889
+ }
3890
+ function ot(h) {
3891
+ if (!h) return "";
3892
+ let F = "";
3893
+ return h.replace(/^(\d+)/, (g, A) => {
3894
+ F = A;
3895
+ }), F;
3896
+ }
3897
+ function nt(h, F, g) {
3898
+ if (g && g.length) {
3899
+ let A = c("mrow", {}, F);
3900
+ h.walk(A, g);
3901
+ } else c("none", {}, F);
3902
+ }
3903
+ function X(h, F, g, A = !1) {
3904
+ let l = c("mo", { stretchy: A ? "true" : "false" }, F), E = b("./m:naryPr[last()]/m:chr", "m:val", h);
3905
+ l.textContent = E || "∫";
3906
+ }
3907
+ function xt(h, F, g, A, l) {
3908
+ let E = d("m:t", l).map((u) => u.textContent).join("");
3909
+ if (d("self::m:r", l)[0]) {
3910
+ let u = b("m:rPr[last()]/m:nor", "m:val", F) || !1;
3911
+ u && (u = G(u)), z(F, g, {
3912
+ toParse: E,
3913
+ scr: b("../m:rPr[last()]/m:scr", "m:val", F),
3914
+ sty: b("../m:rPr[last()]/m:sty", "m:val", F),
3915
+ nor: u,
3916
+ align: A
3917
+ });
3918
+ } else
3919
+ h.walk(g, l);
3920
+ if (d("following-sibling::*", l).length) {
3921
+ let u = ht(E);
3922
+ xt(h, F, g, (A + u % 2) % 2, d("following-sibling::*", l)[0]);
3923
+ }
3924
+ }
3925
+ function ht(h) {
3926
+ return ((h || "").match(/&/g) || []).length;
3927
+ }
3928
+ let v = {
3929
+ "̆": "˘",
3930
+ "̮": "˘",
3931
+ "̒": "¸",
3932
+ "̧": "¸",
3933
+ "̀": "`",
3934
+ "̖": "`",
3935
+ "̅": "-",
3936
+ "̲": "-",
3937
+ "̣": ".",
3938
+ "̇": "˙",
3939
+ "̋": "˝",
3940
+ "̗": "´",
3941
+ "́": "´",
3942
+ "̰": "~",
3943
+ "̃": "~",
3944
+ "̤": "¨",
3945
+ "̈": "¨",
3946
+ "̬": "ˇ",
3947
+ "̌": "ˇ",
3948
+ "̂": "^",
3949
+ "̭": "^",
3950
+ "⃗": "→",
3951
+ "⃯": "→",
3952
+ "⃖": "←",
3953
+ "⃮": "←"
3954
+ };
3955
+ function B(h) {
3956
+ return v[h] || h;
3957
+ }
3958
+ function ft({
3959
+ hideTop: h,
3960
+ hideBot: F,
3961
+ hideLeft: g,
3962
+ hideRight: A,
3963
+ strikeH: l,
3964
+ strikeV: E,
3965
+ strikeBLTR: u,
3966
+ strikeTLBR: m
3967
+ }) {
3968
+ let f = [];
3969
+ return !h && !F && !g && !A ? f.push("box") : (h || f.push("top"), F || f.push("bottom"), g || f.push("left"), A || f.push("right")), l && f.push("horizontalstrike"), E && f.push("verticalstrike"), u && f.push("updiagonalstrike"), m && f.push("downdiagonalstrike"), { notation: f.join(" ") };
3970
+ }
3971
+ function it({ zeroWid: h, zeroAsc: F, zeroDesc: g }) {
3972
+ let A = {};
3973
+ return h && (A.width = "0in"), F && (A.height = "0in"), g && (A.depth = "0in"), A;
3974
+ }
3975
+ function D(h, F, g) {
3976
+ if (g.res) return;
3977
+ let A = U.implementation().createHTMLDocument(""), l = Y(A, {}, x), E = A.createElementNS(R, "math");
3978
+ E.setAttribute("display", "inline"), c = l.el, g.result(E), g.walk(E);
3979
+ }
3980
+ return Tt;
3981
+ }
3982
+ var Ht = re();
3983
+ const ne = /* @__PURE__ */ jt(Ht), se = /* @__PURE__ */ Qt({
3984
+ __proto__: null,
3985
+ default: ne
3986
+ }, [Ht]);
3987
+ export {
3988
+ se as i
3989
+ };