@napi-rs/cli
Version:
Cli tools for napi-rs
1,575 lines (1,516 loc) • 1.3 MB
JavaScript
//#region rolldown:runtime
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") for (var keys$1 = __getOwnPropNames(from), i = 0, n = keys$1.length, key; i < n; i++) {
key = keys$1[i];
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
get: ((k) => from[k]).bind(null, key),
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
});
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
value: mod,
enumerable: true
}) : target, mod));
//#endregion
const node_path = __toESM(require("node:path"));
const colorette = __toESM(require("colorette"));
const clipanion = __toESM(require("clipanion"));
const debug = __toESM(require("debug"));
const node_fs = __toESM(require("node:fs"));
const node_util = __toESM(require("node:util"));
const node_child_process = __toESM(require("node:child_process"));
const node_crypto = __toESM(require("node:crypto"));
const node_module = __toESM(require("node:module"));
const node_os = __toESM(require("node:os"));
const semver = __toESM(require("semver"));
const js_yaml = __toESM(require("js-yaml"));
const typanion = __toESM(require("typanion"));
const node_fs_promises = __toESM(require("node:fs/promises"));
const find_up = __toESM(require("find-up"));
//#region src/def/artifacts.ts
var BaseArtifactsCommand = class extends clipanion.Command {
static paths = [["artifacts"]];
static usage = clipanion.Command.Usage({ description: "Copy artifacts from Github Actions into npm packages and ready to publish" });
cwd = clipanion.Option.String("--cwd", process.cwd(), { description: "The working directory of where napi command will be executed in, all other paths options are relative to this path" });
configPath = clipanion.Option.String("--config-path,-c", { description: "Path to `napi` config json file" });
packageJsonPath = clipanion.Option.String("--package-json-path", "package.json", { description: "Path to `package.json`" });
outputDir = clipanion.Option.String("--output-dir,-o,-d", "./artifacts", { description: "Path to the folder where all built `.node` files put, same as `--output-dir` of build command" });
npmDir = clipanion.Option.String("--npm-dir", "npm", { description: "Path to the folder where the npm packages put" });
buildOutputDir = clipanion.Option.String("--build-output-dir", { description: "Path to the build output dir, only needed when targets contains `wasm32-wasi-*`" });
getOptions() {
return {
cwd: this.cwd,
configPath: this.configPath,
packageJsonPath: this.packageJsonPath,
outputDir: this.outputDir,
npmDir: this.npmDir,
buildOutputDir: this.buildOutputDir
};
}
};
function applyDefaultArtifactsOptions(options) {
return {
cwd: process.cwd(),
packageJsonPath: "package.json",
outputDir: "./artifacts",
npmDir: "npm",
...options
};
}
//#endregion
//#region src/utils/log.ts
debug.default.formatters.i = (v) => {
return colorette.green(v);
};
const debugFactory = (namespace) => {
const debug$9 = (0, debug.default)(`napi:${namespace}`);
debug$9.info = (...args) => console.error(colorette.black(colorette.bgGreen(" INFO ")), ...args);
debug$9.warn = (...args) => console.error(colorette.black(colorette.bgYellow(" WARNING ")), ...args);
debug$9.error = (...args) => console.error(colorette.white(colorette.bgRed(" ERROR ")), ...args.map((arg) => arg instanceof Error ? arg.stack ?? arg.message : arg));
return debug$9;
};
const debug$8 = debugFactory("utils");
//#endregion
//#region package.json
var name = "@napi-rs/cli";
var version$1 = "3.0.4";
var description = "Cli tools for napi-rs";
var author = "LongYinan <lynweklm@gmail.com>";
var homepage = "https://github.com/napi-rs/napi-rs";
var license = "MIT";
var type = "module";
var engines = { "node": ">= 16" };
var bin = {
"napi": "./dist/cli.js",
"napi-raw": "./cli.mjs"
};
var main = "./dist/index.cjs";
var module$1 = "./dist/index.js";
var exports$1 = {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.cjs"
}
},
"./package.json": {
"import": "./package.json",
"require": "./package.json"
}
};
var files = ["dist", "src"];
var keywords = [
"cli",
"rust",
"napi",
"n-api",
"node-api",
"node-addon",
"neon"
];
var maintainers = [{
"name": "LongYinan",
"email": "lynweklm@gmail.com",
"homepage": "https://github.com/Brooooooklyn"
}, {
"name": "forehalo",
"homepage": "https://github.com/forehalo"
}];
var repository = {
"type": "git",
"url": "git+https://github.com/napi-rs/napi-rs.git"
};
var publishConfig = {
"registry": "https://registry.npmjs.org/",
"access": "public"
};
var bugs = { "url": "https://github.com/napi-rs/napi-rs/issues" };
var dependencies = {
"@inquirer/prompts": "^7.4.0",
"@napi-rs/cross-toolchain": "^1.0.0",
"@napi-rs/wasm-tools": "^1.0.0",
"@octokit/rest": "^22.0.0",
"clipanion": "^4.0.0-rc.4",
"colorette": "^2.0.20",
"debug": "^4.4.0",
"emnapi": "^1.4.0",
"find-up": "^7.0.0",
"js-yaml": "^4.1.0",
"lodash-es": "^4.17.21",
"semver": "^7.7.1",
"typanion": "^3.14.0"
};
var devDependencies = {
"@emnapi/core": "^1.4.0",
"@emnapi/runtime": "^1.4.0",
"@oxc-node/core": "^0.0.30",
"@std/toml": "npm:@jsr/std__toml@^1.0.8",
"@types/debug": "^4.1.12",
"@types/inquirer": "^9.0.7",
"@types/js-yaml": "^4.0.9",
"@types/lodash-es": "^4.17.12",
"@types/node": "^22.13.16",
"@types/semver": "^7.7.0",
"ava": "^6.2.0",
"env-paths": "^3.0.0",
"prettier": "^3.5.3",
"rolldown": "latest",
"tslib": "^2.8.1",
"typescript": "^5.8.2"
};
var peerDependencies = {
"@emnapi/runtime": "^1.1.0",
"emnapi": "^1.1.0"
};
var peerDependenciesMeta = {
"@emnapi/runtime": { "optional": true },
"emnapi": { "optional": true }
};
var funding = {
"type": "github",
"url": "https://github.com/sponsors/Brooooooklyn"
};
var scripts = {
"clean": "node --import @oxc-node/core/register ./clean.ts",
"codegen": "node --import @oxc-node/core/register ./codegen/index.ts",
"build": "tsc && yarn clean && rolldown -c rolldown.config.js",
"test": "node --import @oxc-node/core/register ../node_modules/ava/entrypoints/cli.mjs"
};
var ava = {
"extensions": { "ts": "module" },
"timeout": "1m",
"files": ["**/__tests__/**/*.spec.ts", "e2e/**/*.spec.ts"]
};
var gitHead = "521b5774aa89f1a7c807a6ddba509ce43973f624";
var package_default = {
name,
version: version$1,
description,
author,
homepage,
license,
type,
engines,
bin,
main,
module: module$1,
exports: exports$1,
files,
keywords,
maintainers,
repository,
publishConfig,
bugs,
dependencies,
devDependencies,
peerDependencies,
peerDependenciesMeta,
funding,
scripts,
ava,
gitHead
};
//#endregion
//#region src/utils/misc.ts
const readFileAsync = (0, node_util.promisify)(node_fs.readFile);
const writeFileAsync = (0, node_util.promisify)(node_fs.writeFile);
const unlinkAsync = (0, node_util.promisify)(node_fs.unlink);
const copyFileAsync = (0, node_util.promisify)(node_fs.copyFile);
const mkdirAsync = (0, node_util.promisify)(node_fs.mkdir);
const statAsync = (0, node_util.promisify)(node_fs.stat);
const readdirAsync = (0, node_util.promisify)(node_fs.readdir);
async function fileExists(path$1) {
const exists = await statAsync(path$1).then(() => true).catch(() => false);
return exists;
}
async function dirExistsAsync(path$1) {
try {
const stats = await statAsync(path$1);
return stats.isDirectory();
} catch {
return false;
}
}
function pick(o, ...keys$1) {
return keys$1.reduce((acc, key) => {
acc[key] = o[key];
return acc;
}, {});
}
async function updatePackageJson(path$1, partial) {
const exists = await fileExists(path$1);
if (!exists) {
debug$8(`File not exists ${path$1}`);
return;
}
const old = JSON.parse(await readFileAsync(path$1, "utf8"));
await writeFileAsync(path$1, JSON.stringify({
...old,
...partial
}, null, 2));
}
const CLI_VERSION = package_default.version;
//#endregion
//#region src/utils/target.ts
const AVAILABLE_TARGETS = [
"aarch64-apple-darwin",
"aarch64-linux-android",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"aarch64-unknown-linux-ohos",
"aarch64-pc-windows-msvc",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"x86_64-unknown-linux-ohos",
"x86_64-unknown-freebsd",
"i686-pc-windows-msvc",
"armv7-unknown-linux-gnueabihf",
"armv7-unknown-linux-musleabihf",
"armv7-linux-androideabi",
"universal-apple-darwin",
"riscv64gc-unknown-linux-gnu",
"powerpc64le-unknown-linux-gnu",
"s390x-unknown-linux-gnu",
"wasm32-wasi-preview1-threads",
"wasm32-wasip1-threads"
];
const DEFAULT_TARGETS = [
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu"
];
const TARGET_LINKER = {
"aarch64-unknown-linux-musl": "aarch64-linux-musl-gcc",
"riscv64gc-unknown-linux-gnu": "riscv64-linux-gnu-gcc",
"powerpc64le-unknown-linux-gnu": "powerpc64le-linux-gnu-gcc",
"s390x-unknown-linux-gnu": "s390x-linux-gnu-gcc"
};
const CpuToNodeArch = {
x86_64: "x64",
aarch64: "arm64",
i686: "ia32",
armv7: "arm",
riscv64gc: "riscv64",
powerpc64le: "ppc64"
};
const SysToNodePlatform = {
linux: "linux",
freebsd: "freebsd",
darwin: "darwin",
windows: "win32",
ohos: "openharmony"
};
const UniArchsByPlatform = { darwin: ["x64", "arm64"] };
/**
* A triple is a specific format for specifying a target architecture.
* Triples may be referred to as a target triple which is the architecture for the artifact produced, and the host triple which is the architecture that the compiler is running on.
* The general format of the triple is `<arch><sub>-<vendor>-<sys>-<abi>` where:
* - `arch` = The base CPU architecture, for example `x86_64`, `i686`, `arm`, `thumb`, `mips`, etc.
* - `sub` = The CPU sub-architecture, for example `arm` has `v7`, `v7s`, `v5te`, etc.
* - `vendor` = The vendor, for example `unknown`, `apple`, `pc`, `nvidia`, etc.
* - `sys` = The system name, for example `linux`, `windows`, `darwin`, etc. none is typically used for bare-metal without an OS.
* - `abi` = The ABI, for example `gnu`, `android`, `eabi`, etc.
*/
function parseTriple(rawTriple) {
if (rawTriple === "wasm32-wasi" || rawTriple === "wasm32-wasi-preview1-threads" || rawTriple.startsWith("wasm32-wasip")) return {
triple: rawTriple,
platformArchABI: "wasm32-wasi",
platform: "wasi",
arch: "wasm32",
abi: "wasi"
};
const triple = rawTriple.endsWith("eabi") ? `${rawTriple.slice(0, -4)}-eabi` : rawTriple;
const triples = triple.split("-");
let cpu;
let sys;
let abi = null;
if (triples.length === 2) [cpu, sys] = triples;
else [cpu, , sys, abi = null] = triples;
const platform = SysToNodePlatform[sys] ?? sys;
const arch = CpuToNodeArch[cpu] ?? cpu;
if (rawTriple.includes("ohos")) return {
triple: rawTriple,
platformArchABI: `linux-${arch}-ohos`,
platform: "openharmony",
arch,
abi: null
};
return {
triple: rawTriple,
platformArchABI: abi ? `${platform}-${arch}-${abi}` : `${platform}-${arch}`,
platform,
arch,
abi
};
}
function getSystemDefaultTarget() {
const host = (0, node_child_process.execSync)(`rustc -vV`, { env: process.env }).toString("utf8").split("\n").find((line) => line.startsWith("host: "));
const triple = host?.slice(6);
if (!triple) throw new TypeError(`Can not parse target triple from host`);
return parseTriple(triple);
}
function getTargetLinker(target) {
return TARGET_LINKER[target];
}
function targetToEnvVar(target) {
return target.replace(/-/g, "_").toUpperCase();
}
//#endregion
//#region src/utils/version.ts
let NapiVersion = /* @__PURE__ */ function(NapiVersion$1) {
NapiVersion$1[NapiVersion$1["Napi1"] = 1] = "Napi1";
NapiVersion$1[NapiVersion$1["Napi2"] = 2] = "Napi2";
NapiVersion$1[NapiVersion$1["Napi3"] = 3] = "Napi3";
NapiVersion$1[NapiVersion$1["Napi4"] = 4] = "Napi4";
NapiVersion$1[NapiVersion$1["Napi5"] = 5] = "Napi5";
NapiVersion$1[NapiVersion$1["Napi6"] = 6] = "Napi6";
NapiVersion$1[NapiVersion$1["Napi7"] = 7] = "Napi7";
NapiVersion$1[NapiVersion$1["Napi8"] = 8] = "Napi8";
NapiVersion$1[NapiVersion$1["Napi9"] = 9] = "Napi9";
return NapiVersion$1;
}({});
const NAPI_VERSION_MATRIX = new Map([
[NapiVersion.Napi1, "8.6.0 | 9.0.0 | 10.0.0"],
[NapiVersion.Napi2, "8.10.0 | 9.3.0 | 10.0.0"],
[NapiVersion.Napi3, "6.14.2 | 8.11.2 | 9.11.0 | 10.0.0"],
[NapiVersion.Napi4, "10.16.0 | 11.8.0 | 12.0.0"],
[NapiVersion.Napi5, "10.17.0 | 12.11.0 | 13.0.0"],
[NapiVersion.Napi6, "10.20.0 | 12.17.0 | 14.0.0"],
[NapiVersion.Napi7, "10.23.0 | 12.19.0 | 14.12.0 | 15.0.0"],
[NapiVersion.Napi8, "12.22.0 | 14.17.0 | 15.12.0 | 16.0.0"],
[NapiVersion.Napi9, "18.17.0 | 20.3.0 | 21.1.0"]
]);
function parseNodeVersion(v) {
const matches = v.match(/v?([0-9]+)\.([0-9]+)\.([0-9]+)/i);
if (!matches) throw new Error("Unknown node version number: " + v);
const [, major, minor, patch] = matches;
return {
major: parseInt(major),
minor: parseInt(minor),
patch: parseInt(patch)
};
}
function requiredNodeVersions(napiVersion) {
const requirement = NAPI_VERSION_MATRIX.get(napiVersion);
if (!requirement) return [parseNodeVersion("10.0.0")];
return requirement.split("|").map(parseNodeVersion);
}
function toEngineRequirement(versions) {
const requirements = [];
versions.forEach((v, i) => {
let req = "";
if (i !== 0) {
const lastVersion = versions[i - 1];
req += `< ${lastVersion.major + 1}`;
}
req += `${i === 0 ? "" : " || "}>= ${v.major}.${v.minor}.${v.patch}`;
requirements.push(req);
});
return requirements.join(" ");
}
function napiEngineRequirement(napiVersion) {
return toEngineRequirement(requiredNodeVersions(napiVersion));
}
//#endregion
//#region src/utils/metadata.ts
async function parseMetadata(manifestPath) {
if (!node_fs.default.existsSync(manifestPath)) throw new Error(`No crate found in manifest: ${manifestPath}`);
const childProcess = (0, node_child_process.spawn)("cargo", [
"metadata",
"--manifest-path",
manifestPath,
"--format-version",
"1"
], { stdio: "pipe" });
let stdout = "";
let stderr = "";
let status = 0;
let error = null;
childProcess.stdout.on("data", (data) => {
stdout += data;
});
childProcess.stderr.on("data", (data) => {
stderr += data;
});
await new Promise((resolve$7) => {
childProcess.on("close", (code) => {
status = code ?? 0;
resolve$7();
});
});
if (error) throw new Error("cargo metadata failed to run", { cause: error });
if (status !== 0) {
const simpleMessage = `cargo metadata exited with code ${status}`;
throw new Error(`${simpleMessage} and error message:\n\n${stderr}`, { cause: new Error(simpleMessage) });
}
try {
return JSON.parse(stdout);
} catch (e) {
throw new Error("Failed to parse cargo metadata JSON", { cause: e });
}
}
//#endregion
//#region ../node_modules/lodash-es/_freeGlobal.js
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
var _freeGlobal_default = freeGlobal;
//#endregion
//#region ../node_modules/lodash-es/_root.js
/** Detect free variable `self`. */
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = _freeGlobal_default || freeSelf || Function("return this")();
var _root_default = root;
//#endregion
//#region ../node_modules/lodash-es/_Symbol.js
/** Built-in value references. */
var Symbol$1 = _root_default.Symbol;
var _Symbol_default = Symbol$1;
//#endregion
//#region ../node_modules/lodash-es/_getRawTag.js
/** Used for built-in method references. */
var objectProto$15 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$12 = objectProto$15.hasOwnProperty;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString$1 = objectProto$15.toString;
/** Built-in value references. */
var symToStringTag$1 = _Symbol_default ? _Symbol_default.toStringTag : void 0;
/**
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the raw `toStringTag`.
*/
function getRawTag(value$1) {
var isOwn = hasOwnProperty$12.call(value$1, symToStringTag$1), tag = value$1[symToStringTag$1];
try {
value$1[symToStringTag$1] = void 0;
var unmasked = true;
} catch (e) {}
var result = nativeObjectToString$1.call(value$1);
if (unmasked) if (isOwn) value$1[symToStringTag$1] = tag;
else delete value$1[symToStringTag$1];
return result;
}
var _getRawTag_default = getRawTag;
//#endregion
//#region ../node_modules/lodash-es/_objectToString.js
/** Used for built-in method references. */
var objectProto$14 = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto$14.toString;
/**
* Converts `value` to a string using `Object.prototype.toString`.
*
* @private
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
*/
function objectToString(value$1) {
return nativeObjectToString.call(value$1);
}
var _objectToString_default = objectToString;
//#endregion
//#region ../node_modules/lodash-es/_baseGetTag.js
/** `Object#toString` result references. */
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
/** Built-in value references. */
var symToStringTag = _Symbol_default ? _Symbol_default.toStringTag : void 0;
/**
* The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value$1) {
if (value$1 == null) return value$1 === void 0 ? undefinedTag : nullTag;
return symToStringTag && symToStringTag in Object(value$1) ? _getRawTag_default(value$1) : _objectToString_default(value$1);
}
var _baseGetTag_default = baseGetTag;
//#endregion
//#region ../node_modules/lodash-es/isObjectLike.js
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value$1) {
return value$1 != null && typeof value$1 == "object";
}
var isObjectLike_default = isObjectLike;
//#endregion
//#region ../node_modules/lodash-es/isSymbol.js
/** `Object#toString` result references. */
var symbolTag$3 = "[object Symbol]";
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value$1) {
return typeof value$1 == "symbol" || isObjectLike_default(value$1) && _baseGetTag_default(value$1) == symbolTag$3;
}
var isSymbol_default = isSymbol;
//#endregion
//#region ../node_modules/lodash-es/_arrayMap.js
/**
* A specialized version of `_.map` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function arrayMap(array, iteratee) {
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
while (++index < length) result[index] = iteratee(array[index], index, array);
return result;
}
var _arrayMap_default = arrayMap;
//#endregion
//#region ../node_modules/lodash-es/isArray.js
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
var isArray_default = isArray;
//#endregion
//#region ../node_modules/lodash-es/_baseToString.js
/** Used as references for various `Number` constants. */
var INFINITY$1 = Infinity;
/** Used to convert symbols to primitives and strings. */
var symbolProto$2 = _Symbol_default ? _Symbol_default.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
/**
* The base implementation of `_.toString` which doesn't convert nullish
* values to empty strings.
*
* @private
* @param {*} value The value to process.
* @returns {string} Returns the string.
*/
function baseToString(value$1) {
if (typeof value$1 == "string") return value$1;
if (isArray_default(value$1)) return _arrayMap_default(value$1, baseToString) + "";
if (isSymbol_default(value$1)) return symbolToString ? symbolToString.call(value$1) : "";
var result = value$1 + "";
return result == "0" && 1 / value$1 == -INFINITY$1 ? "-0" : result;
}
var _baseToString_default = baseToString;
//#endregion
//#region ../node_modules/lodash-es/isObject.js
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject$1(value$1) {
var type$1 = typeof value$1;
return value$1 != null && (type$1 == "object" || type$1 == "function");
}
var isObject_default = isObject$1;
//#endregion
//#region ../node_modules/lodash-es/identity.js
/**
* This method returns the first argument it receives.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'a': 1 };
*
* console.log(_.identity(object) === object);
* // => true
*/
function identity(value$1) {
return value$1;
}
var identity_default = identity;
//#endregion
//#region ../node_modules/lodash-es/isFunction.js
/** `Object#toString` result references. */
var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value$1) {
if (!isObject_default(value$1)) return false;
var tag = _baseGetTag_default(value$1);
return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
}
var isFunction_default = isFunction;
//#endregion
//#region ../node_modules/lodash-es/_coreJsData.js
/** Used to detect overreaching core-js shims. */
var coreJsData = _root_default["__core-js_shared__"];
var _coreJsData_default = coreJsData;
//#endregion
//#region ../node_modules/lodash-es/_isMasked.js
/** Used to detect methods masquerading as native. */
var maskSrcKey = function() {
var uid = /[^.]+$/.exec(_coreJsData_default && _coreJsData_default.keys && _coreJsData_default.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
/**
* Checks if `func` has its source masked.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
*/
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
var _isMasked_default = isMasked;
//#endregion
//#region ../node_modules/lodash-es/_toSource.js
/** Used for built-in method references. */
var funcProto$2 = Function.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString$2 = funcProto$2.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString$2.call(func);
} catch (e) {}
try {
return func + "";
} catch (e) {}
}
return "";
}
var _toSource_default = toSource;
//#endregion
//#region ../node_modules/lodash-es/_baseIsNative.js
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used for built-in method references. */
var funcProto$1 = Function.prototype, objectProto$13 = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString$1 = funcProto$1.toString;
/** Used to check objects for own properties. */
var hasOwnProperty$11 = objectProto$13.hasOwnProperty;
/** Used to detect if a method is native. */
var reIsNative = RegExp("^" + funcToString$1.call(hasOwnProperty$11).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
/**
* The base implementation of `_.isNative` without bad shim checks.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
*/
function baseIsNative(value$1) {
if (!isObject_default(value$1) || _isMasked_default(value$1)) return false;
var pattern = isFunction_default(value$1) ? reIsNative : reIsHostCtor;
return pattern.test(_toSource_default(value$1));
}
var _baseIsNative_default = baseIsNative;
//#endregion
//#region ../node_modules/lodash-es/_getValue.js
/**
* Gets the value at `key` of `object`.
*
* @private
* @param {Object} [object] The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function getValue(object, key) {
return object == null ? void 0 : object[key];
}
var _getValue_default = getValue;
//#endregion
//#region ../node_modules/lodash-es/_getNative.js
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value$1 = _getValue_default(object, key);
return _baseIsNative_default(value$1) ? value$1 : void 0;
}
var _getNative_default = getNative;
//#endregion
//#region ../node_modules/lodash-es/_WeakMap.js
var WeakMap = _getNative_default(_root_default, "WeakMap");
var _WeakMap_default = WeakMap;
//#endregion
//#region ../node_modules/lodash-es/_baseCreate.js
/** Built-in value references. */
var objectCreate = Object.create;
/**
* The base implementation of `_.create` without support for assigning
* properties to the created object.
*
* @private
* @param {Object} proto The object to inherit from.
* @returns {Object} Returns the new object.
*/
var baseCreate = function() {
function object() {}
return function(proto) {
if (!isObject_default(proto)) return {};
if (objectCreate) return objectCreate(proto);
object.prototype = proto;
var result = new object();
object.prototype = void 0;
return result;
};
}();
var _baseCreate_default = baseCreate;
//#endregion
//#region ../node_modules/lodash-es/_apply.js
/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
switch (args.length) {
case 0: return func.call(thisArg);
case 1: return func.call(thisArg, args[0]);
case 2: return func.call(thisArg, args[0], args[1]);
case 3: return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
var _apply_default = apply;
//#endregion
//#region ../node_modules/lodash-es/_copyArray.js
/**
* Copies the values of `source` to `array`.
*
* @private
* @param {Array} source The array to copy values from.
* @param {Array} [array=[]] The array to copy values to.
* @returns {Array} Returns `array`.
*/
function copyArray(source, array) {
var index = -1, length = source.length;
array || (array = Array(length));
while (++index < length) array[index] = source[index];
return array;
}
var _copyArray_default = copyArray;
//#endregion
//#region ../node_modules/lodash-es/_shortOut.js
/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800, HOT_SPAN = 16;
var nativeNow = Date.now;
/**
* Creates a function that'll short out and invoke `identity` instead
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
* milliseconds.
*
* @private
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new shortable function.
*/
function shortOut(func) {
var count = 0, lastCalled = 0;
return function() {
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) return arguments[0];
} else count = 0;
return func.apply(void 0, arguments);
};
}
var _shortOut_default = shortOut;
//#endregion
//#region ../node_modules/lodash-es/constant.js
/**
* Creates a function that returns `value`.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {*} value The value to return from the new function.
* @returns {Function} Returns the new constant function.
* @example
*
* var objects = _.times(2, _.constant({ 'a': 1 }));
*
* console.log(objects);
* // => [{ 'a': 1 }, { 'a': 1 }]
*
* console.log(objects[0] === objects[1]);
* // => true
*/
function constant(value$1) {
return function() {
return value$1;
};
}
var constant_default = constant;
//#endregion
//#region ../node_modules/lodash-es/_defineProperty.js
var defineProperty = function() {
try {
var func = _getNative_default(Object, "defineProperty");
func({}, "", {});
return func;
} catch (e) {}
}();
var _defineProperty_default = defineProperty;
//#endregion
//#region ../node_modules/lodash-es/_baseSetToString.js
/**
* The base implementation of `setToString` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var baseSetToString = !_defineProperty_default ? identity_default : function(func, string) {
return _defineProperty_default(func, "toString", {
"configurable": true,
"enumerable": false,
"value": constant_default(string),
"writable": true
});
};
var _baseSetToString_default = baseSetToString;
//#endregion
//#region ../node_modules/lodash-es/_setToString.js
/**
* Sets the `toString` method of `func` to return `string`.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var setToString = _shortOut_default(_baseSetToString_default);
var _setToString_default = setToString;
//#endregion
//#region ../node_modules/lodash-es/_arrayEach.js
/**
* A specialized version of `_.forEach` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEach(array, iteratee) {
var index = -1, length = array == null ? 0 : array.length;
while (++index < length) if (iteratee(array[index], index, array) === false) break;
return array;
}
var _arrayEach_default = arrayEach;
//#endregion
//#region ../node_modules/lodash-es/_isIndex.js
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER$1 = 9007199254740991;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value$1, length) {
var type$1 = typeof value$1;
length = length == null ? MAX_SAFE_INTEGER$1 : length;
return !!length && (type$1 == "number" || type$1 != "symbol" && reIsUint.test(value$1)) && value$1 > -1 && value$1 % 1 == 0 && value$1 < length;
}
var _isIndex_default = isIndex;
//#endregion
//#region ../node_modules/lodash-es/_baseAssignValue.js
/**
* The base implementation of `assignValue` and `assignMergeValue` without
* value checks.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function baseAssignValue(object, key, value$1) {
if (key == "__proto__" && _defineProperty_default) _defineProperty_default(object, key, {
"configurable": true,
"enumerable": true,
"value": value$1,
"writable": true
});
else object[key] = value$1;
}
var _baseAssignValue_default = baseAssignValue;
//#endregion
//#region ../node_modules/lodash-es/eq.js
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value$1, other) {
return value$1 === other || value$1 !== value$1 && other !== other;
}
var eq_default = eq;
//#endregion
//#region ../node_modules/lodash-es/_assignValue.js
/** Used for built-in method references. */
var objectProto$12 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$10 = objectProto$12.hasOwnProperty;
/**
* Assigns `value` to `key` of `object` if the existing value is not equivalent
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignValue(object, key, value$1) {
var objValue = object[key];
if (!(hasOwnProperty$10.call(object, key) && eq_default(objValue, value$1)) || value$1 === void 0 && !(key in object)) _baseAssignValue_default(object, key, value$1);
}
var _assignValue_default = assignValue;
//#endregion
//#region ../node_modules/lodash-es/_copyObject.js
/**
* Copies properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy properties from.
* @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
var isNew = !object;
object || (object = {});
var index = -1, length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
if (newValue === void 0) newValue = source[key];
if (isNew) _baseAssignValue_default(object, key, newValue);
else _assignValue_default(object, key, newValue);
}
return object;
}
var _copyObject_default = copyObject;
//#endregion
//#region ../node_modules/lodash-es/_overRest.js
var nativeMax = Math.max;
/**
* A specialized version of `baseRest` which transforms the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @param {Function} transform The rest array transform.
* @returns {Function} Returns the new function.
*/
function overRest(func, start, transform) {
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
return function() {
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
while (++index < length) array[index] = args[start + index];
index = -1;
var otherArgs = Array(start + 1);
while (++index < start) otherArgs[index] = args[index];
otherArgs[start] = transform(array);
return _apply_default(func, this, otherArgs);
};
}
var _overRest_default = overRest;
//#endregion
//#region ../node_modules/lodash-es/_baseRest.js
/**
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
*/
function baseRest(func, start) {
return _setToString_default(_overRest_default(func, start, identity_default), func + "");
}
var _baseRest_default = baseRest;
//#endregion
//#region ../node_modules/lodash-es/isLength.js
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* @example
*
* _.isLength(3);
* // => true
*
* _.isLength(Number.MIN_VALUE);
* // => false
*
* _.isLength(Infinity);
* // => false
*
* _.isLength('3');
* // => false
*/
function isLength(value$1) {
return typeof value$1 == "number" && value$1 > -1 && value$1 % 1 == 0 && value$1 <= MAX_SAFE_INTEGER;
}
var isLength_default = isLength;
//#endregion
//#region ../node_modules/lodash-es/isArrayLike.js
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value$1) {
return value$1 != null && isLength_default(value$1.length) && !isFunction_default(value$1);
}
var isArrayLike_default = isArrayLike;
//#endregion
//#region ../node_modules/lodash-es/_isIterateeCall.js
/**
* Checks if the given arguments are from an iteratee call.
*
* @private
* @param {*} value The potential iteratee value argument.
* @param {*} index The potential iteratee index or key argument.
* @param {*} object The potential iteratee object argument.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
* else `false`.
*/
function isIterateeCall(value$1, index, object) {
if (!isObject_default(object)) return false;
var type$1 = typeof index;
if (type$1 == "number" ? isArrayLike_default(object) && _isIndex_default(index, object.length) : type$1 == "string" && index in object) return eq_default(object[index], value$1);
return false;
}
var _isIterateeCall_default = isIterateeCall;
//#endregion
//#region ../node_modules/lodash-es/_createAssigner.js
/**
* Creates a function like `_.assign`.
*
* @private
* @param {Function} assigner The function to assign values.
* @returns {Function} Returns the new assigner function.
*/
function createAssigner(assigner) {
return _baseRest_default(function(object, sources) {
var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
if (guard && _isIterateeCall_default(sources[0], sources[1], guard)) {
customizer = length < 3 ? void 0 : customizer;
length = 1;
}
object = Object(object);
while (++index < length) {
var source = sources[index];
if (source) assigner(object, source, index, customizer);
}
return object;
});
}
var _createAssigner_default = createAssigner;
//#endregion
//#region ../node_modules/lodash-es/_isPrototype.js
/** Used for built-in method references. */
var objectProto$11 = Object.prototype;
/**
* Checks if `value` is likely a prototype object.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
function isPrototype(value$1) {
var Ctor = value$1 && value$1.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$11;
return value$1 === proto;
}
var _isPrototype_default = isPrototype;
//#endregion
//#region ../node_modules/lodash-es/_baseTimes.js
/**
* The base implementation of `_.times` without support for iteratee shorthands
* or max array length checks.
*
* @private
* @param {number} n The number of times to invoke `iteratee`.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the array of results.
*/
function baseTimes(n, iteratee) {
var index = -1, result = Array(n);
while (++index < n) result[index] = iteratee(index);
return result;
}
var _baseTimes_default = baseTimes;
//#endregion
//#region ../node_modules/lodash-es/_baseIsArguments.js
/** `Object#toString` result references. */
var argsTag$3 = "[object Arguments]";
/**
* The base implementation of `_.isArguments`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
*/
function baseIsArguments(value$1) {
return isObjectLike_default(value$1) && _baseGetTag_default(value$1) == argsTag$3;
}
var _baseIsArguments_default = baseIsArguments;
//#endregion
//#region ../node_modules/lodash-es/isArguments.js
/** Used for built-in method references. */
var objectProto$10 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$9 = objectProto$10.hasOwnProperty;
/** Built-in value references. */
var propertyIsEnumerable$1 = objectProto$10.propertyIsEnumerable;
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
var isArguments = _baseIsArguments_default(function() {
return arguments;
}()) ? _baseIsArguments_default : function(value$1) {
return isObjectLike_default(value$1) && hasOwnProperty$9.call(value$1, "callee") && !propertyIsEnumerable$1.call(value$1, "callee");
};
var isArguments_default = isArguments;
//#endregion
//#region ../node_modules/lodash-es/stubFalse.js
/**
* This method returns `false`.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {boolean} Returns `false`.
* @example
*
* _.times(2, _.stubFalse);
* // => [false, false]
*/
function stubFalse() {
return false;
}
var stubFalse_default = stubFalse;
//#endregion
//#region ../node_modules/lodash-es/isBuffer.js
/** Detect free variable `exports`. */
var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
/** Built-in value references. */
var Buffer$2 = moduleExports$2 ? _root_default.Buffer : void 0;
var nativeIsBuffer = Buffer$2 ? Buffer$2.isBuffer : void 0;
/**
* Checks if `value` is a buffer.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
* @example
*
* _.isBuffer(new Buffer(2));
* // => true
*
* _.isBuffer(new Uint8Array(2));
* // => false
*/
var isBuffer = nativeIsBuffer || stubFalse_default;
var isBuffer_default = isBuffer;
//#endregion
//#region ../node_modules/lodash-es/_baseIsTypedArray.js
/** `Object#toString` result references. */
var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$1 = "[object Function]", mapTag$5 = "[object Map]", numberTag$3 = "[object Number]", objectTag$4 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", weakMapTag$2 = "[object WeakMap]";
var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$5] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$5] = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false;
/**
* The base implementation of `_.isTypedArray` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
*/
function baseIsTypedArray(value$1) {
return isObjectLike_default(value$1) && isLength_default(value$1.length) && !!typedArrayTags[_baseGetTag_default(value$1)];
}
var _baseIsTypedArray_default = baseIsTypedArray;
//#endregion
//#region ../node_modules/lodash-es/_baseUnary.js
/**
* The base implementation of `_.unary` without support for storing metadata.
*
* @private
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
*/
function baseUnary(func) {
return function(value$1) {
return func(value$1);
};
}
var _baseUnary_default = baseUnary;
//#endregion
//#region ../node_modules/lodash-es/_nodeUtil.js
/** Detect free variable `exports`. */
var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports$1 && _freeGlobal_default.process;
/** Used to access faster Node.js helpers. */
var nodeUtil = function() {
try {
var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
if (types) return types;
return freeProcess && freeProcess.binding && freeProcess.binding("util");
} catch (e) {}
}();
var _nodeUtil_default = nodeUtil;
//#endregion
//#region ../node_modules/lodash-es/isTypedArray.js
var nodeIsTypedArray = _nodeUtil_default && _nodeUtil_default.isTypedArray;
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`