docx 8.2.0 → 8.2.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/README.md +0 -3
- package/build/export/formatter.spec.d.ts +1 -0
- package/build/export/packer/image-replacer.spec.d.ts +1 -0
- package/build/export/packer/next-compiler.spec.d.ts +1 -0
- package/build/export/packer/packer.spec.d.ts +1 -0
- package/build/file/border/border.spec.d.ts +1 -0
- package/build/file/checkbox/checkbox-util.spec.d.ts +1 -0
- package/build/file/checkbox/checkbox.spec.d.ts +1 -0
- package/build/file/content-types/content-types.spec.d.ts +1 -0
- package/build/file/core-properties/properties.spec.d.ts +1 -0
- package/build/file/custom-properties/custom-properties.spec.d.ts +1 -0
- package/build/file/document/body/body.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/columns.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/doc-grid.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/header-footer-reference.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/page-borders.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/page-size.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/page-text-direction.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/section-type.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/section-properties.spec.d.ts +1 -0
- package/build/file/document/document-background/document-background.spec.d.ts +1 -0
- package/build/file/document/document.spec.d.ts +1 -0
- package/build/file/document-wrapper.spec.d.ts +1 -0
- package/build/file/drawing/anchor/anchor.spec.d.ts +1 -0
- package/build/file/drawing/doc-properties/doc-properties-children.spec.d.ts +1 -0
- package/build/file/drawing/drawing.spec.d.ts +1 -0
- package/build/file/drawing/floating/align.spec.d.ts +1 -0
- package/build/file/drawing/floating/horizontal-position.spec.d.ts +1 -0
- package/build/file/drawing/floating/position-offset.spec.d.ts +1 -0
- package/build/file/drawing/floating/simple-pos.spec.d.ts +1 -0
- package/build/file/drawing/floating/vertical-position.spec.d.ts +1 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form.spec.d.ts +1 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/no-fill.d.ts +4 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/no-fill.spec.d.ts +1 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.d.ts +4 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.spec.d.ts +1 -0
- package/build/file/file.spec.d.ts +1 -0
- package/build/file/footer/footer.spec.d.ts +1 -0
- package/build/file/footer/index.d.ts +1 -0
- package/build/file/footer-wrapper.spec.d.ts +1 -0
- package/build/file/footnotes/footnote/footnote.spec.d.ts +1 -0
- package/build/file/footnotes-wrapper.spec.d.ts +1 -0
- package/build/file/header/header.spec.d.ts +1 -0
- package/build/file/header/index.d.ts +1 -0
- package/build/file/header-wrapper.spec.d.ts +1 -0
- package/build/file/media/media.spec.d.ts +1 -0
- package/build/file/numbering/abstract-numbering.spec.d.ts +1 -0
- package/build/file/numbering/concrete-numbering.spec.d.ts +1 -0
- package/build/file/numbering/level.spec.d.ts +1 -0
- package/build/file/numbering/numbering.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/alignment.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/border.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/break.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/indent.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/spacing.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/style.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/tab-stop.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/unordered-list.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/width.d.ts +0 -0
- package/build/file/paragraph/formatting/word-wrap.spec.d.ts +1 -0
- package/build/file/paragraph/frame/frame-properties.spec.d.ts +1 -0
- package/build/file/paragraph/links/bookmark.spec.d.ts +1 -0
- package/build/file/paragraph/links/hyperlink.spec.d.ts +1 -0
- package/build/file/paragraph/links/outline-level.spec.d.ts +1 -0
- package/build/file/paragraph/links/pageref-field-instruction.spec.d.ts +1 -0
- package/build/file/paragraph/links/pageref.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-angled-brackets.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-beginning-character.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-bracket-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-curly-brackets.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-ending-character.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-round-brackets.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-square-brackets.spec.d.ts +1 -0
- package/build/file/paragraph/math/fraction/math-denominator.spec.d.ts +1 -0
- package/build/file/paragraph/math/fraction/math-fraction.spec.d.ts +1 -0
- package/build/file/paragraph/math/fraction/math-numerator.spec.d.ts +1 -0
- package/build/file/paragraph/math/function/math-function-name.spec.d.ts +1 -0
- package/build/file/paragraph/math/function/math-function-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/function/math-function.spec.d.ts +1 -0
- package/build/file/paragraph/math/math-run.spec.d.ts +1 -0
- package/build/file/paragraph/math/math-text.spec.d.ts +1 -0
- package/build/file/paragraph/math/math.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-accent-character.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-base.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-integral.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-limit-location.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-n-ary-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-sub-script-hide.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-sub-script.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-sum.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-super-script-hide.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-super-script.spec.d.ts +1 -0
- package/build/file/paragraph/math/radical/math-degree-hide.spec.d.ts +1 -0
- package/build/file/paragraph/math/radical/math-degree.spec.d.ts +1 -0
- package/build/file/paragraph/math/radical/math-radical-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/radical/math-radical.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/sub-script/math-sub-script-function-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/sub-script/math-sub-script-function.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/super-script/math-super-script-function-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/super-script/math-super-script-function.spec.d.ts +1 -0
- package/build/file/paragraph/paragraph.spec.d.ts +1 -0
- package/build/file/paragraph/properties.spec.d.ts +1 -0
- package/build/file/paragraph/run/break.spec.d.ts +1 -0
- package/build/file/paragraph/run/comment-run.spec.d.ts +1 -0
- package/build/file/paragraph/run/emphasis-mark.spec.d.ts +1 -0
- package/build/file/paragraph/run/empty-children.spec.d.ts +1 -0
- package/build/file/paragraph/run/formatting.spec.d.ts +1 -0
- package/build/file/paragraph/run/image-run.spec.d.ts +1 -0
- package/build/file/paragraph/run/language.spec.d.ts +1 -0
- package/build/file/paragraph/run/page-number.spec.d.ts +1 -0
- package/build/file/paragraph/run/positional-tab.spec.d.ts +1 -0
- package/build/file/paragraph/run/run-components/symbol.spec.d.ts +1 -0
- package/build/file/paragraph/run/run-components/text.spec.d.ts +1 -0
- package/build/file/paragraph/run/run-fonts.spec.d.ts +1 -0
- package/build/file/paragraph/run/run.spec.d.ts +1 -0
- package/build/file/paragraph/run/script.spec.d.ts +1 -0
- package/build/file/paragraph/run/sequential-identifier.spec.d.ts +1 -0
- package/build/file/paragraph/run/simple-field.spec.d.ts +1 -0
- package/build/file/paragraph/run/symbol-run.spec.d.ts +1 -0
- package/build/file/paragraph/run/text-run.spec.d.ts +1 -0
- package/build/file/paragraph/run/underline.spec.d.ts +1 -0
- package/build/file/relationships/relationships.spec.d.ts +1 -0
- package/build/file/settings/compatibility-setting/compatibility-setting.spec.d.ts +1 -0
- package/build/file/settings/compatibility.spec.d.ts +1 -0
- package/build/file/settings/settings.spec.d.ts +1 -0
- package/build/file/shading/shading.spec.d.ts +1 -0
- package/build/file/styles/defaults/document-defaults.spec.d.ts +1 -0
- package/build/file/styles/external-styles-factory.spec.d.ts +1 -0
- package/build/file/styles/latent-styles/exceptions.d.ts +20 -0
- package/build/file/styles/latent-styles/exceptions.spec.d.ts +1 -0
- package/build/file/styles/latent-styles/index.d.ts +1 -0
- package/build/file/styles/latent-styles/latent-styles.d.ts +5 -0
- package/build/file/styles/latent-styles/latent-styles.spec.d.ts +1 -0
- package/build/file/styles/sample/default-style.d.ts +1 -0
- package/build/file/styles/sample/default-style.spec.d.ts +1 -0
- package/build/file/styles/sample/index.d.ts +1 -0
- package/build/file/styles/style/character-style.spec.d.ts +1 -0
- package/build/file/styles/style/components.spec.d.ts +1 -0
- package/build/file/styles/style/default-styles.spec.d.ts +1 -0
- package/build/file/styles/style/paragraph-style.spec.d.ts +1 -0
- package/build/file/styles/style/style.spec.d.ts +1 -0
- package/build/file/styles/styles.spec.d.ts +1 -0
- package/build/file/table/grid.spec.d.ts +1 -0
- package/build/file/table/table-cell/table-cell-properties.spec.d.ts +1 -0
- package/build/file/table/table-cell/table-cell.spec.d.ts +1 -0
- package/build/file/table/table-properties/table-borders.spec.d.ts +1 -0
- package/build/file/table/table-properties/table-cell-margin.spec.d.ts +1 -0
- package/build/file/table/table-properties/table-float-properties.spec.d.ts +1 -0
- package/build/file/table/table-properties/table-properties.spec.d.ts +1 -0
- package/build/file/table/table-row/table-row-properties.spec.d.ts +1 -0
- package/build/file/table/table-row/table-row.spec.d.ts +1 -0
- package/build/file/table/table.spec.d.ts +1 -0
- package/build/file/table-of-contents/table-of-contents.spec.d.ts +1 -0
- package/build/file/track-revision/track-revision-components/deleted-page-number.spec.d.ts +1 -0
- package/build/file/track-revision/track-revision-components/deleted-text-run.spec.d.ts +1 -0
- package/build/file/track-revision/track-revision-components/deleted-text.spec.d.ts +1 -0
- package/build/file/track-revision/track-revision-components/inserted-text-run.spec.d.ts +1 -0
- package/build/file/xml-components/attribute.spec.d.ts +1 -0
- package/build/file/xml-components/imported-xml-component.spec.d.ts +1 -0
- package/build/file/xml-components/simple-elements.spec.d.ts +1 -0
- package/build/file/xml-components/xml-component.spec.d.ts +1 -0
- package/build/index.cjs +1002 -1002
- package/build/index.iife.js +1002 -1002
- package/build/index.js +1002 -1002
- package/build/index.spec.d.ts +1 -0
- package/build/{index.umd.cjs → index.umd.js} +1002 -1002
- package/build/patcher/content-types-manager.spec.d.ts +1 -0
- package/build/patcher/from-docx.d.ts +1 -1
- package/build/patcher/from-docx.spec.d.ts +1 -0
- package/build/patcher/paragraph-split-inject.spec.d.ts +1 -0
- package/build/patcher/paragraph-token-replacer.spec.d.ts +1 -0
- package/build/patcher/relationship-manager.spec.d.ts +1 -0
- package/build/patcher/replacer.spec.d.ts +1 -0
- package/build/patcher/run-renderer.spec.d.ts +1 -0
- package/build/patcher/traverser.spec.d.ts +1 -0
- package/build/patcher/util.spec.d.ts +1 -0
- package/build/tests/utility.d.ts +3 -0
- package/build/util/convenience-functions.spec.d.ts +1 -0
- package/build/util/values.spec.d.ts +1 -0
- package/package.json +7 -11
|
@@ -114,448 +114,843 @@ var __publicField = (obj, key, value) => {
|
|
|
114
114
|
function getDefaultExportFromCjs(x) {
|
|
115
115
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
116
116
|
}
|
|
117
|
-
var
|
|
118
|
-
var
|
|
119
|
-
var
|
|
120
|
-
function
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
117
|
+
var sax$1 = {};
|
|
118
|
+
var events = { exports: {} };
|
|
119
|
+
var R = typeof Reflect === "object" ? Reflect : null;
|
|
120
|
+
var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
|
121
|
+
return Function.prototype.apply.call(target, receiver, args);
|
|
122
|
+
};
|
|
123
|
+
var ReflectOwnKeys;
|
|
124
|
+
if (R && typeof R.ownKeys === "function") {
|
|
125
|
+
ReflectOwnKeys = R.ownKeys;
|
|
126
|
+
} else if (Object.getOwnPropertySymbols) {
|
|
127
|
+
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
128
|
+
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
|
129
|
+
};
|
|
130
|
+
} else {
|
|
131
|
+
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
132
|
+
return Object.getOwnPropertyNames(target);
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function ProcessEmitWarning(warning) {
|
|
136
|
+
if (console && console.warn)
|
|
137
|
+
console.warn(warning);
|
|
138
|
+
}
|
|
139
|
+
var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {
|
|
140
|
+
return value !== value;
|
|
141
|
+
};
|
|
142
|
+
function EventEmitter() {
|
|
143
|
+
EventEmitter.init.call(this);
|
|
144
|
+
}
|
|
145
|
+
events.exports = EventEmitter;
|
|
146
|
+
events.exports.once = once;
|
|
147
|
+
EventEmitter.EventEmitter = EventEmitter;
|
|
148
|
+
EventEmitter.prototype._events = void 0;
|
|
149
|
+
EventEmitter.prototype._eventsCount = 0;
|
|
150
|
+
EventEmitter.prototype._maxListeners = void 0;
|
|
151
|
+
var defaultMaxListeners = 10;
|
|
152
|
+
function checkListener(listener) {
|
|
153
|
+
if (typeof listener !== "function") {
|
|
154
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
134
155
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
156
|
+
}
|
|
157
|
+
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
|
|
158
|
+
enumerable: true,
|
|
159
|
+
get: function() {
|
|
160
|
+
return defaultMaxListeners;
|
|
161
|
+
},
|
|
162
|
+
set: function(arg) {
|
|
163
|
+
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
|
|
164
|
+
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
|
|
141
165
|
}
|
|
142
|
-
|
|
143
|
-
if (validLen === -1)
|
|
144
|
-
validLen = len2;
|
|
145
|
-
var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
|
|
146
|
-
return [validLen, placeHoldersLen];
|
|
166
|
+
defaultMaxListeners = arg;
|
|
147
167
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
168
|
+
});
|
|
169
|
+
EventEmitter.init = function() {
|
|
170
|
+
if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
|
|
171
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
172
|
+
this._eventsCount = 0;
|
|
153
173
|
}
|
|
154
|
-
|
|
155
|
-
|
|
174
|
+
this._maxListeners = this._maxListeners || void 0;
|
|
175
|
+
};
|
|
176
|
+
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
|
177
|
+
if (typeof n !== "number" || n < 0 || NumberIsNaN(n)) {
|
|
178
|
+
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + ".");
|
|
156
179
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
+
this._maxListeners = n;
|
|
181
|
+
return this;
|
|
182
|
+
};
|
|
183
|
+
function _getMaxListeners(that) {
|
|
184
|
+
if (that._maxListeners === void 0)
|
|
185
|
+
return EventEmitter.defaultMaxListeners;
|
|
186
|
+
return that._maxListeners;
|
|
187
|
+
}
|
|
188
|
+
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
|
189
|
+
return _getMaxListeners(this);
|
|
190
|
+
};
|
|
191
|
+
EventEmitter.prototype.emit = function emit(type) {
|
|
192
|
+
var args = [];
|
|
193
|
+
for (var i = 1; i < arguments.length; i++)
|
|
194
|
+
args.push(arguments[i]);
|
|
195
|
+
var doError = type === "error";
|
|
196
|
+
var events2 = this._events;
|
|
197
|
+
if (events2 !== void 0)
|
|
198
|
+
doError = doError && events2.error === void 0;
|
|
199
|
+
else if (!doError)
|
|
200
|
+
return false;
|
|
201
|
+
if (doError) {
|
|
202
|
+
var er;
|
|
203
|
+
if (args.length > 0)
|
|
204
|
+
er = args[0];
|
|
205
|
+
if (er instanceof Error) {
|
|
206
|
+
throw er;
|
|
180
207
|
}
|
|
181
|
-
|
|
208
|
+
var err = new Error("Unhandled error." + (er ? " (" + er.message + ")" : ""));
|
|
209
|
+
err.context = er;
|
|
210
|
+
throw err;
|
|
182
211
|
}
|
|
183
|
-
|
|
184
|
-
|
|
212
|
+
var handler = events2[type];
|
|
213
|
+
if (handler === void 0)
|
|
214
|
+
return false;
|
|
215
|
+
if (typeof handler === "function") {
|
|
216
|
+
ReflectApply(handler, this, args);
|
|
217
|
+
} else {
|
|
218
|
+
var len = handler.length;
|
|
219
|
+
var listeners = arrayClone(handler, len);
|
|
220
|
+
for (var i = 0; i < len; ++i)
|
|
221
|
+
ReflectApply(listeners[i], this, args);
|
|
185
222
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
223
|
+
return true;
|
|
224
|
+
};
|
|
225
|
+
function _addListener(target, type, listener, prepend) {
|
|
226
|
+
var m;
|
|
227
|
+
var events2;
|
|
228
|
+
var existing;
|
|
229
|
+
checkListener(listener);
|
|
230
|
+
events2 = target._events;
|
|
231
|
+
if (events2 === void 0) {
|
|
232
|
+
events2 = target._events = /* @__PURE__ */ Object.create(null);
|
|
233
|
+
target._eventsCount = 0;
|
|
234
|
+
} else {
|
|
235
|
+
if (events2.newListener !== void 0) {
|
|
236
|
+
target.emit(
|
|
237
|
+
"newListener",
|
|
238
|
+
type,
|
|
239
|
+
listener.listener ? listener.listener : listener
|
|
240
|
+
);
|
|
241
|
+
events2 = target._events;
|
|
192
242
|
}
|
|
193
|
-
|
|
243
|
+
existing = events2[type];
|
|
194
244
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
245
|
+
if (existing === void 0) {
|
|
246
|
+
existing = events2[type] = listener;
|
|
247
|
+
++target._eventsCount;
|
|
248
|
+
} else {
|
|
249
|
+
if (typeof existing === "function") {
|
|
250
|
+
existing = events2[type] = prepend ? [listener, existing] : [existing, listener];
|
|
251
|
+
} else if (prepend) {
|
|
252
|
+
existing.unshift(listener);
|
|
253
|
+
} else {
|
|
254
|
+
existing.push(listener);
|
|
203
255
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
);
|
|
256
|
+
m = _getMaxListeners(target);
|
|
257
|
+
if (m > 0 && existing.length > m && !existing.warned) {
|
|
258
|
+
existing.warned = true;
|
|
259
|
+
var w = new Error("Possible EventEmitter memory leak detected. " + existing.length + " " + String(type) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
260
|
+
w.name = "MaxListenersExceededWarning";
|
|
261
|
+
w.emitter = target;
|
|
262
|
+
w.type = type;
|
|
263
|
+
w.count = existing.length;
|
|
264
|
+
ProcessEmitWarning(w);
|
|
214
265
|
}
|
|
215
|
-
return parts.join("");
|
|
216
266
|
}
|
|
217
|
-
return
|
|
267
|
+
return target;
|
|
218
268
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
269
|
+
EventEmitter.prototype.addListener = function addListener(type, listener) {
|
|
270
|
+
return _addListener(this, type, listener, false);
|
|
271
|
+
};
|
|
272
|
+
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
|
273
|
+
EventEmitter.prototype.prependListener = function prependListener(type, listener) {
|
|
274
|
+
return _addListener(this, type, listener, true);
|
|
275
|
+
};
|
|
276
|
+
function onceWrapper() {
|
|
277
|
+
if (!this.fired) {
|
|
278
|
+
this.target.removeListener(this.type, this.wrapFn);
|
|
279
|
+
this.fired = true;
|
|
280
|
+
if (arguments.length === 0)
|
|
281
|
+
return this.listener.call(this.target);
|
|
282
|
+
return this.listener.apply(this.target, arguments);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
function _onceWrap(target, type, listener) {
|
|
286
|
+
var state2 = { fired: false, wrapFn: void 0, target, type, listener };
|
|
287
|
+
var wrapped = onceWrapper.bind(state2);
|
|
288
|
+
wrapped.listener = listener;
|
|
289
|
+
state2.wrapFn = wrapped;
|
|
290
|
+
return wrapped;
|
|
291
|
+
}
|
|
292
|
+
EventEmitter.prototype.once = function once2(type, listener) {
|
|
293
|
+
checkListener(listener);
|
|
294
|
+
this.on(type, _onceWrap(this, type, listener));
|
|
295
|
+
return this;
|
|
296
|
+
};
|
|
297
|
+
EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) {
|
|
298
|
+
checkListener(listener);
|
|
299
|
+
this.prependListener(type, _onceWrap(this, type, listener));
|
|
300
|
+
return this;
|
|
301
|
+
};
|
|
302
|
+
EventEmitter.prototype.removeListener = function removeListener(type, listener) {
|
|
303
|
+
var list, events2, position, i, originalListener;
|
|
304
|
+
checkListener(listener);
|
|
305
|
+
events2 = this._events;
|
|
306
|
+
if (events2 === void 0)
|
|
307
|
+
return this;
|
|
308
|
+
list = events2[type];
|
|
309
|
+
if (list === void 0)
|
|
310
|
+
return this;
|
|
311
|
+
if (list === listener || list.listener === listener) {
|
|
312
|
+
if (--this._eventsCount === 0)
|
|
313
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
314
|
+
else {
|
|
315
|
+
delete events2[type];
|
|
316
|
+
if (events2.removeListener)
|
|
317
|
+
this.emit("removeListener", type, list.listener || listener);
|
|
253
318
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
|
|
262
|
-
var i = isLE ? 0 : nBytes - 1;
|
|
263
|
-
var d = isLE ? 1 : -1;
|
|
264
|
-
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
|
265
|
-
value = Math.abs(value);
|
|
266
|
-
if (isNaN(value) || value === Infinity) {
|
|
267
|
-
m = isNaN(value) ? 1 : 0;
|
|
268
|
-
e = eMax;
|
|
269
|
-
} else {
|
|
270
|
-
e = Math.floor(Math.log(value) / Math.LN2);
|
|
271
|
-
if (value * (c = Math.pow(2, -e)) < 1) {
|
|
272
|
-
e--;
|
|
273
|
-
c *= 2;
|
|
274
|
-
}
|
|
275
|
-
if (e + eBias >= 1) {
|
|
276
|
-
value += rt / c;
|
|
277
|
-
} else {
|
|
278
|
-
value += rt * Math.pow(2, 1 - eBias);
|
|
279
|
-
}
|
|
280
|
-
if (value * c >= 2) {
|
|
281
|
-
e++;
|
|
282
|
-
c /= 2;
|
|
283
|
-
}
|
|
284
|
-
if (e + eBias >= eMax) {
|
|
285
|
-
m = 0;
|
|
286
|
-
e = eMax;
|
|
287
|
-
} else if (e + eBias >= 1) {
|
|
288
|
-
m = (value * c - 1) * Math.pow(2, mLen);
|
|
289
|
-
e = e + eBias;
|
|
290
|
-
} else {
|
|
291
|
-
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
|
292
|
-
e = 0;
|
|
319
|
+
} else if (typeof list !== "function") {
|
|
320
|
+
position = -1;
|
|
321
|
+
for (i = list.length - 1; i >= 0; i--) {
|
|
322
|
+
if (list[i] === listener || list[i].listener === listener) {
|
|
323
|
+
originalListener = list[i].listener;
|
|
324
|
+
position = i;
|
|
325
|
+
break;
|
|
293
326
|
}
|
|
294
327
|
}
|
|
295
|
-
|
|
328
|
+
if (position < 0)
|
|
329
|
+
return this;
|
|
330
|
+
if (position === 0)
|
|
331
|
+
list.shift();
|
|
332
|
+
else {
|
|
333
|
+
spliceOne(list, position);
|
|
296
334
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
335
|
+
if (list.length === 1)
|
|
336
|
+
events2[type] = list[0];
|
|
337
|
+
if (events2.removeListener !== void 0)
|
|
338
|
+
this.emit("removeListener", type, originalListener || listener);
|
|
339
|
+
}
|
|
340
|
+
return this;
|
|
341
|
+
};
|
|
342
|
+
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
|
343
|
+
EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) {
|
|
344
|
+
var listeners, events2, i;
|
|
345
|
+
events2 = this._events;
|
|
346
|
+
if (events2 === void 0)
|
|
347
|
+
return this;
|
|
348
|
+
if (events2.removeListener === void 0) {
|
|
349
|
+
if (arguments.length === 0) {
|
|
350
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
351
|
+
this._eventsCount = 0;
|
|
352
|
+
} else if (events2[type] !== void 0) {
|
|
353
|
+
if (--this._eventsCount === 0)
|
|
354
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
355
|
+
else
|
|
356
|
+
delete events2[type];
|
|
300
357
|
}
|
|
301
|
-
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
var hasRequiredBuffer;
|
|
312
|
-
function requireBuffer() {
|
|
313
|
-
if (hasRequiredBuffer)
|
|
314
|
-
return buffer;
|
|
315
|
-
hasRequiredBuffer = 1;
|
|
316
|
-
(function(exports3) {
|
|
317
|
-
var base64 = requireBase64Js();
|
|
318
|
-
var ieee7542 = requireIeee754();
|
|
319
|
-
var customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
|
|
320
|
-
exports3.Buffer = Buffer2;
|
|
321
|
-
exports3.SlowBuffer = SlowBuffer;
|
|
322
|
-
exports3.INSPECT_MAX_BYTES = 50;
|
|
323
|
-
var K_MAX_LENGTH = 2147483647;
|
|
324
|
-
exports3.kMaxLength = K_MAX_LENGTH;
|
|
325
|
-
Buffer2.TYPED_ARRAY_SUPPORT = typedArraySupport();
|
|
326
|
-
if (!Buffer2.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
|
|
327
|
-
console.error(
|
|
328
|
-
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
329
|
-
);
|
|
358
|
+
return this;
|
|
359
|
+
}
|
|
360
|
+
if (arguments.length === 0) {
|
|
361
|
+
var keys = Object.keys(events2);
|
|
362
|
+
var key;
|
|
363
|
+
for (i = 0; i < keys.length; ++i) {
|
|
364
|
+
key = keys[i];
|
|
365
|
+
if (key === "removeListener")
|
|
366
|
+
continue;
|
|
367
|
+
this.removeAllListeners(key);
|
|
330
368
|
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
}
|
|
369
|
+
this.removeAllListeners("removeListener");
|
|
370
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
371
|
+
this._eventsCount = 0;
|
|
372
|
+
return this;
|
|
373
|
+
}
|
|
374
|
+
listeners = events2[type];
|
|
375
|
+
if (typeof listeners === "function") {
|
|
376
|
+
this.removeListener(type, listeners);
|
|
377
|
+
} else if (listeners !== void 0) {
|
|
378
|
+
for (i = listeners.length - 1; i >= 0; i--) {
|
|
379
|
+
this.removeListener(type, listeners[i]);
|
|
343
380
|
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
381
|
+
}
|
|
382
|
+
return this;
|
|
383
|
+
};
|
|
384
|
+
function _listeners(target, type, unwrap) {
|
|
385
|
+
var events2 = target._events;
|
|
386
|
+
if (events2 === void 0)
|
|
387
|
+
return [];
|
|
388
|
+
var evlistener = events2[type];
|
|
389
|
+
if (evlistener === void 0)
|
|
390
|
+
return [];
|
|
391
|
+
if (typeof evlistener === "function")
|
|
392
|
+
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
|
|
393
|
+
return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
|
394
|
+
}
|
|
395
|
+
EventEmitter.prototype.listeners = function listeners(type) {
|
|
396
|
+
return _listeners(this, type, true);
|
|
397
|
+
};
|
|
398
|
+
EventEmitter.prototype.rawListeners = function rawListeners(type) {
|
|
399
|
+
return _listeners(this, type, false);
|
|
400
|
+
};
|
|
401
|
+
EventEmitter.listenerCount = function(emitter, type) {
|
|
402
|
+
if (typeof emitter.listenerCount === "function") {
|
|
403
|
+
return emitter.listenerCount(type);
|
|
404
|
+
} else {
|
|
405
|
+
return listenerCount.call(emitter, type);
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
EventEmitter.prototype.listenerCount = listenerCount;
|
|
409
|
+
function listenerCount(type) {
|
|
410
|
+
var events2 = this._events;
|
|
411
|
+
if (events2 !== void 0) {
|
|
412
|
+
var evlistener = events2[type];
|
|
413
|
+
if (typeof evlistener === "function") {
|
|
414
|
+
return 1;
|
|
415
|
+
} else if (evlistener !== void 0) {
|
|
416
|
+
return evlistener.length;
|
|
367
417
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
418
|
+
}
|
|
419
|
+
return 0;
|
|
420
|
+
}
|
|
421
|
+
EventEmitter.prototype.eventNames = function eventNames() {
|
|
422
|
+
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
|
423
|
+
};
|
|
424
|
+
function arrayClone(arr, n) {
|
|
425
|
+
var copy = new Array(n);
|
|
426
|
+
for (var i = 0; i < n; ++i)
|
|
427
|
+
copy[i] = arr[i];
|
|
428
|
+
return copy;
|
|
429
|
+
}
|
|
430
|
+
function spliceOne(list, index) {
|
|
431
|
+
for (; index + 1 < list.length; index++)
|
|
432
|
+
list[index] = list[index + 1];
|
|
433
|
+
list.pop();
|
|
434
|
+
}
|
|
435
|
+
function unwrapListeners(arr) {
|
|
436
|
+
var ret = new Array(arr.length);
|
|
437
|
+
for (var i = 0; i < ret.length; ++i) {
|
|
438
|
+
ret[i] = arr[i].listener || arr[i];
|
|
439
|
+
}
|
|
440
|
+
return ret;
|
|
441
|
+
}
|
|
442
|
+
function once(emitter, name) {
|
|
443
|
+
return new Promise(function(resolve2, reject) {
|
|
444
|
+
function errorListener(err) {
|
|
445
|
+
emitter.removeListener(name, resolver);
|
|
446
|
+
reject(err);
|
|
378
447
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
return fromString(value, encodingOrOffset);
|
|
383
|
-
}
|
|
384
|
-
if (ArrayBuffer.isView(value)) {
|
|
385
|
-
return fromArrayView(value);
|
|
386
|
-
}
|
|
387
|
-
if (value == null) {
|
|
388
|
-
throw new TypeError(
|
|
389
|
-
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
|
|
390
|
-
);
|
|
391
|
-
}
|
|
392
|
-
if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
|
|
393
|
-
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
394
|
-
}
|
|
395
|
-
if (typeof SharedArrayBuffer !== "undefined" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
|
|
396
|
-
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
397
|
-
}
|
|
398
|
-
if (typeof value === "number") {
|
|
399
|
-
throw new TypeError(
|
|
400
|
-
'The "value" argument must not be of type number. Received type number'
|
|
401
|
-
);
|
|
402
|
-
}
|
|
403
|
-
var valueOf = value.valueOf && value.valueOf();
|
|
404
|
-
if (valueOf != null && valueOf !== value) {
|
|
405
|
-
return Buffer2.from(valueOf, encodingOrOffset, length);
|
|
406
|
-
}
|
|
407
|
-
var b = fromObject(value);
|
|
408
|
-
if (b)
|
|
409
|
-
return b;
|
|
410
|
-
if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
|
|
411
|
-
return Buffer2.from(
|
|
412
|
-
value[Symbol.toPrimitive]("string"),
|
|
413
|
-
encodingOrOffset,
|
|
414
|
-
length
|
|
415
|
-
);
|
|
448
|
+
function resolver() {
|
|
449
|
+
if (typeof emitter.removeListener === "function") {
|
|
450
|
+
emitter.removeListener("error", errorListener);
|
|
416
451
|
}
|
|
417
|
-
|
|
418
|
-
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
|
|
419
|
-
);
|
|
452
|
+
resolve2([].slice.call(arguments));
|
|
420
453
|
}
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
Object.setPrototypeOf(Buffer2.prototype, Uint8Array.prototype);
|
|
425
|
-
Object.setPrototypeOf(Buffer2, Uint8Array);
|
|
426
|
-
function assertSize(size) {
|
|
427
|
-
if (typeof size !== "number") {
|
|
428
|
-
throw new TypeError('"size" argument must be of type number');
|
|
429
|
-
} else if (size < 0) {
|
|
430
|
-
throw new RangeError('The value "' + size + '" is invalid for option "size"');
|
|
431
|
-
}
|
|
454
|
+
eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
|
|
455
|
+
if (name !== "error") {
|
|
456
|
+
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
|
432
457
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
|
461
|
+
if (typeof emitter.on === "function") {
|
|
462
|
+
eventTargetAgnosticAddListener(emitter, "error", handler, flags);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
|
466
|
+
if (typeof emitter.on === "function") {
|
|
467
|
+
if (flags.once) {
|
|
468
|
+
emitter.once(name, listener);
|
|
469
|
+
} else {
|
|
470
|
+
emitter.on(name, listener);
|
|
471
|
+
}
|
|
472
|
+
} else if (typeof emitter.addEventListener === "function") {
|
|
473
|
+
emitter.addEventListener(name, function wrapListener(arg) {
|
|
474
|
+
if (flags.once) {
|
|
475
|
+
emitter.removeEventListener(name, wrapListener);
|
|
440
476
|
}
|
|
441
|
-
|
|
477
|
+
listener(arg);
|
|
478
|
+
});
|
|
479
|
+
} else {
|
|
480
|
+
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
var eventsExports = events.exports;
|
|
484
|
+
var inherits_browser = { exports: {} };
|
|
485
|
+
if (typeof Object.create === "function") {
|
|
486
|
+
inherits_browser.exports = function inherits2(ctor, superCtor) {
|
|
487
|
+
if (superCtor) {
|
|
488
|
+
ctor.super_ = superCtor;
|
|
489
|
+
ctor.prototype = Object.create(superCtor.prototype, {
|
|
490
|
+
constructor: {
|
|
491
|
+
value: ctor,
|
|
492
|
+
enumerable: false,
|
|
493
|
+
writable: true,
|
|
494
|
+
configurable: true
|
|
495
|
+
}
|
|
496
|
+
});
|
|
442
497
|
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
498
|
+
};
|
|
499
|
+
} else {
|
|
500
|
+
inherits_browser.exports = function inherits2(ctor, superCtor) {
|
|
501
|
+
if (superCtor) {
|
|
502
|
+
ctor.super_ = superCtor;
|
|
503
|
+
var TempCtor = function() {
|
|
504
|
+
};
|
|
505
|
+
TempCtor.prototype = superCtor.prototype;
|
|
506
|
+
ctor.prototype = new TempCtor();
|
|
507
|
+
ctor.prototype.constructor = ctor;
|
|
449
508
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
var inherits_browserExports = inherits_browser.exports;
|
|
512
|
+
var buffer = {};
|
|
513
|
+
var base64Js = {};
|
|
514
|
+
var hasRequiredBase64Js;
|
|
515
|
+
function requireBase64Js() {
|
|
516
|
+
if (hasRequiredBase64Js)
|
|
517
|
+
return base64Js;
|
|
518
|
+
hasRequiredBase64Js = 1;
|
|
519
|
+
base64Js.byteLength = byteLength;
|
|
520
|
+
base64Js.toByteArray = toByteArray;
|
|
521
|
+
base64Js.fromByteArray = fromByteArray;
|
|
522
|
+
var lookup = [];
|
|
523
|
+
var revLookup = [];
|
|
524
|
+
var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
|
525
|
+
var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
526
|
+
for (var i = 0, len = code.length; i < len; ++i) {
|
|
527
|
+
lookup[i] = code[i];
|
|
528
|
+
revLookup[code.charCodeAt(i)] = i;
|
|
529
|
+
}
|
|
530
|
+
revLookup["-".charCodeAt(0)] = 62;
|
|
531
|
+
revLookup["_".charCodeAt(0)] = 63;
|
|
532
|
+
function getLens(b64) {
|
|
533
|
+
var len2 = b64.length;
|
|
534
|
+
if (len2 % 4 > 0) {
|
|
535
|
+
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
470
536
|
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
537
|
+
var validLen = b64.indexOf("=");
|
|
538
|
+
if (validLen === -1)
|
|
539
|
+
validLen = len2;
|
|
540
|
+
var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
|
|
541
|
+
return [validLen, placeHoldersLen];
|
|
542
|
+
}
|
|
543
|
+
function byteLength(b64) {
|
|
544
|
+
var lens = getLens(b64);
|
|
545
|
+
var validLen = lens[0];
|
|
546
|
+
var placeHoldersLen = lens[1];
|
|
547
|
+
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
548
|
+
}
|
|
549
|
+
function _byteLength(b64, validLen, placeHoldersLen) {
|
|
550
|
+
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
551
|
+
}
|
|
552
|
+
function toByteArray(b64) {
|
|
553
|
+
var tmp;
|
|
554
|
+
var lens = getLens(b64);
|
|
555
|
+
var validLen = lens[0];
|
|
556
|
+
var placeHoldersLen = lens[1];
|
|
557
|
+
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
|
|
558
|
+
var curByte = 0;
|
|
559
|
+
var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
|
|
560
|
+
var i2;
|
|
561
|
+
for (i2 = 0; i2 < len2; i2 += 4) {
|
|
562
|
+
tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];
|
|
563
|
+
arr[curByte++] = tmp >> 16 & 255;
|
|
564
|
+
arr[curByte++] = tmp >> 8 & 255;
|
|
565
|
+
arr[curByte++] = tmp & 255;
|
|
478
566
|
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
|
|
483
|
-
}
|
|
484
|
-
return fromArrayLike(arrayView);
|
|
567
|
+
if (placeHoldersLen === 2) {
|
|
568
|
+
tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;
|
|
569
|
+
arr[curByte++] = tmp & 255;
|
|
485
570
|
}
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
571
|
+
if (placeHoldersLen === 1) {
|
|
572
|
+
tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;
|
|
573
|
+
arr[curByte++] = tmp >> 8 & 255;
|
|
574
|
+
arr[curByte++] = tmp & 255;
|
|
575
|
+
}
|
|
576
|
+
return arr;
|
|
577
|
+
}
|
|
578
|
+
function tripletToBase64(num) {
|
|
579
|
+
return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
|
|
580
|
+
}
|
|
581
|
+
function encodeChunk(uint8, start, end) {
|
|
582
|
+
var tmp;
|
|
583
|
+
var output = [];
|
|
584
|
+
for (var i2 = start; i2 < end; i2 += 3) {
|
|
585
|
+
tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);
|
|
586
|
+
output.push(tripletToBase64(tmp));
|
|
587
|
+
}
|
|
588
|
+
return output.join("");
|
|
589
|
+
}
|
|
590
|
+
function fromByteArray(uint8) {
|
|
591
|
+
var tmp;
|
|
592
|
+
var len2 = uint8.length;
|
|
593
|
+
var extraBytes = len2 % 3;
|
|
594
|
+
var parts = [];
|
|
595
|
+
var maxChunkLength = 16383;
|
|
596
|
+
for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {
|
|
597
|
+
parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength));
|
|
598
|
+
}
|
|
599
|
+
if (extraBytes === 1) {
|
|
600
|
+
tmp = uint8[len2 - 1];
|
|
601
|
+
parts.push(
|
|
602
|
+
lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
|
|
603
|
+
);
|
|
604
|
+
} else if (extraBytes === 2) {
|
|
605
|
+
tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
|
|
606
|
+
parts.push(
|
|
607
|
+
lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
return parts.join("");
|
|
611
|
+
}
|
|
612
|
+
return base64Js;
|
|
613
|
+
}
|
|
614
|
+
var ieee754 = {};
|
|
615
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
616
|
+
var hasRequiredIeee754;
|
|
617
|
+
function requireIeee754() {
|
|
618
|
+
if (hasRequiredIeee754)
|
|
619
|
+
return ieee754;
|
|
620
|
+
hasRequiredIeee754 = 1;
|
|
621
|
+
ieee754.read = function(buffer2, offset, isLE, mLen, nBytes) {
|
|
622
|
+
var e, m;
|
|
623
|
+
var eLen = nBytes * 8 - mLen - 1;
|
|
624
|
+
var eMax = (1 << eLen) - 1;
|
|
625
|
+
var eBias = eMax >> 1;
|
|
626
|
+
var nBits = -7;
|
|
627
|
+
var i = isLE ? nBytes - 1 : 0;
|
|
628
|
+
var d = isLE ? -1 : 1;
|
|
629
|
+
var s = buffer2[offset + i];
|
|
630
|
+
i += d;
|
|
631
|
+
e = s & (1 << -nBits) - 1;
|
|
632
|
+
s >>= -nBits;
|
|
633
|
+
nBits += eLen;
|
|
634
|
+
for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d, nBits -= 8) {
|
|
635
|
+
}
|
|
636
|
+
m = e & (1 << -nBits) - 1;
|
|
637
|
+
e >>= -nBits;
|
|
638
|
+
nBits += mLen;
|
|
639
|
+
for (; nBits > 0; m = m * 256 + buffer2[offset + i], i += d, nBits -= 8) {
|
|
640
|
+
}
|
|
641
|
+
if (e === 0) {
|
|
642
|
+
e = 1 - eBias;
|
|
643
|
+
} else if (e === eMax) {
|
|
644
|
+
return m ? NaN : (s ? -1 : 1) * Infinity;
|
|
645
|
+
} else {
|
|
646
|
+
m = m + Math.pow(2, mLen);
|
|
647
|
+
e = e - eBias;
|
|
648
|
+
}
|
|
649
|
+
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
|
|
650
|
+
};
|
|
651
|
+
ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
|
|
652
|
+
var e, m, c;
|
|
653
|
+
var eLen = nBytes * 8 - mLen - 1;
|
|
654
|
+
var eMax = (1 << eLen) - 1;
|
|
655
|
+
var eBias = eMax >> 1;
|
|
656
|
+
var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
|
|
657
|
+
var i = isLE ? 0 : nBytes - 1;
|
|
658
|
+
var d = isLE ? 1 : -1;
|
|
659
|
+
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
|
660
|
+
value = Math.abs(value);
|
|
661
|
+
if (isNaN(value) || value === Infinity) {
|
|
662
|
+
m = isNaN(value) ? 1 : 0;
|
|
663
|
+
e = eMax;
|
|
664
|
+
} else {
|
|
665
|
+
e = Math.floor(Math.log(value) / Math.LN2);
|
|
666
|
+
if (value * (c = Math.pow(2, -e)) < 1) {
|
|
667
|
+
e--;
|
|
668
|
+
c *= 2;
|
|
669
|
+
}
|
|
670
|
+
if (e + eBias >= 1) {
|
|
671
|
+
value += rt / c;
|
|
498
672
|
} else {
|
|
499
|
-
|
|
673
|
+
value += rt * Math.pow(2, 1 - eBias);
|
|
500
674
|
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
function fromObject(obj) {
|
|
505
|
-
if (Buffer2.isBuffer(obj)) {
|
|
506
|
-
var len = checked(obj.length) | 0;
|
|
507
|
-
var buf = createBuffer(len);
|
|
508
|
-
if (buf.length === 0) {
|
|
509
|
-
return buf;
|
|
510
|
-
}
|
|
511
|
-
obj.copy(buf, 0, 0, len);
|
|
512
|
-
return buf;
|
|
675
|
+
if (value * c >= 2) {
|
|
676
|
+
e++;
|
|
677
|
+
c /= 2;
|
|
513
678
|
}
|
|
514
|
-
if (
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
679
|
+
if (e + eBias >= eMax) {
|
|
680
|
+
m = 0;
|
|
681
|
+
e = eMax;
|
|
682
|
+
} else if (e + eBias >= 1) {
|
|
683
|
+
m = (value * c - 1) * Math.pow(2, mLen);
|
|
684
|
+
e = e + eBias;
|
|
685
|
+
} else {
|
|
686
|
+
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
|
687
|
+
e = 0;
|
|
519
688
|
}
|
|
520
|
-
|
|
521
|
-
|
|
689
|
+
}
|
|
690
|
+
for (; mLen >= 8; buffer2[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) {
|
|
691
|
+
}
|
|
692
|
+
e = e << mLen | m;
|
|
693
|
+
eLen += mLen;
|
|
694
|
+
for (; eLen > 0; buffer2[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
|
|
695
|
+
}
|
|
696
|
+
buffer2[offset + i - d] |= s * 128;
|
|
697
|
+
};
|
|
698
|
+
return ieee754;
|
|
699
|
+
}
|
|
700
|
+
/*!
|
|
701
|
+
* The buffer module from node.js, for the browser.
|
|
702
|
+
*
|
|
703
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
704
|
+
* @license MIT
|
|
705
|
+
*/
|
|
706
|
+
var hasRequiredBuffer;
|
|
707
|
+
function requireBuffer() {
|
|
708
|
+
if (hasRequiredBuffer)
|
|
709
|
+
return buffer;
|
|
710
|
+
hasRequiredBuffer = 1;
|
|
711
|
+
(function(exports3) {
|
|
712
|
+
var base64 = requireBase64Js();
|
|
713
|
+
var ieee7542 = requireIeee754();
|
|
714
|
+
var customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
|
|
715
|
+
exports3.Buffer = Buffer2;
|
|
716
|
+
exports3.SlowBuffer = SlowBuffer;
|
|
717
|
+
exports3.INSPECT_MAX_BYTES = 50;
|
|
718
|
+
var K_MAX_LENGTH = 2147483647;
|
|
719
|
+
exports3.kMaxLength = K_MAX_LENGTH;
|
|
720
|
+
Buffer2.TYPED_ARRAY_SUPPORT = typedArraySupport();
|
|
721
|
+
if (!Buffer2.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
|
|
722
|
+
console.error(
|
|
723
|
+
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
724
|
+
);
|
|
725
|
+
}
|
|
726
|
+
function typedArraySupport() {
|
|
727
|
+
try {
|
|
728
|
+
var arr = new Uint8Array(1);
|
|
729
|
+
var proto = { foo: function() {
|
|
730
|
+
return 42;
|
|
731
|
+
} };
|
|
732
|
+
Object.setPrototypeOf(proto, Uint8Array.prototype);
|
|
733
|
+
Object.setPrototypeOf(arr, proto);
|
|
734
|
+
return arr.foo() === 42;
|
|
735
|
+
} catch (e) {
|
|
736
|
+
return false;
|
|
522
737
|
}
|
|
523
738
|
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
739
|
+
Object.defineProperty(Buffer2.prototype, "parent", {
|
|
740
|
+
enumerable: true,
|
|
741
|
+
get: function() {
|
|
742
|
+
if (!Buffer2.isBuffer(this))
|
|
743
|
+
return void 0;
|
|
744
|
+
return this.buffer;
|
|
527
745
|
}
|
|
528
|
-
|
|
746
|
+
});
|
|
747
|
+
Object.defineProperty(Buffer2.prototype, "offset", {
|
|
748
|
+
enumerable: true,
|
|
749
|
+
get: function() {
|
|
750
|
+
if (!Buffer2.isBuffer(this))
|
|
751
|
+
return void 0;
|
|
752
|
+
return this.byteOffset;
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
function createBuffer(length) {
|
|
756
|
+
if (length > K_MAX_LENGTH) {
|
|
757
|
+
throw new RangeError('The value "' + length + '" is invalid for option "size"');
|
|
758
|
+
}
|
|
759
|
+
var buf = new Uint8Array(length);
|
|
760
|
+
Object.setPrototypeOf(buf, Buffer2.prototype);
|
|
761
|
+
return buf;
|
|
529
762
|
}
|
|
530
|
-
function
|
|
531
|
-
if (
|
|
532
|
-
|
|
763
|
+
function Buffer2(arg, encodingOrOffset, length) {
|
|
764
|
+
if (typeof arg === "number") {
|
|
765
|
+
if (typeof encodingOrOffset === "string") {
|
|
766
|
+
throw new TypeError(
|
|
767
|
+
'The "string" argument must be of type string. Received type number'
|
|
768
|
+
);
|
|
769
|
+
}
|
|
770
|
+
return allocUnsafe(arg);
|
|
533
771
|
}
|
|
534
|
-
return
|
|
772
|
+
return from(arg, encodingOrOffset, length);
|
|
535
773
|
}
|
|
536
|
-
Buffer2.
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
if (
|
|
774
|
+
Buffer2.poolSize = 8192;
|
|
775
|
+
function from(value, encodingOrOffset, length) {
|
|
776
|
+
if (typeof value === "string") {
|
|
777
|
+
return fromString(value, encodingOrOffset);
|
|
778
|
+
}
|
|
779
|
+
if (ArrayBuffer.isView(value)) {
|
|
780
|
+
return fromArrayView(value);
|
|
781
|
+
}
|
|
782
|
+
if (value == null) {
|
|
545
783
|
throw new TypeError(
|
|
546
|
-
|
|
784
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
|
|
547
785
|
);
|
|
548
786
|
}
|
|
549
|
-
if (
|
|
550
|
-
return
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
787
|
+
if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
|
|
788
|
+
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
789
|
+
}
|
|
790
|
+
if (typeof SharedArrayBuffer !== "undefined" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
|
|
791
|
+
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
792
|
+
}
|
|
793
|
+
if (typeof value === "number") {
|
|
794
|
+
throw new TypeError(
|
|
795
|
+
'The "value" argument must not be of type number. Received type number'
|
|
796
|
+
);
|
|
797
|
+
}
|
|
798
|
+
var valueOf = value.valueOf && value.valueOf();
|
|
799
|
+
if (valueOf != null && valueOf !== value) {
|
|
800
|
+
return Buffer2.from(valueOf, encodingOrOffset, length);
|
|
801
|
+
}
|
|
802
|
+
var b = fromObject(value);
|
|
803
|
+
if (b)
|
|
804
|
+
return b;
|
|
805
|
+
if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
|
|
806
|
+
return Buffer2.from(
|
|
807
|
+
value[Symbol.toPrimitive]("string"),
|
|
808
|
+
encodingOrOffset,
|
|
809
|
+
length
|
|
810
|
+
);
|
|
811
|
+
}
|
|
812
|
+
throw new TypeError(
|
|
813
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
|
|
814
|
+
);
|
|
815
|
+
}
|
|
816
|
+
Buffer2.from = function(value, encodingOrOffset, length) {
|
|
817
|
+
return from(value, encodingOrOffset, length);
|
|
818
|
+
};
|
|
819
|
+
Object.setPrototypeOf(Buffer2.prototype, Uint8Array.prototype);
|
|
820
|
+
Object.setPrototypeOf(Buffer2, Uint8Array);
|
|
821
|
+
function assertSize(size) {
|
|
822
|
+
if (typeof size !== "number") {
|
|
823
|
+
throw new TypeError('"size" argument must be of type number');
|
|
824
|
+
} else if (size < 0) {
|
|
825
|
+
throw new RangeError('The value "' + size + '" is invalid for option "size"');
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
function alloc(size, fill, encoding) {
|
|
829
|
+
assertSize(size);
|
|
830
|
+
if (size <= 0) {
|
|
831
|
+
return createBuffer(size);
|
|
832
|
+
}
|
|
833
|
+
if (fill !== void 0) {
|
|
834
|
+
return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
|
|
835
|
+
}
|
|
836
|
+
return createBuffer(size);
|
|
837
|
+
}
|
|
838
|
+
Buffer2.alloc = function(size, fill, encoding) {
|
|
839
|
+
return alloc(size, fill, encoding);
|
|
840
|
+
};
|
|
841
|
+
function allocUnsafe(size) {
|
|
842
|
+
assertSize(size);
|
|
843
|
+
return createBuffer(size < 0 ? 0 : checked(size) | 0);
|
|
844
|
+
}
|
|
845
|
+
Buffer2.allocUnsafe = function(size) {
|
|
846
|
+
return allocUnsafe(size);
|
|
847
|
+
};
|
|
848
|
+
Buffer2.allocUnsafeSlow = function(size) {
|
|
849
|
+
return allocUnsafe(size);
|
|
850
|
+
};
|
|
851
|
+
function fromString(string, encoding) {
|
|
852
|
+
if (typeof encoding !== "string" || encoding === "") {
|
|
853
|
+
encoding = "utf8";
|
|
854
|
+
}
|
|
855
|
+
if (!Buffer2.isEncoding(encoding)) {
|
|
856
|
+
throw new TypeError("Unknown encoding: " + encoding);
|
|
857
|
+
}
|
|
858
|
+
var length = byteLength(string, encoding) | 0;
|
|
859
|
+
var buf = createBuffer(length);
|
|
860
|
+
var actual = buf.write(string, encoding);
|
|
861
|
+
if (actual !== length) {
|
|
862
|
+
buf = buf.slice(0, actual);
|
|
863
|
+
}
|
|
864
|
+
return buf;
|
|
865
|
+
}
|
|
866
|
+
function fromArrayLike(array) {
|
|
867
|
+
var length = array.length < 0 ? 0 : checked(array.length) | 0;
|
|
868
|
+
var buf = createBuffer(length);
|
|
869
|
+
for (var i = 0; i < length; i += 1) {
|
|
870
|
+
buf[i] = array[i] & 255;
|
|
871
|
+
}
|
|
872
|
+
return buf;
|
|
873
|
+
}
|
|
874
|
+
function fromArrayView(arrayView) {
|
|
875
|
+
if (isInstance(arrayView, Uint8Array)) {
|
|
876
|
+
var copy = new Uint8Array(arrayView);
|
|
877
|
+
return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
|
|
878
|
+
}
|
|
879
|
+
return fromArrayLike(arrayView);
|
|
880
|
+
}
|
|
881
|
+
function fromArrayBuffer(array, byteOffset, length) {
|
|
882
|
+
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
|
883
|
+
throw new RangeError('"offset" is outside of buffer bounds');
|
|
884
|
+
}
|
|
885
|
+
if (array.byteLength < byteOffset + (length || 0)) {
|
|
886
|
+
throw new RangeError('"length" is outside of buffer bounds');
|
|
887
|
+
}
|
|
888
|
+
var buf;
|
|
889
|
+
if (byteOffset === void 0 && length === void 0) {
|
|
890
|
+
buf = new Uint8Array(array);
|
|
891
|
+
} else if (length === void 0) {
|
|
892
|
+
buf = new Uint8Array(array, byteOffset);
|
|
893
|
+
} else {
|
|
894
|
+
buf = new Uint8Array(array, byteOffset, length);
|
|
895
|
+
}
|
|
896
|
+
Object.setPrototypeOf(buf, Buffer2.prototype);
|
|
897
|
+
return buf;
|
|
898
|
+
}
|
|
899
|
+
function fromObject(obj) {
|
|
900
|
+
if (Buffer2.isBuffer(obj)) {
|
|
901
|
+
var len = checked(obj.length) | 0;
|
|
902
|
+
var buf = createBuffer(len);
|
|
903
|
+
if (buf.length === 0) {
|
|
904
|
+
return buf;
|
|
905
|
+
}
|
|
906
|
+
obj.copy(buf, 0, 0, len);
|
|
907
|
+
return buf;
|
|
908
|
+
}
|
|
909
|
+
if (obj.length !== void 0) {
|
|
910
|
+
if (typeof obj.length !== "number" || numberIsNaN(obj.length)) {
|
|
911
|
+
return createBuffer(0);
|
|
912
|
+
}
|
|
913
|
+
return fromArrayLike(obj);
|
|
914
|
+
}
|
|
915
|
+
if (obj.type === "Buffer" && Array.isArray(obj.data)) {
|
|
916
|
+
return fromArrayLike(obj.data);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
function checked(length) {
|
|
920
|
+
if (length >= K_MAX_LENGTH) {
|
|
921
|
+
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes");
|
|
922
|
+
}
|
|
923
|
+
return length | 0;
|
|
924
|
+
}
|
|
925
|
+
function SlowBuffer(length) {
|
|
926
|
+
if (+length != length) {
|
|
927
|
+
length = 0;
|
|
928
|
+
}
|
|
929
|
+
return Buffer2.alloc(+length);
|
|
930
|
+
}
|
|
931
|
+
Buffer2.isBuffer = function isBuffer(b) {
|
|
932
|
+
return b != null && b._isBuffer === true && b !== Buffer2.prototype;
|
|
933
|
+
};
|
|
934
|
+
Buffer2.compare = function compare(a, b) {
|
|
935
|
+
if (isInstance(a, Uint8Array))
|
|
936
|
+
a = Buffer2.from(a, a.offset, a.byteLength);
|
|
937
|
+
if (isInstance(b, Uint8Array))
|
|
938
|
+
b = Buffer2.from(b, b.offset, b.byteLength);
|
|
939
|
+
if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) {
|
|
940
|
+
throw new TypeError(
|
|
941
|
+
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
942
|
+
);
|
|
943
|
+
}
|
|
944
|
+
if (a === b)
|
|
945
|
+
return 0;
|
|
946
|
+
var x = a.length;
|
|
947
|
+
var y = b.length;
|
|
948
|
+
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
|
|
949
|
+
if (a[i] !== b[i]) {
|
|
950
|
+
x = a[i];
|
|
951
|
+
y = b[i];
|
|
952
|
+
break;
|
|
953
|
+
}
|
|
559
954
|
}
|
|
560
955
|
if (x < y)
|
|
561
956
|
return -1;
|
|
@@ -1738,626 +2133,231 @@ var __publicField = (obj, key, value) => {
|
|
|
1738
2133
|
}
|
|
1739
2134
|
return byteArray;
|
|
1740
2135
|
}
|
|
1741
|
-
function utf16leToBytes(str, units) {
|
|
1742
|
-
var c, hi, lo;
|
|
1743
|
-
var byteArray = [];
|
|
1744
|
-
for (var i = 0; i < str.length; ++i) {
|
|
1745
|
-
if ((units -= 2) < 0)
|
|
1746
|
-
break;
|
|
1747
|
-
c = str.charCodeAt(i);
|
|
1748
|
-
hi = c >> 8;
|
|
1749
|
-
lo = c % 256;
|
|
1750
|
-
byteArray.push(lo);
|
|
1751
|
-
byteArray.push(hi);
|
|
1752
|
-
}
|
|
1753
|
-
return byteArray;
|
|
1754
|
-
}
|
|
1755
|
-
function base64ToBytes(str) {
|
|
1756
|
-
return base64.toByteArray(base64clean(str));
|
|
1757
|
-
}
|
|
1758
|
-
function blitBuffer(src2, dst, offset, length) {
|
|
1759
|
-
for (var i = 0; i < length; ++i) {
|
|
1760
|
-
if (i + offset >= dst.length || i >= src2.length)
|
|
1761
|
-
break;
|
|
1762
|
-
dst[i + offset] = src2[i];
|
|
1763
|
-
}
|
|
1764
|
-
return i;
|
|
1765
|
-
}
|
|
1766
|
-
function isInstance(obj, type) {
|
|
1767
|
-
return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
|
|
1768
|
-
}
|
|
1769
|
-
function numberIsNaN(obj) {
|
|
1770
|
-
return obj !== obj;
|
|
1771
|
-
}
|
|
1772
|
-
var hexSliceLookupTable = function() {
|
|
1773
|
-
var alphabet = "0123456789abcdef";
|
|
1774
|
-
var table = new Array(256);
|
|
1775
|
-
for (var i = 0; i < 16; ++i) {
|
|
1776
|
-
var i16 = i * 16;
|
|
1777
|
-
for (var j = 0; j < 16; ++j) {
|
|
1778
|
-
table[i16 + j] = alphabet[i] + alphabet[j];
|
|
1779
|
-
}
|
|
1780
|
-
}
|
|
1781
|
-
return table;
|
|
1782
|
-
}();
|
|
1783
|
-
})(buffer);
|
|
1784
|
-
return buffer;
|
|
1785
|
-
}
|
|
1786
|
-
var bufferExports = requireBuffer();
|
|
1787
|
-
var browser$1 = { exports: {} };
|
|
1788
|
-
var process = browser$1.exports = {};
|
|
1789
|
-
var cachedSetTimeout;
|
|
1790
|
-
var cachedClearTimeout;
|
|
1791
|
-
function defaultSetTimout() {
|
|
1792
|
-
throw new Error("setTimeout has not been defined");
|
|
1793
|
-
}
|
|
1794
|
-
function defaultClearTimeout() {
|
|
1795
|
-
throw new Error("clearTimeout has not been defined");
|
|
1796
|
-
}
|
|
1797
|
-
(function() {
|
|
1798
|
-
try {
|
|
1799
|
-
if (typeof setTimeout === "function") {
|
|
1800
|
-
cachedSetTimeout = setTimeout;
|
|
1801
|
-
} else {
|
|
1802
|
-
cachedSetTimeout = defaultSetTimout;
|
|
1803
|
-
}
|
|
1804
|
-
} catch (e) {
|
|
1805
|
-
cachedSetTimeout = defaultSetTimout;
|
|
1806
|
-
}
|
|
1807
|
-
try {
|
|
1808
|
-
if (typeof clearTimeout === "function") {
|
|
1809
|
-
cachedClearTimeout = clearTimeout;
|
|
1810
|
-
} else {
|
|
1811
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
1812
|
-
}
|
|
1813
|
-
} catch (e) {
|
|
1814
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
1815
|
-
}
|
|
1816
|
-
})();
|
|
1817
|
-
function runTimeout(fun) {
|
|
1818
|
-
if (cachedSetTimeout === setTimeout) {
|
|
1819
|
-
return setTimeout(fun, 0);
|
|
1820
|
-
}
|
|
1821
|
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
1822
|
-
cachedSetTimeout = setTimeout;
|
|
1823
|
-
return setTimeout(fun, 0);
|
|
1824
|
-
}
|
|
1825
|
-
try {
|
|
1826
|
-
return cachedSetTimeout(fun, 0);
|
|
1827
|
-
} catch (e) {
|
|
1828
|
-
try {
|
|
1829
|
-
return cachedSetTimeout.call(null, fun, 0);
|
|
1830
|
-
} catch (e2) {
|
|
1831
|
-
return cachedSetTimeout.call(this, fun, 0);
|
|
1832
|
-
}
|
|
1833
|
-
}
|
|
1834
|
-
}
|
|
1835
|
-
function runClearTimeout(marker) {
|
|
1836
|
-
if (cachedClearTimeout === clearTimeout) {
|
|
1837
|
-
return clearTimeout(marker);
|
|
1838
|
-
}
|
|
1839
|
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
1840
|
-
cachedClearTimeout = clearTimeout;
|
|
1841
|
-
return clearTimeout(marker);
|
|
1842
|
-
}
|
|
1843
|
-
try {
|
|
1844
|
-
return cachedClearTimeout(marker);
|
|
1845
|
-
} catch (e) {
|
|
1846
|
-
try {
|
|
1847
|
-
return cachedClearTimeout.call(null, marker);
|
|
1848
|
-
} catch (e2) {
|
|
1849
|
-
return cachedClearTimeout.call(this, marker);
|
|
1850
|
-
}
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
var queue = [];
|
|
1854
|
-
var draining = false;
|
|
1855
|
-
var currentQueue;
|
|
1856
|
-
var queueIndex = -1;
|
|
1857
|
-
function cleanUpNextTick() {
|
|
1858
|
-
if (!draining || !currentQueue) {
|
|
1859
|
-
return;
|
|
1860
|
-
}
|
|
1861
|
-
draining = false;
|
|
1862
|
-
if (currentQueue.length) {
|
|
1863
|
-
queue = currentQueue.concat(queue);
|
|
1864
|
-
} else {
|
|
1865
|
-
queueIndex = -1;
|
|
1866
|
-
}
|
|
1867
|
-
if (queue.length) {
|
|
1868
|
-
drainQueue();
|
|
1869
|
-
}
|
|
1870
|
-
}
|
|
1871
|
-
function drainQueue() {
|
|
1872
|
-
if (draining) {
|
|
1873
|
-
return;
|
|
1874
|
-
}
|
|
1875
|
-
var timeout = runTimeout(cleanUpNextTick);
|
|
1876
|
-
draining = true;
|
|
1877
|
-
var len = queue.length;
|
|
1878
|
-
while (len) {
|
|
1879
|
-
currentQueue = queue;
|
|
1880
|
-
queue = [];
|
|
1881
|
-
while (++queueIndex < len) {
|
|
1882
|
-
if (currentQueue) {
|
|
1883
|
-
currentQueue[queueIndex].run();
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
queueIndex = -1;
|
|
1887
|
-
len = queue.length;
|
|
1888
|
-
}
|
|
1889
|
-
currentQueue = null;
|
|
1890
|
-
draining = false;
|
|
1891
|
-
runClearTimeout(timeout);
|
|
1892
|
-
}
|
|
1893
|
-
process.nextTick = function(fun) {
|
|
1894
|
-
var args = new Array(arguments.length - 1);
|
|
1895
|
-
if (arguments.length > 1) {
|
|
1896
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1897
|
-
args[i - 1] = arguments[i];
|
|
1898
|
-
}
|
|
1899
|
-
}
|
|
1900
|
-
queue.push(new Item(fun, args));
|
|
1901
|
-
if (queue.length === 1 && !draining) {
|
|
1902
|
-
runTimeout(drainQueue);
|
|
1903
|
-
}
|
|
1904
|
-
};
|
|
1905
|
-
function Item(fun, array) {
|
|
1906
|
-
this.fun = fun;
|
|
1907
|
-
this.array = array;
|
|
1908
|
-
}
|
|
1909
|
-
Item.prototype.run = function() {
|
|
1910
|
-
this.fun.apply(null, this.array);
|
|
1911
|
-
};
|
|
1912
|
-
process.title = "browser";
|
|
1913
|
-
process.browser = true;
|
|
1914
|
-
process.env = {};
|
|
1915
|
-
process.argv = [];
|
|
1916
|
-
process.version = "";
|
|
1917
|
-
process.versions = {};
|
|
1918
|
-
function noop() {
|
|
1919
|
-
}
|
|
1920
|
-
process.on = noop;
|
|
1921
|
-
process.addListener = noop;
|
|
1922
|
-
process.once = noop;
|
|
1923
|
-
process.off = noop;
|
|
1924
|
-
process.removeListener = noop;
|
|
1925
|
-
process.removeAllListeners = noop;
|
|
1926
|
-
process.emit = noop;
|
|
1927
|
-
process.prependListener = noop;
|
|
1928
|
-
process.prependOnceListener = noop;
|
|
1929
|
-
process.listeners = function(name) {
|
|
1930
|
-
return [];
|
|
1931
|
-
};
|
|
1932
|
-
process.binding = function(name) {
|
|
1933
|
-
throw new Error("process.binding is not supported");
|
|
1934
|
-
};
|
|
1935
|
-
process.cwd = function() {
|
|
1936
|
-
return "/";
|
|
1937
|
-
};
|
|
1938
|
-
process.chdir = function(dir) {
|
|
1939
|
-
throw new Error("process.chdir is not supported");
|
|
1940
|
-
};
|
|
1941
|
-
process.umask = function() {
|
|
1942
|
-
return 0;
|
|
1943
|
-
};
|
|
1944
|
-
var browserExports = browser$1.exports;
|
|
1945
|
-
const process$1 = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
1946
|
-
(function(Object2) {
|
|
1947
|
-
function get() {
|
|
1948
|
-
var _global2 = this || self;
|
|
1949
|
-
delete Object2.prototype.__magic__;
|
|
1950
|
-
return _global2;
|
|
1951
|
-
}
|
|
1952
|
-
if (typeof globalThis === "object") {
|
|
1953
|
-
return globalThis;
|
|
1954
|
-
}
|
|
1955
|
-
if (this) {
|
|
1956
|
-
return get();
|
|
1957
|
-
} else {
|
|
1958
|
-
Object2.defineProperty(Object2.prototype, "__magic__", {
|
|
1959
|
-
configurable: true,
|
|
1960
|
-
get
|
|
1961
|
-
});
|
|
1962
|
-
var _global = __magic__;
|
|
1963
|
-
return _global;
|
|
1964
|
-
}
|
|
1965
|
-
})(Object);
|
|
1966
|
-
var sax$1 = {};
|
|
1967
|
-
var events = { exports: {} };
|
|
1968
|
-
var R = typeof Reflect === "object" ? Reflect : null;
|
|
1969
|
-
var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
|
1970
|
-
return Function.prototype.apply.call(target, receiver, args);
|
|
1971
|
-
};
|
|
1972
|
-
var ReflectOwnKeys;
|
|
1973
|
-
if (R && typeof R.ownKeys === "function") {
|
|
1974
|
-
ReflectOwnKeys = R.ownKeys;
|
|
1975
|
-
} else if (Object.getOwnPropertySymbols) {
|
|
1976
|
-
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
1977
|
-
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
|
1978
|
-
};
|
|
1979
|
-
} else {
|
|
1980
|
-
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
1981
|
-
return Object.getOwnPropertyNames(target);
|
|
1982
|
-
};
|
|
1983
|
-
}
|
|
1984
|
-
function ProcessEmitWarning(warning) {
|
|
1985
|
-
if (console && console.warn)
|
|
1986
|
-
console.warn(warning);
|
|
1987
|
-
}
|
|
1988
|
-
var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {
|
|
1989
|
-
return value !== value;
|
|
1990
|
-
};
|
|
1991
|
-
function EventEmitter() {
|
|
1992
|
-
EventEmitter.init.call(this);
|
|
1993
|
-
}
|
|
1994
|
-
events.exports = EventEmitter;
|
|
1995
|
-
events.exports.once = once;
|
|
1996
|
-
EventEmitter.EventEmitter = EventEmitter;
|
|
1997
|
-
EventEmitter.prototype._events = void 0;
|
|
1998
|
-
EventEmitter.prototype._eventsCount = 0;
|
|
1999
|
-
EventEmitter.prototype._maxListeners = void 0;
|
|
2000
|
-
var defaultMaxListeners = 10;
|
|
2001
|
-
function checkListener(listener) {
|
|
2002
|
-
if (typeof listener !== "function") {
|
|
2003
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
2004
|
-
}
|
|
2005
|
-
}
|
|
2006
|
-
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
|
|
2007
|
-
enumerable: true,
|
|
2008
|
-
get: function() {
|
|
2009
|
-
return defaultMaxListeners;
|
|
2010
|
-
},
|
|
2011
|
-
set: function(arg) {
|
|
2012
|
-
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
|
|
2013
|
-
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
|
|
2014
|
-
}
|
|
2015
|
-
defaultMaxListeners = arg;
|
|
2016
|
-
}
|
|
2017
|
-
});
|
|
2018
|
-
EventEmitter.init = function() {
|
|
2019
|
-
if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
|
|
2020
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
2021
|
-
this._eventsCount = 0;
|
|
2022
|
-
}
|
|
2023
|
-
this._maxListeners = this._maxListeners || void 0;
|
|
2024
|
-
};
|
|
2025
|
-
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
|
2026
|
-
if (typeof n !== "number" || n < 0 || NumberIsNaN(n)) {
|
|
2027
|
-
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + ".");
|
|
2028
|
-
}
|
|
2029
|
-
this._maxListeners = n;
|
|
2030
|
-
return this;
|
|
2031
|
-
};
|
|
2032
|
-
function _getMaxListeners(that) {
|
|
2033
|
-
if (that._maxListeners === void 0)
|
|
2034
|
-
return EventEmitter.defaultMaxListeners;
|
|
2035
|
-
return that._maxListeners;
|
|
2036
|
-
}
|
|
2037
|
-
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
|
2038
|
-
return _getMaxListeners(this);
|
|
2039
|
-
};
|
|
2040
|
-
EventEmitter.prototype.emit = function emit(type) {
|
|
2041
|
-
var args = [];
|
|
2042
|
-
for (var i = 1; i < arguments.length; i++)
|
|
2043
|
-
args.push(arguments[i]);
|
|
2044
|
-
var doError = type === "error";
|
|
2045
|
-
var events2 = this._events;
|
|
2046
|
-
if (events2 !== void 0)
|
|
2047
|
-
doError = doError && events2.error === void 0;
|
|
2048
|
-
else if (!doError)
|
|
2049
|
-
return false;
|
|
2050
|
-
if (doError) {
|
|
2051
|
-
var er;
|
|
2052
|
-
if (args.length > 0)
|
|
2053
|
-
er = args[0];
|
|
2054
|
-
if (er instanceof Error) {
|
|
2055
|
-
throw er;
|
|
2136
|
+
function utf16leToBytes(str, units) {
|
|
2137
|
+
var c, hi, lo;
|
|
2138
|
+
var byteArray = [];
|
|
2139
|
+
for (var i = 0; i < str.length; ++i) {
|
|
2140
|
+
if ((units -= 2) < 0)
|
|
2141
|
+
break;
|
|
2142
|
+
c = str.charCodeAt(i);
|
|
2143
|
+
hi = c >> 8;
|
|
2144
|
+
lo = c % 256;
|
|
2145
|
+
byteArray.push(lo);
|
|
2146
|
+
byteArray.push(hi);
|
|
2147
|
+
}
|
|
2148
|
+
return byteArray;
|
|
2056
2149
|
}
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
throw err;
|
|
2060
|
-
}
|
|
2061
|
-
var handler = events2[type];
|
|
2062
|
-
if (handler === void 0)
|
|
2063
|
-
return false;
|
|
2064
|
-
if (typeof handler === "function") {
|
|
2065
|
-
ReflectApply(handler, this, args);
|
|
2066
|
-
} else {
|
|
2067
|
-
var len = handler.length;
|
|
2068
|
-
var listeners = arrayClone(handler, len);
|
|
2069
|
-
for (var i = 0; i < len; ++i)
|
|
2070
|
-
ReflectApply(listeners[i], this, args);
|
|
2071
|
-
}
|
|
2072
|
-
return true;
|
|
2073
|
-
};
|
|
2074
|
-
function _addListener(target, type, listener, prepend) {
|
|
2075
|
-
var m;
|
|
2076
|
-
var events2;
|
|
2077
|
-
var existing;
|
|
2078
|
-
checkListener(listener);
|
|
2079
|
-
events2 = target._events;
|
|
2080
|
-
if (events2 === void 0) {
|
|
2081
|
-
events2 = target._events = /* @__PURE__ */ Object.create(null);
|
|
2082
|
-
target._eventsCount = 0;
|
|
2083
|
-
} else {
|
|
2084
|
-
if (events2.newListener !== void 0) {
|
|
2085
|
-
target.emit(
|
|
2086
|
-
"newListener",
|
|
2087
|
-
type,
|
|
2088
|
-
listener.listener ? listener.listener : listener
|
|
2089
|
-
);
|
|
2090
|
-
events2 = target._events;
|
|
2150
|
+
function base64ToBytes(str) {
|
|
2151
|
+
return base64.toByteArray(base64clean(str));
|
|
2091
2152
|
}
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
existing = events2[type] = prepend ? [listener, existing] : [existing, listener];
|
|
2100
|
-
} else if (prepend) {
|
|
2101
|
-
existing.unshift(listener);
|
|
2102
|
-
} else {
|
|
2103
|
-
existing.push(listener);
|
|
2153
|
+
function blitBuffer(src2, dst, offset, length) {
|
|
2154
|
+
for (var i = 0; i < length; ++i) {
|
|
2155
|
+
if (i + offset >= dst.length || i >= src2.length)
|
|
2156
|
+
break;
|
|
2157
|
+
dst[i + offset] = src2[i];
|
|
2158
|
+
}
|
|
2159
|
+
return i;
|
|
2104
2160
|
}
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
existing.warned = true;
|
|
2108
|
-
var w = new Error("Possible EventEmitter memory leak detected. " + existing.length + " " + String(type) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2109
|
-
w.name = "MaxListenersExceededWarning";
|
|
2110
|
-
w.emitter = target;
|
|
2111
|
-
w.type = type;
|
|
2112
|
-
w.count = existing.length;
|
|
2113
|
-
ProcessEmitWarning(w);
|
|
2161
|
+
function isInstance(obj, type) {
|
|
2162
|
+
return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
|
|
2114
2163
|
}
|
|
2115
|
-
|
|
2116
|
-
|
|
2164
|
+
function numberIsNaN(obj) {
|
|
2165
|
+
return obj !== obj;
|
|
2166
|
+
}
|
|
2167
|
+
var hexSliceLookupTable = function() {
|
|
2168
|
+
var alphabet = "0123456789abcdef";
|
|
2169
|
+
var table = new Array(256);
|
|
2170
|
+
for (var i = 0; i < 16; ++i) {
|
|
2171
|
+
var i16 = i * 16;
|
|
2172
|
+
for (var j = 0; j < 16; ++j) {
|
|
2173
|
+
table[i16 + j] = alphabet[i] + alphabet[j];
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
return table;
|
|
2177
|
+
}();
|
|
2178
|
+
})(buffer);
|
|
2179
|
+
return buffer;
|
|
2117
2180
|
}
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
};
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
function onceWrapper() {
|
|
2126
|
-
if (!this.fired) {
|
|
2127
|
-
this.target.removeListener(this.type, this.wrapFn);
|
|
2128
|
-
this.fired = true;
|
|
2129
|
-
if (arguments.length === 0)
|
|
2130
|
-
return this.listener.call(this.target);
|
|
2131
|
-
return this.listener.apply(this.target, arguments);
|
|
2132
|
-
}
|
|
2181
|
+
requireBuffer();
|
|
2182
|
+
var browser$1 = { exports: {} };
|
|
2183
|
+
var process = browser$1.exports = {};
|
|
2184
|
+
var cachedSetTimeout;
|
|
2185
|
+
var cachedClearTimeout;
|
|
2186
|
+
function defaultSetTimout() {
|
|
2187
|
+
throw new Error("setTimeout has not been defined");
|
|
2133
2188
|
}
|
|
2134
|
-
function
|
|
2135
|
-
|
|
2136
|
-
var wrapped = onceWrapper.bind(state2);
|
|
2137
|
-
wrapped.listener = listener;
|
|
2138
|
-
state2.wrapFn = wrapped;
|
|
2139
|
-
return wrapped;
|
|
2189
|
+
function defaultClearTimeout() {
|
|
2190
|
+
throw new Error("clearTimeout has not been defined");
|
|
2140
2191
|
}
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
checkListener(listener);
|
|
2148
|
-
this.prependListener(type, _onceWrap(this, type, listener));
|
|
2149
|
-
return this;
|
|
2150
|
-
};
|
|
2151
|
-
EventEmitter.prototype.removeListener = function removeListener(type, listener) {
|
|
2152
|
-
var list, events2, position, i, originalListener;
|
|
2153
|
-
checkListener(listener);
|
|
2154
|
-
events2 = this._events;
|
|
2155
|
-
if (events2 === void 0)
|
|
2156
|
-
return this;
|
|
2157
|
-
list = events2[type];
|
|
2158
|
-
if (list === void 0)
|
|
2159
|
-
return this;
|
|
2160
|
-
if (list === listener || list.listener === listener) {
|
|
2161
|
-
if (--this._eventsCount === 0)
|
|
2162
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
2163
|
-
else {
|
|
2164
|
-
delete events2[type];
|
|
2165
|
-
if (events2.removeListener)
|
|
2166
|
-
this.emit("removeListener", type, list.listener || listener);
|
|
2167
|
-
}
|
|
2168
|
-
} else if (typeof list !== "function") {
|
|
2169
|
-
position = -1;
|
|
2170
|
-
for (i = list.length - 1; i >= 0; i--) {
|
|
2171
|
-
if (list[i] === listener || list[i].listener === listener) {
|
|
2172
|
-
originalListener = list[i].listener;
|
|
2173
|
-
position = i;
|
|
2174
|
-
break;
|
|
2175
|
-
}
|
|
2192
|
+
(function() {
|
|
2193
|
+
try {
|
|
2194
|
+
if (typeof setTimeout === "function") {
|
|
2195
|
+
cachedSetTimeout = setTimeout;
|
|
2196
|
+
} else {
|
|
2197
|
+
cachedSetTimeout = defaultSetTimout;
|
|
2176
2198
|
}
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2199
|
+
} catch (e) {
|
|
2200
|
+
cachedSetTimeout = defaultSetTimout;
|
|
2201
|
+
}
|
|
2202
|
+
try {
|
|
2203
|
+
if (typeof clearTimeout === "function") {
|
|
2204
|
+
cachedClearTimeout = clearTimeout;
|
|
2205
|
+
} else {
|
|
2206
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
2183
2207
|
}
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
if (events2.removeListener !== void 0)
|
|
2187
|
-
this.emit("removeListener", type, originalListener || listener);
|
|
2208
|
+
} catch (e) {
|
|
2209
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
2188
2210
|
}
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
return
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
delete events2[type];
|
|
2211
|
+
})();
|
|
2212
|
+
function runTimeout(fun) {
|
|
2213
|
+
if (cachedSetTimeout === setTimeout) {
|
|
2214
|
+
return setTimeout(fun, 0);
|
|
2215
|
+
}
|
|
2216
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
2217
|
+
cachedSetTimeout = setTimeout;
|
|
2218
|
+
return setTimeout(fun, 0);
|
|
2219
|
+
}
|
|
2220
|
+
try {
|
|
2221
|
+
return cachedSetTimeout(fun, 0);
|
|
2222
|
+
} catch (e) {
|
|
2223
|
+
try {
|
|
2224
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
2225
|
+
} catch (e2) {
|
|
2226
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
2206
2227
|
}
|
|
2207
|
-
return this;
|
|
2208
2228
|
}
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
key = keys[i];
|
|
2214
|
-
if (key === "removeListener")
|
|
2215
|
-
continue;
|
|
2216
|
-
this.removeAllListeners(key);
|
|
2217
|
-
}
|
|
2218
|
-
this.removeAllListeners("removeListener");
|
|
2219
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
2220
|
-
this._eventsCount = 0;
|
|
2221
|
-
return this;
|
|
2229
|
+
}
|
|
2230
|
+
function runClearTimeout(marker) {
|
|
2231
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
2232
|
+
return clearTimeout(marker);
|
|
2222
2233
|
}
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
|
-
|
|
2234
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
2235
|
+
cachedClearTimeout = clearTimeout;
|
|
2236
|
+
return clearTimeout(marker);
|
|
2237
|
+
}
|
|
2238
|
+
try {
|
|
2239
|
+
return cachedClearTimeout(marker);
|
|
2240
|
+
} catch (e) {
|
|
2241
|
+
try {
|
|
2242
|
+
return cachedClearTimeout.call(null, marker);
|
|
2243
|
+
} catch (e2) {
|
|
2244
|
+
return cachedClearTimeout.call(this, marker);
|
|
2229
2245
|
}
|
|
2230
2246
|
}
|
|
2231
|
-
return this;
|
|
2232
|
-
};
|
|
2233
|
-
function _listeners(target, type, unwrap) {
|
|
2234
|
-
var events2 = target._events;
|
|
2235
|
-
if (events2 === void 0)
|
|
2236
|
-
return [];
|
|
2237
|
-
var evlistener = events2[type];
|
|
2238
|
-
if (evlistener === void 0)
|
|
2239
|
-
return [];
|
|
2240
|
-
if (typeof evlistener === "function")
|
|
2241
|
-
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
|
|
2242
|
-
return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
|
2243
2247
|
}
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2248
|
+
var queue = [];
|
|
2249
|
+
var draining = false;
|
|
2250
|
+
var currentQueue;
|
|
2251
|
+
var queueIndex = -1;
|
|
2252
|
+
function cleanUpNextTick() {
|
|
2253
|
+
if (!draining || !currentQueue) {
|
|
2254
|
+
return;
|
|
2255
|
+
}
|
|
2256
|
+
draining = false;
|
|
2257
|
+
if (currentQueue.length) {
|
|
2258
|
+
queue = currentQueue.concat(queue);
|
|
2253
2259
|
} else {
|
|
2254
|
-
|
|
2260
|
+
queueIndex = -1;
|
|
2255
2261
|
}
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
function listenerCount(type) {
|
|
2259
|
-
var events2 = this._events;
|
|
2260
|
-
if (events2 !== void 0) {
|
|
2261
|
-
var evlistener = events2[type];
|
|
2262
|
-
if (typeof evlistener === "function") {
|
|
2263
|
-
return 1;
|
|
2264
|
-
} else if (evlistener !== void 0) {
|
|
2265
|
-
return evlistener.length;
|
|
2266
|
-
}
|
|
2262
|
+
if (queue.length) {
|
|
2263
|
+
drainQueue();
|
|
2267
2264
|
}
|
|
2268
|
-
return 0;
|
|
2269
|
-
}
|
|
2270
|
-
EventEmitter.prototype.eventNames = function eventNames() {
|
|
2271
|
-
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
|
2272
|
-
};
|
|
2273
|
-
function arrayClone(arr, n) {
|
|
2274
|
-
var copy = new Array(n);
|
|
2275
|
-
for (var i = 0; i < n; ++i)
|
|
2276
|
-
copy[i] = arr[i];
|
|
2277
|
-
return copy;
|
|
2278
|
-
}
|
|
2279
|
-
function spliceOne(list, index) {
|
|
2280
|
-
for (; index + 1 < list.length; index++)
|
|
2281
|
-
list[index] = list[index + 1];
|
|
2282
|
-
list.pop();
|
|
2283
2265
|
}
|
|
2284
|
-
function
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
ret[i] = arr[i].listener || arr[i];
|
|
2266
|
+
function drainQueue() {
|
|
2267
|
+
if (draining) {
|
|
2268
|
+
return;
|
|
2288
2269
|
}
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
if (typeof emitter.removeListener === "function") {
|
|
2299
|
-
emitter.removeListener("error", errorListener);
|
|
2270
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
2271
|
+
draining = true;
|
|
2272
|
+
var len = queue.length;
|
|
2273
|
+
while (len) {
|
|
2274
|
+
currentQueue = queue;
|
|
2275
|
+
queue = [];
|
|
2276
|
+
while (++queueIndex < len) {
|
|
2277
|
+
if (currentQueue) {
|
|
2278
|
+
currentQueue[queueIndex].run();
|
|
2300
2279
|
}
|
|
2301
|
-
resolve2([].slice.call(arguments));
|
|
2302
|
-
}
|
|
2303
|
-
eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
|
|
2304
|
-
if (name !== "error") {
|
|
2305
|
-
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
|
2306
2280
|
}
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
|
2310
|
-
if (typeof emitter.on === "function") {
|
|
2311
|
-
eventTargetAgnosticAddListener(emitter, "error", handler, flags);
|
|
2281
|
+
queueIndex = -1;
|
|
2282
|
+
len = queue.length;
|
|
2312
2283
|
}
|
|
2284
|
+
currentQueue = null;
|
|
2285
|
+
draining = false;
|
|
2286
|
+
runClearTimeout(timeout);
|
|
2313
2287
|
}
|
|
2314
|
-
function
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
emitter.on(name, listener);
|
|
2288
|
+
process.nextTick = function(fun) {
|
|
2289
|
+
var args = new Array(arguments.length - 1);
|
|
2290
|
+
if (arguments.length > 1) {
|
|
2291
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2292
|
+
args[i - 1] = arguments[i];
|
|
2320
2293
|
}
|
|
2321
|
-
} else if (typeof emitter.addEventListener === "function") {
|
|
2322
|
-
emitter.addEventListener(name, function wrapListener(arg) {
|
|
2323
|
-
if (flags.once) {
|
|
2324
|
-
emitter.removeEventListener(name, wrapListener);
|
|
2325
|
-
}
|
|
2326
|
-
listener(arg);
|
|
2327
|
-
});
|
|
2328
|
-
} else {
|
|
2329
|
-
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
|
2330
2294
|
}
|
|
2295
|
+
queue.push(new Item(fun, args));
|
|
2296
|
+
if (queue.length === 1 && !draining) {
|
|
2297
|
+
runTimeout(drainQueue);
|
|
2298
|
+
}
|
|
2299
|
+
};
|
|
2300
|
+
function Item(fun, array) {
|
|
2301
|
+
this.fun = fun;
|
|
2302
|
+
this.array = array;
|
|
2331
2303
|
}
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
writable: true,
|
|
2343
|
-
configurable: true
|
|
2344
|
-
}
|
|
2345
|
-
});
|
|
2346
|
-
}
|
|
2347
|
-
};
|
|
2348
|
-
} else {
|
|
2349
|
-
inherits_browser.exports = function inherits2(ctor, superCtor) {
|
|
2350
|
-
if (superCtor) {
|
|
2351
|
-
ctor.super_ = superCtor;
|
|
2352
|
-
var TempCtor = function() {
|
|
2353
|
-
};
|
|
2354
|
-
TempCtor.prototype = superCtor.prototype;
|
|
2355
|
-
ctor.prototype = new TempCtor();
|
|
2356
|
-
ctor.prototype.constructor = ctor;
|
|
2357
|
-
}
|
|
2358
|
-
};
|
|
2304
|
+
Item.prototype.run = function() {
|
|
2305
|
+
this.fun.apply(null, this.array);
|
|
2306
|
+
};
|
|
2307
|
+
process.title = "browser";
|
|
2308
|
+
process.browser = true;
|
|
2309
|
+
process.env = {};
|
|
2310
|
+
process.argv = [];
|
|
2311
|
+
process.version = "";
|
|
2312
|
+
process.versions = {};
|
|
2313
|
+
function noop() {
|
|
2359
2314
|
}
|
|
2360
|
-
|
|
2315
|
+
process.on = noop;
|
|
2316
|
+
process.addListener = noop;
|
|
2317
|
+
process.once = noop;
|
|
2318
|
+
process.off = noop;
|
|
2319
|
+
process.removeListener = noop;
|
|
2320
|
+
process.removeAllListeners = noop;
|
|
2321
|
+
process.emit = noop;
|
|
2322
|
+
process.prependListener = noop;
|
|
2323
|
+
process.prependOnceListener = noop;
|
|
2324
|
+
process.listeners = function(name) {
|
|
2325
|
+
return [];
|
|
2326
|
+
};
|
|
2327
|
+
process.binding = function(name) {
|
|
2328
|
+
throw new Error("process.binding is not supported");
|
|
2329
|
+
};
|
|
2330
|
+
process.cwd = function() {
|
|
2331
|
+
return "/";
|
|
2332
|
+
};
|
|
2333
|
+
process.chdir = function(dir) {
|
|
2334
|
+
throw new Error("process.chdir is not supported");
|
|
2335
|
+
};
|
|
2336
|
+
process.umask = function() {
|
|
2337
|
+
return 0;
|
|
2338
|
+
};
|
|
2339
|
+
var browserExports = browser$1.exports;
|
|
2340
|
+
const process$1 = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
2341
|
+
(function(Object2) {
|
|
2342
|
+
function get() {
|
|
2343
|
+
var _global2 = this || self;
|
|
2344
|
+
delete Object2.prototype.__magic__;
|
|
2345
|
+
return _global2;
|
|
2346
|
+
}
|
|
2347
|
+
if (typeof globalThis === "object") {
|
|
2348
|
+
return globalThis;
|
|
2349
|
+
}
|
|
2350
|
+
if (this) {
|
|
2351
|
+
return get();
|
|
2352
|
+
} else {
|
|
2353
|
+
Object2.defineProperty(Object2.prototype, "__magic__", {
|
|
2354
|
+
configurable: true,
|
|
2355
|
+
get
|
|
2356
|
+
});
|
|
2357
|
+
var _global = __magic__;
|
|
2358
|
+
return _global;
|
|
2359
|
+
}
|
|
2360
|
+
})(Object);
|
|
2361
2361
|
var streamBrowser;
|
|
2362
2362
|
var hasRequiredStreamBrowser;
|
|
2363
2363
|
function requireStreamBrowser() {
|
|
@@ -7135,7 +7135,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7135
7135
|
}
|
|
7136
7136
|
});
|
|
7137
7137
|
SAXStream.prototype.write = function(data) {
|
|
7138
|
-
if (typeof
|
|
7138
|
+
if (typeof Buffer === "function" && typeof Buffer.isBuffer === "function" && Buffer.isBuffer(data)) {
|
|
7139
7139
|
if (!this._decoder) {
|
|
7140
7140
|
var SD = requireString_decoder().StringDecoder;
|
|
7141
7141
|
this._decoder = new SD("utf8");
|
|
@@ -9084,7 +9084,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9084
9084
|
};
|
|
9085
9085
|
var js2xml$1 = js2xml$2;
|
|
9086
9086
|
var json2xml$1 = function(json, options2) {
|
|
9087
|
-
if (json instanceof
|
|
9087
|
+
if (json instanceof Buffer) {
|
|
9088
9088
|
json = json.toString();
|
|
9089
9089
|
}
|
|
9090
9090
|
var js = null;
|
|
@@ -15779,19 +15779,19 @@ var __publicField = (obj, key, value) => {
|
|
|
15779
15779
|
this._helper.resume();
|
|
15780
15780
|
}, t.exports = n;
|
|
15781
15781
|
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(e, t, r) {
|
|
15782
|
-
t.exports = { isNode: "undefined" != typeof
|
|
15783
|
-
if (
|
|
15784
|
-
return
|
|
15782
|
+
t.exports = { isNode: "undefined" != typeof Buffer, newBufferFrom: function(e2, t2) {
|
|
15783
|
+
if (Buffer.from && Buffer.from !== Uint8Array.from)
|
|
15784
|
+
return Buffer.from(e2, t2);
|
|
15785
15785
|
if ("number" == typeof e2)
|
|
15786
15786
|
throw new Error('The "data" argument must not be a number');
|
|
15787
|
-
return new
|
|
15787
|
+
return new Buffer(e2, t2);
|
|
15788
15788
|
}, allocBuffer: function(e2) {
|
|
15789
|
-
if (
|
|
15790
|
-
return
|
|
15791
|
-
var t2 = new
|
|
15789
|
+
if (Buffer.alloc)
|
|
15790
|
+
return Buffer.alloc(e2);
|
|
15791
|
+
var t2 = new Buffer(e2);
|
|
15792
15792
|
return t2.fill(0), t2;
|
|
15793
15793
|
}, isBuffer: function(e2) {
|
|
15794
|
-
return
|
|
15794
|
+
return Buffer.isBuffer(e2);
|
|
15795
15795
|
}, isStream: function(e2) {
|
|
15796
15796
|
return e2 && "function" == typeof e2.on && "function" == typeof e2.pause && "function" == typeof e2.resume;
|
|
15797
15797
|
} };
|
|
@@ -16145,7 +16145,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16145
16145
|
i3.set(t3[r3], n3), n3 += t3[r3].length;
|
|
16146
16146
|
return i3;
|
|
16147
16147
|
case "nodebuffer":
|
|
16148
|
-
return
|
|
16148
|
+
return Buffer.concat(t3);
|
|
16149
16149
|
default:
|
|
16150
16150
|
throw new Error("concat : unsupported type '" + e4 + "'");
|
|
16151
16151
|
}
|
|
@@ -16193,7 +16193,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16193
16193
|
return new o(this, { objectMode: "nodebuffer" !== this._outputType }, e2);
|
|
16194
16194
|
} }, t.exports = f;
|
|
16195
16195
|
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(e, t, r) {
|
|
16196
|
-
if (r.base64 = true, r.array = true, r.string = true, r.arraybuffer = "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array, r.nodebuffer = "undefined" != typeof
|
|
16196
|
+
if (r.base64 = true, r.array = true, r.string = true, r.arraybuffer = "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array, r.nodebuffer = "undefined" != typeof Buffer, r.uint8array = "undefined" != typeof Uint8Array, "undefined" == typeof ArrayBuffer)
|
|
16197
16197
|
r.blob = false;
|
|
16198
16198
|
else {
|
|
16199
16199
|
var n = new ArrayBuffer(0);
|
|
@@ -19148,7 +19148,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19148
19148
|
const binaryContentMap = /* @__PURE__ */ new Map();
|
|
19149
19149
|
for (const [key, value] of Object.entries(zipContent.files)) {
|
|
19150
19150
|
if (!key.endsWith(".xml") && !key.endsWith(".rels")) {
|
|
19151
|
-
binaryContentMap.set(key, await value.async("
|
|
19151
|
+
binaryContentMap.set(key, await value.async("uint8array"));
|
|
19152
19152
|
continue;
|
|
19153
19153
|
}
|
|
19154
19154
|
const json = toJson(await value.async("text"));
|
|
@@ -19263,7 +19263,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19263
19263
|
zip.file(`word/media/${fileName}`, stream);
|
|
19264
19264
|
}
|
|
19265
19265
|
return zip.generateAsync({
|
|
19266
|
-
type: "
|
|
19266
|
+
type: "uint8array",
|
|
19267
19267
|
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19268
19268
|
compression: "DEFLATE"
|
|
19269
19269
|
});
|