@dan-uni/dan-any 1.2.7 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/buf.gen.yaml +4 -2
- package/buf.yaml +12 -0
- package/dist/browser/index.min.js +13384 -1
- package/dist/browser/plugins/bili.min.js +77 -1
- package/dist/browser/plugins/index.min.js +2 -2
- package/dist/browser/plugins/stats.min.js +10 -1
- package/dist/browser/rslib-runtime.min.js +5 -5
- package/dist/browser/src/index.d.ts +10 -7
- package/dist/browser/src/proto/gen/{bili → bilibili/community/service/dm/v1}/dm_pb.d.ts +2 -2
- package/dist/browser/src/proto/gen/{danuni_pb.d.ts → danuni/danmaku/v1/danmaku_pb.d.ts} +45 -41
- package/dist/browser/src/utils/fileParser.d.ts +3 -0
- package/dist/node/index.js +1959 -1
- package/dist/node/plugins/bili.js +77 -1
- package/dist/node/plugins/index.js +2 -2
- package/dist/node/plugins/stats.js +10 -1
- package/dist/node/rslib-runtime.js +5 -5
- package/dist/node/src/index.d.ts +10 -7
- package/dist/node/src/proto/gen/{bili → bilibili/community/service/dm/v1}/dm_pb.d.ts +2 -2
- package/dist/{umd/src/proto/gen/danuni_pb.d.ts → node/src/proto/gen/danuni/danmaku/v1/danmaku_pb.d.ts} +45 -41
- package/dist/node/src/utils/fileParser.d.ts +3 -0
- package/dist/umd/index.umd.min.js +1146 -336
- package/dist/umd/plugins/bili.umd.min.js +1143 -334
- package/dist/umd/plugins/index.umd.min.js +1143 -334
- package/dist/umd/src/index.d.ts +10 -7
- package/dist/umd/src/proto/gen/{bili → bilibili/community/service/dm/v1}/dm_pb.d.ts +2 -2
- package/dist/{node/src/proto/gen/danuni_pb.d.ts → umd/src/proto/gen/danuni/danmaku/v1/danmaku_pb.d.ts} +45 -41
- package/dist/umd/src/utils/fileParser.d.ts +3 -0
- package/package.json +5 -7
- package/src/index.test.ts +23 -1
- package/src/index.ts +153 -59
- package/src/proto/gen/{bili → bilibili/community/service/dm/v1}/dm_pb.ts +104 -104
- package/src/proto/gen/danuni/danmaku/v1/danmaku_pb.ts +223 -0
- package/src/proto/src/danuni/danmaku/v1/danmaku.proto +52 -0
- package/src/utils/dm-gen.ts +1 -1
- package/src/utils/fileParser.ts +37 -0
- package/dist/browser/17.min.js +0 -13299
- package/dist/browser/705.min.js +0 -77
- package/dist/browser/898.min.js +0 -10
- package/dist/node/17.js +0 -1874
- package/dist/node/705.js +0 -77
- package/dist/node/898.js +0 -10
- package/src/proto/gen/danuni_pb.ts +0 -219
- package/src/proto/src/danuni.proto +0 -50
- /package/dist/browser/{17.min.js.LICENSE.txt → index.min.js.LICENSE.txt} +0 -0
- /package/src/proto/src/{bili → bilibili/community/service/dm/v1}/dm.proto +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*!
|
|
1
|
+
/*! LICENSE: index.umd.min.js.LICENSE.txt */
|
|
2
2
|
(function(root, factory) {
|
|
3
3
|
if ('object' == typeof exports && 'object' == typeof module) module.exports = factory();
|
|
4
4
|
else if ('function' == typeof define && define.amd) define([], factory);
|
|
@@ -1511,7 +1511,7 @@
|
|
|
1511
1511
|
},
|
|
1512
1512
|
"../../node_modules/.pnpm/base16384@1.0.0/node_modules/base16384/lib/index.js" (__unused_rspack_module, exports1) {
|
|
1513
1513
|
"use strict";
|
|
1514
|
-
exports1.
|
|
1514
|
+
exports1.D4 = exports1.lF = void 0;
|
|
1515
1515
|
function align(input, output, sWidth, tWidth, sOffset, tOffset) {
|
|
1516
1516
|
let offset = 0;
|
|
1517
1517
|
let rest = 0;
|
|
@@ -1541,7 +1541,7 @@
|
|
|
1541
1541
|
output[output.length - 1] = input.length % 7 + 0x3d00;
|
|
1542
1542
|
return output;
|
|
1543
1543
|
}
|
|
1544
|
-
exports1.
|
|
1544
|
+
exports1.lF = encode;
|
|
1545
1545
|
function toUint16Array(source) {
|
|
1546
1546
|
const input = new Uint16Array(source.length);
|
|
1547
1547
|
for(let i = 0; i < source.length; i++)input[i] = source.charCodeAt(i);
|
|
@@ -1555,7 +1555,7 @@
|
|
|
1555
1555
|
align(input, output, 14, 8, 0x4e00, 0);
|
|
1556
1556
|
return output;
|
|
1557
1557
|
}
|
|
1558
|
-
exports1.
|
|
1558
|
+
exports1.D4 = decode;
|
|
1559
1559
|
},
|
|
1560
1560
|
"../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js" (__unused_rspack_module, exports1) {
|
|
1561
1561
|
"use strict";
|
|
@@ -2167,7 +2167,7 @@
|
|
|
2167
2167
|
];
|
|
2168
2168
|
remL = 1;
|
|
2169
2169
|
}
|
|
2170
|
-
}while ((xi++ < xL || null != rem[0]) && s--)
|
|
2170
|
+
}while ((xi++ < xL || null != rem[0]) && s--)
|
|
2171
2171
|
more = null != rem[0];
|
|
2172
2172
|
if (!qc[0]) qc.splice(0, 1);
|
|
2173
2173
|
}
|
|
@@ -3522,7 +3522,7 @@
|
|
|
3522
3522
|
});
|
|
3523
3523
|
assert(this._handle, 'zlib binding closed');
|
|
3524
3524
|
do var res = this._handle.writeSync(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);
|
|
3525
|
-
while (!this._hadError && callback(res[0], res[1]))
|
|
3525
|
+
while (!this._hadError && callback(res[0], res[1]))
|
|
3526
3526
|
if (this._hadError) throw error;
|
|
3527
3527
|
if (nread >= kMaxLength) {
|
|
3528
3528
|
_close(this);
|
|
@@ -6888,7 +6888,7 @@
|
|
|
6888
6888
|
do {
|
|
6889
6889
|
s1 = s1 + buf[pos++] | 0;
|
|
6890
6890
|
s2 = s2 + s1 | 0;
|
|
6891
|
-
}while (--n)
|
|
6891
|
+
}while (--n)
|
|
6892
6892
|
s1 %= 65521;
|
|
6893
6893
|
s2 %= 65521;
|
|
6894
6894
|
}
|
|
@@ -7069,7 +7069,7 @@
|
|
|
7069
7069
|
scan += 2;
|
|
7070
7070
|
match++;
|
|
7071
7071
|
do ;
|
|
7072
|
-
while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend)
|
|
7072
|
+
while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend)
|
|
7073
7073
|
len = MAX_MATCH - (strend - scan);
|
|
7074
7074
|
scan = strend - MAX_MATCH;
|
|
7075
7075
|
if (len > best_len) {
|
|
@@ -7079,7 +7079,7 @@
|
|
|
7079
7079
|
scan_end1 = _win[scan + best_len - 1];
|
|
7080
7080
|
scan_end = _win[scan + best_len];
|
|
7081
7081
|
}
|
|
7082
|
-
}while ((cur_match = prev[cur_match & wmask]) > limit && 0 !== --chain_length)
|
|
7082
|
+
}while ((cur_match = prev[cur_match & wmask]) > limit && 0 !== --chain_length)
|
|
7083
7083
|
if (best_len <= s.lookahead) return best_len;
|
|
7084
7084
|
return s.lookahead;
|
|
7085
7085
|
}
|
|
@@ -7098,13 +7098,13 @@
|
|
|
7098
7098
|
do {
|
|
7099
7099
|
m = s.head[--p];
|
|
7100
7100
|
s.head[p] = m >= _w_size ? m - _w_size : 0;
|
|
7101
|
-
}while (--n)
|
|
7101
|
+
}while (--n)
|
|
7102
7102
|
n = _w_size;
|
|
7103
7103
|
p = n;
|
|
7104
7104
|
do {
|
|
7105
7105
|
m = s.prev[--p];
|
|
7106
7106
|
s.prev[p] = m >= _w_size ? m - _w_size : 0;
|
|
7107
|
-
}while (--n)
|
|
7107
|
+
}while (--n)
|
|
7108
7108
|
more += _w_size;
|
|
7109
7109
|
}
|
|
7110
7110
|
if (0 === s.strm.avail_in) break;
|
|
@@ -7123,7 +7123,7 @@
|
|
|
7123
7123
|
if (s.lookahead + s.insert < MIN_MATCH) break;
|
|
7124
7124
|
}
|
|
7125
7125
|
}
|
|
7126
|
-
}while (s.lookahead < MIN_LOOKAHEAD && 0 !== s.strm.avail_in)
|
|
7126
|
+
}while (s.lookahead < MIN_LOOKAHEAD && 0 !== s.strm.avail_in)
|
|
7127
7127
|
}
|
|
7128
7128
|
function deflate_stored(s, flush) {
|
|
7129
7129
|
var max_block_size = 0xffff;
|
|
@@ -7186,7 +7186,7 @@
|
|
|
7186
7186
|
s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
|
|
7187
7187
|
hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
|
|
7188
7188
|
s.head[s.ins_h] = s.strstart;
|
|
7189
|
-
}while (0 !== --s.match_length)
|
|
7189
|
+
}while (0 !== --s.match_length)
|
|
7190
7190
|
s.strstart++;
|
|
7191
7191
|
} else {
|
|
7192
7192
|
s.strstart += s.match_length;
|
|
@@ -7249,7 +7249,7 @@
|
|
|
7249
7249
|
hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
|
|
7250
7250
|
s.head[s.ins_h] = s.strstart;
|
|
7251
7251
|
}
|
|
7252
|
-
while (0 !== --s.prev_length)
|
|
7252
|
+
while (0 !== --s.prev_length)
|
|
7253
7253
|
s.match_available = 0;
|
|
7254
7254
|
s.match_length = MIN_MATCH - 1;
|
|
7255
7255
|
s.strstart++;
|
|
@@ -7303,7 +7303,7 @@
|
|
|
7303
7303
|
if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {
|
|
7304
7304
|
strend = s.strstart + MAX_MATCH;
|
|
7305
7305
|
do ;
|
|
7306
|
-
while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend)
|
|
7306
|
+
while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend)
|
|
7307
7307
|
s.match_length = MAX_MATCH - (strend - scan);
|
|
7308
7308
|
if (s.match_length > s.lookahead) s.match_length = s.lookahead;
|
|
7309
7309
|
}
|
|
@@ -7619,7 +7619,7 @@
|
|
|
7619
7619
|
}
|
|
7620
7620
|
val = s.gzindex < s.gzhead.name.length ? 0xff & s.gzhead.name.charCodeAt(s.gzindex++) : 0;
|
|
7621
7621
|
put_byte(s, val);
|
|
7622
|
-
}while (0 !== val)
|
|
7622
|
+
}while (0 !== val)
|
|
7623
7623
|
if (s.gzhead.hcrc && s.pending > beg) strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
7624
7624
|
if (0 === val) {
|
|
7625
7625
|
s.gzindex = 0;
|
|
@@ -7640,7 +7640,7 @@
|
|
|
7640
7640
|
}
|
|
7641
7641
|
val = s.gzindex < s.gzhead.comment.length ? 0xff & s.gzhead.comment.charCodeAt(s.gzindex++) : 0;
|
|
7642
7642
|
put_byte(s, val);
|
|
7643
|
-
}while (0 !== val)
|
|
7643
|
+
}while (0 !== val)
|
|
7644
7644
|
if (s.gzhead.hcrc && s.pending > beg) strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
7645
7645
|
if (0 === val) s.status = HCRC_STATE;
|
|
7646
7646
|
} else s.status = HCRC_STATE;
|
|
@@ -7757,7 +7757,7 @@
|
|
|
7757
7757
|
s.prev[str & s.w_mask] = s.head[s.ins_h];
|
|
7758
7758
|
s.head[s.ins_h] = str;
|
|
7759
7759
|
str++;
|
|
7760
|
-
}while (--n)
|
|
7760
|
+
}while (--n)
|
|
7761
7761
|
s.strstart = str;
|
|
7762
7762
|
s.lookahead = MIN_MATCH - 1;
|
|
7763
7763
|
fill_window(s);
|
|
@@ -7906,7 +7906,7 @@
|
|
|
7906
7906
|
if (op < len) {
|
|
7907
7907
|
len -= op;
|
|
7908
7908
|
do output[_out++] = s_window[from++];
|
|
7909
|
-
while (--op)
|
|
7909
|
+
while (--op)
|
|
7910
7910
|
from = _out - dist;
|
|
7911
7911
|
from_source = output;
|
|
7912
7912
|
}
|
|
@@ -7916,13 +7916,13 @@
|
|
|
7916
7916
|
if (op < len) {
|
|
7917
7917
|
len -= op;
|
|
7918
7918
|
do output[_out++] = s_window[from++];
|
|
7919
|
-
while (--op)
|
|
7919
|
+
while (--op)
|
|
7920
7920
|
from = 0;
|
|
7921
7921
|
if (wnext < len) {
|
|
7922
7922
|
op = wnext;
|
|
7923
7923
|
len -= op;
|
|
7924
7924
|
do output[_out++] = s_window[from++];
|
|
7925
|
-
while (--op)
|
|
7925
|
+
while (--op)
|
|
7926
7926
|
from = _out - dist;
|
|
7927
7927
|
from_source = output;
|
|
7928
7928
|
}
|
|
@@ -7932,7 +7932,7 @@
|
|
|
7932
7932
|
if (op < len) {
|
|
7933
7933
|
len -= op;
|
|
7934
7934
|
do output[_out++] = s_window[from++];
|
|
7935
|
-
while (--op)
|
|
7935
|
+
while (--op)
|
|
7936
7936
|
from = _out - dist;
|
|
7937
7937
|
from_source = output;
|
|
7938
7938
|
}
|
|
@@ -7954,7 +7954,7 @@
|
|
|
7954
7954
|
output[_out++] = output[from++];
|
|
7955
7955
|
output[_out++] = output[from++];
|
|
7956
7956
|
len -= 3;
|
|
7957
|
-
}while (len > 2)
|
|
7957
|
+
}while (len > 2)
|
|
7958
7958
|
if (len) {
|
|
7959
7959
|
output[_out++] = output[from++];
|
|
7960
7960
|
if (len > 1) output[_out++] = output[from++];
|
|
@@ -7983,7 +7983,7 @@
|
|
|
7983
7983
|
}
|
|
7984
7984
|
break;
|
|
7985
7985
|
}
|
|
7986
|
-
}while (_in < last && _out < end)
|
|
7986
|
+
}while (_in < last && _out < end)
|
|
7987
7987
|
len = bits >> 3;
|
|
7988
7988
|
_in -= len;
|
|
7989
7989
|
bits -= len << 3;
|
|
@@ -8424,7 +8424,7 @@
|
|
|
8424
8424
|
do {
|
|
8425
8425
|
len = input[next + copy++];
|
|
8426
8426
|
if (state.head && len && state.length < 65536) state.head.name += String.fromCharCode(len);
|
|
8427
|
-
}while (len && copy < have)
|
|
8427
|
+
}while (len && copy < have)
|
|
8428
8428
|
if (0x0200 & state.flags) state.check = crc32(state.check, input, copy, next);
|
|
8429
8429
|
have -= copy;
|
|
8430
8430
|
next += copy;
|
|
@@ -8439,7 +8439,7 @@
|
|
|
8439
8439
|
do {
|
|
8440
8440
|
len = input[next + copy++];
|
|
8441
8441
|
if (state.head && len && state.length < 65536) state.head.comment += String.fromCharCode(len);
|
|
8442
|
-
}while (len && copy < have)
|
|
8442
|
+
}while (len && copy < have)
|
|
8443
8443
|
if (0x0200 & state.flags) state.check = crc32(state.check, input, copy, next);
|
|
8444
8444
|
have -= copy;
|
|
8445
8445
|
next += copy;
|
|
@@ -8903,7 +8903,7 @@
|
|
|
8903
8903
|
left -= copy;
|
|
8904
8904
|
state.length -= copy;
|
|
8905
8905
|
do output[put++] = from_source[from++];
|
|
8906
|
-
while (--copy)
|
|
8906
|
+
while (--copy)
|
|
8907
8907
|
if (0 === state.length) state.mode = LEN;
|
|
8908
8908
|
break;
|
|
8909
8909
|
case LIT:
|
|
@@ -9265,7 +9265,7 @@
|
|
|
9265
9265
|
do {
|
|
9266
9266
|
fill -= incr;
|
|
9267
9267
|
table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val;
|
|
9268
|
-
}while (0 !== fill)
|
|
9268
|
+
}while (0 !== fill)
|
|
9269
9269
|
incr = 1 << len - 1;
|
|
9270
9270
|
while(huff & incr)incr >>= 1;
|
|
9271
9271
|
if (0 !== incr) {
|
|
@@ -9503,7 +9503,7 @@
|
|
|
9503
9503
|
res |= 1 & code;
|
|
9504
9504
|
code >>>= 1;
|
|
9505
9505
|
res <<= 1;
|
|
9506
|
-
}while (--len > 0)
|
|
9506
|
+
}while (--len > 0)
|
|
9507
9507
|
return res >>> 1;
|
|
9508
9508
|
}
|
|
9509
9509
|
function bi_flush(s) {
|
|
@@ -9558,7 +9558,7 @@
|
|
|
9558
9558
|
s.bl_count[bits + 1] += 2;
|
|
9559
9559
|
s.bl_count[max_length]--;
|
|
9560
9560
|
overflow -= 2;
|
|
9561
|
-
}while (overflow > 0)
|
|
9561
|
+
}while (overflow > 0)
|
|
9562
9562
|
for(bits = max_length; 0 !== bits; bits--){
|
|
9563
9563
|
n = s.bl_count[bits];
|
|
9564
9564
|
while(0 !== n){
|
|
@@ -9706,7 +9706,7 @@
|
|
|
9706
9706
|
send_bits(s, dist, extra);
|
|
9707
9707
|
}
|
|
9708
9708
|
}
|
|
9709
|
-
}while (lx < s.last_lit)
|
|
9709
|
+
}while (lx < s.last_lit)
|
|
9710
9710
|
send_code(s, END_BLOCK, ltree);
|
|
9711
9711
|
}
|
|
9712
9712
|
function build_tree(s, desc) {
|
|
@@ -9745,7 +9745,7 @@
|
|
|
9745
9745
|
tree[2 * n + 1] = tree[2 * m + 1] = node;
|
|
9746
9746
|
s.heap[1] = node++;
|
|
9747
9747
|
pqdownheap(s, tree, 1);
|
|
9748
|
-
}while (s.heap_len >= 2)
|
|
9748
|
+
}while (s.heap_len >= 2)
|
|
9749
9749
|
s.heap[--s.heap_max] = s.heap[1];
|
|
9750
9750
|
gen_bitlen(s, desc);
|
|
9751
9751
|
gen_codes(tree, max_code, s.bl_count);
|
|
@@ -9805,7 +9805,7 @@
|
|
|
9805
9805
|
nextlen = tree[(n + 1) * 2 + 1];
|
|
9806
9806
|
if (!(++count < max_count) || curlen !== nextlen) {
|
|
9807
9807
|
if (count < min_count) do send_code(s, curlen, s.bl_tree);
|
|
9808
|
-
while (0 !== --count)
|
|
9808
|
+
while (0 !== --count)
|
|
9809
9809
|
else if (0 !== curlen) {
|
|
9810
9810
|
if (curlen !== prevlen) {
|
|
9811
9811
|
send_code(s, curlen, s.bl_tree);
|
|
@@ -10169,7 +10169,7 @@
|
|
|
10169
10169
|
return 'Unknown encoding: ' + arg;
|
|
10170
10170
|
}, TypeError);
|
|
10171
10171
|
createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
|
|
10172
|
-
module1.exports.
|
|
10172
|
+
module1.exports.F = codes;
|
|
10173
10173
|
},
|
|
10174
10174
|
"../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
10175
10175
|
"use strict";
|
|
@@ -10278,7 +10278,7 @@
|
|
|
10278
10278
|
var BufferList = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js");
|
|
10279
10279
|
var destroyImpl = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js");
|
|
10280
10280
|
var _require = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js"), getHighWaterMark = _require.getHighWaterMark;
|
|
10281
|
-
var _require$codes = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js").
|
|
10281
|
+
var _require$codes = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js").F, ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
10282
10282
|
var StringDecoder;
|
|
10283
10283
|
var createReadableStreamAsyncIterator;
|
|
10284
10284
|
var from;
|
|
@@ -10330,7 +10330,7 @@
|
|
|
10330
10330
|
this.decoder = null;
|
|
10331
10331
|
this.encoding = null;
|
|
10332
10332
|
if (options.encoding) {
|
|
10333
|
-
if (!StringDecoder) StringDecoder = __webpack_require__("../../node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js").
|
|
10333
|
+
if (!StringDecoder) StringDecoder = __webpack_require__("../../node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js").I;
|
|
10334
10334
|
this.decoder = new StringDecoder(options.encoding);
|
|
10335
10335
|
this.encoding = options.encoding;
|
|
10336
10336
|
}
|
|
@@ -10436,7 +10436,7 @@
|
|
|
10436
10436
|
return false === this._readableState.flowing;
|
|
10437
10437
|
};
|
|
10438
10438
|
Readable.prototype.setEncoding = function(enc) {
|
|
10439
|
-
if (!StringDecoder) StringDecoder = __webpack_require__("../../node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js").
|
|
10439
|
+
if (!StringDecoder) StringDecoder = __webpack_require__("../../node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js").I;
|
|
10440
10440
|
var decoder = new StringDecoder(enc);
|
|
10441
10441
|
this._readableState.decoder = decoder;
|
|
10442
10442
|
this._readableState.encoding = this._readableState.decoder.encoding;
|
|
@@ -10917,7 +10917,7 @@
|
|
|
10917
10917
|
"../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
10918
10918
|
"use strict";
|
|
10919
10919
|
module1.exports = Transform;
|
|
10920
|
-
var _require$codes = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js").
|
|
10920
|
+
var _require$codes = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js").F, ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
|
|
10921
10921
|
var Duplex = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js");
|
|
10922
10922
|
__webpack_require__("../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js")(Transform, Duplex);
|
|
10923
10923
|
function afterTransform(er, data) {
|
|
@@ -11025,7 +11025,7 @@
|
|
|
11025
11025
|
}
|
|
11026
11026
|
var destroyImpl = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js");
|
|
11027
11027
|
var _require = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js"), getHighWaterMark = _require.getHighWaterMark;
|
|
11028
|
-
var _require$codes = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js").
|
|
11028
|
+
var _require$codes = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js").F, ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
|
|
11029
11029
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
11030
11030
|
__webpack_require__("../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js")(Writable, Stream);
|
|
11031
11031
|
function nop() {}
|
|
@@ -11900,7 +11900,7 @@
|
|
|
11900
11900
|
},
|
|
11901
11901
|
"../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
11902
11902
|
"use strict";
|
|
11903
|
-
var ERR_STREAM_PREMATURE_CLOSE = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js").
|
|
11903
|
+
var ERR_STREAM_PREMATURE_CLOSE = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js").F.ERR_STREAM_PREMATURE_CLOSE;
|
|
11904
11904
|
function once(callback) {
|
|
11905
11905
|
var called = false;
|
|
11906
11906
|
return function() {
|
|
@@ -11996,7 +11996,7 @@
|
|
|
11996
11996
|
callback.apply(void 0, arguments);
|
|
11997
11997
|
};
|
|
11998
11998
|
}
|
|
11999
|
-
var _require$codes = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js").
|
|
11999
|
+
var _require$codes = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js").F, ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
|
|
12000
12000
|
function noop(err) {
|
|
12001
12001
|
if (err) throw err;
|
|
12002
12002
|
}
|
|
@@ -12062,7 +12062,7 @@
|
|
|
12062
12062
|
},
|
|
12063
12063
|
"../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
12064
12064
|
"use strict";
|
|
12065
|
-
var ERR_INVALID_OPT_VALUE = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js").
|
|
12065
|
+
var ERR_INVALID_OPT_VALUE = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js").F.ERR_INVALID_OPT_VALUE;
|
|
12066
12066
|
function highWaterMarkFrom(options, isDuplex, duplexKey) {
|
|
12067
12067
|
return null != options.highWaterMark ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
|
|
12068
12068
|
}
|
|
@@ -12276,7 +12276,7 @@
|
|
|
12276
12276
|
if ('string' != typeof nenc && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
|
|
12277
12277
|
return nenc || enc;
|
|
12278
12278
|
}
|
|
12279
|
-
exports1.
|
|
12279
|
+
exports1.I = StringDecoder;
|
|
12280
12280
|
function StringDecoder(encoding) {
|
|
12281
12281
|
this.encoding = normalizeEncoding(encoding);
|
|
12282
12282
|
var nb;
|
|
@@ -14291,9 +14291,6 @@ and limitations under the License.
|
|
|
14291
14291
|
function IsJSON_isJSON(value) {
|
|
14292
14292
|
return 'string' == typeof value && isJSON_default()(value);
|
|
14293
14293
|
}
|
|
14294
|
-
function isObject(value) {
|
|
14295
|
-
return null != value && ('object' == typeof value || 'function' == typeof value) && !Array.isArray(value);
|
|
14296
|
-
}
|
|
14297
14294
|
var defaultContainer = new (function() {
|
|
14298
14295
|
function class_1() {
|
|
14299
14296
|
this.instances = [];
|
|
@@ -14359,6 +14356,7 @@ and limitations under the License.
|
|
|
14359
14356
|
this.always = args.validationOptions.always;
|
|
14360
14357
|
this.each = args.validationOptions.each;
|
|
14361
14358
|
this.context = args.validationOptions.context;
|
|
14359
|
+
this.validateIf = args.validationOptions.validateIf;
|
|
14362
14360
|
}
|
|
14363
14361
|
}
|
|
14364
14362
|
return ValidationMetadata;
|
|
@@ -14633,6 +14631,48 @@ and limitations under the License.
|
|
|
14633
14631
|
}
|
|
14634
14632
|
}, validationOptions);
|
|
14635
14633
|
}
|
|
14634
|
+
const nameStartChar = ':A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
|
|
14635
|
+
const nameChar = nameStartChar + '\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040';
|
|
14636
|
+
const nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*';
|
|
14637
|
+
const regexName = new RegExp('^' + nameRegexp + '$');
|
|
14638
|
+
function getAllMatches(string, regex) {
|
|
14639
|
+
const matches = [];
|
|
14640
|
+
let match = regex.exec(string);
|
|
14641
|
+
while(match){
|
|
14642
|
+
const allmatches = [];
|
|
14643
|
+
allmatches.startIndex = regex.lastIndex - match[0].length;
|
|
14644
|
+
const len = match.length;
|
|
14645
|
+
for(let index = 0; index < len; index++)allmatches.push(match[index]);
|
|
14646
|
+
matches.push(allmatches);
|
|
14647
|
+
match = regex.exec(string);
|
|
14648
|
+
}
|
|
14649
|
+
return matches;
|
|
14650
|
+
}
|
|
14651
|
+
const isName = function(string) {
|
|
14652
|
+
const match = regexName.exec(string);
|
|
14653
|
+
return null != match;
|
|
14654
|
+
};
|
|
14655
|
+
function isExist(v) {
|
|
14656
|
+
return void 0 !== v;
|
|
14657
|
+
}
|
|
14658
|
+
const DANGEROUS_PROPERTY_NAMES = [
|
|
14659
|
+
'hasOwnProperty',
|
|
14660
|
+
'toString',
|
|
14661
|
+
'valueOf',
|
|
14662
|
+
'__defineGetter__',
|
|
14663
|
+
'__defineSetter__',
|
|
14664
|
+
'__lookupGetter__',
|
|
14665
|
+
'__lookupSetter__'
|
|
14666
|
+
];
|
|
14667
|
+
const criticalProperties = [
|
|
14668
|
+
"__proto__",
|
|
14669
|
+
"constructor",
|
|
14670
|
+
"prototype"
|
|
14671
|
+
];
|
|
14672
|
+
const defaultOnDangerousProperty = (name)=>{
|
|
14673
|
+
if (DANGEROUS_PROPERTY_NAMES.includes(name)) return "__" + name;
|
|
14674
|
+
return name;
|
|
14675
|
+
};
|
|
14636
14676
|
const OptionsBuilder_defaultOptions = {
|
|
14637
14677
|
preserveOrder: false,
|
|
14638
14678
|
attributeNamePrefix: '@_',
|
|
@@ -14670,42 +14710,81 @@ and limitations under the License.
|
|
|
14670
14710
|
updateTag: function(tagName, jPath, attrs) {
|
|
14671
14711
|
return tagName;
|
|
14672
14712
|
},
|
|
14673
|
-
captureMetaData: false
|
|
14713
|
+
captureMetaData: false,
|
|
14714
|
+
maxNestedTags: 100,
|
|
14715
|
+
strictReservedNames: true,
|
|
14716
|
+
jPath: true,
|
|
14717
|
+
onDangerousProperty: defaultOnDangerousProperty
|
|
14674
14718
|
};
|
|
14675
|
-
|
|
14676
|
-
|
|
14677
|
-
|
|
14678
|
-
|
|
14679
|
-
|
|
14680
|
-
|
|
14681
|
-
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14685
|
-
|
|
14686
|
-
|
|
14687
|
-
|
|
14688
|
-
|
|
14689
|
-
|
|
14690
|
-
|
|
14691
|
-
|
|
14692
|
-
|
|
14693
|
-
|
|
14719
|
+
function validatePropertyName(propertyName, optionName) {
|
|
14720
|
+
if ('string' != typeof propertyName) return;
|
|
14721
|
+
const normalized = propertyName.toLowerCase();
|
|
14722
|
+
if (DANGEROUS_PROPERTY_NAMES.some((dangerous)=>normalized === dangerous.toLowerCase())) throw new Error(`[SECURITY] Invalid ${optionName}: "${propertyName}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
14723
|
+
if (criticalProperties.some((dangerous)=>normalized === dangerous.toLowerCase())) throw new Error(`[SECURITY] Invalid ${optionName}: "${propertyName}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
14724
|
+
}
|
|
14725
|
+
function normalizeProcessEntities(value) {
|
|
14726
|
+
if ('boolean' == typeof value) return {
|
|
14727
|
+
enabled: value,
|
|
14728
|
+
maxEntitySize: 10000,
|
|
14729
|
+
maxExpansionDepth: 10,
|
|
14730
|
+
maxTotalExpansions: 1000,
|
|
14731
|
+
maxExpandedLength: 100000,
|
|
14732
|
+
maxEntityCount: 100,
|
|
14733
|
+
allowedTags: null,
|
|
14734
|
+
tagFilter: null
|
|
14735
|
+
};
|
|
14736
|
+
if ('object' == typeof value && null !== value) return {
|
|
14737
|
+
enabled: false !== value.enabled,
|
|
14738
|
+
maxEntitySize: Math.max(1, value.maxEntitySize ?? 10000),
|
|
14739
|
+
maxExpansionDepth: Math.max(1, value.maxExpansionDepth ?? 10),
|
|
14740
|
+
maxTotalExpansions: Math.max(1, value.maxTotalExpansions ?? 1000),
|
|
14741
|
+
maxExpandedLength: Math.max(1, value.maxExpandedLength ?? 100000),
|
|
14742
|
+
maxEntityCount: Math.max(1, value.maxEntityCount ?? 100),
|
|
14743
|
+
allowedTags: value.allowedTags ?? null,
|
|
14744
|
+
tagFilter: value.tagFilter ?? null
|
|
14745
|
+
};
|
|
14746
|
+
return normalizeProcessEntities(true);
|
|
14694
14747
|
}
|
|
14695
|
-
const
|
|
14696
|
-
const
|
|
14697
|
-
|
|
14748
|
+
const buildOptions = function(options) {
|
|
14749
|
+
const built = Object.assign({}, OptionsBuilder_defaultOptions, options);
|
|
14750
|
+
const propertyNameOptions = [
|
|
14751
|
+
{
|
|
14752
|
+
value: built.attributeNamePrefix,
|
|
14753
|
+
name: 'attributeNamePrefix'
|
|
14754
|
+
},
|
|
14755
|
+
{
|
|
14756
|
+
value: built.attributesGroupName,
|
|
14757
|
+
name: 'attributesGroupName'
|
|
14758
|
+
},
|
|
14759
|
+
{
|
|
14760
|
+
value: built.textNodeName,
|
|
14761
|
+
name: 'textNodeName'
|
|
14762
|
+
},
|
|
14763
|
+
{
|
|
14764
|
+
value: built.cdataPropName,
|
|
14765
|
+
name: 'cdataPropName'
|
|
14766
|
+
},
|
|
14767
|
+
{
|
|
14768
|
+
value: built.commentPropName,
|
|
14769
|
+
name: 'commentPropName'
|
|
14770
|
+
}
|
|
14771
|
+
];
|
|
14772
|
+
for (const { value, name } of propertyNameOptions)if (value) validatePropertyName(value, name);
|
|
14773
|
+
if (null === built.onDangerousProperty) built.onDangerousProperty = defaultOnDangerousProperty;
|
|
14774
|
+
built.processEntities = normalizeProcessEntities(built.processEntities);
|
|
14775
|
+
if (built.stopNodes && Array.isArray(built.stopNodes)) built.stopNodes = built.stopNodes.map((node)=>{
|
|
14776
|
+
if ('string' == typeof node && node.startsWith('*.')) return '..' + node.substring(2);
|
|
14777
|
+
return node;
|
|
14778
|
+
});
|
|
14779
|
+
return built;
|
|
14698
14780
|
};
|
|
14699
|
-
function isExist(v) {
|
|
14700
|
-
return void 0 !== v;
|
|
14701
|
-
}
|
|
14702
14781
|
let METADATA_SYMBOL;
|
|
14703
14782
|
METADATA_SYMBOL = "function" != typeof Symbol ? "@@xmlMetadata" : Symbol("XML Node Metadata");
|
|
14704
14783
|
class XmlNode {
|
|
14705
14784
|
constructor(tagname){
|
|
14706
14785
|
this.tagname = tagname;
|
|
14707
14786
|
this.child = [];
|
|
14708
|
-
this[":@"] =
|
|
14787
|
+
this[":@"] = Object.create(null);
|
|
14709
14788
|
}
|
|
14710
14789
|
add(key, val) {
|
|
14711
14790
|
if ("__proto__" === key) key = "#__proto__";
|
|
@@ -14731,11 +14810,13 @@ and limitations under the License.
|
|
|
14731
14810
|
}
|
|
14732
14811
|
}
|
|
14733
14812
|
class DocTypeReader {
|
|
14734
|
-
constructor(
|
|
14735
|
-
this.suppressValidationErr = !
|
|
14813
|
+
constructor(options){
|
|
14814
|
+
this.suppressValidationErr = !options;
|
|
14815
|
+
this.options = options;
|
|
14736
14816
|
}
|
|
14737
14817
|
readDocType(xmlData, i) {
|
|
14738
|
-
const entities =
|
|
14818
|
+
const entities = Object.create(null);
|
|
14819
|
+
let entityCount = 0;
|
|
14739
14820
|
if ('O' === xmlData[i + 3] && 'C' === xmlData[i + 4] && 'T' === xmlData[i + 5] && 'Y' === xmlData[i + 6] && 'P' === xmlData[i + 7] && 'E' === xmlData[i + 8]) {
|
|
14740
14821
|
i += 9;
|
|
14741
14822
|
let angleBracketsCount = 1;
|
|
@@ -14756,11 +14837,13 @@ and limitations under the License.
|
|
|
14756
14837
|
let entityName, val;
|
|
14757
14838
|
[entityName, val, i] = this.readEntityExp(xmlData, i + 1, this.suppressValidationErr);
|
|
14758
14839
|
if (-1 === val.indexOf("&")) {
|
|
14759
|
-
|
|
14840
|
+
if (false !== this.options.enabled && null != this.options.maxEntityCount && entityCount >= this.options.maxEntityCount) throw new Error(`Entity count (${entityCount + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
|
14841
|
+
const escaped = entityName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
14760
14842
|
entities[entityName] = {
|
|
14761
14843
|
regx: RegExp(`&${escaped};`, "g"),
|
|
14762
14844
|
val: val
|
|
14763
14845
|
};
|
|
14846
|
+
entityCount++;
|
|
14764
14847
|
}
|
|
14765
14848
|
} else if (hasBody && hasSeq(xmlData, "!ELEMENT", i)) {
|
|
14766
14849
|
i += 8;
|
|
@@ -14784,11 +14867,9 @@ and limitations under the License.
|
|
|
14784
14867
|
}
|
|
14785
14868
|
readEntityExp(xmlData, i) {
|
|
14786
14869
|
i = skipWhitespace(xmlData, i);
|
|
14787
|
-
|
|
14788
|
-
while(i < xmlData.length && !/\s/.test(xmlData[i]) && '"' !== xmlData[i] && "'" !== xmlData[i])
|
|
14789
|
-
|
|
14790
|
-
i++;
|
|
14791
|
-
}
|
|
14870
|
+
const startIndex = i;
|
|
14871
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i]) && '"' !== xmlData[i] && "'" !== xmlData[i])i++;
|
|
14872
|
+
let entityName = xmlData.substring(startIndex, i);
|
|
14792
14873
|
validateEntityName(entityName);
|
|
14793
14874
|
i = skipWhitespace(xmlData, i);
|
|
14794
14875
|
if (!this.suppressValidationErr) {
|
|
@@ -14797,6 +14878,7 @@ and limitations under the License.
|
|
|
14797
14878
|
}
|
|
14798
14879
|
let entityValue = "";
|
|
14799
14880
|
[i, entityValue] = this.readIdentifierVal(xmlData, i, "entity");
|
|
14881
|
+
if (false !== this.options.enabled && null != this.options.maxEntitySize && entityValue.length > this.options.maxEntitySize) throw new Error(`Entity "${entityName}" size (${entityValue.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
|
14800
14882
|
i--;
|
|
14801
14883
|
return [
|
|
14802
14884
|
entityName,
|
|
@@ -14806,11 +14888,9 @@ and limitations under the License.
|
|
|
14806
14888
|
}
|
|
14807
14889
|
readNotationExp(xmlData, i) {
|
|
14808
14890
|
i = skipWhitespace(xmlData, i);
|
|
14809
|
-
|
|
14810
|
-
while(i < xmlData.length && !/\s/.test(xmlData[i]))
|
|
14811
|
-
|
|
14812
|
-
i++;
|
|
14813
|
-
}
|
|
14891
|
+
const startIndex = i;
|
|
14892
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i]))i++;
|
|
14893
|
+
let notationName = xmlData.substring(startIndex, i);
|
|
14814
14894
|
this.suppressValidationErr || validateEntityName(notationName);
|
|
14815
14895
|
i = skipWhitespace(xmlData, i);
|
|
14816
14896
|
const identifierType = xmlData.substring(i, i + 6).toUpperCase();
|
|
@@ -14839,10 +14919,9 @@ and limitations under the License.
|
|
|
14839
14919
|
const startChar = xmlData[i];
|
|
14840
14920
|
if ('"' !== startChar && "'" !== startChar) throw new Error(`Expected quoted string, found "${startChar}"`);
|
|
14841
14921
|
i++;
|
|
14842
|
-
|
|
14843
|
-
|
|
14844
|
-
|
|
14845
|
-
}
|
|
14922
|
+
const startIndex = i;
|
|
14923
|
+
while(i < xmlData.length && xmlData[i] !== startChar)i++;
|
|
14924
|
+
identifierVal = xmlData.substring(startIndex, i);
|
|
14846
14925
|
if (xmlData[i] !== startChar) throw new Error(`Unterminated ${type} value`);
|
|
14847
14926
|
i++;
|
|
14848
14927
|
return [
|
|
@@ -14852,11 +14931,9 @@ and limitations under the License.
|
|
|
14852
14931
|
}
|
|
14853
14932
|
readElementExp(xmlData, i) {
|
|
14854
14933
|
i = skipWhitespace(xmlData, i);
|
|
14855
|
-
|
|
14856
|
-
while(i < xmlData.length && !/\s/.test(xmlData[i]))
|
|
14857
|
-
|
|
14858
|
-
i++;
|
|
14859
|
-
}
|
|
14934
|
+
const startIndex = i;
|
|
14935
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i]))i++;
|
|
14936
|
+
let elementName = xmlData.substring(startIndex, i);
|
|
14860
14937
|
if (!this.suppressValidationErr && !isName(elementName)) throw new Error(`Invalid element name: "${elementName}"`);
|
|
14861
14938
|
i = skipWhitespace(xmlData, i);
|
|
14862
14939
|
let contentModel = "";
|
|
@@ -14864,10 +14941,9 @@ and limitations under the License.
|
|
|
14864
14941
|
else if ("A" === xmlData[i] && hasSeq(xmlData, "NY", i)) i += 2;
|
|
14865
14942
|
else if ("(" === xmlData[i]) {
|
|
14866
14943
|
i++;
|
|
14867
|
-
|
|
14868
|
-
|
|
14869
|
-
|
|
14870
|
-
}
|
|
14944
|
+
const startIndex = i;
|
|
14945
|
+
while(i < xmlData.length && ")" !== xmlData[i])i++;
|
|
14946
|
+
contentModel = xmlData.substring(startIndex, i);
|
|
14871
14947
|
if (")" !== xmlData[i]) throw new Error("Unterminated content model");
|
|
14872
14948
|
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${xmlData[i]}"`);
|
|
14873
14949
|
return {
|
|
@@ -14878,18 +14954,14 @@ and limitations under the License.
|
|
|
14878
14954
|
}
|
|
14879
14955
|
readAttlistExp(xmlData, i) {
|
|
14880
14956
|
i = skipWhitespace(xmlData, i);
|
|
14881
|
-
let
|
|
14882
|
-
while(i < xmlData.length && !/\s/.test(xmlData[i]))
|
|
14883
|
-
|
|
14884
|
-
i++;
|
|
14885
|
-
}
|
|
14957
|
+
let startIndex = i;
|
|
14958
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i]))i++;
|
|
14959
|
+
let elementName = xmlData.substring(startIndex, i);
|
|
14886
14960
|
validateEntityName(elementName);
|
|
14887
14961
|
i = skipWhitespace(xmlData, i);
|
|
14888
|
-
|
|
14889
|
-
while(i < xmlData.length && !/\s/.test(xmlData[i]))
|
|
14890
|
-
|
|
14891
|
-
i++;
|
|
14892
|
-
}
|
|
14962
|
+
startIndex = i;
|
|
14963
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i]))i++;
|
|
14964
|
+
let attributeName = xmlData.substring(startIndex, i);
|
|
14893
14965
|
if (!validateEntityName(attributeName)) throw new Error(`Invalid attribute name: "${attributeName}"`);
|
|
14894
14966
|
i = skipWhitespace(xmlData, i);
|
|
14895
14967
|
let attributeType = "";
|
|
@@ -14901,11 +14973,9 @@ and limitations under the License.
|
|
|
14901
14973
|
i++;
|
|
14902
14974
|
let allowedNotations = [];
|
|
14903
14975
|
while(i < xmlData.length && ")" !== xmlData[i]){
|
|
14904
|
-
|
|
14905
|
-
while(i < xmlData.length && "|" !== xmlData[i] && ")" !== xmlData[i])
|
|
14906
|
-
|
|
14907
|
-
i++;
|
|
14908
|
-
}
|
|
14976
|
+
const startIndex = i;
|
|
14977
|
+
while(i < xmlData.length && "|" !== xmlData[i] && ")" !== xmlData[i])i++;
|
|
14978
|
+
let notation = xmlData.substring(startIndex, i);
|
|
14909
14979
|
notation = notation.trim();
|
|
14910
14980
|
if (!validateEntityName(notation)) throw new Error(`Invalid notation name: "${notation}"`);
|
|
14911
14981
|
allowedNotations.push(notation);
|
|
@@ -14918,10 +14988,9 @@ and limitations under the License.
|
|
|
14918
14988
|
i++;
|
|
14919
14989
|
attributeType += " (" + allowedNotations.join("|") + ")";
|
|
14920
14990
|
} else {
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
}
|
|
14991
|
+
const startIndex = i;
|
|
14992
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i]))i++;
|
|
14993
|
+
attributeType += xmlData.substring(startIndex, i);
|
|
14925
14994
|
const validTypes = [
|
|
14926
14995
|
"CDATA",
|
|
14927
14996
|
"ID",
|
|
@@ -14970,7 +15039,8 @@ and limitations under the License.
|
|
|
14970
15039
|
hex: true,
|
|
14971
15040
|
leadingZeros: true,
|
|
14972
15041
|
decimalPoint: "\.",
|
|
14973
|
-
eNotation: true
|
|
15042
|
+
eNotation: true,
|
|
15043
|
+
infinity: "original"
|
|
14974
15044
|
};
|
|
14975
15045
|
function toNumber(str, options = {}) {
|
|
14976
15046
|
options = Object.assign({}, consider, options);
|
|
@@ -14980,6 +15050,7 @@ and limitations under the License.
|
|
|
14980
15050
|
{
|
|
14981
15051
|
if ("0" === str) return 0;
|
|
14982
15052
|
if (options.hex && hexRegex.test(trimmedStr)) return parse_int(trimmedStr, 16);
|
|
15053
|
+
if (!isFinite(trimmedStr)) return handleInfinity(str, Number(trimmedStr), options);
|
|
14983
15054
|
if (trimmedStr.includes('e') || trimmedStr.includes('E')) return resolveEnotation(str, trimmedStr, options);
|
|
14984
15055
|
const match = numRegex.exec(trimmedStr);
|
|
14985
15056
|
if (!match) return str;
|
|
@@ -15018,6 +15089,7 @@ and limitations under the License.
|
|
|
15018
15089
|
const eAdjacentToLeadingZeros = sign ? str[leadingZeros.length + 1] === eChar : str[leadingZeros.length] === eChar;
|
|
15019
15090
|
if (leadingZeros.length > 1 && eAdjacentToLeadingZeros) return str;
|
|
15020
15091
|
if (1 === leadingZeros.length && (notation[3].startsWith(`.${eChar}`) || notation[3][0] === eChar)) return Number(trimmedStr);
|
|
15092
|
+
if (!(leadingZeros.length > 0)) return Number(trimmedStr);
|
|
15021
15093
|
if (!options.leadingZeros || !!eAdjacentToLeadingZeros) return str;
|
|
15022
15094
|
trimmedStr = (notation[1] || "") + notation[3];
|
|
15023
15095
|
return Number(trimmedStr);
|
|
@@ -15038,6 +15110,20 @@ and limitations under the License.
|
|
|
15038
15110
|
if (window && window.parseInt) return window.parseInt(numStr, base);
|
|
15039
15111
|
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
|
15040
15112
|
}
|
|
15113
|
+
function handleInfinity(str, num, options) {
|
|
15114
|
+
const isPositive = num === 1 / 0;
|
|
15115
|
+
switch(options.infinity.toLowerCase()){
|
|
15116
|
+
case "null":
|
|
15117
|
+
return null;
|
|
15118
|
+
case "infinity":
|
|
15119
|
+
return num;
|
|
15120
|
+
case "string":
|
|
15121
|
+
return isPositive ? "Infinity" : "-Infinity";
|
|
15122
|
+
case "original":
|
|
15123
|
+
default:
|
|
15124
|
+
return str;
|
|
15125
|
+
}
|
|
15126
|
+
}
|
|
15041
15127
|
function getIgnoreAttributesFn(ignoreAttributes) {
|
|
15042
15128
|
if ('function' == typeof ignoreAttributes) return ignoreAttributes;
|
|
15043
15129
|
if (Array.isArray(ignoreAttributes)) return (attrName)=>{
|
|
@@ -15048,6 +15134,329 @@ and limitations under the License.
|
|
|
15048
15134
|
};
|
|
15049
15135
|
return ()=>false;
|
|
15050
15136
|
}
|
|
15137
|
+
const MUTATING_METHODS = new Set([
|
|
15138
|
+
'push',
|
|
15139
|
+
'pop',
|
|
15140
|
+
'reset',
|
|
15141
|
+
'updateCurrent',
|
|
15142
|
+
'restore'
|
|
15143
|
+
]);
|
|
15144
|
+
class Matcher {
|
|
15145
|
+
constructor(options = {}){
|
|
15146
|
+
this.separator = options.separator || '.';
|
|
15147
|
+
this.path = [];
|
|
15148
|
+
this.siblingStacks = [];
|
|
15149
|
+
}
|
|
15150
|
+
push(tagName, attrValues = null, namespace = null) {
|
|
15151
|
+
if (this.path.length > 0) {
|
|
15152
|
+
const prev = this.path[this.path.length - 1];
|
|
15153
|
+
prev.values = void 0;
|
|
15154
|
+
}
|
|
15155
|
+
const currentLevel = this.path.length;
|
|
15156
|
+
if (!this.siblingStacks[currentLevel]) this.siblingStacks[currentLevel] = new Map();
|
|
15157
|
+
const siblings = this.siblingStacks[currentLevel];
|
|
15158
|
+
const siblingKey = namespace ? `${namespace}:${tagName}` : tagName;
|
|
15159
|
+
const counter = siblings.get(siblingKey) || 0;
|
|
15160
|
+
let position = 0;
|
|
15161
|
+
for (const count of siblings.values())position += count;
|
|
15162
|
+
siblings.set(siblingKey, counter + 1);
|
|
15163
|
+
const node = {
|
|
15164
|
+
tag: tagName,
|
|
15165
|
+
position: position,
|
|
15166
|
+
counter: counter
|
|
15167
|
+
};
|
|
15168
|
+
if (null != namespace) node.namespace = namespace;
|
|
15169
|
+
if (null != attrValues) node.values = attrValues;
|
|
15170
|
+
this.path.push(node);
|
|
15171
|
+
}
|
|
15172
|
+
pop() {
|
|
15173
|
+
if (0 === this.path.length) return;
|
|
15174
|
+
const node = this.path.pop();
|
|
15175
|
+
if (this.siblingStacks.length > this.path.length + 1) this.siblingStacks.length = this.path.length + 1;
|
|
15176
|
+
return node;
|
|
15177
|
+
}
|
|
15178
|
+
updateCurrent(attrValues) {
|
|
15179
|
+
if (this.path.length > 0) {
|
|
15180
|
+
const current = this.path[this.path.length - 1];
|
|
15181
|
+
if (null != attrValues) current.values = attrValues;
|
|
15182
|
+
}
|
|
15183
|
+
}
|
|
15184
|
+
getCurrentTag() {
|
|
15185
|
+
return this.path.length > 0 ? this.path[this.path.length - 1].tag : void 0;
|
|
15186
|
+
}
|
|
15187
|
+
getCurrentNamespace() {
|
|
15188
|
+
return this.path.length > 0 ? this.path[this.path.length - 1].namespace : void 0;
|
|
15189
|
+
}
|
|
15190
|
+
getAttrValue(attrName) {
|
|
15191
|
+
if (0 === this.path.length) return;
|
|
15192
|
+
const current = this.path[this.path.length - 1];
|
|
15193
|
+
return current.values?.[attrName];
|
|
15194
|
+
}
|
|
15195
|
+
hasAttr(attrName) {
|
|
15196
|
+
if (0 === this.path.length) return false;
|
|
15197
|
+
const current = this.path[this.path.length - 1];
|
|
15198
|
+
return void 0 !== current.values && attrName in current.values;
|
|
15199
|
+
}
|
|
15200
|
+
getPosition() {
|
|
15201
|
+
if (0 === this.path.length) return -1;
|
|
15202
|
+
return this.path[this.path.length - 1].position ?? 0;
|
|
15203
|
+
}
|
|
15204
|
+
getCounter() {
|
|
15205
|
+
if (0 === this.path.length) return -1;
|
|
15206
|
+
return this.path[this.path.length - 1].counter ?? 0;
|
|
15207
|
+
}
|
|
15208
|
+
getIndex() {
|
|
15209
|
+
return this.getPosition();
|
|
15210
|
+
}
|
|
15211
|
+
getDepth() {
|
|
15212
|
+
return this.path.length;
|
|
15213
|
+
}
|
|
15214
|
+
toString(separator, includeNamespace = true) {
|
|
15215
|
+
const sep = separator || this.separator;
|
|
15216
|
+
return this.path.map((n)=>{
|
|
15217
|
+
if (includeNamespace && n.namespace) return `${n.namespace}:${n.tag}`;
|
|
15218
|
+
return n.tag;
|
|
15219
|
+
}).join(sep);
|
|
15220
|
+
}
|
|
15221
|
+
toArray() {
|
|
15222
|
+
return this.path.map((n)=>n.tag);
|
|
15223
|
+
}
|
|
15224
|
+
reset() {
|
|
15225
|
+
this.path = [];
|
|
15226
|
+
this.siblingStacks = [];
|
|
15227
|
+
}
|
|
15228
|
+
matches(expression) {
|
|
15229
|
+
const segments = expression.segments;
|
|
15230
|
+
if (0 === segments.length) return false;
|
|
15231
|
+
if (expression.hasDeepWildcard()) return this._matchWithDeepWildcard(segments);
|
|
15232
|
+
return this._matchSimple(segments);
|
|
15233
|
+
}
|
|
15234
|
+
_matchSimple(segments) {
|
|
15235
|
+
if (this.path.length !== segments.length) return false;
|
|
15236
|
+
for(let i = 0; i < segments.length; i++){
|
|
15237
|
+
const segment = segments[i];
|
|
15238
|
+
const node = this.path[i];
|
|
15239
|
+
const isCurrentNode = i === this.path.length - 1;
|
|
15240
|
+
if (!this._matchSegment(segment, node, isCurrentNode)) return false;
|
|
15241
|
+
}
|
|
15242
|
+
return true;
|
|
15243
|
+
}
|
|
15244
|
+
_matchWithDeepWildcard(segments) {
|
|
15245
|
+
let pathIdx = this.path.length - 1;
|
|
15246
|
+
let segIdx = segments.length - 1;
|
|
15247
|
+
while(segIdx >= 0 && pathIdx >= 0){
|
|
15248
|
+
const segment = segments[segIdx];
|
|
15249
|
+
if ('deep-wildcard' === segment.type) {
|
|
15250
|
+
segIdx--;
|
|
15251
|
+
if (segIdx < 0) return true;
|
|
15252
|
+
const nextSeg = segments[segIdx];
|
|
15253
|
+
let found = false;
|
|
15254
|
+
for(let i = pathIdx; i >= 0; i--){
|
|
15255
|
+
const isCurrentNode = i === this.path.length - 1;
|
|
15256
|
+
if (this._matchSegment(nextSeg, this.path[i], isCurrentNode)) {
|
|
15257
|
+
pathIdx = i - 1;
|
|
15258
|
+
segIdx--;
|
|
15259
|
+
found = true;
|
|
15260
|
+
break;
|
|
15261
|
+
}
|
|
15262
|
+
}
|
|
15263
|
+
if (!found) return false;
|
|
15264
|
+
} else {
|
|
15265
|
+
const isCurrentNode = pathIdx === this.path.length - 1;
|
|
15266
|
+
if (!this._matchSegment(segment, this.path[pathIdx], isCurrentNode)) return false;
|
|
15267
|
+
pathIdx--;
|
|
15268
|
+
segIdx--;
|
|
15269
|
+
}
|
|
15270
|
+
}
|
|
15271
|
+
return segIdx < 0;
|
|
15272
|
+
}
|
|
15273
|
+
_matchSegment(segment, node, isCurrentNode) {
|
|
15274
|
+
if ('*' !== segment.tag && segment.tag !== node.tag) return false;
|
|
15275
|
+
if (void 0 !== segment.namespace) {
|
|
15276
|
+
if ('*' !== segment.namespace && segment.namespace !== node.namespace) return false;
|
|
15277
|
+
}
|
|
15278
|
+
if (void 0 !== segment.attrName) {
|
|
15279
|
+
if (!isCurrentNode) return false;
|
|
15280
|
+
if (!node.values || !(segment.attrName in node.values)) return false;
|
|
15281
|
+
if (void 0 !== segment.attrValue) {
|
|
15282
|
+
const actualValue = node.values[segment.attrName];
|
|
15283
|
+
if (String(actualValue) !== String(segment.attrValue)) return false;
|
|
15284
|
+
}
|
|
15285
|
+
}
|
|
15286
|
+
if (void 0 !== segment.position) {
|
|
15287
|
+
if (!isCurrentNode) return false;
|
|
15288
|
+
const counter = node.counter ?? 0;
|
|
15289
|
+
if ('first' === segment.position && 0 !== counter) return false;
|
|
15290
|
+
if ('odd' === segment.position && counter % 2 !== 1) return false;
|
|
15291
|
+
if ('even' === segment.position && counter % 2 !== 0) return false;
|
|
15292
|
+
else if ('nth' === segment.position) {
|
|
15293
|
+
if (counter !== segment.positionValue) return false;
|
|
15294
|
+
}
|
|
15295
|
+
}
|
|
15296
|
+
return true;
|
|
15297
|
+
}
|
|
15298
|
+
snapshot() {
|
|
15299
|
+
return {
|
|
15300
|
+
path: this.path.map((node)=>({
|
|
15301
|
+
...node
|
|
15302
|
+
})),
|
|
15303
|
+
siblingStacks: this.siblingStacks.map((map)=>new Map(map))
|
|
15304
|
+
};
|
|
15305
|
+
}
|
|
15306
|
+
restore(snapshot) {
|
|
15307
|
+
this.path = snapshot.path.map((node)=>({
|
|
15308
|
+
...node
|
|
15309
|
+
}));
|
|
15310
|
+
this.siblingStacks = snapshot.siblingStacks.map((map)=>new Map(map));
|
|
15311
|
+
}
|
|
15312
|
+
readOnly() {
|
|
15313
|
+
const self1 = this;
|
|
15314
|
+
return new Proxy(self1, {
|
|
15315
|
+
get (target, prop, receiver) {
|
|
15316
|
+
if (MUTATING_METHODS.has(prop)) return ()=>{
|
|
15317
|
+
throw new TypeError(`Cannot call '${prop}' on a read-only Matcher. Obtain a writable instance to mutate state.`);
|
|
15318
|
+
};
|
|
15319
|
+
const value = Reflect.get(target, prop, receiver);
|
|
15320
|
+
if ('path' === prop || 'siblingStacks' === prop) return Object.freeze(Array.isArray(value) ? value.map((item)=>item instanceof Map ? Object.freeze(new Map(item)) : Object.freeze({
|
|
15321
|
+
...item
|
|
15322
|
+
})) : value);
|
|
15323
|
+
if ('function' == typeof value) return value.bind(target);
|
|
15324
|
+
return value;
|
|
15325
|
+
},
|
|
15326
|
+
set (_target, prop) {
|
|
15327
|
+
throw new TypeError(`Cannot set property '${String(prop)}' on a read-only Matcher.`);
|
|
15328
|
+
},
|
|
15329
|
+
deleteProperty (_target, prop) {
|
|
15330
|
+
throw new TypeError(`Cannot delete property '${String(prop)}' from a read-only Matcher.`);
|
|
15331
|
+
}
|
|
15332
|
+
});
|
|
15333
|
+
}
|
|
15334
|
+
}
|
|
15335
|
+
class Expression {
|
|
15336
|
+
constructor(pattern, options = {}){
|
|
15337
|
+
this.pattern = pattern;
|
|
15338
|
+
this.separator = options.separator || '.';
|
|
15339
|
+
this.segments = this._parse(pattern);
|
|
15340
|
+
this._hasDeepWildcard = this.segments.some((seg)=>'deep-wildcard' === seg.type);
|
|
15341
|
+
this._hasAttributeCondition = this.segments.some((seg)=>void 0 !== seg.attrName);
|
|
15342
|
+
this._hasPositionSelector = this.segments.some((seg)=>void 0 !== seg.position);
|
|
15343
|
+
}
|
|
15344
|
+
_parse(pattern) {
|
|
15345
|
+
const segments = [];
|
|
15346
|
+
let i = 0;
|
|
15347
|
+
let currentPart = '';
|
|
15348
|
+
while(i < pattern.length)if (pattern[i] === this.separator) if (i + 1 < pattern.length && pattern[i + 1] === this.separator) {
|
|
15349
|
+
if (currentPart.trim()) {
|
|
15350
|
+
segments.push(this._parseSegment(currentPart.trim()));
|
|
15351
|
+
currentPart = '';
|
|
15352
|
+
}
|
|
15353
|
+
segments.push({
|
|
15354
|
+
type: 'deep-wildcard'
|
|
15355
|
+
});
|
|
15356
|
+
i += 2;
|
|
15357
|
+
} else {
|
|
15358
|
+
if (currentPart.trim()) segments.push(this._parseSegment(currentPart.trim()));
|
|
15359
|
+
currentPart = '';
|
|
15360
|
+
i++;
|
|
15361
|
+
}
|
|
15362
|
+
else {
|
|
15363
|
+
currentPart += pattern[i];
|
|
15364
|
+
i++;
|
|
15365
|
+
}
|
|
15366
|
+
if (currentPart.trim()) segments.push(this._parseSegment(currentPart.trim()));
|
|
15367
|
+
return segments;
|
|
15368
|
+
}
|
|
15369
|
+
_parseSegment(part) {
|
|
15370
|
+
const segment = {
|
|
15371
|
+
type: 'tag'
|
|
15372
|
+
};
|
|
15373
|
+
let bracketContent = null;
|
|
15374
|
+
let withoutBrackets = part;
|
|
15375
|
+
const bracketMatch = part.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);
|
|
15376
|
+
if (bracketMatch) {
|
|
15377
|
+
withoutBrackets = bracketMatch[1] + bracketMatch[3];
|
|
15378
|
+
if (bracketMatch[2]) {
|
|
15379
|
+
const content = bracketMatch[2].slice(1, -1);
|
|
15380
|
+
if (content) bracketContent = content;
|
|
15381
|
+
}
|
|
15382
|
+
}
|
|
15383
|
+
let namespace;
|
|
15384
|
+
let tagAndPosition = withoutBrackets;
|
|
15385
|
+
if (withoutBrackets.includes('::')) {
|
|
15386
|
+
const nsIndex = withoutBrackets.indexOf('::');
|
|
15387
|
+
namespace = withoutBrackets.substring(0, nsIndex).trim();
|
|
15388
|
+
tagAndPosition = withoutBrackets.substring(nsIndex + 2).trim();
|
|
15389
|
+
if (!namespace) throw new Error(`Invalid namespace in pattern: ${part}`);
|
|
15390
|
+
}
|
|
15391
|
+
let tag;
|
|
15392
|
+
let positionMatch = null;
|
|
15393
|
+
if (tagAndPosition.includes(':')) {
|
|
15394
|
+
const colonIndex = tagAndPosition.lastIndexOf(':');
|
|
15395
|
+
const tagPart = tagAndPosition.substring(0, colonIndex).trim();
|
|
15396
|
+
const posPart = tagAndPosition.substring(colonIndex + 1).trim();
|
|
15397
|
+
const isPositionKeyword = [
|
|
15398
|
+
'first',
|
|
15399
|
+
'last',
|
|
15400
|
+
'odd',
|
|
15401
|
+
'even'
|
|
15402
|
+
].includes(posPart) || /^nth\(\d+\)$/.test(posPart);
|
|
15403
|
+
if (isPositionKeyword) {
|
|
15404
|
+
tag = tagPart;
|
|
15405
|
+
positionMatch = posPart;
|
|
15406
|
+
} else tag = tagAndPosition;
|
|
15407
|
+
} else tag = tagAndPosition;
|
|
15408
|
+
if (!tag) throw new Error(`Invalid segment pattern: ${part}`);
|
|
15409
|
+
segment.tag = tag;
|
|
15410
|
+
if (namespace) segment.namespace = namespace;
|
|
15411
|
+
if (bracketContent) if (bracketContent.includes('=')) {
|
|
15412
|
+
const eqIndex = bracketContent.indexOf('=');
|
|
15413
|
+
segment.attrName = bracketContent.substring(0, eqIndex).trim();
|
|
15414
|
+
segment.attrValue = bracketContent.substring(eqIndex + 1).trim();
|
|
15415
|
+
} else segment.attrName = bracketContent.trim();
|
|
15416
|
+
if (positionMatch) {
|
|
15417
|
+
const nthMatch = positionMatch.match(/^nth\((\d+)\)$/);
|
|
15418
|
+
if (nthMatch) {
|
|
15419
|
+
segment.position = 'nth';
|
|
15420
|
+
segment.positionValue = parseInt(nthMatch[1], 10);
|
|
15421
|
+
} else segment.position = positionMatch;
|
|
15422
|
+
}
|
|
15423
|
+
return segment;
|
|
15424
|
+
}
|
|
15425
|
+
get length() {
|
|
15426
|
+
return this.segments.length;
|
|
15427
|
+
}
|
|
15428
|
+
hasDeepWildcard() {
|
|
15429
|
+
return this._hasDeepWildcard;
|
|
15430
|
+
}
|
|
15431
|
+
hasAttributeCondition() {
|
|
15432
|
+
return this._hasAttributeCondition;
|
|
15433
|
+
}
|
|
15434
|
+
hasPositionSelector() {
|
|
15435
|
+
return this._hasPositionSelector;
|
|
15436
|
+
}
|
|
15437
|
+
toString() {
|
|
15438
|
+
return this.pattern;
|
|
15439
|
+
}
|
|
15440
|
+
}
|
|
15441
|
+
function extractRawAttributes(prefixedAttrs, options) {
|
|
15442
|
+
if (!prefixedAttrs) return {};
|
|
15443
|
+
const attrs = options.attributesGroupName ? prefixedAttrs[options.attributesGroupName] : prefixedAttrs;
|
|
15444
|
+
if (!attrs) return {};
|
|
15445
|
+
const rawAttrs = {};
|
|
15446
|
+
for(const key in attrs)if (key.startsWith(options.attributeNamePrefix)) {
|
|
15447
|
+
const rawName = key.substring(options.attributeNamePrefix.length);
|
|
15448
|
+
rawAttrs[rawName] = attrs[key];
|
|
15449
|
+
} else rawAttrs[key] = attrs[key];
|
|
15450
|
+
return rawAttrs;
|
|
15451
|
+
}
|
|
15452
|
+
function extractNamespace(rawTagName) {
|
|
15453
|
+
if (!rawTagName || 'string' != typeof rawTagName) return;
|
|
15454
|
+
const colonIndex = rawTagName.indexOf(':');
|
|
15455
|
+
if (-1 !== colonIndex && colonIndex > 0) {
|
|
15456
|
+
const ns = rawTagName.substring(0, colonIndex);
|
|
15457
|
+
if ('xmlns' !== ns) return ns;
|
|
15458
|
+
}
|
|
15459
|
+
}
|
|
15051
15460
|
class OrderedObjParser {
|
|
15052
15461
|
constructor(options){
|
|
15053
15462
|
this.options = options;
|
|
@@ -15129,13 +15538,17 @@ and limitations under the License.
|
|
|
15129
15538
|
this.saveTextToParentTag = saveTextToParentTag;
|
|
15130
15539
|
this.addChild = addChild;
|
|
15131
15540
|
this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes);
|
|
15541
|
+
this.entityExpansionCount = 0;
|
|
15542
|
+
this.currentExpandedLength = 0;
|
|
15543
|
+
this.matcher = new Matcher();
|
|
15544
|
+
this.readonlyMatcher = this.matcher.readOnly();
|
|
15545
|
+
this.isCurrentNodeStopNode = false;
|
|
15132
15546
|
if (this.options.stopNodes && this.options.stopNodes.length > 0) {
|
|
15133
|
-
this.
|
|
15134
|
-
this.stopNodesWildcard = new Set();
|
|
15547
|
+
this.stopNodeExpressions = [];
|
|
15135
15548
|
for(let i = 0; i < this.options.stopNodes.length; i++){
|
|
15136
15549
|
const stopNodeExp = this.options.stopNodes[i];
|
|
15137
|
-
if ('string' == typeof stopNodeExp)
|
|
15138
|
-
else this.
|
|
15550
|
+
if ('string' == typeof stopNodeExp) this.stopNodeExpressions.push(new Expression(stopNodeExp));
|
|
15551
|
+
else if (stopNodeExp instanceof Expression) this.stopNodeExpressions.push(stopNodeExp);
|
|
15139
15552
|
}
|
|
15140
15553
|
}
|
|
15141
15554
|
}
|
|
@@ -15155,8 +15568,9 @@ and limitations under the License.
|
|
|
15155
15568
|
if (void 0 !== val) {
|
|
15156
15569
|
if (this.options.trimValues && !dontTrim) val = val.trim();
|
|
15157
15570
|
if (val.length > 0) {
|
|
15158
|
-
if (!escapeEntities) val = this.replaceEntitiesValue(val);
|
|
15159
|
-
const
|
|
15571
|
+
if (!escapeEntities) val = this.replaceEntitiesValue(val, tagName, jPath);
|
|
15572
|
+
const jPathOrMatcher = this.options.jPath ? jPath.toString() : jPath;
|
|
15573
|
+
const newval = this.options.tagValueProcessor(tagName, val, jPathOrMatcher, hasAttributes, isLeafNode);
|
|
15160
15574
|
if (null == newval) return val;
|
|
15161
15575
|
{
|
|
15162
15576
|
if (typeof newval !== typeof val || newval !== val) return newval;
|
|
@@ -15178,23 +15592,37 @@ and limitations under the License.
|
|
|
15178
15592
|
return tagname;
|
|
15179
15593
|
}
|
|
15180
15594
|
const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?', 'gm');
|
|
15181
|
-
function buildAttributesMap(attrStr, jPath) {
|
|
15595
|
+
function buildAttributesMap(attrStr, jPath, tagName) {
|
|
15182
15596
|
if (true !== this.options.ignoreAttributes && 'string' == typeof attrStr) {
|
|
15183
15597
|
const matches = getAllMatches(attrStr, attrsRegx);
|
|
15184
15598
|
const len = matches.length;
|
|
15185
15599
|
const attrs = {};
|
|
15600
|
+
const rawAttrsForMatcher = {};
|
|
15186
15601
|
for(let i = 0; i < len; i++){
|
|
15187
15602
|
const attrName = this.resolveNameSpace(matches[i][1]);
|
|
15188
|
-
|
|
15603
|
+
const oldVal = matches[i][4];
|
|
15604
|
+
if (attrName.length && void 0 !== oldVal) {
|
|
15605
|
+
let parsedVal = oldVal;
|
|
15606
|
+
if (this.options.trimValues) parsedVal = parsedVal.trim();
|
|
15607
|
+
parsedVal = this.replaceEntitiesValue(parsedVal, tagName, this.readonlyMatcher);
|
|
15608
|
+
rawAttrsForMatcher[attrName] = parsedVal;
|
|
15609
|
+
}
|
|
15610
|
+
}
|
|
15611
|
+
if (Object.keys(rawAttrsForMatcher).length > 0 && 'object' == typeof jPath && jPath.updateCurrent) jPath.updateCurrent(rawAttrsForMatcher);
|
|
15612
|
+
for(let i = 0; i < len; i++){
|
|
15613
|
+
const attrName = this.resolveNameSpace(matches[i][1]);
|
|
15614
|
+
const jPathStr = this.options.jPath ? jPath.toString() : this.readonlyMatcher;
|
|
15615
|
+
if (this.ignoreAttributesFn(attrName, jPathStr)) continue;
|
|
15189
15616
|
let oldVal = matches[i][4];
|
|
15190
15617
|
let aName = this.options.attributeNamePrefix + attrName;
|
|
15191
15618
|
if (attrName.length) {
|
|
15192
15619
|
if (this.options.transformAttributeName) aName = this.options.transformAttributeName(aName);
|
|
15193
|
-
|
|
15620
|
+
aName = sanitizeName(aName, this.options);
|
|
15194
15621
|
if (void 0 !== oldVal) {
|
|
15195
15622
|
if (this.options.trimValues) oldVal = oldVal.trim();
|
|
15196
|
-
oldVal = this.replaceEntitiesValue(oldVal);
|
|
15197
|
-
const
|
|
15623
|
+
oldVal = this.replaceEntitiesValue(oldVal, tagName, this.readonlyMatcher);
|
|
15624
|
+
const jPathOrMatcher = this.options.jPath ? jPath.toString() : this.readonlyMatcher;
|
|
15625
|
+
const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPathOrMatcher);
|
|
15198
15626
|
if (null == newVal) attrs[aName] = oldVal;
|
|
15199
15627
|
else if (typeof newVal !== typeof oldVal || newVal !== oldVal) attrs[aName] = newVal;
|
|
15200
15628
|
else attrs[aName] = parseValue(oldVal, this.options.parseAttributeValue, this.options.numberParseOptions);
|
|
@@ -15215,7 +15643,9 @@ and limitations under the License.
|
|
|
15215
15643
|
const xmlObj = new XmlNode('!xml');
|
|
15216
15644
|
let currentNode = xmlObj;
|
|
15217
15645
|
let textData = "";
|
|
15218
|
-
|
|
15646
|
+
this.matcher.reset();
|
|
15647
|
+
this.entityExpansionCount = 0;
|
|
15648
|
+
this.currentExpandedLength = 0;
|
|
15219
15649
|
const docTypeReader = new DocTypeReader(this.options.processEntities);
|
|
15220
15650
|
for(let i = 0; i < xmlData.length; i++){
|
|
15221
15651
|
const ch = xmlData[i];
|
|
@@ -15226,36 +15656,36 @@ and limitations under the License.
|
|
|
15226
15656
|
const colonIndex = tagName.indexOf(":");
|
|
15227
15657
|
if (-1 !== colonIndex) tagName = tagName.substr(colonIndex + 1);
|
|
15228
15658
|
}
|
|
15229
|
-
|
|
15230
|
-
if (currentNode) textData = this.saveTextToParentTag(textData, currentNode,
|
|
15231
|
-
const lastTagName =
|
|
15659
|
+
tagName = transformTagName(this.options.transformTagName, tagName, "", this.options).tagName;
|
|
15660
|
+
if (currentNode) textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
|
|
15661
|
+
const lastTagName = this.matcher.getCurrentTag();
|
|
15232
15662
|
if (tagName && -1 !== this.options.unpairedTags.indexOf(tagName)) throw new Error(`Unpaired tag can not be used as closing tag: </${tagName}>`);
|
|
15233
|
-
let propIndex = 0;
|
|
15234
15663
|
if (lastTagName && -1 !== this.options.unpairedTags.indexOf(lastTagName)) {
|
|
15235
|
-
|
|
15664
|
+
this.matcher.pop();
|
|
15236
15665
|
this.tagsNodeStack.pop();
|
|
15237
|
-
}
|
|
15238
|
-
|
|
15666
|
+
}
|
|
15667
|
+
this.matcher.pop();
|
|
15668
|
+
this.isCurrentNodeStopNode = false;
|
|
15239
15669
|
currentNode = this.tagsNodeStack.pop();
|
|
15240
15670
|
textData = "";
|
|
15241
15671
|
i = closeIndex;
|
|
15242
15672
|
} else if ('?' === xmlData[i + 1]) {
|
|
15243
15673
|
let tagData = readTagExp(xmlData, i, false, "?>");
|
|
15244
15674
|
if (!tagData) throw new Error("Pi Tag is not closed.");
|
|
15245
|
-
textData = this.saveTextToParentTag(textData, currentNode,
|
|
15675
|
+
textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
|
|
15246
15676
|
if (this.options.ignoreDeclaration && "?xml" === tagData.tagName || this.options.ignorePiTags) ;
|
|
15247
15677
|
else {
|
|
15248
15678
|
const childNode = new XmlNode(tagData.tagName);
|
|
15249
15679
|
childNode.add(this.options.textNodeName, "");
|
|
15250
|
-
if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) childNode[":@"] = this.buildAttributesMap(tagData.tagExp,
|
|
15251
|
-
this.addChild(currentNode, childNode,
|
|
15680
|
+
if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) childNode[":@"] = this.buildAttributesMap(tagData.tagExp, this.matcher, tagData.tagName);
|
|
15681
|
+
this.addChild(currentNode, childNode, this.readonlyMatcher, i);
|
|
15252
15682
|
}
|
|
15253
15683
|
i = tagData.closeIndex + 1;
|
|
15254
15684
|
} else if ('!--' === xmlData.substr(i + 1, 3)) {
|
|
15255
15685
|
const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed.");
|
|
15256
15686
|
if (this.options.commentPropName) {
|
|
15257
15687
|
const comment = xmlData.substring(i + 4, endIndex - 2);
|
|
15258
|
-
textData = this.saveTextToParentTag(textData, currentNode,
|
|
15688
|
+
textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
|
|
15259
15689
|
currentNode.add(this.options.commentPropName, [
|
|
15260
15690
|
{
|
|
15261
15691
|
[this.options.textNodeName]: comment
|
|
@@ -15270,8 +15700,8 @@ and limitations under the License.
|
|
|
15270
15700
|
} else if ('![' === xmlData.substr(i + 1, 2)) {
|
|
15271
15701
|
const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2;
|
|
15272
15702
|
const tagExp = xmlData.substring(i + 9, closeIndex);
|
|
15273
|
-
textData = this.saveTextToParentTag(textData, currentNode,
|
|
15274
|
-
let val = this.parseTextData(tagExp, currentNode.tagname,
|
|
15703
|
+
textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
|
|
15704
|
+
let val = this.parseTextData(tagExp, currentNode.tagname, this.readonlyMatcher, true, false, true, true);
|
|
15275
15705
|
if (void 0 == val) val = "";
|
|
15276
15706
|
if (this.options.cdataPropName) currentNode.add(this.options.cdataPropName, [
|
|
15277
15707
|
{
|
|
@@ -15282,36 +15712,48 @@ and limitations under the License.
|
|
|
15282
15712
|
i = closeIndex + 2;
|
|
15283
15713
|
} else {
|
|
15284
15714
|
let result = readTagExp(xmlData, i, this.options.removeNSPrefix);
|
|
15715
|
+
if (!result) {
|
|
15716
|
+
const context = xmlData.substring(Math.max(0, i - 50), Math.min(xmlData.length, i + 50));
|
|
15717
|
+
throw new Error(`readTagExp returned undefined at position ${i}. Context: "${context}"`);
|
|
15718
|
+
}
|
|
15285
15719
|
let tagName = result.tagName;
|
|
15286
15720
|
const rawTagName = result.rawTagName;
|
|
15287
15721
|
let tagExp = result.tagExp;
|
|
15288
15722
|
let attrExpPresent = result.attrExpPresent;
|
|
15289
15723
|
let closeIndex = result.closeIndex;
|
|
15290
|
-
|
|
15291
|
-
|
|
15292
|
-
if (tagExp === tagName) tagExp = newTagName;
|
|
15293
|
-
tagName = newTagName;
|
|
15294
|
-
}
|
|
15724
|
+
({ tagName, tagExp } = transformTagName(this.options.transformTagName, tagName, tagExp, this.options));
|
|
15725
|
+
if (this.options.strictReservedNames && (tagName === this.options.commentPropName || tagName === this.options.cdataPropName || tagName === this.options.textNodeName || tagName === this.options.attributesGroupName)) throw new Error(`Invalid tag name: ${tagName}`);
|
|
15295
15726
|
if (currentNode && textData) {
|
|
15296
|
-
if ('!xml' !== currentNode.tagname) textData = this.saveTextToParentTag(textData, currentNode,
|
|
15727
|
+
if ('!xml' !== currentNode.tagname) textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher, false);
|
|
15297
15728
|
}
|
|
15298
15729
|
const lastTag = currentNode;
|
|
15299
15730
|
if (lastTag && -1 !== this.options.unpairedTags.indexOf(lastTag.tagname)) {
|
|
15300
15731
|
currentNode = this.tagsNodeStack.pop();
|
|
15301
|
-
|
|
15302
|
-
}
|
|
15303
|
-
|
|
15732
|
+
this.matcher.pop();
|
|
15733
|
+
}
|
|
15734
|
+
let isSelfClosing = false;
|
|
15735
|
+
if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) {
|
|
15736
|
+
isSelfClosing = true;
|
|
15737
|
+
if ("/" === tagName[tagName.length - 1]) {
|
|
15738
|
+
tagName = tagName.substr(0, tagName.length - 1);
|
|
15739
|
+
tagExp = tagName;
|
|
15740
|
+
} else tagExp = tagExp.substr(0, tagExp.length - 1);
|
|
15741
|
+
attrExpPresent = tagName !== tagExp;
|
|
15742
|
+
}
|
|
15743
|
+
let prefixedAttrs = null;
|
|
15744
|
+
let namespace;
|
|
15745
|
+
namespace = extractNamespace(rawTagName);
|
|
15746
|
+
if (tagName !== xmlObj.tagname) this.matcher.push(tagName, {}, namespace);
|
|
15747
|
+
if (tagName !== tagExp && attrExpPresent) {
|
|
15748
|
+
prefixedAttrs = this.buildAttributesMap(tagExp, this.matcher, tagName);
|
|
15749
|
+
if (prefixedAttrs) extractRawAttributes(prefixedAttrs, this.options);
|
|
15750
|
+
}
|
|
15751
|
+
if (tagName !== xmlObj.tagname) this.isCurrentNodeStopNode = this.isItStopNode(this.stopNodeExpressions, this.matcher);
|
|
15304
15752
|
const startIndex = i;
|
|
15305
|
-
if (this.
|
|
15753
|
+
if (this.isCurrentNodeStopNode) {
|
|
15306
15754
|
let tagContent = "";
|
|
15307
|
-
if (
|
|
15308
|
-
|
|
15309
|
-
tagName = tagName.substr(0, tagName.length - 1);
|
|
15310
|
-
jPath = jPath.substr(0, jPath.length - 1);
|
|
15311
|
-
tagExp = tagName;
|
|
15312
|
-
} else tagExp = tagExp.substr(0, tagExp.length - 1);
|
|
15313
|
-
i = result.closeIndex;
|
|
15314
|
-
} else if (-1 !== this.options.unpairedTags.indexOf(tagName)) i = result.closeIndex;
|
|
15755
|
+
if (isSelfClosing) i = result.closeIndex;
|
|
15756
|
+
else if (-1 !== this.options.unpairedTags.indexOf(tagName)) i = result.closeIndex;
|
|
15315
15757
|
else {
|
|
15316
15758
|
const result = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);
|
|
15317
15759
|
if (!result) throw new Error(`Unexpected end of ${rawTagName}`);
|
|
@@ -15319,32 +15761,33 @@ and limitations under the License.
|
|
|
15319
15761
|
tagContent = result.tagContent;
|
|
15320
15762
|
}
|
|
15321
15763
|
const childNode = new XmlNode(tagName);
|
|
15322
|
-
if (
|
|
15323
|
-
if (tagContent) tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);
|
|
15324
|
-
jPath = jPath.substr(0, jPath.lastIndexOf("."));
|
|
15764
|
+
if (prefixedAttrs) childNode[":@"] = prefixedAttrs;
|
|
15325
15765
|
childNode.add(this.options.textNodeName, tagContent);
|
|
15326
|
-
this.
|
|
15766
|
+
this.matcher.pop();
|
|
15767
|
+
this.isCurrentNodeStopNode = false;
|
|
15768
|
+
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
|
|
15327
15769
|
} else {
|
|
15328
|
-
if (
|
|
15329
|
-
|
|
15330
|
-
tagName = tagName.substr(0, tagName.length - 1);
|
|
15331
|
-
jPath = jPath.substr(0, jPath.length - 1);
|
|
15332
|
-
tagExp = tagName;
|
|
15333
|
-
} else tagExp = tagExp.substr(0, tagExp.length - 1);
|
|
15334
|
-
if (this.options.transformTagName) {
|
|
15335
|
-
const newTagName = this.options.transformTagName(tagName);
|
|
15336
|
-
if (tagExp === tagName) tagExp = newTagName;
|
|
15337
|
-
tagName = newTagName;
|
|
15338
|
-
}
|
|
15770
|
+
if (isSelfClosing) {
|
|
15771
|
+
({ tagName, tagExp } = transformTagName(this.options.transformTagName, tagName, tagExp, this.options));
|
|
15339
15772
|
const childNode = new XmlNode(tagName);
|
|
15340
|
-
if (
|
|
15341
|
-
this.addChild(currentNode, childNode,
|
|
15342
|
-
|
|
15773
|
+
if (prefixedAttrs) childNode[":@"] = prefixedAttrs;
|
|
15774
|
+
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
|
|
15775
|
+
this.matcher.pop();
|
|
15776
|
+
this.isCurrentNodeStopNode = false;
|
|
15777
|
+
} else if (-1 !== this.options.unpairedTags.indexOf(tagName)) {
|
|
15778
|
+
const childNode = new XmlNode(tagName);
|
|
15779
|
+
if (prefixedAttrs) childNode[":@"] = prefixedAttrs;
|
|
15780
|
+
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
|
|
15781
|
+
this.matcher.pop();
|
|
15782
|
+
this.isCurrentNodeStopNode = false;
|
|
15783
|
+
i = result.closeIndex;
|
|
15784
|
+
continue;
|
|
15343
15785
|
} else {
|
|
15344
15786
|
const childNode = new XmlNode(tagName);
|
|
15787
|
+
if (this.tagsNodeStack.length > this.options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
|
|
15345
15788
|
this.tagsNodeStack.push(currentNode);
|
|
15346
|
-
if (
|
|
15347
|
-
this.addChild(currentNode, childNode,
|
|
15789
|
+
if (prefixedAttrs) childNode[":@"] = prefixedAttrs;
|
|
15790
|
+
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
|
|
15348
15791
|
currentNode = childNode;
|
|
15349
15792
|
}
|
|
15350
15793
|
textData = "";
|
|
@@ -15355,45 +15798,76 @@ and limitations under the License.
|
|
|
15355
15798
|
}
|
|
15356
15799
|
return xmlObj.child;
|
|
15357
15800
|
};
|
|
15358
|
-
function addChild(currentNode, childNode,
|
|
15801
|
+
function addChild(currentNode, childNode, matcher, startIndex) {
|
|
15359
15802
|
if (!this.options.captureMetaData) startIndex = void 0;
|
|
15360
|
-
const
|
|
15803
|
+
const jPathOrMatcher = this.options.jPath ? matcher.toString() : matcher;
|
|
15804
|
+
const result = this.options.updateTag(childNode.tagname, jPathOrMatcher, childNode[":@"]);
|
|
15361
15805
|
if (false === result) ;
|
|
15362
15806
|
else if ("string" == typeof result) {
|
|
15363
15807
|
childNode.tagname = result;
|
|
15364
15808
|
currentNode.addChild(childNode, startIndex);
|
|
15365
15809
|
} else currentNode.addChild(childNode, startIndex);
|
|
15366
15810
|
}
|
|
15367
|
-
|
|
15368
|
-
|
|
15369
|
-
|
|
15370
|
-
|
|
15811
|
+
function replaceEntitiesValue(val, tagName, jPath) {
|
|
15812
|
+
const entityConfig = this.options.processEntities;
|
|
15813
|
+
if (!entityConfig || !entityConfig.enabled) return val;
|
|
15814
|
+
if (entityConfig.allowedTags) {
|
|
15815
|
+
const jPathOrMatcher = this.options.jPath ? jPath.toString() : jPath;
|
|
15816
|
+
const allowed = Array.isArray(entityConfig.allowedTags) ? entityConfig.allowedTags.includes(tagName) : entityConfig.allowedTags(tagName, jPathOrMatcher);
|
|
15817
|
+
if (!allowed) return val;
|
|
15818
|
+
}
|
|
15819
|
+
if (entityConfig.tagFilter) {
|
|
15820
|
+
const jPathOrMatcher = this.options.jPath ? jPath.toString() : jPath;
|
|
15821
|
+
if (!entityConfig.tagFilter(tagName, jPathOrMatcher)) return val;
|
|
15822
|
+
}
|
|
15823
|
+
for (const entityName of Object.keys(this.docTypeEntities)){
|
|
15824
|
+
const entity = this.docTypeEntities[entityName];
|
|
15825
|
+
const matches = val.match(entity.regx);
|
|
15826
|
+
if (matches) {
|
|
15827
|
+
this.entityExpansionCount += matches.length;
|
|
15828
|
+
if (entityConfig.maxTotalExpansions && this.entityExpansionCount > entityConfig.maxTotalExpansions) throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${entityConfig.maxTotalExpansions}`);
|
|
15829
|
+
const lengthBefore = val.length;
|
|
15371
15830
|
val = val.replace(entity.regx, entity.val);
|
|
15831
|
+
if (entityConfig.maxExpandedLength) {
|
|
15832
|
+
this.currentExpandedLength += val.length - lengthBefore;
|
|
15833
|
+
if (this.currentExpandedLength > entityConfig.maxExpandedLength) throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${entityConfig.maxExpandedLength}`);
|
|
15834
|
+
}
|
|
15372
15835
|
}
|
|
15373
|
-
|
|
15374
|
-
|
|
15375
|
-
|
|
15836
|
+
}
|
|
15837
|
+
for (const entityName of Object.keys(this.lastEntities)){
|
|
15838
|
+
const entity = this.lastEntities[entityName];
|
|
15839
|
+
const matches = val.match(entity.regex);
|
|
15840
|
+
if (matches) {
|
|
15841
|
+
this.entityExpansionCount += matches.length;
|
|
15842
|
+
if (entityConfig.maxTotalExpansions && this.entityExpansionCount > entityConfig.maxTotalExpansions) throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${entityConfig.maxTotalExpansions}`);
|
|
15376
15843
|
}
|
|
15377
|
-
|
|
15378
|
-
|
|
15379
|
-
|
|
15844
|
+
val = val.replace(entity.regex, entity.val);
|
|
15845
|
+
}
|
|
15846
|
+
if (-1 === val.indexOf('&')) return val;
|
|
15847
|
+
if (this.options.htmlEntities) for (const entityName of Object.keys(this.htmlEntities)){
|
|
15848
|
+
const entity = this.htmlEntities[entityName];
|
|
15849
|
+
const matches = val.match(entity.regex);
|
|
15850
|
+
if (matches) {
|
|
15851
|
+
this.entityExpansionCount += matches.length;
|
|
15852
|
+
if (entityConfig.maxTotalExpansions && this.entityExpansionCount > entityConfig.maxTotalExpansions) throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${entityConfig.maxTotalExpansions}`);
|
|
15380
15853
|
}
|
|
15381
|
-
val = val.replace(
|
|
15854
|
+
val = val.replace(entity.regex, entity.val);
|
|
15382
15855
|
}
|
|
15856
|
+
val = val.replace(this.ampEntity.regex, this.ampEntity.val);
|
|
15383
15857
|
return val;
|
|
15384
|
-
}
|
|
15385
|
-
function saveTextToParentTag(textData,
|
|
15858
|
+
}
|
|
15859
|
+
function saveTextToParentTag(textData, parentNode, matcher, isLeafNode) {
|
|
15386
15860
|
if (textData) {
|
|
15387
|
-
if (void 0 === isLeafNode) isLeafNode = 0 ===
|
|
15388
|
-
textData = this.parseTextData(textData,
|
|
15389
|
-
if (void 0 !== textData && "" !== textData)
|
|
15861
|
+
if (void 0 === isLeafNode) isLeafNode = 0 === parentNode.child.length;
|
|
15862
|
+
textData = this.parseTextData(textData, parentNode.tagname, matcher, false, parentNode[":@"] ? 0 !== Object.keys(parentNode[":@"]).length : false, isLeafNode);
|
|
15863
|
+
if (void 0 !== textData && "" !== textData) parentNode.add(this.options.textNodeName, textData);
|
|
15390
15864
|
textData = "";
|
|
15391
15865
|
}
|
|
15392
15866
|
return textData;
|
|
15393
15867
|
}
|
|
15394
|
-
function isItStopNode(
|
|
15395
|
-
if (
|
|
15396
|
-
|
|
15868
|
+
function isItStopNode(stopNodeExpressions, matcher) {
|
|
15869
|
+
if (!stopNodeExpressions || 0 === stopNodeExpressions.length) return false;
|
|
15870
|
+
for(let i = 0; i < stopNodeExpressions.length; i++)if (matcher.matches(stopNodeExpressions[i])) return true;
|
|
15397
15871
|
return false;
|
|
15398
15872
|
}
|
|
15399
15873
|
function tagExpWithClosingIndex(xmlData, i, closingChar = ">") {
|
|
@@ -15497,39 +15971,72 @@ and limitations under the License.
|
|
|
15497
15971
|
if (codePoint >= 0 && codePoint <= 0x10FFFF) return String.fromCodePoint(codePoint);
|
|
15498
15972
|
return prefix + str + ";";
|
|
15499
15973
|
}
|
|
15500
|
-
|
|
15501
|
-
|
|
15502
|
-
|
|
15974
|
+
function transformTagName(fn, tagName, tagExp, options) {
|
|
15975
|
+
if (fn) {
|
|
15976
|
+
const newTagName = fn(tagName);
|
|
15977
|
+
if (tagExp === tagName) tagExp = newTagName;
|
|
15978
|
+
tagName = newTagName;
|
|
15979
|
+
}
|
|
15980
|
+
tagName = sanitizeName(tagName, options);
|
|
15981
|
+
return {
|
|
15982
|
+
tagName,
|
|
15983
|
+
tagExp
|
|
15984
|
+
};
|
|
15503
15985
|
}
|
|
15504
|
-
function
|
|
15986
|
+
function sanitizeName(name, options) {
|
|
15987
|
+
if (criticalProperties.includes(name)) throw new Error(`[SECURITY] Invalid name: "${name}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
15988
|
+
if (DANGEROUS_PROPERTY_NAMES.includes(name)) return options.onDangerousProperty(name);
|
|
15989
|
+
return name;
|
|
15990
|
+
}
|
|
15991
|
+
const node2json_METADATA_SYMBOL = XmlNode.getMetaDataSymbol();
|
|
15992
|
+
function stripAttributePrefix(attrs, prefix) {
|
|
15993
|
+
if (!attrs || 'object' != typeof attrs) return {};
|
|
15994
|
+
if (!prefix) return attrs;
|
|
15995
|
+
const rawAttrs = {};
|
|
15996
|
+
for(const key in attrs)if (key.startsWith(prefix)) {
|
|
15997
|
+
const rawName = key.substring(prefix.length);
|
|
15998
|
+
rawAttrs[rawName] = attrs[key];
|
|
15999
|
+
} else rawAttrs[key] = attrs[key];
|
|
16000
|
+
return rawAttrs;
|
|
16001
|
+
}
|
|
16002
|
+
function prettify(node, options, matcher, readonlyMatcher) {
|
|
16003
|
+
return node2json_compress(node, options, matcher, readonlyMatcher);
|
|
16004
|
+
}
|
|
16005
|
+
function node2json_compress(arr, options, matcher, readonlyMatcher) {
|
|
15505
16006
|
let text;
|
|
15506
16007
|
const compressedObj = {};
|
|
15507
16008
|
for(let i = 0; i < arr.length; i++){
|
|
15508
16009
|
const tagObj = arr[i];
|
|
15509
16010
|
const property = propName(tagObj);
|
|
15510
|
-
|
|
15511
|
-
|
|
16011
|
+
if (void 0 !== property && property !== options.textNodeName) {
|
|
16012
|
+
const rawAttrs = stripAttributePrefix(tagObj[":@"] || {}, options.attributeNamePrefix);
|
|
16013
|
+
matcher.push(property, rawAttrs);
|
|
16014
|
+
}
|
|
15512
16015
|
if (property === options.textNodeName) if (void 0 === text) text = tagObj[property];
|
|
15513
16016
|
else text += "" + tagObj[property];
|
|
15514
16017
|
else if (void 0 === property) continue;
|
|
15515
16018
|
else if (tagObj[property]) {
|
|
15516
|
-
let val = node2json_compress(tagObj[property], options,
|
|
16019
|
+
let val = node2json_compress(tagObj[property], options, matcher, readonlyMatcher);
|
|
15517
16020
|
const isLeaf = isLeafTag(val, options);
|
|
15518
|
-
if (
|
|
15519
|
-
if (tagObj[":@"]) assignAttributes(val, tagObj[":@"], newJpath, options);
|
|
16021
|
+
if (tagObj[":@"]) assignAttributes(val, tagObj[":@"], readonlyMatcher, options);
|
|
15520
16022
|
else if (1 !== Object.keys(val).length || void 0 === val[options.textNodeName] || options.alwaysCreateTextNode) {
|
|
15521
16023
|
if (0 === Object.keys(val).length) if (options.alwaysCreateTextNode) val[options.textNodeName] = "";
|
|
15522
16024
|
else val = "";
|
|
15523
16025
|
} else val = val[options.textNodeName];
|
|
15524
|
-
if (void 0 !==
|
|
16026
|
+
if (void 0 !== tagObj[node2json_METADATA_SYMBOL] && "object" == typeof val && null !== val) val[node2json_METADATA_SYMBOL] = tagObj[node2json_METADATA_SYMBOL];
|
|
16027
|
+
if (void 0 !== compressedObj[property] && Object.prototype.hasOwnProperty.call(compressedObj, property)) {
|
|
15525
16028
|
if (!Array.isArray(compressedObj[property])) compressedObj[property] = [
|
|
15526
16029
|
compressedObj[property]
|
|
15527
16030
|
];
|
|
15528
16031
|
compressedObj[property].push(val);
|
|
15529
|
-
} else
|
|
15530
|
-
|
|
15531
|
-
|
|
15532
|
-
|
|
16032
|
+
} else {
|
|
16033
|
+
const jPathOrMatcher = options.jPath ? readonlyMatcher.toString() : readonlyMatcher;
|
|
16034
|
+
if (options.isArray(property, jPathOrMatcher, isLeaf)) compressedObj[property] = [
|
|
16035
|
+
val
|
|
16036
|
+
];
|
|
16037
|
+
else compressedObj[property] = val;
|
|
16038
|
+
}
|
|
16039
|
+
if (void 0 !== property && property !== options.textNodeName) matcher.pop();
|
|
15533
16040
|
}
|
|
15534
16041
|
}
|
|
15535
16042
|
if ("string" == typeof text) {
|
|
@@ -15544,13 +16051,15 @@ and limitations under the License.
|
|
|
15544
16051
|
if (":@" !== key) return key;
|
|
15545
16052
|
}
|
|
15546
16053
|
}
|
|
15547
|
-
function assignAttributes(obj, attrMap,
|
|
16054
|
+
function assignAttributes(obj, attrMap, readonlyMatcher, options) {
|
|
15548
16055
|
if (attrMap) {
|
|
15549
16056
|
const keys = Object.keys(attrMap);
|
|
15550
16057
|
const len = keys.length;
|
|
15551
16058
|
for(let i = 0; i < len; i++){
|
|
15552
16059
|
const atrrName = keys[i];
|
|
15553
|
-
|
|
16060
|
+
const rawAttrName = atrrName.startsWith(options.attributeNamePrefix) ? atrrName.substring(options.attributeNamePrefix.length) : atrrName;
|
|
16061
|
+
const jPathOrMatcher = options.jPath ? readonlyMatcher.toString() + "." + rawAttrName : readonlyMatcher;
|
|
16062
|
+
if (options.isArray(atrrName, jPathOrMatcher, true, true)) obj[atrrName] = [
|
|
15554
16063
|
attrMap[atrrName]
|
|
15555
16064
|
];
|
|
15556
16065
|
else obj[atrrName] = attrMap[atrrName];
|
|
@@ -15730,7 +16239,7 @@ and limitations under the License.
|
|
|
15730
16239
|
if (void 0 === matches[i][3] && !options.allowBooleanAttributes) return getErrorObject('InvalidAttr', "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i]));
|
|
15731
16240
|
const attrName = matches[i][2];
|
|
15732
16241
|
if (!validateAttrName(attrName)) return getErrorObject('InvalidAttr', "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i]));
|
|
15733
|
-
if (
|
|
16242
|
+
if (Object.prototype.hasOwnProperty.call(attrNames, attrName)) return getErrorObject('InvalidAttr', "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i]));
|
|
15734
16243
|
attrNames[attrName] = 1;
|
|
15735
16244
|
}
|
|
15736
16245
|
return true;
|
|
@@ -15804,7 +16313,7 @@ and limitations under the License.
|
|
|
15804
16313
|
orderedObjParser.addExternalEntities(this.externalEntities);
|
|
15805
16314
|
const orderedResult = orderedObjParser.parseXml(xmlData);
|
|
15806
16315
|
if (this.options.preserveOrder || void 0 === orderedResult) return orderedResult;
|
|
15807
|
-
return prettify(orderedResult, this.options);
|
|
16316
|
+
return prettify(orderedResult, this.options, orderedObjParser.matcher, orderedObjParser.readonlyMatcher);
|
|
15808
16317
|
}
|
|
15809
16318
|
addEntity(key, value) {
|
|
15810
16319
|
if (-1 !== value.indexOf("&")) throw new Error("Entity value can't have '&'");
|
|
@@ -15820,52 +16329,74 @@ and limitations under the License.
|
|
|
15820
16329
|
function toXml(jArray, options) {
|
|
15821
16330
|
let indentation = "";
|
|
15822
16331
|
if (options.format && options.indentBy.length > 0) indentation = EOL;
|
|
15823
|
-
|
|
16332
|
+
const stopNodeExpressions = [];
|
|
16333
|
+
if (options.stopNodes && Array.isArray(options.stopNodes)) for(let i = 0; i < options.stopNodes.length; i++){
|
|
16334
|
+
const node = options.stopNodes[i];
|
|
16335
|
+
if ('string' == typeof node) stopNodeExpressions.push(new Expression(node));
|
|
16336
|
+
else if (node instanceof Expression) stopNodeExpressions.push(node);
|
|
16337
|
+
}
|
|
16338
|
+
const matcher = new Matcher();
|
|
16339
|
+
return arrToStr(jArray, options, indentation, matcher, stopNodeExpressions);
|
|
15824
16340
|
}
|
|
15825
|
-
function arrToStr(arr, options,
|
|
16341
|
+
function arrToStr(arr, options, indentation, matcher, stopNodeExpressions) {
|
|
15826
16342
|
let xmlStr = "";
|
|
15827
16343
|
let isPreviousElementTag = false;
|
|
16344
|
+
if (options.maxNestedTags && matcher.getDepth() > options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
|
|
16345
|
+
if (!Array.isArray(arr)) {
|
|
16346
|
+
if (null != arr) {
|
|
16347
|
+
let text = arr.toString();
|
|
16348
|
+
text = orderedJs2Xml_replaceEntitiesValue(text, options);
|
|
16349
|
+
return text;
|
|
16350
|
+
}
|
|
16351
|
+
return "";
|
|
16352
|
+
}
|
|
15828
16353
|
for(let i = 0; i < arr.length; i++){
|
|
15829
16354
|
const tagObj = arr[i];
|
|
15830
16355
|
const tagName = orderedJs2Xml_propName(tagObj);
|
|
15831
16356
|
if (void 0 === tagName) continue;
|
|
15832
|
-
|
|
15833
|
-
|
|
16357
|
+
const attrValues = extractAttributeValues(tagObj[":@"], options);
|
|
16358
|
+
matcher.push(tagName, attrValues);
|
|
16359
|
+
const isStopNode = checkStopNode(matcher, stopNodeExpressions);
|
|
15834
16360
|
if (tagName === options.textNodeName) {
|
|
15835
16361
|
let tagText = tagObj[tagName];
|
|
15836
|
-
if (!isStopNode
|
|
16362
|
+
if (!isStopNode) {
|
|
15837
16363
|
tagText = options.tagValueProcessor(tagName, tagText);
|
|
15838
16364
|
tagText = orderedJs2Xml_replaceEntitiesValue(tagText, options);
|
|
15839
16365
|
}
|
|
15840
16366
|
if (isPreviousElementTag) xmlStr += indentation;
|
|
15841
16367
|
xmlStr += tagText;
|
|
15842
16368
|
isPreviousElementTag = false;
|
|
16369
|
+
matcher.pop();
|
|
15843
16370
|
continue;
|
|
15844
16371
|
}
|
|
15845
16372
|
if (tagName === options.cdataPropName) {
|
|
15846
16373
|
if (isPreviousElementTag) xmlStr += indentation;
|
|
15847
16374
|
xmlStr += `<![CDATA[${tagObj[tagName][0][options.textNodeName]}]]>`;
|
|
15848
16375
|
isPreviousElementTag = false;
|
|
16376
|
+
matcher.pop();
|
|
15849
16377
|
continue;
|
|
15850
16378
|
}
|
|
15851
16379
|
if (tagName === options.commentPropName) {
|
|
15852
16380
|
xmlStr += indentation + `<!--${tagObj[tagName][0][options.textNodeName]}-->`;
|
|
15853
16381
|
isPreviousElementTag = true;
|
|
16382
|
+
matcher.pop();
|
|
15854
16383
|
continue;
|
|
15855
16384
|
} else if ("?" === tagName[0]) {
|
|
15856
|
-
const attStr = attr_to_str(tagObj[":@"], options);
|
|
16385
|
+
const attStr = attr_to_str(tagObj[":@"], options, isStopNode);
|
|
15857
16386
|
const tempInd = "?xml" === tagName ? "" : indentation;
|
|
15858
16387
|
let piTextNodeName = tagObj[tagName][0][options.textNodeName];
|
|
15859
16388
|
piTextNodeName = 0 !== piTextNodeName.length ? " " + piTextNodeName : "";
|
|
15860
16389
|
xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`;
|
|
15861
16390
|
isPreviousElementTag = true;
|
|
16391
|
+
matcher.pop();
|
|
15862
16392
|
continue;
|
|
15863
16393
|
}
|
|
15864
16394
|
let newIdentation = indentation;
|
|
15865
16395
|
if ("" !== newIdentation) newIdentation += options.indentBy;
|
|
15866
|
-
const attStr = attr_to_str(tagObj[":@"], options);
|
|
16396
|
+
const attStr = attr_to_str(tagObj[":@"], options, isStopNode);
|
|
15867
16397
|
const tagStart = indentation + `<${tagName}${attStr}`;
|
|
15868
|
-
|
|
16398
|
+
let tagValue;
|
|
16399
|
+
tagValue = isStopNode ? getRawContent(tagObj[tagName], options) : arrToStr(tagObj[tagName], options, newIdentation, matcher, stopNodeExpressions);
|
|
15869
16400
|
if (-1 !== options.unpairedTags.indexOf(tagName)) if (options.suppressUnpairedNode) xmlStr += tagStart + ">";
|
|
15870
16401
|
else xmlStr += tagStart + "/>";
|
|
15871
16402
|
else if ((!tagValue || 0 === tagValue.length) && options.suppressEmptyNode) xmlStr += tagStart + "/>";
|
|
@@ -15877,33 +16408,81 @@ and limitations under the License.
|
|
|
15877
16408
|
xmlStr += `</${tagName}>`;
|
|
15878
16409
|
}
|
|
15879
16410
|
isPreviousElementTag = true;
|
|
16411
|
+
matcher.pop();
|
|
15880
16412
|
}
|
|
15881
16413
|
return xmlStr;
|
|
15882
16414
|
}
|
|
16415
|
+
function extractAttributeValues(attrMap, options) {
|
|
16416
|
+
if (!attrMap || options.ignoreAttributes) return null;
|
|
16417
|
+
const attrValues = {};
|
|
16418
|
+
let hasAttrs = false;
|
|
16419
|
+
for(let attr in attrMap){
|
|
16420
|
+
if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;
|
|
16421
|
+
const cleanAttrName = attr.startsWith(options.attributeNamePrefix) ? attr.substr(options.attributeNamePrefix.length) : attr;
|
|
16422
|
+
attrValues[cleanAttrName] = attrMap[attr];
|
|
16423
|
+
hasAttrs = true;
|
|
16424
|
+
}
|
|
16425
|
+
return hasAttrs ? attrValues : null;
|
|
16426
|
+
}
|
|
16427
|
+
function getRawContent(arr, options) {
|
|
16428
|
+
if (!Array.isArray(arr)) {
|
|
16429
|
+
if (null != arr) return arr.toString();
|
|
16430
|
+
return "";
|
|
16431
|
+
}
|
|
16432
|
+
let content = "";
|
|
16433
|
+
for(let i = 0; i < arr.length; i++){
|
|
16434
|
+
const item = arr[i];
|
|
16435
|
+
const tagName = orderedJs2Xml_propName(item);
|
|
16436
|
+
if (tagName === options.textNodeName) content += item[tagName];
|
|
16437
|
+
else if (tagName === options.cdataPropName) content += item[tagName][0][options.textNodeName];
|
|
16438
|
+
else if (tagName === options.commentPropName) content += item[tagName][0][options.textNodeName];
|
|
16439
|
+
else if (tagName && "?" === tagName[0]) continue;
|
|
16440
|
+
else if (tagName) {
|
|
16441
|
+
const attStr = attr_to_str_raw(item[":@"], options);
|
|
16442
|
+
const nestedContent = getRawContent(item[tagName], options);
|
|
16443
|
+
if (nestedContent && 0 !== nestedContent.length) content += `<${tagName}${attStr}>${nestedContent}</${tagName}>`;
|
|
16444
|
+
else content += `<${tagName}${attStr}/>`;
|
|
16445
|
+
}
|
|
16446
|
+
}
|
|
16447
|
+
return content;
|
|
16448
|
+
}
|
|
16449
|
+
function attr_to_str_raw(attrMap, options) {
|
|
16450
|
+
let attrStr = "";
|
|
16451
|
+
if (attrMap && !options.ignoreAttributes) for(let attr in attrMap){
|
|
16452
|
+
if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;
|
|
16453
|
+
let attrVal = attrMap[attr];
|
|
16454
|
+
if (true === attrVal && options.suppressBooleanAttributes) attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;
|
|
16455
|
+
else attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`;
|
|
16456
|
+
}
|
|
16457
|
+
return attrStr;
|
|
16458
|
+
}
|
|
15883
16459
|
function orderedJs2Xml_propName(obj) {
|
|
15884
16460
|
const keys = Object.keys(obj);
|
|
15885
16461
|
for(let i = 0; i < keys.length; i++){
|
|
15886
16462
|
const key = keys[i];
|
|
15887
|
-
if (
|
|
16463
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
15888
16464
|
if (":@" !== key) return key;
|
|
15889
16465
|
}
|
|
15890
16466
|
}
|
|
15891
16467
|
}
|
|
15892
|
-
function attr_to_str(attrMap, options) {
|
|
16468
|
+
function attr_to_str(attrMap, options, isStopNode) {
|
|
15893
16469
|
let attrStr = "";
|
|
15894
16470
|
if (attrMap && !options.ignoreAttributes) for(let attr in attrMap){
|
|
15895
|
-
if (!
|
|
15896
|
-
let attrVal
|
|
15897
|
-
attrVal =
|
|
16471
|
+
if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;
|
|
16472
|
+
let attrVal;
|
|
16473
|
+
if (isStopNode) attrVal = attrMap[attr];
|
|
16474
|
+
else {
|
|
16475
|
+
attrVal = options.attributeValueProcessor(attr, attrMap[attr]);
|
|
16476
|
+
attrVal = orderedJs2Xml_replaceEntitiesValue(attrVal, options);
|
|
16477
|
+
}
|
|
15898
16478
|
if (true === attrVal && options.suppressBooleanAttributes) attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;
|
|
15899
16479
|
else attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`;
|
|
15900
16480
|
}
|
|
15901
16481
|
return attrStr;
|
|
15902
16482
|
}
|
|
15903
|
-
function
|
|
15904
|
-
|
|
15905
|
-
let
|
|
15906
|
-
for(let index in options.stopNodes)if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true;
|
|
16483
|
+
function checkStopNode(matcher, stopNodeExpressions) {
|
|
16484
|
+
if (!stopNodeExpressions || 0 === stopNodeExpressions.length) return false;
|
|
16485
|
+
for(let i = 0; i < stopNodeExpressions.length; i++)if (matcher.matches(stopNodeExpressions[i])) return true;
|
|
15907
16486
|
return false;
|
|
15908
16487
|
}
|
|
15909
16488
|
function orderedJs2Xml_replaceEntitiesValue(textValue, options) {
|
|
@@ -15913,7 +16492,17 @@ and limitations under the License.
|
|
|
15913
16492
|
}
|
|
15914
16493
|
return textValue;
|
|
15915
16494
|
}
|
|
15916
|
-
|
|
16495
|
+
function ignoreAttributes_getIgnoreAttributesFn(ignoreAttributes) {
|
|
16496
|
+
if ('function' == typeof ignoreAttributes) return ignoreAttributes;
|
|
16497
|
+
if (Array.isArray(ignoreAttributes)) return (attrName)=>{
|
|
16498
|
+
for (const pattern of ignoreAttributes){
|
|
16499
|
+
if ('string' == typeof pattern && attrName === pattern) return true;
|
|
16500
|
+
if (pattern instanceof RegExp && pattern.test(attrName)) return true;
|
|
16501
|
+
}
|
|
16502
|
+
};
|
|
16503
|
+
return ()=>false;
|
|
16504
|
+
}
|
|
16505
|
+
const fxb_defaultOptions = {
|
|
15917
16506
|
attributeNamePrefix: '@_',
|
|
15918
16507
|
attributesGroupName: false,
|
|
15919
16508
|
textNodeName: '#text',
|
|
@@ -15957,15 +16546,27 @@ and limitations under the License.
|
|
|
15957
16546
|
],
|
|
15958
16547
|
processEntities: true,
|
|
15959
16548
|
stopNodes: [],
|
|
15960
|
-
oneListGroup: false
|
|
16549
|
+
oneListGroup: false,
|
|
16550
|
+
maxNestedTags: 100,
|
|
16551
|
+
jPath: true
|
|
15961
16552
|
};
|
|
15962
16553
|
function Builder(options) {
|
|
15963
|
-
this.options = Object.assign({},
|
|
16554
|
+
this.options = Object.assign({}, fxb_defaultOptions, options);
|
|
16555
|
+
if (this.options.stopNodes && Array.isArray(this.options.stopNodes)) this.options.stopNodes = this.options.stopNodes.map((node)=>{
|
|
16556
|
+
if ('string' == typeof node && node.startsWith('*.')) return '..' + node.substring(2);
|
|
16557
|
+
return node;
|
|
16558
|
+
});
|
|
16559
|
+
this.stopNodeExpressions = [];
|
|
16560
|
+
if (this.options.stopNodes && Array.isArray(this.options.stopNodes)) for(let i = 0; i < this.options.stopNodes.length; i++){
|
|
16561
|
+
const node = this.options.stopNodes[i];
|
|
16562
|
+
if ('string' == typeof node) this.stopNodeExpressions.push(new Expression(node));
|
|
16563
|
+
else if (node instanceof Expression) this.stopNodeExpressions.push(node);
|
|
16564
|
+
}
|
|
15964
16565
|
if (true === this.options.ignoreAttributes || this.options.attributesGroupName) this.isAttribute = function() {
|
|
15965
16566
|
return false;
|
|
15966
16567
|
};
|
|
15967
16568
|
else {
|
|
15968
|
-
this.ignoreAttributesFn =
|
|
16569
|
+
this.ignoreAttributesFn = ignoreAttributes_getIgnoreAttributesFn(this.options.ignoreAttributes);
|
|
15969
16570
|
this.attrPrefixLen = this.options.attributeNamePrefix.length;
|
|
15970
16571
|
this.isAttribute = isAttribute;
|
|
15971
16572
|
}
|
|
@@ -15984,29 +16585,43 @@ and limitations under the License.
|
|
|
15984
16585
|
}
|
|
15985
16586
|
Builder.prototype.build = function(jObj) {
|
|
15986
16587
|
if (this.options.preserveOrder) return toXml(jObj, this.options);
|
|
15987
|
-
|
|
15988
|
-
|
|
15989
|
-
|
|
15990
|
-
|
|
16588
|
+
{
|
|
16589
|
+
if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) jObj = {
|
|
16590
|
+
[this.options.arrayNodeName]: jObj
|
|
16591
|
+
};
|
|
16592
|
+
const matcher = new Matcher();
|
|
16593
|
+
return this.j2x(jObj, 0, matcher).val;
|
|
16594
|
+
}
|
|
15991
16595
|
};
|
|
15992
|
-
Builder.prototype.j2x = function(jObj, level,
|
|
16596
|
+
Builder.prototype.j2x = function(jObj, level, matcher) {
|
|
15993
16597
|
let attrStr = '';
|
|
15994
16598
|
let val = '';
|
|
15995
|
-
|
|
16599
|
+
if (this.options.maxNestedTags && matcher.getDepth() >= this.options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
|
|
16600
|
+
const jPath = this.options.jPath ? matcher.toString() : matcher;
|
|
16601
|
+
const isCurrentStopNode = this.checkStopNode(matcher);
|
|
15996
16602
|
for(let key in jObj)if (Object.prototype.hasOwnProperty.call(jObj, key)) if (void 0 === jObj[key]) {
|
|
15997
16603
|
if (this.isAttribute(key)) val += '';
|
|
15998
16604
|
} else if (null === jObj[key]) if (this.isAttribute(key)) val += '';
|
|
15999
16605
|
else if (key === this.options.cdataPropName) val += '';
|
|
16000
16606
|
else if ('?' === key[0]) val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;
|
|
16001
16607
|
else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
|
|
16002
|
-
else if (jObj[key] instanceof Date) val += this.buildTextValNode(jObj[key], key, '', level);
|
|
16608
|
+
else if (jObj[key] instanceof Date) val += this.buildTextValNode(jObj[key], key, '', level, matcher);
|
|
16003
16609
|
else if ('object' != typeof jObj[key]) {
|
|
16004
16610
|
const attr = this.isAttribute(key);
|
|
16005
|
-
if (attr && !this.ignoreAttributesFn(attr, jPath)) attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);
|
|
16611
|
+
if (attr && !this.ignoreAttributesFn(attr, jPath)) attrStr += this.buildAttrPairStr(attr, '' + jObj[key], isCurrentStopNode);
|
|
16006
16612
|
else if (!attr) if (key === this.options.textNodeName) {
|
|
16007
16613
|
let newval = this.options.tagValueProcessor(key, '' + jObj[key]);
|
|
16008
16614
|
val += this.replaceEntitiesValue(newval);
|
|
16009
|
-
} else
|
|
16615
|
+
} else {
|
|
16616
|
+
matcher.push(key);
|
|
16617
|
+
const isStopNode = this.checkStopNode(matcher);
|
|
16618
|
+
matcher.pop();
|
|
16619
|
+
if (isStopNode) {
|
|
16620
|
+
const textValue = '' + jObj[key];
|
|
16621
|
+
if ('' === textValue) val += this.indentate(level) + '<' + key + this.closeTag(key) + this.tagEndChar;
|
|
16622
|
+
else val += this.indentate(level) + '<' + key + '>' + textValue + '</' + key + this.tagEndChar;
|
|
16623
|
+
} else val += this.buildTextValNode(jObj[key], key, '', level, matcher);
|
|
16624
|
+
}
|
|
16010
16625
|
} else if (Array.isArray(jObj[key])) {
|
|
16011
16626
|
const arrLen = jObj[key].length;
|
|
16012
16627
|
let listTagVal = "";
|
|
@@ -16017,39 +16632,135 @@ and limitations under the License.
|
|
|
16017
16632
|
else if (null === item) if ("?" === key[0]) val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;
|
|
16018
16633
|
else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
|
|
16019
16634
|
else if ('object' == typeof item) if (this.options.oneListGroup) {
|
|
16020
|
-
|
|
16635
|
+
matcher.push(key);
|
|
16636
|
+
const result = this.j2x(item, level + 1, matcher);
|
|
16637
|
+
matcher.pop();
|
|
16021
16638
|
listTagVal += result.val;
|
|
16022
16639
|
if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) listTagAttr += result.attrStr;
|
|
16023
|
-
} else listTagVal += this.processTextOrObjNode(item, key, level,
|
|
16640
|
+
} else listTagVal += this.processTextOrObjNode(item, key, level, matcher);
|
|
16024
16641
|
else if (this.options.oneListGroup) {
|
|
16025
16642
|
let textValue = this.options.tagValueProcessor(key, item);
|
|
16026
16643
|
textValue = this.replaceEntitiesValue(textValue);
|
|
16027
16644
|
listTagVal += textValue;
|
|
16028
|
-
} else
|
|
16645
|
+
} else {
|
|
16646
|
+
matcher.push(key);
|
|
16647
|
+
const isStopNode = this.checkStopNode(matcher);
|
|
16648
|
+
matcher.pop();
|
|
16649
|
+
if (isStopNode) {
|
|
16650
|
+
const textValue = '' + item;
|
|
16651
|
+
if ('' === textValue) listTagVal += this.indentate(level) + '<' + key + this.closeTag(key) + this.tagEndChar;
|
|
16652
|
+
else listTagVal += this.indentate(level) + '<' + key + '>' + textValue + '</' + key + this.tagEndChar;
|
|
16653
|
+
} else listTagVal += this.buildTextValNode(item, key, '', level, matcher);
|
|
16654
|
+
}
|
|
16029
16655
|
}
|
|
16030
16656
|
if (this.options.oneListGroup) listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);
|
|
16031
16657
|
val += listTagVal;
|
|
16032
16658
|
} else if (this.options.attributesGroupName && key === this.options.attributesGroupName) {
|
|
16033
16659
|
const Ks = Object.keys(jObj[key]);
|
|
16034
16660
|
const L = Ks.length;
|
|
16035
|
-
for(let j = 0; j < L; j++)attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);
|
|
16036
|
-
} else val += this.processTextOrObjNode(jObj[key], key, level,
|
|
16661
|
+
for(let j = 0; j < L; j++)attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]], isCurrentStopNode);
|
|
16662
|
+
} else val += this.processTextOrObjNode(jObj[key], key, level, matcher);
|
|
16037
16663
|
return {
|
|
16038
16664
|
attrStr: attrStr,
|
|
16039
16665
|
val: val
|
|
16040
16666
|
};
|
|
16041
16667
|
};
|
|
16042
|
-
Builder.prototype.buildAttrPairStr = function(attrName, val) {
|
|
16043
|
-
|
|
16044
|
-
|
|
16668
|
+
Builder.prototype.buildAttrPairStr = function(attrName, val, isStopNode) {
|
|
16669
|
+
if (!isStopNode) {
|
|
16670
|
+
val = this.options.attributeValueProcessor(attrName, '' + val);
|
|
16671
|
+
val = this.replaceEntitiesValue(val);
|
|
16672
|
+
}
|
|
16045
16673
|
if (this.options.suppressBooleanAttributes && "true" === val) return ' ' + attrName;
|
|
16046
16674
|
return ' ' + attrName + '="' + val + '"';
|
|
16047
16675
|
};
|
|
16048
|
-
function processTextOrObjNode(object, key, level,
|
|
16049
|
-
const
|
|
16050
|
-
|
|
16676
|
+
function processTextOrObjNode(object, key, level, matcher) {
|
|
16677
|
+
const attrValues = this.extractAttributes(object);
|
|
16678
|
+
matcher.push(key, attrValues);
|
|
16679
|
+
const isStopNode = this.checkStopNode(matcher);
|
|
16680
|
+
if (isStopNode) {
|
|
16681
|
+
const rawContent = this.buildRawContent(object);
|
|
16682
|
+
const attrStr = this.buildAttributesForStopNode(object);
|
|
16683
|
+
matcher.pop();
|
|
16684
|
+
return this.buildObjectNode(rawContent, key, attrStr, level);
|
|
16685
|
+
}
|
|
16686
|
+
const result = this.j2x(object, level + 1, matcher);
|
|
16687
|
+
matcher.pop();
|
|
16688
|
+
if (void 0 !== object[this.options.textNodeName] && 1 === Object.keys(object).length) return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level, matcher);
|
|
16051
16689
|
return this.buildObjectNode(result.val, key, result.attrStr, level);
|
|
16052
16690
|
}
|
|
16691
|
+
Builder.prototype.extractAttributes = function(obj) {
|
|
16692
|
+
if (!obj || 'object' != typeof obj) return null;
|
|
16693
|
+
const attrValues = {};
|
|
16694
|
+
let hasAttrs = false;
|
|
16695
|
+
if (this.options.attributesGroupName && obj[this.options.attributesGroupName]) {
|
|
16696
|
+
const attrGroup = obj[this.options.attributesGroupName];
|
|
16697
|
+
for(let attrKey in attrGroup){
|
|
16698
|
+
if (!Object.prototype.hasOwnProperty.call(attrGroup, attrKey)) continue;
|
|
16699
|
+
const cleanKey = attrKey.startsWith(this.options.attributeNamePrefix) ? attrKey.substring(this.options.attributeNamePrefix.length) : attrKey;
|
|
16700
|
+
attrValues[cleanKey] = attrGroup[attrKey];
|
|
16701
|
+
hasAttrs = true;
|
|
16702
|
+
}
|
|
16703
|
+
} else for(let key in obj){
|
|
16704
|
+
if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
|
|
16705
|
+
const attr = this.isAttribute(key);
|
|
16706
|
+
if (attr) {
|
|
16707
|
+
attrValues[attr] = obj[key];
|
|
16708
|
+
hasAttrs = true;
|
|
16709
|
+
}
|
|
16710
|
+
}
|
|
16711
|
+
return hasAttrs ? attrValues : null;
|
|
16712
|
+
};
|
|
16713
|
+
Builder.prototype.buildRawContent = function(obj) {
|
|
16714
|
+
if ('string' == typeof obj) return obj;
|
|
16715
|
+
if ('object' != typeof obj || null === obj) return String(obj);
|
|
16716
|
+
if (void 0 !== obj[this.options.textNodeName]) return obj[this.options.textNodeName];
|
|
16717
|
+
let content = '';
|
|
16718
|
+
for(let key in obj){
|
|
16719
|
+
if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
|
|
16720
|
+
if (this.isAttribute(key)) continue;
|
|
16721
|
+
if (this.options.attributesGroupName && key === this.options.attributesGroupName) continue;
|
|
16722
|
+
const value = obj[key];
|
|
16723
|
+
if (key === this.options.textNodeName) content += value;
|
|
16724
|
+
else if (Array.isArray(value)) {
|
|
16725
|
+
for (let item of value)if ('string' == typeof item || 'number' == typeof item) content += `<${key}>${item}</${key}>`;
|
|
16726
|
+
else if ('object' == typeof item && null !== item) {
|
|
16727
|
+
const nestedContent = this.buildRawContent(item);
|
|
16728
|
+
const nestedAttrs = this.buildAttributesForStopNode(item);
|
|
16729
|
+
if ('' === nestedContent) content += `<${key}${nestedAttrs}/>`;
|
|
16730
|
+
else content += `<${key}${nestedAttrs}>${nestedContent}</${key}>`;
|
|
16731
|
+
}
|
|
16732
|
+
} else if ('object' == typeof value && null !== value) {
|
|
16733
|
+
const nestedContent = this.buildRawContent(value);
|
|
16734
|
+
const nestedAttrs = this.buildAttributesForStopNode(value);
|
|
16735
|
+
if ('' === nestedContent) content += `<${key}${nestedAttrs}/>`;
|
|
16736
|
+
else content += `<${key}${nestedAttrs}>${nestedContent}</${key}>`;
|
|
16737
|
+
} else content += `<${key}>${value}</${key}>`;
|
|
16738
|
+
}
|
|
16739
|
+
return content;
|
|
16740
|
+
};
|
|
16741
|
+
Builder.prototype.buildAttributesForStopNode = function(obj) {
|
|
16742
|
+
if (!obj || 'object' != typeof obj) return '';
|
|
16743
|
+
let attrStr = '';
|
|
16744
|
+
if (this.options.attributesGroupName && obj[this.options.attributesGroupName]) {
|
|
16745
|
+
const attrGroup = obj[this.options.attributesGroupName];
|
|
16746
|
+
for(let attrKey in attrGroup){
|
|
16747
|
+
if (!Object.prototype.hasOwnProperty.call(attrGroup, attrKey)) continue;
|
|
16748
|
+
const cleanKey = attrKey.startsWith(this.options.attributeNamePrefix) ? attrKey.substring(this.options.attributeNamePrefix.length) : attrKey;
|
|
16749
|
+
const val = attrGroup[attrKey];
|
|
16750
|
+
if (true === val && this.options.suppressBooleanAttributes) attrStr += ' ' + cleanKey;
|
|
16751
|
+
else attrStr += ' ' + cleanKey + '="' + val + '"';
|
|
16752
|
+
}
|
|
16753
|
+
} else for(let key in obj){
|
|
16754
|
+
if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
|
|
16755
|
+
const attr = this.isAttribute(key);
|
|
16756
|
+
if (attr) {
|
|
16757
|
+
const val = obj[key];
|
|
16758
|
+
if (true === val && this.options.suppressBooleanAttributes) attrStr += ' ' + attr;
|
|
16759
|
+
else attrStr += ' ' + attr + '="' + val + '"';
|
|
16760
|
+
}
|
|
16761
|
+
}
|
|
16762
|
+
return attrStr;
|
|
16763
|
+
};
|
|
16053
16764
|
Builder.prototype.buildObjectNode = function(val, key, attrStr, level) {
|
|
16054
16765
|
if ("" === val) if ("?" === key[0]) return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;
|
|
16055
16766
|
else return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;
|
|
@@ -16072,7 +16783,12 @@ and limitations under the License.
|
|
|
16072
16783
|
} else closeTag = this.options.suppressEmptyNode ? "/" : `></${key}`;
|
|
16073
16784
|
return closeTag;
|
|
16074
16785
|
};
|
|
16075
|
-
Builder.prototype.
|
|
16786
|
+
Builder.prototype.checkStopNode = function(matcher) {
|
|
16787
|
+
if (!this.stopNodeExpressions || 0 === this.stopNodeExpressions.length) return false;
|
|
16788
|
+
for(let i = 0; i < this.stopNodeExpressions.length; i++)if (matcher.matches(this.stopNodeExpressions[i])) return true;
|
|
16789
|
+
return false;
|
|
16790
|
+
};
|
|
16791
|
+
Builder.prototype.buildTextValNode = function(val, key, attrStr, level, matcher) {
|
|
16076
16792
|
if (false !== this.options.cdataPropName && key === this.options.cdataPropName) return this.indentate(level) + `<![CDATA[${val}]]>` + this.newLine;
|
|
16077
16793
|
{
|
|
16078
16794
|
if (false !== this.options.commentPropName && key === this.options.commentPropName) return this.indentate(level) + `<!--${val}-->` + this.newLine;
|
|
@@ -16097,6 +16813,7 @@ and limitations under the License.
|
|
|
16097
16813
|
if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) return name.substr(this.attrPrefixLen);
|
|
16098
16814
|
return false;
|
|
16099
16815
|
}
|
|
16816
|
+
const json2xml = Builder;
|
|
16100
16817
|
var json_bigint = __webpack_require__("../../node_modules/.pnpm/json-bigint@1.0.0/node_modules/json-bigint/index.js");
|
|
16101
16818
|
var json_bigint_default = /*#__PURE__*/ __webpack_require__.n(json_bigint);
|
|
16102
16819
|
var descriptors_ScalarType;
|
|
@@ -16489,12 +17206,12 @@ and limitations under the License.
|
|
|
16489
17206
|
break;
|
|
16490
17207
|
}
|
|
16491
17208
|
}
|
|
16492
|
-
function
|
|
17209
|
+
function isObject(arg) {
|
|
16493
17210
|
return null !== arg && "object" == typeof arg && !Array.isArray(arg);
|
|
16494
17211
|
}
|
|
16495
17212
|
function isReflectList(arg, field) {
|
|
16496
17213
|
var _a, _b, _c, _d;
|
|
16497
|
-
if (
|
|
17214
|
+
if (isObject(arg) && unsafeLocal in arg && "add" in arg && "field" in arg && "function" == typeof arg.field) {
|
|
16498
17215
|
if (void 0 !== field) {
|
|
16499
17216
|
const a = field;
|
|
16500
17217
|
const b = arg.field();
|
|
@@ -16506,7 +17223,7 @@ and limitations under the License.
|
|
|
16506
17223
|
}
|
|
16507
17224
|
function isReflectMap(arg, field) {
|
|
16508
17225
|
var _a, _b, _c, _d;
|
|
16509
|
-
if (
|
|
17226
|
+
if (isObject(arg) && unsafeLocal in arg && "has" in arg && "field" in arg && "function" == typeof arg.field) {
|
|
16510
17227
|
if (void 0 !== field) {
|
|
16511
17228
|
const a = field, b = arg.field();
|
|
16512
17229
|
return a.mapKey === b.mapKey && a.mapKind == b.mapKind && a.scalar === b.scalar && (null == (_a = a.message) ? void 0 : _a.typeName) === (null == (_b = b.message) ? void 0 : _b.typeName) && (null == (_c = a.enum) ? void 0 : _c.typeName) === (null == (_d = b.enum) ? void 0 : _d.typeName);
|
|
@@ -16516,7 +17233,7 @@ and limitations under the License.
|
|
|
16516
17233
|
return false;
|
|
16517
17234
|
}
|
|
16518
17235
|
function isReflectMessage(arg, messageDesc) {
|
|
16519
|
-
return
|
|
17236
|
+
return isObject(arg) && unsafeLocal in arg && "desc" in arg && isObject(arg.desc) && "message" === arg.desc.kind && (void 0 === messageDesc || arg.desc.typeName == messageDesc.typeName);
|
|
16520
17237
|
}
|
|
16521
17238
|
const symbol = Symbol.for("@bufbuild/protobuf/text-encoding");
|
|
16522
17239
|
function getTextEncoding() {
|
|
@@ -17041,7 +17758,7 @@ and limitations under the License.
|
|
|
17041
17758
|
return value;
|
|
17042
17759
|
}
|
|
17043
17760
|
function initMap(field, value) {
|
|
17044
|
-
if (
|
|
17761
|
+
if (isObject(value)) {
|
|
17045
17762
|
if (field.scalar == descriptors_ScalarType.BYTES) return convertObjectValues(value, toU8Arr);
|
|
17046
17763
|
if ("message" == field.mapKind) return convertObjectValues(value, (val)=>toMessage(field, val));
|
|
17047
17764
|
}
|
|
@@ -17056,7 +17773,7 @@ and limitations under the License.
|
|
|
17056
17773
|
}
|
|
17057
17774
|
function toMessage(field, value) {
|
|
17058
17775
|
if ("message" == field.fieldKind && !field.oneof && isWrapperDesc(field.message)) return initScalar(field.message.fields[0], value);
|
|
17059
|
-
if (
|
|
17776
|
+
if (isObject(value)) {
|
|
17060
17777
|
if ("google.protobuf.Struct" == field.message.typeName && "google.protobuf.Value" !== field.parent.typeName) return value;
|
|
17061
17778
|
if (!is_message_isMessage(value, field.message)) return create(field.message, value);
|
|
17062
17779
|
}
|
|
@@ -17336,7 +18053,7 @@ and limitations under the License.
|
|
|
17336
18053
|
$typeName: field.message.typeName,
|
|
17337
18054
|
value: longToReflect(field.message.fields[0], value)
|
|
17338
18055
|
};
|
|
17339
|
-
else if ("google.protobuf.Struct" == field.message.typeName && "google.protobuf.Value" != field.parent.typeName &&
|
|
18056
|
+
else if ("google.protobuf.Struct" == field.message.typeName && "google.protobuf.Value" != field.parent.typeName && isObject(value)) value = wktStructToReflect(value);
|
|
17340
18057
|
}
|
|
17341
18058
|
return new ReflectMessageImpl(field.message, value, check);
|
|
17342
18059
|
}
|
|
@@ -17430,7 +18147,7 @@ and limitations under the License.
|
|
|
17430
18147
|
$typeName: "google.protobuf.Struct",
|
|
17431
18148
|
fields: {}
|
|
17432
18149
|
};
|
|
17433
|
-
if (
|
|
18150
|
+
if (isObject(json)) for (const [k, v] of Object.entries(json))struct.fields[k] = wktValueToReflect(v);
|
|
17434
18151
|
return struct;
|
|
17435
18152
|
}
|
|
17436
18153
|
function wktStructToLocal(val) {
|
|
@@ -21053,7 +21770,7 @@ and limitations under the License.
|
|
|
21053
21770
|
function timestamp_timestampMs(timestamp) {
|
|
21054
21771
|
return 1000 * Number(timestamp.seconds) + Math.round(timestamp.nanos / 1000000);
|
|
21055
21772
|
}
|
|
21056
|
-
var package_namespaceObject = JSON.parse('{"UU":"@dan-uni/dan-any","rE":"1.
|
|
21773
|
+
var package_namespaceObject = JSON.parse('{"UU":"@dan-uni/dan-any","rE":"1.3.3","TB":"https://github.com/ani-uni/danuni/tree/master/packages/dan-any#readme"}');
|
|
21057
21774
|
const color_pad = (s)=>s.length < 2 ? `0${s}` : s;
|
|
21058
21775
|
const decimalToHex = (n)=>color_pad(n.toString(16));
|
|
21059
21776
|
const isDarkColor = ({ r, g, b })=>0.299 * r + 0.587 * g + 0.114 * b < 0x30;
|
|
@@ -21810,9 +22527,7 @@ and limitations under the License.
|
|
|
21810
22527
|
ValidationExecutor.prototype.customValidations = function(object, value, metadatas, error) {
|
|
21811
22528
|
var _this = this;
|
|
21812
22529
|
metadatas.forEach(function(metadata) {
|
|
21813
|
-
|
|
21814
|
-
if (customConstraintMetadata.async && _this.ignoreAsyncValidations) return;
|
|
21815
|
-
if (_this.validatorOptions && _this.validatorOptions.stopAtFirstError && Object.keys(error.constraints || {}).length > 0) return;
|
|
22530
|
+
var getValidationArguments = function() {
|
|
21816
22531
|
var validationArguments = {
|
|
21817
22532
|
targetName: object.constructor ? object.constructor.name : void 0,
|
|
21818
22533
|
property: metadata.propertyName,
|
|
@@ -21820,6 +22535,16 @@ and limitations under the License.
|
|
|
21820
22535
|
value: value,
|
|
21821
22536
|
constraints: metadata.constraints
|
|
21822
22537
|
};
|
|
22538
|
+
return validationArguments;
|
|
22539
|
+
};
|
|
22540
|
+
if (metadata.validateIf) {
|
|
22541
|
+
var shouldValidate = metadata.validateIf(object, value);
|
|
22542
|
+
if (!shouldValidate) return;
|
|
22543
|
+
}
|
|
22544
|
+
_this.metadataStorage.getTargetValidatorConstraints(metadata.constraintCls).forEach(function(customConstraintMetadata) {
|
|
22545
|
+
if (customConstraintMetadata.async && _this.ignoreAsyncValidations) return;
|
|
22546
|
+
if (_this.validatorOptions && _this.validatorOptions.stopAtFirstError && Object.keys(error.constraints || {}).length > 0) return;
|
|
22547
|
+
var validationArguments = getValidationArguments();
|
|
21823
22548
|
if (!metadata.each || !(Array.isArray(value) || value instanceof Set || value instanceof Map)) {
|
|
21824
22549
|
var validatedValue = customConstraintMetadata.instance.validate(value, validationArguments);
|
|
21825
22550
|
if (is_promise_util_isPromise(validatedValue)) {
|
|
@@ -23359,7 +24084,7 @@ and limitations under the License.
|
|
|
23359
24084
|
do {
|
|
23360
24085
|
bits.unshift(!!(1 & number));
|
|
23361
24086
|
number >>= 1;
|
|
23362
|
-
}while (number)
|
|
24087
|
+
}while (number)
|
|
23363
24088
|
return bits.toReversed();
|
|
23364
24089
|
};
|
|
23365
24090
|
var dm_gen_DMAttr = /*#__PURE__*/ function(DMAttr) {
|
|
@@ -23453,7 +24178,7 @@ and limitations under the License.
|
|
|
23453
24178
|
if (!this.SOID) this.SOID = def.SOID;
|
|
23454
24179
|
if (!this.progress) this.progress = def.progress;
|
|
23455
24180
|
if (!this.mode) this.mode = def.mode;
|
|
23456
|
-
if (!this.fontsize) this.fontsize = def.
|
|
24181
|
+
if (!this.fontsize) this.fontsize = def.fontsize;
|
|
23457
24182
|
if (!this.color) this.color = def.color;
|
|
23458
24183
|
if (!this.senderID) this.senderID = def.senderID;
|
|
23459
24184
|
if (!this.content) this.content = def.content;
|
|
@@ -24348,7 +25073,7 @@ and limitations under the License.
|
|
|
24348
25073
|
const rawText = JSON.stringify(raw1);
|
|
24349
25074
|
let compress;
|
|
24350
25075
|
compress = 'brotli' === compressType ? (0, lib.brotliCompressSync)(rawText) : (0, lib.gzipSync)(rawText);
|
|
24351
|
-
return `;RawCompressType: ${compressType}\n;RawBaseType: ${baseType}\n;Raw: ${'base64' === baseType ? compress.toString('base64') : fromUint16Array(base16384_lib.
|
|
25076
|
+
return `;RawCompressType: ${compressType}\n;RawBaseType: ${baseType}\n;Raw: ${'base64' === baseType ? compress.toString('base64') : fromUint16Array(base16384_lib.lF(compress))}`;
|
|
24352
25077
|
}
|
|
24353
25078
|
function deRaw(ass) {
|
|
24354
25079
|
const arr = ass.split('\n');
|
|
@@ -24362,7 +25087,7 @@ and limitations under the License.
|
|
|
24362
25087
|
if (!compressTypes.has(compressType)) compressType = 'gzip';
|
|
24363
25088
|
if (!baseTypes.has(baseType)) baseType = 'base64';
|
|
24364
25089
|
const text = lineRaw.replace(';Raw: ', '').trim();
|
|
24365
|
-
const buffer = 'base64' === baseType ? raw_Buffer.from(text, 'base64') : raw_Buffer.from(base16384_lib.
|
|
25090
|
+
const buffer = 'base64' === baseType ? raw_Buffer.from(text, 'base64') : raw_Buffer.from(base16384_lib.D4(raw_Buffer.from(text, 'utf8').toString('utf8')));
|
|
24366
25091
|
let decompress;
|
|
24367
25092
|
decompress = 'brotli' === compressType ? (0, lib.brotliDecompressSync)(buffer) : (0, lib.gunzipSync)(buffer);
|
|
24368
25093
|
try {
|
|
@@ -24478,13 +25203,38 @@ and limitations under the License.
|
|
|
24478
25203
|
if (raw) return DanmakuList2UniPool(raw.list, options);
|
|
24479
25204
|
return UniPool.create();
|
|
24480
25205
|
}
|
|
24481
|
-
const file_bili_dm = /*@__PURE__*/ fileDesc("Cg1iaWxpL2RtLnByb3RvEiBiaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MSJkCgZBdmF0YXISCgoCaWQYASABKAkSCwoDdXJsGAIgASgJEkEKC2F2YXRhcl90eXBlGAMgASgOMiwuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuQXZhdGFyVHlwZSIjCgZCdWJibGUSDAoEdGV4dBgBIAEoCRILCgN1cmwYAiABKAkixgEKCEJ1YmJsZVYyEgwKBHRleHQYASABKAkSCwoDdXJsGAIgASgJEkEKC2J1YmJsZV90eXBlGAMgASgOMiwuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuQnViYmxlVHlwZRIVCg1leHBvc3VyZV9vbmNlGAQgASgIEkUKDWV4cG9zdXJlX3R5cGUYBSABK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udjEuRG1TZWdNb2JpbGVSZXBseRJkCgZEbVZpZXcSKy5iaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5EbVZpZXdSZXEaLS5iaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5EbVZpZXdSZXBseRJxCg5EbVBsYXllckNvbmZpZxIzLmJpbGliaWxpLmNvbW11bml0eS5zZXJ2aWNlLmRtLnYxLkRtUGxheWVyQ29uZmlnUmVxGiouYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuUmVzcG9uc2USagoIRG1TZWdPdHQSLS5iaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5EbVNlZ090dFJlcRovLmJpbGliaWxpLmNvbW11bml0eS5zZXJ2aWNlLmRtLnYxLkRtU2VnT3R0UmVwbHkSagoIRG1TZWdTREsSLS5iaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5EbVNlZ1NES1JlcRovLmJpbGliaWxpLmNvbW11bml0eS5zZXJ2aWNlLmRtLnYxLkRtU2VnU0RLUmVwbHkSdAoMRG1FeHBvUmVwb3J0EjEuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuRG1FeHBvUmVwb3J0UmVxGjEuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuRG1FeHBvUmVwb3J0UmVzYgZwcm90bzM");
|
|
24482
|
-
const DmSegMobileReplySchema = /*@__PURE__*/ message_messageDesc(
|
|
24483
|
-
const DmWebViewReplySchema = /*@__PURE__*/ message_messageDesc(
|
|
24484
|
-
const
|
|
25206
|
+
const file_bilibili_community_service_dm_v1_dm = /*@__PURE__*/ fileDesc("CiliaWxpYmlsaS9jb21tdW5pdHkvc2VydmljZS9kbS92MS9kbS5wcm90bxIgYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEiZAoGQXZhdGFyEgoKAmlkGAEgASgJEgsKA3VybBgCIAEoCRJB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aWNlLmRtLnYxQgdEbVByb3RvUAGiAgRCQ1NEqgIgQmlsaWJpbGkuQ29tbXVuaXR5LlNlcnZpY2UuRG0uVjHKAiBCaWxpYmlsaVxDb21tdW5pdHlcU2VydmljZVxEbVxWMeICLEJpbGliaWxpXENvbW11bml0eVxTZXJ2aWNlXERtXFYxXEdQQk1ldGFkYXRh6gIkQmlsaWJpbGk6OkNvbW11bml0eTo6U2VydmljZTo6RG06OlYxYgZwcm90bzM");
|
|
25207
|
+
const DmSegMobileReplySchema = /*@__PURE__*/ message_messageDesc(file_bilibili_community_service_dm_v1_dm, 30);
|
|
25208
|
+
const DmWebViewReplySchema = /*@__PURE__*/ message_messageDesc(file_bilibili_community_service_dm_v1_dm, 39);
|
|
25209
|
+
const file_danuni_danmaku_v1_danmaku = /*@__PURE__*/ fileDesc("Ch9kYW51bmkvZGFubWFrdS92MS9kYW5tYWt1LnByb3RvEhFkYW51bmkuZGFubWFrdS52MSI2Cg5MaXN0RGFuUmVxdWVzdBIKCgJpZBgBIAEoCRIQCgNzZWcYAiABKAVIAIgBAUIGCgRfc2VnIusCCgdEYW5tYWt1EhIKBHNvaWQYASABKAlSBFNPSUQSEgoEZG1pZBgCIAEoCVIERE1JRBIQCghwcm9ncmVzcxgDIAEoBRIlCgRtb2RlGAQgASgOMhcuZGFudW5pLmRhbm1ha3UudjEuTW9kZRIQCghmb250c2l6ZRgFIAEoBRINCgVjb2xvchgGIAEoBRIbCglzZW5kZXJfaWQYByABKAlSCHNlbmRlcklEEg8KB2NvbnRlbnQYCCABKAkSKQoFY3RpbWUYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEg4KBndlaWdodBgKIAEoBRIlCgRwb29sGAsgASgOMhcuZGFudW5pLmRhbm1ha3UudjEuUG9vbBIMCgRhdHRyGAwgAygJEhUKCHBsYXRmb3JtGA0gASgJSACIAQESEgoFZXh0cmEYDiABKAlIAYgBAUILCglfcGxhdGZvcm1CCAoGX2V4dHJhIj8KD0xpc3REYW5SZXNwb25zZRIsCghkYW5tYWt1cxgBIAMoCzIaLmRhbnVuaS5kYW5tYWt1LnYxLkRhbm1ha3UqYgoETW9kZRIbChdNT0RFX05PUk1BTF9VTlNQRUNJRklFRBAAEg8KC01PREVfQk9UVE9NEAESDAoITU9ERV9UT1AQAhIQCgxNT0RFX1JFVkVSU0UQAxIMCghNT0RFX0VYVBAEKkkKBFBvb2wSGAoUUE9PTF9ERUZfVU5TUEVDSUZJRUQQABIMCghQT09MX1NVQhABEgwKCFBPT0xfQURWEAISCwoHUE9PTF9JWBADMmQKDkRhbm1ha3VTZXJ2aWNlElIKB0xpc3REYW4SIS5kYW51bmkuZGFubWFrdS52MS5MaXN0RGFuUmVxdWVzdBoiLmRhbnVuaS5kYW5tYWt1LnYxLkxpc3REYW5SZXNwb25zZSIAQosBChVjb20uZGFudW5pLmRhbm1ha3UudjFCDERhbm1ha3VQcm90b1ABogIDRERYqgIRRGFudW5pLkRhbm1ha3UuVjHKAhFEYW51bmlcRGFubWFrdVxWMeICHURhbnVuaVxEYW5tYWt1XFYxXEdQQk1ldGFkYXRh6gITRGFudW5pOjpEYW5tYWt1OjpWMWIGcHJvdG8z", [
|
|
24485
25210
|
file_google_protobuf_timestamp
|
|
24486
25211
|
]);
|
|
24487
|
-
const
|
|
25212
|
+
const ListDanResponseSchema = /*@__PURE__*/ message_messageDesc(file_danuni_danmaku_v1_danmaku, 2);
|
|
25213
|
+
function fileParser(file, mod) {
|
|
25214
|
+
const isBinary = file instanceof ArrayBuffer || file instanceof Uint8Array;
|
|
25215
|
+
switch(mod){
|
|
25216
|
+
case 'bin':
|
|
25217
|
+
if (isBinary) return file;
|
|
25218
|
+
throw new TypeError('Expected binary data for mod "bin"');
|
|
25219
|
+
case 'string':
|
|
25220
|
+
if ('string' == typeof file) return file;
|
|
25221
|
+
if (isBinary) return new TextDecoder().decode(file);
|
|
25222
|
+
throw new TypeError('Expected binary data or string for mod "string"');
|
|
25223
|
+
case 'json':
|
|
25224
|
+
{
|
|
25225
|
+
if ('object' == typeof file && null !== file && !isBinary) return file;
|
|
25226
|
+
if ('string' != typeof file && !isBinary) throw new TypeError('Expected object, JSON string, or binary data for mod "json"');
|
|
25227
|
+
const str = 'string' == typeof file ? file : new TextDecoder().decode(file);
|
|
25228
|
+
try {
|
|
25229
|
+
return JSON.parse(str);
|
|
25230
|
+
} catch {
|
|
25231
|
+
throw new Error('Invalid JSON string');
|
|
25232
|
+
}
|
|
25233
|
+
}
|
|
25234
|
+
default:
|
|
25235
|
+
throw new Error(`Unsupported mod "${mod}"`);
|
|
25236
|
+
}
|
|
25237
|
+
}
|
|
24488
25238
|
const src_JSON = json_bigint_default()({
|
|
24489
25239
|
useNativeBigInt: true
|
|
24490
25240
|
});
|
|
@@ -24494,10 +25244,11 @@ and limitations under the License.
|
|
|
24494
25244
|
};
|
|
24495
25245
|
var src_DM_format = /*#__PURE__*/ function(DM_format) {
|
|
24496
25246
|
DM_format["DanuniJson"] = "danuni.json";
|
|
24497
|
-
DM_format["
|
|
25247
|
+
DM_format["DanuniMinJson"] = "danuni.min.json";
|
|
25248
|
+
DM_format["DanuniPbBin"] = "danuni.binpb";
|
|
24498
25249
|
DM_format["BiliXml"] = "bili.xml";
|
|
24499
|
-
DM_format["BiliPbBin"] = "bili.
|
|
24500
|
-
DM_format["BiliCmdPbBin"] = "bili.cmd.
|
|
25250
|
+
DM_format["BiliPbBin"] = "bili.binpb";
|
|
25251
|
+
DM_format["BiliCmdPbBin"] = "bili.cmd.binpb";
|
|
24501
25252
|
DM_format["BiliUpJson"] = "bili.up.json";
|
|
24502
25253
|
DM_format["DplayerJson"] = "dplayer.json";
|
|
24503
25254
|
DM_format["ArtplayerJson"] = "artplayer.json";
|
|
@@ -24717,6 +25468,87 @@ and limitations under the License.
|
|
|
24717
25468
|
return this.dans.map((d)=>d.minify());
|
|
24718
25469
|
}
|
|
24719
25470
|
static import(file, options, mod) {
|
|
25471
|
+
const handlers = {
|
|
25472
|
+
["danuni.json"]: (json)=>({
|
|
25473
|
+
pool: new UniPool(json, options),
|
|
25474
|
+
fmt: "danuni.json"
|
|
25475
|
+
}),
|
|
25476
|
+
["danuni.min.json"]: (json)=>({
|
|
25477
|
+
pool: this.fromMin(json, options),
|
|
25478
|
+
fmt: "danuni.min.json"
|
|
25479
|
+
}),
|
|
25480
|
+
["danuni.binpb"]: (file)=>({
|
|
25481
|
+
pool: this.fromPb(file),
|
|
25482
|
+
fmt: "danuni.binpb"
|
|
25483
|
+
}),
|
|
25484
|
+
["bili.xml"]: (file)=>({
|
|
25485
|
+
pool: this.fromBiliXML(file, options),
|
|
25486
|
+
fmt: "bili.xml"
|
|
25487
|
+
}),
|
|
25488
|
+
["bili.binpb"]: (file)=>({
|
|
25489
|
+
pool: this.fromBiliGrpc(file),
|
|
25490
|
+
fmt: "bili.binpb"
|
|
25491
|
+
}),
|
|
25492
|
+
["bili.cmd.binpb"]: (file)=>({
|
|
25493
|
+
pool: this.fromBiliCommandGrpc(file),
|
|
25494
|
+
fmt: "bili.cmd.binpb"
|
|
25495
|
+
}),
|
|
25496
|
+
["bili.up.json"]: (json)=>({
|
|
25497
|
+
pool: this.fromBiliUp(json, options),
|
|
25498
|
+
fmt: "bili.up.json"
|
|
25499
|
+
}),
|
|
25500
|
+
["dplayer.json"]: (json)=>({
|
|
25501
|
+
pool: this.fromDplayer(json, json.danuni?.data ?? '', void 0, options),
|
|
25502
|
+
fmt: "dplayer.json"
|
|
25503
|
+
}),
|
|
25504
|
+
["artplayer.json"]: (json)=>({
|
|
25505
|
+
pool: this.fromArtplayer(json, json.danuni?.data ?? '', void 0, options),
|
|
25506
|
+
fmt: "artplayer.json"
|
|
25507
|
+
}),
|
|
25508
|
+
["ddplay.json"]: (json)=>({
|
|
25509
|
+
pool: this.fromDDPlay(json, json.danuni?.data ?? '', options),
|
|
25510
|
+
fmt: "ddplay.json"
|
|
25511
|
+
}),
|
|
25512
|
+
["common.ass"]: (file)=>({
|
|
25513
|
+
pool: this.fromASS(file, options),
|
|
25514
|
+
fmt: "common.ass"
|
|
25515
|
+
})
|
|
25516
|
+
};
|
|
25517
|
+
if ('string' == typeof mod) {
|
|
25518
|
+
const fn = mod;
|
|
25519
|
+
try {
|
|
25520
|
+
if (fn.endsWith("danuni.json")) return handlers["danuni.json"](fileParser(file, 'json'));
|
|
25521
|
+
if (fn.endsWith("danuni.min.json")) return handlers["danuni.min.json"](fileParser(file, 'json'));
|
|
25522
|
+
if (fn.endsWith("danuni.binpb")) return handlers["danuni.binpb"](fileParser(file, 'bin'));
|
|
25523
|
+
else if (fn.endsWith("bili.xml")) return handlers["bili.xml"](fileParser(file, 'string'));
|
|
25524
|
+
else if (fn.endsWith("bili.binpb")) return handlers["bili.binpb"](fileParser(file, 'bin'));
|
|
25525
|
+
else if (fn.endsWith("bili.cmd.binpb")) return handlers["bili.cmd.binpb"](fileParser(file, 'bin'));
|
|
25526
|
+
else if (fn.endsWith("bili.up.json")) return handlers["bili.up.json"](fileParser(file, 'json'));
|
|
25527
|
+
else if (fn.endsWith("dplayer.json")) return handlers["dplayer.json"](fileParser(file, 'json'));
|
|
25528
|
+
else if (fn.endsWith("artplayer.json")) return handlers["artplayer.json"](fileParser(file, 'json'));
|
|
25529
|
+
else if (fn.endsWith("ddplay.json")) return handlers["ddplay.json"](fileParser(file, 'json'));
|
|
25530
|
+
else if (fn.endsWith("common.ass")) return handlers["common.ass"](fileParser(file, 'string'));
|
|
25531
|
+
} catch {}
|
|
25532
|
+
const ext = fn.split('.').pop()?.toLowerCase();
|
|
25533
|
+
if (ext) {
|
|
25534
|
+
if ('json' === ext) mod = [
|
|
25535
|
+
'json'
|
|
25536
|
+
];
|
|
25537
|
+
else if ([
|
|
25538
|
+
'xml',
|
|
25539
|
+
'ass'
|
|
25540
|
+
].includes(ext)) mod = [
|
|
25541
|
+
'str'
|
|
25542
|
+
];
|
|
25543
|
+
else if ([
|
|
25544
|
+
'binpb',
|
|
25545
|
+
'bin',
|
|
25546
|
+
'so'
|
|
25547
|
+
].includes(ext)) mod = [
|
|
25548
|
+
'bin'
|
|
25549
|
+
];
|
|
25550
|
+
}
|
|
25551
|
+
}
|
|
24720
25552
|
if (!mod) mod = [
|
|
24721
25553
|
'json',
|
|
24722
25554
|
'str',
|
|
@@ -24725,26 +25557,11 @@ and limitations under the License.
|
|
|
24725
25557
|
const err = '无法识别该文件,请手动指定格式!';
|
|
24726
25558
|
const parseJSON = (json)=>{
|
|
24727
25559
|
try {
|
|
24728
|
-
if (Array.isArray(json) && json.every((d)=>d.SOID)) return
|
|
24729
|
-
|
|
24730
|
-
|
|
24731
|
-
|
|
24732
|
-
if (json.
|
|
24733
|
-
pool: this.fromArtplayer(json, json.danuni?.data ?? '', void 0, options),
|
|
24734
|
-
fmt: "artplayer.json"
|
|
24735
|
-
};
|
|
24736
|
-
if (json.count && json.comments && Array.isArray(json.comments) && json.comments.every((d)=>d.m)) return {
|
|
24737
|
-
pool: this.fromDDPlay(json, json.danuni?.data ?? '', options),
|
|
24738
|
-
fmt: "ddplay.json"
|
|
24739
|
-
};
|
|
24740
|
-
else if (0 == json.code && json.data && Array.isArray(json.data) && json.data.every((d)=>Array.isArray(d))) return {
|
|
24741
|
-
pool: this.fromDplayer(json, json.danuni?.data ?? '', void 0, options),
|
|
24742
|
-
fmt: "dplayer.json"
|
|
24743
|
-
};
|
|
24744
|
-
else if (0 == json.code && '0' == json.message && json.data && json.data.page && json.data.result && Array.isArray(json.data.result) && json.data.result.every((d)=>d.id && d.oid)) return {
|
|
24745
|
-
pool: this.fromBiliUp(json, options),
|
|
24746
|
-
fmt: "bili.up.json"
|
|
24747
|
-
};
|
|
25560
|
+
if (Array.isArray(json) && json.every((d)=>d.SOID)) return handlers["danuni.min.json"](json);
|
|
25561
|
+
if (json.danmuku && json.danmuku.every((d)=>d.text)) return handlers["artplayer.json"](json);
|
|
25562
|
+
if (json.count && json.comments && Array.isArray(json.comments) && json.comments.every((d)=>d.m)) return handlers["ddplay.json"](json);
|
|
25563
|
+
else if (0 == json.code && json.data && Array.isArray(json.data) && json.data.every((d)=>Array.isArray(d))) return handlers["dplayer.json"](json);
|
|
25564
|
+
else if (0 == json.code && '0' == json.message && json.data && json.data.page && json.data.result && Array.isArray(json.data.result) && json.data.result.every((d)=>d.id && d.oid)) return handlers["bili.up.json"](json);
|
|
24748
25565
|
} catch {}
|
|
24749
25566
|
};
|
|
24750
25567
|
const parseStr = (file)=>{
|
|
@@ -24760,40 +25577,25 @@ and limitations under the License.
|
|
|
24760
25577
|
ignoreAttributes: false
|
|
24761
25578
|
});
|
|
24762
25579
|
const xml = xmlParser.parse(file);
|
|
24763
|
-
if (xml?.i?.d) return
|
|
24764
|
-
pool: this.fromBiliXML(file, options),
|
|
24765
|
-
fmt: "bili.xml"
|
|
24766
|
-
};
|
|
25580
|
+
if (xml?.i?.d) return handlers["bili.xml"](file);
|
|
24767
25581
|
} catch {}
|
|
24768
25582
|
try {
|
|
24769
|
-
return
|
|
24770
|
-
pool: this.fromASS(file, options),
|
|
24771
|
-
fmt: "common.ass"
|
|
24772
|
-
};
|
|
25583
|
+
return handlers["common.ass"](file);
|
|
24773
25584
|
} catch {}
|
|
24774
25585
|
}
|
|
24775
25586
|
};
|
|
24776
25587
|
let errmesg;
|
|
24777
|
-
if (
|
|
25588
|
+
if ('object' == typeof file || Array.isArray(file)) {
|
|
24778
25589
|
if (file instanceof ArrayBuffer || file instanceof Uint8Array) {
|
|
24779
25590
|
if (mod.includes('bin')) {
|
|
24780
25591
|
try {
|
|
24781
|
-
return
|
|
24782
|
-
pool: this.fromPb(file),
|
|
24783
|
-
fmt: "danuni.pb.bin"
|
|
24784
|
-
};
|
|
25592
|
+
return handlers["danuni.binpb"](file);
|
|
24785
25593
|
} catch {}
|
|
24786
25594
|
try {
|
|
24787
|
-
return
|
|
24788
|
-
pool: this.fromBiliGrpc(file),
|
|
24789
|
-
fmt: "bili.pb.bin"
|
|
24790
|
-
};
|
|
25595
|
+
return handlers["bili.binpb"](file);
|
|
24791
25596
|
} catch {}
|
|
24792
25597
|
try {
|
|
24793
|
-
return
|
|
24794
|
-
pool: this.fromBiliCommandGrpc(file),
|
|
24795
|
-
fmt: "bili.cmd.pb.bin"
|
|
24796
|
-
};
|
|
25598
|
+
return handlers["bili.cmd.binpb"](file);
|
|
24797
25599
|
} catch {}
|
|
24798
25600
|
}
|
|
24799
25601
|
try {
|
|
@@ -24818,7 +25620,9 @@ and limitations under the License.
|
|
|
24818
25620
|
switch(format){
|
|
24819
25621
|
case 'danuni.json':
|
|
24820
25622
|
return this.dans;
|
|
24821
|
-
case 'danuni.
|
|
25623
|
+
case 'danuni.min.json':
|
|
25624
|
+
return this.minify();
|
|
25625
|
+
case 'danuni.binpb':
|
|
24822
25626
|
return this.toPb();
|
|
24823
25627
|
case 'bili.xml':
|
|
24824
25628
|
return this.toBiliXML();
|
|
@@ -24836,12 +25640,18 @@ and limitations under the License.
|
|
|
24836
25640
|
}
|
|
24837
25641
|
}
|
|
24838
25642
|
}
|
|
25643
|
+
static fromMin(json, options) {
|
|
25644
|
+
return new UniPool(json.map((d)=>UniDM.create(d, options)));
|
|
25645
|
+
}
|
|
24839
25646
|
static fromPb(bin, options) {
|
|
24840
|
-
const data = fromBinary(
|
|
25647
|
+
const data = fromBinary(ListDanResponseSchema, new Uint8Array(bin));
|
|
24841
25648
|
return new UniPool(data.danmakus.map((d)=>UniDM.create({
|
|
24842
25649
|
...d,
|
|
25650
|
+
SOID: d.soid,
|
|
25651
|
+
DMID: d.dmid,
|
|
24843
25652
|
progress: d.progress / 1000,
|
|
24844
25653
|
mode: d.mode,
|
|
25654
|
+
senderID: d.senderId,
|
|
24845
25655
|
ctime: timestampDate(d.ctime || timestampNow()),
|
|
24846
25656
|
pool: d.pool,
|
|
24847
25657
|
attr: d.attr,
|
|
@@ -24850,15 +25660,15 @@ and limitations under the License.
|
|
|
24850
25660
|
}, options)), options);
|
|
24851
25661
|
}
|
|
24852
25662
|
toPb() {
|
|
24853
|
-
return toBinary(
|
|
25663
|
+
return toBinary(ListDanResponseSchema, create(ListDanResponseSchema, {
|
|
24854
25664
|
danmakus: this.dans.map((d)=>({
|
|
24855
|
-
|
|
24856
|
-
|
|
25665
|
+
soid: d.SOID,
|
|
25666
|
+
dmid: d.DMID ?? '',
|
|
24857
25667
|
progress: Math.round(1000 * d.progress),
|
|
24858
25668
|
mode: d.mode,
|
|
24859
25669
|
fontsize: d.fontsize,
|
|
24860
25670
|
color: d.color,
|
|
24861
|
-
|
|
25671
|
+
senderId: d.senderID,
|
|
24862
25672
|
content: d.content,
|
|
24863
25673
|
ctime: timestampFromDate(d.ctime),
|
|
24864
25674
|
weight: d.weight,
|
|
@@ -24894,7 +25704,7 @@ and limitations under the License.
|
|
|
24894
25704
|
const ok = this.dans.every((d)=>d.senderID.endsWith(`@${platform.PlatformVideoSource.Bilibili}`));
|
|
24895
25705
|
if (!ok) throw new Error('存在其他来源的senderID,请关闭该功能再试!');
|
|
24896
25706
|
}
|
|
24897
|
-
const builder = new
|
|
25707
|
+
const builder = new json2xml({
|
|
24898
25708
|
ignoreAttributes: false
|
|
24899
25709
|
});
|
|
24900
25710
|
return builder.build({
|