node-opcua-xml2json 2.98.0 → 2.98.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/dist/source/definition_parser.d.ts +19 -0
- package/dist/source/definition_parser.js +80 -0
- package/dist/source/definition_parser.js.map +1 -0
- package/dist/source/extension_object_parser.d.ts +25 -0
- package/dist/source/extension_object_parser.js +250 -0
- package/dist/source/extension_object_parser.js.map +1 -0
- package/dist/source/fragment_cloner.d.ts +13 -0
- package/dist/source/fragment_cloner.js +45 -0
- package/dist/source/fragment_cloner.js.map +1 -0
- package/dist/source/fragment_cloner_parser.d.ts +8 -0
- package/dist/source/fragment_cloner_parser.js +16 -0
- package/dist/source/fragment_cloner_parser.js.map +1 -0
- package/dist/source/index.d.ts +6 -0
- package/dist/source/index.js.map +1 -0
- package/dist/source/nodejs/xml2json_fs.d.ts +10 -0
- package/dist/source/nodejs/xml2json_fs.js +39 -0
- package/dist/source/nodejs/xml2json_fs.js.map +1 -0
- package/dist/source/xml2Json_pojo_tools.d.ts +19 -0
- package/dist/source/xml2Json_pojo_tools.js +89 -0
- package/dist/source/xml2Json_pojo_tools.js.map +1 -0
- package/dist/source/xml2json.d.ts +179 -0
- package/dist/source/xml2json.js +303 -0
- package/dist/source/xml2json.js.map +1 -0
- package/dist/source/xml2json_pojo.d.ts +7 -0
- package/dist/source/xml2json_pojo.js +29 -0
- package/dist/source/xml2json_pojo.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +11 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml2Json_pojo_tools.js","sourceRoot":"","sources":["../../source/xml2Json_pojo_tools.ts"],"names":[],"mappings":";;;AAAA,uDAAoD;AACpD,yCAAoF;AAGpF,MAAa,YAAa,SAAQ,0BAAe;IAY7C;QACI,KAAK,EAAE,CAAC;QAHJ,cAAS,GAAG,CAAC,CAAC;QAIlB,IAAI,CAAC,KAAK,GAAG,EAAE,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AM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;qBAChD;yBAAM;wBACH,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;qBACjD;iBACJ;aACJ;SACJ;QACD,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;IACnB,CAAC;IAEM,QAAQ,CAAC,IAAY;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CACJ;AA7FD,oCA6FC"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-xml2json
|
|
3
|
+
* node -> see if https://github.com/isaacs/sax-js could be used instead
|
|
4
|
+
*/
|
|
5
|
+
declare const LtxParser: any;
|
|
6
|
+
export type SimpleCallback = (err?: Error) => void;
|
|
7
|
+
export type Callback<T> = (err?: Error | null, result?: T) => void;
|
|
8
|
+
declare interface LtxParser {
|
|
9
|
+
write(str: string): void;
|
|
10
|
+
end(): void;
|
|
11
|
+
on(eventName: "startElement", eventHandler: (name: string, attrs: XmlAttributes) => void): void;
|
|
12
|
+
on(eventName: "endElement", eventHandler: (name: string) => void): void;
|
|
13
|
+
on(eventName: "text", eventHandler: (name: string) => void): void;
|
|
14
|
+
on(eventName: "close", eventHandler: () => void): void;
|
|
15
|
+
}
|
|
16
|
+
export interface Parser {
|
|
17
|
+
[key: string]: ReaderState;
|
|
18
|
+
}
|
|
19
|
+
export interface XmlAttributes {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ReaderStateParser {
|
|
23
|
+
parser?: ParserLike;
|
|
24
|
+
init?: (this: IReaderState, name: string, attrs: XmlAttributes, parent: IReaderState, engine: Xml2Json) => void;
|
|
25
|
+
finish?: (this: IReaderState) => void;
|
|
26
|
+
startElement?: (this: IReaderState, name: string, attrs: XmlAttributes) => void;
|
|
27
|
+
endElement?: (this: IReaderState, name: string) => void;
|
|
28
|
+
}
|
|
29
|
+
export interface ParserLike {
|
|
30
|
+
[key: string]: ReaderStateParserLike;
|
|
31
|
+
}
|
|
32
|
+
export interface ReaderStateParserLike {
|
|
33
|
+
parser?: ParserLike;
|
|
34
|
+
init?: (this: any, name: string, attrs: XmlAttributes, parent: IReaderState, engine: Xml2Json) => void;
|
|
35
|
+
finish?: (this: any) => void;
|
|
36
|
+
startElement?: (this: any, name: string, attrs: XmlAttributes) => void;
|
|
37
|
+
endElement?: (this: any, name: string) => void;
|
|
38
|
+
}
|
|
39
|
+
export interface IReaderState {
|
|
40
|
+
_on_init(elementName: string, attrs: XmlAttributes, parent: IReaderState, level: number, engine: Xml2Json): void;
|
|
41
|
+
_on_finish(): void;
|
|
42
|
+
_on_startElement(level: number, elementName: string, attrs: XmlAttributes): void;
|
|
43
|
+
_on_endElement(level: number, elementName: string): void;
|
|
44
|
+
_on_endElement2(level: number, elementName: string): void;
|
|
45
|
+
_on_text(text: string): void;
|
|
46
|
+
}
|
|
47
|
+
export declare class ReaderStateBase {
|
|
48
|
+
}
|
|
49
|
+
export interface ReaderStateBase extends IReaderState {
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @class ReaderState
|
|
53
|
+
* @private
|
|
54
|
+
* @param options
|
|
55
|
+
* @param [options.parser=null] {map<ReaderState|options}}
|
|
56
|
+
* @param [options.init|null]
|
|
57
|
+
* @param [options.finish]
|
|
58
|
+
* @param [options.startElement]
|
|
59
|
+
* @param [options.endElement]
|
|
60
|
+
*/
|
|
61
|
+
export declare class ReaderState extends ReaderStateBase {
|
|
62
|
+
_init?: (name: string, attrs: XmlAttributes, parent: IReaderState, engine: Xml2Json) => void;
|
|
63
|
+
_finish?: () => void;
|
|
64
|
+
_startElement?: (name: string, attrs: XmlAttributes) => void;
|
|
65
|
+
_endElement?: (name: string) => void;
|
|
66
|
+
parser: any;
|
|
67
|
+
attrs?: XmlAttributes;
|
|
68
|
+
chunks: any[];
|
|
69
|
+
text: string;
|
|
70
|
+
name?: string | undefined;
|
|
71
|
+
level: number;
|
|
72
|
+
currentLevel: number;
|
|
73
|
+
engine?: Xml2Json;
|
|
74
|
+
parent?: IReaderState;
|
|
75
|
+
root?: Xml2Json;
|
|
76
|
+
data?: any;
|
|
77
|
+
constructor(options: ReaderStateParser | ReaderState);
|
|
78
|
+
/**
|
|
79
|
+
* @method _on_init
|
|
80
|
+
* @param elementName - the name of the element
|
|
81
|
+
* @param attrs
|
|
82
|
+
* @param parent
|
|
83
|
+
* @param level
|
|
84
|
+
* @param engine
|
|
85
|
+
* @protected
|
|
86
|
+
*/
|
|
87
|
+
_on_init(elementName: string, attrs: XmlAttributes, parent: IReaderState, level: number, engine: Xml2Json): void;
|
|
88
|
+
_on_finish(): void;
|
|
89
|
+
/**
|
|
90
|
+
* @param level
|
|
91
|
+
* @param elementName - the name of the element
|
|
92
|
+
* @param attrs
|
|
93
|
+
* @protected
|
|
94
|
+
*/
|
|
95
|
+
_on_startElement(level: number, elementName: string, attrs: XmlAttributes): void;
|
|
96
|
+
_on_endElement2(level: number, elementName: string): void;
|
|
97
|
+
/**
|
|
98
|
+
* @method _on_endElement
|
|
99
|
+
* @protected
|
|
100
|
+
*/
|
|
101
|
+
_on_endElement(level: number, elementName: string): void;
|
|
102
|
+
/**
|
|
103
|
+
* @method _on_text
|
|
104
|
+
* @param text {String} the text found inside the element
|
|
105
|
+
* @protected
|
|
106
|
+
*/
|
|
107
|
+
_on_text(text: string): void;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* @class Xml2Json
|
|
111
|
+
* @param options - the state machine as a ReaderState node.
|
|
112
|
+
* @param [options.parser=null] {ReaderState}
|
|
113
|
+
* @param [options.init|null]
|
|
114
|
+
* @param [options.finish]
|
|
115
|
+
* @param [options.startElement]
|
|
116
|
+
* @param [options.endElement]
|
|
117
|
+
* @constructor
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* var parser = new Xml2Json({
|
|
121
|
+
* parser: {
|
|
122
|
+
* 'person': {
|
|
123
|
+
* init: function(name,attrs) {
|
|
124
|
+
* this.parent.root.obj = {};
|
|
125
|
+
* this.obj = this.parent.root.obj;
|
|
126
|
+
* this.obj['name'] = attrs['name'];
|
|
127
|
+
* },
|
|
128
|
+
* parser: {
|
|
129
|
+
* 'address': {
|
|
130
|
+
* finish: function(){
|
|
131
|
+
* this.parent.obj['address'] = this.text;
|
|
132
|
+
* }
|
|
133
|
+
* }
|
|
134
|
+
* }
|
|
135
|
+
* }
|
|
136
|
+
* }
|
|
137
|
+
* });
|
|
138
|
+
*
|
|
139
|
+
* var xml_string = "<employees>" +
|
|
140
|
+
* " <person name='John'>" +
|
|
141
|
+
* " <address>Paris</address>" +
|
|
142
|
+
* " </person>" +
|
|
143
|
+
* "</employees>";
|
|
144
|
+
*
|
|
145
|
+
* parser.parseString(xml_string, function() {
|
|
146
|
+
* parser.obj.should.eql({name: 'John',address: 'Paris'});
|
|
147
|
+
* done();
|
|
148
|
+
* });
|
|
149
|
+
*/
|
|
150
|
+
export declare class Xml2Json {
|
|
151
|
+
currentLevel: number;
|
|
152
|
+
private state_stack;
|
|
153
|
+
private current_state;
|
|
154
|
+
constructor(options: ReaderStateParser);
|
|
155
|
+
parseStringSync(xml_text: string): Record<string, unknown>;
|
|
156
|
+
/**
|
|
157
|
+
* @deprecated
|
|
158
|
+
* @method parseString
|
|
159
|
+
* @async
|
|
160
|
+
*/
|
|
161
|
+
parseString(xml_text: string): Promise<any>;
|
|
162
|
+
parseString(xml_text: string, callback: Callback<any> | SimpleCallback): void;
|
|
163
|
+
/**
|
|
164
|
+
* @param new_state
|
|
165
|
+
* @param name
|
|
166
|
+
* @param attr
|
|
167
|
+
* @private
|
|
168
|
+
* @internal
|
|
169
|
+
*/
|
|
170
|
+
_promote(new_state: IReaderState, level: number, name?: string, attr?: XmlAttributes): void;
|
|
171
|
+
/**
|
|
172
|
+
*
|
|
173
|
+
* @private
|
|
174
|
+
* @internal
|
|
175
|
+
*/
|
|
176
|
+
_demote(cur_state: IReaderState, level: number, elementName: string): void;
|
|
177
|
+
protected _prepareParser(callback: Callback<any> | SimpleCallback): LtxParser;
|
|
178
|
+
}
|
|
179
|
+
export {};
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module node-opcua-xml2json
|
|
4
|
+
* node -> see if https://github.com/isaacs/sax-js could be used instead
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Xml2Json = exports.ReaderState = exports.ReaderStateBase = void 0;
|
|
8
|
+
// tslint:disable:max-classes-per-file
|
|
9
|
+
// tslint:disable:no-var-requires
|
|
10
|
+
// tslint:disable:unified-signatures
|
|
11
|
+
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
12
|
+
const LtxParser = require("ltx/lib/parsers/ltx.js");
|
|
13
|
+
/**
|
|
14
|
+
* @static
|
|
15
|
+
* @private
|
|
16
|
+
* @method _coerceParser
|
|
17
|
+
* @param parser {map<ReaderState|options>}
|
|
18
|
+
* @return {map}
|
|
19
|
+
*/
|
|
20
|
+
function _coerceParser(parser) {
|
|
21
|
+
for (const name of Object.keys(parser)) {
|
|
22
|
+
if (parser[name] && !(parser[name] instanceof ReaderState)) {
|
|
23
|
+
// this is to prevent recursion
|
|
24
|
+
const tmp = parser[name];
|
|
25
|
+
delete parser[name];
|
|
26
|
+
parser[name] = new ReaderState(tmp);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return parser;
|
|
30
|
+
}
|
|
31
|
+
class ReaderStateBase {
|
|
32
|
+
}
|
|
33
|
+
exports.ReaderStateBase = ReaderStateBase;
|
|
34
|
+
/**
|
|
35
|
+
* @class ReaderState
|
|
36
|
+
* @private
|
|
37
|
+
* @param options
|
|
38
|
+
* @param [options.parser=null] {map<ReaderState|options}}
|
|
39
|
+
* @param [options.init|null]
|
|
40
|
+
* @param [options.finish]
|
|
41
|
+
* @param [options.startElement]
|
|
42
|
+
* @param [options.endElement]
|
|
43
|
+
*/
|
|
44
|
+
class ReaderState extends ReaderStateBase {
|
|
45
|
+
constructor(options) {
|
|
46
|
+
super();
|
|
47
|
+
this.chunks = [];
|
|
48
|
+
this.text = "";
|
|
49
|
+
this.name = "";
|
|
50
|
+
this.level = -1;
|
|
51
|
+
this.currentLevel = -1;
|
|
52
|
+
// ensure options object has only expected properties
|
|
53
|
+
options.parser = options.parser || {};
|
|
54
|
+
if (!(options instanceof ReaderStateBase)) {
|
|
55
|
+
this._init = options.init;
|
|
56
|
+
this._finish = options.finish;
|
|
57
|
+
this._startElement = options.startElement;
|
|
58
|
+
this._endElement = options.endElement;
|
|
59
|
+
}
|
|
60
|
+
this.parser = _coerceParser(options.parser);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @method _on_init
|
|
64
|
+
* @param elementName - the name of the element
|
|
65
|
+
* @param attrs
|
|
66
|
+
* @param parent
|
|
67
|
+
* @param level
|
|
68
|
+
* @param engine
|
|
69
|
+
* @protected
|
|
70
|
+
*/
|
|
71
|
+
_on_init(elementName, attrs, parent, level, engine) {
|
|
72
|
+
this.name = elementName;
|
|
73
|
+
this.parent = parent;
|
|
74
|
+
this.engine = engine;
|
|
75
|
+
this.data = {};
|
|
76
|
+
this.level = level;
|
|
77
|
+
this.currentLevel = this.level;
|
|
78
|
+
this.attrs = attrs;
|
|
79
|
+
(0, node_opcua_assert_1.assert)(this.attrs);
|
|
80
|
+
if (this._init) {
|
|
81
|
+
this._init(elementName, attrs, parent, engine);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
_on_finish() {
|
|
85
|
+
if (this._finish) {
|
|
86
|
+
this._finish();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @param level
|
|
91
|
+
* @param elementName - the name of the element
|
|
92
|
+
* @param attrs
|
|
93
|
+
* @protected
|
|
94
|
+
*/
|
|
95
|
+
_on_startElement(level, elementName, attrs) {
|
|
96
|
+
this.currentLevel = level;
|
|
97
|
+
// console.log("wxxxx _on_startElement#" + this.name, elementName, this.currentLevel);
|
|
98
|
+
this.chunks = [];
|
|
99
|
+
this.text = "";
|
|
100
|
+
if (this._startElement) {
|
|
101
|
+
this._startElement(elementName, attrs);
|
|
102
|
+
}
|
|
103
|
+
if (this.engine && Object.prototype.hasOwnProperty.call(this.parser, elementName)) {
|
|
104
|
+
// console.log("promoting ", elementName, this.level);
|
|
105
|
+
this.engine._promote(this.parser[elementName], level, elementName, attrs);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
_on_endElement2(level, elementName) {
|
|
109
|
+
if (this._endElement) {
|
|
110
|
+
this._endElement(elementName);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* @method _on_endElement
|
|
115
|
+
* @protected
|
|
116
|
+
*/
|
|
117
|
+
_on_endElement(level, elementName) {
|
|
118
|
+
// console.log("wxxxx _on_endElement#" + this.name, elementName, level, this.currentLevel);
|
|
119
|
+
(0, node_opcua_assert_1.assert)(this.attrs);
|
|
120
|
+
this.chunks = this.chunks || [];
|
|
121
|
+
if (this.level > level) {
|
|
122
|
+
// we end a child element of this node
|
|
123
|
+
this._on_endElement2(level, elementName);
|
|
124
|
+
}
|
|
125
|
+
else if (this.level === level) {
|
|
126
|
+
// we received the end event of this node
|
|
127
|
+
// we need to finish
|
|
128
|
+
this.text = this.chunks.join("");
|
|
129
|
+
this.chunks = [];
|
|
130
|
+
// this is the end
|
|
131
|
+
this._on_finish();
|
|
132
|
+
if (this.parent &&
|
|
133
|
+
this.parent.parser &&
|
|
134
|
+
Object.prototype.hasOwnProperty.call(this.parent.parser, elementName)) {
|
|
135
|
+
// console.log("xxx demoting#" + this.name, elementName, this.level);
|
|
136
|
+
this.engine._demote(this, level, elementName);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* @method _on_text
|
|
142
|
+
* @param text {String} the text found inside the element
|
|
143
|
+
* @protected
|
|
144
|
+
*/
|
|
145
|
+
_on_text(text) {
|
|
146
|
+
this.chunks = this.chunks || [];
|
|
147
|
+
text = text.trim();
|
|
148
|
+
if (text.length === 0) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
this.chunks.push(text);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
exports.ReaderState = ReaderState;
|
|
155
|
+
const regexp = /(([^:]+):)?(.*)/;
|
|
156
|
+
function resolve_namespace(name) {
|
|
157
|
+
const m = name.match(regexp);
|
|
158
|
+
if (!m) {
|
|
159
|
+
throw new Error("Invalid match");
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
ns: m[2],
|
|
163
|
+
tag: m[3]
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* @class Xml2Json
|
|
168
|
+
* @param options - the state machine as a ReaderState node.
|
|
169
|
+
* @param [options.parser=null] {ReaderState}
|
|
170
|
+
* @param [options.init|null]
|
|
171
|
+
* @param [options.finish]
|
|
172
|
+
* @param [options.startElement]
|
|
173
|
+
* @param [options.endElement]
|
|
174
|
+
* @constructor
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* var parser = new Xml2Json({
|
|
178
|
+
* parser: {
|
|
179
|
+
* 'person': {
|
|
180
|
+
* init: function(name,attrs) {
|
|
181
|
+
* this.parent.root.obj = {};
|
|
182
|
+
* this.obj = this.parent.root.obj;
|
|
183
|
+
* this.obj['name'] = attrs['name'];
|
|
184
|
+
* },
|
|
185
|
+
* parser: {
|
|
186
|
+
* 'address': {
|
|
187
|
+
* finish: function(){
|
|
188
|
+
* this.parent.obj['address'] = this.text;
|
|
189
|
+
* }
|
|
190
|
+
* }
|
|
191
|
+
* }
|
|
192
|
+
* }
|
|
193
|
+
* }
|
|
194
|
+
* });
|
|
195
|
+
*
|
|
196
|
+
* var xml_string = "<employees>" +
|
|
197
|
+
* " <person name='John'>" +
|
|
198
|
+
* " <address>Paris</address>" +
|
|
199
|
+
* " </person>" +
|
|
200
|
+
* "</employees>";
|
|
201
|
+
*
|
|
202
|
+
* parser.parseString(xml_string, function() {
|
|
203
|
+
* parser.obj.should.eql({name: 'John',address: 'Paris'});
|
|
204
|
+
* done();
|
|
205
|
+
* });
|
|
206
|
+
*/
|
|
207
|
+
class Xml2Json {
|
|
208
|
+
constructor(options) {
|
|
209
|
+
this.currentLevel = 0;
|
|
210
|
+
this.state_stack = [];
|
|
211
|
+
this.current_state = null;
|
|
212
|
+
const state = options instanceof ReaderStateBase ? options : new ReaderState(options);
|
|
213
|
+
state.root = this;
|
|
214
|
+
this.state_stack = [];
|
|
215
|
+
this.current_state = null;
|
|
216
|
+
this._promote(state, 0);
|
|
217
|
+
}
|
|
218
|
+
parseStringSync(xml_text) {
|
|
219
|
+
let retValue = {};
|
|
220
|
+
const parser = this._prepareParser((err, r) => retValue = r);
|
|
221
|
+
parser.write(xml_text);
|
|
222
|
+
parser.end();
|
|
223
|
+
return retValue;
|
|
224
|
+
}
|
|
225
|
+
parseString(xml_text, callback) {
|
|
226
|
+
const parser = this._prepareParser(callback);
|
|
227
|
+
parser.write(xml_text);
|
|
228
|
+
parser.end();
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* @param new_state
|
|
232
|
+
* @param name
|
|
233
|
+
* @param attr
|
|
234
|
+
* @private
|
|
235
|
+
* @internal
|
|
236
|
+
*/
|
|
237
|
+
_promote(new_state, level, name, attr) {
|
|
238
|
+
attr = attr || {};
|
|
239
|
+
this.state_stack.push({
|
|
240
|
+
backup: {},
|
|
241
|
+
state: this.current_state
|
|
242
|
+
});
|
|
243
|
+
const parent = this.current_state;
|
|
244
|
+
this.current_state = new_state;
|
|
245
|
+
this.current_state._on_init(name || "???", attr, parent, level, this);
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
*
|
|
249
|
+
* @private
|
|
250
|
+
* @internal
|
|
251
|
+
*/
|
|
252
|
+
_demote(cur_state, level, elementName) {
|
|
253
|
+
/// assert(this.current_state === cur_state);
|
|
254
|
+
const { state, backup } = this.state_stack.pop();
|
|
255
|
+
this.current_state = state;
|
|
256
|
+
if (this.current_state) {
|
|
257
|
+
this.current_state._on_endElement2(level, elementName);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
_prepareParser(callback) {
|
|
261
|
+
(0, node_opcua_assert_1.assert)(typeof callback === 'function');
|
|
262
|
+
const parser = new LtxParser();
|
|
263
|
+
this.currentLevel = 0;
|
|
264
|
+
parser.on("startElement", (name, attrs) => {
|
|
265
|
+
const tag_ns = resolve_namespace(name);
|
|
266
|
+
this.currentLevel += 1;
|
|
267
|
+
if (this.current_state) {
|
|
268
|
+
this.current_state._on_startElement(this.currentLevel, tag_ns.tag, attrs);
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
parser.on("endElement", (name) => {
|
|
272
|
+
const tag_ns = resolve_namespace(name);
|
|
273
|
+
if (this.current_state) {
|
|
274
|
+
this.current_state._on_endElement(this.currentLevel, tag_ns.tag);
|
|
275
|
+
}
|
|
276
|
+
this.currentLevel -= 1;
|
|
277
|
+
if (this.currentLevel === 0) {
|
|
278
|
+
parser.emit("close");
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
parser.on("text", (text) => {
|
|
282
|
+
text = text.trim();
|
|
283
|
+
if (text.length === 0) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
if (this.current_state) {
|
|
287
|
+
this.current_state._on_text(text);
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
parser.once("close", () => {
|
|
291
|
+
if (callback) {
|
|
292
|
+
callback(null, this.current_state._pojo);
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
return parser;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
exports.Xml2Json = Xml2Json;
|
|
299
|
+
// tslint:disable:no-var-requires
|
|
300
|
+
const thenify = require("thenify");
|
|
301
|
+
const opts = { multiArgs: false };
|
|
302
|
+
Xml2Json.prototype.parseString = thenify.withCallback(Xml2Json.prototype.parseString, opts);
|
|
303
|
+
//# sourceMappingURL=xml2json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml2json.js","sourceRoot":"","sources":["../../source/xml2json.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,sCAAsC;AACtC,iCAAiC;AACjC,oCAAoC;AAEpC,yDAA2C;AAC3C,MAAM,SAAS,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAuBpD;;;;;;GAMG;AACH,SAAS,aAAa,CAAC,MAAkB;IACrC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;QACpC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,WAAW,CAAC,EAAE;YACxD,+BAA+B;YAC/B,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;YACzB,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,CAAC;SACvC;KACJ;IACD,OAAO,MAAgB,CAAC;AAC5B,CAAC;AAwCD,MAAa,eAAe;CAAG;AAA/B,0CAA+B;AAE/B;;;;;;;;;GASG;AACH,MAAa,WAAY,SAAQ,eAAe;IAoB5C,YAAY,OAAwC;QAChD,KAAK,EAAE,CAAC;QAbL,WAAM,GAAU,EAAE,CAAC;QACnB,SAAI,GAAG,EAAE,CAAC;QACV,SAAI,GAAI,EAAE,CAAC;QACX,UAAK,GAAG,CAAC,CAAC,CAAC;QACX,iBAAY,GAAG,CAAC,CAAC,CAAC;QAUrB,qDAAqD;QACrD,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC;QAEtC,IAAI,CAAC,CAAC,OAAO,YAAY,eAAe,CAAC,EAA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AAI,CAAC,IAAI,EAAE,CAAC;YACnB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;gBACnB,OAAO;aACV;YACD,IAAI,IAAI,CAAC,aAAa,EAAE;gBACpB,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;aACrC;QACL,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE;YACtB,IAAI,QAAQ,EAAE;gBACT,QAAgB,CAAC,IAAI,EAAG,IAAI,CAAC,aAAsB,CAAC,KAAK,CAAC,CAAC;aAC/D;QACL,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAxGD,4BAwGC;AAED,iCAAiC;AACjC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AACnC,MAAM,IAAI,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AAClC,QAAQ,CAAC,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReaderState, ReaderStateParser, Xml2Json, XmlAttributes } from "./xml2json";
|
|
2
|
+
import { withPojoLambda } from "./xml2Json_pojo_tools";
|
|
3
|
+
export declare const json_parser: ReaderStateParser;
|
|
4
|
+
export declare function startPojo(pThis: ReaderState, elementName: string, attrs: XmlAttributes, withPojo: withPojoLambda): void;
|
|
5
|
+
export declare class Xml2JsonPojo extends Xml2Json {
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Xml2JsonPojo = exports.startPojo = exports.json_parser = void 0;
|
|
4
|
+
const xml2json_1 = require("./xml2json");
|
|
5
|
+
const xml2Json_pojo_tools_1 = require("./xml2Json_pojo_tools");
|
|
6
|
+
const json_extractor = new xml2Json_pojo_tools_1.ReaderState2();
|
|
7
|
+
exports.json_parser = {
|
|
8
|
+
init(elementName, attrs, parent, engine) {
|
|
9
|
+
json_extractor._on_init(elementName, attrs, parent, 0, engine);
|
|
10
|
+
},
|
|
11
|
+
finish() {
|
|
12
|
+
this.parent._pojo = json_extractor._pojo;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
function startPojo(pThis, elementName, attrs, withPojo) {
|
|
16
|
+
pThis.engine._promote(json_extractor, pThis.engine.currentLevel, elementName, attrs);
|
|
17
|
+
json_extractor._withPojo = (name, pojo) => {
|
|
18
|
+
withPojo(name, pojo);
|
|
19
|
+
pThis.engine._demote(json_extractor, pThis.engine.currentLevel, elementName);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
exports.startPojo = startPojo;
|
|
23
|
+
class Xml2JsonPojo extends xml2json_1.Xml2Json {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(json_extractor);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.Xml2JsonPojo = Xml2JsonPojo;
|
|
29
|
+
//# sourceMappingURL=xml2json_pojo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml2json_pojo.js","sourceRoot":"","sources":["../../source/xml2json_pojo.ts"],"names":[],"mappings":";;;AAAA,yCAAmG;AACnG,+DAAqE;AAErE,MAAM,cAAc,GAAiB,IAAI,kCAAY,EAAE,CAAC;AAC3C,QAAA,WAAW,GAAsB;IAC1C,IAAI,CAAqB,WAAmB,EAAE,KAAoB,EAAE,MAAoB,EAAE,MAAgB;QACtG,cAAc,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IACnE,CAAC;IACD,MAAM;QACF,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC;IAC7C,CAAC;CACJ,CAAC;AAEF,SAAgB,SAAS,CAAC,KAAkB,EAAE,WAAmB,EAAE,KAAoB,EAAE,QAAwB;IAC7G,KAAK,CAAC,MAAO,CAAC,QAAQ,CAAC,cAAc,EAAE,KAAK,CAAC,MAAO,CAAC,YAAY,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;IACvF,cAAc,CAAC,SAAS,GAAG,CAAC,IAAY,EAAE,IAAS,EAAE,EAAE;QACnD,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACrB,KAAK,CAAC,MAAO,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,MAAO,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;IACnF,CAAC,CAAC;AACN,CAAC;AAND,8BAMC;AAED,MAAa,YAAa,SAAQ,mBAAQ;IACtC;QACI,KAAK,CAAC,cAAmC,CAAC,CAAC;IAC/C,CAAC;CACJ;AAJD,oCAIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es6.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es5.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2016.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2018.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2019.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2020.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.dom.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.scripthost.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.decorators.d.ts","../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node-opcua-assert/dist/index.d.ts","../source/xml2json.ts","../source/definition_parser.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/dom-events.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/globals.global.d.ts","../../../node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/index.d.ts","../../node-opcua-utils/dist/buffer_ellipsis.d.ts","../../node-opcua-utils/dist/string_utils.d.ts","../../node-opcua-utils/dist/object_classname.d.ts","../../node-opcua-utils/dist/get_clock_tick.d.ts","../../node-opcua-utils/dist/compare_buffers.d.ts","../../node-opcua-utils/dist/function_variadic.d.ts","../../node-opcua-utils/dist/get_function_parameters_name.d.ts","../../node-opcua-utils/dist/watchdog.d.ts","../../node-opcua-utils/dist/set_deprecated.d.ts","../../node-opcua-utils/dist/replace_buffer_with_hex_dump.d.ts","../../node-opcua-utils/dist/timestamp.d.ts","../../node-opcua-utils/dist/line_file.d.ts","../../node-opcua-utils/dist/match_uri.d.ts","../../node-opcua-utils/dist/hrtime.d.ts","../../node-opcua-utils/dist/index.d.ts","../source/extension_object_parser.ts","../source/fragment_cloner.ts","../source/fragment_cloner_parser.ts","../source/xml2Json_pojo_tools.ts","../source/xml2json_pojo.ts","../source/index.ts","../source/nodejs/xml2json_fs.ts","../../../node_modules/.pnpm/@types+async@3.2.18/node_modules/@types/async/index.d.ts","../../../node_modules/.pnpm/@types+bonjour@3.5.10/node_modules/@types/bonjour/index.d.ts","../../../node_modules/.pnpm/@types+lodash@4.14.192/node_modules/@types/lodash/common/common.d.ts","../../../node_modules/.pnpm/@types+lodash@4.14.192/node_modules/@types/lodash/common/array.d.ts","../../../node_modules/.pnpm/@types+lodash@4.14.192/node_modules/@types/lodash/common/collection.d.ts","../../../node_modules/.pnpm/@types+lodash@4.14.192/node_modules/@types/lodash/common/date.d.ts","../../../node_modules/.pnpm/@types+lodash@4.14.192/node_modules/@types/lodash/common/function.d.ts","../../../node_modules/.pnpm/@types+lodash@4.14.192/node_modules/@types/lodash/common/lang.d.ts","../../../node_modules/.pnpm/@types+lodash@4.14.192/node_modules/@types/lodash/common/math.d.ts","../../../node_modules/.pnpm/@types+lodash@4.14.192/node_modules/@types/lodash/common/number.d.ts","../../../node_modules/.pnpm/@types+lodash@4.14.192/node_modules/@types/lodash/common/object.d.ts","../../../node_modules/.pnpm/@types+lodash@4.14.192/node_modules/@types/lodash/common/seq.d.ts","../../../node_modules/.pnpm/@types+lodash@4.14.192/node_modules/@types/lodash/common/string.d.ts","../../../node_modules/.pnpm/@types+lodash@4.14.192/node_modules/@types/lodash/common/util.d.ts","../../../node_modules/.pnpm/@types+lodash@4.14.192/node_modules/@types/lodash/index.d.ts","../../../node_modules/.pnpm/@types+long@4.0.2/node_modules/@types/long/index.d.ts","../../../node_modules/.pnpm/@types+mkdirp@1.0.2/node_modules/@types/mkdirp/index.d.ts","../../../node_modules/.pnpm/@types+mocha@10.0.1/node_modules/@types/mocha/index.d.ts","../../../node_modules/.pnpm/@types+once@1.4.0/node_modules/@types/once/index.d.ts","../../../node_modules/.pnpm/@types+prettier@2.7.2/node_modules/@types/prettier/index.d.ts","../../../node_modules/.pnpm/@types+minimatch@5.1.2/node_modules/@types/minimatch/index.d.ts","../../../node_modules/.pnpm/@types+glob@8.0.0/node_modules/@types/glob/index.d.ts","../../../node_modules/.pnpm/@types+rimraf@3.0.2/node_modules/@types/rimraf/index.d.ts","../../../node_modules/.pnpm/@types+sinonjs__fake-timers@8.1.2/node_modules/@types/sinonjs__fake-timers/index.d.ts","../../../node_modules/.pnpm/@types+sinon@10.0.13/node_modules/@types/sinon/index.d.ts","../../../node_modules/.pnpm/@types+underscore@1.11.4/node_modules/@types/underscore/index.d.ts","../../../node_modules/.pnpm/@types+wordwrap@1.0.1/node_modules/@types/wordwrap/index.d.ts","../../../node_modules/.pnpm/@types+yargs-parser@21.0.0/node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/.pnpm/@types+yargs@17.0.24/node_modules/@types/yargs/index.d.ts"],"fileInfos":["df039a67536fe2acc3affdcbfb645892f842db36fe599e8e652e2f0c640a90d1",{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true},{"version":"9a60b92bca4c1257db03b349d58e63e4868cfc0d1c8d0ba60c2dbc63f4e6c9f6","affectsGlobalScope":true},{"version":"c5c5565225fce2ede835725a92a28ece149f83542aa4866cfb10290bff7b8996","affectsGlobalScope":true},{"version":"7d2dbc2a0250400af0809b0ad5f84686e84c73526de931f84560e483eb16b03c","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"f851fc7f1146a83998a766c28cd6e0b4f3485f74eedba8c4843cf20065ef1aa4",{"version":"2d6b077c5274f3a76879f694c13242ba0f8df7603ed3793d1f3aaf442abf856b","signature":"e02b7d3a8b4c5d9b7b1cc36de754518c93d2a2deb64cb7d0718e13d61d1d2a08"},{"version":"f957655a9004400662b8ed3602dd925c85fbd81b702374e746e66e05a072637b","signature":"5ce7dee05f38f7f4c21017195ce19ae4b5b0ffd34bf414e36ab2c639e87f637e"},"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"57b6cb95756d1fe3bfeb20205de27b0c5406e4a86e130c6dfa6bd92af641e09d","affectsGlobalScope":true},"11e2d554398d2bd460e7d06b2fa5827a297c8acfbe00b4f894a224ac0862857f",{"version":"e193e634a99c9c1d71f1c6e4e1567a4a73584328d21ea02dd5cddbaad6693f61","affectsGlobalScope":true},"374ca798f244e464346f14301dc2a8b4b111af1a83b49fffef5906c338a1f922","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","e596c9bb2f29a2699fdd4ae89139612652245192f67f45617c5a4b20832aaae9","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","1cdcfc1f624d6c08aa12c73935f6e13f095919cd99edf95752951796eb225729","216717f17c095cde1dc19375e1ab3af0a4a485355860c077a4f9d6ea59fab5b5","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true},"80473bd0dd90ca1e166514c2dfead9d5803f9c51418864ca35abbeec6e6847e1","1c84b46267610a34028edfd0d035509341751262bac1062857f3c8df7aff7153","e6c86d83bd526c8bdb5d0bf935b8e72ce983763d600743f74d812fdf4abf4df6","a3d541d303ee505053f5dcbf9fafb65cac3d5631037501cd616195863a6c5740","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","7ee6ed878c4528215c82b664fe0cfe80e8b4da6c0d4cc80869367868774db8b1","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"0715e4cd28ad471b2a93f3e552ff51a3ae423417a01a10aa1d3bc7c6b95059d6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","7d55d78cd47cf5280643b53434b16c2d9d11d144126932759fbdd51da525eec4","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","f69ff39996a61a0dd10f4bce73272b52e8024a4d58b13ab32bf4712909d0a2b7",{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","c4577fb855ca259bdbf3ea663ca73988ce5f84251a92b4aef80a1f4122b6f98e","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true},{"version":"ff07a9a03c65732ccc59b3c65bc584173da093bd563a6565411c01f5703bd3cb","affectsGlobalScope":true},"6de4a219df57d2b27274d59b67708f13c2cbf7ed211abe57d8f9ab8b25cde776","0fe8985a28f82c450a04a6edf1279d7181c0893f37da7d2a27f8efd4fd5edb03","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"d8d555f3d607ecaa18d55de6995ea8f206342ecc93305919eac945c7c78c78c6","bb7e28d9e4dcb69c400d04bb59b4c97518070593ba73d70e18884cf60a8c86b9","f42c2b7084c4f208dc7a0ed5fdddec0ae10e27a5b965eab338a0ad816d027a57","6acd4c7987f6cfdaefa6f477d1089c621a07513b457cb930d62ff1deb0c88aa7","81f081ae345273dd679344ec3993723edeb6cc3505f4ab1f5e3d019f38c23417","328bb7c2a6ed8f003fbcab042a539641da1c095cab0e9652bec8bbd846dc73c3","76fc59b0a8cc6a37e60439a76a8fe69e47579837d3d3ed2ee417f8a01951a294","e844cc50b2bc35f5ab85b86cc1178fb670f3faba32ecc07cb8bdc8a518ed7c93","951fb2a0fad409f153f74a8500c4c72749914c731523793ba177d68bfcf46a2a","0a1b9f3fe65f85fb4841f46be7fe231bfe1636e35165aba6233bc22103a72bc2","b811ae36a6044491b53928268237f97d5c4cbc50f9782633ab90d76433cf407f","5de0510a5e35d764ba0df2c597c7e607140cf65df8aba9ec9aa27b1e81ca1cb9","5c9ea5caace1d9705abf419e488056736aa69ff4e4765b0225b5abcb35324add","2379c3dc5c4ed466eaffb3b2c9022d75e3afd83906c8112d2d6973760697d87e","2b59db7caff4ab87aedc2adadddef2d8cb18c33547167bed68e1b0aa5a5894e1","cffe12661e1a6f9f8d62f80dc93985e594d5b119d4fe36ae637096ef5bebddb1",{"version":"6a403e302d830005b78b3b6da59ca8c6c7ef79e6b239b3dbaaa53c3b44d5e3d8","signature":"d7b4a7f1b46fde8c4fc814cc2d6c741bcd7c3adabd5ea97eedaacbb063b25bc1"},{"version":"ac551431e36aaa0c56878bc37f10b358889ca7ab814a64a46b4b3cb154841280","signature":"dfdb290b8e8bff546756a644ce06fe9677465920499c950e836731a8df248064"},{"version":"89c4ed0fec265e96aa10c1fe8adf1c14826d9bf856d26ac8cbbc498bb96c34fd","signature":"8771adfdeae1be1e66e28cb3aee7746395e5e44746ec9249f15bf0be4d537f23"},{"version":"cc4f118e8d6e9bd5263292e234c70a415a20a4e0b04d132481c9e56cedde787c","signature":"e9d9f115af6a85617aba5046e92bf9653532e774931e9ccda013c496d3cebe2f"},{"version":"5097b3d34483a1288ff7c886edee0ed0a10b2a7c82f94fe13191de01e2599b59","signature":"5694562d4fc05d1bb82c0b4176e5f7a1f7e37863df876411d433649047ff0664"},"b44fe197f178555d404684238c893f70c500c487f101da2b470c71354445e712",{"version":"ce7a22db6ccda73ef3b3b33a2c46bf2b11436a4b9663e95f04aed8ebd7890682","signature":"d687e1dafc464097ff9c79e0d28f1211f6fd1a89f9b87800b00654b1d3758a62"},"211886ed3f8780d63af755714f1c868851fc561dfb305722708f10f874ed9f6f","d78e5898c8de5e0f934eee83f680262de005caa268d137101b833fd932f95e07","1171e4dfda53f093511e29b1f993a21fca24925055640cacc94226eefb7bb062","458111fc89d11d2151277c822dfdc1a28fa5b6b2493cf942e37d4cd0a6ee5f22","d70c026dd2eeaa974f430ea229230a1897fdb897dc74659deebe2afd4feeb08f","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","98f9d826db9cd99d27a01a59ee5f22863df00ccf1aaf43e1d7db80ebf716f7c3","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","dcd91d3b697cb650b95db5471189b99815af5db2a1cd28760f91e0b12ede8ed5","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3cf0d343c2276842a5b617f22ba82af6322c7cfe8bb52238ffc0c491a3c21019","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9",{"version":"f2eff8704452659641164876c1ef0df4174659ce7311b0665798ea3f556fa9ad","affectsGlobalScope":true},"0e60e0cbf2283adfd5a15430ae548cd2f662d581b5da6ecd98220203e7067c70","875d567ecf2f865a1b19d30f2acf3203817e19fd95f7675351d046914ee39ac8",{"version":"677646e2620795c98a539fb12fb531f10331c217cef1492132b2518f894fa92d","affectsGlobalScope":true},{"version":"0946506310901fb245af3438f1dd2bdb6f89f08faf8dacac63e035d78c2bf482","affectsGlobalScope":true},"bc88e4049153bc4dddb4503ed7e624eb141edfa9064b3659d6c86e900fe9e621","963d59066dd6742da1918a6213a209bcc205b8ee53b1876ee2b4e6d80f97c85e","a55ca8b5f8c6a8535bb26fac1e10132a5338234ca3d5b9ed739fbc8ef41c8075","f4cf5f0ad1cfb0ceebbe4fbe8aaf0aa728e899c99cc36ec6c0c4b8f6e8a84c83","f83b320cceccfc48457a818d18fc9a006ab18d0bdd727aa2c2e73dc1b4a45e98","354abbae08f72ea982b1a767a8908f1b3efe8bbe53955c64f9c0c249c8832d5d",{"version":"0609dda5350cd6d8c42daef710dffe3b51521ffbd00109e234f7bfb7533194e7","affectsGlobalScope":true},"8d007c8fe1a38e90fd50410e3c690a54f9bbfef7a88964c4870ca2af9656bb64","70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","e9eb1b173aa166892f3eddab182e49cfe59aa2e14d33aedb6b49d175ed6a3750"],"root":[50,51,[121,127]],"options":{"composite":true,"declaration":true,"module":1,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"noStrictGenericChecks":false,"outDir":"./","removeComments":false,"rootDir":"..","skipLibCheck":false,"sourceMap":true,"strict":true,"strictFunctionTypes":true,"target":2},"fileIdsList":[[98],[62,98,105],[68,69,98,105,148],[98,130,132,133,134,135,136,137,138,139,140,141,142],[98,130,131,133,134,135,136,137,138,139,140,141,142],[98,131,132,133,134,135,136,137,138,139,140,141,142],[98,130,131,132,134,135,136,137,138,139,140,141,142],[98,130,131,132,133,135,136,137,138,139,140,141,142],[98,130,131,132,133,134,136,137,138,139,140,141,142],[98,130,131,132,133,134,135,137,138,139,140,141,142],[98,130,131,132,133,134,135,136,138,139,140,141,142],[98,130,131,132,133,134,135,136,137,139,140,141,142],[98,130,131,132,133,134,135,136,137,138,140,141,142],[98,130,131,132,133,134,135,136,137,138,139,141,142],[98,130,131,132,133,134,135,136,137,138,139,140,142],[98,130,131,132,133,134,135,136,137,138,139,140,141],[69,98,105],[52,98],[55,98],[56,61,89,98],[57,68,69,76,86,97,98],[57,58,68,76,98],[59,98],[60,61,69,77,98],[61,86,94,98],[62,64,68,76,98],[63,98],[64,65,98],[68,98],[66,68,98],[68,69,70,86,97,98],[68,69,70,83,86,89,98],[98,102],[64,71,76,86,97,98],[68,69,71,72,76,86,94,97,98],[71,73,86,94,97,98],[52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],[68,74,98],[75,97,98],[64,68,76,86,98],[77,98],[78,98],[55,79,98],[80,96,98,102],[81,98],[82,98],[68,83,84,98],[83,85,98,100],[56,68,86,87,88,89,98],[56,86,88,98],[86,87,98],[89,98],[90,98],[68,92,93,98],[92,93,98],[61,76,86,94,98],[95,98],[76,96,98],[56,71,82,97,98],[61,98],[86,98,99],[98,100],[98,101],[56,61,68,70,79,86,97,98,100,102],[86,98,103],[69,98,105,149],[98,151],[98,155],[98,105],[98,111],[98,106,107,108,109,110,112,113,114,115,116,117,118,119],[68,98,105],[49,50,98],[50,98,120],[50,98],[50,98,122],[50,51,98,121,122,123,125],[50,69,98],[49,98],[50,98,124],[50],[50,124]],"referencedMap":[[128,1],[129,2],[149,3],[131,4],[132,5],[130,6],[133,7],[134,8],[135,9],[136,10],[137,11],[138,12],[139,13],[140,14],[141,15],[142,16],[143,1],[148,1],[144,17],[145,1],[52,18],[53,18],[55,19],[56,20],[57,21],[58,22],[59,23],[60,24],[61,25],[62,26],[63,27],[64,28],[65,28],[67,29],[66,30],[68,29],[69,31],[70,32],[54,33],[104,1],[71,34],[72,35],[73,36],[105,37],[74,38],[75,39],[76,40],[77,41],[78,42],[79,43],[80,44],[81,45],[82,46],[83,47],[84,47],[85,48],[86,49],[88,50],[87,51],[89,52],[90,53],[91,1],[92,54],[93,55],[94,56],[95,57],[96,58],[97,59],[98,60],[99,61],[100,62],[101,63],[102,64],[103,65],[146,1],[147,1],[150,66],[152,67],[151,1],[153,1],[154,1],[155,1],[156,68],[49,1],[106,69],[110,69],[111,1],[109,1],[112,70],[119,1],[120,71],[117,1],[118,1],[108,1],[115,1],[114,70],[107,1],[116,1],[113,72],[51,73],[121,74],[122,75],[123,76],[126,77],[127,78],[124,74],[50,79],[125,80],[47,1],[48,1],[9,1],[10,1],[14,1],[13,1],[3,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[4,1],[5,1],[26,1],[23,1],[24,1],[25,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[37,1],[34,1],[35,1],[36,1],[38,1],[8,1],[39,1],[44,1],[45,1],[40,1],[41,1],[42,1],[43,1],[2,1],[1,1],[46,1],[12,1],[11,1]],"exportedModulesMap":[[128,1],[129,2],[149,3],[131,4],[132,5],[130,6],[133,7],[134,8],[135,9],[136,10],[137,11],[138,12],[139,13],[140,14],[141,15],[142,16],[143,1],[148,1],[144,17],[145,1],[52,18],[53,18],[55,19],[56,20],[57,21],[58,22],[59,23],[60,24],[61,25],[62,26],[63,27],[64,28],[65,28],[67,29],[66,30],[68,29],[69,31],[70,32],[54,33],[104,1],[71,34],[72,35],[73,36],[105,37],[74,38],[75,39],[76,40],[77,41],[78,42],[79,43],[80,44],[81,45],[82,46],[83,47],[84,47],[85,48],[86,49],[88,50],[87,51],[89,52],[90,53],[91,1],[92,54],[93,55],[94,56],[95,57],[96,58],[97,59],[98,60],[99,61],[100,62],[101,63],[102,64],[103,65],[146,1],[147,1],[150,66],[152,67],[151,1],[153,1],[154,1],[155,1],[156,68],[49,1],[106,69],[110,69],[111,1],[109,1],[112,70],[119,1],[120,71],[117,1],[118,1],[108,1],[115,1],[114,70],[107,1],[116,1],[113,72],[51,81],[121,81],[122,81],[123,81],[126,77],[127,81],[124,81],[125,82],[47,1],[48,1],[9,1],[10,1],[14,1],[13,1],[3,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[4,1],[5,1],[26,1],[23,1],[24,1],[25,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[37,1],[34,1],[35,1],[36,1],[38,1],[8,1],[39,1],[44,1],[45,1],[40,1],[41,1],[42,1],[43,1],[2,1],[1,1],[46,1],[12,1],[11,1]],"semanticDiagnosticsPerFile":[128,129,149,131,132,130,133,134,135,136,137,138,139,140,141,142,143,148,144,145,52,53,55,56,57,58,59,60,61,62,63,64,65,67,66,68,69,70,54,104,71,72,73,105,74,75,76,77,78,79,80,81,82,83,84,85,86,88,87,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,146,147,150,152,151,153,154,155,156,49,106,110,111,109,112,119,120,117,118,108,115,114,107,116,113,51,121,122,123,126,127,124,50,125,47,48,9,10,14,13,3,15,16,17,18,19,20,21,22,4,5,26,23,24,25,27,28,29,6,30,31,32,33,7,37,34,35,36,38,8,39,44,45,40,41,42,43,2,1,46,12,11],"latestChangedDtsFile":"./source/nodejs/xml2json_fs.d.ts"},"version":"5.0.4"}
|