@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: bili.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;
|
|
@@ -13581,9 +13581,6 @@
|
|
|
13581
13581
|
function IsJSON_isJSON(value) {
|
|
13582
13582
|
return 'string' == typeof value && isJSON_default()(value);
|
|
13583
13583
|
}
|
|
13584
|
-
function isObject(value) {
|
|
13585
|
-
return null != value && ('object' == typeof value || 'function' == typeof value) && !Array.isArray(value);
|
|
13586
|
-
}
|
|
13587
13584
|
var defaultContainer = new (function() {
|
|
13588
13585
|
function class_1() {
|
|
13589
13586
|
this.instances = [];
|
|
@@ -13649,6 +13646,7 @@
|
|
|
13649
13646
|
this.always = args.validationOptions.always;
|
|
13650
13647
|
this.each = args.validationOptions.each;
|
|
13651
13648
|
this.context = args.validationOptions.context;
|
|
13649
|
+
this.validateIf = args.validationOptions.validateIf;
|
|
13652
13650
|
}
|
|
13653
13651
|
}
|
|
13654
13652
|
return ValidationMetadata;
|
|
@@ -13923,6 +13921,48 @@
|
|
|
13923
13921
|
}
|
|
13924
13922
|
}, validationOptions);
|
|
13925
13923
|
}
|
|
13924
|
+
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';
|
|
13925
|
+
const nameChar = nameStartChar + '\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040';
|
|
13926
|
+
const nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*';
|
|
13927
|
+
const regexName = new RegExp('^' + nameRegexp + '$');
|
|
13928
|
+
function getAllMatches(string, regex) {
|
|
13929
|
+
const matches = [];
|
|
13930
|
+
let match = regex.exec(string);
|
|
13931
|
+
while(match){
|
|
13932
|
+
const allmatches = [];
|
|
13933
|
+
allmatches.startIndex = regex.lastIndex - match[0].length;
|
|
13934
|
+
const len = match.length;
|
|
13935
|
+
for(let index = 0; index < len; index++)allmatches.push(match[index]);
|
|
13936
|
+
matches.push(allmatches);
|
|
13937
|
+
match = regex.exec(string);
|
|
13938
|
+
}
|
|
13939
|
+
return matches;
|
|
13940
|
+
}
|
|
13941
|
+
const isName = function(string) {
|
|
13942
|
+
const match = regexName.exec(string);
|
|
13943
|
+
return null != match;
|
|
13944
|
+
};
|
|
13945
|
+
function isExist(v) {
|
|
13946
|
+
return void 0 !== v;
|
|
13947
|
+
}
|
|
13948
|
+
const DANGEROUS_PROPERTY_NAMES = [
|
|
13949
|
+
'hasOwnProperty',
|
|
13950
|
+
'toString',
|
|
13951
|
+
'valueOf',
|
|
13952
|
+
'__defineGetter__',
|
|
13953
|
+
'__defineSetter__',
|
|
13954
|
+
'__lookupGetter__',
|
|
13955
|
+
'__lookupSetter__'
|
|
13956
|
+
];
|
|
13957
|
+
const criticalProperties = [
|
|
13958
|
+
"__proto__",
|
|
13959
|
+
"constructor",
|
|
13960
|
+
"prototype"
|
|
13961
|
+
];
|
|
13962
|
+
const defaultOnDangerousProperty = (name)=>{
|
|
13963
|
+
if (DANGEROUS_PROPERTY_NAMES.includes(name)) return "__" + name;
|
|
13964
|
+
return name;
|
|
13965
|
+
};
|
|
13926
13966
|
const OptionsBuilder_defaultOptions = {
|
|
13927
13967
|
preserveOrder: false,
|
|
13928
13968
|
attributeNamePrefix: '@_',
|
|
@@ -13960,42 +14000,81 @@
|
|
|
13960
14000
|
updateTag: function(tagName, jPath, attrs) {
|
|
13961
14001
|
return tagName;
|
|
13962
14002
|
},
|
|
13963
|
-
captureMetaData: false
|
|
13964
|
-
|
|
13965
|
-
|
|
13966
|
-
|
|
13967
|
-
|
|
13968
|
-
|
|
13969
|
-
|
|
13970
|
-
|
|
13971
|
-
|
|
13972
|
-
|
|
13973
|
-
|
|
13974
|
-
|
|
13975
|
-
|
|
13976
|
-
|
|
13977
|
-
|
|
13978
|
-
|
|
13979
|
-
|
|
13980
|
-
|
|
13981
|
-
|
|
13982
|
-
|
|
13983
|
-
|
|
14003
|
+
captureMetaData: false,
|
|
14004
|
+
maxNestedTags: 100,
|
|
14005
|
+
strictReservedNames: true,
|
|
14006
|
+
jPath: true,
|
|
14007
|
+
onDangerousProperty: defaultOnDangerousProperty
|
|
14008
|
+
};
|
|
14009
|
+
function validatePropertyName(propertyName, optionName) {
|
|
14010
|
+
if ('string' != typeof propertyName) return;
|
|
14011
|
+
const normalized = propertyName.toLowerCase();
|
|
14012
|
+
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`);
|
|
14013
|
+
if (criticalProperties.some((dangerous)=>normalized === dangerous.toLowerCase())) throw new Error(`[SECURITY] Invalid ${optionName}: "${propertyName}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
14014
|
+
}
|
|
14015
|
+
function normalizeProcessEntities(value) {
|
|
14016
|
+
if ('boolean' == typeof value) return {
|
|
14017
|
+
enabled: value,
|
|
14018
|
+
maxEntitySize: 10000,
|
|
14019
|
+
maxExpansionDepth: 10,
|
|
14020
|
+
maxTotalExpansions: 1000,
|
|
14021
|
+
maxExpandedLength: 100000,
|
|
14022
|
+
maxEntityCount: 100,
|
|
14023
|
+
allowedTags: null,
|
|
14024
|
+
tagFilter: null
|
|
14025
|
+
};
|
|
14026
|
+
if ('object' == typeof value && null !== value) return {
|
|
14027
|
+
enabled: false !== value.enabled,
|
|
14028
|
+
maxEntitySize: Math.max(1, value.maxEntitySize ?? 10000),
|
|
14029
|
+
maxExpansionDepth: Math.max(1, value.maxExpansionDepth ?? 10),
|
|
14030
|
+
maxTotalExpansions: Math.max(1, value.maxTotalExpansions ?? 1000),
|
|
14031
|
+
maxExpandedLength: Math.max(1, value.maxExpandedLength ?? 100000),
|
|
14032
|
+
maxEntityCount: Math.max(1, value.maxEntityCount ?? 100),
|
|
14033
|
+
allowedTags: value.allowedTags ?? null,
|
|
14034
|
+
tagFilter: value.tagFilter ?? null
|
|
14035
|
+
};
|
|
14036
|
+
return normalizeProcessEntities(true);
|
|
13984
14037
|
}
|
|
13985
|
-
const
|
|
13986
|
-
const
|
|
13987
|
-
|
|
14038
|
+
const buildOptions = function(options) {
|
|
14039
|
+
const built = Object.assign({}, OptionsBuilder_defaultOptions, options);
|
|
14040
|
+
const propertyNameOptions = [
|
|
14041
|
+
{
|
|
14042
|
+
value: built.attributeNamePrefix,
|
|
14043
|
+
name: 'attributeNamePrefix'
|
|
14044
|
+
},
|
|
14045
|
+
{
|
|
14046
|
+
value: built.attributesGroupName,
|
|
14047
|
+
name: 'attributesGroupName'
|
|
14048
|
+
},
|
|
14049
|
+
{
|
|
14050
|
+
value: built.textNodeName,
|
|
14051
|
+
name: 'textNodeName'
|
|
14052
|
+
},
|
|
14053
|
+
{
|
|
14054
|
+
value: built.cdataPropName,
|
|
14055
|
+
name: 'cdataPropName'
|
|
14056
|
+
},
|
|
14057
|
+
{
|
|
14058
|
+
value: built.commentPropName,
|
|
14059
|
+
name: 'commentPropName'
|
|
14060
|
+
}
|
|
14061
|
+
];
|
|
14062
|
+
for (const { value, name } of propertyNameOptions)if (value) validatePropertyName(value, name);
|
|
14063
|
+
if (null === built.onDangerousProperty) built.onDangerousProperty = defaultOnDangerousProperty;
|
|
14064
|
+
built.processEntities = normalizeProcessEntities(built.processEntities);
|
|
14065
|
+
if (built.stopNodes && Array.isArray(built.stopNodes)) built.stopNodes = built.stopNodes.map((node)=>{
|
|
14066
|
+
if ('string' == typeof node && node.startsWith('*.')) return '..' + node.substring(2);
|
|
14067
|
+
return node;
|
|
14068
|
+
});
|
|
14069
|
+
return built;
|
|
13988
14070
|
};
|
|
13989
|
-
function isExist(v) {
|
|
13990
|
-
return void 0 !== v;
|
|
13991
|
-
}
|
|
13992
14071
|
let METADATA_SYMBOL;
|
|
13993
14072
|
METADATA_SYMBOL = "function" != typeof Symbol ? "@@xmlMetadata" : Symbol("XML Node Metadata");
|
|
13994
14073
|
class XmlNode {
|
|
13995
14074
|
constructor(tagname){
|
|
13996
14075
|
this.tagname = tagname;
|
|
13997
14076
|
this.child = [];
|
|
13998
|
-
this[":@"] =
|
|
14077
|
+
this[":@"] = Object.create(null);
|
|
13999
14078
|
}
|
|
14000
14079
|
add(key, val) {
|
|
14001
14080
|
if ("__proto__" === key) key = "#__proto__";
|
|
@@ -14021,11 +14100,13 @@
|
|
|
14021
14100
|
}
|
|
14022
14101
|
}
|
|
14023
14102
|
class DocTypeReader {
|
|
14024
|
-
constructor(
|
|
14025
|
-
this.suppressValidationErr = !
|
|
14103
|
+
constructor(options){
|
|
14104
|
+
this.suppressValidationErr = !options;
|
|
14105
|
+
this.options = options;
|
|
14026
14106
|
}
|
|
14027
14107
|
readDocType(xmlData, i) {
|
|
14028
|
-
const entities =
|
|
14108
|
+
const entities = Object.create(null);
|
|
14109
|
+
let entityCount = 0;
|
|
14029
14110
|
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]) {
|
|
14030
14111
|
i += 9;
|
|
14031
14112
|
let angleBracketsCount = 1;
|
|
@@ -14046,11 +14127,13 @@
|
|
|
14046
14127
|
let entityName, val;
|
|
14047
14128
|
[entityName, val, i] = this.readEntityExp(xmlData, i + 1, this.suppressValidationErr);
|
|
14048
14129
|
if (-1 === val.indexOf("&")) {
|
|
14049
|
-
|
|
14130
|
+
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})`);
|
|
14131
|
+
const escaped = entityName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
14050
14132
|
entities[entityName] = {
|
|
14051
14133
|
regx: RegExp(`&${escaped};`, "g"),
|
|
14052
14134
|
val: val
|
|
14053
14135
|
};
|
|
14136
|
+
entityCount++;
|
|
14054
14137
|
}
|
|
14055
14138
|
} else if (hasBody && hasSeq(xmlData, "!ELEMENT", i)) {
|
|
14056
14139
|
i += 8;
|
|
@@ -14074,11 +14157,9 @@
|
|
|
14074
14157
|
}
|
|
14075
14158
|
readEntityExp(xmlData, i) {
|
|
14076
14159
|
i = skipWhitespace(xmlData, i);
|
|
14077
|
-
|
|
14078
|
-
while(i < xmlData.length && !/\s/.test(xmlData[i]) && '"' !== xmlData[i] && "'" !== xmlData[i])
|
|
14079
|
-
|
|
14080
|
-
i++;
|
|
14081
|
-
}
|
|
14160
|
+
const startIndex = i;
|
|
14161
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i]) && '"' !== xmlData[i] && "'" !== xmlData[i])i++;
|
|
14162
|
+
let entityName = xmlData.substring(startIndex, i);
|
|
14082
14163
|
validateEntityName(entityName);
|
|
14083
14164
|
i = skipWhitespace(xmlData, i);
|
|
14084
14165
|
if (!this.suppressValidationErr) {
|
|
@@ -14087,6 +14168,7 @@
|
|
|
14087
14168
|
}
|
|
14088
14169
|
let entityValue = "";
|
|
14089
14170
|
[i, entityValue] = this.readIdentifierVal(xmlData, i, "entity");
|
|
14171
|
+
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})`);
|
|
14090
14172
|
i--;
|
|
14091
14173
|
return [
|
|
14092
14174
|
entityName,
|
|
@@ -14096,11 +14178,9 @@
|
|
|
14096
14178
|
}
|
|
14097
14179
|
readNotationExp(xmlData, i) {
|
|
14098
14180
|
i = skipWhitespace(xmlData, i);
|
|
14099
|
-
|
|
14100
|
-
while(i < xmlData.length && !/\s/.test(xmlData[i]))
|
|
14101
|
-
|
|
14102
|
-
i++;
|
|
14103
|
-
}
|
|
14181
|
+
const startIndex = i;
|
|
14182
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i]))i++;
|
|
14183
|
+
let notationName = xmlData.substring(startIndex, i);
|
|
14104
14184
|
this.suppressValidationErr || validateEntityName(notationName);
|
|
14105
14185
|
i = skipWhitespace(xmlData, i);
|
|
14106
14186
|
const identifierType = xmlData.substring(i, i + 6).toUpperCase();
|
|
@@ -14129,10 +14209,9 @@
|
|
|
14129
14209
|
const startChar = xmlData[i];
|
|
14130
14210
|
if ('"' !== startChar && "'" !== startChar) throw new Error(`Expected quoted string, found "${startChar}"`);
|
|
14131
14211
|
i++;
|
|
14132
|
-
|
|
14133
|
-
|
|
14134
|
-
|
|
14135
|
-
}
|
|
14212
|
+
const startIndex = i;
|
|
14213
|
+
while(i < xmlData.length && xmlData[i] !== startChar)i++;
|
|
14214
|
+
identifierVal = xmlData.substring(startIndex, i);
|
|
14136
14215
|
if (xmlData[i] !== startChar) throw new Error(`Unterminated ${type} value`);
|
|
14137
14216
|
i++;
|
|
14138
14217
|
return [
|
|
@@ -14142,11 +14221,9 @@
|
|
|
14142
14221
|
}
|
|
14143
14222
|
readElementExp(xmlData, i) {
|
|
14144
14223
|
i = skipWhitespace(xmlData, i);
|
|
14145
|
-
|
|
14146
|
-
while(i < xmlData.length && !/\s/.test(xmlData[i]))
|
|
14147
|
-
|
|
14148
|
-
i++;
|
|
14149
|
-
}
|
|
14224
|
+
const startIndex = i;
|
|
14225
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i]))i++;
|
|
14226
|
+
let elementName = xmlData.substring(startIndex, i);
|
|
14150
14227
|
if (!this.suppressValidationErr && !isName(elementName)) throw new Error(`Invalid element name: "${elementName}"`);
|
|
14151
14228
|
i = skipWhitespace(xmlData, i);
|
|
14152
14229
|
let contentModel = "";
|
|
@@ -14154,10 +14231,9 @@
|
|
|
14154
14231
|
else if ("A" === xmlData[i] && hasSeq(xmlData, "NY", i)) i += 2;
|
|
14155
14232
|
else if ("(" === xmlData[i]) {
|
|
14156
14233
|
i++;
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
}
|
|
14234
|
+
const startIndex = i;
|
|
14235
|
+
while(i < xmlData.length && ")" !== xmlData[i])i++;
|
|
14236
|
+
contentModel = xmlData.substring(startIndex, i);
|
|
14161
14237
|
if (")" !== xmlData[i]) throw new Error("Unterminated content model");
|
|
14162
14238
|
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${xmlData[i]}"`);
|
|
14163
14239
|
return {
|
|
@@ -14168,18 +14244,14 @@
|
|
|
14168
14244
|
}
|
|
14169
14245
|
readAttlistExp(xmlData, i) {
|
|
14170
14246
|
i = skipWhitespace(xmlData, i);
|
|
14171
|
-
let
|
|
14172
|
-
while(i < xmlData.length && !/\s/.test(xmlData[i]))
|
|
14173
|
-
|
|
14174
|
-
i++;
|
|
14175
|
-
}
|
|
14247
|
+
let startIndex = i;
|
|
14248
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i]))i++;
|
|
14249
|
+
let elementName = xmlData.substring(startIndex, i);
|
|
14176
14250
|
validateEntityName(elementName);
|
|
14177
14251
|
i = skipWhitespace(xmlData, i);
|
|
14178
|
-
|
|
14179
|
-
while(i < xmlData.length && !/\s/.test(xmlData[i]))
|
|
14180
|
-
|
|
14181
|
-
i++;
|
|
14182
|
-
}
|
|
14252
|
+
startIndex = i;
|
|
14253
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i]))i++;
|
|
14254
|
+
let attributeName = xmlData.substring(startIndex, i);
|
|
14183
14255
|
if (!validateEntityName(attributeName)) throw new Error(`Invalid attribute name: "${attributeName}"`);
|
|
14184
14256
|
i = skipWhitespace(xmlData, i);
|
|
14185
14257
|
let attributeType = "";
|
|
@@ -14191,11 +14263,9 @@
|
|
|
14191
14263
|
i++;
|
|
14192
14264
|
let allowedNotations = [];
|
|
14193
14265
|
while(i < xmlData.length && ")" !== xmlData[i]){
|
|
14194
|
-
|
|
14195
|
-
while(i < xmlData.length && "|" !== xmlData[i] && ")" !== xmlData[i])
|
|
14196
|
-
|
|
14197
|
-
i++;
|
|
14198
|
-
}
|
|
14266
|
+
const startIndex = i;
|
|
14267
|
+
while(i < xmlData.length && "|" !== xmlData[i] && ")" !== xmlData[i])i++;
|
|
14268
|
+
let notation = xmlData.substring(startIndex, i);
|
|
14199
14269
|
notation = notation.trim();
|
|
14200
14270
|
if (!validateEntityName(notation)) throw new Error(`Invalid notation name: "${notation}"`);
|
|
14201
14271
|
allowedNotations.push(notation);
|
|
@@ -14208,10 +14278,9 @@
|
|
|
14208
14278
|
i++;
|
|
14209
14279
|
attributeType += " (" + allowedNotations.join("|") + ")";
|
|
14210
14280
|
} else {
|
|
14211
|
-
|
|
14212
|
-
|
|
14213
|
-
|
|
14214
|
-
}
|
|
14281
|
+
const startIndex = i;
|
|
14282
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i]))i++;
|
|
14283
|
+
attributeType += xmlData.substring(startIndex, i);
|
|
14215
14284
|
const validTypes = [
|
|
14216
14285
|
"CDATA",
|
|
14217
14286
|
"ID",
|
|
@@ -14260,7 +14329,8 @@
|
|
|
14260
14329
|
hex: true,
|
|
14261
14330
|
leadingZeros: true,
|
|
14262
14331
|
decimalPoint: "\.",
|
|
14263
|
-
eNotation: true
|
|
14332
|
+
eNotation: true,
|
|
14333
|
+
infinity: "original"
|
|
14264
14334
|
};
|
|
14265
14335
|
function toNumber(str, options = {}) {
|
|
14266
14336
|
options = Object.assign({}, consider, options);
|
|
@@ -14270,6 +14340,7 @@
|
|
|
14270
14340
|
{
|
|
14271
14341
|
if ("0" === str) return 0;
|
|
14272
14342
|
if (options.hex && hexRegex.test(trimmedStr)) return parse_int(trimmedStr, 16);
|
|
14343
|
+
if (!isFinite(trimmedStr)) return handleInfinity(str, Number(trimmedStr), options);
|
|
14273
14344
|
if (trimmedStr.includes('e') || trimmedStr.includes('E')) return resolveEnotation(str, trimmedStr, options);
|
|
14274
14345
|
const match = numRegex.exec(trimmedStr);
|
|
14275
14346
|
if (!match) return str;
|
|
@@ -14308,6 +14379,7 @@
|
|
|
14308
14379
|
const eAdjacentToLeadingZeros = sign ? str[leadingZeros.length + 1] === eChar : str[leadingZeros.length] === eChar;
|
|
14309
14380
|
if (leadingZeros.length > 1 && eAdjacentToLeadingZeros) return str;
|
|
14310
14381
|
if (1 === leadingZeros.length && (notation[3].startsWith(`.${eChar}`) || notation[3][0] === eChar)) return Number(trimmedStr);
|
|
14382
|
+
if (!(leadingZeros.length > 0)) return Number(trimmedStr);
|
|
14311
14383
|
if (!options.leadingZeros || !!eAdjacentToLeadingZeros) return str;
|
|
14312
14384
|
trimmedStr = (notation[1] || "") + notation[3];
|
|
14313
14385
|
return Number(trimmedStr);
|
|
@@ -14328,6 +14400,20 @@
|
|
|
14328
14400
|
if (window && window.parseInt) return window.parseInt(numStr, base);
|
|
14329
14401
|
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
|
14330
14402
|
}
|
|
14403
|
+
function handleInfinity(str, num, options) {
|
|
14404
|
+
const isPositive = num === 1 / 0;
|
|
14405
|
+
switch(options.infinity.toLowerCase()){
|
|
14406
|
+
case "null":
|
|
14407
|
+
return null;
|
|
14408
|
+
case "infinity":
|
|
14409
|
+
return num;
|
|
14410
|
+
case "string":
|
|
14411
|
+
return isPositive ? "Infinity" : "-Infinity";
|
|
14412
|
+
case "original":
|
|
14413
|
+
default:
|
|
14414
|
+
return str;
|
|
14415
|
+
}
|
|
14416
|
+
}
|
|
14331
14417
|
function getIgnoreAttributesFn(ignoreAttributes) {
|
|
14332
14418
|
if ('function' == typeof ignoreAttributes) return ignoreAttributes;
|
|
14333
14419
|
if (Array.isArray(ignoreAttributes)) return (attrName)=>{
|
|
@@ -14338,6 +14424,329 @@
|
|
|
14338
14424
|
};
|
|
14339
14425
|
return ()=>false;
|
|
14340
14426
|
}
|
|
14427
|
+
const MUTATING_METHODS = new Set([
|
|
14428
|
+
'push',
|
|
14429
|
+
'pop',
|
|
14430
|
+
'reset',
|
|
14431
|
+
'updateCurrent',
|
|
14432
|
+
'restore'
|
|
14433
|
+
]);
|
|
14434
|
+
class Matcher {
|
|
14435
|
+
constructor(options = {}){
|
|
14436
|
+
this.separator = options.separator || '.';
|
|
14437
|
+
this.path = [];
|
|
14438
|
+
this.siblingStacks = [];
|
|
14439
|
+
}
|
|
14440
|
+
push(tagName, attrValues = null, namespace = null) {
|
|
14441
|
+
if (this.path.length > 0) {
|
|
14442
|
+
const prev = this.path[this.path.length - 1];
|
|
14443
|
+
prev.values = void 0;
|
|
14444
|
+
}
|
|
14445
|
+
const currentLevel = this.path.length;
|
|
14446
|
+
if (!this.siblingStacks[currentLevel]) this.siblingStacks[currentLevel] = new Map();
|
|
14447
|
+
const siblings = this.siblingStacks[currentLevel];
|
|
14448
|
+
const siblingKey = namespace ? `${namespace}:${tagName}` : tagName;
|
|
14449
|
+
const counter = siblings.get(siblingKey) || 0;
|
|
14450
|
+
let position = 0;
|
|
14451
|
+
for (const count of siblings.values())position += count;
|
|
14452
|
+
siblings.set(siblingKey, counter + 1);
|
|
14453
|
+
const node = {
|
|
14454
|
+
tag: tagName,
|
|
14455
|
+
position: position,
|
|
14456
|
+
counter: counter
|
|
14457
|
+
};
|
|
14458
|
+
if (null != namespace) node.namespace = namespace;
|
|
14459
|
+
if (null != attrValues) node.values = attrValues;
|
|
14460
|
+
this.path.push(node);
|
|
14461
|
+
}
|
|
14462
|
+
pop() {
|
|
14463
|
+
if (0 === this.path.length) return;
|
|
14464
|
+
const node = this.path.pop();
|
|
14465
|
+
if (this.siblingStacks.length > this.path.length + 1) this.siblingStacks.length = this.path.length + 1;
|
|
14466
|
+
return node;
|
|
14467
|
+
}
|
|
14468
|
+
updateCurrent(attrValues) {
|
|
14469
|
+
if (this.path.length > 0) {
|
|
14470
|
+
const current = this.path[this.path.length - 1];
|
|
14471
|
+
if (null != attrValues) current.values = attrValues;
|
|
14472
|
+
}
|
|
14473
|
+
}
|
|
14474
|
+
getCurrentTag() {
|
|
14475
|
+
return this.path.length > 0 ? this.path[this.path.length - 1].tag : void 0;
|
|
14476
|
+
}
|
|
14477
|
+
getCurrentNamespace() {
|
|
14478
|
+
return this.path.length > 0 ? this.path[this.path.length - 1].namespace : void 0;
|
|
14479
|
+
}
|
|
14480
|
+
getAttrValue(attrName) {
|
|
14481
|
+
if (0 === this.path.length) return;
|
|
14482
|
+
const current = this.path[this.path.length - 1];
|
|
14483
|
+
return current.values?.[attrName];
|
|
14484
|
+
}
|
|
14485
|
+
hasAttr(attrName) {
|
|
14486
|
+
if (0 === this.path.length) return false;
|
|
14487
|
+
const current = this.path[this.path.length - 1];
|
|
14488
|
+
return void 0 !== current.values && attrName in current.values;
|
|
14489
|
+
}
|
|
14490
|
+
getPosition() {
|
|
14491
|
+
if (0 === this.path.length) return -1;
|
|
14492
|
+
return this.path[this.path.length - 1].position ?? 0;
|
|
14493
|
+
}
|
|
14494
|
+
getCounter() {
|
|
14495
|
+
if (0 === this.path.length) return -1;
|
|
14496
|
+
return this.path[this.path.length - 1].counter ?? 0;
|
|
14497
|
+
}
|
|
14498
|
+
getIndex() {
|
|
14499
|
+
return this.getPosition();
|
|
14500
|
+
}
|
|
14501
|
+
getDepth() {
|
|
14502
|
+
return this.path.length;
|
|
14503
|
+
}
|
|
14504
|
+
toString(separator, includeNamespace = true) {
|
|
14505
|
+
const sep = separator || this.separator;
|
|
14506
|
+
return this.path.map((n)=>{
|
|
14507
|
+
if (includeNamespace && n.namespace) return `${n.namespace}:${n.tag}`;
|
|
14508
|
+
return n.tag;
|
|
14509
|
+
}).join(sep);
|
|
14510
|
+
}
|
|
14511
|
+
toArray() {
|
|
14512
|
+
return this.path.map((n)=>n.tag);
|
|
14513
|
+
}
|
|
14514
|
+
reset() {
|
|
14515
|
+
this.path = [];
|
|
14516
|
+
this.siblingStacks = [];
|
|
14517
|
+
}
|
|
14518
|
+
matches(expression) {
|
|
14519
|
+
const segments = expression.segments;
|
|
14520
|
+
if (0 === segments.length) return false;
|
|
14521
|
+
if (expression.hasDeepWildcard()) return this._matchWithDeepWildcard(segments);
|
|
14522
|
+
return this._matchSimple(segments);
|
|
14523
|
+
}
|
|
14524
|
+
_matchSimple(segments) {
|
|
14525
|
+
if (this.path.length !== segments.length) return false;
|
|
14526
|
+
for(let i = 0; i < segments.length; i++){
|
|
14527
|
+
const segment = segments[i];
|
|
14528
|
+
const node = this.path[i];
|
|
14529
|
+
const isCurrentNode = i === this.path.length - 1;
|
|
14530
|
+
if (!this._matchSegment(segment, node, isCurrentNode)) return false;
|
|
14531
|
+
}
|
|
14532
|
+
return true;
|
|
14533
|
+
}
|
|
14534
|
+
_matchWithDeepWildcard(segments) {
|
|
14535
|
+
let pathIdx = this.path.length - 1;
|
|
14536
|
+
let segIdx = segments.length - 1;
|
|
14537
|
+
while(segIdx >= 0 && pathIdx >= 0){
|
|
14538
|
+
const segment = segments[segIdx];
|
|
14539
|
+
if ('deep-wildcard' === segment.type) {
|
|
14540
|
+
segIdx--;
|
|
14541
|
+
if (segIdx < 0) return true;
|
|
14542
|
+
const nextSeg = segments[segIdx];
|
|
14543
|
+
let found = false;
|
|
14544
|
+
for(let i = pathIdx; i >= 0; i--){
|
|
14545
|
+
const isCurrentNode = i === this.path.length - 1;
|
|
14546
|
+
if (this._matchSegment(nextSeg, this.path[i], isCurrentNode)) {
|
|
14547
|
+
pathIdx = i - 1;
|
|
14548
|
+
segIdx--;
|
|
14549
|
+
found = true;
|
|
14550
|
+
break;
|
|
14551
|
+
}
|
|
14552
|
+
}
|
|
14553
|
+
if (!found) return false;
|
|
14554
|
+
} else {
|
|
14555
|
+
const isCurrentNode = pathIdx === this.path.length - 1;
|
|
14556
|
+
if (!this._matchSegment(segment, this.path[pathIdx], isCurrentNode)) return false;
|
|
14557
|
+
pathIdx--;
|
|
14558
|
+
segIdx--;
|
|
14559
|
+
}
|
|
14560
|
+
}
|
|
14561
|
+
return segIdx < 0;
|
|
14562
|
+
}
|
|
14563
|
+
_matchSegment(segment, node, isCurrentNode) {
|
|
14564
|
+
if ('*' !== segment.tag && segment.tag !== node.tag) return false;
|
|
14565
|
+
if (void 0 !== segment.namespace) {
|
|
14566
|
+
if ('*' !== segment.namespace && segment.namespace !== node.namespace) return false;
|
|
14567
|
+
}
|
|
14568
|
+
if (void 0 !== segment.attrName) {
|
|
14569
|
+
if (!isCurrentNode) return false;
|
|
14570
|
+
if (!node.values || !(segment.attrName in node.values)) return false;
|
|
14571
|
+
if (void 0 !== segment.attrValue) {
|
|
14572
|
+
const actualValue = node.values[segment.attrName];
|
|
14573
|
+
if (String(actualValue) !== String(segment.attrValue)) return false;
|
|
14574
|
+
}
|
|
14575
|
+
}
|
|
14576
|
+
if (void 0 !== segment.position) {
|
|
14577
|
+
if (!isCurrentNode) return false;
|
|
14578
|
+
const counter = node.counter ?? 0;
|
|
14579
|
+
if ('first' === segment.position && 0 !== counter) return false;
|
|
14580
|
+
if ('odd' === segment.position && counter % 2 !== 1) return false;
|
|
14581
|
+
if ('even' === segment.position && counter % 2 !== 0) return false;
|
|
14582
|
+
else if ('nth' === segment.position) {
|
|
14583
|
+
if (counter !== segment.positionValue) return false;
|
|
14584
|
+
}
|
|
14585
|
+
}
|
|
14586
|
+
return true;
|
|
14587
|
+
}
|
|
14588
|
+
snapshot() {
|
|
14589
|
+
return {
|
|
14590
|
+
path: this.path.map((node)=>({
|
|
14591
|
+
...node
|
|
14592
|
+
})),
|
|
14593
|
+
siblingStacks: this.siblingStacks.map((map)=>new Map(map))
|
|
14594
|
+
};
|
|
14595
|
+
}
|
|
14596
|
+
restore(snapshot) {
|
|
14597
|
+
this.path = snapshot.path.map((node)=>({
|
|
14598
|
+
...node
|
|
14599
|
+
}));
|
|
14600
|
+
this.siblingStacks = snapshot.siblingStacks.map((map)=>new Map(map));
|
|
14601
|
+
}
|
|
14602
|
+
readOnly() {
|
|
14603
|
+
const self1 = this;
|
|
14604
|
+
return new Proxy(self1, {
|
|
14605
|
+
get (target, prop, receiver) {
|
|
14606
|
+
if (MUTATING_METHODS.has(prop)) return ()=>{
|
|
14607
|
+
throw new TypeError(`Cannot call '${prop}' on a read-only Matcher. Obtain a writable instance to mutate state.`);
|
|
14608
|
+
};
|
|
14609
|
+
const value = Reflect.get(target, prop, receiver);
|
|
14610
|
+
if ('path' === prop || 'siblingStacks' === prop) return Object.freeze(Array.isArray(value) ? value.map((item)=>item instanceof Map ? Object.freeze(new Map(item)) : Object.freeze({
|
|
14611
|
+
...item
|
|
14612
|
+
})) : value);
|
|
14613
|
+
if ('function' == typeof value) return value.bind(target);
|
|
14614
|
+
return value;
|
|
14615
|
+
},
|
|
14616
|
+
set (_target, prop) {
|
|
14617
|
+
throw new TypeError(`Cannot set property '${String(prop)}' on a read-only Matcher.`);
|
|
14618
|
+
},
|
|
14619
|
+
deleteProperty (_target, prop) {
|
|
14620
|
+
throw new TypeError(`Cannot delete property '${String(prop)}' from a read-only Matcher.`);
|
|
14621
|
+
}
|
|
14622
|
+
});
|
|
14623
|
+
}
|
|
14624
|
+
}
|
|
14625
|
+
class Expression {
|
|
14626
|
+
constructor(pattern, options = {}){
|
|
14627
|
+
this.pattern = pattern;
|
|
14628
|
+
this.separator = options.separator || '.';
|
|
14629
|
+
this.segments = this._parse(pattern);
|
|
14630
|
+
this._hasDeepWildcard = this.segments.some((seg)=>'deep-wildcard' === seg.type);
|
|
14631
|
+
this._hasAttributeCondition = this.segments.some((seg)=>void 0 !== seg.attrName);
|
|
14632
|
+
this._hasPositionSelector = this.segments.some((seg)=>void 0 !== seg.position);
|
|
14633
|
+
}
|
|
14634
|
+
_parse(pattern) {
|
|
14635
|
+
const segments = [];
|
|
14636
|
+
let i = 0;
|
|
14637
|
+
let currentPart = '';
|
|
14638
|
+
while(i < pattern.length)if (pattern[i] === this.separator) if (i + 1 < pattern.length && pattern[i + 1] === this.separator) {
|
|
14639
|
+
if (currentPart.trim()) {
|
|
14640
|
+
segments.push(this._parseSegment(currentPart.trim()));
|
|
14641
|
+
currentPart = '';
|
|
14642
|
+
}
|
|
14643
|
+
segments.push({
|
|
14644
|
+
type: 'deep-wildcard'
|
|
14645
|
+
});
|
|
14646
|
+
i += 2;
|
|
14647
|
+
} else {
|
|
14648
|
+
if (currentPart.trim()) segments.push(this._parseSegment(currentPart.trim()));
|
|
14649
|
+
currentPart = '';
|
|
14650
|
+
i++;
|
|
14651
|
+
}
|
|
14652
|
+
else {
|
|
14653
|
+
currentPart += pattern[i];
|
|
14654
|
+
i++;
|
|
14655
|
+
}
|
|
14656
|
+
if (currentPart.trim()) segments.push(this._parseSegment(currentPart.trim()));
|
|
14657
|
+
return segments;
|
|
14658
|
+
}
|
|
14659
|
+
_parseSegment(part) {
|
|
14660
|
+
const segment = {
|
|
14661
|
+
type: 'tag'
|
|
14662
|
+
};
|
|
14663
|
+
let bracketContent = null;
|
|
14664
|
+
let withoutBrackets = part;
|
|
14665
|
+
const bracketMatch = part.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);
|
|
14666
|
+
if (bracketMatch) {
|
|
14667
|
+
withoutBrackets = bracketMatch[1] + bracketMatch[3];
|
|
14668
|
+
if (bracketMatch[2]) {
|
|
14669
|
+
const content = bracketMatch[2].slice(1, -1);
|
|
14670
|
+
if (content) bracketContent = content;
|
|
14671
|
+
}
|
|
14672
|
+
}
|
|
14673
|
+
let namespace;
|
|
14674
|
+
let tagAndPosition = withoutBrackets;
|
|
14675
|
+
if (withoutBrackets.includes('::')) {
|
|
14676
|
+
const nsIndex = withoutBrackets.indexOf('::');
|
|
14677
|
+
namespace = withoutBrackets.substring(0, nsIndex).trim();
|
|
14678
|
+
tagAndPosition = withoutBrackets.substring(nsIndex + 2).trim();
|
|
14679
|
+
if (!namespace) throw new Error(`Invalid namespace in pattern: ${part}`);
|
|
14680
|
+
}
|
|
14681
|
+
let tag;
|
|
14682
|
+
let positionMatch = null;
|
|
14683
|
+
if (tagAndPosition.includes(':')) {
|
|
14684
|
+
const colonIndex = tagAndPosition.lastIndexOf(':');
|
|
14685
|
+
const tagPart = tagAndPosition.substring(0, colonIndex).trim();
|
|
14686
|
+
const posPart = tagAndPosition.substring(colonIndex + 1).trim();
|
|
14687
|
+
const isPositionKeyword = [
|
|
14688
|
+
'first',
|
|
14689
|
+
'last',
|
|
14690
|
+
'odd',
|
|
14691
|
+
'even'
|
|
14692
|
+
].includes(posPart) || /^nth\(\d+\)$/.test(posPart);
|
|
14693
|
+
if (isPositionKeyword) {
|
|
14694
|
+
tag = tagPart;
|
|
14695
|
+
positionMatch = posPart;
|
|
14696
|
+
} else tag = tagAndPosition;
|
|
14697
|
+
} else tag = tagAndPosition;
|
|
14698
|
+
if (!tag) throw new Error(`Invalid segment pattern: ${part}`);
|
|
14699
|
+
segment.tag = tag;
|
|
14700
|
+
if (namespace) segment.namespace = namespace;
|
|
14701
|
+
if (bracketContent) if (bracketContent.includes('=')) {
|
|
14702
|
+
const eqIndex = bracketContent.indexOf('=');
|
|
14703
|
+
segment.attrName = bracketContent.substring(0, eqIndex).trim();
|
|
14704
|
+
segment.attrValue = bracketContent.substring(eqIndex + 1).trim();
|
|
14705
|
+
} else segment.attrName = bracketContent.trim();
|
|
14706
|
+
if (positionMatch) {
|
|
14707
|
+
const nthMatch = positionMatch.match(/^nth\((\d+)\)$/);
|
|
14708
|
+
if (nthMatch) {
|
|
14709
|
+
segment.position = 'nth';
|
|
14710
|
+
segment.positionValue = parseInt(nthMatch[1], 10);
|
|
14711
|
+
} else segment.position = positionMatch;
|
|
14712
|
+
}
|
|
14713
|
+
return segment;
|
|
14714
|
+
}
|
|
14715
|
+
get length() {
|
|
14716
|
+
return this.segments.length;
|
|
14717
|
+
}
|
|
14718
|
+
hasDeepWildcard() {
|
|
14719
|
+
return this._hasDeepWildcard;
|
|
14720
|
+
}
|
|
14721
|
+
hasAttributeCondition() {
|
|
14722
|
+
return this._hasAttributeCondition;
|
|
14723
|
+
}
|
|
14724
|
+
hasPositionSelector() {
|
|
14725
|
+
return this._hasPositionSelector;
|
|
14726
|
+
}
|
|
14727
|
+
toString() {
|
|
14728
|
+
return this.pattern;
|
|
14729
|
+
}
|
|
14730
|
+
}
|
|
14731
|
+
function extractRawAttributes(prefixedAttrs, options) {
|
|
14732
|
+
if (!prefixedAttrs) return {};
|
|
14733
|
+
const attrs = options.attributesGroupName ? prefixedAttrs[options.attributesGroupName] : prefixedAttrs;
|
|
14734
|
+
if (!attrs) return {};
|
|
14735
|
+
const rawAttrs = {};
|
|
14736
|
+
for(const key in attrs)if (key.startsWith(options.attributeNamePrefix)) {
|
|
14737
|
+
const rawName = key.substring(options.attributeNamePrefix.length);
|
|
14738
|
+
rawAttrs[rawName] = attrs[key];
|
|
14739
|
+
} else rawAttrs[key] = attrs[key];
|
|
14740
|
+
return rawAttrs;
|
|
14741
|
+
}
|
|
14742
|
+
function extractNamespace(rawTagName) {
|
|
14743
|
+
if (!rawTagName || 'string' != typeof rawTagName) return;
|
|
14744
|
+
const colonIndex = rawTagName.indexOf(':');
|
|
14745
|
+
if (-1 !== colonIndex && colonIndex > 0) {
|
|
14746
|
+
const ns = rawTagName.substring(0, colonIndex);
|
|
14747
|
+
if ('xmlns' !== ns) return ns;
|
|
14748
|
+
}
|
|
14749
|
+
}
|
|
14341
14750
|
class OrderedObjParser {
|
|
14342
14751
|
constructor(options){
|
|
14343
14752
|
this.options = options;
|
|
@@ -14419,13 +14828,17 @@
|
|
|
14419
14828
|
this.saveTextToParentTag = saveTextToParentTag;
|
|
14420
14829
|
this.addChild = addChild;
|
|
14421
14830
|
this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes);
|
|
14831
|
+
this.entityExpansionCount = 0;
|
|
14832
|
+
this.currentExpandedLength = 0;
|
|
14833
|
+
this.matcher = new Matcher();
|
|
14834
|
+
this.readonlyMatcher = this.matcher.readOnly();
|
|
14835
|
+
this.isCurrentNodeStopNode = false;
|
|
14422
14836
|
if (this.options.stopNodes && this.options.stopNodes.length > 0) {
|
|
14423
|
-
this.
|
|
14424
|
-
this.stopNodesWildcard = new Set();
|
|
14837
|
+
this.stopNodeExpressions = [];
|
|
14425
14838
|
for(let i = 0; i < this.options.stopNodes.length; i++){
|
|
14426
14839
|
const stopNodeExp = this.options.stopNodes[i];
|
|
14427
|
-
if ('string' == typeof stopNodeExp)
|
|
14428
|
-
else this.
|
|
14840
|
+
if ('string' == typeof stopNodeExp) this.stopNodeExpressions.push(new Expression(stopNodeExp));
|
|
14841
|
+
else if (stopNodeExp instanceof Expression) this.stopNodeExpressions.push(stopNodeExp);
|
|
14429
14842
|
}
|
|
14430
14843
|
}
|
|
14431
14844
|
}
|
|
@@ -14445,8 +14858,9 @@
|
|
|
14445
14858
|
if (void 0 !== val) {
|
|
14446
14859
|
if (this.options.trimValues && !dontTrim) val = val.trim();
|
|
14447
14860
|
if (val.length > 0) {
|
|
14448
|
-
if (!escapeEntities) val = this.replaceEntitiesValue(val);
|
|
14449
|
-
const
|
|
14861
|
+
if (!escapeEntities) val = this.replaceEntitiesValue(val, tagName, jPath);
|
|
14862
|
+
const jPathOrMatcher = this.options.jPath ? jPath.toString() : jPath;
|
|
14863
|
+
const newval = this.options.tagValueProcessor(tagName, val, jPathOrMatcher, hasAttributes, isLeafNode);
|
|
14450
14864
|
if (null == newval) return val;
|
|
14451
14865
|
{
|
|
14452
14866
|
if (typeof newval !== typeof val || newval !== val) return newval;
|
|
@@ -14468,23 +14882,37 @@
|
|
|
14468
14882
|
return tagname;
|
|
14469
14883
|
}
|
|
14470
14884
|
const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?', 'gm');
|
|
14471
|
-
function buildAttributesMap(attrStr, jPath) {
|
|
14885
|
+
function buildAttributesMap(attrStr, jPath, tagName) {
|
|
14472
14886
|
if (true !== this.options.ignoreAttributes && 'string' == typeof attrStr) {
|
|
14473
14887
|
const matches = getAllMatches(attrStr, attrsRegx);
|
|
14474
14888
|
const len = matches.length;
|
|
14475
14889
|
const attrs = {};
|
|
14890
|
+
const rawAttrsForMatcher = {};
|
|
14476
14891
|
for(let i = 0; i < len; i++){
|
|
14477
14892
|
const attrName = this.resolveNameSpace(matches[i][1]);
|
|
14478
|
-
|
|
14893
|
+
const oldVal = matches[i][4];
|
|
14894
|
+
if (attrName.length && void 0 !== oldVal) {
|
|
14895
|
+
let parsedVal = oldVal;
|
|
14896
|
+
if (this.options.trimValues) parsedVal = parsedVal.trim();
|
|
14897
|
+
parsedVal = this.replaceEntitiesValue(parsedVal, tagName, this.readonlyMatcher);
|
|
14898
|
+
rawAttrsForMatcher[attrName] = parsedVal;
|
|
14899
|
+
}
|
|
14900
|
+
}
|
|
14901
|
+
if (Object.keys(rawAttrsForMatcher).length > 0 && 'object' == typeof jPath && jPath.updateCurrent) jPath.updateCurrent(rawAttrsForMatcher);
|
|
14902
|
+
for(let i = 0; i < len; i++){
|
|
14903
|
+
const attrName = this.resolveNameSpace(matches[i][1]);
|
|
14904
|
+
const jPathStr = this.options.jPath ? jPath.toString() : this.readonlyMatcher;
|
|
14905
|
+
if (this.ignoreAttributesFn(attrName, jPathStr)) continue;
|
|
14479
14906
|
let oldVal = matches[i][4];
|
|
14480
14907
|
let aName = this.options.attributeNamePrefix + attrName;
|
|
14481
14908
|
if (attrName.length) {
|
|
14482
14909
|
if (this.options.transformAttributeName) aName = this.options.transformAttributeName(aName);
|
|
14483
|
-
|
|
14910
|
+
aName = sanitizeName(aName, this.options);
|
|
14484
14911
|
if (void 0 !== oldVal) {
|
|
14485
14912
|
if (this.options.trimValues) oldVal = oldVal.trim();
|
|
14486
|
-
oldVal = this.replaceEntitiesValue(oldVal);
|
|
14487
|
-
const
|
|
14913
|
+
oldVal = this.replaceEntitiesValue(oldVal, tagName, this.readonlyMatcher);
|
|
14914
|
+
const jPathOrMatcher = this.options.jPath ? jPath.toString() : this.readonlyMatcher;
|
|
14915
|
+
const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPathOrMatcher);
|
|
14488
14916
|
if (null == newVal) attrs[aName] = oldVal;
|
|
14489
14917
|
else if (typeof newVal !== typeof oldVal || newVal !== oldVal) attrs[aName] = newVal;
|
|
14490
14918
|
else attrs[aName] = parseValue(oldVal, this.options.parseAttributeValue, this.options.numberParseOptions);
|
|
@@ -14505,7 +14933,9 @@
|
|
|
14505
14933
|
const xmlObj = new XmlNode('!xml');
|
|
14506
14934
|
let currentNode = xmlObj;
|
|
14507
14935
|
let textData = "";
|
|
14508
|
-
|
|
14936
|
+
this.matcher.reset();
|
|
14937
|
+
this.entityExpansionCount = 0;
|
|
14938
|
+
this.currentExpandedLength = 0;
|
|
14509
14939
|
const docTypeReader = new DocTypeReader(this.options.processEntities);
|
|
14510
14940
|
for(let i = 0; i < xmlData.length; i++){
|
|
14511
14941
|
const ch = xmlData[i];
|
|
@@ -14516,36 +14946,36 @@
|
|
|
14516
14946
|
const colonIndex = tagName.indexOf(":");
|
|
14517
14947
|
if (-1 !== colonIndex) tagName = tagName.substr(colonIndex + 1);
|
|
14518
14948
|
}
|
|
14519
|
-
|
|
14520
|
-
if (currentNode) textData = this.saveTextToParentTag(textData, currentNode,
|
|
14521
|
-
const lastTagName =
|
|
14949
|
+
tagName = transformTagName(this.options.transformTagName, tagName, "", this.options).tagName;
|
|
14950
|
+
if (currentNode) textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
|
|
14951
|
+
const lastTagName = this.matcher.getCurrentTag();
|
|
14522
14952
|
if (tagName && -1 !== this.options.unpairedTags.indexOf(tagName)) throw new Error(`Unpaired tag can not be used as closing tag: </${tagName}>`);
|
|
14523
|
-
let propIndex = 0;
|
|
14524
14953
|
if (lastTagName && -1 !== this.options.unpairedTags.indexOf(lastTagName)) {
|
|
14525
|
-
|
|
14954
|
+
this.matcher.pop();
|
|
14526
14955
|
this.tagsNodeStack.pop();
|
|
14527
|
-
}
|
|
14528
|
-
|
|
14956
|
+
}
|
|
14957
|
+
this.matcher.pop();
|
|
14958
|
+
this.isCurrentNodeStopNode = false;
|
|
14529
14959
|
currentNode = this.tagsNodeStack.pop();
|
|
14530
14960
|
textData = "";
|
|
14531
14961
|
i = closeIndex;
|
|
14532
14962
|
} else if ('?' === xmlData[i + 1]) {
|
|
14533
14963
|
let tagData = readTagExp(xmlData, i, false, "?>");
|
|
14534
14964
|
if (!tagData) throw new Error("Pi Tag is not closed.");
|
|
14535
|
-
textData = this.saveTextToParentTag(textData, currentNode,
|
|
14965
|
+
textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
|
|
14536
14966
|
if (this.options.ignoreDeclaration && "?xml" === tagData.tagName || this.options.ignorePiTags) ;
|
|
14537
14967
|
else {
|
|
14538
14968
|
const childNode = new XmlNode(tagData.tagName);
|
|
14539
14969
|
childNode.add(this.options.textNodeName, "");
|
|
14540
|
-
if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) childNode[":@"] = this.buildAttributesMap(tagData.tagExp,
|
|
14541
|
-
this.addChild(currentNode, childNode,
|
|
14970
|
+
if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) childNode[":@"] = this.buildAttributesMap(tagData.tagExp, this.matcher, tagData.tagName);
|
|
14971
|
+
this.addChild(currentNode, childNode, this.readonlyMatcher, i);
|
|
14542
14972
|
}
|
|
14543
14973
|
i = tagData.closeIndex + 1;
|
|
14544
14974
|
} else if ('!--' === xmlData.substr(i + 1, 3)) {
|
|
14545
14975
|
const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed.");
|
|
14546
14976
|
if (this.options.commentPropName) {
|
|
14547
14977
|
const comment = xmlData.substring(i + 4, endIndex - 2);
|
|
14548
|
-
textData = this.saveTextToParentTag(textData, currentNode,
|
|
14978
|
+
textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
|
|
14549
14979
|
currentNode.add(this.options.commentPropName, [
|
|
14550
14980
|
{
|
|
14551
14981
|
[this.options.textNodeName]: comment
|
|
@@ -14560,8 +14990,8 @@
|
|
|
14560
14990
|
} else if ('![' === xmlData.substr(i + 1, 2)) {
|
|
14561
14991
|
const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2;
|
|
14562
14992
|
const tagExp = xmlData.substring(i + 9, closeIndex);
|
|
14563
|
-
textData = this.saveTextToParentTag(textData, currentNode,
|
|
14564
|
-
let val = this.parseTextData(tagExp, currentNode.tagname,
|
|
14993
|
+
textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
|
|
14994
|
+
let val = this.parseTextData(tagExp, currentNode.tagname, this.readonlyMatcher, true, false, true, true);
|
|
14565
14995
|
if (void 0 == val) val = "";
|
|
14566
14996
|
if (this.options.cdataPropName) currentNode.add(this.options.cdataPropName, [
|
|
14567
14997
|
{
|
|
@@ -14572,36 +15002,48 @@
|
|
|
14572
15002
|
i = closeIndex + 2;
|
|
14573
15003
|
} else {
|
|
14574
15004
|
let result = readTagExp(xmlData, i, this.options.removeNSPrefix);
|
|
15005
|
+
if (!result) {
|
|
15006
|
+
const context = xmlData.substring(Math.max(0, i - 50), Math.min(xmlData.length, i + 50));
|
|
15007
|
+
throw new Error(`readTagExp returned undefined at position ${i}. Context: "${context}"`);
|
|
15008
|
+
}
|
|
14575
15009
|
let tagName = result.tagName;
|
|
14576
15010
|
const rawTagName = result.rawTagName;
|
|
14577
15011
|
let tagExp = result.tagExp;
|
|
14578
15012
|
let attrExpPresent = result.attrExpPresent;
|
|
14579
15013
|
let closeIndex = result.closeIndex;
|
|
14580
|
-
|
|
14581
|
-
|
|
14582
|
-
if (tagExp === tagName) tagExp = newTagName;
|
|
14583
|
-
tagName = newTagName;
|
|
14584
|
-
}
|
|
15014
|
+
({ tagName, tagExp } = transformTagName(this.options.transformTagName, tagName, tagExp, this.options));
|
|
15015
|
+
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}`);
|
|
14585
15016
|
if (currentNode && textData) {
|
|
14586
|
-
if ('!xml' !== currentNode.tagname) textData = this.saveTextToParentTag(textData, currentNode,
|
|
15017
|
+
if ('!xml' !== currentNode.tagname) textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher, false);
|
|
14587
15018
|
}
|
|
14588
15019
|
const lastTag = currentNode;
|
|
14589
15020
|
if (lastTag && -1 !== this.options.unpairedTags.indexOf(lastTag.tagname)) {
|
|
14590
15021
|
currentNode = this.tagsNodeStack.pop();
|
|
14591
|
-
|
|
14592
|
-
}
|
|
14593
|
-
|
|
15022
|
+
this.matcher.pop();
|
|
15023
|
+
}
|
|
15024
|
+
let isSelfClosing = false;
|
|
15025
|
+
if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) {
|
|
15026
|
+
isSelfClosing = true;
|
|
15027
|
+
if ("/" === tagName[tagName.length - 1]) {
|
|
15028
|
+
tagName = tagName.substr(0, tagName.length - 1);
|
|
15029
|
+
tagExp = tagName;
|
|
15030
|
+
} else tagExp = tagExp.substr(0, tagExp.length - 1);
|
|
15031
|
+
attrExpPresent = tagName !== tagExp;
|
|
15032
|
+
}
|
|
15033
|
+
let prefixedAttrs = null;
|
|
15034
|
+
let namespace;
|
|
15035
|
+
namespace = extractNamespace(rawTagName);
|
|
15036
|
+
if (tagName !== xmlObj.tagname) this.matcher.push(tagName, {}, namespace);
|
|
15037
|
+
if (tagName !== tagExp && attrExpPresent) {
|
|
15038
|
+
prefixedAttrs = this.buildAttributesMap(tagExp, this.matcher, tagName);
|
|
15039
|
+
if (prefixedAttrs) extractRawAttributes(prefixedAttrs, this.options);
|
|
15040
|
+
}
|
|
15041
|
+
if (tagName !== xmlObj.tagname) this.isCurrentNodeStopNode = this.isItStopNode(this.stopNodeExpressions, this.matcher);
|
|
14594
15042
|
const startIndex = i;
|
|
14595
|
-
if (this.
|
|
15043
|
+
if (this.isCurrentNodeStopNode) {
|
|
14596
15044
|
let tagContent = "";
|
|
14597
|
-
if (
|
|
14598
|
-
|
|
14599
|
-
tagName = tagName.substr(0, tagName.length - 1);
|
|
14600
|
-
jPath = jPath.substr(0, jPath.length - 1);
|
|
14601
|
-
tagExp = tagName;
|
|
14602
|
-
} else tagExp = tagExp.substr(0, tagExp.length - 1);
|
|
14603
|
-
i = result.closeIndex;
|
|
14604
|
-
} else if (-1 !== this.options.unpairedTags.indexOf(tagName)) i = result.closeIndex;
|
|
15045
|
+
if (isSelfClosing) i = result.closeIndex;
|
|
15046
|
+
else if (-1 !== this.options.unpairedTags.indexOf(tagName)) i = result.closeIndex;
|
|
14605
15047
|
else {
|
|
14606
15048
|
const result = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);
|
|
14607
15049
|
if (!result) throw new Error(`Unexpected end of ${rawTagName}`);
|
|
@@ -14609,32 +15051,33 @@
|
|
|
14609
15051
|
tagContent = result.tagContent;
|
|
14610
15052
|
}
|
|
14611
15053
|
const childNode = new XmlNode(tagName);
|
|
14612
|
-
if (
|
|
14613
|
-
if (tagContent) tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);
|
|
14614
|
-
jPath = jPath.substr(0, jPath.lastIndexOf("."));
|
|
15054
|
+
if (prefixedAttrs) childNode[":@"] = prefixedAttrs;
|
|
14615
15055
|
childNode.add(this.options.textNodeName, tagContent);
|
|
14616
|
-
this.
|
|
15056
|
+
this.matcher.pop();
|
|
15057
|
+
this.isCurrentNodeStopNode = false;
|
|
15058
|
+
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
|
|
14617
15059
|
} else {
|
|
14618
|
-
if (
|
|
14619
|
-
|
|
14620
|
-
|
|
14621
|
-
|
|
14622
|
-
|
|
14623
|
-
|
|
14624
|
-
|
|
14625
|
-
|
|
14626
|
-
if (tagExp === tagName) tagExp = newTagName;
|
|
14627
|
-
tagName = newTagName;
|
|
14628
|
-
}
|
|
15060
|
+
if (isSelfClosing) {
|
|
15061
|
+
({ tagName, tagExp } = transformTagName(this.options.transformTagName, tagName, tagExp, this.options));
|
|
15062
|
+
const childNode = new XmlNode(tagName);
|
|
15063
|
+
if (prefixedAttrs) childNode[":@"] = prefixedAttrs;
|
|
15064
|
+
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
|
|
15065
|
+
this.matcher.pop();
|
|
15066
|
+
this.isCurrentNodeStopNode = false;
|
|
15067
|
+
} else if (-1 !== this.options.unpairedTags.indexOf(tagName)) {
|
|
14629
15068
|
const childNode = new XmlNode(tagName);
|
|
14630
|
-
if (
|
|
14631
|
-
this.addChild(currentNode, childNode,
|
|
14632
|
-
|
|
15069
|
+
if (prefixedAttrs) childNode[":@"] = prefixedAttrs;
|
|
15070
|
+
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
|
|
15071
|
+
this.matcher.pop();
|
|
15072
|
+
this.isCurrentNodeStopNode = false;
|
|
15073
|
+
i = result.closeIndex;
|
|
15074
|
+
continue;
|
|
14633
15075
|
} else {
|
|
14634
15076
|
const childNode = new XmlNode(tagName);
|
|
15077
|
+
if (this.tagsNodeStack.length > this.options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
|
|
14635
15078
|
this.tagsNodeStack.push(currentNode);
|
|
14636
|
-
if (
|
|
14637
|
-
this.addChild(currentNode, childNode,
|
|
15079
|
+
if (prefixedAttrs) childNode[":@"] = prefixedAttrs;
|
|
15080
|
+
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
|
|
14638
15081
|
currentNode = childNode;
|
|
14639
15082
|
}
|
|
14640
15083
|
textData = "";
|
|
@@ -14645,45 +15088,76 @@
|
|
|
14645
15088
|
}
|
|
14646
15089
|
return xmlObj.child;
|
|
14647
15090
|
};
|
|
14648
|
-
function addChild(currentNode, childNode,
|
|
15091
|
+
function addChild(currentNode, childNode, matcher, startIndex) {
|
|
14649
15092
|
if (!this.options.captureMetaData) startIndex = void 0;
|
|
14650
|
-
const
|
|
15093
|
+
const jPathOrMatcher = this.options.jPath ? matcher.toString() : matcher;
|
|
15094
|
+
const result = this.options.updateTag(childNode.tagname, jPathOrMatcher, childNode[":@"]);
|
|
14651
15095
|
if (false === result) ;
|
|
14652
15096
|
else if ("string" == typeof result) {
|
|
14653
15097
|
childNode.tagname = result;
|
|
14654
15098
|
currentNode.addChild(childNode, startIndex);
|
|
14655
15099
|
} else currentNode.addChild(childNode, startIndex);
|
|
14656
15100
|
}
|
|
14657
|
-
|
|
14658
|
-
|
|
14659
|
-
|
|
14660
|
-
|
|
15101
|
+
function replaceEntitiesValue(val, tagName, jPath) {
|
|
15102
|
+
const entityConfig = this.options.processEntities;
|
|
15103
|
+
if (!entityConfig || !entityConfig.enabled) return val;
|
|
15104
|
+
if (entityConfig.allowedTags) {
|
|
15105
|
+
const jPathOrMatcher = this.options.jPath ? jPath.toString() : jPath;
|
|
15106
|
+
const allowed = Array.isArray(entityConfig.allowedTags) ? entityConfig.allowedTags.includes(tagName) : entityConfig.allowedTags(tagName, jPathOrMatcher);
|
|
15107
|
+
if (!allowed) return val;
|
|
15108
|
+
}
|
|
15109
|
+
if (entityConfig.tagFilter) {
|
|
15110
|
+
const jPathOrMatcher = this.options.jPath ? jPath.toString() : jPath;
|
|
15111
|
+
if (!entityConfig.tagFilter(tagName, jPathOrMatcher)) return val;
|
|
15112
|
+
}
|
|
15113
|
+
for (const entityName of Object.keys(this.docTypeEntities)){
|
|
15114
|
+
const entity = this.docTypeEntities[entityName];
|
|
15115
|
+
const matches = val.match(entity.regx);
|
|
15116
|
+
if (matches) {
|
|
15117
|
+
this.entityExpansionCount += matches.length;
|
|
15118
|
+
if (entityConfig.maxTotalExpansions && this.entityExpansionCount > entityConfig.maxTotalExpansions) throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${entityConfig.maxTotalExpansions}`);
|
|
15119
|
+
const lengthBefore = val.length;
|
|
14661
15120
|
val = val.replace(entity.regx, entity.val);
|
|
15121
|
+
if (entityConfig.maxExpandedLength) {
|
|
15122
|
+
this.currentExpandedLength += val.length - lengthBefore;
|
|
15123
|
+
if (this.currentExpandedLength > entityConfig.maxExpandedLength) throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${entityConfig.maxExpandedLength}`);
|
|
15124
|
+
}
|
|
14662
15125
|
}
|
|
14663
|
-
|
|
14664
|
-
|
|
14665
|
-
|
|
15126
|
+
}
|
|
15127
|
+
for (const entityName of Object.keys(this.lastEntities)){
|
|
15128
|
+
const entity = this.lastEntities[entityName];
|
|
15129
|
+
const matches = val.match(entity.regex);
|
|
15130
|
+
if (matches) {
|
|
15131
|
+
this.entityExpansionCount += matches.length;
|
|
15132
|
+
if (entityConfig.maxTotalExpansions && this.entityExpansionCount > entityConfig.maxTotalExpansions) throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${entityConfig.maxTotalExpansions}`);
|
|
14666
15133
|
}
|
|
14667
|
-
|
|
14668
|
-
|
|
14669
|
-
|
|
15134
|
+
val = val.replace(entity.regex, entity.val);
|
|
15135
|
+
}
|
|
15136
|
+
if (-1 === val.indexOf('&')) return val;
|
|
15137
|
+
if (this.options.htmlEntities) for (const entityName of Object.keys(this.htmlEntities)){
|
|
15138
|
+
const entity = this.htmlEntities[entityName];
|
|
15139
|
+
const matches = val.match(entity.regex);
|
|
15140
|
+
if (matches) {
|
|
15141
|
+
this.entityExpansionCount += matches.length;
|
|
15142
|
+
if (entityConfig.maxTotalExpansions && this.entityExpansionCount > entityConfig.maxTotalExpansions) throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${entityConfig.maxTotalExpansions}`);
|
|
14670
15143
|
}
|
|
14671
|
-
val = val.replace(
|
|
15144
|
+
val = val.replace(entity.regex, entity.val);
|
|
14672
15145
|
}
|
|
15146
|
+
val = val.replace(this.ampEntity.regex, this.ampEntity.val);
|
|
14673
15147
|
return val;
|
|
14674
|
-
}
|
|
14675
|
-
function saveTextToParentTag(textData,
|
|
15148
|
+
}
|
|
15149
|
+
function saveTextToParentTag(textData, parentNode, matcher, isLeafNode) {
|
|
14676
15150
|
if (textData) {
|
|
14677
|
-
if (void 0 === isLeafNode) isLeafNode = 0 ===
|
|
14678
|
-
textData = this.parseTextData(textData,
|
|
14679
|
-
if (void 0 !== textData && "" !== textData)
|
|
15151
|
+
if (void 0 === isLeafNode) isLeafNode = 0 === parentNode.child.length;
|
|
15152
|
+
textData = this.parseTextData(textData, parentNode.tagname, matcher, false, parentNode[":@"] ? 0 !== Object.keys(parentNode[":@"]).length : false, isLeafNode);
|
|
15153
|
+
if (void 0 !== textData && "" !== textData) parentNode.add(this.options.textNodeName, textData);
|
|
14680
15154
|
textData = "";
|
|
14681
15155
|
}
|
|
14682
15156
|
return textData;
|
|
14683
15157
|
}
|
|
14684
|
-
function isItStopNode(
|
|
14685
|
-
if (
|
|
14686
|
-
|
|
15158
|
+
function isItStopNode(stopNodeExpressions, matcher) {
|
|
15159
|
+
if (!stopNodeExpressions || 0 === stopNodeExpressions.length) return false;
|
|
15160
|
+
for(let i = 0; i < stopNodeExpressions.length; i++)if (matcher.matches(stopNodeExpressions[i])) return true;
|
|
14687
15161
|
return false;
|
|
14688
15162
|
}
|
|
14689
15163
|
function tagExpWithClosingIndex(xmlData, i, closingChar = ">") {
|
|
@@ -14787,39 +15261,72 @@
|
|
|
14787
15261
|
if (codePoint >= 0 && codePoint <= 0x10FFFF) return String.fromCodePoint(codePoint);
|
|
14788
15262
|
return prefix + str + ";";
|
|
14789
15263
|
}
|
|
14790
|
-
|
|
14791
|
-
|
|
14792
|
-
|
|
15264
|
+
function transformTagName(fn, tagName, tagExp, options) {
|
|
15265
|
+
if (fn) {
|
|
15266
|
+
const newTagName = fn(tagName);
|
|
15267
|
+
if (tagExp === tagName) tagExp = newTagName;
|
|
15268
|
+
tagName = newTagName;
|
|
15269
|
+
}
|
|
15270
|
+
tagName = sanitizeName(tagName, options);
|
|
15271
|
+
return {
|
|
15272
|
+
tagName,
|
|
15273
|
+
tagExp
|
|
15274
|
+
};
|
|
15275
|
+
}
|
|
15276
|
+
function sanitizeName(name, options) {
|
|
15277
|
+
if (criticalProperties.includes(name)) throw new Error(`[SECURITY] Invalid name: "${name}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
15278
|
+
if (DANGEROUS_PROPERTY_NAMES.includes(name)) return options.onDangerousProperty(name);
|
|
15279
|
+
return name;
|
|
14793
15280
|
}
|
|
14794
|
-
|
|
15281
|
+
const node2json_METADATA_SYMBOL = XmlNode.getMetaDataSymbol();
|
|
15282
|
+
function stripAttributePrefix(attrs, prefix) {
|
|
15283
|
+
if (!attrs || 'object' != typeof attrs) return {};
|
|
15284
|
+
if (!prefix) return attrs;
|
|
15285
|
+
const rawAttrs = {};
|
|
15286
|
+
for(const key in attrs)if (key.startsWith(prefix)) {
|
|
15287
|
+
const rawName = key.substring(prefix.length);
|
|
15288
|
+
rawAttrs[rawName] = attrs[key];
|
|
15289
|
+
} else rawAttrs[key] = attrs[key];
|
|
15290
|
+
return rawAttrs;
|
|
15291
|
+
}
|
|
15292
|
+
function prettify(node, options, matcher, readonlyMatcher) {
|
|
15293
|
+
return node2json_compress(node, options, matcher, readonlyMatcher);
|
|
15294
|
+
}
|
|
15295
|
+
function node2json_compress(arr, options, matcher, readonlyMatcher) {
|
|
14795
15296
|
let text;
|
|
14796
15297
|
const compressedObj = {};
|
|
14797
15298
|
for(let i = 0; i < arr.length; i++){
|
|
14798
15299
|
const tagObj = arr[i];
|
|
14799
15300
|
const property = propName(tagObj);
|
|
14800
|
-
|
|
14801
|
-
|
|
15301
|
+
if (void 0 !== property && property !== options.textNodeName) {
|
|
15302
|
+
const rawAttrs = stripAttributePrefix(tagObj[":@"] || {}, options.attributeNamePrefix);
|
|
15303
|
+
matcher.push(property, rawAttrs);
|
|
15304
|
+
}
|
|
14802
15305
|
if (property === options.textNodeName) if (void 0 === text) text = tagObj[property];
|
|
14803
15306
|
else text += "" + tagObj[property];
|
|
14804
15307
|
else if (void 0 === property) continue;
|
|
14805
15308
|
else if (tagObj[property]) {
|
|
14806
|
-
let val = node2json_compress(tagObj[property], options,
|
|
15309
|
+
let val = node2json_compress(tagObj[property], options, matcher, readonlyMatcher);
|
|
14807
15310
|
const isLeaf = isLeafTag(val, options);
|
|
14808
|
-
if (
|
|
14809
|
-
if (tagObj[":@"]) assignAttributes(val, tagObj[":@"], newJpath, options);
|
|
15311
|
+
if (tagObj[":@"]) assignAttributes(val, tagObj[":@"], readonlyMatcher, options);
|
|
14810
15312
|
else if (1 !== Object.keys(val).length || void 0 === val[options.textNodeName] || options.alwaysCreateTextNode) {
|
|
14811
15313
|
if (0 === Object.keys(val).length) if (options.alwaysCreateTextNode) val[options.textNodeName] = "";
|
|
14812
15314
|
else val = "";
|
|
14813
15315
|
} else val = val[options.textNodeName];
|
|
14814
|
-
if (void 0 !==
|
|
15316
|
+
if (void 0 !== tagObj[node2json_METADATA_SYMBOL] && "object" == typeof val && null !== val) val[node2json_METADATA_SYMBOL] = tagObj[node2json_METADATA_SYMBOL];
|
|
15317
|
+
if (void 0 !== compressedObj[property] && Object.prototype.hasOwnProperty.call(compressedObj, property)) {
|
|
14815
15318
|
if (!Array.isArray(compressedObj[property])) compressedObj[property] = [
|
|
14816
15319
|
compressedObj[property]
|
|
14817
15320
|
];
|
|
14818
15321
|
compressedObj[property].push(val);
|
|
14819
|
-
} else
|
|
14820
|
-
|
|
14821
|
-
|
|
14822
|
-
|
|
15322
|
+
} else {
|
|
15323
|
+
const jPathOrMatcher = options.jPath ? readonlyMatcher.toString() : readonlyMatcher;
|
|
15324
|
+
if (options.isArray(property, jPathOrMatcher, isLeaf)) compressedObj[property] = [
|
|
15325
|
+
val
|
|
15326
|
+
];
|
|
15327
|
+
else compressedObj[property] = val;
|
|
15328
|
+
}
|
|
15329
|
+
if (void 0 !== property && property !== options.textNodeName) matcher.pop();
|
|
14823
15330
|
}
|
|
14824
15331
|
}
|
|
14825
15332
|
if ("string" == typeof text) {
|
|
@@ -14834,13 +15341,15 @@
|
|
|
14834
15341
|
if (":@" !== key) return key;
|
|
14835
15342
|
}
|
|
14836
15343
|
}
|
|
14837
|
-
function assignAttributes(obj, attrMap,
|
|
15344
|
+
function assignAttributes(obj, attrMap, readonlyMatcher, options) {
|
|
14838
15345
|
if (attrMap) {
|
|
14839
15346
|
const keys = Object.keys(attrMap);
|
|
14840
15347
|
const len = keys.length;
|
|
14841
15348
|
for(let i = 0; i < len; i++){
|
|
14842
15349
|
const atrrName = keys[i];
|
|
14843
|
-
|
|
15350
|
+
const rawAttrName = atrrName.startsWith(options.attributeNamePrefix) ? atrrName.substring(options.attributeNamePrefix.length) : atrrName;
|
|
15351
|
+
const jPathOrMatcher = options.jPath ? readonlyMatcher.toString() + "." + rawAttrName : readonlyMatcher;
|
|
15352
|
+
if (options.isArray(atrrName, jPathOrMatcher, true, true)) obj[atrrName] = [
|
|
14844
15353
|
attrMap[atrrName]
|
|
14845
15354
|
];
|
|
14846
15355
|
else obj[atrrName] = attrMap[atrrName];
|
|
@@ -15020,7 +15529,7 @@
|
|
|
15020
15529
|
if (void 0 === matches[i][3] && !options.allowBooleanAttributes) return getErrorObject('InvalidAttr', "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i]));
|
|
15021
15530
|
const attrName = matches[i][2];
|
|
15022
15531
|
if (!validateAttrName(attrName)) return getErrorObject('InvalidAttr', "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i]));
|
|
15023
|
-
if (
|
|
15532
|
+
if (Object.prototype.hasOwnProperty.call(attrNames, attrName)) return getErrorObject('InvalidAttr', "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i]));
|
|
15024
15533
|
attrNames[attrName] = 1;
|
|
15025
15534
|
}
|
|
15026
15535
|
return true;
|
|
@@ -15094,7 +15603,7 @@
|
|
|
15094
15603
|
orderedObjParser.addExternalEntities(this.externalEntities);
|
|
15095
15604
|
const orderedResult = orderedObjParser.parseXml(xmlData);
|
|
15096
15605
|
if (this.options.preserveOrder || void 0 === orderedResult) return orderedResult;
|
|
15097
|
-
return prettify(orderedResult, this.options);
|
|
15606
|
+
return prettify(orderedResult, this.options, orderedObjParser.matcher, orderedObjParser.readonlyMatcher);
|
|
15098
15607
|
}
|
|
15099
15608
|
addEntity(key, value) {
|
|
15100
15609
|
if (-1 !== value.indexOf("&")) throw new Error("Entity value can't have '&'");
|
|
@@ -15110,52 +15619,74 @@
|
|
|
15110
15619
|
function toXml(jArray, options) {
|
|
15111
15620
|
let indentation = "";
|
|
15112
15621
|
if (options.format && options.indentBy.length > 0) indentation = EOL;
|
|
15113
|
-
|
|
15622
|
+
const stopNodeExpressions = [];
|
|
15623
|
+
if (options.stopNodes && Array.isArray(options.stopNodes)) for(let i = 0; i < options.stopNodes.length; i++){
|
|
15624
|
+
const node = options.stopNodes[i];
|
|
15625
|
+
if ('string' == typeof node) stopNodeExpressions.push(new Expression(node));
|
|
15626
|
+
else if (node instanceof Expression) stopNodeExpressions.push(node);
|
|
15627
|
+
}
|
|
15628
|
+
const matcher = new Matcher();
|
|
15629
|
+
return arrToStr(jArray, options, indentation, matcher, stopNodeExpressions);
|
|
15114
15630
|
}
|
|
15115
|
-
function arrToStr(arr, options,
|
|
15631
|
+
function arrToStr(arr, options, indentation, matcher, stopNodeExpressions) {
|
|
15116
15632
|
let xmlStr = "";
|
|
15117
15633
|
let isPreviousElementTag = false;
|
|
15634
|
+
if (options.maxNestedTags && matcher.getDepth() > options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
|
|
15635
|
+
if (!Array.isArray(arr)) {
|
|
15636
|
+
if (null != arr) {
|
|
15637
|
+
let text = arr.toString();
|
|
15638
|
+
text = orderedJs2Xml_replaceEntitiesValue(text, options);
|
|
15639
|
+
return text;
|
|
15640
|
+
}
|
|
15641
|
+
return "";
|
|
15642
|
+
}
|
|
15118
15643
|
for(let i = 0; i < arr.length; i++){
|
|
15119
15644
|
const tagObj = arr[i];
|
|
15120
15645
|
const tagName = orderedJs2Xml_propName(tagObj);
|
|
15121
15646
|
if (void 0 === tagName) continue;
|
|
15122
|
-
|
|
15123
|
-
|
|
15647
|
+
const attrValues = extractAttributeValues(tagObj[":@"], options);
|
|
15648
|
+
matcher.push(tagName, attrValues);
|
|
15649
|
+
const isStopNode = checkStopNode(matcher, stopNodeExpressions);
|
|
15124
15650
|
if (tagName === options.textNodeName) {
|
|
15125
15651
|
let tagText = tagObj[tagName];
|
|
15126
|
-
if (!isStopNode
|
|
15652
|
+
if (!isStopNode) {
|
|
15127
15653
|
tagText = options.tagValueProcessor(tagName, tagText);
|
|
15128
15654
|
tagText = orderedJs2Xml_replaceEntitiesValue(tagText, options);
|
|
15129
15655
|
}
|
|
15130
15656
|
if (isPreviousElementTag) xmlStr += indentation;
|
|
15131
15657
|
xmlStr += tagText;
|
|
15132
15658
|
isPreviousElementTag = false;
|
|
15659
|
+
matcher.pop();
|
|
15133
15660
|
continue;
|
|
15134
15661
|
}
|
|
15135
15662
|
if (tagName === options.cdataPropName) {
|
|
15136
15663
|
if (isPreviousElementTag) xmlStr += indentation;
|
|
15137
15664
|
xmlStr += `<![CDATA[${tagObj[tagName][0][options.textNodeName]}]]>`;
|
|
15138
15665
|
isPreviousElementTag = false;
|
|
15666
|
+
matcher.pop();
|
|
15139
15667
|
continue;
|
|
15140
15668
|
}
|
|
15141
15669
|
if (tagName === options.commentPropName) {
|
|
15142
15670
|
xmlStr += indentation + `<!--${tagObj[tagName][0][options.textNodeName]}-->`;
|
|
15143
15671
|
isPreviousElementTag = true;
|
|
15672
|
+
matcher.pop();
|
|
15144
15673
|
continue;
|
|
15145
15674
|
} else if ("?" === tagName[0]) {
|
|
15146
|
-
const attStr = attr_to_str(tagObj[":@"], options);
|
|
15675
|
+
const attStr = attr_to_str(tagObj[":@"], options, isStopNode);
|
|
15147
15676
|
const tempInd = "?xml" === tagName ? "" : indentation;
|
|
15148
15677
|
let piTextNodeName = tagObj[tagName][0][options.textNodeName];
|
|
15149
15678
|
piTextNodeName = 0 !== piTextNodeName.length ? " " + piTextNodeName : "";
|
|
15150
15679
|
xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`;
|
|
15151
15680
|
isPreviousElementTag = true;
|
|
15681
|
+
matcher.pop();
|
|
15152
15682
|
continue;
|
|
15153
15683
|
}
|
|
15154
15684
|
let newIdentation = indentation;
|
|
15155
15685
|
if ("" !== newIdentation) newIdentation += options.indentBy;
|
|
15156
|
-
const attStr = attr_to_str(tagObj[":@"], options);
|
|
15686
|
+
const attStr = attr_to_str(tagObj[":@"], options, isStopNode);
|
|
15157
15687
|
const tagStart = indentation + `<${tagName}${attStr}`;
|
|
15158
|
-
|
|
15688
|
+
let tagValue;
|
|
15689
|
+
tagValue = isStopNode ? getRawContent(tagObj[tagName], options) : arrToStr(tagObj[tagName], options, newIdentation, matcher, stopNodeExpressions);
|
|
15159
15690
|
if (-1 !== options.unpairedTags.indexOf(tagName)) if (options.suppressUnpairedNode) xmlStr += tagStart + ">";
|
|
15160
15691
|
else xmlStr += tagStart + "/>";
|
|
15161
15692
|
else if ((!tagValue || 0 === tagValue.length) && options.suppressEmptyNode) xmlStr += tagStart + "/>";
|
|
@@ -15167,33 +15698,81 @@
|
|
|
15167
15698
|
xmlStr += `</${tagName}>`;
|
|
15168
15699
|
}
|
|
15169
15700
|
isPreviousElementTag = true;
|
|
15701
|
+
matcher.pop();
|
|
15170
15702
|
}
|
|
15171
15703
|
return xmlStr;
|
|
15172
15704
|
}
|
|
15705
|
+
function extractAttributeValues(attrMap, options) {
|
|
15706
|
+
if (!attrMap || options.ignoreAttributes) return null;
|
|
15707
|
+
const attrValues = {};
|
|
15708
|
+
let hasAttrs = false;
|
|
15709
|
+
for(let attr in attrMap){
|
|
15710
|
+
if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;
|
|
15711
|
+
const cleanAttrName = attr.startsWith(options.attributeNamePrefix) ? attr.substr(options.attributeNamePrefix.length) : attr;
|
|
15712
|
+
attrValues[cleanAttrName] = attrMap[attr];
|
|
15713
|
+
hasAttrs = true;
|
|
15714
|
+
}
|
|
15715
|
+
return hasAttrs ? attrValues : null;
|
|
15716
|
+
}
|
|
15717
|
+
function getRawContent(arr, options) {
|
|
15718
|
+
if (!Array.isArray(arr)) {
|
|
15719
|
+
if (null != arr) return arr.toString();
|
|
15720
|
+
return "";
|
|
15721
|
+
}
|
|
15722
|
+
let content = "";
|
|
15723
|
+
for(let i = 0; i < arr.length; i++){
|
|
15724
|
+
const item = arr[i];
|
|
15725
|
+
const tagName = orderedJs2Xml_propName(item);
|
|
15726
|
+
if (tagName === options.textNodeName) content += item[tagName];
|
|
15727
|
+
else if (tagName === options.cdataPropName) content += item[tagName][0][options.textNodeName];
|
|
15728
|
+
else if (tagName === options.commentPropName) content += item[tagName][0][options.textNodeName];
|
|
15729
|
+
else if (tagName && "?" === tagName[0]) continue;
|
|
15730
|
+
else if (tagName) {
|
|
15731
|
+
const attStr = attr_to_str_raw(item[":@"], options);
|
|
15732
|
+
const nestedContent = getRawContent(item[tagName], options);
|
|
15733
|
+
if (nestedContent && 0 !== nestedContent.length) content += `<${tagName}${attStr}>${nestedContent}</${tagName}>`;
|
|
15734
|
+
else content += `<${tagName}${attStr}/>`;
|
|
15735
|
+
}
|
|
15736
|
+
}
|
|
15737
|
+
return content;
|
|
15738
|
+
}
|
|
15739
|
+
function attr_to_str_raw(attrMap, options) {
|
|
15740
|
+
let attrStr = "";
|
|
15741
|
+
if (attrMap && !options.ignoreAttributes) for(let attr in attrMap){
|
|
15742
|
+
if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;
|
|
15743
|
+
let attrVal = attrMap[attr];
|
|
15744
|
+
if (true === attrVal && options.suppressBooleanAttributes) attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;
|
|
15745
|
+
else attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`;
|
|
15746
|
+
}
|
|
15747
|
+
return attrStr;
|
|
15748
|
+
}
|
|
15173
15749
|
function orderedJs2Xml_propName(obj) {
|
|
15174
15750
|
const keys = Object.keys(obj);
|
|
15175
15751
|
for(let i = 0; i < keys.length; i++){
|
|
15176
15752
|
const key = keys[i];
|
|
15177
|
-
if (
|
|
15753
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
15178
15754
|
if (":@" !== key) return key;
|
|
15179
15755
|
}
|
|
15180
15756
|
}
|
|
15181
15757
|
}
|
|
15182
|
-
function attr_to_str(attrMap, options) {
|
|
15758
|
+
function attr_to_str(attrMap, options, isStopNode) {
|
|
15183
15759
|
let attrStr = "";
|
|
15184
15760
|
if (attrMap && !options.ignoreAttributes) for(let attr in attrMap){
|
|
15185
|
-
if (!
|
|
15186
|
-
let attrVal
|
|
15187
|
-
attrVal =
|
|
15761
|
+
if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;
|
|
15762
|
+
let attrVal;
|
|
15763
|
+
if (isStopNode) attrVal = attrMap[attr];
|
|
15764
|
+
else {
|
|
15765
|
+
attrVal = options.attributeValueProcessor(attr, attrMap[attr]);
|
|
15766
|
+
attrVal = orderedJs2Xml_replaceEntitiesValue(attrVal, options);
|
|
15767
|
+
}
|
|
15188
15768
|
if (true === attrVal && options.suppressBooleanAttributes) attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;
|
|
15189
15769
|
else attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`;
|
|
15190
15770
|
}
|
|
15191
15771
|
return attrStr;
|
|
15192
15772
|
}
|
|
15193
|
-
function
|
|
15194
|
-
|
|
15195
|
-
let
|
|
15196
|
-
for(let index in options.stopNodes)if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true;
|
|
15773
|
+
function checkStopNode(matcher, stopNodeExpressions) {
|
|
15774
|
+
if (!stopNodeExpressions || 0 === stopNodeExpressions.length) return false;
|
|
15775
|
+
for(let i = 0; i < stopNodeExpressions.length; i++)if (matcher.matches(stopNodeExpressions[i])) return true;
|
|
15197
15776
|
return false;
|
|
15198
15777
|
}
|
|
15199
15778
|
function orderedJs2Xml_replaceEntitiesValue(textValue, options) {
|
|
@@ -15203,7 +15782,17 @@
|
|
|
15203
15782
|
}
|
|
15204
15783
|
return textValue;
|
|
15205
15784
|
}
|
|
15206
|
-
|
|
15785
|
+
function ignoreAttributes_getIgnoreAttributesFn(ignoreAttributes) {
|
|
15786
|
+
if ('function' == typeof ignoreAttributes) return ignoreAttributes;
|
|
15787
|
+
if (Array.isArray(ignoreAttributes)) return (attrName)=>{
|
|
15788
|
+
for (const pattern of ignoreAttributes){
|
|
15789
|
+
if ('string' == typeof pattern && attrName === pattern) return true;
|
|
15790
|
+
if (pattern instanceof RegExp && pattern.test(attrName)) return true;
|
|
15791
|
+
}
|
|
15792
|
+
};
|
|
15793
|
+
return ()=>false;
|
|
15794
|
+
}
|
|
15795
|
+
const fxb_defaultOptions = {
|
|
15207
15796
|
attributeNamePrefix: '@_',
|
|
15208
15797
|
attributesGroupName: false,
|
|
15209
15798
|
textNodeName: '#text',
|
|
@@ -15247,15 +15836,27 @@
|
|
|
15247
15836
|
],
|
|
15248
15837
|
processEntities: true,
|
|
15249
15838
|
stopNodes: [],
|
|
15250
|
-
oneListGroup: false
|
|
15839
|
+
oneListGroup: false,
|
|
15840
|
+
maxNestedTags: 100,
|
|
15841
|
+
jPath: true
|
|
15251
15842
|
};
|
|
15252
15843
|
function Builder(options) {
|
|
15253
|
-
this.options = Object.assign({},
|
|
15844
|
+
this.options = Object.assign({}, fxb_defaultOptions, options);
|
|
15845
|
+
if (this.options.stopNodes && Array.isArray(this.options.stopNodes)) this.options.stopNodes = this.options.stopNodes.map((node)=>{
|
|
15846
|
+
if ('string' == typeof node && node.startsWith('*.')) return '..' + node.substring(2);
|
|
15847
|
+
return node;
|
|
15848
|
+
});
|
|
15849
|
+
this.stopNodeExpressions = [];
|
|
15850
|
+
if (this.options.stopNodes && Array.isArray(this.options.stopNodes)) for(let i = 0; i < this.options.stopNodes.length; i++){
|
|
15851
|
+
const node = this.options.stopNodes[i];
|
|
15852
|
+
if ('string' == typeof node) this.stopNodeExpressions.push(new Expression(node));
|
|
15853
|
+
else if (node instanceof Expression) this.stopNodeExpressions.push(node);
|
|
15854
|
+
}
|
|
15254
15855
|
if (true === this.options.ignoreAttributes || this.options.attributesGroupName) this.isAttribute = function() {
|
|
15255
15856
|
return false;
|
|
15256
15857
|
};
|
|
15257
15858
|
else {
|
|
15258
|
-
this.ignoreAttributesFn =
|
|
15859
|
+
this.ignoreAttributesFn = ignoreAttributes_getIgnoreAttributesFn(this.options.ignoreAttributes);
|
|
15259
15860
|
this.attrPrefixLen = this.options.attributeNamePrefix.length;
|
|
15260
15861
|
this.isAttribute = isAttribute;
|
|
15261
15862
|
}
|
|
@@ -15274,29 +15875,43 @@
|
|
|
15274
15875
|
}
|
|
15275
15876
|
Builder.prototype.build = function(jObj) {
|
|
15276
15877
|
if (this.options.preserveOrder) return toXml(jObj, this.options);
|
|
15277
|
-
|
|
15278
|
-
|
|
15279
|
-
|
|
15280
|
-
|
|
15878
|
+
{
|
|
15879
|
+
if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) jObj = {
|
|
15880
|
+
[this.options.arrayNodeName]: jObj
|
|
15881
|
+
};
|
|
15882
|
+
const matcher = new Matcher();
|
|
15883
|
+
return this.j2x(jObj, 0, matcher).val;
|
|
15884
|
+
}
|
|
15281
15885
|
};
|
|
15282
|
-
Builder.prototype.j2x = function(jObj, level,
|
|
15886
|
+
Builder.prototype.j2x = function(jObj, level, matcher) {
|
|
15283
15887
|
let attrStr = '';
|
|
15284
15888
|
let val = '';
|
|
15285
|
-
|
|
15889
|
+
if (this.options.maxNestedTags && matcher.getDepth() >= this.options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
|
|
15890
|
+
const jPath = this.options.jPath ? matcher.toString() : matcher;
|
|
15891
|
+
const isCurrentStopNode = this.checkStopNode(matcher);
|
|
15286
15892
|
for(let key in jObj)if (Object.prototype.hasOwnProperty.call(jObj, key)) if (void 0 === jObj[key]) {
|
|
15287
15893
|
if (this.isAttribute(key)) val += '';
|
|
15288
15894
|
} else if (null === jObj[key]) if (this.isAttribute(key)) val += '';
|
|
15289
15895
|
else if (key === this.options.cdataPropName) val += '';
|
|
15290
15896
|
else if ('?' === key[0]) val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;
|
|
15291
15897
|
else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
|
|
15292
|
-
else if (jObj[key] instanceof Date) val += this.buildTextValNode(jObj[key], key, '', level);
|
|
15898
|
+
else if (jObj[key] instanceof Date) val += this.buildTextValNode(jObj[key], key, '', level, matcher);
|
|
15293
15899
|
else if ('object' != typeof jObj[key]) {
|
|
15294
15900
|
const attr = this.isAttribute(key);
|
|
15295
|
-
if (attr && !this.ignoreAttributesFn(attr, jPath)) attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);
|
|
15901
|
+
if (attr && !this.ignoreAttributesFn(attr, jPath)) attrStr += this.buildAttrPairStr(attr, '' + jObj[key], isCurrentStopNode);
|
|
15296
15902
|
else if (!attr) if (key === this.options.textNodeName) {
|
|
15297
15903
|
let newval = this.options.tagValueProcessor(key, '' + jObj[key]);
|
|
15298
15904
|
val += this.replaceEntitiesValue(newval);
|
|
15299
|
-
} else
|
|
15905
|
+
} else {
|
|
15906
|
+
matcher.push(key);
|
|
15907
|
+
const isStopNode = this.checkStopNode(matcher);
|
|
15908
|
+
matcher.pop();
|
|
15909
|
+
if (isStopNode) {
|
|
15910
|
+
const textValue = '' + jObj[key];
|
|
15911
|
+
if ('' === textValue) val += this.indentate(level) + '<' + key + this.closeTag(key) + this.tagEndChar;
|
|
15912
|
+
else val += this.indentate(level) + '<' + key + '>' + textValue + '</' + key + this.tagEndChar;
|
|
15913
|
+
} else val += this.buildTextValNode(jObj[key], key, '', level, matcher);
|
|
15914
|
+
}
|
|
15300
15915
|
} else if (Array.isArray(jObj[key])) {
|
|
15301
15916
|
const arrLen = jObj[key].length;
|
|
15302
15917
|
let listTagVal = "";
|
|
@@ -15307,39 +15922,135 @@
|
|
|
15307
15922
|
else if (null === item) if ("?" === key[0]) val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;
|
|
15308
15923
|
else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
|
|
15309
15924
|
else if ('object' == typeof item) if (this.options.oneListGroup) {
|
|
15310
|
-
|
|
15925
|
+
matcher.push(key);
|
|
15926
|
+
const result = this.j2x(item, level + 1, matcher);
|
|
15927
|
+
matcher.pop();
|
|
15311
15928
|
listTagVal += result.val;
|
|
15312
15929
|
if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) listTagAttr += result.attrStr;
|
|
15313
|
-
} else listTagVal += this.processTextOrObjNode(item, key, level,
|
|
15930
|
+
} else listTagVal += this.processTextOrObjNode(item, key, level, matcher);
|
|
15314
15931
|
else if (this.options.oneListGroup) {
|
|
15315
15932
|
let textValue = this.options.tagValueProcessor(key, item);
|
|
15316
15933
|
textValue = this.replaceEntitiesValue(textValue);
|
|
15317
15934
|
listTagVal += textValue;
|
|
15318
|
-
} else
|
|
15935
|
+
} else {
|
|
15936
|
+
matcher.push(key);
|
|
15937
|
+
const isStopNode = this.checkStopNode(matcher);
|
|
15938
|
+
matcher.pop();
|
|
15939
|
+
if (isStopNode) {
|
|
15940
|
+
const textValue = '' + item;
|
|
15941
|
+
if ('' === textValue) listTagVal += this.indentate(level) + '<' + key + this.closeTag(key) + this.tagEndChar;
|
|
15942
|
+
else listTagVal += this.indentate(level) + '<' + key + '>' + textValue + '</' + key + this.tagEndChar;
|
|
15943
|
+
} else listTagVal += this.buildTextValNode(item, key, '', level, matcher);
|
|
15944
|
+
}
|
|
15319
15945
|
}
|
|
15320
15946
|
if (this.options.oneListGroup) listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);
|
|
15321
15947
|
val += listTagVal;
|
|
15322
15948
|
} else if (this.options.attributesGroupName && key === this.options.attributesGroupName) {
|
|
15323
15949
|
const Ks = Object.keys(jObj[key]);
|
|
15324
15950
|
const L = Ks.length;
|
|
15325
|
-
for(let j = 0; j < L; j++)attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);
|
|
15326
|
-
} else val += this.processTextOrObjNode(jObj[key], key, level,
|
|
15951
|
+
for(let j = 0; j < L; j++)attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]], isCurrentStopNode);
|
|
15952
|
+
} else val += this.processTextOrObjNode(jObj[key], key, level, matcher);
|
|
15327
15953
|
return {
|
|
15328
15954
|
attrStr: attrStr,
|
|
15329
15955
|
val: val
|
|
15330
15956
|
};
|
|
15331
15957
|
};
|
|
15332
|
-
Builder.prototype.buildAttrPairStr = function(attrName, val) {
|
|
15333
|
-
|
|
15334
|
-
|
|
15958
|
+
Builder.prototype.buildAttrPairStr = function(attrName, val, isStopNode) {
|
|
15959
|
+
if (!isStopNode) {
|
|
15960
|
+
val = this.options.attributeValueProcessor(attrName, '' + val);
|
|
15961
|
+
val = this.replaceEntitiesValue(val);
|
|
15962
|
+
}
|
|
15335
15963
|
if (this.options.suppressBooleanAttributes && "true" === val) return ' ' + attrName;
|
|
15336
15964
|
return ' ' + attrName + '="' + val + '"';
|
|
15337
15965
|
};
|
|
15338
|
-
function processTextOrObjNode(object, key, level,
|
|
15339
|
-
const
|
|
15340
|
-
|
|
15966
|
+
function processTextOrObjNode(object, key, level, matcher) {
|
|
15967
|
+
const attrValues = this.extractAttributes(object);
|
|
15968
|
+
matcher.push(key, attrValues);
|
|
15969
|
+
const isStopNode = this.checkStopNode(matcher);
|
|
15970
|
+
if (isStopNode) {
|
|
15971
|
+
const rawContent = this.buildRawContent(object);
|
|
15972
|
+
const attrStr = this.buildAttributesForStopNode(object);
|
|
15973
|
+
matcher.pop();
|
|
15974
|
+
return this.buildObjectNode(rawContent, key, attrStr, level);
|
|
15975
|
+
}
|
|
15976
|
+
const result = this.j2x(object, level + 1, matcher);
|
|
15977
|
+
matcher.pop();
|
|
15978
|
+
if (void 0 !== object[this.options.textNodeName] && 1 === Object.keys(object).length) return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level, matcher);
|
|
15341
15979
|
return this.buildObjectNode(result.val, key, result.attrStr, level);
|
|
15342
15980
|
}
|
|
15981
|
+
Builder.prototype.extractAttributes = function(obj) {
|
|
15982
|
+
if (!obj || 'object' != typeof obj) return null;
|
|
15983
|
+
const attrValues = {};
|
|
15984
|
+
let hasAttrs = false;
|
|
15985
|
+
if (this.options.attributesGroupName && obj[this.options.attributesGroupName]) {
|
|
15986
|
+
const attrGroup = obj[this.options.attributesGroupName];
|
|
15987
|
+
for(let attrKey in attrGroup){
|
|
15988
|
+
if (!Object.prototype.hasOwnProperty.call(attrGroup, attrKey)) continue;
|
|
15989
|
+
const cleanKey = attrKey.startsWith(this.options.attributeNamePrefix) ? attrKey.substring(this.options.attributeNamePrefix.length) : attrKey;
|
|
15990
|
+
attrValues[cleanKey] = attrGroup[attrKey];
|
|
15991
|
+
hasAttrs = true;
|
|
15992
|
+
}
|
|
15993
|
+
} else for(let key in obj){
|
|
15994
|
+
if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
|
|
15995
|
+
const attr = this.isAttribute(key);
|
|
15996
|
+
if (attr) {
|
|
15997
|
+
attrValues[attr] = obj[key];
|
|
15998
|
+
hasAttrs = true;
|
|
15999
|
+
}
|
|
16000
|
+
}
|
|
16001
|
+
return hasAttrs ? attrValues : null;
|
|
16002
|
+
};
|
|
16003
|
+
Builder.prototype.buildRawContent = function(obj) {
|
|
16004
|
+
if ('string' == typeof obj) return obj;
|
|
16005
|
+
if ('object' != typeof obj || null === obj) return String(obj);
|
|
16006
|
+
if (void 0 !== obj[this.options.textNodeName]) return obj[this.options.textNodeName];
|
|
16007
|
+
let content = '';
|
|
16008
|
+
for(let key in obj){
|
|
16009
|
+
if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
|
|
16010
|
+
if (this.isAttribute(key)) continue;
|
|
16011
|
+
if (this.options.attributesGroupName && key === this.options.attributesGroupName) continue;
|
|
16012
|
+
const value = obj[key];
|
|
16013
|
+
if (key === this.options.textNodeName) content += value;
|
|
16014
|
+
else if (Array.isArray(value)) {
|
|
16015
|
+
for (let item of value)if ('string' == typeof item || 'number' == typeof item) content += `<${key}>${item}</${key}>`;
|
|
16016
|
+
else if ('object' == typeof item && null !== item) {
|
|
16017
|
+
const nestedContent = this.buildRawContent(item);
|
|
16018
|
+
const nestedAttrs = this.buildAttributesForStopNode(item);
|
|
16019
|
+
if ('' === nestedContent) content += `<${key}${nestedAttrs}/>`;
|
|
16020
|
+
else content += `<${key}${nestedAttrs}>${nestedContent}</${key}>`;
|
|
16021
|
+
}
|
|
16022
|
+
} else if ('object' == typeof value && null !== value) {
|
|
16023
|
+
const nestedContent = this.buildRawContent(value);
|
|
16024
|
+
const nestedAttrs = this.buildAttributesForStopNode(value);
|
|
16025
|
+
if ('' === nestedContent) content += `<${key}${nestedAttrs}/>`;
|
|
16026
|
+
else content += `<${key}${nestedAttrs}>${nestedContent}</${key}>`;
|
|
16027
|
+
} else content += `<${key}>${value}</${key}>`;
|
|
16028
|
+
}
|
|
16029
|
+
return content;
|
|
16030
|
+
};
|
|
16031
|
+
Builder.prototype.buildAttributesForStopNode = function(obj) {
|
|
16032
|
+
if (!obj || 'object' != typeof obj) return '';
|
|
16033
|
+
let attrStr = '';
|
|
16034
|
+
if (this.options.attributesGroupName && obj[this.options.attributesGroupName]) {
|
|
16035
|
+
const attrGroup = obj[this.options.attributesGroupName];
|
|
16036
|
+
for(let attrKey in attrGroup){
|
|
16037
|
+
if (!Object.prototype.hasOwnProperty.call(attrGroup, attrKey)) continue;
|
|
16038
|
+
const cleanKey = attrKey.startsWith(this.options.attributeNamePrefix) ? attrKey.substring(this.options.attributeNamePrefix.length) : attrKey;
|
|
16039
|
+
const val = attrGroup[attrKey];
|
|
16040
|
+
if (true === val && this.options.suppressBooleanAttributes) attrStr += ' ' + cleanKey;
|
|
16041
|
+
else attrStr += ' ' + cleanKey + '="' + val + '"';
|
|
16042
|
+
}
|
|
16043
|
+
} else for(let key in obj){
|
|
16044
|
+
if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
|
|
16045
|
+
const attr = this.isAttribute(key);
|
|
16046
|
+
if (attr) {
|
|
16047
|
+
const val = obj[key];
|
|
16048
|
+
if (true === val && this.options.suppressBooleanAttributes) attrStr += ' ' + attr;
|
|
16049
|
+
else attrStr += ' ' + attr + '="' + val + '"';
|
|
16050
|
+
}
|
|
16051
|
+
}
|
|
16052
|
+
return attrStr;
|
|
16053
|
+
};
|
|
15343
16054
|
Builder.prototype.buildObjectNode = function(val, key, attrStr, level) {
|
|
15344
16055
|
if ("" === val) if ("?" === key[0]) return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;
|
|
15345
16056
|
else return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;
|
|
@@ -15362,7 +16073,12 @@
|
|
|
15362
16073
|
} else closeTag = this.options.suppressEmptyNode ? "/" : `></${key}`;
|
|
15363
16074
|
return closeTag;
|
|
15364
16075
|
};
|
|
15365
|
-
Builder.prototype.
|
|
16076
|
+
Builder.prototype.checkStopNode = function(matcher) {
|
|
16077
|
+
if (!this.stopNodeExpressions || 0 === this.stopNodeExpressions.length) return false;
|
|
16078
|
+
for(let i = 0; i < this.stopNodeExpressions.length; i++)if (matcher.matches(this.stopNodeExpressions[i])) return true;
|
|
16079
|
+
return false;
|
|
16080
|
+
};
|
|
16081
|
+
Builder.prototype.buildTextValNode = function(val, key, attrStr, level, matcher) {
|
|
15366
16082
|
if (false !== this.options.cdataPropName && key === this.options.cdataPropName) return this.indentate(level) + `<![CDATA[${val}]]>` + this.newLine;
|
|
15367
16083
|
{
|
|
15368
16084
|
if (false !== this.options.commentPropName && key === this.options.commentPropName) return this.indentate(level) + `<!--${val}-->` + this.newLine;
|
|
@@ -15387,6 +16103,7 @@
|
|
|
15387
16103
|
if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) return name.substr(this.attrPrefixLen);
|
|
15388
16104
|
return false;
|
|
15389
16105
|
}
|
|
16106
|
+
const json2xml = Builder;
|
|
15390
16107
|
var json_bigint = __webpack_require__("../../node_modules/.pnpm/json-bigint@1.0.0/node_modules/json-bigint/index.js");
|
|
15391
16108
|
var json_bigint_default = /*#__PURE__*/ __webpack_require__.n(json_bigint);
|
|
15392
16109
|
var descriptors_ScalarType;
|
|
@@ -15779,12 +16496,12 @@
|
|
|
15779
16496
|
break;
|
|
15780
16497
|
}
|
|
15781
16498
|
}
|
|
15782
|
-
function
|
|
16499
|
+
function isObject(arg) {
|
|
15783
16500
|
return null !== arg && "object" == typeof arg && !Array.isArray(arg);
|
|
15784
16501
|
}
|
|
15785
16502
|
function isReflectList(arg, field) {
|
|
15786
16503
|
var _a, _b, _c, _d;
|
|
15787
|
-
if (
|
|
16504
|
+
if (isObject(arg) && unsafeLocal in arg && "add" in arg && "field" in arg && "function" == typeof arg.field) {
|
|
15788
16505
|
if (void 0 !== field) {
|
|
15789
16506
|
const a = field;
|
|
15790
16507
|
const b = arg.field();
|
|
@@ -15796,7 +16513,7 @@
|
|
|
15796
16513
|
}
|
|
15797
16514
|
function isReflectMap(arg, field) {
|
|
15798
16515
|
var _a, _b, _c, _d;
|
|
15799
|
-
if (
|
|
16516
|
+
if (isObject(arg) && unsafeLocal in arg && "has" in arg && "field" in arg && "function" == typeof arg.field) {
|
|
15800
16517
|
if (void 0 !== field) {
|
|
15801
16518
|
const a = field, b = arg.field();
|
|
15802
16519
|
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);
|
|
@@ -15806,7 +16523,7 @@
|
|
|
15806
16523
|
return false;
|
|
15807
16524
|
}
|
|
15808
16525
|
function isReflectMessage(arg, messageDesc) {
|
|
15809
|
-
return
|
|
16526
|
+
return isObject(arg) && unsafeLocal in arg && "desc" in arg && isObject(arg.desc) && "message" === arg.desc.kind && (void 0 === messageDesc || arg.desc.typeName == messageDesc.typeName);
|
|
15810
16527
|
}
|
|
15811
16528
|
const symbol = Symbol.for("@bufbuild/protobuf/text-encoding");
|
|
15812
16529
|
function getTextEncoding() {
|
|
@@ -16331,7 +17048,7 @@
|
|
|
16331
17048
|
return value;
|
|
16332
17049
|
}
|
|
16333
17050
|
function initMap(field, value) {
|
|
16334
|
-
if (
|
|
17051
|
+
if (isObject(value)) {
|
|
16335
17052
|
if (field.scalar == descriptors_ScalarType.BYTES) return convertObjectValues(value, toU8Arr);
|
|
16336
17053
|
if ("message" == field.mapKind) return convertObjectValues(value, (val)=>toMessage(field, val));
|
|
16337
17054
|
}
|
|
@@ -16346,7 +17063,7 @@
|
|
|
16346
17063
|
}
|
|
16347
17064
|
function toMessage(field, value) {
|
|
16348
17065
|
if ("message" == field.fieldKind && !field.oneof && isWrapperDesc(field.message)) return initScalar(field.message.fields[0], value);
|
|
16349
|
-
if (
|
|
17066
|
+
if (isObject(value)) {
|
|
16350
17067
|
if ("google.protobuf.Struct" == field.message.typeName && "google.protobuf.Value" !== field.parent.typeName) return value;
|
|
16351
17068
|
if (!is_message_isMessage(value, field.message)) return create(field.message, value);
|
|
16352
17069
|
}
|
|
@@ -16626,7 +17343,7 @@
|
|
|
16626
17343
|
$typeName: field.message.typeName,
|
|
16627
17344
|
value: longToReflect(field.message.fields[0], value)
|
|
16628
17345
|
};
|
|
16629
|
-
else if ("google.protobuf.Struct" == field.message.typeName && "google.protobuf.Value" != field.parent.typeName &&
|
|
17346
|
+
else if ("google.protobuf.Struct" == field.message.typeName && "google.protobuf.Value" != field.parent.typeName && isObject(value)) value = wktStructToReflect(value);
|
|
16630
17347
|
}
|
|
16631
17348
|
return new ReflectMessageImpl(field.message, value, check);
|
|
16632
17349
|
}
|
|
@@ -16720,7 +17437,7 @@
|
|
|
16720
17437
|
$typeName: "google.protobuf.Struct",
|
|
16721
17438
|
fields: {}
|
|
16722
17439
|
};
|
|
16723
|
-
if (
|
|
17440
|
+
if (isObject(json)) for (const [k, v] of Object.entries(json))struct.fields[k] = wktValueToReflect(v);
|
|
16724
17441
|
return struct;
|
|
16725
17442
|
}
|
|
16726
17443
|
function wktStructToLocal(val) {
|
|
@@ -20343,7 +21060,7 @@
|
|
|
20343
21060
|
function timestamp_timestampMs(timestamp) {
|
|
20344
21061
|
return 1000 * Number(timestamp.seconds) + Math.round(timestamp.nanos / 1000000);
|
|
20345
21062
|
}
|
|
20346
|
-
var package_namespaceObject = JSON.parse('{"UU":"@dan-uni/dan-any","rE":"1.
|
|
21063
|
+
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"}');
|
|
20347
21064
|
const color_pad = (s)=>s.length < 2 ? `0${s}` : s;
|
|
20348
21065
|
const decimalToHex = (n)=>color_pad(n.toString(16));
|
|
20349
21066
|
const isDarkColor = ({ r, g, b })=>0.299 * r + 0.587 * g + 0.114 * b < 0x30;
|
|
@@ -21100,9 +21817,7 @@
|
|
|
21100
21817
|
ValidationExecutor.prototype.customValidations = function(object, value, metadatas, error) {
|
|
21101
21818
|
var _this = this;
|
|
21102
21819
|
metadatas.forEach(function(metadata) {
|
|
21103
|
-
|
|
21104
|
-
if (customConstraintMetadata.async && _this.ignoreAsyncValidations) return;
|
|
21105
|
-
if (_this.validatorOptions && _this.validatorOptions.stopAtFirstError && Object.keys(error.constraints || {}).length > 0) return;
|
|
21820
|
+
var getValidationArguments = function() {
|
|
21106
21821
|
var validationArguments = {
|
|
21107
21822
|
targetName: object.constructor ? object.constructor.name : void 0,
|
|
21108
21823
|
property: metadata.propertyName,
|
|
@@ -21110,6 +21825,16 @@
|
|
|
21110
21825
|
value: value,
|
|
21111
21826
|
constraints: metadata.constraints
|
|
21112
21827
|
};
|
|
21828
|
+
return validationArguments;
|
|
21829
|
+
};
|
|
21830
|
+
if (metadata.validateIf) {
|
|
21831
|
+
var shouldValidate = metadata.validateIf(object, value);
|
|
21832
|
+
if (!shouldValidate) return;
|
|
21833
|
+
}
|
|
21834
|
+
_this.metadataStorage.getTargetValidatorConstraints(metadata.constraintCls).forEach(function(customConstraintMetadata) {
|
|
21835
|
+
if (customConstraintMetadata.async && _this.ignoreAsyncValidations) return;
|
|
21836
|
+
if (_this.validatorOptions && _this.validatorOptions.stopAtFirstError && Object.keys(error.constraints || {}).length > 0) return;
|
|
21837
|
+
var validationArguments = getValidationArguments();
|
|
21113
21838
|
if (!metadata.each || !(Array.isArray(value) || value instanceof Set || value instanceof Map)) {
|
|
21114
21839
|
var validatedValue = customConstraintMetadata.instance.validate(value, validationArguments);
|
|
21115
21840
|
if (is_promise_util_isPromise(validatedValue)) {
|
|
@@ -22649,7 +23374,7 @@
|
|
|
22649
23374
|
do {
|
|
22650
23375
|
bits.unshift(!!(1 & number));
|
|
22651
23376
|
number >>= 1;
|
|
22652
|
-
}while (number)
|
|
23377
|
+
}while (number)
|
|
22653
23378
|
return bits.toReversed();
|
|
22654
23379
|
};
|
|
22655
23380
|
var dm_gen_DMAttr = /*#__PURE__*/ function(DMAttr) {
|
|
@@ -22723,7 +23448,7 @@
|
|
|
22723
23448
|
if (!this.SOID) this.SOID = def.SOID;
|
|
22724
23449
|
if (!this.progress) this.progress = def.progress;
|
|
22725
23450
|
if (!this.mode) this.mode = def.mode;
|
|
22726
|
-
if (!this.fontsize) this.fontsize = def.
|
|
23451
|
+
if (!this.fontsize) this.fontsize = def.fontsize;
|
|
22727
23452
|
if (!this.color) this.color = def.color;
|
|
22728
23453
|
if (!this.senderID) this.senderID = def.senderID;
|
|
22729
23454
|
if (!this.content) this.content = def.content;
|
|
@@ -23618,7 +24343,7 @@
|
|
|
23618
24343
|
const rawText = JSON.stringify(raw1);
|
|
23619
24344
|
let compress;
|
|
23620
24345
|
compress = 'brotli' === compressType ? (0, lib.brotliCompressSync)(rawText) : (0, lib.gzipSync)(rawText);
|
|
23621
|
-
return `;RawCompressType: ${compressType}\n;RawBaseType: ${baseType}\n;Raw: ${'base64' === baseType ? compress.toString('base64') : fromUint16Array(base16384_lib.
|
|
24346
|
+
return `;RawCompressType: ${compressType}\n;RawBaseType: ${baseType}\n;Raw: ${'base64' === baseType ? compress.toString('base64') : fromUint16Array(base16384_lib.lF(compress))}`;
|
|
23622
24347
|
}
|
|
23623
24348
|
function deRaw(ass) {
|
|
23624
24349
|
const arr = ass.split('\n');
|
|
@@ -23632,7 +24357,7 @@
|
|
|
23632
24357
|
if (!compressTypes.has(compressType)) compressType = 'gzip';
|
|
23633
24358
|
if (!baseTypes.has(baseType)) baseType = 'base64';
|
|
23634
24359
|
const text = lineRaw.replace(';Raw: ', '').trim();
|
|
23635
|
-
const buffer = 'base64' === baseType ? raw_Buffer.from(text, 'base64') : raw_Buffer.from(base16384_lib.
|
|
24360
|
+
const buffer = 'base64' === baseType ? raw_Buffer.from(text, 'base64') : raw_Buffer.from(base16384_lib.D4(raw_Buffer.from(text, 'utf8').toString('utf8')));
|
|
23636
24361
|
let decompress;
|
|
23637
24362
|
decompress = 'brotli' === compressType ? (0, lib.brotliDecompressSync)(buffer) : (0, lib.gunzipSync)(buffer);
|
|
23638
24363
|
try {
|
|
@@ -23748,13 +24473,38 @@
|
|
|
23748
24473
|
if (raw) return DanmakuList2UniPool(raw.list, options);
|
|
23749
24474
|
return UniPool.create();
|
|
23750
24475
|
}
|
|
23751
|
-
const file_bili_dm = /*@__PURE__*/ fileDesc("Cg1iaWxpL2RtLnBy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LnNlcnZpY2UuZG0udjEuRG1FeHBvUmVwb3J0UmVxGjEuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuRG1FeHBvUmVwb3J0UmVzYgZwcm90bzM");
|
|
23752
|
-
const DmSegMobileReplySchema = /*@__PURE__*/ message_messageDesc(
|
|
23753
|
-
const DmWebViewReplySchema = /*@__PURE__*/ message_messageDesc(
|
|
23754
|
-
const
|
|
24476
|
+
const file_bilibili_community_service_dm_v1_dm = /*@__PURE__*/ fileDesc("CiliaWxpYmlsaS9jb21tdW5pdHkvc2VydmljZS9kbS92MS9kbS5wcm90bxIgYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEiZAoGQXZhdGFyEgoKAmlkGAEgASgJEgsKA3VybBgCIAEoCRJBCgthdmF0YXJfdHlwZRgDIAEoDjIsLmJpbGliaWxpLmNvbW11bml0eS5zZXJ2aWNlLmRtLnYxLkF2YXRhclR5cGUiIwoGQnViYmxlEgwKBHRleHQYASABKAkSCwoDdXJsGAIgASgJIsYBCghCdWJibGVWMhIMCgR0ZXh0GAEgASgJEgsKA3VybBgCIAEoCRJBCgtidWJibGVfdHlwZRgDIAEoDjIsLmJpbGliaWxpLmNvbW11bml0eS5zZXJ2aWNlLmRtLnYxLkJ1YmJsZVR5cGUSFQoNZXhwb3N1cmVfb25jZRgEIAEoCBJFCg1leHBvc3VyZV90eXBlGAUgASgOMi4uYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuRXhwb3N1cmVUeXBlIlsKBkJ1dHRvbhIMCgR0ZXh0GAEgASgJEkMKBmFjdGlvbhgCIAEoDjIzLmJpbGliaWxpLmNvbW11bml0eS5zZXJ2aWNlLmRtLnYxLlRvYXN0RnVuY3Rpb25UeXBlIlgKDkJ1enp3b3JkQ29uZmlnEkYKCGtleXdvcmRzGAEgAygLMjQuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuQnV6endvcmRTaG93Q29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uZG0udjEuRG1TZWdPdHRSZXEaLy5iaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5EbVNlZ090dFJlcGx5EmoKCERtU2VnU0RLEi0uYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuRG1TZWdTREtSZXEaLy5iaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5EbVNlZ1NES1JlcGx5EnQKDERtRXhwb1JlcG9ydBIxLmJpbGliaWxpLmNvbW11bml0eS5zZXJ2aWNlLmRtLnYxLkRtRXhwb1JlcG9ydFJlcRoxLmJpbGliaWxpLmNvbW11bml0eS5zZXJ2aWNlLmRtLnYxLkRtRXhwb1JlcG9ydFJlc0LUAQokY29tLmJpbGliaWxpLmNvbW11bml0eS5zZXJ2aWNlLmRtLnYxQgdEbVByb3RvUAGiAgRCQ1NEqgIgQmlsaWJpbGkuQ29tbXVuaXR5LlNlcnZpY2UuRG0uVjHKAiBCaWxpYmlsaVxDb21tdW5pdHlcU2VydmljZVxEbVxWMeICLEJpbGliaWxpXENvbW11bml0eVxTZXJ2aWNlXERtXFYxXEdQQk1ldGFkYXRh6gIkQmlsaWJpbGk6OkNvbW11bml0eTo6U2VydmljZTo6RG06OlYxYgZwcm90bzM");
|
|
24477
|
+
const DmSegMobileReplySchema = /*@__PURE__*/ message_messageDesc(file_bilibili_community_service_dm_v1_dm, 30);
|
|
24478
|
+
const DmWebViewReplySchema = /*@__PURE__*/ message_messageDesc(file_bilibili_community_service_dm_v1_dm, 39);
|
|
24479
|
+
const file_danuni_danmaku_v1_danmaku = /*@__PURE__*/ fileDesc("Ch9kYW51bmkvZGFubWFrdS92MS9kYW5tYWt1LnByb3RvEhFkYW51bmkuZGFubWFrdS52MSI2Cg5MaXN0RGFuUmVxdWVzdBIKCgJpZBgBIAEoCRIQCgNzZWcYAiABKAVIAIgBAUIGCgRfc2VnIusCCgdEYW5tYWt1EhIKBHNvaWQYASABKAlSBFNPSUQSEgoEZG1pZ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
23755
24480
|
file_google_protobuf_timestamp
|
|
23756
24481
|
]);
|
|
23757
|
-
const
|
|
24482
|
+
const ListDanResponseSchema = /*@__PURE__*/ message_messageDesc(file_danuni_danmaku_v1_danmaku, 2);
|
|
24483
|
+
function fileParser(file, mod) {
|
|
24484
|
+
const isBinary = file instanceof ArrayBuffer || file instanceof Uint8Array;
|
|
24485
|
+
switch(mod){
|
|
24486
|
+
case 'bin':
|
|
24487
|
+
if (isBinary) return file;
|
|
24488
|
+
throw new TypeError('Expected binary data for mod "bin"');
|
|
24489
|
+
case 'string':
|
|
24490
|
+
if ('string' == typeof file) return file;
|
|
24491
|
+
if (isBinary) return new TextDecoder().decode(file);
|
|
24492
|
+
throw new TypeError('Expected binary data or string for mod "string"');
|
|
24493
|
+
case 'json':
|
|
24494
|
+
{
|
|
24495
|
+
if ('object' == typeof file && null !== file && !isBinary) return file;
|
|
24496
|
+
if ('string' != typeof file && !isBinary) throw new TypeError('Expected object, JSON string, or binary data for mod "json"');
|
|
24497
|
+
const str = 'string' == typeof file ? file : new TextDecoder().decode(file);
|
|
24498
|
+
try {
|
|
24499
|
+
return JSON.parse(str);
|
|
24500
|
+
} catch {
|
|
24501
|
+
throw new Error('Invalid JSON string');
|
|
24502
|
+
}
|
|
24503
|
+
}
|
|
24504
|
+
default:
|
|
24505
|
+
throw new Error(`Unsupported mod "${mod}"`);
|
|
24506
|
+
}
|
|
24507
|
+
}
|
|
23758
24508
|
const src_JSON = json_bigint_default()({
|
|
23759
24509
|
useNativeBigInt: true
|
|
23760
24510
|
});
|
|
@@ -23974,6 +24724,87 @@
|
|
|
23974
24724
|
return this.dans.map((d)=>d.minify());
|
|
23975
24725
|
}
|
|
23976
24726
|
static import(file, options, mod) {
|
|
24727
|
+
const handlers = {
|
|
24728
|
+
["danuni.json"]: (json)=>({
|
|
24729
|
+
pool: new UniPool(json, options),
|
|
24730
|
+
fmt: "danuni.json"
|
|
24731
|
+
}),
|
|
24732
|
+
["danuni.min.json"]: (json)=>({
|
|
24733
|
+
pool: this.fromMin(json, options),
|
|
24734
|
+
fmt: "danuni.min.json"
|
|
24735
|
+
}),
|
|
24736
|
+
["danuni.binpb"]: (file)=>({
|
|
24737
|
+
pool: this.fromPb(file),
|
|
24738
|
+
fmt: "danuni.binpb"
|
|
24739
|
+
}),
|
|
24740
|
+
["bili.xml"]: (file)=>({
|
|
24741
|
+
pool: this.fromBiliXML(file, options),
|
|
24742
|
+
fmt: "bili.xml"
|
|
24743
|
+
}),
|
|
24744
|
+
["bili.binpb"]: (file)=>({
|
|
24745
|
+
pool: this.fromBiliGrpc(file),
|
|
24746
|
+
fmt: "bili.binpb"
|
|
24747
|
+
}),
|
|
24748
|
+
["bili.cmd.binpb"]: (file)=>({
|
|
24749
|
+
pool: this.fromBiliCommandGrpc(file),
|
|
24750
|
+
fmt: "bili.cmd.binpb"
|
|
24751
|
+
}),
|
|
24752
|
+
["bili.up.json"]: (json)=>({
|
|
24753
|
+
pool: this.fromBiliUp(json, options),
|
|
24754
|
+
fmt: "bili.up.json"
|
|
24755
|
+
}),
|
|
24756
|
+
["dplayer.json"]: (json)=>({
|
|
24757
|
+
pool: this.fromDplayer(json, json.danuni?.data ?? '', void 0, options),
|
|
24758
|
+
fmt: "dplayer.json"
|
|
24759
|
+
}),
|
|
24760
|
+
["artplayer.json"]: (json)=>({
|
|
24761
|
+
pool: this.fromArtplayer(json, json.danuni?.data ?? '', void 0, options),
|
|
24762
|
+
fmt: "artplayer.json"
|
|
24763
|
+
}),
|
|
24764
|
+
["ddplay.json"]: (json)=>({
|
|
24765
|
+
pool: this.fromDDPlay(json, json.danuni?.data ?? '', options),
|
|
24766
|
+
fmt: "ddplay.json"
|
|
24767
|
+
}),
|
|
24768
|
+
["common.ass"]: (file)=>({
|
|
24769
|
+
pool: this.fromASS(file, options),
|
|
24770
|
+
fmt: "common.ass"
|
|
24771
|
+
})
|
|
24772
|
+
};
|
|
24773
|
+
if ('string' == typeof mod) {
|
|
24774
|
+
const fn = mod;
|
|
24775
|
+
try {
|
|
24776
|
+
if (fn.endsWith("danuni.json")) return handlers["danuni.json"](fileParser(file, 'json'));
|
|
24777
|
+
if (fn.endsWith("danuni.min.json")) return handlers["danuni.min.json"](fileParser(file, 'json'));
|
|
24778
|
+
if (fn.endsWith("danuni.binpb")) return handlers["danuni.binpb"](fileParser(file, 'bin'));
|
|
24779
|
+
else if (fn.endsWith("bili.xml")) return handlers["bili.xml"](fileParser(file, 'string'));
|
|
24780
|
+
else if (fn.endsWith("bili.binpb")) return handlers["bili.binpb"](fileParser(file, 'bin'));
|
|
24781
|
+
else if (fn.endsWith("bili.cmd.binpb")) return handlers["bili.cmd.binpb"](fileParser(file, 'bin'));
|
|
24782
|
+
else if (fn.endsWith("bili.up.json")) return handlers["bili.up.json"](fileParser(file, 'json'));
|
|
24783
|
+
else if (fn.endsWith("dplayer.json")) return handlers["dplayer.json"](fileParser(file, 'json'));
|
|
24784
|
+
else if (fn.endsWith("artplayer.json")) return handlers["artplayer.json"](fileParser(file, 'json'));
|
|
24785
|
+
else if (fn.endsWith("ddplay.json")) return handlers["ddplay.json"](fileParser(file, 'json'));
|
|
24786
|
+
else if (fn.endsWith("common.ass")) return handlers["common.ass"](fileParser(file, 'string'));
|
|
24787
|
+
} catch {}
|
|
24788
|
+
const ext = fn.split('.').pop()?.toLowerCase();
|
|
24789
|
+
if (ext) {
|
|
24790
|
+
if ('json' === ext) mod = [
|
|
24791
|
+
'json'
|
|
24792
|
+
];
|
|
24793
|
+
else if ([
|
|
24794
|
+
'xml',
|
|
24795
|
+
'ass'
|
|
24796
|
+
].includes(ext)) mod = [
|
|
24797
|
+
'str'
|
|
24798
|
+
];
|
|
24799
|
+
else if ([
|
|
24800
|
+
'binpb',
|
|
24801
|
+
'bin',
|
|
24802
|
+
'so'
|
|
24803
|
+
].includes(ext)) mod = [
|
|
24804
|
+
'bin'
|
|
24805
|
+
];
|
|
24806
|
+
}
|
|
24807
|
+
}
|
|
23977
24808
|
if (!mod) mod = [
|
|
23978
24809
|
'json',
|
|
23979
24810
|
'str',
|
|
@@ -23982,26 +24813,11 @@
|
|
|
23982
24813
|
const err = '无法识别该文件,请手动指定格式!';
|
|
23983
24814
|
const parseJSON = (json)=>{
|
|
23984
24815
|
try {
|
|
23985
|
-
if (Array.isArray(json) && json.every((d)=>d.SOID)) return
|
|
23986
|
-
|
|
23987
|
-
|
|
23988
|
-
|
|
23989
|
-
if (json.
|
|
23990
|
-
pool: this.fromArtplayer(json, json.danuni?.data ?? '', void 0, options),
|
|
23991
|
-
fmt: "artplayer.json"
|
|
23992
|
-
};
|
|
23993
|
-
if (json.count && json.comments && Array.isArray(json.comments) && json.comments.every((d)=>d.m)) return {
|
|
23994
|
-
pool: this.fromDDPlay(json, json.danuni?.data ?? '', options),
|
|
23995
|
-
fmt: "ddplay.json"
|
|
23996
|
-
};
|
|
23997
|
-
else if (0 == json.code && json.data && Array.isArray(json.data) && json.data.every((d)=>Array.isArray(d))) return {
|
|
23998
|
-
pool: this.fromDplayer(json, json.danuni?.data ?? '', void 0, options),
|
|
23999
|
-
fmt: "dplayer.json"
|
|
24000
|
-
};
|
|
24001
|
-
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 {
|
|
24002
|
-
pool: this.fromBiliUp(json, options),
|
|
24003
|
-
fmt: "bili.up.json"
|
|
24004
|
-
};
|
|
24816
|
+
if (Array.isArray(json) && json.every((d)=>d.SOID)) return handlers["danuni.min.json"](json);
|
|
24817
|
+
if (json.danmuku && json.danmuku.every((d)=>d.text)) return handlers["artplayer.json"](json);
|
|
24818
|
+
if (json.count && json.comments && Array.isArray(json.comments) && json.comments.every((d)=>d.m)) return handlers["ddplay.json"](json);
|
|
24819
|
+
else if (0 == json.code && json.data && Array.isArray(json.data) && json.data.every((d)=>Array.isArray(d))) return handlers["dplayer.json"](json);
|
|
24820
|
+
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);
|
|
24005
24821
|
} catch {}
|
|
24006
24822
|
};
|
|
24007
24823
|
const parseStr = (file)=>{
|
|
@@ -24017,40 +24833,25 @@
|
|
|
24017
24833
|
ignoreAttributes: false
|
|
24018
24834
|
});
|
|
24019
24835
|
const xml = xmlParser.parse(file);
|
|
24020
|
-
if (xml?.i?.d) return
|
|
24021
|
-
pool: this.fromBiliXML(file, options),
|
|
24022
|
-
fmt: "bili.xml"
|
|
24023
|
-
};
|
|
24836
|
+
if (xml?.i?.d) return handlers["bili.xml"](file);
|
|
24024
24837
|
} catch {}
|
|
24025
24838
|
try {
|
|
24026
|
-
return
|
|
24027
|
-
pool: this.fromASS(file, options),
|
|
24028
|
-
fmt: "common.ass"
|
|
24029
|
-
};
|
|
24839
|
+
return handlers["common.ass"](file);
|
|
24030
24840
|
} catch {}
|
|
24031
24841
|
}
|
|
24032
24842
|
};
|
|
24033
24843
|
let errmesg;
|
|
24034
|
-
if (
|
|
24844
|
+
if ('object' == typeof file || Array.isArray(file)) {
|
|
24035
24845
|
if (file instanceof ArrayBuffer || file instanceof Uint8Array) {
|
|
24036
24846
|
if (mod.includes('bin')) {
|
|
24037
24847
|
try {
|
|
24038
|
-
return
|
|
24039
|
-
pool: this.fromPb(file),
|
|
24040
|
-
fmt: "danuni.pb.bin"
|
|
24041
|
-
};
|
|
24848
|
+
return handlers["danuni.binpb"](file);
|
|
24042
24849
|
} catch {}
|
|
24043
24850
|
try {
|
|
24044
|
-
return
|
|
24045
|
-
pool: this.fromBiliGrpc(file),
|
|
24046
|
-
fmt: "bili.pb.bin"
|
|
24047
|
-
};
|
|
24851
|
+
return handlers["bili.binpb"](file);
|
|
24048
24852
|
} catch {}
|
|
24049
24853
|
try {
|
|
24050
|
-
return
|
|
24051
|
-
pool: this.fromBiliCommandGrpc(file),
|
|
24052
|
-
fmt: "bili.cmd.pb.bin"
|
|
24053
|
-
};
|
|
24854
|
+
return handlers["bili.cmd.binpb"](file);
|
|
24054
24855
|
} catch {}
|
|
24055
24856
|
}
|
|
24056
24857
|
try {
|
|
@@ -24075,7 +24876,9 @@
|
|
|
24075
24876
|
switch(format){
|
|
24076
24877
|
case 'danuni.json':
|
|
24077
24878
|
return this.dans;
|
|
24078
|
-
case 'danuni.
|
|
24879
|
+
case 'danuni.min.json':
|
|
24880
|
+
return this.minify();
|
|
24881
|
+
case 'danuni.binpb':
|
|
24079
24882
|
return this.toPb();
|
|
24080
24883
|
case 'bili.xml':
|
|
24081
24884
|
return this.toBiliXML();
|
|
@@ -24093,12 +24896,18 @@
|
|
|
24093
24896
|
}
|
|
24094
24897
|
}
|
|
24095
24898
|
}
|
|
24899
|
+
static fromMin(json, options) {
|
|
24900
|
+
return new UniPool(json.map((d)=>UniDM.create(d, options)));
|
|
24901
|
+
}
|
|
24096
24902
|
static fromPb(bin, options) {
|
|
24097
|
-
const data = fromBinary(
|
|
24903
|
+
const data = fromBinary(ListDanResponseSchema, new Uint8Array(bin));
|
|
24098
24904
|
return new UniPool(data.danmakus.map((d)=>UniDM.create({
|
|
24099
24905
|
...d,
|
|
24906
|
+
SOID: d.soid,
|
|
24907
|
+
DMID: d.dmid,
|
|
24100
24908
|
progress: d.progress / 1000,
|
|
24101
24909
|
mode: d.mode,
|
|
24910
|
+
senderID: d.senderId,
|
|
24102
24911
|
ctime: timestampDate(d.ctime || timestampNow()),
|
|
24103
24912
|
pool: d.pool,
|
|
24104
24913
|
attr: d.attr,
|
|
@@ -24107,15 +24916,15 @@
|
|
|
24107
24916
|
}, options)), options);
|
|
24108
24917
|
}
|
|
24109
24918
|
toPb() {
|
|
24110
|
-
return toBinary(
|
|
24919
|
+
return toBinary(ListDanResponseSchema, create(ListDanResponseSchema, {
|
|
24111
24920
|
danmakus: this.dans.map((d)=>({
|
|
24112
|
-
|
|
24113
|
-
|
|
24921
|
+
soid: d.SOID,
|
|
24922
|
+
dmid: d.DMID ?? '',
|
|
24114
24923
|
progress: Math.round(1000 * d.progress),
|
|
24115
24924
|
mode: d.mode,
|
|
24116
24925
|
fontsize: d.fontsize,
|
|
24117
24926
|
color: d.color,
|
|
24118
|
-
|
|
24927
|
+
senderId: d.senderID,
|
|
24119
24928
|
content: d.content,
|
|
24120
24929
|
ctime: timestampFromDate(d.ctime),
|
|
24121
24930
|
weight: d.weight,
|
|
@@ -24151,7 +24960,7 @@
|
|
|
24151
24960
|
const ok = this.dans.every((d)=>d.senderID.endsWith(`@${platform.PlatformVideoSource.Bilibili}`));
|
|
24152
24961
|
if (!ok) throw new Error('存在其他来源的senderID,请关闭该功能再试!');
|
|
24153
24962
|
}
|
|
24154
|
-
const builder = new
|
|
24963
|
+
const builder = new json2xml({
|
|
24155
24964
|
ignoreAttributes: false
|
|
24156
24965
|
});
|
|
24157
24966
|
return builder.build({
|