@regulaforensics/document-reader-typings
Version:
Document Reader API typings
1,322 lines (1,320 loc) • 773 kB
JavaScript
var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function getDefaultExportFromCjs(x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
}
var _Reflect = {};
/*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var hasRequired_Reflect;
function require_Reflect() {
if (hasRequired_Reflect) return _Reflect;
hasRequired_Reflect = 1;
var Reflect2;
return function(Reflect3) {
(function(factory) {
var root = typeof globalThis == "object" ? globalThis : typeof commonjsGlobal == "object" ? commonjsGlobal : typeof self == "object" ? self : typeof this == "object" ? this : sloppyModeThis(), exporter = makeExporter(Reflect3);
typeof root.Reflect < "u" && (exporter = makeExporter(root.Reflect, exporter)), factory(exporter, root), typeof root.Reflect > "u" && (root.Reflect = Reflect3);
function makeExporter(target, previous) {
return function(key, value) {
Object.defineProperty(target, key, { configurable: !0, writable: !0, value }), previous && previous(key, value);
};
}
function functionThis() {
try {
return Function("return this;")();
} catch {
}
}
function indirectEvalThis() {
try {
return (0, eval)("(function() { return this; })()");
} catch {
}
}
function sloppyModeThis() {
return functionThis() || indirectEvalThis();
}
})(function(exporter, root) {
var hasOwn = Object.prototype.hasOwnProperty, supportsSymbol = typeof Symbol == "function", toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive < "u" ? Symbol.toPrimitive : "@@toPrimitive", iteratorSymbol = supportsSymbol && typeof Symbol.iterator < "u" ? Symbol.iterator : "@@iterator", supportsCreate = typeof Object.create == "function", supportsProto = { __proto__: [] } instanceof Array, downLevel = !supportsCreate && !supportsProto, HashMap = {
// create an object in dictionary mode (a.k.a. "slow" mode in v8)
create: supportsCreate ? function() {
return MakeDictionary(/* @__PURE__ */ Object.create(null));
} : supportsProto ? function() {
return MakeDictionary({ __proto__: null });
} : function() {
return MakeDictionary({});
},
has: downLevel ? function(map, key) {
return hasOwn.call(map, key);
} : function(map, key) {
return key in map;
},
get: downLevel ? function(map, key) {
return hasOwn.call(map, key) ? map[key] : void 0;
} : function(map, key) {
return map[key];
}
}, functionPrototype = Object.getPrototypeOf(Function), _Map2 = typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : CreateMapPolyfill(), _Set = typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : CreateSetPolyfill(), _WeakMap = typeof WeakMap == "function" ? WeakMap : CreateWeakMapPolyfill(), registrySymbol = supportsSymbol ? Symbol.for("@reflect-metadata:registry") : void 0, metadataRegistry = GetOrCreateMetadataRegistry(), metadataProvider = CreateMetadataProvider(metadataRegistry);
function decorate(decorators, target, propertyKey, attributes) {
if (IsUndefined(propertyKey)) {
if (!IsArray2(decorators))
throw new TypeError();
if (!IsConstructor(target))
throw new TypeError();
return DecorateConstructor(decorators, target);
} else {
if (!IsArray2(decorators))
throw new TypeError();
if (!IsObject(target))
throw new TypeError();
if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))
throw new TypeError();
return IsNull(attributes) && (attributes = void 0), propertyKey = ToPropertyKey(propertyKey), DecorateProperty(decorators, target, propertyKey, attributes);
}
}
exporter("decorate", decorate);
function metadata(metadataKey, metadataValue) {
function decorator(target, propertyKey) {
if (!IsObject(target))
throw new TypeError();
if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))
throw new TypeError();
OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
}
return decorator;
}
exporter("metadata", metadata);
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
if (!IsObject(target))
throw new TypeError();
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
}
exporter("defineMetadata", defineMetadata);
function hasMetadata(metadataKey, target, propertyKey) {
if (!IsObject(target))
throw new TypeError();
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasMetadata(metadataKey, target, propertyKey);
}
exporter("hasMetadata", hasMetadata);
function hasOwnMetadata(metadataKey, target, propertyKey) {
if (!IsObject(target))
throw new TypeError();
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
}
exporter("hasOwnMetadata", hasOwnMetadata);
function getMetadata(metadataKey, target, propertyKey) {
if (!IsObject(target))
throw new TypeError();
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryGetMetadata(metadataKey, target, propertyKey);
}
exporter("getMetadata", getMetadata);
function getOwnMetadata(metadataKey, target, propertyKey) {
if (!IsObject(target))
throw new TypeError();
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
}
exporter("getOwnMetadata", getOwnMetadata);
function getMetadataKeys(target, propertyKey) {
if (!IsObject(target))
throw new TypeError();
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryMetadataKeys(target, propertyKey);
}
exporter("getMetadataKeys", getMetadataKeys);
function getOwnMetadataKeys(target, propertyKey) {
if (!IsObject(target))
throw new TypeError();
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryOwnMetadataKeys(target, propertyKey);
}
exporter("getOwnMetadataKeys", getOwnMetadataKeys);
function deleteMetadata(metadataKey, target, propertyKey) {
if (!IsObject(target))
throw new TypeError();
if (IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), !IsObject(target))
throw new TypeError();
IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey));
var provider = GetMetadataProvider(
target,
propertyKey,
/*Create*/
!1
);
return IsUndefined(provider) ? !1 : provider.OrdinaryDeleteMetadata(metadataKey, target, propertyKey);
}
exporter("deleteMetadata", deleteMetadata);
function DecorateConstructor(decorators, target) {
for (var i = decorators.length - 1; i >= 0; --i) {
var decorator = decorators[i], decorated = decorator(target);
if (!IsUndefined(decorated) && !IsNull(decorated)) {
if (!IsConstructor(decorated))
throw new TypeError();
target = decorated;
}
}
return target;
}
function DecorateProperty(decorators, target, propertyKey, descriptor) {
for (var i = decorators.length - 1; i >= 0; --i) {
var decorator = decorators[i], decorated = decorator(target, propertyKey, descriptor);
if (!IsUndefined(decorated) && !IsNull(decorated)) {
if (!IsObject(decorated))
throw new TypeError();
descriptor = decorated;
}
}
return descriptor;
}
function OrdinaryHasMetadata(MetadataKey, O, P) {
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
if (hasOwn2)
return !0;
var parent = OrdinaryGetPrototypeOf(O);
return IsNull(parent) ? !1 : OrdinaryHasMetadata(MetadataKey, parent, P);
}
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
var provider = GetMetadataProvider(
O,
P,
/*Create*/
!1
);
return IsUndefined(provider) ? !1 : ToBoolean(provider.OrdinaryHasOwnMetadata(MetadataKey, O, P));
}
function OrdinaryGetMetadata(MetadataKey, O, P) {
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
if (hasOwn2)
return OrdinaryGetOwnMetadata(MetadataKey, O, P);
var parent = OrdinaryGetPrototypeOf(O);
if (!IsNull(parent))
return OrdinaryGetMetadata(MetadataKey, parent, P);
}
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
var provider = GetMetadataProvider(
O,
P,
/*Create*/
!1
);
if (!IsUndefined(provider))
return provider.OrdinaryGetOwnMetadata(MetadataKey, O, P);
}
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
var provider = GetMetadataProvider(
O,
P,
/*Create*/
!0
);
provider.OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P);
}
function OrdinaryMetadataKeys(O, P) {
var ownKeys = OrdinaryOwnMetadataKeys(O, P), parent = OrdinaryGetPrototypeOf(O);
if (parent === null)
return ownKeys;
var parentKeys = OrdinaryMetadataKeys(parent, P);
if (parentKeys.length <= 0)
return ownKeys;
if (ownKeys.length <= 0)
return parentKeys;
for (var set = new _Set(), keys = [], _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {
var key = ownKeys_1[_i], hasKey = set.has(key);
hasKey || (set.add(key), keys.push(key));
}
for (var _a2 = 0, parentKeys_1 = parentKeys; _a2 < parentKeys_1.length; _a2++) {
var key = parentKeys_1[_a2], hasKey = set.has(key);
hasKey || (set.add(key), keys.push(key));
}
return keys;
}
function OrdinaryOwnMetadataKeys(O, P) {
var provider = GetMetadataProvider(
O,
P,
/*create*/
!1
);
return provider ? provider.OrdinaryOwnMetadataKeys(O, P) : [];
}
function Type2(x) {
if (x === null)
return 1;
switch (typeof x) {
case "undefined":
return 0;
case "boolean":
return 2;
case "string":
return 3;
case "symbol":
return 4;
case "number":
return 5;
case "object":
return x === null ? 1 : 6;
default:
return 6;
}
}
function IsUndefined(x) {
return x === void 0;
}
function IsNull(x) {
return x === null;
}
function IsSymbol(x) {
return typeof x == "symbol";
}
function IsObject(x) {
return typeof x == "object" ? x !== null : typeof x == "function";
}
function ToPrimitive(input, PreferredType) {
switch (Type2(input)) {
case 0:
return input;
case 1:
return input;
case 2:
return input;
case 3:
return input;
case 4:
return input;
case 5:
return input;
}
var hint = "string", exoticToPrim = GetMethod(input, toPrimitiveSymbol);
if (exoticToPrim !== void 0) {
var result = exoticToPrim.call(input, hint);
if (IsObject(result))
throw new TypeError();
return result;
}
return OrdinaryToPrimitive(input);
}
function OrdinaryToPrimitive(O, hint) {
var valueOf, result, toString_2;
{
var toString_1 = O.toString;
if (IsCallable(toString_1)) {
var result = toString_1.call(O);
if (!IsObject(result))
return result;
}
var valueOf = O.valueOf;
if (IsCallable(valueOf)) {
var result = valueOf.call(O);
if (!IsObject(result))
return result;
}
}
throw new TypeError();
}
function ToBoolean(argument) {
return !!argument;
}
function ToString(argument) {
return "" + argument;
}
function ToPropertyKey(argument) {
var key = ToPrimitive(argument);
return IsSymbol(key) ? key : ToString(key);
}
function IsArray2(argument) {
return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]";
}
function IsCallable(argument) {
return typeof argument == "function";
}
function IsConstructor(argument) {
return typeof argument == "function";
}
function IsPropertyKey(argument) {
switch (Type2(argument)) {
case 3:
return !0;
case 4:
return !0;
default:
return !1;
}
}
function SameValueZero(x, y) {
return x === y || x !== x && y !== y;
}
function GetMethod(V, P) {
var func = V[P];
if (func != null) {
if (!IsCallable(func))
throw new TypeError();
return func;
}
}
function GetIterator(obj) {
var method = GetMethod(obj, iteratorSymbol);
if (!IsCallable(method))
throw new TypeError();
var iterator = method.call(obj);
if (!IsObject(iterator))
throw new TypeError();
return iterator;
}
function IteratorValue(iterResult) {
return iterResult.value;
}
function IteratorStep(iterator) {
var result = iterator.next();
return result.done ? !1 : result;
}
function IteratorClose(iterator) {
var f = iterator.return;
f && f.call(iterator);
}
function OrdinaryGetPrototypeOf(O) {
var proto = Object.getPrototypeOf(O);
if (typeof O != "function" || O === functionPrototype || proto !== functionPrototype)
return proto;
var prototype = O.prototype, prototypeProto = prototype && Object.getPrototypeOf(prototype);
if (prototypeProto == null || prototypeProto === Object.prototype)
return proto;
var constructor = prototypeProto.constructor;
return typeof constructor != "function" || constructor === O ? proto : constructor;
}
function CreateMetadataRegistry() {
var fallback;
!IsUndefined(registrySymbol) && typeof root.Reflect < "u" && !(registrySymbol in root.Reflect) && typeof root.Reflect.defineMetadata == "function" && (fallback = CreateFallbackProvider(root.Reflect));
var first, second, rest, targetProviderMap = new _WeakMap(), registry = {
registerProvider,
getProvider,
setProvider
};
return registry;
function registerProvider(provider) {
if (!Object.isExtensible(registry))
throw new Error("Cannot add provider to a frozen registry.");
switch (!0) {
case fallback === provider:
break;
case IsUndefined(first):
first = provider;
break;
case first === provider:
break;
case IsUndefined(second):
second = provider;
break;
case second === provider:
break;
default:
rest === void 0 && (rest = new _Set()), rest.add(provider);
break;
}
}
function getProviderNoCache(O, P) {
if (!IsUndefined(first)) {
if (first.isProviderFor(O, P))
return first;
if (!IsUndefined(second)) {
if (second.isProviderFor(O, P))
return first;
if (!IsUndefined(rest))
for (var iterator = GetIterator(rest); ; ) {
var next = IteratorStep(iterator);
if (!next)
return;
var provider = IteratorValue(next);
if (provider.isProviderFor(O, P))
return IteratorClose(iterator), provider;
}
}
}
if (!IsUndefined(fallback) && fallback.isProviderFor(O, P))
return fallback;
}
function getProvider(O, P) {
var providerMap = targetProviderMap.get(O), provider;
return IsUndefined(providerMap) || (provider = providerMap.get(P)), IsUndefined(provider) && (provider = getProviderNoCache(O, P), IsUndefined(provider) || (IsUndefined(providerMap) && (providerMap = new _Map2(), targetProviderMap.set(O, providerMap)), providerMap.set(P, provider))), provider;
}
function hasProvider(provider) {
if (IsUndefined(provider))
throw new TypeError();
return first === provider || second === provider || !IsUndefined(rest) && rest.has(provider);
}
function setProvider(O, P, provider) {
if (!hasProvider(provider))
throw new Error("Metadata provider not registered.");
var existingProvider = getProvider(O, P);
if (existingProvider !== provider) {
if (!IsUndefined(existingProvider))
return !1;
var providerMap = targetProviderMap.get(O);
IsUndefined(providerMap) && (providerMap = new _Map2(), targetProviderMap.set(O, providerMap)), providerMap.set(P, provider);
}
return !0;
}
}
function GetOrCreateMetadataRegistry() {
var metadataRegistry2;
return !IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect) && (metadataRegistry2 = root.Reflect[registrySymbol]), IsUndefined(metadataRegistry2) && (metadataRegistry2 = CreateMetadataRegistry()), !IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect) && Object.defineProperty(root.Reflect, registrySymbol, {
enumerable: !1,
configurable: !1,
writable: !1,
value: metadataRegistry2
}), metadataRegistry2;
}
function CreateMetadataProvider(registry) {
var metadata2 = new _WeakMap(), provider = {
isProviderFor: function(O, P) {
var targetMetadata = metadata2.get(O);
return IsUndefined(targetMetadata) ? !1 : targetMetadata.has(P);
},
OrdinaryDefineOwnMetadata: OrdinaryDefineOwnMetadata2,
OrdinaryHasOwnMetadata: OrdinaryHasOwnMetadata2,
OrdinaryGetOwnMetadata: OrdinaryGetOwnMetadata2,
OrdinaryOwnMetadataKeys: OrdinaryOwnMetadataKeys2,
OrdinaryDeleteMetadata
};
return metadataRegistry.registerProvider(provider), provider;
function GetOrCreateMetadataMap(O, P, Create) {
var targetMetadata = metadata2.get(O), createdTargetMetadata = !1;
if (IsUndefined(targetMetadata)) {
if (!Create)
return;
targetMetadata = new _Map2(), metadata2.set(O, targetMetadata), createdTargetMetadata = !0;
}
var metadataMap = targetMetadata.get(P);
if (IsUndefined(metadataMap)) {
if (!Create)
return;
if (metadataMap = new _Map2(), targetMetadata.set(P, metadataMap), !registry.setProvider(O, P, provider))
throw targetMetadata.delete(P), createdTargetMetadata && metadata2.delete(O), new Error("Wrong provider for target.");
}
return metadataMap;
}
function OrdinaryHasOwnMetadata2(MetadataKey, O, P) {
var metadataMap = GetOrCreateMetadataMap(
O,
P,
/*Create*/
!1
);
return IsUndefined(metadataMap) ? !1 : ToBoolean(metadataMap.has(MetadataKey));
}
function OrdinaryGetOwnMetadata2(MetadataKey, O, P) {
var metadataMap = GetOrCreateMetadataMap(
O,
P,
/*Create*/
!1
);
if (!IsUndefined(metadataMap))
return metadataMap.get(MetadataKey);
}
function OrdinaryDefineOwnMetadata2(MetadataKey, MetadataValue, O, P) {
var metadataMap = GetOrCreateMetadataMap(
O,
P,
/*Create*/
!0
);
metadataMap.set(MetadataKey, MetadataValue);
}
function OrdinaryOwnMetadataKeys2(O, P) {
var keys = [], metadataMap = GetOrCreateMetadataMap(
O,
P,
/*Create*/
!1
);
if (IsUndefined(metadataMap))
return keys;
for (var keysObj = metadataMap.keys(), iterator = GetIterator(keysObj), k = 0; ; ) {
var next = IteratorStep(iterator);
if (!next)
return keys.length = k, keys;
var nextValue = IteratorValue(next);
try {
keys[k] = nextValue;
} catch (e) {
try {
IteratorClose(iterator);
} finally {
throw e;
}
}
k++;
}
}
function OrdinaryDeleteMetadata(MetadataKey, O, P) {
var metadataMap = GetOrCreateMetadataMap(
O,
P,
/*Create*/
!1
);
if (IsUndefined(metadataMap) || !metadataMap.delete(MetadataKey))
return !1;
if (metadataMap.size === 0) {
var targetMetadata = metadata2.get(O);
IsUndefined(targetMetadata) || (targetMetadata.delete(P), targetMetadata.size === 0 && metadata2.delete(targetMetadata));
}
return !0;
}
}
function CreateFallbackProvider(reflect) {
var defineMetadata2 = reflect.defineMetadata, hasOwnMetadata2 = reflect.hasOwnMetadata, getOwnMetadata2 = reflect.getOwnMetadata, getOwnMetadataKeys2 = reflect.getOwnMetadataKeys, deleteMetadata2 = reflect.deleteMetadata, metadataOwner = new _WeakMap(), provider = {
isProviderFor: function(O, P) {
var metadataPropertySet = metadataOwner.get(O);
return !IsUndefined(metadataPropertySet) && metadataPropertySet.has(P) ? !0 : getOwnMetadataKeys2(O, P).length ? (IsUndefined(metadataPropertySet) && (metadataPropertySet = new _Set(), metadataOwner.set(O, metadataPropertySet)), metadataPropertySet.add(P), !0) : !1;
},
OrdinaryDefineOwnMetadata: defineMetadata2,
OrdinaryHasOwnMetadata: hasOwnMetadata2,
OrdinaryGetOwnMetadata: getOwnMetadata2,
OrdinaryOwnMetadataKeys: getOwnMetadataKeys2,
OrdinaryDeleteMetadata: deleteMetadata2
};
return provider;
}
function GetMetadataProvider(O, P, Create) {
var registeredProvider = metadataRegistry.getProvider(O, P);
if (!IsUndefined(registeredProvider))
return registeredProvider;
if (Create) {
if (metadataRegistry.setProvider(O, P, metadataProvider))
return metadataProvider;
throw new Error("Illegal state.");
}
}
function CreateMapPolyfill() {
var cacheSentinel = {}, arraySentinel = [], MapIterator = (
/** @class */
function() {
function MapIterator2(keys, values2, selector) {
this._index = 0, this._keys = keys, this._values = values2, this._selector = selector;
}
return MapIterator2.prototype["@@iterator"] = function() {
return this;
}, MapIterator2.prototype[iteratorSymbol] = function() {
return this;
}, MapIterator2.prototype.next = function() {
var index = this._index;
if (index >= 0 && index < this._keys.length) {
var result = this._selector(this._keys[index], this._values[index]);
return index + 1 >= this._keys.length ? (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel) : this._index++, { value: result, done: !1 };
}
return { value: void 0, done: !0 };
}, MapIterator2.prototype.throw = function(error) {
throw this._index >= 0 && (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel), error;
}, MapIterator2.prototype.return = function(value) {
return this._index >= 0 && (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel), { value, done: !0 };
}, MapIterator2;
}()
), Map2 = (
/** @class */
function() {
function Map3() {
this._keys = [], this._values = [], this._cacheKey = cacheSentinel, this._cacheIndex = -2;
}
return Object.defineProperty(Map3.prototype, "size", {
get: function() {
return this._keys.length;
},
enumerable: !0,
configurable: !0
}), Map3.prototype.has = function(key) {
return this._find(
key,
/*insert*/
!1
) >= 0;
}, Map3.prototype.get = function(key) {
var index = this._find(
key,
/*insert*/
!1
);
return index >= 0 ? this._values[index] : void 0;
}, Map3.prototype.set = function(key, value) {
var index = this._find(
key,
/*insert*/
!0
);
return this._values[index] = value, this;
}, Map3.prototype.delete = function(key) {
var index = this._find(
key,
/*insert*/
!1
);
if (index >= 0) {
for (var size = this._keys.length, i = index + 1; i < size; i++)
this._keys[i - 1] = this._keys[i], this._values[i - 1] = this._values[i];
return this._keys.length--, this._values.length--, SameValueZero(key, this._cacheKey) && (this._cacheKey = cacheSentinel, this._cacheIndex = -2), !0;
}
return !1;
}, Map3.prototype.clear = function() {
this._keys.length = 0, this._values.length = 0, this._cacheKey = cacheSentinel, this._cacheIndex = -2;
}, Map3.prototype.keys = function() {
return new MapIterator(this._keys, this._values, getKey);
}, Map3.prototype.values = function() {
return new MapIterator(this._keys, this._values, getValue);
}, Map3.prototype.entries = function() {
return new MapIterator(this._keys, this._values, getEntry);
}, Map3.prototype["@@iterator"] = function() {
return this.entries();
}, Map3.prototype[iteratorSymbol] = function() {
return this.entries();
}, Map3.prototype._find = function(key, insert) {
if (!SameValueZero(this._cacheKey, key)) {
this._cacheIndex = -1;
for (var i = 0; i < this._keys.length; i++)
if (SameValueZero(this._keys[i], key)) {
this._cacheIndex = i;
break;
}
}
return this._cacheIndex < 0 && insert && (this._cacheIndex = this._keys.length, this._keys.push(key), this._values.push(void 0)), this._cacheIndex;
}, Map3;
}()
);
return Map2;
function getKey(key, _) {
return key;
}
function getValue(_, value) {
return value;
}
function getEntry(key, value) {
return [key, value];
}
}
function CreateSetPolyfill() {
var Set2 = (
/** @class */
function() {
function Set3() {
this._map = new _Map2();
}
return Object.defineProperty(Set3.prototype, "size", {
get: function() {
return this._map.size;
},
enumerable: !0,
configurable: !0
}), Set3.prototype.has = function(value) {
return this._map.has(value);
}, Set3.prototype.add = function(value) {
return this._map.set(value, value), this;
}, Set3.prototype.delete = function(value) {
return this._map.delete(value);
}, Set3.prototype.clear = function() {
this._map.clear();
}, Set3.prototype.keys = function() {
return this._map.keys();
}, Set3.prototype.values = function() {
return this._map.keys();
}, Set3.prototype.entries = function() {
return this._map.entries();
}, Set3.prototype["@@iterator"] = function() {
return this.keys();
}, Set3.prototype[iteratorSymbol] = function() {
return this.keys();
}, Set3;
}()
);
return Set2;
}
function CreateWeakMapPolyfill() {
var UUID_SIZE = 16, keys = HashMap.create(), rootKey = CreateUniqueKey();
return (
/** @class */
function() {
function WeakMap2() {
this._key = CreateUniqueKey();
}
return WeakMap2.prototype.has = function(target) {
var table = GetOrCreateWeakMapTable(
target,
/*create*/
!1
);
return table !== void 0 ? HashMap.has(table, this._key) : !1;
}, WeakMap2.prototype.get = function(target) {
var table = GetOrCreateWeakMapTable(
target,
/*create*/
!1
);
return table !== void 0 ? HashMap.get(table, this._key) : void 0;
}, WeakMap2.prototype.set = function(target, value) {
var table = GetOrCreateWeakMapTable(
target,
/*create*/
!0
);
return table[this._key] = value, this;
}, WeakMap2.prototype.delete = function(target) {
var table = GetOrCreateWeakMapTable(
target,
/*create*/
!1
);
return table !== void 0 ? delete table[this._key] : !1;
}, WeakMap2.prototype.clear = function() {
this._key = CreateUniqueKey();
}, WeakMap2;
}()
);
function CreateUniqueKey() {
var key;
do
key = "@@WeakMap@@" + CreateUUID();
while (HashMap.has(keys, key));
return keys[key] = !0, key;
}
function GetOrCreateWeakMapTable(target, create) {
if (!hasOwn.call(target, rootKey)) {
if (!create)
return;
Object.defineProperty(target, rootKey, { value: HashMap.create() });
}
return target[rootKey];
}
function FillRandomBytes(buffer, size) {
for (var i = 0; i < size; ++i)
buffer[i] = Math.random() * 255 | 0;
return buffer;
}
function GenRandomBytes(size) {
if (typeof Uint8Array == "function") {
var array = new Uint8Array(size);
return typeof crypto < "u" ? crypto.getRandomValues(array) : typeof msCrypto < "u" ? msCrypto.getRandomValues(array) : FillRandomBytes(array, size), array;
}
return FillRandomBytes(new Array(size), size);
}
function CreateUUID() {
var data = GenRandomBytes(UUID_SIZE);
data[6] = data[6] & 79 | 64, data[8] = data[8] & 191 | 128;
for (var result = "", offset = 0; offset < UUID_SIZE; ++offset) {
var byte = data[offset];
(offset === 4 || offset === 6 || offset === 8) && (result += "-"), byte < 16 && (result += "0"), result += byte.toString(16).toLowerCase();
}
return result;
}
}
function MakeDictionary(obj) {
return obj.__ = void 0, delete obj.__, obj;
}
});
}(Reflect2 || (Reflect2 = {})), _Reflect;
}
require_Reflect();
function fS(_, S) {
return function() {
return _.apply(S, arguments);
};
}
const { toString: LI } = Object.prototype, { getPrototypeOf: ME } = Object, { iterator: Z_, toStringTag: BS } = Symbol, X_ = /* @__PURE__ */ ((_) => (S) => {
const E = LI.call(S);
return _[E] || (_[E] = E.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null)), z = (_) => (_ = _.toLowerCase(), (S) => X_(S) === _), j_ = (_) => (S) => typeof S === _, { isArray: C_ } = Array, N_ = j_("undefined");
function h_(_) {
return _ !== null && !N_(_) && _.constructor !== null && !N_(_.constructor) && K(_.constructor.isBuffer) && _.constructor.isBuffer(_);
}
const hS = z("ArrayBuffer");
function NI(_) {
let S;
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? S = ArrayBuffer.isView(_) : S = _ && _.buffer && hS(_.buffer), S;
}
const CI = j_("string"), K = j_("function"), uS = j_("number"), u_ = (_) => _ !== null && typeof _ == "object", sI = (_) => _ === !0 || _ === !1, Y_ = (_) => {
if (X_(_) !== "object")
return !1;
const S = ME(_);
return (S === null || S === Object.prototype || Object.getPrototypeOf(S) === null) && !(BS in _) && !(Z_ in _);
}, aI = (_) => {
if (!u_(_) || h_(_))
return !1;
try {
return Object.keys(_).length === 0 && Object.getPrototypeOf(_) === Object.prototype;
} catch {
return !1;
}
}, cI = z("Date"), MI = z("File"), UI = z("Blob"), fI = z("FileList"), BI = (_) => u_(_) && K(_.pipe), hI = (_) => {
let S;
return _ && (typeof FormData == "function" && _ instanceof FormData || K(_.append) && ((S = X_(_)) === "formdata" || // detect form-data instance
S === "object" && K(_.toString) && _.toString() === "[object FormData]"));
}, uI = z("URLSearchParams"), [HI, VI, GI, oI] = ["ReadableStream", "Request", "Response", "Headers"].map(z), PI = (_) => _.trim ? _.trim() : _.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function H_(_, S, { allOwnKeys: E = !1 } = {}) {
if (_ === null || typeof _ > "u")
return;
let I, A;
if (typeof _ != "object" && (_ = [_]), C_(_))
for (I = 0, A = _.length; I < A; I++)
S.call(null, _[I], I, _);
else {
if (h_(_))
return;
const t = E ? Object.getOwnPropertyNames(_) : Object.keys(_), R = t.length;
let r;
for (I = 0; I < R; I++)
r = t[I], S.call(null, _[r], r, _);
}
}
function HS(_, S) {
if (h_(_))
return null;
S = S.toLowerCase();
const E = Object.keys(_);
let I = E.length, A;
for (; I-- > 0; )
if (A = E[I], S === A.toLowerCase())
return A;
return null;
}
const I_ = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, VS = (_) => !N_(_) && _ !== I_;
function tE() {
const { caseless: _, skipUndefined: S } = VS(this) && this || {}, E = {}, I = (A, t) => {
const R = _ && HS(E, t) || t;
Y_(E[R]) && Y_(A) ? E[R] = tE(E[R], A) : Y_(A) ? E[R] = tE({}, A) : C_(A) ? E[R] = A.slice() : (!S || !N_(A)) && (E[R] = A);
};
for (let A = 0, t = arguments.length; A < t; A++)
arguments[A] && H_(arguments[A], I);
return E;
}
const lI = (_, S, E, { allOwnKeys: I } = {}) => (H_(S, (A, t) => {
E && K(A) ? _[t] = fS(A, E) : _[t] = A;
}, { allOwnKeys: I }), _), mI = (_) => (_.charCodeAt(0) === 65279 && (_ = _.slice(1)), _), eI = (_, S, E, I) => {
_.prototype = Object.create(S.prototype, I), _.prototype.constructor = _, Object.defineProperty(_, "super", {
value: S.prototype
}), E && Object.assign(_.prototype, E);
}, bI = (_, S, E, I) => {
let A, t, R;
const r = {};
if (S = S || {}, _ == null) return S;
do {
for (A = Object.getOwnPropertyNames(_), t = A.length; t-- > 0; )
R = A[t], (!I || I(R, _, S)) && !r[R] && (S[R] = _[R], r[R] = !0);
_ = E !== !1 && ME(_);
} while (_ && (!E || E(_, S)) && _ !== Object.prototype);
return S;
}, YI = (_, S, E) => {
_ = String(_), (E === void 0 || E > _.length) && (E = _.length), E -= S.length;
const I = _.indexOf(S, E);
return I !== -1 && I === E;
}, wI = (_) => {
if (!_) return null;
if (C_(_)) return _;
let S = _.length;
if (!uS(S)) return null;
const E = new Array(S);
for (; S-- > 0; )
E[S] = _[S];
return E;
}, KI = /* @__PURE__ */ ((_) => (S) => _ && S instanceof _)(typeof Uint8Array < "u" && ME(Uint8Array)), TI = (_, S) => {
const I = (_ && _[Z_]).call(_);
let A;
for (; (A = I.next()) && !A.done; ) {
const t = A.value;
S.call(_, t[0], t[1]);
}
}, vI = (_, S) => {
let E;
const I = [];
for (; (E = _.exec(S)) !== null; )
I.push(E);
return I;
}, WI = z("HTMLFormElement"), ZI = (_) => _.toLowerCase().replace(
/[-_\s]([a-z\d])(\w*)/g,
function(E, I, A) {
return I.toUpperCase() + A;
}
), GE = (({ hasOwnProperty: _ }) => (S, E) => _.call(S, E))(Object.prototype), XI = z("RegExp"), GS = (_, S) => {
const E = Object.getOwnPropertyDescriptors(_), I = {};
H_(E, (A, t) => {
let R;
(R = S(A, t, _)) !== !1 && (I[t] = R || A);
}), Object.defineProperties(_, I);
}, jI = (_) => {
GS(_, (S, E) => {
if (K(_) && ["arguments", "caller", "callee"].indexOf(E) !== -1)
return !1;
const I = _[E];
if (K(I)) {
if (S.enumerable = !1, "writable" in S) {
S.writable = !1;
return;
}
S.set || (S.set = () => {
throw Error("Can not rewrite read-only method '" + E + "'");
});
}
});
}, zI = (_, S) => {
const E = {}, I = (A) => {
A.forEach((t) => {
E[t] = !0;
});
};
return C_(_) ? I(_) : I(String(_).split(S)), E;
}, JI = () => {
}, qI = (_, S) => _ != null && Number.isFinite(_ = +_) ? _ : S;
function $I(_) {
return !!(_ && K(_.append) && _[BS] === "FormData" && _[Z_]);
}
const kI = (_) => {
const S = new Array(10), E = (I, A) => {
if (u_(I)) {
if (S.indexOf(I) >= 0)
return;
if (h_(I))
return I;
if (!("toJSON" in I)) {
S[A] = I;
const t = C_(I) ? [] : {};
return H_(I, (R, r) => {
const L = E(R, A + 1);
!N_(L) && (t[r] = L);
}), S[A] = void 0, t;
}
}
return I;
};
return E(_, 0);
}, QI = z("AsyncFunction"), iI = (_) => _ && (u_(_) || K(_)) && K(_.then) && K(_.catch), oS = ((_, S) => _ ? setImmediate : S ? ((E, I) => (I_.addEventListener("message", ({ source: A, data: t }) => {
A === I_ && t === E && I.length && I.shift()();
}, !1), (A) => {
I.push(A), I_.postMessage(E, "*");
}))(`axios@${Math.random()}`, []) : (E) => setTimeout(E))(
typeof setImmediate == "function",
K(I_.postMessage)
), gI = typeof queueMicrotask < "u" ? queueMicrotask.bind(I_) : typeof process < "u" && process.nextTick || oS, FI = (_) => _ != null && K(_[Z_]), D = {
isArray: C_,
isArrayBuffer: hS,
isBuffer: h_,
isFormData: hI,
isArrayBufferView: NI,
isString: CI,
isNumber: uS,
isBoolean: sI,
isObject: u_,
isPlainObject: Y_,
isEmptyObject: aI,
isReadableStream: HI,
isRequest: VI,
isResponse: GI,
isHeaders: oI,
isUndefined: N_,
isDate: cI,
isFile: MI,
isBlob: UI,
isRegExp: XI,
isFunction: K,
isStream: BI,
isURLSearchParams: uI,
isTypedArray: KI,
isFileList: fI,
forEach: H_,
merge: tE,
extend: lI,
trim: PI,
stripBOM: mI,
inherits: eI,
toFlatObject: bI,
kindOf: X_,
kindOfTest: z,
endsWith: YI,
toArray: wI,
forEachEntry: TI,
matchAll: vI,
isHTMLForm: WI,
hasOwnProperty: GE,
hasOwnProp: GE,
// an alias to avoid ESLint no-prototype-builtins detection
reduceDescriptors: GS,
freezeMethods: jI,
toObjectSet: zI,
toCamelCase: ZI,
noop: JI,
toFiniteNumber: qI,
findKey: HS,
global: I_,
isContextDefined: VS,
isSpecCompliantForm: $I,
toJSONObject: kI,
isAsyncFn: QI,
isThenable: iI,
setImmediate: oS,
asap: gI,
isIterable: FI
};
function G(_, S, E, I, A) {
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = _, this.name = "AxiosError", S && (this.code = S), E && (this.config = E), I && (this.request = I), A && (this.response = A, this.status = A.status ? A.status : null);
}
D.inherits(G, Error, {
toJSON: function() {
return {
// Standard
message: this.message,
name: this.name,
// Microsoft
description: this.description,
number: this.number,
// Mozilla
fileName: this.fileName,
lineNumber: this.lineNumber,
columnNumber: this.columnNumber,
stack: this.stack,
// Axios
config: D.toJSONObject(this.config),
code: this.code,
status: this.status
};
}
});
const PS = G.prototype, lS = {};
[
"ERR_BAD_OPTION_VALUE",
"ERR_BAD_OPTION",
"ECONNABORTED",
"ETIMEDOUT",
"ERR_NETWORK",
"ERR_FR_TOO_MANY_REDIRECTS",
"ERR_DEPRECATED",
"ERR_BAD_RESPONSE",
"ERR_BAD_REQUEST",
"ERR_CANCELED",
"ERR_NOT_SUPPORT",
"ERR_INVALID_URL"
// eslint-disable-next-line func-names
].forEach((_) => {
lS[_] = { value: _ };
});
Object.defineProperties(G, lS);
Object.defineProperty(PS, "isAxiosError", { value: !0 });
G.from = (_, S, E, I, A, t) => {
const R = Object.create(PS);
D.toFlatObject(_, R, function(n) {
return n !== Error.prototype;
}, (O) => O !== "isAxiosError");
const r = _ && _.message ? _.message : "Error", L = S == null && _ ? _.code : S;
return G.call(R, r, L, E, I, A), _ && R.cause == null && Object.defineProperty(R, "cause", { value: _, configurable: !0 }), R.name = _ && _.name || "Error", t && Object.assign(R, t), R;
};
const xI = null;
function RE(_) {
return D.isPlainObject(_) || D.isArray(_);
}
function mS(_) {
return D.endsWith(_, "[]") ? _.slice(0, -2) : _;
}
function oE(_, S, E) {
return _ ? _.concat(S).map(function(A, t) {
return A = mS(A), !E && t ? "[" + A + "]" : A;
}).join(E ? "." : "") : S;
}
function dI(_) {
return D.isArray(_) && !_.some(RE);
}
const pI = D.toFlatObject(D, {}, null, function(S) {
return /^is[A-Z]/.test(S);
});
function z_(_, S, E) {
if (!D.isObject(_))
throw new TypeError("target must be an object");
S = S || new FormData(), E = D.toFlatObject(E, {
metaTokens: !0,
dots: !1,
indexes: !1
}, !1, function(U, s) {
return !D.isUndefined(s[U]);
});
const I = E.metaTokens, A = E.visitor || n, t = E.dots, R = E.indexes, L = (E.Blob || typeof Blob < "u" && Blob) && D.isSpecCompliantForm(S);
if (!D.isFunction(A))
throw new TypeError("visitor must be a function");
function O(N) {
if (N === null) return "";
if (D.isDate(N))
return N.toISOString();
if (D.isBoolean(N))
return N.toString();
if (!L && D.isBlob(N))
throw new G("Blob is not supported. Use a Buffer instead.");
return D.isArrayBuffer(N) || D.isTypedArray(N) ? L && typeof Blob == "function" ? new Blob([N]) : Buffer.from(N) : N;
}
function n(N, U, s) {
let B = N;
if (N && !s && typeof N == "object") {
if (D.endsWith(U, "{}"))
U = I ? U : U.slice(0, -2), N = JSON.stringify(N);
else if (D.isArray(N) && dI(N) || (D.isFileList(N) || D.endsWith(U, "[]")) && (B = D.toArray(N)))
return U = mS(U), B.forEach(function(h, a) {
!(D.isUndefined(h) || h === null) && S.append(
// eslint-disable-next-line no-nested-ternary
R === !0 ? oE([U], a, t) : R === null ? U : U + "[]",
O(h)
);
}), !1;
}
return RE(N) ? !0 : (S.append(oE(s, U, t), O(N)), !1);
}
const c = [], M = Object.assign(pI, {
defaultVisitor: n,
convertValue: O,
isVisitable: RE
});
function C(N, U) {
if (!D.isUndefined(N)) {
if (c.indexOf(N) !== -1)
throw Error("Circular reference detected in " + U.join("."));
c.push(N), D.forEach(N, function(B, H) {
(!(D.isUndefined(B) || B === null) && A.call(
S,
B,
D.isString(H) ? H.trim() : H,
U,
M
)) === !0 && C(B, U ? U.concat(H) : [H]);
}), c.pop();
}
}
if (!D.isObject(_))
throw new TypeError("data must be an object");
return C(_), S;
}
function PE(_) {
const S = {
"!": "%21",
"'": "%27",
"(": "%28",
")": "%29",
"~": "%7E",
"%20": "+",
"%00": "\0"
};
return encodeURIComponent(_).replace(/[!'()~]|%20|%00/g, function(I) {
return S[I];
});
}
function UE(_, S) {
this._pairs = [], _ && z_(_, this, S);
}
const eS = UE.prototype;
eS.append = function(S, E) {
this._pairs.push([S, E]);
};
eS.toString = function(S) {
const E = S ? function(I) {
return S.call(this, I, PE);
} : PE;
return this._pairs.map(function(A) {
return E(A[0]) + "=" + E(A[1]);
}, "").join("&");
};
function yI(_) {
return encodeURIComponent(_).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
}
function bS(_, S, E) {
if (!S)
return _;
const I = E && E.encode || yI;
D.isFunction(E) && (E = {
serialize: E
});
const A = E && E.serialize;
let t;
if (A ? t = A(S, E) : t = D.isURLSearchParams(S) ? S.toString() : new UE(S, E).toString(I), t) {
const R = _.indexOf("#");
R !== -1 && (_ = _.slice(0, R)), _ += (_.indexOf("?") === -1 ? "?" : "&") + t;
}
return _;
}
class lE {
constructor() {
this.handlers = [];
}
/**
* Add a new interceptor to the stack
*
* @param {Function} fulfilled The function to handle `then` for a `Promise`
* @param {Function} rejected The function to handle `reject` for a `Promise`
*
* @return {Number} An ID used to remove interceptor later
*/
use(S, E, I) {
return this.handlers.push({
fulfilled: S,
rejected: E,
synchronous: I ? I.synchronous : !1,
runWhen: I ? I.runWhen : null
}), this.handlers.length - 1;
}
/**
* Remove an interceptor from the stack
*
* @param {Number} id The ID that was returned by `use`
*
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
*/
eject(S) {
this.handlers[S] && (this.handlers[S] = null);
}
/**
* Clear all interceptors from the stack
*
* @returns {void}
*/
clear() {
this.handlers && (this.handlers = []);
}
/**
* Iterate over all the registered interceptors
*
* This method is particularly useful for skipping over any
* interceptors that may have become `null` calling `eject`.
*
* @param {Function} fn The function to call for each interceptor
*
* @returns {void}
*/
forEach(S) {
D.forEach(this.handlers, function(I) {
I !== null && S(I);
});
}
}
const YS = {
silentJSONParsing: !0,
forcedJSONParsing: !0,
clarifyTimeoutError: !1
}, _A = typeof URLSearchParams < "u" ? URLSearchParams : UE, EA = typeof FormData < "u" ? FormData : null, SA = typeof Blob < "u" ? Blob : null, IA = {
isBrowser: !0,
classes: {
URLSearchParams: _A,
FormData: EA,
Blob: SA
},
protocols: ["http", "https", "file", "blob", "url", "data"]
}, fE = typeof window < "u" && typeof document < "u", OE = typeof navigator == "object" && navigator || void 0, AA = fE && (!OE || ["ReactNative", "NativeScript", "NS"].indexOf(OE.product) < 0), tA = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", RA = fE && window.location.href || "http://localhost", OA = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
hasBrowserEnv: fE,
hasStandardBrowserEnv: AA,
hasStandardBrowserWebWorkerEnv: tA,
navigator: OE,
origin: RA
}, Symbol.toStringTag, { value: "Module" })), w = {
...OA,
...IA
};
function rA(_, S) {
return z_(_, new w.classes.URLSearchParams(), {
visitor: function(E, I, A, t) {
return w.isNode && D.isBuffer(E) ? (this.append(I, E.toString("base64")), !1) : t.defaultVisitor.apply(this, argum