@dpuse/dpuse-tool-streamparser-json-parser 0.0.0-stage → 1.0.2
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/LICENSE +21 -0
- package/README.md +173 -2
- package/dist/dpuse-tool-streamparser-json-parser.es.js +2262 -0
- package/dist/dpuse-tool-streamparser-json-parser.es.js.map +1 -0
- package/dist/shipped-packages.json +8 -0
- package/dist/types/src/index.d.ts +24 -0
- package/dist/types/src/itemRecords.d.ts +19 -0
- package/dist/types/src/structureWalker.d.ts +51 -0
- package/package.json +79 -5
|
@@ -0,0 +1,2262 @@
|
|
|
1
|
+
// node_modules/@dpuse/dpuse-shared/dist/dpuse-shared.es.js
|
|
2
|
+
var e = {
|
|
3
|
+
lang: void 0,
|
|
4
|
+
message: void 0,
|
|
5
|
+
abortEarly: void 0,
|
|
6
|
+
abortPipeEarly: void 0
|
|
7
|
+
};
|
|
8
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
9
|
+
function t(t) {
|
|
10
|
+
return t ? {
|
|
11
|
+
lang: t?.lang ?? void 0,
|
|
12
|
+
message: t?.message,
|
|
13
|
+
abortEarly: t?.abortEarly ?? void 0,
|
|
14
|
+
abortPipeEarly: t?.abortPipeEarly ?? void 0
|
|
15
|
+
} : e;
|
|
16
|
+
}
|
|
17
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
18
|
+
function n(e) {
|
|
19
|
+
let t = typeof e;
|
|
20
|
+
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
21
|
+
}
|
|
22
|
+
function r(e, t, r, i, a) {
|
|
23
|
+
let o = a && "input" in a ? a.input : r.value, s = a?.expected ?? e.expects ?? null, c = a?.received ?? /* @__PURE__ */ n(o), l = {
|
|
24
|
+
kind: e.kind,
|
|
25
|
+
type: e.type,
|
|
26
|
+
input: o,
|
|
27
|
+
expected: s,
|
|
28
|
+
received: c,
|
|
29
|
+
message: `Invalid ${t}: ${s ? `Expected ${s} but r` : "R"}eceived ${c}`,
|
|
30
|
+
requirement: e.requirement,
|
|
31
|
+
path: a?.path,
|
|
32
|
+
issues: a?.issues,
|
|
33
|
+
lang: i.lang,
|
|
34
|
+
abortEarly: i.abortEarly,
|
|
35
|
+
abortPipeEarly: i.abortPipeEarly
|
|
36
|
+
}, u = e.kind === "schema", d = a?.message ?? e.message ?? (e.reference, l.lang, void 0) ?? (u ? (l.lang, void 0) : null) ?? i.message ?? (l.lang, void 0);
|
|
37
|
+
d !== void 0 && (l.message = typeof d == "function" ? d(l) : d), u && (r.typed = !1), r.issues ? r.issues.push(l) : r.issues = [l];
|
|
38
|
+
}
|
|
39
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
40
|
+
function i(e, t) {
|
|
41
|
+
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
42
|
+
}
|
|
43
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
44
|
+
function a(e, t) {
|
|
45
|
+
let n = [...new Set(e)];
|
|
46
|
+
return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
|
|
47
|
+
}
|
|
48
|
+
function o(e) {
|
|
49
|
+
return e["~standard"] = {
|
|
50
|
+
version: 1,
|
|
51
|
+
vendor: "valibot",
|
|
52
|
+
validate: (n) => e["~run"]({ value: n }, /* @__PURE__ */ t())
|
|
53
|
+
}, e;
|
|
54
|
+
}
|
|
55
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
56
|
+
function s(e, t, n) {
|
|
57
|
+
return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
|
|
58
|
+
}
|
|
59
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
60
|
+
function c(e, t, n) {
|
|
61
|
+
return typeof e.default == "function" ? e.default(t, n) : e.default;
|
|
62
|
+
}
|
|
63
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
64
|
+
function l(e, t) {
|
|
65
|
+
return o({
|
|
66
|
+
kind: "schema",
|
|
67
|
+
type: "literal",
|
|
68
|
+
reference: l,
|
|
69
|
+
expects: /* @__PURE__ */ n(e),
|
|
70
|
+
async: !1,
|
|
71
|
+
literal: e,
|
|
72
|
+
message: t,
|
|
73
|
+
"~run"(e, t) {
|
|
74
|
+
return /* @__PURE__ */ i(e.value, this.literal) ? e.typed = !0 : r(this, "type", e, t), e;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
79
|
+
function u(e, t) {
|
|
80
|
+
return o({
|
|
81
|
+
kind: "schema",
|
|
82
|
+
type: "nullable",
|
|
83
|
+
reference: u,
|
|
84
|
+
expects: `(${e.expects} | null)`,
|
|
85
|
+
async: !1,
|
|
86
|
+
wrapped: e,
|
|
87
|
+
default: t,
|
|
88
|
+
"~run"(e, t) {
|
|
89
|
+
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ c(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
94
|
+
function d(e) {
|
|
95
|
+
return o({
|
|
96
|
+
kind: "schema",
|
|
97
|
+
type: "number",
|
|
98
|
+
reference: d,
|
|
99
|
+
expects: "number",
|
|
100
|
+
async: !1,
|
|
101
|
+
message: e,
|
|
102
|
+
"~run"(e, t) {
|
|
103
|
+
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : r(this, "type", e, t), e;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
108
|
+
function f(e, t) {
|
|
109
|
+
return o({
|
|
110
|
+
kind: "schema",
|
|
111
|
+
type: "optional",
|
|
112
|
+
reference: f,
|
|
113
|
+
expects: `(${e.expects} | undefined)`,
|
|
114
|
+
async: !1,
|
|
115
|
+
wrapped: e,
|
|
116
|
+
default: t,
|
|
117
|
+
"~run"(e, t) {
|
|
118
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ c(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
123
|
+
function p(e, t) {
|
|
124
|
+
return o({
|
|
125
|
+
kind: "schema",
|
|
126
|
+
type: "strict_object",
|
|
127
|
+
reference: p,
|
|
128
|
+
expects: "Object",
|
|
129
|
+
async: !1,
|
|
130
|
+
entries: e,
|
|
131
|
+
message: t,
|
|
132
|
+
"~run"(e, t) {
|
|
133
|
+
let n = e.value;
|
|
134
|
+
if (n && typeof n == "object") {
|
|
135
|
+
e.typed = !0, e.value = {};
|
|
136
|
+
for (let i in this.entries) {
|
|
137
|
+
let a = this.entries[i];
|
|
138
|
+
if (i in n || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
|
|
139
|
+
let r = i in n ? n[i] : /* @__PURE__ */ c(a), o = a["~run"]({ value: r }, t);
|
|
140
|
+
if (o.issues) {
|
|
141
|
+
let a = {
|
|
142
|
+
type: "object",
|
|
143
|
+
origin: "value",
|
|
144
|
+
input: n,
|
|
145
|
+
key: i,
|
|
146
|
+
value: r
|
|
147
|
+
};
|
|
148
|
+
for (let t of o.issues) t.path ? t.path.unshift(a) : t.path = [a], e.issues?.push(t);
|
|
149
|
+
if (e.issues ||= o.issues, t.abortEarly) {
|
|
150
|
+
e.typed = !1;
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
o.typed || (e.typed = !1), e.value[i] = o.value;
|
|
155
|
+
} else if (a.fallback !== void 0) e.value[i] = /* @__PURE__ */ s(a);
|
|
156
|
+
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (r(this, "key", e, t, {
|
|
157
|
+
input: void 0,
|
|
158
|
+
expected: `"${i}"`,
|
|
159
|
+
path: [{
|
|
160
|
+
type: "object",
|
|
161
|
+
origin: "key",
|
|
162
|
+
input: n,
|
|
163
|
+
key: i,
|
|
164
|
+
value: n[i]
|
|
165
|
+
}]
|
|
166
|
+
}), t.abortEarly)) break;
|
|
167
|
+
}
|
|
168
|
+
if (!e.issues || !t.abortEarly) {
|
|
169
|
+
for (let i in n) if (!Object.prototype.hasOwnProperty.call(this.entries, i)) {
|
|
170
|
+
r(this, "key", e, t, {
|
|
171
|
+
input: i,
|
|
172
|
+
expected: "never",
|
|
173
|
+
path: [{
|
|
174
|
+
type: "object",
|
|
175
|
+
origin: "key",
|
|
176
|
+
input: n,
|
|
177
|
+
key: i,
|
|
178
|
+
value: n[i]
|
|
179
|
+
}]
|
|
180
|
+
});
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
} else r(this, "type", e, t);
|
|
185
|
+
return e;
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
190
|
+
function m(e) {
|
|
191
|
+
return o({
|
|
192
|
+
kind: "schema",
|
|
193
|
+
type: "string",
|
|
194
|
+
reference: m,
|
|
195
|
+
expects: "string",
|
|
196
|
+
async: !1,
|
|
197
|
+
message: e,
|
|
198
|
+
"~run"(e, t) {
|
|
199
|
+
return typeof e.value == "string" ? e.typed = !0 : r(this, "type", e, t), e;
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
204
|
+
function h(e) {
|
|
205
|
+
let t;
|
|
206
|
+
if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
|
|
207
|
+
else t = n.issues;
|
|
208
|
+
return t;
|
|
209
|
+
}
|
|
210
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
211
|
+
function g(e, t) {
|
|
212
|
+
return o({
|
|
213
|
+
kind: "schema",
|
|
214
|
+
type: "union",
|
|
215
|
+
reference: g,
|
|
216
|
+
expects: /* @__PURE__ */ a(e.map((e) => e.expects), "|"),
|
|
217
|
+
async: !1,
|
|
218
|
+
options: e,
|
|
219
|
+
message: t,
|
|
220
|
+
"~run"(e, t) {
|
|
221
|
+
let n, i, a;
|
|
222
|
+
for (let r of this.options) {
|
|
223
|
+
let o = r["~run"]({ value: e.value }, t);
|
|
224
|
+
if (o.typed) {
|
|
225
|
+
if (o.issues) i ? i.push(o) : i = [o];
|
|
226
|
+
else {
|
|
227
|
+
n = o;
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
} else a ? a.push(o) : a = [o];
|
|
231
|
+
}
|
|
232
|
+
if (n) return n;
|
|
233
|
+
if (i) {
|
|
234
|
+
if (i.length === 1) return i[0];
|
|
235
|
+
r(this, "type", e, t, { issues: /* @__PURE__ */ h(i) }), e.typed = !0;
|
|
236
|
+
} else if (a?.length === 1) return a[0];
|
|
237
|
+
else r(this, "type", e, t, { issues: /* @__PURE__ */ h(a) });
|
|
238
|
+
return e;
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
var ee = {
|
|
243
|
+
id: /* @__PURE__ */ m(),
|
|
244
|
+
label: /* @__PURE__ */ p({
|
|
245
|
+
en: /* @__PURE__ */ f(/* @__PURE__ */ m()),
|
|
246
|
+
es: /* @__PURE__ */ f(/* @__PURE__ */ m())
|
|
247
|
+
}),
|
|
248
|
+
description: /* @__PURE__ */ p({
|
|
249
|
+
en: /* @__PURE__ */ f(/* @__PURE__ */ m()),
|
|
250
|
+
es: /* @__PURE__ */ f(/* @__PURE__ */ m())
|
|
251
|
+
}),
|
|
252
|
+
icon: /* @__PURE__ */ u(/* @__PURE__ */ m()),
|
|
253
|
+
iconDark: /* @__PURE__ */ u(/* @__PURE__ */ m())
|
|
254
|
+
}, _ = (e) => /* @__PURE__ */ g(e.map((e) => /* @__PURE__ */ l(e))), te = _([
|
|
255
|
+
"app",
|
|
256
|
+
"connector",
|
|
257
|
+
"connectorConnection",
|
|
258
|
+
"context",
|
|
259
|
+
"contextArea",
|
|
260
|
+
"contextModel",
|
|
261
|
+
"contextModelDimension",
|
|
262
|
+
"contextModelDimensionHierarchy",
|
|
263
|
+
"contextModelEntity",
|
|
264
|
+
"contextModelEntityDataItem",
|
|
265
|
+
"contextModelEntityEvent",
|
|
266
|
+
"contextModelEntityPrimaryMeasure",
|
|
267
|
+
"contextModelSecondaryMeasure",
|
|
268
|
+
"cookbook",
|
|
269
|
+
"cookbookRecipe",
|
|
270
|
+
"dataView",
|
|
271
|
+
"engine",
|
|
272
|
+
"eventQuery",
|
|
273
|
+
"presenter",
|
|
274
|
+
"presenterPresentation",
|
|
275
|
+
"tool"
|
|
276
|
+
]), ne = _([
|
|
277
|
+
"danger",
|
|
278
|
+
"success",
|
|
279
|
+
"warning"
|
|
280
|
+
]), re = _([
|
|
281
|
+
"alpha",
|
|
282
|
+
"beta",
|
|
283
|
+
"releaseCandidate",
|
|
284
|
+
"generalAvailability"
|
|
285
|
+
]), ie = /* @__PURE__ */ p({
|
|
286
|
+
color: ne,
|
|
287
|
+
label: /* @__PURE__ */ m()
|
|
288
|
+
}), v = {
|
|
289
|
+
...ee,
|
|
290
|
+
typeId: te
|
|
291
|
+
};
|
|
292
|
+
({ ...v });
|
|
293
|
+
var y = {
|
|
294
|
+
...v,
|
|
295
|
+
firstCreatedAt: /* @__PURE__ */ u(/* @__PURE__ */ d()),
|
|
296
|
+
lastUpdatedAt: /* @__PURE__ */ u(/* @__PURE__ */ d()),
|
|
297
|
+
status: /* @__PURE__ */ u(ie),
|
|
298
|
+
statusId: /* @__PURE__ */ u(re)
|
|
299
|
+
};
|
|
300
|
+
({ ...y }), _([
|
|
301
|
+
"app",
|
|
302
|
+
"engine",
|
|
303
|
+
"connector",
|
|
304
|
+
"cookbook",
|
|
305
|
+
"presenter",
|
|
306
|
+
"tool"
|
|
307
|
+
]);
|
|
308
|
+
var b = {
|
|
309
|
+
...y,
|
|
310
|
+
vendorAccountURL: /* @__PURE__ */ u(/* @__PURE__ */ m()),
|
|
311
|
+
vendorDocumentationURL: /* @__PURE__ */ u(/* @__PURE__ */ m()),
|
|
312
|
+
vendorHomeURL: /* @__PURE__ */ u(/* @__PURE__ */ m()),
|
|
313
|
+
version: /* @__PURE__ */ m()
|
|
314
|
+
};
|
|
315
|
+
({ ...b }), _([
|
|
316
|
+
"auditObjectContent",
|
|
317
|
+
"closeStore",
|
|
318
|
+
"createObject",
|
|
319
|
+
"describeConnection",
|
|
320
|
+
"dropObject",
|
|
321
|
+
"findObject",
|
|
322
|
+
"getInfo",
|
|
323
|
+
"getReadableStream",
|
|
324
|
+
"getRecord",
|
|
325
|
+
"listNodes",
|
|
326
|
+
"loadObjectRecords",
|
|
327
|
+
"openStore",
|
|
328
|
+
"previewObject",
|
|
329
|
+
"queryRecords",
|
|
330
|
+
"removeRecords",
|
|
331
|
+
"retrieveRecords",
|
|
332
|
+
"upsertRecords"
|
|
333
|
+
]), _([
|
|
334
|
+
"application",
|
|
335
|
+
"curatedDataset",
|
|
336
|
+
"database",
|
|
337
|
+
"fileStore"
|
|
338
|
+
]), _([
|
|
339
|
+
"apiEndpoint",
|
|
340
|
+
"file",
|
|
341
|
+
"table"
|
|
342
|
+
]), _([
|
|
343
|
+
"bidirectional",
|
|
344
|
+
"destination",
|
|
345
|
+
"source",
|
|
346
|
+
"unknown"
|
|
347
|
+
]), _([
|
|
348
|
+
"apiKey",
|
|
349
|
+
"disabled",
|
|
350
|
+
"oAuth2",
|
|
351
|
+
"none"
|
|
352
|
+
]), { ...b };
|
|
353
|
+
var x = {
|
|
354
|
+
"armscii-8": {
|
|
355
|
+
id: "armscii-8",
|
|
356
|
+
groupId: "armenian",
|
|
357
|
+
isDetectable: !1,
|
|
358
|
+
textDecoderId: null,
|
|
359
|
+
iconvLiteDecoderId: "armscii8"
|
|
360
|
+
},
|
|
361
|
+
ascii: {
|
|
362
|
+
id: "ascii",
|
|
363
|
+
groupId: null,
|
|
364
|
+
isDetectable: !0,
|
|
365
|
+
textDecoderId: "windows-1252",
|
|
366
|
+
iconvLiteDecoderId: "ascii"
|
|
367
|
+
},
|
|
368
|
+
big5: {
|
|
369
|
+
id: "big5",
|
|
370
|
+
groupId: "chineseTraditional",
|
|
371
|
+
isDetectable: !0,
|
|
372
|
+
textDecoderId: "big5",
|
|
373
|
+
iconvLiteDecoderId: "big5hkscs"
|
|
374
|
+
},
|
|
375
|
+
"cesu-8": {
|
|
376
|
+
id: "cesu-8",
|
|
377
|
+
groupId: "unicode",
|
|
378
|
+
isDetectable: !1,
|
|
379
|
+
textDecoderId: null,
|
|
380
|
+
iconvLiteDecoderId: "cesu8"
|
|
381
|
+
},
|
|
382
|
+
cp273: {
|
|
383
|
+
id: "cp273",
|
|
384
|
+
groupId: "western",
|
|
385
|
+
isDetectable: !0,
|
|
386
|
+
textDecoderId: null,
|
|
387
|
+
iconvLiteDecoderId: null
|
|
388
|
+
},
|
|
389
|
+
cp424: {
|
|
390
|
+
id: "cp424",
|
|
391
|
+
groupId: "hebrew",
|
|
392
|
+
isDetectable: !0,
|
|
393
|
+
textDecoderId: null,
|
|
394
|
+
iconvLiteDecoderId: null
|
|
395
|
+
},
|
|
396
|
+
cp437: {
|
|
397
|
+
id: "cp437",
|
|
398
|
+
groupId: "western",
|
|
399
|
+
isDetectable: !0,
|
|
400
|
+
textDecoderId: null,
|
|
401
|
+
iconvLiteDecoderId: "cp437"
|
|
402
|
+
},
|
|
403
|
+
cp500: {
|
|
404
|
+
id: "cp500",
|
|
405
|
+
groupId: "western",
|
|
406
|
+
isDetectable: !0,
|
|
407
|
+
textDecoderId: null,
|
|
408
|
+
iconvLiteDecoderId: null
|
|
409
|
+
},
|
|
410
|
+
cp720: {
|
|
411
|
+
id: "cp720",
|
|
412
|
+
groupId: "arabic",
|
|
413
|
+
isDetectable: !0,
|
|
414
|
+
textDecoderId: null,
|
|
415
|
+
iconvLiteDecoderId: "cp720"
|
|
416
|
+
},
|
|
417
|
+
cp737: {
|
|
418
|
+
id: "cp737",
|
|
419
|
+
groupId: "greek",
|
|
420
|
+
isDetectable: !0,
|
|
421
|
+
textDecoderId: null,
|
|
422
|
+
iconvLiteDecoderId: "cp737"
|
|
423
|
+
},
|
|
424
|
+
cp775: {
|
|
425
|
+
id: "cp775",
|
|
426
|
+
groupId: "baltic",
|
|
427
|
+
isDetectable: !0,
|
|
428
|
+
textDecoderId: null,
|
|
429
|
+
iconvLiteDecoderId: "cp775"
|
|
430
|
+
},
|
|
431
|
+
cp808: {
|
|
432
|
+
id: "cp808",
|
|
433
|
+
groupId: "cyrillic",
|
|
434
|
+
isDetectable: !1,
|
|
435
|
+
textDecoderId: null,
|
|
436
|
+
iconvLiteDecoderId: "cp808"
|
|
437
|
+
},
|
|
438
|
+
cp850: {
|
|
439
|
+
id: "cp850",
|
|
440
|
+
groupId: "western",
|
|
441
|
+
isDetectable: !0,
|
|
442
|
+
textDecoderId: null,
|
|
443
|
+
iconvLiteDecoderId: "cp850"
|
|
444
|
+
},
|
|
445
|
+
cp852: {
|
|
446
|
+
id: "cp852",
|
|
447
|
+
groupId: "centralEuropean",
|
|
448
|
+
isDetectable: !0,
|
|
449
|
+
textDecoderId: null,
|
|
450
|
+
iconvLiteDecoderId: "cp852"
|
|
451
|
+
},
|
|
452
|
+
cp856: {
|
|
453
|
+
id: "cp856",
|
|
454
|
+
groupId: "hebrew",
|
|
455
|
+
isDetectable: !0,
|
|
456
|
+
textDecoderId: null,
|
|
457
|
+
iconvLiteDecoderId: "cp856"
|
|
458
|
+
},
|
|
459
|
+
cp857: {
|
|
460
|
+
id: "cp857",
|
|
461
|
+
groupId: "turkish",
|
|
462
|
+
isDetectable: !0,
|
|
463
|
+
textDecoderId: null,
|
|
464
|
+
iconvLiteDecoderId: "cp857"
|
|
465
|
+
},
|
|
466
|
+
cp858: {
|
|
467
|
+
id: "cp858",
|
|
468
|
+
groupId: "western",
|
|
469
|
+
isDetectable: !0,
|
|
470
|
+
textDecoderId: null,
|
|
471
|
+
iconvLiteDecoderId: "cp858"
|
|
472
|
+
},
|
|
473
|
+
cp860: {
|
|
474
|
+
id: "cp860",
|
|
475
|
+
groupId: "western",
|
|
476
|
+
isDetectable: !0,
|
|
477
|
+
textDecoderId: null,
|
|
478
|
+
iconvLiteDecoderId: "cp860"
|
|
479
|
+
},
|
|
480
|
+
cp861: {
|
|
481
|
+
id: "cp861",
|
|
482
|
+
groupId: "nordic",
|
|
483
|
+
isDetectable: !0,
|
|
484
|
+
textDecoderId: null,
|
|
485
|
+
iconvLiteDecoderId: "cp861"
|
|
486
|
+
},
|
|
487
|
+
cp862: {
|
|
488
|
+
id: "cp862",
|
|
489
|
+
groupId: "hebrew",
|
|
490
|
+
isDetectable: !0,
|
|
491
|
+
textDecoderId: null,
|
|
492
|
+
iconvLiteDecoderId: "cp862"
|
|
493
|
+
},
|
|
494
|
+
cp863: {
|
|
495
|
+
id: "cp863",
|
|
496
|
+
groupId: "western",
|
|
497
|
+
isDetectable: !0,
|
|
498
|
+
textDecoderId: null,
|
|
499
|
+
iconvLiteDecoderId: "cp863"
|
|
500
|
+
},
|
|
501
|
+
cp864: {
|
|
502
|
+
id: "cp864",
|
|
503
|
+
groupId: "arabic",
|
|
504
|
+
isDetectable: !0,
|
|
505
|
+
textDecoderId: null,
|
|
506
|
+
iconvLiteDecoderId: "cp864"
|
|
507
|
+
},
|
|
508
|
+
cp865: {
|
|
509
|
+
id: "cp865",
|
|
510
|
+
groupId: "nordic",
|
|
511
|
+
isDetectable: !0,
|
|
512
|
+
textDecoderId: null,
|
|
513
|
+
iconvLiteDecoderId: "cp865"
|
|
514
|
+
},
|
|
515
|
+
cp869: {
|
|
516
|
+
id: "cp869",
|
|
517
|
+
groupId: "greek",
|
|
518
|
+
isDetectable: !0,
|
|
519
|
+
textDecoderId: null,
|
|
520
|
+
iconvLiteDecoderId: "cp869"
|
|
521
|
+
},
|
|
522
|
+
cp874: {
|
|
523
|
+
id: "cp874",
|
|
524
|
+
groupId: "thai",
|
|
525
|
+
isDetectable: !0,
|
|
526
|
+
textDecoderId: "windows-874",
|
|
527
|
+
iconvLiteDecoderId: "windows874"
|
|
528
|
+
},
|
|
529
|
+
cp875: {
|
|
530
|
+
id: "cp875",
|
|
531
|
+
groupId: "greek",
|
|
532
|
+
isDetectable: !0,
|
|
533
|
+
textDecoderId: null,
|
|
534
|
+
iconvLiteDecoderId: null
|
|
535
|
+
},
|
|
536
|
+
cp922: {
|
|
537
|
+
id: "cp922",
|
|
538
|
+
groupId: "baltic",
|
|
539
|
+
isDetectable: !1,
|
|
540
|
+
textDecoderId: null,
|
|
541
|
+
iconvLiteDecoderId: "cp922"
|
|
542
|
+
},
|
|
543
|
+
cp932: {
|
|
544
|
+
id: "cp932",
|
|
545
|
+
groupId: "japanese",
|
|
546
|
+
isDetectable: !0,
|
|
547
|
+
textDecoderId: "shift_jis",
|
|
548
|
+
iconvLiteDecoderId: "shiftjis"
|
|
549
|
+
},
|
|
550
|
+
cp936: {
|
|
551
|
+
id: "cp936",
|
|
552
|
+
groupId: "chineseSimplified",
|
|
553
|
+
isDetectable: !1,
|
|
554
|
+
textDecoderId: null,
|
|
555
|
+
iconvLiteDecoderId: "cp936"
|
|
556
|
+
},
|
|
557
|
+
cp949: {
|
|
558
|
+
id: "cp949",
|
|
559
|
+
groupId: "korean",
|
|
560
|
+
isDetectable: !0,
|
|
561
|
+
textDecoderId: "euc-kr",
|
|
562
|
+
iconvLiteDecoderId: "cp949"
|
|
563
|
+
},
|
|
564
|
+
cp950: {
|
|
565
|
+
id: "cp950",
|
|
566
|
+
groupId: "chineseTraditional",
|
|
567
|
+
isDetectable: !1,
|
|
568
|
+
textDecoderId: null,
|
|
569
|
+
iconvLiteDecoderId: "cp950"
|
|
570
|
+
},
|
|
571
|
+
cp1006: {
|
|
572
|
+
id: "cp1006",
|
|
573
|
+
groupId: "arabic",
|
|
574
|
+
isDetectable: !0,
|
|
575
|
+
textDecoderId: null,
|
|
576
|
+
iconvLiteDecoderId: null
|
|
577
|
+
},
|
|
578
|
+
cp1026: {
|
|
579
|
+
id: "cp1026",
|
|
580
|
+
groupId: "turkish",
|
|
581
|
+
isDetectable: !0,
|
|
582
|
+
textDecoderId: null,
|
|
583
|
+
iconvLiteDecoderId: null
|
|
584
|
+
},
|
|
585
|
+
cp1046: {
|
|
586
|
+
id: "cp1046",
|
|
587
|
+
groupId: "arabic",
|
|
588
|
+
isDetectable: !1,
|
|
589
|
+
textDecoderId: null,
|
|
590
|
+
iconvLiteDecoderId: "cp1046"
|
|
591
|
+
},
|
|
592
|
+
cp1124: {
|
|
593
|
+
id: "cp1124",
|
|
594
|
+
groupId: "cyrillic",
|
|
595
|
+
isDetectable: !1,
|
|
596
|
+
textDecoderId: null,
|
|
597
|
+
iconvLiteDecoderId: "cp1124"
|
|
598
|
+
},
|
|
599
|
+
cp1125: {
|
|
600
|
+
id: "cp1125",
|
|
601
|
+
groupId: "cyrillic",
|
|
602
|
+
isDetectable: !0,
|
|
603
|
+
textDecoderId: null,
|
|
604
|
+
iconvLiteDecoderId: "cp1125"
|
|
605
|
+
},
|
|
606
|
+
cp1129: {
|
|
607
|
+
id: "cp1129",
|
|
608
|
+
groupId: "vietnamese",
|
|
609
|
+
isDetectable: !1,
|
|
610
|
+
textDecoderId: null,
|
|
611
|
+
iconvLiteDecoderId: "cp1129"
|
|
612
|
+
},
|
|
613
|
+
cp1133: {
|
|
614
|
+
id: "cp1133",
|
|
615
|
+
groupId: "lao",
|
|
616
|
+
isDetectable: !1,
|
|
617
|
+
textDecoderId: null,
|
|
618
|
+
iconvLiteDecoderId: "cp1133"
|
|
619
|
+
},
|
|
620
|
+
cp1140: {
|
|
621
|
+
id: "cp1140",
|
|
622
|
+
groupId: "western",
|
|
623
|
+
isDetectable: !0,
|
|
624
|
+
textDecoderId: null,
|
|
625
|
+
iconvLiteDecoderId: null
|
|
626
|
+
},
|
|
627
|
+
cp1161: {
|
|
628
|
+
id: "cp1161",
|
|
629
|
+
groupId: "thai",
|
|
630
|
+
isDetectable: !1,
|
|
631
|
+
textDecoderId: null,
|
|
632
|
+
iconvLiteDecoderId: "cp1161"
|
|
633
|
+
},
|
|
634
|
+
cp1162: {
|
|
635
|
+
id: "cp1162",
|
|
636
|
+
groupId: "thai",
|
|
637
|
+
isDetectable: !1,
|
|
638
|
+
textDecoderId: null,
|
|
639
|
+
iconvLiteDecoderId: "cp1162"
|
|
640
|
+
},
|
|
641
|
+
cp1163: {
|
|
642
|
+
id: "cp1163",
|
|
643
|
+
groupId: "vietnamese",
|
|
644
|
+
isDetectable: !1,
|
|
645
|
+
textDecoderId: null,
|
|
646
|
+
iconvLiteDecoderId: "cp1163"
|
|
647
|
+
},
|
|
648
|
+
cp1258: {
|
|
649
|
+
id: "cp1258",
|
|
650
|
+
groupId: "vietnamese",
|
|
651
|
+
isDetectable: !0,
|
|
652
|
+
textDecoderId: "windows-1258",
|
|
653
|
+
iconvLiteDecoderId: "windows1258"
|
|
654
|
+
},
|
|
655
|
+
"euc-jp": {
|
|
656
|
+
id: "euc-jp",
|
|
657
|
+
groupId: "japanese",
|
|
658
|
+
isDetectable: !0,
|
|
659
|
+
textDecoderId: "euc-jp",
|
|
660
|
+
iconvLiteDecoderId: "eucjp"
|
|
661
|
+
},
|
|
662
|
+
"euc-kr": {
|
|
663
|
+
id: "euc-kr",
|
|
664
|
+
groupId: "korean",
|
|
665
|
+
isDetectable: !0,
|
|
666
|
+
textDecoderId: "euc-kr",
|
|
667
|
+
iconvLiteDecoderId: "cp949"
|
|
668
|
+
},
|
|
669
|
+
gb18030: {
|
|
670
|
+
id: "gb18030",
|
|
671
|
+
groupId: "chineseSimplified",
|
|
672
|
+
isDetectable: !0,
|
|
673
|
+
textDecoderId: "gb18030",
|
|
674
|
+
iconvLiteDecoderId: "gb18030"
|
|
675
|
+
},
|
|
676
|
+
gbk: {
|
|
677
|
+
id: "gbk",
|
|
678
|
+
groupId: "chineseSimplified",
|
|
679
|
+
isDetectable: !1,
|
|
680
|
+
textDecoderId: "gbk",
|
|
681
|
+
iconvLiteDecoderId: "gbk"
|
|
682
|
+
},
|
|
683
|
+
"georgian-academy": {
|
|
684
|
+
id: "georgian-academy",
|
|
685
|
+
groupId: "georgian",
|
|
686
|
+
isDetectable: !1,
|
|
687
|
+
textDecoderId: null,
|
|
688
|
+
iconvLiteDecoderId: "georgianacademy"
|
|
689
|
+
},
|
|
690
|
+
"georgian-ps": {
|
|
691
|
+
id: "georgian-ps",
|
|
692
|
+
groupId: "georgian",
|
|
693
|
+
isDetectable: !1,
|
|
694
|
+
textDecoderId: null,
|
|
695
|
+
iconvLiteDecoderId: "georgianps"
|
|
696
|
+
},
|
|
697
|
+
"hp-roman8": {
|
|
698
|
+
id: "hp-roman8",
|
|
699
|
+
groupId: "western",
|
|
700
|
+
isDetectable: !0,
|
|
701
|
+
textDecoderId: null,
|
|
702
|
+
iconvLiteDecoderId: "hproman8"
|
|
703
|
+
},
|
|
704
|
+
"hz-gb-2312": {
|
|
705
|
+
id: "hz-gb-2312",
|
|
706
|
+
groupId: "chineseSimplified",
|
|
707
|
+
isDetectable: !0,
|
|
708
|
+
textDecoderId: null,
|
|
709
|
+
iconvLiteDecoderId: null
|
|
710
|
+
},
|
|
711
|
+
ibm855: {
|
|
712
|
+
id: "ibm855",
|
|
713
|
+
groupId: "cyrillic",
|
|
714
|
+
isDetectable: !0,
|
|
715
|
+
textDecoderId: null,
|
|
716
|
+
iconvLiteDecoderId: "cp855"
|
|
717
|
+
},
|
|
718
|
+
ibm866: {
|
|
719
|
+
id: "ibm866",
|
|
720
|
+
groupId: "cyrillic",
|
|
721
|
+
isDetectable: !0,
|
|
722
|
+
textDecoderId: "ibm866",
|
|
723
|
+
iconvLiteDecoderId: "cp866"
|
|
724
|
+
},
|
|
725
|
+
"iso-2022-jp": {
|
|
726
|
+
id: "iso-2022-jp",
|
|
727
|
+
groupId: "japanese",
|
|
728
|
+
isDetectable: !0,
|
|
729
|
+
textDecoderId: "iso-2022-jp",
|
|
730
|
+
iconvLiteDecoderId: null
|
|
731
|
+
},
|
|
732
|
+
"iso-2022-kr": {
|
|
733
|
+
id: "iso-2022-kr",
|
|
734
|
+
groupId: "korean",
|
|
735
|
+
isDetectable: !0,
|
|
736
|
+
textDecoderId: null,
|
|
737
|
+
iconvLiteDecoderId: null
|
|
738
|
+
},
|
|
739
|
+
"iso-8859-1": {
|
|
740
|
+
id: "iso-8859-1",
|
|
741
|
+
groupId: "western",
|
|
742
|
+
isDetectable: !0,
|
|
743
|
+
textDecoderId: "windows-1252",
|
|
744
|
+
iconvLiteDecoderId: "iso88591"
|
|
745
|
+
},
|
|
746
|
+
"iso-8859-2": {
|
|
747
|
+
id: "iso-8859-2",
|
|
748
|
+
groupId: "centralEuropean",
|
|
749
|
+
isDetectable: !0,
|
|
750
|
+
textDecoderId: "iso-8859-2",
|
|
751
|
+
iconvLiteDecoderId: "iso88592"
|
|
752
|
+
},
|
|
753
|
+
"iso-8859-5": {
|
|
754
|
+
id: "iso-8859-5",
|
|
755
|
+
groupId: "cyrillic",
|
|
756
|
+
isDetectable: !0,
|
|
757
|
+
textDecoderId: "iso-8859-5",
|
|
758
|
+
iconvLiteDecoderId: "iso88595"
|
|
759
|
+
},
|
|
760
|
+
"iso-8859-6": {
|
|
761
|
+
id: "iso-8859-6",
|
|
762
|
+
groupId: "arabic",
|
|
763
|
+
isDetectable: !0,
|
|
764
|
+
textDecoderId: "iso-8859-6",
|
|
765
|
+
iconvLiteDecoderId: "iso88596"
|
|
766
|
+
},
|
|
767
|
+
"iso-8859-7": {
|
|
768
|
+
id: "iso-8859-7",
|
|
769
|
+
groupId: "greek",
|
|
770
|
+
isDetectable: !0,
|
|
771
|
+
textDecoderId: "iso-8859-7",
|
|
772
|
+
iconvLiteDecoderId: "iso88597"
|
|
773
|
+
},
|
|
774
|
+
"iso-8859-8": {
|
|
775
|
+
id: "iso-8859-8",
|
|
776
|
+
groupId: "hebrew",
|
|
777
|
+
isDetectable: !0,
|
|
778
|
+
textDecoderId: "iso-8859-8-i",
|
|
779
|
+
iconvLiteDecoderId: "iso88598"
|
|
780
|
+
},
|
|
781
|
+
"iso-8859-9": {
|
|
782
|
+
id: "iso-8859-9",
|
|
783
|
+
groupId: "turkish",
|
|
784
|
+
isDetectable: !0,
|
|
785
|
+
textDecoderId: "windows-1254",
|
|
786
|
+
iconvLiteDecoderId: "iso88599"
|
|
787
|
+
},
|
|
788
|
+
"iso-8859-11": {
|
|
789
|
+
id: "iso-8859-11",
|
|
790
|
+
groupId: "thai",
|
|
791
|
+
isDetectable: !1,
|
|
792
|
+
textDecoderId: "windows-874",
|
|
793
|
+
iconvLiteDecoderId: "iso885911"
|
|
794
|
+
},
|
|
795
|
+
"iso-8859-13": {
|
|
796
|
+
id: "iso-8859-13",
|
|
797
|
+
groupId: "baltic",
|
|
798
|
+
isDetectable: !0,
|
|
799
|
+
textDecoderId: "iso-8859-13",
|
|
800
|
+
iconvLiteDecoderId: "iso885913"
|
|
801
|
+
},
|
|
802
|
+
"iso646-cn": {
|
|
803
|
+
id: "iso646-cn",
|
|
804
|
+
groupId: "chineseSimplified",
|
|
805
|
+
isDetectable: !1,
|
|
806
|
+
textDecoderId: null,
|
|
807
|
+
iconvLiteDecoderId: "iso646cn"
|
|
808
|
+
},
|
|
809
|
+
"iso646-jp": {
|
|
810
|
+
id: "iso646-jp",
|
|
811
|
+
groupId: "japanese",
|
|
812
|
+
isDetectable: !1,
|
|
813
|
+
textDecoderId: null,
|
|
814
|
+
iconvLiteDecoderId: "iso646jp"
|
|
815
|
+
},
|
|
816
|
+
iso2022_jp_2004: {
|
|
817
|
+
id: "iso2022_jp_2004",
|
|
818
|
+
groupId: "japanese",
|
|
819
|
+
isDetectable: !0,
|
|
820
|
+
textDecoderId: null,
|
|
821
|
+
iconvLiteDecoderId: null
|
|
822
|
+
},
|
|
823
|
+
iso2022_jp_ext: {
|
|
824
|
+
id: "iso2022_jp_ext",
|
|
825
|
+
groupId: "japanese",
|
|
826
|
+
isDetectable: !0,
|
|
827
|
+
textDecoderId: null,
|
|
828
|
+
iconvLiteDecoderId: null
|
|
829
|
+
},
|
|
830
|
+
"iso8859-3": {
|
|
831
|
+
id: "iso8859-3",
|
|
832
|
+
groupId: "southernEuropean",
|
|
833
|
+
isDetectable: !0,
|
|
834
|
+
textDecoderId: "iso-8859-3",
|
|
835
|
+
iconvLiteDecoderId: "iso88593"
|
|
836
|
+
},
|
|
837
|
+
"iso8859-4": {
|
|
838
|
+
id: "iso8859-4",
|
|
839
|
+
groupId: "baltic",
|
|
840
|
+
isDetectable: !0,
|
|
841
|
+
textDecoderId: "iso-8859-4",
|
|
842
|
+
iconvLiteDecoderId: "iso88594"
|
|
843
|
+
},
|
|
844
|
+
"iso8859-10": {
|
|
845
|
+
id: "iso8859-10",
|
|
846
|
+
groupId: "nordic",
|
|
847
|
+
isDetectable: !0,
|
|
848
|
+
textDecoderId: "iso-8859-10",
|
|
849
|
+
iconvLiteDecoderId: "iso885910"
|
|
850
|
+
},
|
|
851
|
+
"iso8859-14": {
|
|
852
|
+
id: "iso8859-14",
|
|
853
|
+
groupId: "celtic",
|
|
854
|
+
isDetectable: !0,
|
|
855
|
+
textDecoderId: "iso-8859-14",
|
|
856
|
+
iconvLiteDecoderId: "iso885914"
|
|
857
|
+
},
|
|
858
|
+
"iso8859-15": {
|
|
859
|
+
id: "iso8859-15",
|
|
860
|
+
groupId: "western",
|
|
861
|
+
isDetectable: !0,
|
|
862
|
+
textDecoderId: "iso-8859-15",
|
|
863
|
+
iconvLiteDecoderId: "iso885915"
|
|
864
|
+
},
|
|
865
|
+
"iso8859-16": {
|
|
866
|
+
id: "iso8859-16",
|
|
867
|
+
groupId: "southEasternEuropean",
|
|
868
|
+
isDetectable: !0,
|
|
869
|
+
textDecoderId: "iso-8859-16",
|
|
870
|
+
iconvLiteDecoderId: "iso885916"
|
|
871
|
+
},
|
|
872
|
+
johab: {
|
|
873
|
+
id: "johab",
|
|
874
|
+
groupId: "korean",
|
|
875
|
+
isDetectable: !0,
|
|
876
|
+
textDecoderId: null,
|
|
877
|
+
iconvLiteDecoderId: null
|
|
878
|
+
},
|
|
879
|
+
"koi8-r": {
|
|
880
|
+
id: "koi8-r",
|
|
881
|
+
groupId: "cyrillic",
|
|
882
|
+
isDetectable: !0,
|
|
883
|
+
textDecoderId: "koi8-r",
|
|
884
|
+
iconvLiteDecoderId: "koi8r"
|
|
885
|
+
},
|
|
886
|
+
"koi8-ru": {
|
|
887
|
+
id: "koi8-ru",
|
|
888
|
+
groupId: "cyrillic",
|
|
889
|
+
isDetectable: !1,
|
|
890
|
+
textDecoderId: "koi8-u",
|
|
891
|
+
iconvLiteDecoderId: "koi8ru"
|
|
892
|
+
},
|
|
893
|
+
"koi8-t": {
|
|
894
|
+
id: "koi8-t",
|
|
895
|
+
groupId: "cyrillic",
|
|
896
|
+
isDetectable: !0,
|
|
897
|
+
textDecoderId: null,
|
|
898
|
+
iconvLiteDecoderId: "koi8t"
|
|
899
|
+
},
|
|
900
|
+
"koi8-u": {
|
|
901
|
+
id: "koi8-u",
|
|
902
|
+
groupId: "cyrillic",
|
|
903
|
+
isDetectable: !0,
|
|
904
|
+
textDecoderId: "koi8-u",
|
|
905
|
+
iconvLiteDecoderId: "koi8u"
|
|
906
|
+
},
|
|
907
|
+
kz1048: {
|
|
908
|
+
id: "kz1048",
|
|
909
|
+
groupId: "cyrillic",
|
|
910
|
+
isDetectable: !0,
|
|
911
|
+
textDecoderId: null,
|
|
912
|
+
iconvLiteDecoderId: "rk1048"
|
|
913
|
+
},
|
|
914
|
+
maccroatian: {
|
|
915
|
+
id: "maccroatian",
|
|
916
|
+
groupId: "centralEuropean",
|
|
917
|
+
isDetectable: !1,
|
|
918
|
+
textDecoderId: null,
|
|
919
|
+
iconvLiteDecoderId: "maccroatian"
|
|
920
|
+
},
|
|
921
|
+
maccyrillic: {
|
|
922
|
+
id: "maccyrillic",
|
|
923
|
+
groupId: "cyrillic",
|
|
924
|
+
isDetectable: !0,
|
|
925
|
+
textDecoderId: "x-mac-cyrillic",
|
|
926
|
+
iconvLiteDecoderId: "maccyrillic"
|
|
927
|
+
},
|
|
928
|
+
macgreek: {
|
|
929
|
+
id: "macgreek",
|
|
930
|
+
groupId: "greek",
|
|
931
|
+
isDetectable: !0,
|
|
932
|
+
textDecoderId: null,
|
|
933
|
+
iconvLiteDecoderId: "macgreek"
|
|
934
|
+
},
|
|
935
|
+
maciceland: {
|
|
936
|
+
id: "maciceland",
|
|
937
|
+
groupId: "nordic",
|
|
938
|
+
isDetectable: !0,
|
|
939
|
+
textDecoderId: null,
|
|
940
|
+
iconvLiteDecoderId: "maciceland"
|
|
941
|
+
},
|
|
942
|
+
maclatin2: {
|
|
943
|
+
id: "maclatin2",
|
|
944
|
+
groupId: "centralEuropean",
|
|
945
|
+
isDetectable: !0,
|
|
946
|
+
textDecoderId: null,
|
|
947
|
+
iconvLiteDecoderId: "maccenteuro"
|
|
948
|
+
},
|
|
949
|
+
macroman: {
|
|
950
|
+
id: "macroman",
|
|
951
|
+
groupId: "western",
|
|
952
|
+
isDetectable: !0,
|
|
953
|
+
textDecoderId: "macintosh",
|
|
954
|
+
iconvLiteDecoderId: "macroman"
|
|
955
|
+
},
|
|
956
|
+
macromania: {
|
|
957
|
+
id: "macromania",
|
|
958
|
+
groupId: "southEasternEuropean",
|
|
959
|
+
isDetectable: !1,
|
|
960
|
+
textDecoderId: null,
|
|
961
|
+
iconvLiteDecoderId: "macromania"
|
|
962
|
+
},
|
|
963
|
+
macthai: {
|
|
964
|
+
id: "macthai",
|
|
965
|
+
groupId: "thai",
|
|
966
|
+
isDetectable: !1,
|
|
967
|
+
textDecoderId: null,
|
|
968
|
+
iconvLiteDecoderId: "macthai"
|
|
969
|
+
},
|
|
970
|
+
macturkish: {
|
|
971
|
+
id: "macturkish",
|
|
972
|
+
groupId: "turkish",
|
|
973
|
+
isDetectable: !0,
|
|
974
|
+
textDecoderId: null,
|
|
975
|
+
iconvLiteDecoderId: "macturkish"
|
|
976
|
+
},
|
|
977
|
+
macukraine: {
|
|
978
|
+
id: "macukraine",
|
|
979
|
+
groupId: "cyrillic",
|
|
980
|
+
isDetectable: !1,
|
|
981
|
+
textDecoderId: null,
|
|
982
|
+
iconvLiteDecoderId: "macukraine"
|
|
983
|
+
},
|
|
984
|
+
mik: {
|
|
985
|
+
id: "mik",
|
|
986
|
+
groupId: "cyrillic",
|
|
987
|
+
isDetectable: !1,
|
|
988
|
+
textDecoderId: null,
|
|
989
|
+
iconvLiteDecoderId: "mik"
|
|
990
|
+
},
|
|
991
|
+
ptcp154: {
|
|
992
|
+
id: "ptcp154",
|
|
993
|
+
groupId: "cyrillic",
|
|
994
|
+
isDetectable: !0,
|
|
995
|
+
textDecoderId: null,
|
|
996
|
+
iconvLiteDecoderId: "pt154"
|
|
997
|
+
},
|
|
998
|
+
shift_jis: {
|
|
999
|
+
id: "shift_jis",
|
|
1000
|
+
groupId: "japanese",
|
|
1001
|
+
isDetectable: !0,
|
|
1002
|
+
textDecoderId: "shift_jis",
|
|
1003
|
+
iconvLiteDecoderId: "shiftjis"
|
|
1004
|
+
},
|
|
1005
|
+
tcvn: {
|
|
1006
|
+
id: "tcvn",
|
|
1007
|
+
groupId: "vietnamese",
|
|
1008
|
+
isDetectable: !1,
|
|
1009
|
+
textDecoderId: null,
|
|
1010
|
+
iconvLiteDecoderId: "tcvn"
|
|
1011
|
+
},
|
|
1012
|
+
"tis-620": {
|
|
1013
|
+
id: "tis-620",
|
|
1014
|
+
groupId: "thai",
|
|
1015
|
+
isDetectable: !0,
|
|
1016
|
+
textDecoderId: "windows-874",
|
|
1017
|
+
iconvLiteDecoderId: "tis620"
|
|
1018
|
+
},
|
|
1019
|
+
"utf-7": {
|
|
1020
|
+
id: "utf-7",
|
|
1021
|
+
groupId: "unicode",
|
|
1022
|
+
isDetectable: !0,
|
|
1023
|
+
textDecoderId: null,
|
|
1024
|
+
iconvLiteDecoderId: "utf7"
|
|
1025
|
+
},
|
|
1026
|
+
"utf-8": {
|
|
1027
|
+
id: "utf-8",
|
|
1028
|
+
groupId: "unicode",
|
|
1029
|
+
isDetectable: !0,
|
|
1030
|
+
textDecoderId: "utf-8",
|
|
1031
|
+
iconvLiteDecoderId: "utf-8"
|
|
1032
|
+
},
|
|
1033
|
+
"utf-8-sig": {
|
|
1034
|
+
id: "utf-8-sig",
|
|
1035
|
+
groupId: "unicode",
|
|
1036
|
+
isDetectable: !0,
|
|
1037
|
+
textDecoderId: "utf-8",
|
|
1038
|
+
iconvLiteDecoderId: "utf-8"
|
|
1039
|
+
},
|
|
1040
|
+
"utf-16": {
|
|
1041
|
+
id: "utf-16",
|
|
1042
|
+
groupId: "unicode",
|
|
1043
|
+
isDetectable: !0,
|
|
1044
|
+
textDecoderId: null,
|
|
1045
|
+
iconvLiteDecoderId: "utf16"
|
|
1046
|
+
},
|
|
1047
|
+
"utf-16-be": {
|
|
1048
|
+
id: "utf-16-be",
|
|
1049
|
+
groupId: "unicode",
|
|
1050
|
+
isDetectable: !0,
|
|
1051
|
+
textDecoderId: "utf-16be",
|
|
1052
|
+
iconvLiteDecoderId: "utf16be"
|
|
1053
|
+
},
|
|
1054
|
+
"utf-16-le": {
|
|
1055
|
+
id: "utf-16-le",
|
|
1056
|
+
groupId: "unicode",
|
|
1057
|
+
isDetectable: !0,
|
|
1058
|
+
textDecoderId: "utf-16le",
|
|
1059
|
+
iconvLiteDecoderId: "utf16le"
|
|
1060
|
+
},
|
|
1061
|
+
"utf-32": {
|
|
1062
|
+
id: "utf-32",
|
|
1063
|
+
groupId: "unicode",
|
|
1064
|
+
isDetectable: !0,
|
|
1065
|
+
textDecoderId: null,
|
|
1066
|
+
iconvLiteDecoderId: "utf32"
|
|
1067
|
+
},
|
|
1068
|
+
"utf-32-be": {
|
|
1069
|
+
id: "utf-32-be",
|
|
1070
|
+
groupId: "unicode",
|
|
1071
|
+
isDetectable: !0,
|
|
1072
|
+
textDecoderId: null,
|
|
1073
|
+
iconvLiteDecoderId: "utf32be"
|
|
1074
|
+
},
|
|
1075
|
+
"utf-32-le": {
|
|
1076
|
+
id: "utf-32-le",
|
|
1077
|
+
groupId: "unicode",
|
|
1078
|
+
isDetectable: !0,
|
|
1079
|
+
textDecoderId: null,
|
|
1080
|
+
iconvLiteDecoderId: "utf32le"
|
|
1081
|
+
},
|
|
1082
|
+
viscii: {
|
|
1083
|
+
id: "viscii",
|
|
1084
|
+
groupId: "vietnamese",
|
|
1085
|
+
isDetectable: !1,
|
|
1086
|
+
textDecoderId: null,
|
|
1087
|
+
iconvLiteDecoderId: "viscii"
|
|
1088
|
+
},
|
|
1089
|
+
"windows-1250": {
|
|
1090
|
+
id: "windows-1250",
|
|
1091
|
+
groupId: "centralEuropean",
|
|
1092
|
+
isDetectable: !0,
|
|
1093
|
+
textDecoderId: "windows-1250",
|
|
1094
|
+
iconvLiteDecoderId: "windows1250"
|
|
1095
|
+
},
|
|
1096
|
+
"windows-1251": {
|
|
1097
|
+
id: "windows-1251",
|
|
1098
|
+
groupId: "cyrillic",
|
|
1099
|
+
isDetectable: !0,
|
|
1100
|
+
textDecoderId: "windows-1251",
|
|
1101
|
+
iconvLiteDecoderId: "windows1251"
|
|
1102
|
+
},
|
|
1103
|
+
"windows-1252": {
|
|
1104
|
+
id: "windows-1252",
|
|
1105
|
+
groupId: "western",
|
|
1106
|
+
isDetectable: !0,
|
|
1107
|
+
textDecoderId: "windows-1252",
|
|
1108
|
+
iconvLiteDecoderId: "windows1252"
|
|
1109
|
+
},
|
|
1110
|
+
"windows-1253": {
|
|
1111
|
+
id: "windows-1253",
|
|
1112
|
+
groupId: "greek",
|
|
1113
|
+
isDetectable: !0,
|
|
1114
|
+
textDecoderId: "windows-1253",
|
|
1115
|
+
iconvLiteDecoderId: "windows1253"
|
|
1116
|
+
},
|
|
1117
|
+
"windows-1254": {
|
|
1118
|
+
id: "windows-1254",
|
|
1119
|
+
groupId: "turkish",
|
|
1120
|
+
isDetectable: !0,
|
|
1121
|
+
textDecoderId: "windows-1254",
|
|
1122
|
+
iconvLiteDecoderId: "windows1254"
|
|
1123
|
+
},
|
|
1124
|
+
"windows-1255": {
|
|
1125
|
+
id: "windows-1255",
|
|
1126
|
+
groupId: "hebrew",
|
|
1127
|
+
isDetectable: !0,
|
|
1128
|
+
textDecoderId: "windows-1255",
|
|
1129
|
+
iconvLiteDecoderId: "windows1255"
|
|
1130
|
+
},
|
|
1131
|
+
"windows-1256": {
|
|
1132
|
+
id: "windows-1256",
|
|
1133
|
+
groupId: "arabic",
|
|
1134
|
+
isDetectable: !0,
|
|
1135
|
+
textDecoderId: "windows-1256",
|
|
1136
|
+
iconvLiteDecoderId: "windows1256"
|
|
1137
|
+
},
|
|
1138
|
+
"windows-1257": {
|
|
1139
|
+
id: "windows-1257",
|
|
1140
|
+
groupId: "baltic",
|
|
1141
|
+
isDetectable: !0,
|
|
1142
|
+
textDecoderId: "windows-1257",
|
|
1143
|
+
iconvLiteDecoderId: "windows1257"
|
|
1144
|
+
}
|
|
1145
|
+
};
|
|
1146
|
+
function ae(e) {
|
|
1147
|
+
return Object.hasOwn(x, e);
|
|
1148
|
+
}
|
|
1149
|
+
function oe(e) {
|
|
1150
|
+
return ae(e) ? x[e].textDecoderId ?? e : e;
|
|
1151
|
+
}
|
|
1152
|
+
function S(e) {
|
|
1153
|
+
try {
|
|
1154
|
+
e();
|
|
1155
|
+
} catch {}
|
|
1156
|
+
}
|
|
1157
|
+
_([
|
|
1158
|
+
"arrow",
|
|
1159
|
+
"avro",
|
|
1160
|
+
"dtv",
|
|
1161
|
+
"json",
|
|
1162
|
+
"jsonl",
|
|
1163
|
+
"markdown",
|
|
1164
|
+
"ods",
|
|
1165
|
+
"parquet",
|
|
1166
|
+
"sav",
|
|
1167
|
+
"sqlite",
|
|
1168
|
+
"xlsx",
|
|
1169
|
+
"xml"
|
|
1170
|
+
]), { ...b }, _(["list"]), { ...b }, _([
|
|
1171
|
+
"list",
|
|
1172
|
+
"render",
|
|
1173
|
+
"setColorMode"
|
|
1174
|
+
]), { ...b };
|
|
1175
|
+
// node_modules/@streamparser/json/dist/mjs/utils/bufferedString.js
|
|
1176
|
+
var C = class {
|
|
1177
|
+
constructor() {
|
|
1178
|
+
this.decoder = new TextDecoder("utf-8", { fatal: !0 }), this.pending = [], this.string = "", this.byteLength = 0;
|
|
1179
|
+
}
|
|
1180
|
+
appendChar(e) {
|
|
1181
|
+
this.pending.push(String.fromCharCode(e)), this.byteLength += 1;
|
|
1182
|
+
}
|
|
1183
|
+
appendBuf(e, t = 0, n = e.length) {
|
|
1184
|
+
this.pending.push(this.decoder.decode(e.subarray(t, n))), this.byteLength += n - t;
|
|
1185
|
+
}
|
|
1186
|
+
appendCharCode(e) {
|
|
1187
|
+
this.pending.push(String.fromCharCode(e));
|
|
1188
|
+
}
|
|
1189
|
+
reset() {
|
|
1190
|
+
this.pending = [], this.string = "", this.byteLength = 0;
|
|
1191
|
+
}
|
|
1192
|
+
toString() {
|
|
1193
|
+
return this.pending.length > 0 && (this.string += this.pending.join(""), this.pending = []), this.string;
|
|
1194
|
+
}
|
|
1195
|
+
}, w = class {
|
|
1196
|
+
constructor(e) {
|
|
1197
|
+
this.decoder = new TextDecoder("utf-8", { fatal: !0 }), this.bufferOffset = 0, this.string = "", this.byteLength = 0, this.buffer = new Uint8Array(e);
|
|
1198
|
+
}
|
|
1199
|
+
appendChar(e) {
|
|
1200
|
+
this.bufferOffset >= this.buffer.length && this.flushStringBuffer(), this.buffer[this.bufferOffset++] = e, this.byteLength += 1;
|
|
1201
|
+
}
|
|
1202
|
+
appendBuf(e, t = 0, n = e.length) {
|
|
1203
|
+
let r = n - t;
|
|
1204
|
+
this.bufferOffset + r > this.buffer.length && this.flushStringBuffer(), r > this.buffer.length ? (this.string += this.decoder.decode(e.subarray(t, n)), this.byteLength += r) : (this.buffer.set(e.subarray(t, n), this.bufferOffset), this.bufferOffset += r, this.byteLength += r);
|
|
1205
|
+
}
|
|
1206
|
+
appendCharCode(e) {
|
|
1207
|
+
this.flushStringBuffer(), this.string += String.fromCharCode(e);
|
|
1208
|
+
}
|
|
1209
|
+
flushStringBuffer() {
|
|
1210
|
+
this.string += this.decoder.decode(this.buffer.subarray(0, this.bufferOffset)), this.bufferOffset = 0;
|
|
1211
|
+
}
|
|
1212
|
+
reset() {
|
|
1213
|
+
this.string = "", this.bufferOffset = 0, this.byteLength = 0;
|
|
1214
|
+
}
|
|
1215
|
+
toString() {
|
|
1216
|
+
return this.flushStringBuffer(), this.string;
|
|
1217
|
+
}
|
|
1218
|
+
}, T;
|
|
1219
|
+
(function(e) {
|
|
1220
|
+
e[e.LEFT_BRACE = 0] = "LEFT_BRACE", e[e.RIGHT_BRACE = 1] = "RIGHT_BRACE", e[e.LEFT_BRACKET = 2] = "LEFT_BRACKET", e[e.RIGHT_BRACKET = 3] = "RIGHT_BRACKET", e[e.COLON = 4] = "COLON", e[e.COMMA = 5] = "COMMA", e[e.TRUE = 6] = "TRUE", e[e.FALSE = 7] = "FALSE", e[e.NULL = 8] = "NULL", e[e.STRING = 9] = "STRING", e[e.NUMBER = 10] = "NUMBER", e[e.SEPARATOR = 11] = "SEPARATOR";
|
|
1221
|
+
})(T ||= {});
|
|
1222
|
+
var E = T, se;
|
|
1223
|
+
(function(e) {
|
|
1224
|
+
e[e.BACKSPACE = 8] = "BACKSPACE", e[e.FORM_FEED = 12] = "FORM_FEED", e[e.NEWLINE = 10] = "NEWLINE", e[e.CARRIAGE_RETURN = 13] = "CARRIAGE_RETURN", e[e.TAB = 9] = "TAB", e[e.SPACE = 32] = "SPACE", e[e.EXCLAMATION_MARK = 33] = "EXCLAMATION_MARK", e[e.QUOTATION_MARK = 34] = "QUOTATION_MARK", e[e.NUMBER_SIGN = 35] = "NUMBER_SIGN", e[e.DOLLAR_SIGN = 36] = "DOLLAR_SIGN", e[e.PERCENT_SIGN = 37] = "PERCENT_SIGN", e[e.AMPERSAND = 38] = "AMPERSAND", e[e.APOSTROPHE = 39] = "APOSTROPHE", e[e.LEFT_PARENTHESIS = 40] = "LEFT_PARENTHESIS", e[e.RIGHT_PARENTHESIS = 41] = "RIGHT_PARENTHESIS", e[e.ASTERISK = 42] = "ASTERISK", e[e.PLUS_SIGN = 43] = "PLUS_SIGN", e[e.COMMA = 44] = "COMMA", e[e.HYPHEN_MINUS = 45] = "HYPHEN_MINUS", e[e.FULL_STOP = 46] = "FULL_STOP", e[e.SOLIDUS = 47] = "SOLIDUS", e[e.DIGIT_ZERO = 48] = "DIGIT_ZERO", e[e.DIGIT_ONE = 49] = "DIGIT_ONE", e[e.DIGIT_TWO = 50] = "DIGIT_TWO", e[e.DIGIT_THREE = 51] = "DIGIT_THREE", e[e.DIGIT_FOUR = 52] = "DIGIT_FOUR", e[e.DIGIT_FIVE = 53] = "DIGIT_FIVE", e[e.DIGIT_SIX = 54] = "DIGIT_SIX", e[e.DIGIT_SEVEN = 55] = "DIGIT_SEVEN", e[e.DIGIT_EIGHT = 56] = "DIGIT_EIGHT", e[e.DIGIT_NINE = 57] = "DIGIT_NINE", e[e.COLON = 58] = "COLON", e[e.SEMICOLON = 59] = "SEMICOLON", e[e.LESS_THAN_SIGN = 60] = "LESS_THAN_SIGN", e[e.EQUALS_SIGN = 61] = "EQUALS_SIGN", e[e.GREATER_THAN_SIGN = 62] = "GREATER_THAN_SIGN", e[e.QUESTION_MARK = 63] = "QUESTION_MARK", e[e.COMMERCIAL_AT = 64] = "COMMERCIAL_AT", e[e.LATIN_CAPITAL_LETTER_A = 65] = "LATIN_CAPITAL_LETTER_A", e[e.LATIN_CAPITAL_LETTER_B = 66] = "LATIN_CAPITAL_LETTER_B", e[e.LATIN_CAPITAL_LETTER_C = 67] = "LATIN_CAPITAL_LETTER_C", e[e.LATIN_CAPITAL_LETTER_D = 68] = "LATIN_CAPITAL_LETTER_D", e[e.LATIN_CAPITAL_LETTER_E = 69] = "LATIN_CAPITAL_LETTER_E", e[e.LATIN_CAPITAL_LETTER_F = 70] = "LATIN_CAPITAL_LETTER_F", e[e.LATIN_CAPITAL_LETTER_G = 71] = "LATIN_CAPITAL_LETTER_G", e[e.LATIN_CAPITAL_LETTER_H = 72] = "LATIN_CAPITAL_LETTER_H", e[e.LATIN_CAPITAL_LETTER_I = 73] = "LATIN_CAPITAL_LETTER_I", e[e.LATIN_CAPITAL_LETTER_J = 74] = "LATIN_CAPITAL_LETTER_J", e[e.LATIN_CAPITAL_LETTER_K = 75] = "LATIN_CAPITAL_LETTER_K", e[e.LATIN_CAPITAL_LETTER_L = 76] = "LATIN_CAPITAL_LETTER_L", e[e.LATIN_CAPITAL_LETTER_M = 77] = "LATIN_CAPITAL_LETTER_M", e[e.LATIN_CAPITAL_LETTER_N = 78] = "LATIN_CAPITAL_LETTER_N", e[e.LATIN_CAPITAL_LETTER_O = 79] = "LATIN_CAPITAL_LETTER_O", e[e.LATIN_CAPITAL_LETTER_P = 80] = "LATIN_CAPITAL_LETTER_P", e[e.LATIN_CAPITAL_LETTER_Q = 81] = "LATIN_CAPITAL_LETTER_Q", e[e.LATIN_CAPITAL_LETTER_R = 82] = "LATIN_CAPITAL_LETTER_R", e[e.LATIN_CAPITAL_LETTER_S = 83] = "LATIN_CAPITAL_LETTER_S", e[e.LATIN_CAPITAL_LETTER_T = 84] = "LATIN_CAPITAL_LETTER_T", e[e.LATIN_CAPITAL_LETTER_U = 85] = "LATIN_CAPITAL_LETTER_U", e[e.LATIN_CAPITAL_LETTER_V = 86] = "LATIN_CAPITAL_LETTER_V", e[e.LATIN_CAPITAL_LETTER_W = 87] = "LATIN_CAPITAL_LETTER_W", e[e.LATIN_CAPITAL_LETTER_X = 88] = "LATIN_CAPITAL_LETTER_X", e[e.LATIN_CAPITAL_LETTER_Y = 89] = "LATIN_CAPITAL_LETTER_Y", e[e.LATIN_CAPITAL_LETTER_Z = 90] = "LATIN_CAPITAL_LETTER_Z", e[e.LEFT_SQUARE_BRACKET = 91] = "LEFT_SQUARE_BRACKET", e[e.REVERSE_SOLIDUS = 92] = "REVERSE_SOLIDUS", e[e.RIGHT_SQUARE_BRACKET = 93] = "RIGHT_SQUARE_BRACKET", e[e.CIRCUMFLEX_ACCENT = 94] = "CIRCUMFLEX_ACCENT", e[e.LOW_LINE = 95] = "LOW_LINE", e[e.GRAVE_ACCENT = 96] = "GRAVE_ACCENT", e[e.LATIN_SMALL_LETTER_A = 97] = "LATIN_SMALL_LETTER_A", e[e.LATIN_SMALL_LETTER_B = 98] = "LATIN_SMALL_LETTER_B", e[e.LATIN_SMALL_LETTER_C = 99] = "LATIN_SMALL_LETTER_C", e[e.LATIN_SMALL_LETTER_D = 100] = "LATIN_SMALL_LETTER_D", e[e.LATIN_SMALL_LETTER_E = 101] = "LATIN_SMALL_LETTER_E", e[e.LATIN_SMALL_LETTER_F = 102] = "LATIN_SMALL_LETTER_F", e[e.LATIN_SMALL_LETTER_G = 103] = "LATIN_SMALL_LETTER_G", e[e.LATIN_SMALL_LETTER_H = 104] = "LATIN_SMALL_LETTER_H", e[e.LATIN_SMALL_LETTER_I = 105] = "LATIN_SMALL_LETTER_I", e[e.LATIN_SMALL_LETTER_J = 106] = "LATIN_SMALL_LETTER_J", e[e.LATIN_SMALL_LETTER_K = 107] = "LATIN_SMALL_LETTER_K", e[e.LATIN_SMALL_LETTER_L = 108] = "LATIN_SMALL_LETTER_L", e[e.LATIN_SMALL_LETTER_M = 109] = "LATIN_SMALL_LETTER_M", e[e.LATIN_SMALL_LETTER_N = 110] = "LATIN_SMALL_LETTER_N", e[e.LATIN_SMALL_LETTER_O = 111] = "LATIN_SMALL_LETTER_O", e[e.LATIN_SMALL_LETTER_P = 112] = "LATIN_SMALL_LETTER_P", e[e.LATIN_SMALL_LETTER_Q = 113] = "LATIN_SMALL_LETTER_Q", e[e.LATIN_SMALL_LETTER_R = 114] = "LATIN_SMALL_LETTER_R", e[e.LATIN_SMALL_LETTER_S = 115] = "LATIN_SMALL_LETTER_S", e[e.LATIN_SMALL_LETTER_T = 116] = "LATIN_SMALL_LETTER_T", e[e.LATIN_SMALL_LETTER_U = 117] = "LATIN_SMALL_LETTER_U", e[e.LATIN_SMALL_LETTER_V = 118] = "LATIN_SMALL_LETTER_V", e[e.LATIN_SMALL_LETTER_W = 119] = "LATIN_SMALL_LETTER_W", e[e.LATIN_SMALL_LETTER_X = 120] = "LATIN_SMALL_LETTER_X", e[e.LATIN_SMALL_LETTER_Y = 121] = "LATIN_SMALL_LETTER_Y", e[e.LATIN_SMALL_LETTER_Z = 122] = "LATIN_SMALL_LETTER_Z", e[e.LEFT_CURLY_BRACKET = 123] = "LEFT_CURLY_BRACKET", e[e.VERTICAL_LINE = 124] = "VERTICAL_LINE", e[e.RIGHT_CURLY_BRACKET = 125] = "RIGHT_CURLY_BRACKET", e[e.TILDE = 126] = "TILDE";
|
|
1225
|
+
})(se ||= {});
|
|
1226
|
+
var ce = {
|
|
1227
|
+
34: 34,
|
|
1228
|
+
92: 92,
|
|
1229
|
+
47: 47,
|
|
1230
|
+
98: 8,
|
|
1231
|
+
102: 12,
|
|
1232
|
+
110: 10,
|
|
1233
|
+
114: 13,
|
|
1234
|
+
116: 9
|
|
1235
|
+
}, le;
|
|
1236
|
+
(function(e) {
|
|
1237
|
+
e[e.START = 0] = "START", e[e.ENDED = 1] = "ENDED", e[e.ERROR = 2] = "ERROR", e[e.TRUE1 = 3] = "TRUE1", e[e.TRUE2 = 4] = "TRUE2", e[e.TRUE3 = 5] = "TRUE3", e[e.FALSE1 = 6] = "FALSE1", e[e.FALSE2 = 7] = "FALSE2", e[e.FALSE3 = 8] = "FALSE3", e[e.FALSE4 = 9] = "FALSE4", e[e.NULL1 = 10] = "NULL1", e[e.NULL2 = 11] = "NULL2", e[e.NULL3 = 12] = "NULL3", e[e.STRING_DEFAULT = 13] = "STRING_DEFAULT", e[e.STRING_AFTER_BACKSLASH = 14] = "STRING_AFTER_BACKSLASH", e[e.STRING_UNICODE_DIGIT_1 = 15] = "STRING_UNICODE_DIGIT_1", e[e.STRING_UNICODE_DIGIT_2 = 16] = "STRING_UNICODE_DIGIT_2", e[e.STRING_UNICODE_DIGIT_3 = 17] = "STRING_UNICODE_DIGIT_3", e[e.STRING_UNICODE_DIGIT_4 = 18] = "STRING_UNICODE_DIGIT_4", e[e.STRING_INCOMPLETE_CHAR = 19] = "STRING_INCOMPLETE_CHAR", e[e.NUMBER_AFTER_INITIAL_MINUS = 20] = "NUMBER_AFTER_INITIAL_MINUS", e[e.NUMBER_AFTER_INITIAL_ZERO = 21] = "NUMBER_AFTER_INITIAL_ZERO", e[e.NUMBER_AFTER_INITIAL_NON_ZERO = 22] = "NUMBER_AFTER_INITIAL_NON_ZERO", e[e.NUMBER_AFTER_FULL_STOP = 23] = "NUMBER_AFTER_FULL_STOP", e[e.NUMBER_AFTER_DECIMAL = 24] = "NUMBER_AFTER_DECIMAL", e[e.NUMBER_AFTER_E = 25] = "NUMBER_AFTER_E", e[e.NUMBER_AFTER_E_AND_SIGN = 26] = "NUMBER_AFTER_E_AND_SIGN", e[e.NUMBER_AFTER_E_AND_DIGIT = 27] = "NUMBER_AFTER_E_AND_DIGIT", e[e.SEPARATOR = 28] = "SEPARATOR", e[e.BOM_OR_START = 29] = "BOM_OR_START", e[e.BOM = 30] = "BOM";
|
|
1238
|
+
})(le ||= {});
|
|
1239
|
+
function D(e) {
|
|
1240
|
+
return (/* @__PURE__ */ "START.ENDED.ERROR.TRUE1.TRUE2.TRUE3.FALSE1.FALSE2.FALSE3.FALSE4.NULL1.NULL2.NULL3.STRING_DEFAULT.STRING_AFTER_BACKSLASH.STRING_UNICODE_DIGIT_1.STRING_UNICODE_DIGIT_2.STRING_UNICODE_DIGIT_3.STRING_UNICODE_DIGIT_4.STRING_INCOMPLETE_CHAR.NUMBER_AFTER_INITIAL_MINUS.NUMBER_AFTER_INITIAL_ZERO.NUMBER_AFTER_INITIAL_NON_ZERO.NUMBER_AFTER_FULL_STOP.NUMBER_AFTER_DECIMAL.NUMBER_AFTER_E.NUMBER_AFTER_E_AND_SIGN.NUMBER_AFTER_E_AND_DIGIT.SEPARATOR.BOM_OR_START.BOM".split("."))[e];
|
|
1241
|
+
}
|
|
1242
|
+
var ue = {
|
|
1243
|
+
stringBufferSize: 0,
|
|
1244
|
+
numberBufferSize: 0,
|
|
1245
|
+
separator: void 0,
|
|
1246
|
+
emitPartialTokens: !1
|
|
1247
|
+
}, O = class e extends Error {
|
|
1248
|
+
constructor(t) {
|
|
1249
|
+
super(t), Object.setPrototypeOf(this, e.prototype);
|
|
1250
|
+
}
|
|
1251
|
+
};
|
|
1252
|
+
function k(e, t) {
|
|
1253
|
+
if (t !== void 0 && (!Number.isInteger(t) || t < 0)) throw new O(`Invalid "${e}": ${t}. Expected a non-negative integer.`);
|
|
1254
|
+
}
|
|
1255
|
+
function A(e) {
|
|
1256
|
+
return e >= 194 && e <= 223 ? 2 : e <= 239 ? 3 : 4;
|
|
1257
|
+
}
|
|
1258
|
+
function de(e, t) {
|
|
1259
|
+
let n = t;
|
|
1260
|
+
for (; n < e.length && e[n] >= 128;) {
|
|
1261
|
+
let t = A(e[n]);
|
|
1262
|
+
if (n + t > e.length) break;
|
|
1263
|
+
n += t;
|
|
1264
|
+
}
|
|
1265
|
+
return n;
|
|
1266
|
+
}
|
|
1267
|
+
var fe = class {
|
|
1268
|
+
constructor(e) {
|
|
1269
|
+
this.state = 29, this.bomIndex = 0, this.separatorIndex = 0, this.escapedCharsByteLength = 0, this.bytes_remaining = 0, this.bytes_in_sequence = 0, this.char_split_buffer = /* @__PURE__ */ new Uint8Array(4), this.encoder = new TextEncoder(), this.offset = -1, this.streamByteLength = 0, e = Object.assign(Object.assign({}, ue), e), k("stringBufferSize", e.stringBufferSize), k("numberBufferSize", e.numberBufferSize), this.emitPartialTokens = e.emitPartialTokens === !0, this.bufferedString = e.stringBufferSize && e.stringBufferSize > 4 ? new w(e.stringBufferSize) : new C(), this.bufferedNumber = e.numberBufferSize && e.numberBufferSize > 0 ? new w(e.numberBufferSize) : new C(), this.separator = e.separator, this.separatorBytes = e.separator ? this.encoder.encode(e.separator) : void 0;
|
|
1270
|
+
}
|
|
1271
|
+
get isEnded() {
|
|
1272
|
+
return this.state === 1;
|
|
1273
|
+
}
|
|
1274
|
+
appendUnicodeCodeUnit(e) {
|
|
1275
|
+
if (this.highSurrogate !== void 0) {
|
|
1276
|
+
if (e >= 56320 && e <= 57343) {
|
|
1277
|
+
let t = String.fromCharCode(this.highSurrogate, e), n = this.encoder.encode(t);
|
|
1278
|
+
this.bufferedString.appendBuf(n), this.escapedCharsByteLength += 6 - n.byteLength, this.highSurrogate = void 0;
|
|
1279
|
+
return;
|
|
1280
|
+
}
|
|
1281
|
+
this.flushPendingHighSurrogate();
|
|
1282
|
+
}
|
|
1283
|
+
if (e >= 55296 && e <= 56319) {
|
|
1284
|
+
this.highSurrogate = e, this.escapedCharsByteLength += 6;
|
|
1285
|
+
return;
|
|
1286
|
+
}
|
|
1287
|
+
if (e >= 56320 && e <= 57343) {
|
|
1288
|
+
this.bufferedString.appendCharCode(e), this.escapedCharsByteLength += 6;
|
|
1289
|
+
return;
|
|
1290
|
+
}
|
|
1291
|
+
let t = String.fromCharCode(e), n = this.encoder.encode(t);
|
|
1292
|
+
this.bufferedString.appendBuf(n), this.escapedCharsByteLength += 6 - n.byteLength;
|
|
1293
|
+
}
|
|
1294
|
+
flushPendingHighSurrogate() {
|
|
1295
|
+
this.highSurrogate !== void 0 && (this.bufferedString.appendCharCode(this.highSurrogate), this.highSurrogate = void 0);
|
|
1296
|
+
}
|
|
1297
|
+
startIncompleteChar(e, t) {
|
|
1298
|
+
this.bytes_in_sequence = A(e[t]), this.bytes_remaining = t + this.bytes_in_sequence - e.length, this.char_split_buffer.set(e.subarray(t)), this.state = 19;
|
|
1299
|
+
}
|
|
1300
|
+
write(e) {
|
|
1301
|
+
try {
|
|
1302
|
+
let t;
|
|
1303
|
+
if (e instanceof Uint8Array) t = e;
|
|
1304
|
+
else if (typeof e == "string") {
|
|
1305
|
+
this.pendingStringSurrogate !== void 0 && (e = this.pendingStringSurrogate + e, this.pendingStringSurrogate = void 0);
|
|
1306
|
+
let n = e.charCodeAt(e.length - 1);
|
|
1307
|
+
n >= 55296 && n <= 56319 && (this.pendingStringSurrogate = e[e.length - 1], e = e.slice(0, -1)), t = this.encoder.encode(e);
|
|
1308
|
+
} else if (ArrayBuffer.isView(e)) t = new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
|
|
1309
|
+
else if (typeof e == "object" && e && typeof e[Symbol.iterator] == "function") t = Uint8Array.from(e);
|
|
1310
|
+
else throw TypeError("Unexpected type. The `write` function only accepts Iterables (e.g. Arrays, Sets, Generators), TypedArrays and Strings.");
|
|
1311
|
+
for (let n = 0; n < t.length; n += 1) {
|
|
1312
|
+
let r = t[n];
|
|
1313
|
+
switch (this.state) {
|
|
1314
|
+
case 29:
|
|
1315
|
+
if (r === 239) {
|
|
1316
|
+
this.bom = [
|
|
1317
|
+
239,
|
|
1318
|
+
187,
|
|
1319
|
+
191
|
|
1320
|
+
], this.bomIndex += 1, this.state = 30;
|
|
1321
|
+
continue;
|
|
1322
|
+
}
|
|
1323
|
+
if (e instanceof Uint16Array) {
|
|
1324
|
+
if (r === 254) {
|
|
1325
|
+
this.bom = [254, 255], this.bomIndex += 1, this.state = 30;
|
|
1326
|
+
continue;
|
|
1327
|
+
}
|
|
1328
|
+
if (r === 255) {
|
|
1329
|
+
this.bom = [255, 254], this.bomIndex += 1, this.state = 30;
|
|
1330
|
+
continue;
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
if (e instanceof Uint32Array) {
|
|
1334
|
+
if (r === 0) {
|
|
1335
|
+
this.bom = [
|
|
1336
|
+
0,
|
|
1337
|
+
0,
|
|
1338
|
+
254,
|
|
1339
|
+
255
|
|
1340
|
+
], this.bomIndex += 1, this.state = 30;
|
|
1341
|
+
continue;
|
|
1342
|
+
}
|
|
1343
|
+
if (r === 255) {
|
|
1344
|
+
this.bom = [
|
|
1345
|
+
255,
|
|
1346
|
+
254,
|
|
1347
|
+
0,
|
|
1348
|
+
0
|
|
1349
|
+
], this.bomIndex += 1, this.state = 30;
|
|
1350
|
+
continue;
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
case 0:
|
|
1354
|
+
if (this.offset += 1, this.separatorBytes && r === this.separatorBytes[0]) {
|
|
1355
|
+
if (this.separatorBytes.length === 1) {
|
|
1356
|
+
this.state = 0, this.onToken({
|
|
1357
|
+
token: E.SEPARATOR,
|
|
1358
|
+
value: this.separator,
|
|
1359
|
+
offset: this.offset + this.separatorBytes.length - 1
|
|
1360
|
+
});
|
|
1361
|
+
continue;
|
|
1362
|
+
}
|
|
1363
|
+
this.state = 28;
|
|
1364
|
+
continue;
|
|
1365
|
+
}
|
|
1366
|
+
if (r === 32 || r === 10 || r === 13 || r === 9) continue;
|
|
1367
|
+
if (r === 123) {
|
|
1368
|
+
this.onToken({
|
|
1369
|
+
token: E.LEFT_BRACE,
|
|
1370
|
+
value: "{",
|
|
1371
|
+
offset: this.offset
|
|
1372
|
+
});
|
|
1373
|
+
continue;
|
|
1374
|
+
}
|
|
1375
|
+
if (r === 125) {
|
|
1376
|
+
this.onToken({
|
|
1377
|
+
token: E.RIGHT_BRACE,
|
|
1378
|
+
value: "}",
|
|
1379
|
+
offset: this.offset
|
|
1380
|
+
});
|
|
1381
|
+
continue;
|
|
1382
|
+
}
|
|
1383
|
+
if (r === 91) {
|
|
1384
|
+
this.onToken({
|
|
1385
|
+
token: E.LEFT_BRACKET,
|
|
1386
|
+
value: "[",
|
|
1387
|
+
offset: this.offset
|
|
1388
|
+
});
|
|
1389
|
+
continue;
|
|
1390
|
+
}
|
|
1391
|
+
if (r === 93) {
|
|
1392
|
+
this.onToken({
|
|
1393
|
+
token: E.RIGHT_BRACKET,
|
|
1394
|
+
value: "]",
|
|
1395
|
+
offset: this.offset
|
|
1396
|
+
});
|
|
1397
|
+
continue;
|
|
1398
|
+
}
|
|
1399
|
+
if (r === 58) {
|
|
1400
|
+
this.onToken({
|
|
1401
|
+
token: E.COLON,
|
|
1402
|
+
value: ":",
|
|
1403
|
+
offset: this.offset
|
|
1404
|
+
});
|
|
1405
|
+
continue;
|
|
1406
|
+
}
|
|
1407
|
+
if (r === 44) {
|
|
1408
|
+
this.onToken({
|
|
1409
|
+
token: E.COMMA,
|
|
1410
|
+
value: ",",
|
|
1411
|
+
offset: this.offset
|
|
1412
|
+
});
|
|
1413
|
+
continue;
|
|
1414
|
+
}
|
|
1415
|
+
if (r === 116) {
|
|
1416
|
+
this.state = 3;
|
|
1417
|
+
continue;
|
|
1418
|
+
}
|
|
1419
|
+
if (r === 102) {
|
|
1420
|
+
this.state = 6;
|
|
1421
|
+
continue;
|
|
1422
|
+
}
|
|
1423
|
+
if (r === 110) {
|
|
1424
|
+
this.state = 10;
|
|
1425
|
+
continue;
|
|
1426
|
+
}
|
|
1427
|
+
if (r === 34) {
|
|
1428
|
+
this.bufferedString.reset(), this.escapedCharsByteLength = 0, this.state = 13;
|
|
1429
|
+
continue;
|
|
1430
|
+
}
|
|
1431
|
+
if (r >= 49 && r <= 57) {
|
|
1432
|
+
this.bufferedNumber.reset(), this.bufferedNumber.appendChar(r), this.state = 22;
|
|
1433
|
+
continue;
|
|
1434
|
+
}
|
|
1435
|
+
if (r === 48) {
|
|
1436
|
+
this.bufferedNumber.reset(), this.bufferedNumber.appendChar(r), this.state = 21;
|
|
1437
|
+
continue;
|
|
1438
|
+
}
|
|
1439
|
+
if (r === 45) {
|
|
1440
|
+
this.bufferedNumber.reset(), this.bufferedNumber.appendChar(r), this.state = 20;
|
|
1441
|
+
continue;
|
|
1442
|
+
}
|
|
1443
|
+
break;
|
|
1444
|
+
case 13:
|
|
1445
|
+
if (r === 34) {
|
|
1446
|
+
this.flushPendingHighSurrogate();
|
|
1447
|
+
let e = this.bufferedString.toString();
|
|
1448
|
+
this.state = 0, this.onToken({
|
|
1449
|
+
token: E.STRING,
|
|
1450
|
+
value: e,
|
|
1451
|
+
offset: this.offset
|
|
1452
|
+
}), this.offset += this.escapedCharsByteLength + this.bufferedString.byteLength + 1;
|
|
1453
|
+
continue;
|
|
1454
|
+
}
|
|
1455
|
+
if (r === 92) {
|
|
1456
|
+
this.state = 14;
|
|
1457
|
+
continue;
|
|
1458
|
+
}
|
|
1459
|
+
if (r >= 128) {
|
|
1460
|
+
this.flushPendingHighSurrogate();
|
|
1461
|
+
let e = de(t, n);
|
|
1462
|
+
e > n && (this.bufferedString.appendBuf(t, n, e), n = e - 1), e < t.length && t[e] >= 128 && (this.startIncompleteChar(t, e), n = t.length - 1);
|
|
1463
|
+
continue;
|
|
1464
|
+
}
|
|
1465
|
+
if (r >= 32) {
|
|
1466
|
+
this.flushPendingHighSurrogate();
|
|
1467
|
+
let e = n;
|
|
1468
|
+
for (; e < t.length;) {
|
|
1469
|
+
let n = t[e];
|
|
1470
|
+
if (n < 32 || n >= 128 || n === 34 || n === 92) break;
|
|
1471
|
+
e += 1;
|
|
1472
|
+
}
|
|
1473
|
+
if (e - n >= 16) this.bufferedString.appendBuf(t, n, e);
|
|
1474
|
+
else for (let r = n; r < e; r += 1) this.bufferedString.appendChar(t[r]);
|
|
1475
|
+
n = e - 1;
|
|
1476
|
+
continue;
|
|
1477
|
+
}
|
|
1478
|
+
break;
|
|
1479
|
+
case 19: {
|
|
1480
|
+
let e = Math.min(this.bytes_remaining, t.length - n);
|
|
1481
|
+
if (this.char_split_buffer.set(t.subarray(n, n + e), this.bytes_in_sequence - this.bytes_remaining), this.bytes_remaining -= e, this.bytes_remaining > 0) {
|
|
1482
|
+
n = t.length - 1;
|
|
1483
|
+
continue;
|
|
1484
|
+
}
|
|
1485
|
+
this.bufferedString.appendBuf(this.char_split_buffer, 0, this.bytes_in_sequence), n += e - 1, this.state = 13;
|
|
1486
|
+
continue;
|
|
1487
|
+
}
|
|
1488
|
+
case 14: {
|
|
1489
|
+
let e = ce[r];
|
|
1490
|
+
if (e) {
|
|
1491
|
+
this.flushPendingHighSurrogate(), this.bufferedString.appendChar(e), this.escapedCharsByteLength += 1, this.state = 13;
|
|
1492
|
+
continue;
|
|
1493
|
+
}
|
|
1494
|
+
if (r === 117) {
|
|
1495
|
+
this.unicode = "", this.state = 15;
|
|
1496
|
+
continue;
|
|
1497
|
+
}
|
|
1498
|
+
break;
|
|
1499
|
+
}
|
|
1500
|
+
case 15:
|
|
1501
|
+
case 16:
|
|
1502
|
+
case 17:
|
|
1503
|
+
if (r >= 48 && r <= 57 || r >= 65 && r <= 70 || r >= 97 && r <= 102) {
|
|
1504
|
+
this.unicode += String.fromCharCode(r), this.state += 1;
|
|
1505
|
+
continue;
|
|
1506
|
+
}
|
|
1507
|
+
break;
|
|
1508
|
+
case 18:
|
|
1509
|
+
if (r >= 48 && r <= 57 || r >= 65 && r <= 70 || r >= 97 && r <= 102) {
|
|
1510
|
+
let e = parseInt(this.unicode + String.fromCharCode(r), 16);
|
|
1511
|
+
this.appendUnicodeCodeUnit(e), this.state = 13;
|
|
1512
|
+
continue;
|
|
1513
|
+
}
|
|
1514
|
+
break;
|
|
1515
|
+
case 20:
|
|
1516
|
+
if (r === 48) {
|
|
1517
|
+
this.bufferedNumber.appendChar(r), this.state = 21;
|
|
1518
|
+
continue;
|
|
1519
|
+
}
|
|
1520
|
+
if (r >= 49 && r <= 57) {
|
|
1521
|
+
this.bufferedNumber.appendChar(r), this.state = 22;
|
|
1522
|
+
continue;
|
|
1523
|
+
}
|
|
1524
|
+
break;
|
|
1525
|
+
case 21:
|
|
1526
|
+
if (r === 46) {
|
|
1527
|
+
this.bufferedNumber.appendChar(r), this.state = 23;
|
|
1528
|
+
continue;
|
|
1529
|
+
}
|
|
1530
|
+
if (r === 101 || r === 69) {
|
|
1531
|
+
this.bufferedNumber.appendChar(r), this.state = 25;
|
|
1532
|
+
continue;
|
|
1533
|
+
}
|
|
1534
|
+
--n, this.state = 0, this.emitNumber();
|
|
1535
|
+
continue;
|
|
1536
|
+
case 22:
|
|
1537
|
+
if (r >= 48 && r <= 57) {
|
|
1538
|
+
this.bufferedNumber.appendChar(r);
|
|
1539
|
+
continue;
|
|
1540
|
+
}
|
|
1541
|
+
if (r === 46) {
|
|
1542
|
+
this.bufferedNumber.appendChar(r), this.state = 23;
|
|
1543
|
+
continue;
|
|
1544
|
+
}
|
|
1545
|
+
if (r === 101 || r === 69) {
|
|
1546
|
+
this.bufferedNumber.appendChar(r), this.state = 25;
|
|
1547
|
+
continue;
|
|
1548
|
+
}
|
|
1549
|
+
--n, this.state = 0, this.emitNumber();
|
|
1550
|
+
continue;
|
|
1551
|
+
case 23:
|
|
1552
|
+
if (r >= 48 && r <= 57) {
|
|
1553
|
+
this.bufferedNumber.appendChar(r), this.state = 24;
|
|
1554
|
+
continue;
|
|
1555
|
+
}
|
|
1556
|
+
break;
|
|
1557
|
+
case 24:
|
|
1558
|
+
if (r >= 48 && r <= 57) {
|
|
1559
|
+
this.bufferedNumber.appendChar(r);
|
|
1560
|
+
continue;
|
|
1561
|
+
}
|
|
1562
|
+
if (r === 101 || r === 69) {
|
|
1563
|
+
this.bufferedNumber.appendChar(r), this.state = 25;
|
|
1564
|
+
continue;
|
|
1565
|
+
}
|
|
1566
|
+
--n, this.state = 0, this.emitNumber();
|
|
1567
|
+
continue;
|
|
1568
|
+
case 25: if (r === 43 || r === 45) {
|
|
1569
|
+
this.bufferedNumber.appendChar(r), this.state = 26;
|
|
1570
|
+
continue;
|
|
1571
|
+
}
|
|
1572
|
+
case 26:
|
|
1573
|
+
if (r >= 48 && r <= 57) {
|
|
1574
|
+
this.bufferedNumber.appendChar(r), this.state = 27;
|
|
1575
|
+
continue;
|
|
1576
|
+
}
|
|
1577
|
+
break;
|
|
1578
|
+
case 27:
|
|
1579
|
+
if (r >= 48 && r <= 57) {
|
|
1580
|
+
this.bufferedNumber.appendChar(r);
|
|
1581
|
+
continue;
|
|
1582
|
+
}
|
|
1583
|
+
--n, this.state = 0, this.emitNumber();
|
|
1584
|
+
continue;
|
|
1585
|
+
case 3:
|
|
1586
|
+
if (r === 114) {
|
|
1587
|
+
this.state = 4;
|
|
1588
|
+
continue;
|
|
1589
|
+
}
|
|
1590
|
+
break;
|
|
1591
|
+
case 4:
|
|
1592
|
+
if (r === 117) {
|
|
1593
|
+
this.state = 5;
|
|
1594
|
+
continue;
|
|
1595
|
+
}
|
|
1596
|
+
break;
|
|
1597
|
+
case 5:
|
|
1598
|
+
if (r === 101) {
|
|
1599
|
+
this.state = 0, this.onToken({
|
|
1600
|
+
token: E.TRUE,
|
|
1601
|
+
value: !0,
|
|
1602
|
+
offset: this.offset
|
|
1603
|
+
}), this.offset += 3;
|
|
1604
|
+
continue;
|
|
1605
|
+
}
|
|
1606
|
+
break;
|
|
1607
|
+
case 6:
|
|
1608
|
+
if (r === 97) {
|
|
1609
|
+
this.state = 7;
|
|
1610
|
+
continue;
|
|
1611
|
+
}
|
|
1612
|
+
break;
|
|
1613
|
+
case 7:
|
|
1614
|
+
if (r === 108) {
|
|
1615
|
+
this.state = 8;
|
|
1616
|
+
continue;
|
|
1617
|
+
}
|
|
1618
|
+
break;
|
|
1619
|
+
case 8:
|
|
1620
|
+
if (r === 115) {
|
|
1621
|
+
this.state = 9;
|
|
1622
|
+
continue;
|
|
1623
|
+
}
|
|
1624
|
+
break;
|
|
1625
|
+
case 9:
|
|
1626
|
+
if (r === 101) {
|
|
1627
|
+
this.state = 0, this.onToken({
|
|
1628
|
+
token: E.FALSE,
|
|
1629
|
+
value: !1,
|
|
1630
|
+
offset: this.offset
|
|
1631
|
+
}), this.offset += 4;
|
|
1632
|
+
continue;
|
|
1633
|
+
}
|
|
1634
|
+
break;
|
|
1635
|
+
case 10:
|
|
1636
|
+
if (r === 117) {
|
|
1637
|
+
this.state = 11;
|
|
1638
|
+
continue;
|
|
1639
|
+
}
|
|
1640
|
+
break;
|
|
1641
|
+
case 11:
|
|
1642
|
+
if (r === 108) {
|
|
1643
|
+
this.state = 12;
|
|
1644
|
+
continue;
|
|
1645
|
+
}
|
|
1646
|
+
break;
|
|
1647
|
+
case 12:
|
|
1648
|
+
if (r === 108) {
|
|
1649
|
+
this.state = 0, this.onToken({
|
|
1650
|
+
token: E.NULL,
|
|
1651
|
+
value: null,
|
|
1652
|
+
offset: this.offset
|
|
1653
|
+
}), this.offset += 3;
|
|
1654
|
+
continue;
|
|
1655
|
+
}
|
|
1656
|
+
break;
|
|
1657
|
+
case 28:
|
|
1658
|
+
if (this.separatorIndex += 1, !this.separatorBytes || r !== this.separatorBytes[this.separatorIndex]) break;
|
|
1659
|
+
this.separatorIndex === this.separatorBytes.length - 1 && (this.state = 0, this.onToken({
|
|
1660
|
+
token: E.SEPARATOR,
|
|
1661
|
+
value: this.separator,
|
|
1662
|
+
offset: this.offset + this.separatorIndex
|
|
1663
|
+
}), this.separatorIndex = 0);
|
|
1664
|
+
continue;
|
|
1665
|
+
case 30:
|
|
1666
|
+
if (r === this.bom[this.bomIndex]) {
|
|
1667
|
+
if (this.bomIndex === this.bom.length - 1) {
|
|
1668
|
+
this.state = 0, this.bom = void 0, this.bomIndex = 0;
|
|
1669
|
+
continue;
|
|
1670
|
+
}
|
|
1671
|
+
this.bomIndex += 1;
|
|
1672
|
+
continue;
|
|
1673
|
+
}
|
|
1674
|
+
break;
|
|
1675
|
+
case 1: if (r === 32 || r === 10 || r === 13 || r === 9) continue;
|
|
1676
|
+
}
|
|
1677
|
+
throw new O(`Unexpected "${String.fromCharCode(r)}" at chunk position "${n}" (absolute position "${this.streamByteLength + n}") in state ${D(this.state)}`);
|
|
1678
|
+
}
|
|
1679
|
+
if (this.streamByteLength += t.length, this.emitPartialTokens) switch (this.state) {
|
|
1680
|
+
case 3:
|
|
1681
|
+
case 4:
|
|
1682
|
+
case 5:
|
|
1683
|
+
this.onToken({
|
|
1684
|
+
token: E.TRUE,
|
|
1685
|
+
value: !0,
|
|
1686
|
+
offset: this.offset,
|
|
1687
|
+
partial: !0
|
|
1688
|
+
});
|
|
1689
|
+
break;
|
|
1690
|
+
case 6:
|
|
1691
|
+
case 7:
|
|
1692
|
+
case 8:
|
|
1693
|
+
case 9:
|
|
1694
|
+
this.onToken({
|
|
1695
|
+
token: E.FALSE,
|
|
1696
|
+
value: !1,
|
|
1697
|
+
offset: this.offset,
|
|
1698
|
+
partial: !0
|
|
1699
|
+
});
|
|
1700
|
+
break;
|
|
1701
|
+
case 10:
|
|
1702
|
+
case 11:
|
|
1703
|
+
case 12:
|
|
1704
|
+
this.onToken({
|
|
1705
|
+
token: E.NULL,
|
|
1706
|
+
value: null,
|
|
1707
|
+
offset: this.offset,
|
|
1708
|
+
partial: !0
|
|
1709
|
+
});
|
|
1710
|
+
break;
|
|
1711
|
+
case 13: {
|
|
1712
|
+
let e = this.bufferedString.toString();
|
|
1713
|
+
this.onToken({
|
|
1714
|
+
token: E.STRING,
|
|
1715
|
+
value: e,
|
|
1716
|
+
offset: this.offset,
|
|
1717
|
+
partial: !0
|
|
1718
|
+
});
|
|
1719
|
+
break;
|
|
1720
|
+
}
|
|
1721
|
+
case 21:
|
|
1722
|
+
case 22:
|
|
1723
|
+
case 24:
|
|
1724
|
+
case 27: try {
|
|
1725
|
+
this.onToken({
|
|
1726
|
+
token: E.NUMBER,
|
|
1727
|
+
value: this.parseNumber(this.bufferedNumber.toString()),
|
|
1728
|
+
offset: this.offset,
|
|
1729
|
+
partial: !0
|
|
1730
|
+
});
|
|
1731
|
+
} catch {}
|
|
1732
|
+
}
|
|
1733
|
+
} catch (e) {
|
|
1734
|
+
this.error(e);
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
emitNumber() {
|
|
1738
|
+
this.onToken({
|
|
1739
|
+
token: E.NUMBER,
|
|
1740
|
+
value: this.parseNumber(this.bufferedNumber.toString()),
|
|
1741
|
+
offset: this.offset
|
|
1742
|
+
}), this.offset += this.bufferedNumber.byteLength - 1;
|
|
1743
|
+
}
|
|
1744
|
+
parseNumber(e) {
|
|
1745
|
+
return Number(e);
|
|
1746
|
+
}
|
|
1747
|
+
error(e) {
|
|
1748
|
+
this.state !== 1 && (this.state = 2), this.onError(e);
|
|
1749
|
+
}
|
|
1750
|
+
end() {
|
|
1751
|
+
switch (this.state) {
|
|
1752
|
+
case 21:
|
|
1753
|
+
case 22:
|
|
1754
|
+
case 24:
|
|
1755
|
+
case 27:
|
|
1756
|
+
this.state = 1, this.emitNumber(), this.onEnd();
|
|
1757
|
+
break;
|
|
1758
|
+
case 29:
|
|
1759
|
+
case 0:
|
|
1760
|
+
case 2:
|
|
1761
|
+
this.state = 1, this.onEnd();
|
|
1762
|
+
break;
|
|
1763
|
+
default: this.error(new O(`Tokenizer ended in the middle of a token (state: ${D(this.state)}). Either not all the data was received or the data was invalid.`));
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
onToken(e) {
|
|
1767
|
+
throw new O("Can't emit tokens before the \"onToken\" callback has been set up.");
|
|
1768
|
+
}
|
|
1769
|
+
onError(e) {
|
|
1770
|
+
throw e;
|
|
1771
|
+
}
|
|
1772
|
+
onEnd() {}
|
|
1773
|
+
}, pe;
|
|
1774
|
+
(function(e) {
|
|
1775
|
+
e[e.VALUE = 0] = "VALUE", e[e.KEY = 1] = "KEY", e[e.COLON = 2] = "COLON", e[e.COMMA = 3] = "COMMA", e[e.ENDED = 4] = "ENDED", e[e.ERROR = 5] = "ERROR", e[e.SEPARATOR = 6] = "SEPARATOR";
|
|
1776
|
+
})(pe ||= {});
|
|
1777
|
+
// node_modules/@streamparser/json/dist/mjs/utils/types/stackElement.js
|
|
1778
|
+
var me;
|
|
1779
|
+
(function(e) {
|
|
1780
|
+
e[e.OBJECT = 0] = "OBJECT", e[e.ARRAY = 1] = "ARRAY";
|
|
1781
|
+
})(me ||= {});
|
|
1782
|
+
// src/structureWalker.ts
|
|
1783
|
+
var j = [
|
|
1784
|
+
239,
|
|
1785
|
+
187,
|
|
1786
|
+
191
|
|
1787
|
+
], he = {
|
|
1788
|
+
[E.LEFT_BRACE]: (e, t, n) => {
|
|
1789
|
+
R(e, "object", n);
|
|
1790
|
+
},
|
|
1791
|
+
[E.RIGHT_BRACE]: (e, t, n) => {
|
|
1792
|
+
z(e, "object", n);
|
|
1793
|
+
},
|
|
1794
|
+
[E.LEFT_BRACKET]: (e, t, n) => {
|
|
1795
|
+
R(e, "list", n);
|
|
1796
|
+
},
|
|
1797
|
+
[E.RIGHT_BRACKET]: (e, t, n) => {
|
|
1798
|
+
z(e, "list", n);
|
|
1799
|
+
},
|
|
1800
|
+
[E.COLON]: (e, t, n) => {
|
|
1801
|
+
ge(e.state, n);
|
|
1802
|
+
},
|
|
1803
|
+
[E.COMMA]: (e, t, n) => {
|
|
1804
|
+
_e(e.state, n);
|
|
1805
|
+
},
|
|
1806
|
+
[E.TRUE]: (e, t, n) => {
|
|
1807
|
+
B(e, "boolean", !0, n);
|
|
1808
|
+
},
|
|
1809
|
+
[E.FALSE]: (e, t, n) => {
|
|
1810
|
+
B(e, "boolean", !1, n);
|
|
1811
|
+
},
|
|
1812
|
+
[E.NULL]: (e, t, n) => {
|
|
1813
|
+
B(e, "null", null, n);
|
|
1814
|
+
},
|
|
1815
|
+
[E.STRING]: (e, t, n) => {
|
|
1816
|
+
ve(e, t, n);
|
|
1817
|
+
},
|
|
1818
|
+
[E.NUMBER]: (e, t, n) => {
|
|
1819
|
+
B(e, "number", t, n);
|
|
1820
|
+
},
|
|
1821
|
+
[E.SEPARATOR]: () => {}
|
|
1822
|
+
};
|
|
1823
|
+
function M(e, t) {
|
|
1824
|
+
let n = new fe(e.isJsonLines ? { separator: "\n" } : void 0);
|
|
1825
|
+
Object.assign(n, { parseNumber: (e) => ({ numberText: e }) });
|
|
1826
|
+
let r = {
|
|
1827
|
+
byteCount: 0,
|
|
1828
|
+
byteOffset: 0,
|
|
1829
|
+
current: void 0,
|
|
1830
|
+
isFirstWrite: !0,
|
|
1831
|
+
isRootClosed: !1,
|
|
1832
|
+
isStarted: !1
|
|
1833
|
+
};
|
|
1834
|
+
if (e.isJsonLines || e.isStartInsideList) {
|
|
1835
|
+
let n = F({
|
|
1836
|
+
depth: 0,
|
|
1837
|
+
isVirtual: !0,
|
|
1838
|
+
key: void 0,
|
|
1839
|
+
kindId: "list",
|
|
1840
|
+
parent: void 0,
|
|
1841
|
+
path: e.rootPath,
|
|
1842
|
+
startOffset: e.baseOffset
|
|
1843
|
+
});
|
|
1844
|
+
n.childCount = e.firstItemIndex, n.positionId = !e.isJsonLines && e.firstItemIndex > 0 ? "afterComma" : "start", r.current = n, t.onContainerStart?.(n);
|
|
1845
|
+
}
|
|
1846
|
+
let i = {
|
|
1847
|
+
handlers: t,
|
|
1848
|
+
options: e,
|
|
1849
|
+
state: r
|
|
1850
|
+
};
|
|
1851
|
+
return n.onToken = ({ offset: n, token: a, value: o }) => {
|
|
1852
|
+
let s = e.baseOffset + r.byteOffset + n;
|
|
1853
|
+
r.isStarted = !0, t.onTokenStart?.(s), he[a](i, o, s);
|
|
1854
|
+
}, {
|
|
1855
|
+
end: () => {
|
|
1856
|
+
n.end(), !e.isJsonLines && !r.isStarted && I("The JSON is empty", e.baseOffset), r.current != null && !(e.isJsonLines && r.current.isVirtual) && I("The JSON ends before it is complete", e.baseOffset + r.byteCount), r.current != null && t.onContainerEnd?.(r.current, NaN);
|
|
1857
|
+
},
|
|
1858
|
+
write: (t) => {
|
|
1859
|
+
let i = t;
|
|
1860
|
+
r.byteCount += t.length, r.isFirstWrite && (r.isFirstWrite = !1, e.baseOffset === 0 && j.every((e, t) => i[t] === e) && (i = i.subarray(j.length), r.byteOffset = j.length)), n.write(i);
|
|
1861
|
+
}
|
|
1862
|
+
};
|
|
1863
|
+
}
|
|
1864
|
+
function N(e) {
|
|
1865
|
+
return typeof e == "object" && !!e && "numberText" in e;
|
|
1866
|
+
}
|
|
1867
|
+
function P(e) {
|
|
1868
|
+
return typeof e != "object" || !e ? JSON.stringify(e) : N(e) ? e.numberText : Array.isArray(e) ? `[${e.map((e) => P(e)).join(",")}]` : `{${Object.entries(e).map(([e, t]) => `${JSON.stringify(e)}:${P(t)}`).join(",")}}`;
|
|
1869
|
+
}
|
|
1870
|
+
function F(e) {
|
|
1871
|
+
return {
|
|
1872
|
+
...e,
|
|
1873
|
+
childCount: 0,
|
|
1874
|
+
pendingKey: void 0,
|
|
1875
|
+
positionId: "start"
|
|
1876
|
+
};
|
|
1877
|
+
}
|
|
1878
|
+
function I(e, t) {
|
|
1879
|
+
throw Error(`${e} at byte ${String(t)}.`);
|
|
1880
|
+
}
|
|
1881
|
+
function L(e, t, n) {
|
|
1882
|
+
let r = e.current;
|
|
1883
|
+
return r == null ? (e.isRootClosed && I("Unexpected content after the end of the JSON", n), { key: void 0 }) : r.kindId === "object" ? (r.positionId === "afterKey" ? I("Expected ':'", n) : r.positionId === "afterValue" ? I("Expected ',' or '}'", n) : r.positionId !== "afterColon" && I("Expected a key", n), r.positionId = "afterValue", r.childCount++, { key: r.pendingKey }) : (!(r.isVirtual && t.isJsonLines) && r.positionId === "afterValue" && I("Expected ','", n), r.positionId = "afterValue", { key: r.childCount++ });
|
|
1884
|
+
}
|
|
1885
|
+
function R({ handlers: e, options: t, state: n }, r, i) {
|
|
1886
|
+
let { key: a } = L(n, t, i), o = n.current, s = o == null ? t.rootPath : [...o.path, a ?? ""];
|
|
1887
|
+
n.current = F({
|
|
1888
|
+
depth: o == null ? 0 : o.depth + 1,
|
|
1889
|
+
isVirtual: !1,
|
|
1890
|
+
key: a,
|
|
1891
|
+
kindId: r,
|
|
1892
|
+
parent: o,
|
|
1893
|
+
path: s,
|
|
1894
|
+
startOffset: i
|
|
1895
|
+
}), e.onContainerStart?.(n.current);
|
|
1896
|
+
}
|
|
1897
|
+
function z({ handlers: e, state: t }, n, r) {
|
|
1898
|
+
let i = t.current, a = n === "object" ? "}" : "]";
|
|
1899
|
+
if (i?.kindId !== n || i.positionId !== "start" && i.positionId !== "afterValue") return I(`Unexpected '${a}'`, r);
|
|
1900
|
+
e.onContainerEnd?.(i, i.isVirtual ? r : r + 1), t.current = i.isVirtual ? void 0 : i.parent, t.current ?? (t.isRootClosed = !0);
|
|
1901
|
+
}
|
|
1902
|
+
function ge(e, t) {
|
|
1903
|
+
e.current?.positionId === "afterKey" ? e.current.positionId = "afterColon" : I("Unexpected ':'", t);
|
|
1904
|
+
}
|
|
1905
|
+
function _e(e, t) {
|
|
1906
|
+
e.current?.positionId === "afterValue" ? e.current.positionId = "afterComma" : I("Unexpected ','", t);
|
|
1907
|
+
}
|
|
1908
|
+
function ve(e, t, n) {
|
|
1909
|
+
let r = e.state.current;
|
|
1910
|
+
r?.kindId === "object" && (r.positionId === "start" || r.positionId === "afterComma") ? (r.pendingKey = t, r.positionId = "afterKey", e.handlers.onKey?.(r, t)) : B(e, "string", t, n);
|
|
1911
|
+
}
|
|
1912
|
+
function B({ handlers: e, options: t, state: n }, r, i, a) {
|
|
1913
|
+
let o = n.current, { key: s } = L(n, t, a);
|
|
1914
|
+
e.onScalar?.({
|
|
1915
|
+
key: s,
|
|
1916
|
+
kindId: r,
|
|
1917
|
+
parent: o,
|
|
1918
|
+
startOffset: a,
|
|
1919
|
+
value: i
|
|
1920
|
+
}), n.current ?? (n.isRootClosed = !0);
|
|
1921
|
+
}
|
|
1922
|
+
// src/itemRecords.ts
|
|
1923
|
+
var ye = "value";
|
|
1924
|
+
function V(e, t) {
|
|
1925
|
+
let n = [], r, i = !1, a = !1, o = (e, t, r) => {
|
|
1926
|
+
let i = n.at(-1);
|
|
1927
|
+
i?.container === e && (Array.isArray(i.value) ? i.value.push(r) : i.value[String(t)] = r);
|
|
1928
|
+
};
|
|
1929
|
+
return {
|
|
1930
|
+
handlers: {
|
|
1931
|
+
onContainerEnd: (e) => {
|
|
1932
|
+
e === r && (a = !0, r = void 0);
|
|
1933
|
+
let i = n.at(-1);
|
|
1934
|
+
if (i?.container !== e) return;
|
|
1935
|
+
n.pop();
|
|
1936
|
+
let s = n.at(-1);
|
|
1937
|
+
s == null ? t(i.value) : o(s.container, e.key, i.value);
|
|
1938
|
+
},
|
|
1939
|
+
onContainerStart: (t) => {
|
|
1940
|
+
let a = !i && K(t.path, e);
|
|
1941
|
+
a && (i = !0, r = t), (a && t.kindId === "object" || r != null && t.parent === r && r.kindId === "list" || n.length > 0) && n.push({
|
|
1942
|
+
container: t,
|
|
1943
|
+
value: t.kindId === "list" ? [] : be()
|
|
1944
|
+
});
|
|
1945
|
+
},
|
|
1946
|
+
onScalar: (s) => {
|
|
1947
|
+
let c = s.parent;
|
|
1948
|
+
if (c != null && n.length > 0) {
|
|
1949
|
+
o(c, s.key, s.value);
|
|
1950
|
+
return;
|
|
1951
|
+
}
|
|
1952
|
+
let l = c?.kindId === "list" && c === r, u = !i && K(c == null ? [] : [...c.path, s.key ?? ""], e);
|
|
1953
|
+
u && (i = !0, a = !0), (l || u) && t(s.value);
|
|
1954
|
+
}
|
|
1955
|
+
},
|
|
1956
|
+
isTargetClosed: () => a,
|
|
1957
|
+
isTargetFound: () => i
|
|
1958
|
+
};
|
|
1959
|
+
}
|
|
1960
|
+
function H(e) {
|
|
1961
|
+
let t = /* @__PURE__ */ new Map();
|
|
1962
|
+
if (!q(e)) return t.set(ye, e), t;
|
|
1963
|
+
let n = (e, r) => {
|
|
1964
|
+
for (let [i, a] of Object.entries(e)) {
|
|
1965
|
+
let e = r === "" ? i : `${r}.${i}`;
|
|
1966
|
+
q(a) && Object.keys(a).length > 0 ? n(a, e) : t.set(e, a);
|
|
1967
|
+
}
|
|
1968
|
+
};
|
|
1969
|
+
return n(e, ""), t;
|
|
1970
|
+
}
|
|
1971
|
+
function U(e) {
|
|
1972
|
+
let t = /* @__PURE__ */ new Map();
|
|
1973
|
+
for (let n of e) for (let e of n.keys()) t.has(e) || t.set(e, t.size);
|
|
1974
|
+
return {
|
|
1975
|
+
columnIndexes: t,
|
|
1976
|
+
columnNames: t.keys().toArray()
|
|
1977
|
+
};
|
|
1978
|
+
}
|
|
1979
|
+
function W(e) {
|
|
1980
|
+
return e.columnNames.map((e) => ({
|
|
1981
|
+
value: e,
|
|
1982
|
+
valueWasQuoted: !0
|
|
1983
|
+
}));
|
|
1984
|
+
}
|
|
1985
|
+
function G(e, t) {
|
|
1986
|
+
let n = t.columnNames.map(() => ({
|
|
1987
|
+
value: null,
|
|
1988
|
+
valueWasQuoted: !1
|
|
1989
|
+
})), r = !1;
|
|
1990
|
+
for (let [i, a] of e) {
|
|
1991
|
+
let e = t.columnIndexes.get(i);
|
|
1992
|
+
e == null ? r = !0 : n[e] = xe(a);
|
|
1993
|
+
}
|
|
1994
|
+
return {
|
|
1995
|
+
hasUnknownField: r,
|
|
1996
|
+
record: n
|
|
1997
|
+
};
|
|
1998
|
+
}
|
|
1999
|
+
function K(e, t) {
|
|
2000
|
+
return e.length === t.length && e.every((e, n) => e === t[n]);
|
|
2001
|
+
}
|
|
2002
|
+
function be() {
|
|
2003
|
+
return Object.create(null);
|
|
2004
|
+
}
|
|
2005
|
+
function q(e) {
|
|
2006
|
+
return typeof e == "object" && !!e && !Array.isArray(e) && !N(e);
|
|
2007
|
+
}
|
|
2008
|
+
function xe(e) {
|
|
2009
|
+
return e == null ? {
|
|
2010
|
+
value: null,
|
|
2011
|
+
valueWasQuoted: !1
|
|
2012
|
+
} : typeof e == "string" ? {
|
|
2013
|
+
value: e,
|
|
2014
|
+
valueWasQuoted: !0
|
|
2015
|
+
} : typeof e == "boolean" ? {
|
|
2016
|
+
value: String(e),
|
|
2017
|
+
valueWasQuoted: !1
|
|
2018
|
+
} : N(e) ? {
|
|
2019
|
+
value: e.numberText,
|
|
2020
|
+
valueWasQuoted: !1
|
|
2021
|
+
} : {
|
|
2022
|
+
value: P(e),
|
|
2023
|
+
valueWasQuoted: !0
|
|
2024
|
+
};
|
|
2025
|
+
}
|
|
2026
|
+
// src/index.ts
|
|
2027
|
+
var Se = 4, Ce = 200, we = 1e4, Te = 1e3, Ee = 1, De = 200, J = 10, Y = 1048576, X = /* @__PURE__ */ Error("Reading stopped once enough was known."), Oe = class {
|
|
2028
|
+
async buildStructureIndex(e, t) {
|
|
2029
|
+
let n = t.maxDepth ?? Se, r = /* @__PURE__ */ new Map(), i = [], a = (e) => e == null ? void 0 : r.get(e), o = (e, t, n, r) => {
|
|
2030
|
+
let i = a(e);
|
|
2031
|
+
typeof t == "number" && i?.node.kindId === "list" && (t % Te === 0 && i.node.checkpoints.push({
|
|
2032
|
+
itemIndex: t,
|
|
2033
|
+
offset: n
|
|
2034
|
+
}), r || (i.hasNonObjectItem = !0));
|
|
2035
|
+
}, s = (e) => e.depth > n ? !1 : e.parent == null || (e.parent.kindId !== "list" || typeof e.key == "number" && e.key < Ee) && r.has(e.parent), c = M(Z(t.dataFormatId), {
|
|
2036
|
+
onContainerEnd: (e, t) => {
|
|
2037
|
+
let n = r.get(e);
|
|
2038
|
+
n != null && (n.node.endOffset = t, n.node.childCount = e.childCount, n.node.isTableCandidate = n.node.kindId === "list" && e.childCount > 0 && !n.hasNonObjectItem, n.node.keys = n.keySet.values().toArray(), r.delete(e));
|
|
2039
|
+
},
|
|
2040
|
+
onContainerStart: (e) => {
|
|
2041
|
+
if (o(e.parent, e.key, e.startOffset, e.kindId === "object"), !s(e)) return;
|
|
2042
|
+
let t = {
|
|
2043
|
+
checkpoints: [],
|
|
2044
|
+
childCount: 0,
|
|
2045
|
+
endOffset: NaN,
|
|
2046
|
+
isTableCandidate: !1,
|
|
2047
|
+
keys: [],
|
|
2048
|
+
kindId: e.kindId,
|
|
2049
|
+
path: e.path,
|
|
2050
|
+
startOffset: e.startOffset
|
|
2051
|
+
};
|
|
2052
|
+
i.push(t), r.set(e, {
|
|
2053
|
+
hasNonObjectItem: !1,
|
|
2054
|
+
keySet: /* @__PURE__ */ new Set(),
|
|
2055
|
+
node: t
|
|
2056
|
+
});
|
|
2057
|
+
},
|
|
2058
|
+
onKey: (e, t) => {
|
|
2059
|
+
je(a(e), t);
|
|
2060
|
+
let n = a(e.parent);
|
|
2061
|
+
n?.node.kindId === "list" && je(n, t);
|
|
2062
|
+
},
|
|
2063
|
+
onScalar: (e) => {
|
|
2064
|
+
o(e.parent, e.key, e.startOffset, !1);
|
|
2065
|
+
}
|
|
2066
|
+
}), l = await Q(e, t.abortSignal, c, t.onProgress);
|
|
2067
|
+
for (let e of i) Number.isNaN(e.endOffset) && (e.endOffset = l);
|
|
2068
|
+
return {
|
|
2069
|
+
byteCount: l,
|
|
2070
|
+
nodes: i
|
|
2071
|
+
};
|
|
2072
|
+
}
|
|
2073
|
+
async listStructureEntries(e, t) {
|
|
2074
|
+
let n = t.maxValueLength ?? Ce, r = [], i = !1, a, o = t.dataFormatId === "jsonl" && t.path.length === 0, s = {
|
|
2075
|
+
baseOffset: t.startOffset,
|
|
2076
|
+
firstItemIndex: t.firstItemIndex ?? 0,
|
|
2077
|
+
isJsonLines: o,
|
|
2078
|
+
isStartInsideList: t.firstItemIndex != null,
|
|
2079
|
+
rootPath: t.path
|
|
2080
|
+
}, c = (e) => {
|
|
2081
|
+
if (r.length >= t.entryCount) throw i = !0, X;
|
|
2082
|
+
r.push(e);
|
|
2083
|
+
}, l = M(s, {
|
|
2084
|
+
onContainerEnd: (e, t) => {
|
|
2085
|
+
if (e.depth === 0) throw X;
|
|
2086
|
+
if (e.depth !== 1) return;
|
|
2087
|
+
let n = r.at(-1);
|
|
2088
|
+
n != null && (n.endOffset = t, n.childCount = e.childCount);
|
|
2089
|
+
},
|
|
2090
|
+
onContainerStart: (e) => {
|
|
2091
|
+
e.depth === 1 && c({
|
|
2092
|
+
childCount: 0,
|
|
2093
|
+
endOffset: NaN,
|
|
2094
|
+
isValueCut: !1,
|
|
2095
|
+
key: e.key ?? "",
|
|
2096
|
+
kindId: e.kindId,
|
|
2097
|
+
startOffset: e.startOffset,
|
|
2098
|
+
value: void 0
|
|
2099
|
+
});
|
|
2100
|
+
},
|
|
2101
|
+
onScalar: (e) => {
|
|
2102
|
+
if (e.parent?.depth !== 0) return;
|
|
2103
|
+
let t = Me(e.value), r = t != null && t.length > n;
|
|
2104
|
+
a = {
|
|
2105
|
+
childCount: void 0,
|
|
2106
|
+
endOffset: NaN,
|
|
2107
|
+
isValueCut: r,
|
|
2108
|
+
key: e.key ?? "",
|
|
2109
|
+
kindId: e.kindId,
|
|
2110
|
+
startOffset: e.startOffset,
|
|
2111
|
+
value: r ? t.slice(0, n) : t
|
|
2112
|
+
}, c(a);
|
|
2113
|
+
},
|
|
2114
|
+
onTokenStart: (e) => {
|
|
2115
|
+
a != null && (a.endOffset = e, a = void 0);
|
|
2116
|
+
}
|
|
2117
|
+
}), u = await Q(e, t.abortSignal, l, void 0);
|
|
2118
|
+
return a != null && (a.endOffset = t.startOffset + u), {
|
|
2119
|
+
entries: r,
|
|
2120
|
+
isMore: i
|
|
2121
|
+
};
|
|
2122
|
+
}
|
|
2123
|
+
async *parseStream(e, t) {
|
|
2124
|
+
t.abortSignal.throwIfAborted();
|
|
2125
|
+
let n = Math.max(1, Math.floor(t.chunkSize ?? we)), r = {
|
|
2126
|
+
isHeaderSent: !1,
|
|
2127
|
+
itemFields: [],
|
|
2128
|
+
nonUniformRecordCount: 0,
|
|
2129
|
+
recordCount: 0,
|
|
2130
|
+
shape: void 0
|
|
2131
|
+
}, i = V(t.structurePath ?? [], (e) => {
|
|
2132
|
+
r.itemFields.push(H(e));
|
|
2133
|
+
}), a = M(Z(t.dataFormatId), i.handlers), o = ke(t.encodingId), s = e.getReader(), c = () => {
|
|
2134
|
+
S(() => void s.cancel(t.abortSignal.reason));
|
|
2135
|
+
};
|
|
2136
|
+
t.abortSignal.addEventListener("abort", c, { once: !0 });
|
|
2137
|
+
let l = 0, u = 0;
|
|
2138
|
+
try {
|
|
2139
|
+
let e = await s.read();
|
|
2140
|
+
for (; !e.done && !i.isTargetClosed();) {
|
|
2141
|
+
l += e.value.length, u += Ae(e.value);
|
|
2142
|
+
for (let s = 0; s < e.value.length && !i.isTargetClosed(); s += Y) t.abortSignal.throwIfAborted(), a.write(o(e.value.subarray(s, s + Y), !1)), yield* $(r, n, !1);
|
|
2143
|
+
i.isTargetClosed() || (e = await s.read());
|
|
2144
|
+
}
|
|
2145
|
+
if (t.abortSignal.throwIfAborted(), i.isTargetClosed() || (a.write(o(/* @__PURE__ */ new Uint8Array(), !0)), a.end()), !i.isTargetFound()) throw Error(`Nothing found at ${Ne(t.structurePath ?? [])}.`);
|
|
2146
|
+
return yield* $(r, n, !0), {
|
|
2147
|
+
byteCount: l,
|
|
2148
|
+
commentLineCount: 0,
|
|
2149
|
+
emptyLineCount: 0,
|
|
2150
|
+
lineCount: u,
|
|
2151
|
+
nonUniformRecordCount: r.nonUniformRecordCount,
|
|
2152
|
+
recordCount: r.recordCount
|
|
2153
|
+
};
|
|
2154
|
+
} finally {
|
|
2155
|
+
t.abortSignal.removeEventListener("abort", c), S(() => void s.cancel());
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
parseText(e, t) {
|
|
2159
|
+
let n = [], r = V(t.structurePath ?? [], (e) => {
|
|
2160
|
+
n.push(H(e));
|
|
2161
|
+
}), i = M(Z(t.dataFormatId), r.handlers), a = [], o = new TextEncoder().encode(e);
|
|
2162
|
+
try {
|
|
2163
|
+
i.write(o), t.isComplete && i.end(), t.isComplete && !r.isTargetFound() && a.push(Fe(`Nothing found at ${Ne(t.structurePath ?? [])}.`, o, void 0));
|
|
2164
|
+
} catch (e) {
|
|
2165
|
+
t.isComplete && a.push(Fe(e instanceof Error ? e.message : String(e), o, Pe(e)));
|
|
2166
|
+
}
|
|
2167
|
+
let s = U(n), c = n.length === 0 ? [] : [W(s), ...n.map((e) => G(e, s).record)];
|
|
2168
|
+
return Promise.resolve({
|
|
2169
|
+
issues: a,
|
|
2170
|
+
parsedRecords: c,
|
|
2171
|
+
recordDelimiterId: "\n",
|
|
2172
|
+
valueDelimiterId: void 0
|
|
2173
|
+
});
|
|
2174
|
+
}
|
|
2175
|
+
};
|
|
2176
|
+
function Z(e) {
|
|
2177
|
+
return {
|
|
2178
|
+
baseOffset: 0,
|
|
2179
|
+
firstItemIndex: 0,
|
|
2180
|
+
isJsonLines: e === "jsonl",
|
|
2181
|
+
isStartInsideList: !1,
|
|
2182
|
+
rootPath: []
|
|
2183
|
+
};
|
|
2184
|
+
}
|
|
2185
|
+
async function Q(e, t, n, r) {
|
|
2186
|
+
t.throwIfAborted();
|
|
2187
|
+
let i = e.getReader(), a = () => {
|
|
2188
|
+
S(() => void i.cancel(t.reason));
|
|
2189
|
+
};
|
|
2190
|
+
t.addEventListener("abort", a, { once: !0 });
|
|
2191
|
+
let o = 0;
|
|
2192
|
+
try {
|
|
2193
|
+
let e = await i.read();
|
|
2194
|
+
for (; !e.done;) {
|
|
2195
|
+
for (let r = 0; r < e.value.length; r += Y) {
|
|
2196
|
+
t.throwIfAborted();
|
|
2197
|
+
let i = e.value.subarray(r, r + Y);
|
|
2198
|
+
o += i.length, n.write(i);
|
|
2199
|
+
}
|
|
2200
|
+
r?.(o), e = await i.read();
|
|
2201
|
+
}
|
|
2202
|
+
return t.throwIfAborted(), n.end(), o;
|
|
2203
|
+
} catch (e) {
|
|
2204
|
+
if (e === X) return o;
|
|
2205
|
+
throw e;
|
|
2206
|
+
} finally {
|
|
2207
|
+
t.removeEventListener("abort", a), S(() => void i.cancel());
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
function ke(e) {
|
|
2211
|
+
let t = oe(e);
|
|
2212
|
+
if (t === "utf-8") return (e) => e;
|
|
2213
|
+
let n = new TextDecoder(t), r = new TextEncoder();
|
|
2214
|
+
return (e, t) => r.encode(n.decode(e, { stream: !t }));
|
|
2215
|
+
}
|
|
2216
|
+
function Ae(e) {
|
|
2217
|
+
let t = 0;
|
|
2218
|
+
for (let n = e.indexOf(J); n !== -1; n = e.indexOf(J, n + 1)) t++;
|
|
2219
|
+
return t;
|
|
2220
|
+
}
|
|
2221
|
+
function* $(e, t, n) {
|
|
2222
|
+
for (; e.itemFields.length >= t || n && e.itemFields.length > 0;) {
|
|
2223
|
+
let n = e.itemFields.splice(0, t);
|
|
2224
|
+
e.shape ??= U(n);
|
|
2225
|
+
let r = [];
|
|
2226
|
+
e.isHeaderSent ||= (r.push(W(e.shape)), !0);
|
|
2227
|
+
for (let t of n) {
|
|
2228
|
+
let { hasUnknownField: n, record: i } = G(t, e.shape);
|
|
2229
|
+
n && e.nonUniformRecordCount++, r.push(i);
|
|
2230
|
+
}
|
|
2231
|
+
e.recordCount += r.length, yield {
|
|
2232
|
+
records: r,
|
|
2233
|
+
typeId: "parsingRecordArray"
|
|
2234
|
+
};
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2237
|
+
function je(e, t) {
|
|
2238
|
+
e != null && e.keySet.size < De && e.keySet.add(t);
|
|
2239
|
+
}
|
|
2240
|
+
function Me(e) {
|
|
2241
|
+
if (e != null) return typeof e == "string" ? e : typeof e == "boolean" ? String(e) : N(e) ? e.numberText : void 0;
|
|
2242
|
+
}
|
|
2243
|
+
function Ne(e) {
|
|
2244
|
+
return e.length === 0 ? "the top of the item" : `'${e.join(" › ")}'`;
|
|
2245
|
+
}
|
|
2246
|
+
function Pe(e) {
|
|
2247
|
+
let t = e instanceof Error ? / at byte (\d+)\.$/u.exec(e.message) : null;
|
|
2248
|
+
return t?.[1] == null ? void 0 : Number(t[1]);
|
|
2249
|
+
}
|
|
2250
|
+
function Fe(e, t, n) {
|
|
2251
|
+
return {
|
|
2252
|
+
endLineNumber: void 0,
|
|
2253
|
+
fieldNumber: void 0,
|
|
2254
|
+
id: "JSON_INVALID",
|
|
2255
|
+
lineNumber: n == null ? void 0 : Ae(t.subarray(0, n)) + 1,
|
|
2256
|
+
message: e,
|
|
2257
|
+
recordNumber: void 0,
|
|
2258
|
+
severityId: "error",
|
|
2259
|
+
value: void 0
|
|
2260
|
+
};
|
|
2261
|
+
}
|
|
2262
|
+
export { Oe as Tool };
|