import { SHOULD_AUTOBATCH, combineReducers, createAction, createAsyncThunk, createSelector, createSlice, defaultMemoize, import_react_dom, isAllOf, isAnyOf, isAsyncThunkAction, isFulfilled, isPending, isPlainObject, isRejected, isRejectedWithValue, nanoid, prepareAutoBatched, shallowEqual, useDispatch, useSelector, useStore } from "./chunk-WOQNBAGN.js"; import { require_Stack, require_Symbol, require_WeakMap, require_arrayEach, require_arrayPush, require_baseAssign, require_baseClone, require_baseCreate, require_baseGetTag, require_baseIsEqual, require_baseKeys, require_clone, require_copyArray, require_defineProperty, require_getPrototype, require_getTag, require_isArguments, require_isArray, require_isFunction, require_isIndex, require_isLength, require_isObject, require_isObjectLike, require_isSymbol, require_keys, require_root, require_stringToPath, require_toKey, require_toPath, require_toString } from "./chunk-CE4VABH2.js"; import { T, cn, e, immer_esm_default, pn, r, t } from "./chunk-5VODLFKF.js"; import { require_react } from "./chunk-MADUDGYZ.js"; import { __commonJS, __toESM } from "./chunk-PLDDJCW6.js"; // node_modules/es-errors/type.js var require_type = __commonJS({ "node_modules/es-errors/type.js"(exports, module) { "use strict"; module.exports = TypeError; } }); // (disabled):node_modules/object-inspect/util.inspect var require_util = __commonJS({ "(disabled):node_modules/object-inspect/util.inspect"() { } }); // node_modules/object-inspect/index.js var require_object_inspect = __commonJS({ "node_modules/object-inspect/index.js"(exports, module) { var hasMap = typeof Map === "function" && Map.prototype; var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null; var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null; var mapForEach = hasMap && Map.prototype.forEach; var hasSet = typeof Set === "function" && Set.prototype; var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null; var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null; var setForEach = hasSet && Set.prototype.forEach; var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype; var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype; var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype; var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; var booleanValueOf = Boolean.prototype.valueOf; var objectToString = Object.prototype.toString; var functionToString = Function.prototype.toString; var $match = String.prototype.match; var $slice = String.prototype.slice; var $replace = String.prototype.replace; var $toUpperCase = String.prototype.toUpperCase; var $toLowerCase = String.prototype.toLowerCase; var $test = RegExp.prototype.test; var $concat = Array.prototype.concat; var $join = Array.prototype.join; var $arrSlice = Array.prototype.slice; var $floor = Math.floor; var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null; var gOPS = Object.getOwnPropertySymbols; var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null; var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object"; var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null; var isEnumerable = Object.prototype.propertyIsEnumerable; var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) { return O.__proto__; } : null); function addNumericSeparator(num, str) { if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) { return str; } var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; if (typeof num === "number") { var int = num < 0 ? -$floor(-num) : $floor(num); if (int !== num) { var intStr = String(int); var dec = $slice.call(str, intStr.length + 1); return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, ""); } } return $replace.call(str, sepRegex, "$&_"); } var utilInspect = require_util(); var inspectCustom = utilInspect.custom; var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; var quotes = { __proto__: null, "double": '"', single: "'" }; var quoteREs = { __proto__: null, "double": /(["\\])/g, single: /(['\\])/g }; module.exports = function inspect_(obj, options, depth, seen) { var opts = options || {}; if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) { throw new TypeError('option "quoteStyle" must be "single" or "double"'); } if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) { throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); } var customInspect = has(opts, "customInspect") ? opts.customInspect : true; if (typeof customInspect !== "boolean" && customInspect !== "symbol") { throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); } if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) { throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); } if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") { throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); } var numericSeparator = opts.numericSeparator; if (typeof obj === "undefined") { return "undefined"; } if (obj === null) { return "null"; } if (typeof obj === "boolean") { return obj ? "true" : "false"; } if (typeof obj === "string") { return inspectString(obj, opts); } if (typeof obj === "number") { if (obj === 0) { return Infinity / obj > 0 ? "0" : "-0"; } var str = String(obj); return numericSeparator ? addNumericSeparator(obj, str) : str; } if (typeof obj === "bigint") { var bigIntStr = String(obj) + "n"; return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; } var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth; if (typeof depth === "undefined") { depth = 0; } if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") { return isArray(obj) ? "[Array]" : "[Object]"; } var indent = getIndent(opts, depth); if (typeof seen === "undefined") { seen = []; } else if (indexOf(seen, obj) >= 0) { return "[Circular]"; } function inspect(value, from, noIndent) { if (from) { seen = $arrSlice.call(seen); seen.push(from); } if (noIndent) { var newOpts = { depth: opts.depth }; if (has(opts, "quoteStyle")) { newOpts.quoteStyle = opts.quoteStyle; } return inspect_(value, newOpts, depth + 1, seen); } return inspect_(value, opts, depth + 1, seen); } if (typeof obj === "function" && !isRegExp(obj)) { var name = nameOf(obj); var keys = arrObjKeys(obj, inspect); return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : ""); } if (isSymbol(obj)) { var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj); return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString; } if (isElement(obj)) { var s = "<" + $toLowerCase.call(String(obj.nodeName)); var attrs = obj.attributes || []; for (var i = 0; i < attrs.length; i++) { s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts); } s += ">"; if (obj.childNodes && obj.childNodes.length) { s += "..."; } s += ""; return s; } if (isArray(obj)) { if (obj.length === 0) { return "[]"; } var xs = arrObjKeys(obj, inspect); if (indent && !singleLineValues(xs)) { return "[" + indentedJoin(xs, indent) + "]"; } return "[ " + $join.call(xs, ", ") + " ]"; } if (isError(obj)) { var parts = arrObjKeys(obj, inspect); if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) { return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }"; } if (parts.length === 0) { return "[" + String(obj) + "]"; } return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }"; } if (typeof obj === "object" && customInspect) { if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) { return utilInspect(obj, { depth: maxDepth - depth }); } else if (customInspect !== "symbol" && typeof obj.inspect === "function") { return obj.inspect(); } } if (isMap(obj)) { var mapParts = []; if (mapForEach) { mapForEach.call(obj, function(value, key) { mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj)); }); } return collectionOf("Map", mapSize.call(obj), mapParts, indent); } if (isSet(obj)) { var setParts = []; if (setForEach) { setForEach.call(obj, function(value) { setParts.push(inspect(value, obj)); }); } return collectionOf("Set", setSize.call(obj), setParts, indent); } if (isWeakMap(obj)) { return weakCollectionOf("WeakMap"); } if (isWeakSet(obj)) { return weakCollectionOf("WeakSet"); } if (isWeakRef(obj)) { return weakCollectionOf("WeakRef"); } if (isNumber(obj)) { return markBoxed(inspect(Number(obj))); } if (isBigInt(obj)) { return markBoxed(inspect(bigIntValueOf.call(obj))); } if (isBoolean(obj)) { return markBoxed(booleanValueOf.call(obj)); } if (isString(obj)) { return markBoxed(inspect(String(obj))); } if (typeof window !== "undefined" && obj === window) { return "{ [object Window] }"; } if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) { return "{ [object globalThis] }"; } if (!isDate(obj) && !isRegExp(obj)) { var ys = arrObjKeys(obj, inspect); var isPlainObject3 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; var protoTag = obj instanceof Object ? "" : "null prototype"; var stringTag = !isPlainObject3 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : ""; var constructorTag = isPlainObject3 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : ""; var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : ""); if (ys.length === 0) { return tag + "{}"; } if (indent) { return tag + "{" + indentedJoin(ys, indent) + "}"; } return tag + "{ " + $join.call(ys, ", ") + " }"; } return String(obj); }; function wrapQuotes(s, defaultStyle, opts) { var style = opts.quoteStyle || defaultStyle; var quoteChar = quotes[style]; return quoteChar + s + quoteChar; } function quote(s) { return $replace.call(String(s), /"/g, """); } function canTrustToString(obj) { return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined")); } function isArray(obj) { return toStr(obj) === "[object Array]" && canTrustToString(obj); } function isDate(obj) { return toStr(obj) === "[object Date]" && canTrustToString(obj); } function isRegExp(obj) { return toStr(obj) === "[object RegExp]" && canTrustToString(obj); } function isError(obj) { return toStr(obj) === "[object Error]" && canTrustToString(obj); } function isString(obj) { return toStr(obj) === "[object String]" && canTrustToString(obj); } function isNumber(obj) { return toStr(obj) === "[object Number]" && canTrustToString(obj); } function isBoolean(obj) { return toStr(obj) === "[object Boolean]" && canTrustToString(obj); } function isSymbol(obj) { if (hasShammedSymbols) { return obj && typeof obj === "object" && obj instanceof Symbol; } if (typeof obj === "symbol") { return true; } if (!obj || typeof obj !== "object" || !symToString) { return false; } try { symToString.call(obj); return true; } catch (e2) { } return false; } function isBigInt(obj) { if (!obj || typeof obj !== "object" || !bigIntValueOf) { return false; } try { bigIntValueOf.call(obj); return true; } catch (e2) { } return false; } var hasOwn = Object.prototype.hasOwnProperty || function(key) { return key in this; }; function has(obj, key) { return hasOwn.call(obj, key); } function toStr(obj) { return objectToString.call(obj); } function nameOf(f) { if (f.name) { return f.name; } var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); if (m) { return m[1]; } return null; } function indexOf(xs, x) { if (xs.indexOf) { return xs.indexOf(x); } for (var i = 0, l = xs.length; i < l; i++) { if (xs[i] === x) { return i; } } return -1; } function isMap(x) { if (!mapSize || !x || typeof x !== "object") { return false; } try { mapSize.call(x); try { setSize.call(x); } catch (s) { return true; } return x instanceof Map; } catch (e2) { } return false; } function isWeakMap(x) { if (!weakMapHas || !x || typeof x !== "object") { return false; } try { weakMapHas.call(x, weakMapHas); try { weakSetHas.call(x, weakSetHas); } catch (s) { return true; } return x instanceof WeakMap; } catch (e2) { } return false; } function isWeakRef(x) { if (!weakRefDeref || !x || typeof x !== "object") { return false; } try { weakRefDeref.call(x); return true; } catch (e2) { } return false; } function isSet(x) { if (!setSize || !x || typeof x !== "object") { return false; } try { setSize.call(x); try { mapSize.call(x); } catch (m) { return true; } return x instanceof Set; } catch (e2) { } return false; } function isWeakSet(x) { if (!weakSetHas || !x || typeof x !== "object") { return false; } try { weakSetHas.call(x, weakSetHas); try { weakMapHas.call(x, weakMapHas); } catch (s) { return true; } return x instanceof WeakSet; } catch (e2) { } return false; } function isElement(x) { if (!x || typeof x !== "object") { return false; } if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) { return true; } return typeof x.nodeName === "string" && typeof x.getAttribute === "function"; } function inspectString(str, opts) { if (str.length > opts.maxStringLength) { var remaining = str.length - opts.maxStringLength; var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : ""); return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; } var quoteRE = quoteREs[opts.quoteStyle || "single"]; quoteRE.lastIndex = 0; var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte); return wrapQuotes(s, "single", opts); } function lowbyte(c) { var n = c.charCodeAt(0); var x = { 8: "b", 9: "t", 10: "n", 12: "f", 13: "r" }[n]; if (x) { return "\\" + x; } return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16)); } function markBoxed(str) { return "Object(" + str + ")"; } function weakCollectionOf(type) { return type + " { ? }"; } function collectionOf(type, size, entries, indent) { var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", "); return type + " (" + size + ") {" + joinedEntries + "}"; } function singleLineValues(xs) { for (var i = 0; i < xs.length; i++) { if (indexOf(xs[i], "\n") >= 0) { return false; } } return true; } function getIndent(opts, depth) { var baseIndent; if (opts.indent === " ") { baseIndent = " "; } else if (typeof opts.indent === "number" && opts.indent > 0) { baseIndent = $join.call(Array(opts.indent + 1), " "); } else { return null; } return { base: baseIndent, prev: $join.call(Array(depth + 1), baseIndent) }; } function indentedJoin(xs, indent) { if (xs.length === 0) { return ""; } var lineJoiner = "\n" + indent.prev + indent.base; return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev; } function arrObjKeys(obj, inspect) { var isArr = isArray(obj); var xs = []; if (isArr) { xs.length = obj.length; for (var i = 0; i < obj.length; i++) { xs[i] = has(obj, i) ? inspect(obj[i], obj) : ""; } } var syms = typeof gOPS === "function" ? gOPS(obj) : []; var symMap; if (hasShammedSymbols) { symMap = {}; for (var k = 0; k < syms.length; k++) { symMap["$" + syms[k]] = syms[k]; } } for (var key in obj) { if (!has(obj, key)) { continue; } if (isArr && String(Number(key)) === key && key < obj.length) { continue; } if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) { continue; } else if ($test.call(/[^\w$]/, key)) { xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj)); } else { xs.push(key + ": " + inspect(obj[key], obj)); } } if (typeof gOPS === "function") { for (var j = 0; j < syms.length; j++) { if (isEnumerable.call(obj, syms[j])) { xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj)); } } } return xs; } } }); // node_modules/side-channel-list/index.js var require_side_channel_list = __commonJS({ "node_modules/side-channel-list/index.js"(exports, module) { "use strict"; var inspect = require_object_inspect(); var $TypeError = require_type(); var listGetNode = function(list, key, isDelete) { var prev = list; var curr; for (; (curr = prev.next) != null; prev = curr) { if (curr.key === key) { prev.next = curr.next; if (!isDelete) { curr.next = /** @type {NonNullable} */ list.next; list.next = curr; } return curr; } } }; var listGet = function(objects, key) { if (!objects) { return void 0; } var node = listGetNode(objects, key); return node && node.value; }; var listSet = function(objects, key, value) { var node = listGetNode(objects, key); if (node) { node.value = value; } else { objects.next = /** @type {import('./list.d.ts').ListNode} */ { // eslint-disable-line no-param-reassign, no-extra-parens key, next: objects.next, value }; } }; var listHas = function(objects, key) { if (!objects) { return false; } return !!listGetNode(objects, key); }; var listDelete = function(objects, key) { if (objects) { return listGetNode(objects, key, true); } }; module.exports = function getSideChannelList() { var $o; var channel = { assert: function(key) { if (!channel.has(key)) { throw new $TypeError("Side channel does not contain " + inspect(key)); } }, "delete": function(key) { var root = $o && $o.next; var deletedNode = listDelete($o, key); if (deletedNode && root && root === deletedNode) { $o = void 0; } return !!deletedNode; }, get: function(key) { return listGet($o, key); }, has: function(key) { return listHas($o, key); }, set: function(key, value) { if (!$o) { $o = { next: void 0 }; } listSet( /** @type {NonNullable} */ $o, key, value ); } }; return channel; }; } }); // node_modules/es-object-atoms/index.js var require_es_object_atoms = __commonJS({ "node_modules/es-object-atoms/index.js"(exports, module) { "use strict"; module.exports = Object; } }); // node_modules/es-errors/index.js var require_es_errors = __commonJS({ "node_modules/es-errors/index.js"(exports, module) { "use strict"; module.exports = Error; } }); // node_modules/es-errors/eval.js var require_eval = __commonJS({ "node_modules/es-errors/eval.js"(exports, module) { "use strict"; module.exports = EvalError; } }); // node_modules/es-errors/range.js var require_range = __commonJS({ "node_modules/es-errors/range.js"(exports, module) { "use strict"; module.exports = RangeError; } }); // node_modules/es-errors/ref.js var require_ref = __commonJS({ "node_modules/es-errors/ref.js"(exports, module) { "use strict"; module.exports = ReferenceError; } }); // node_modules/es-errors/syntax.js var require_syntax = __commonJS({ "node_modules/es-errors/syntax.js"(exports, module) { "use strict"; module.exports = SyntaxError; } }); // node_modules/es-errors/uri.js var require_uri = __commonJS({ "node_modules/es-errors/uri.js"(exports, module) { "use strict"; module.exports = URIError; } }); // node_modules/math-intrinsics/abs.js var require_abs = __commonJS({ "node_modules/math-intrinsics/abs.js"(exports, module) { "use strict"; module.exports = Math.abs; } }); // node_modules/math-intrinsics/floor.js var require_floor = __commonJS({ "node_modules/math-intrinsics/floor.js"(exports, module) { "use strict"; module.exports = Math.floor; } }); // node_modules/math-intrinsics/max.js var require_max = __commonJS({ "node_modules/math-intrinsics/max.js"(exports, module) { "use strict"; module.exports = Math.max; } }); // node_modules/math-intrinsics/min.js var require_min = __commonJS({ "node_modules/math-intrinsics/min.js"(exports, module) { "use strict"; module.exports = Math.min; } }); // node_modules/math-intrinsics/pow.js var require_pow = __commonJS({ "node_modules/math-intrinsics/pow.js"(exports, module) { "use strict"; module.exports = Math.pow; } }); // node_modules/math-intrinsics/round.js var require_round = __commonJS({ "node_modules/math-intrinsics/round.js"(exports, module) { "use strict"; module.exports = Math.round; } }); // node_modules/math-intrinsics/isNaN.js var require_isNaN = __commonJS({ "node_modules/math-intrinsics/isNaN.js"(exports, module) { "use strict"; module.exports = Number.isNaN || function isNaN2(a) { return a !== a; }; } }); // node_modules/math-intrinsics/sign.js var require_sign = __commonJS({ "node_modules/math-intrinsics/sign.js"(exports, module) { "use strict"; var $isNaN = require_isNaN(); module.exports = function sign(number) { if ($isNaN(number) || number === 0) { return number; } return number < 0 ? -1 : 1; }; } }); // node_modules/gopd/gOPD.js var require_gOPD = __commonJS({ "node_modules/gopd/gOPD.js"(exports, module) { "use strict"; module.exports = Object.getOwnPropertyDescriptor; } }); // node_modules/gopd/index.js var require_gopd = __commonJS({ "node_modules/gopd/index.js"(exports, module) { "use strict"; var $gOPD = require_gOPD(); if ($gOPD) { try { $gOPD([], "length"); } catch (e2) { $gOPD = null; } } module.exports = $gOPD; } }); // node_modules/es-define-property/index.js var require_es_define_property = __commonJS({ "node_modules/es-define-property/index.js"(exports, module) { "use strict"; var $defineProperty = Object.defineProperty || false; if ($defineProperty) { try { $defineProperty({}, "a", { value: 1 }); } catch (e2) { $defineProperty = false; } } module.exports = $defineProperty; } }); // node_modules/has-symbols/shams.js var require_shams = __commonJS({ "node_modules/has-symbols/shams.js"(exports, module) { "use strict"; module.exports = function hasSymbols() { if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") { return false; } if (typeof Symbol.iterator === "symbol") { return true; } var obj = {}; var sym = Symbol("test"); var symObj = Object(sym); if (typeof sym === "string") { return false; } if (Object.prototype.toString.call(sym) !== "[object Symbol]") { return false; } if (Object.prototype.toString.call(symObj) !== "[object Symbol]") { return false; } var symVal = 42; obj[sym] = symVal; for (var _ in obj) { return false; } if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) { return false; } if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) { return false; } var syms = Object.getOwnPropertySymbols(obj); if (syms.length !== 1 || syms[0] !== sym) { return false; } if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } if (typeof Object.getOwnPropertyDescriptor === "function") { var descriptor = ( /** @type {PropertyDescriptor} */ Object.getOwnPropertyDescriptor(obj, sym) ); if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } } return true; }; } }); // node_modules/has-symbols/index.js var require_has_symbols = __commonJS({ "node_modules/has-symbols/index.js"(exports, module) { "use strict"; var origSymbol = typeof Symbol !== "undefined" && Symbol; var hasSymbolSham = require_shams(); module.exports = function hasNativeSymbols() { if (typeof origSymbol !== "function") { return false; } if (typeof Symbol !== "function") { return false; } if (typeof origSymbol("foo") !== "symbol") { return false; } if (typeof Symbol("bar") !== "symbol") { return false; } return hasSymbolSham(); }; } }); // node_modules/get-proto/Reflect.getPrototypeOf.js var require_Reflect_getPrototypeOf = __commonJS({ "node_modules/get-proto/Reflect.getPrototypeOf.js"(exports, module) { "use strict"; module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null; } }); // node_modules/get-proto/Object.getPrototypeOf.js var require_Object_getPrototypeOf = __commonJS({ "node_modules/get-proto/Object.getPrototypeOf.js"(exports, module) { "use strict"; var $Object = require_es_object_atoms(); module.exports = $Object.getPrototypeOf || null; } }); // node_modules/function-bind/implementation.js var require_implementation = __commonJS({ "node_modules/function-bind/implementation.js"(exports, module) { "use strict"; var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; var toStr = Object.prototype.toString; var max = Math.max; var funcType = "[object Function]"; var concatty = function concatty2(a, b) { var arr = []; for (var i = 0; i < a.length; i += 1) { arr[i] = a[i]; } for (var j = 0; j < b.length; j += 1) { arr[j + a.length] = b[j]; } return arr; }; var slicy = function slicy2(arrLike, offset) { var arr = []; for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { arr[j] = arrLike[i]; } return arr; }; var joiny = function(arr, joiner) { var str = ""; for (var i = 0; i < arr.length; i += 1) { str += arr[i]; if (i + 1 < arr.length) { str += joiner; } } return str; }; module.exports = function bind(that) { var target = this; if (typeof target !== "function" || toStr.apply(target) !== funcType) { throw new TypeError(ERROR_MESSAGE + target); } var args = slicy(arguments, 1); var bound; var binder = function() { if (this instanceof bound) { var result = target.apply( this, concatty(args, arguments) ); if (Object(result) === result) { return result; } return this; } return target.apply( that, concatty(args, arguments) ); }; var boundLength = max(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) { boundArgs[i] = "$" + i; } bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder); if (target.prototype) { var Empty = function Empty2() { }; Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; } }); // node_modules/function-bind/index.js var require_function_bind = __commonJS({ "node_modules/function-bind/index.js"(exports, module) { "use strict"; var implementation = require_implementation(); module.exports = Function.prototype.bind || implementation; } }); // node_modules/call-bind-apply-helpers/functionCall.js var require_functionCall = __commonJS({ "node_modules/call-bind-apply-helpers/functionCall.js"(exports, module) { "use strict"; module.exports = Function.prototype.call; } }); // node_modules/call-bind-apply-helpers/functionApply.js var require_functionApply = __commonJS({ "node_modules/call-bind-apply-helpers/functionApply.js"(exports, module) { "use strict"; module.exports = Function.prototype.apply; } }); // node_modules/call-bind-apply-helpers/reflectApply.js var require_reflectApply = __commonJS({ "node_modules/call-bind-apply-helpers/reflectApply.js"(exports, module) { "use strict"; module.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply; } }); // node_modules/call-bind-apply-helpers/actualApply.js var require_actualApply = __commonJS({ "node_modules/call-bind-apply-helpers/actualApply.js"(exports, module) { "use strict"; var bind = require_function_bind(); var $apply = require_functionApply(); var $call = require_functionCall(); var $reflectApply = require_reflectApply(); module.exports = $reflectApply || bind.call($call, $apply); } }); // node_modules/call-bind-apply-helpers/index.js var require_call_bind_apply_helpers = __commonJS({ "node_modules/call-bind-apply-helpers/index.js"(exports, module) { "use strict"; var bind = require_function_bind(); var $TypeError = require_type(); var $call = require_functionCall(); var $actualApply = require_actualApply(); module.exports = function callBindBasic(args) { if (args.length < 1 || typeof args[0] !== "function") { throw new $TypeError("a function is required"); } return $actualApply(bind, $call, args); }; } }); // node_modules/dunder-proto/get.js var require_get = __commonJS({ "node_modules/dunder-proto/get.js"(exports, module) { "use strict"; var callBind = require_call_bind_apply_helpers(); var gOPD = require_gopd(); var hasProtoAccessor; try { hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ [].__proto__ === Array.prototype; } catch (e2) { if (!e2 || typeof e2 !== "object" || !("code" in e2) || e2.code !== "ERR_PROTO_ACCESS") { throw e2; } } var desc = !!hasProtoAccessor && gOPD && gOPD( Object.prototype, /** @type {keyof typeof Object.prototype} */ "__proto__" ); var $Object = Object; var $getPrototypeOf = $Object.getPrototypeOf; module.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? ( /** @type {import('./get')} */ function getDunder(value) { return $getPrototypeOf(value == null ? value : $Object(value)); } ) : false; } }); // node_modules/get-proto/index.js var require_get_proto = __commonJS({ "node_modules/get-proto/index.js"(exports, module) { "use strict"; var reflectGetProto = require_Reflect_getPrototypeOf(); var originalGetProto = require_Object_getPrototypeOf(); var getDunderProto = require_get(); module.exports = reflectGetProto ? function getProto(O) { return reflectGetProto(O); } : originalGetProto ? function getProto(O) { if (!O || typeof O !== "object" && typeof O !== "function") { throw new TypeError("getProto: not an object"); } return originalGetProto(O); } : getDunderProto ? function getProto(O) { return getDunderProto(O); } : null; } }); // node_modules/hasown/index.js var require_hasown = __commonJS({ "node_modules/hasown/index.js"(exports, module) { "use strict"; var call = Function.prototype.call; var $hasOwn = Object.prototype.hasOwnProperty; var bind = require_function_bind(); module.exports = bind.call(call, $hasOwn); } }); // node_modules/get-intrinsic/index.js var require_get_intrinsic = __commonJS({ "node_modules/get-intrinsic/index.js"(exports, module) { "use strict"; var undefined2; var $Object = require_es_object_atoms(); var $Error = require_es_errors(); var $EvalError = require_eval(); var $RangeError = require_range(); var $ReferenceError = require_ref(); var $SyntaxError = require_syntax(); var $TypeError = require_type(); var $URIError = require_uri(); var abs = require_abs(); var floor = require_floor(); var max = require_max(); var min = require_min(); var pow = require_pow(); var round = require_round(); var sign = require_sign(); var $Function = Function; var getEvalledConstructor = function(expressionSyntax) { try { return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); } catch (e2) { } }; var $gOPD = require_gopd(); var $defineProperty = require_es_define_property(); var throwTypeError = function() { throw new $TypeError(); }; var ThrowTypeError = $gOPD ? function() { try { arguments.callee; return throwTypeError; } catch (calleeThrows) { try { return $gOPD(arguments, "callee").get; } catch (gOPDthrows) { return throwTypeError; } } }() : throwTypeError; var hasSymbols = require_has_symbols()(); var getProto = require_get_proto(); var $ObjectGPO = require_Object_getPrototypeOf(); var $ReflectGPO = require_Reflect_getPrototypeOf(); var $apply = require_functionApply(); var $call = require_functionCall(); var needsEval = {}; var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array); var INTRINSICS = { __proto__: null, "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer, "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2, "%AsyncFromSyncIteratorPrototype%": undefined2, "%AsyncFunction%": needsEval, "%AsyncGenerator%": needsEval, "%AsyncGeneratorFunction%": needsEval, "%AsyncIteratorPrototype%": needsEval, "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics, "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt, "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array, "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array, "%Boolean%": Boolean, "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": $Error, "%eval%": eval, // eslint-disable-line no-eval "%EvalError%": $EvalError, "%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array, "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array, "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry, "%Function%": $Function, "%GeneratorFunction%": needsEval, "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array, "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array, "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2, "%JSON%": typeof JSON === "object" ? JSON : undefined2, "%Map%": typeof Map === "undefined" ? undefined2 : Map, "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": $Object, "%Object.getOwnPropertyDescriptor%": $gOPD, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise, "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy, "%RangeError%": $RangeError, "%ReferenceError%": $ReferenceError, "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set === "undefined" ? undefined2 : Set, "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2, "%Symbol%": hasSymbols ? Symbol : undefined2, "%SyntaxError%": $SyntaxError, "%ThrowTypeError%": ThrowTypeError, "%TypedArray%": TypedArray, "%TypeError%": $TypeError, "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array, "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array, "%URIError%": $URIError, "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap, "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef, "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet, "%Function.prototype.call%": $call, "%Function.prototype.apply%": $apply, "%Object.defineProperty%": $defineProperty, "%Object.getPrototypeOf%": $ObjectGPO, "%Math.abs%": abs, "%Math.floor%": floor, "%Math.max%": max, "%Math.min%": min, "%Math.pow%": pow, "%Math.round%": round, "%Math.sign%": sign, "%Reflect.getPrototypeOf%": $ReflectGPO }; if (getProto) { try { null.error; } catch (e2) { errorProto = getProto(getProto(e2)); INTRINSICS["%Error.prototype%"] = errorProto; } } var errorProto; var doEval = function doEval2(name) { var value; if (name === "%AsyncFunction%") { value = getEvalledConstructor("async function () {}"); } else if (name === "%GeneratorFunction%") { value = getEvalledConstructor("function* () {}"); } else if (name === "%AsyncGeneratorFunction%") { value = getEvalledConstructor("async function* () {}"); } else if (name === "%AsyncGenerator%") { var fn = doEval2("%AsyncGeneratorFunction%"); if (fn) { value = fn.prototype; } } else if (name === "%AsyncIteratorPrototype%") { var gen = doEval2("%AsyncGenerator%"); if (gen && getProto) { value = getProto(gen.prototype); } } INTRINSICS[name] = value; return value; }; var LEGACY_ALIASES = { __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }; var bind = require_function_bind(); var hasOwn = require_hasown(); var $concat = bind.call($call, Array.prototype.concat); var $spliceApply = bind.call($apply, Array.prototype.splice); var $replace = bind.call($call, String.prototype.replace); var $strSlice = bind.call($call, String.prototype.slice); var $exec = bind.call($call, RegExp.prototype.exec); var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var reEscapeChar = /\\(\\)?/g; var stringToPath = function stringToPath2(string) { var first = $strSlice(string, 0, 1); var last = $strSlice(string, -1); if (first === "%" && last !== "%") { throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`"); } else if (last === "%" && first !== "%") { throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`"); } var result = []; $replace(string, rePropName, function(match, number, quote, subString) { result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match; }); return result; }; var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) { var intrinsicName = name; var alias; if (hasOwn(LEGACY_ALIASES, intrinsicName)) { alias = LEGACY_ALIASES[intrinsicName]; intrinsicName = "%" + alias[0] + "%"; } if (hasOwn(INTRINSICS, intrinsicName)) { var value = INTRINSICS[intrinsicName]; if (value === needsEval) { value = doEval(intrinsicName); } if (typeof value === "undefined" && !allowMissing) { throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!"); } return { alias, name: intrinsicName, value }; } throw new $SyntaxError("intrinsic " + name + " does not exist!"); }; module.exports = function GetIntrinsic(name, allowMissing) { if (typeof name !== "string" || name.length === 0) { throw new $TypeError("intrinsic name must be a non-empty string"); } if (arguments.length > 1 && typeof allowMissing !== "boolean") { throw new $TypeError('"allowMissing" argument must be a boolean'); } if ($exec(/^%?[^%]*%?$/, name) === null) { throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); } var parts = stringToPath(name); var intrinsicBaseName = parts.length > 0 ? parts[0] : ""; var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing); var intrinsicRealName = intrinsic.name; var value = intrinsic.value; var skipFurtherCaching = false; var alias = intrinsic.alias; if (alias) { intrinsicBaseName = alias[0]; $spliceApply(parts, $concat([0, 1], alias)); } for (var i = 1, isOwn = true; i < parts.length; i += 1) { var part = parts[i]; var first = $strSlice(part, 0, 1); var last = $strSlice(part, -1); if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) { throw new $SyntaxError("property names with quotes must have matching quotes"); } if (part === "constructor" || !isOwn) { skipFurtherCaching = true; } intrinsicBaseName += "." + part; intrinsicRealName = "%" + intrinsicBaseName + "%"; if (hasOwn(INTRINSICS, intrinsicRealName)) { value = INTRINSICS[intrinsicRealName]; } else if (value != null) { if (!(part in value)) { if (!allowMissing) { throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available."); } return void 0; } if ($gOPD && i + 1 >= parts.length) { var desc = $gOPD(value, part); isOwn = !!desc; if (isOwn && "get" in desc && !("originalValue" in desc.get)) { value = desc.get; } else { value = value[part]; } } else { isOwn = hasOwn(value, part); value = value[part]; } if (isOwn && !skipFurtherCaching) { INTRINSICS[intrinsicRealName] = value; } } } return value; }; } }); // node_modules/call-bound/index.js var require_call_bound = __commonJS({ "node_modules/call-bound/index.js"(exports, module) { "use strict"; var GetIntrinsic = require_get_intrinsic(); var callBindBasic = require_call_bind_apply_helpers(); var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]); module.exports = function callBoundIntrinsic(name, allowMissing) { var intrinsic = ( /** @type {(this: unknown, ...args: unknown[]) => unknown} */ GetIntrinsic(name, !!allowMissing) ); if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) { return callBindBasic( /** @type {const} */ [intrinsic] ); } return intrinsic; }; } }); // node_modules/side-channel-map/index.js var require_side_channel_map = __commonJS({ "node_modules/side-channel-map/index.js"(exports, module) { "use strict"; var GetIntrinsic = require_get_intrinsic(); var callBound = require_call_bound(); var inspect = require_object_inspect(); var $TypeError = require_type(); var $Map = GetIntrinsic("%Map%", true); var $mapGet = callBound("Map.prototype.get", true); var $mapSet = callBound("Map.prototype.set", true); var $mapHas = callBound("Map.prototype.has", true); var $mapDelete = callBound("Map.prototype.delete", true); var $mapSize = callBound("Map.prototype.size", true); module.exports = !!$Map && /** @type {Exclude} */ function getSideChannelMap() { var $m; var channel = { assert: function(key) { if (!channel.has(key)) { throw new $TypeError("Side channel does not contain " + inspect(key)); } }, "delete": function(key) { if ($m) { var result = $mapDelete($m, key); if ($mapSize($m) === 0) { $m = void 0; } return result; } return false; }, get: function(key) { if ($m) { return $mapGet($m, key); } }, has: function(key) { if ($m) { return $mapHas($m, key); } return false; }, set: function(key, value) { if (!$m) { $m = new $Map(); } $mapSet($m, key, value); } }; return channel; }; } }); // node_modules/side-channel-weakmap/index.js var require_side_channel_weakmap = __commonJS({ "node_modules/side-channel-weakmap/index.js"(exports, module) { "use strict"; var GetIntrinsic = require_get_intrinsic(); var callBound = require_call_bound(); var inspect = require_object_inspect(); var getSideChannelMap = require_side_channel_map(); var $TypeError = require_type(); var $WeakMap = GetIntrinsic("%WeakMap%", true); var $weakMapGet = callBound("WeakMap.prototype.get", true); var $weakMapSet = callBound("WeakMap.prototype.set", true); var $weakMapHas = callBound("WeakMap.prototype.has", true); var $weakMapDelete = callBound("WeakMap.prototype.delete", true); module.exports = $WeakMap ? ( /** @type {Exclude} */ function getSideChannelWeakMap() { var $wm; var $m; var channel = { assert: function(key) { if (!channel.has(key)) { throw new $TypeError("Side channel does not contain " + inspect(key)); } }, "delete": function(key) { if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { if ($wm) { return $weakMapDelete($wm, key); } } else if (getSideChannelMap) { if ($m) { return $m["delete"](key); } } return false; }, get: function(key) { if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { if ($wm) { return $weakMapGet($wm, key); } } return $m && $m.get(key); }, has: function(key) { if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { if ($wm) { return $weakMapHas($wm, key); } } return !!$m && $m.has(key); }, set: function(key, value) { if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { if (!$wm) { $wm = new $WeakMap(); } $weakMapSet($wm, key, value); } else if (getSideChannelMap) { if (!$m) { $m = getSideChannelMap(); } $m.set(key, value); } } }; return channel; } ) : getSideChannelMap; } }); // node_modules/side-channel/index.js var require_side_channel = __commonJS({ "node_modules/side-channel/index.js"(exports, module) { "use strict"; var $TypeError = require_type(); var inspect = require_object_inspect(); var getSideChannelList = require_side_channel_list(); var getSideChannelMap = require_side_channel_map(); var getSideChannelWeakMap = require_side_channel_weakmap(); var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList; module.exports = function getSideChannel() { var $channelData; var channel = { assert: function(key) { if (!channel.has(key)) { throw new $TypeError("Side channel does not contain " + inspect(key)); } }, "delete": function(key) { return !!$channelData && $channelData["delete"](key); }, get: function(key) { return $channelData && $channelData.get(key); }, has: function(key) { return !!$channelData && $channelData.has(key); }, set: function(key, value) { if (!$channelData) { $channelData = makeChannel(); } $channelData.set(key, value); } }; return channel; }; } }); // node_modules/qs/lib/formats.js var require_formats = __commonJS({ "node_modules/qs/lib/formats.js"(exports, module) { "use strict"; var replace = String.prototype.replace; var percentTwenties = /%20/g; var Format = { RFC1738: "RFC1738", RFC3986: "RFC3986" }; module.exports = { "default": Format.RFC3986, formatters: { RFC1738: function(value) { return replace.call(value, percentTwenties, "+"); }, RFC3986: function(value) { return String(value); } }, RFC1738: Format.RFC1738, RFC3986: Format.RFC3986 }; } }); // node_modules/qs/lib/utils.js var require_utils = __commonJS({ "node_modules/qs/lib/utils.js"(exports, module) { "use strict"; var formats = require_formats(); var has = Object.prototype.hasOwnProperty; var isArray = Array.isArray; var hexTable = function() { var array = []; for (var i = 0; i < 256; ++i) { array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase()); } return array; }(); var compactQueue = function compactQueue2(queue) { while (queue.length > 1) { var item = queue.pop(); var obj = item.obj[item.prop]; if (isArray(obj)) { var compacted = []; for (var j = 0; j < obj.length; ++j) { if (typeof obj[j] !== "undefined") { compacted.push(obj[j]); } } item.obj[item.prop] = compacted; } } }; var arrayToObject = function arrayToObject2(source, options) { var obj = options && options.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== "undefined") { obj[i] = source[i]; } } return obj; }; var merge = function merge2(target, source, options) { if (!source) { return target; } if (typeof source !== "object") { if (isArray(target)) { target.push(source); } else if (target && typeof target === "object") { if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) { target[source] = true; } } else { return [target, source]; } return target; } if (!target || typeof target !== "object") { return [target].concat(source); } var mergeTarget = target; if (isArray(target) && !isArray(source)) { mergeTarget = arrayToObject(target, options); } if (isArray(target) && isArray(source)) { source.forEach(function(item, i) { if (has.call(target, i)) { var targetItem = target[i]; if (targetItem && typeof targetItem === "object" && item && typeof item === "object") { target[i] = merge2(targetItem, item, options); } else { target.push(item); } } else { target[i] = item; } }); return target; } return Object.keys(source).reduce(function(acc, key) { var value = source[key]; if (has.call(acc, key)) { acc[key] = merge2(acc[key], value, options); } else { acc[key] = value; } return acc; }, mergeTarget); }; var assign = function assignSingleSource(target, source) { return Object.keys(source).reduce(function(acc, key) { acc[key] = source[key]; return acc; }, target); }; var decode = function(str, decoder, charset) { var strWithoutPlus = str.replace(/\+/g, " "); if (charset === "iso-8859-1") { return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); } try { return decodeURIComponent(strWithoutPlus); } catch (e2) { return strWithoutPlus; } }; var encode = function encode2(str, defaultEncoder, charset, kind, format) { if (str.length === 0) { return str; } var string = str; if (typeof str === "symbol") { string = Symbol.prototype.toString.call(str); } else if (typeof str !== "string") { string = String(str); } if (charset === "iso-8859-1") { return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) { return "%26%23" + parseInt($0.slice(2), 16) + "%3B"; }); } var out = ""; for (var i = 0; i < string.length; ++i) { var c = string.charCodeAt(i); if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats.RFC1738 && (c === 40 || c === 41)) { out += string.charAt(i); continue; } if (c < 128) { out = out + hexTable[c]; continue; } if (c < 2048) { out = out + (hexTable[192 | c >> 6] + hexTable[128 | c & 63]); continue; } if (c < 55296 || c >= 57344) { out = out + (hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]); continue; } i += 1; c = 65536 + ((c & 1023) << 10 | string.charCodeAt(i) & 1023); out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; } return out; }; var compact = function compact2(value) { var queue = [{ obj: { o: value }, prop: "o" }]; var refs = []; for (var i = 0; i < queue.length; ++i) { var item = queue[i]; var obj = item.obj[item.prop]; var keys = Object.keys(obj); for (var j = 0; j < keys.length; ++j) { var key = keys[j]; var val = obj[key]; if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) { queue.push({ obj, prop: key }); refs.push(val); } } } compactQueue(queue); return value; }; var isRegExp = function isRegExp2(obj) { return Object.prototype.toString.call(obj) === "[object RegExp]"; }; var isBuffer = function isBuffer2(obj) { if (!obj || typeof obj !== "object") { return false; } return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; var combine = function combine2(a, b) { return [].concat(a, b); }; var maybeMap = function maybeMap2(val, fn) { if (isArray(val)) { var mapped = []; for (var i = 0; i < val.length; i += 1) { mapped.push(fn(val[i])); } return mapped; } return fn(val); }; module.exports = { arrayToObject, assign, combine, compact, decode, encode, isBuffer, isRegExp, maybeMap, merge }; } }); // node_modules/qs/lib/stringify.js var require_stringify = __commonJS({ "node_modules/qs/lib/stringify.js"(exports, module) { "use strict"; var getSideChannel = require_side_channel(); var utils = require_utils(); var formats = require_formats(); var has = Object.prototype.hasOwnProperty; var arrayPrefixGenerators = { brackets: function brackets(prefix) { return prefix + "[]"; }, comma: "comma", indices: function indices(prefix, key) { return prefix + "[" + key + "]"; }, repeat: function repeat(prefix) { return prefix; } }; var isArray = Array.isArray; var push = Array.prototype.push; var pushToArray = function(arr, valueOrArray) { push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); }; var toISO = Date.prototype.toISOString; var defaultFormat = formats["default"]; var defaults = { addQueryPrefix: false, allowDots: false, charset: "utf-8", charsetSentinel: false, delimiter: "&", encode: true, encoder: utils.encode, encodeValuesOnly: false, format: defaultFormat, formatter: formats.formatters[defaultFormat], // deprecated indices: false, serializeDate: function serializeDate(date) { return toISO.call(date); }, skipNulls: false, strictNullHandling: false }; var isNonNullishPrimitive = function isNonNullishPrimitive2(v) { return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint"; }; var sentinel = {}; var stringify = function stringify2(object, prefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) { var obj = object; var tmpSc = sideChannel; var step = 0; var findFlag = false; while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) { var pos = tmpSc.get(object); step += 1; if (typeof pos !== "undefined") { if (pos === step) { throw new RangeError("Cyclic object value"); } else { findFlag = true; } } if (typeof tmpSc.get(sentinel) === "undefined") { step = 0; } } if (typeof filter === "function") { obj = filter(prefix, obj); } else if (obj instanceof Date) { obj = serializeDate(obj); } else if (generateArrayPrefix === "comma" && isArray(obj)) { obj = utils.maybeMap(obj, function(value2) { if (value2 instanceof Date) { return serializeDate(value2); } return value2; }); } if (obj === null) { if (strictNullHandling) { return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix; } obj = ""; } if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { if (encoder) { var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format); return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format))]; } return [formatter(prefix) + "=" + formatter(String(obj))]; } var values = []; if (typeof obj === "undefined") { return values; } var objKeys; if (generateArrayPrefix === "comma" && isArray(obj)) { if (encodeValuesOnly && encoder) { obj = utils.maybeMap(obj, encoder); } objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }]; } else if (isArray(filter)) { objKeys = filter; } else { var keys = Object.keys(obj); objKeys = sort ? keys.sort(sort) : keys; } var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + "[]" : prefix; for (var j = 0; j < objKeys.length; ++j) { var key = objKeys[j]; var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key]; if (skipNulls && value === null) { continue; } var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + key : "[" + key + "]"); sideChannel.set(object, step); var valueSideChannel = getSideChannel(); valueSideChannel.set(sentinel, sideChannel); pushToArray(values, stringify2( value, keyPrefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel )); } return values; }; var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) { if (!opts) { return defaults; } if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") { throw new TypeError("Encoder has to be a function."); } var charset = opts.charset || defaults.charset; if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") { throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); } var format = formats["default"]; if (typeof opts.format !== "undefined") { if (!has.call(formats.formatters, opts.format)) { throw new TypeError("Unknown format option provided."); } format = opts.format; } var formatter = formats.formatters[format]; var filter = defaults.filter; if (typeof opts.filter === "function" || isArray(opts.filter)) { filter = opts.filter; } return { addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults.addQueryPrefix, allowDots: typeof opts.allowDots === "undefined" ? defaults.allowDots : !!opts.allowDots, charset, charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel, delimiter: typeof opts.delimiter === "undefined" ? defaults.delimiter : opts.delimiter, encode: typeof opts.encode === "boolean" ? opts.encode : defaults.encode, encoder: typeof opts.encoder === "function" ? opts.encoder : defaults.encoder, encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults.encodeValuesOnly, filter, format, formatter, serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults.serializeDate, skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults.skipNulls, sort: typeof opts.sort === "function" ? opts.sort : null, strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling }; }; module.exports = function(object, opts) { var obj = object; var options = normalizeStringifyOptions(opts); var objKeys; var filter; if (typeof options.filter === "function") { filter = options.filter; obj = filter("", obj); } else if (isArray(options.filter)) { filter = options.filter; objKeys = filter; } var keys = []; if (typeof obj !== "object" || obj === null) { return ""; } var arrayFormat; if (opts && opts.arrayFormat in arrayPrefixGenerators) { arrayFormat = opts.arrayFormat; } else if (opts && "indices" in opts) { arrayFormat = opts.indices ? "indices" : "repeat"; } else { arrayFormat = "indices"; } var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; if (opts && "commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") { throw new TypeError("`commaRoundTrip` must be a boolean, or absent"); } var commaRoundTrip = generateArrayPrefix === "comma" && opts && opts.commaRoundTrip; if (!objKeys) { objKeys = Object.keys(obj); } if (options.sort) { objKeys.sort(options.sort); } var sideChannel = getSideChannel(); for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (options.skipNulls && obj[key] === null) { continue; } pushToArray(keys, stringify( obj[key], key, generateArrayPrefix, commaRoundTrip, options.strictNullHandling, options.skipNulls, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel )); } var joined = keys.join(options.delimiter); var prefix = options.addQueryPrefix === true ? "?" : ""; if (options.charsetSentinel) { if (options.charset === "iso-8859-1") { prefix += "utf8=%26%2310003%3B&"; } else { prefix += "utf8=%E2%9C%93&"; } } return joined.length > 0 ? prefix + joined : ""; }; } }); // node_modules/qs/lib/parse.js var require_parse = __commonJS({ "node_modules/qs/lib/parse.js"(exports, module) { "use strict"; var utils = require_utils(); var has = Object.prototype.hasOwnProperty; var isArray = Array.isArray; var defaults = { allowDots: false, allowPrototypes: false, allowSparse: false, arrayLimit: 20, charset: "utf-8", charsetSentinel: false, comma: false, decoder: utils.decode, delimiter: "&", depth: 5, ignoreQueryPrefix: false, interpretNumericEntities: false, parameterLimit: 1e3, parseArrays: true, plainObjects: false, strictNullHandling: false }; var interpretNumericEntities = function(str) { return str.replace(/&#(\d+);/g, function($0, numberStr) { return String.fromCharCode(parseInt(numberStr, 10)); }); }; var parseArrayValue = function(val, options) { if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) { return val.split(","); } return val; }; var isoSentinel = "utf8=%26%2310003%3B"; var charsetSentinel = "utf8=%E2%9C%93"; var parseValues = function parseQueryStringValues(str, options) { var obj = {}; var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str; var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit; var parts = cleanStr.split(options.delimiter, limit); var skipIndex = -1; var i; var charset = options.charset; if (options.charsetSentinel) { for (i = 0; i < parts.length; ++i) { if (parts[i].indexOf("utf8=") === 0) { if (parts[i] === charsetSentinel) { charset = "utf-8"; } else if (parts[i] === isoSentinel) { charset = "iso-8859-1"; } skipIndex = i; i = parts.length; } } } for (i = 0; i < parts.length; ++i) { if (i === skipIndex) { continue; } var part = parts[i]; var bracketEqualsPos = part.indexOf("]="); var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1; var key, val; if (pos === -1) { key = options.decoder(part, defaults.decoder, charset, "key"); val = options.strictNullHandling ? null : ""; } else { key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key"); val = utils.maybeMap( parseArrayValue(part.slice(pos + 1), options), function(encodedVal) { return options.decoder(encodedVal, defaults.decoder, charset, "value"); } ); } if (val && options.interpretNumericEntities && charset === "iso-8859-1") { val = interpretNumericEntities(val); } if (part.indexOf("[]=") > -1) { val = isArray(val) ? [val] : val; } if (has.call(obj, key)) { obj[key] = utils.combine(obj[key], val); } else { obj[key] = val; } } return obj; }; var parseObject = function(chain, val, options, valuesParsed) { var leaf = valuesParsed ? val : parseArrayValue(val, options); for (var i = chain.length - 1; i >= 0; --i) { var obj; var root = chain[i]; if (root === "[]" && options.parseArrays) { obj = [].concat(leaf); } else { obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root; var index = parseInt(cleanRoot, 10); if (!options.parseArrays && cleanRoot === "") { obj = { 0: leaf }; } else if (!isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) { obj = []; obj[index] = leaf; } else if (cleanRoot !== "__proto__") { obj[cleanRoot] = leaf; } } leaf = obj; } return leaf; }; var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { if (!givenKey) { return; } var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey; var brackets = /(\[[^[\]]*])/; var child = /(\[[^[\]]*])/g; var segment = options.depth > 0 && brackets.exec(key); var parent = segment ? key.slice(0, segment.index) : key; var keys = []; if (parent) { if (!options.plainObjects && has.call(Object.prototype, parent)) { if (!options.allowPrototypes) { return; } } keys.push(parent); } var i = 0; while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { i += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { if (!options.allowPrototypes) { return; } } keys.push(segment[1]); } if (segment) { keys.push("[" + key.slice(segment.index) + "]"); } return parseObject(keys, val, options, valuesParsed); }; var normalizeParseOptions = function normalizeParseOptions2(opts) { if (!opts) { return defaults; } if (opts.decoder !== null && opts.decoder !== void 0 && typeof opts.decoder !== "function") { throw new TypeError("Decoder has to be a function."); } if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") { throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); } var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset; return { allowDots: typeof opts.allowDots === "undefined" ? defaults.allowDots : !!opts.allowDots, allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes, allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse, arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit, charset, charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel, comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma, decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder, delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, // eslint-disable-next-line no-implicit-coercion, no-extra-parens depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth, ignoreQueryPrefix: opts.ignoreQueryPrefix === true, interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities, parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit, parseArrays: opts.parseArrays !== false, plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults.plainObjects, strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling }; }; module.exports = function(str, opts) { var options = normalizeParseOptions(opts); if (str === "" || str === null || typeof str === "undefined") { return options.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; } var tempObj = typeof str === "string" ? parseValues(str, options) : str; var obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; var keys = Object.keys(tempObj); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; var newObj = parseKeys(key, tempObj[key], options, typeof str === "string"); obj = utils.merge(obj, newObj, options); } if (options.allowSparse === true) { return obj; } return utils.compact(obj); }; } }); // node_modules/qs/lib/index.js var require_lib = __commonJS({ "node_modules/qs/lib/index.js"(exports, module) { "use strict"; var stringify = require_stringify(); var parse = require_parse(); var formats = require_formats(); module.exports = { formats, parse, stringify }; } }); // node_modules/lodash/_isKey.js var require_isKey = __commonJS({ "node_modules/lodash/_isKey.js"(exports, module) { var isArray = require_isArray(); var isSymbol = require_isSymbol(); var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; var reIsPlainProp = /^\w*$/; function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); } module.exports = isKey; } }); // node_modules/lodash/_castPath.js var require_castPath = __commonJS({ "node_modules/lodash/_castPath.js"(exports, module) { var isArray = require_isArray(); var isKey = require_isKey(); var stringToPath = require_stringToPath(); var toString = require_toString(); function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; } }); // node_modules/lodash/_baseGet.js var require_baseGet = __commonJS({ "node_modules/lodash/_baseGet.js"(exports, module) { var castPath = require_castPath(); var toKey = require_toKey(); function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return index && index == length ? object : void 0; } module.exports = baseGet; } }); // node_modules/lodash/get.js var require_get2 = __commonJS({ "node_modules/lodash/get.js"(exports, module) { var baseGet = require_baseGet(); function get(object, path, defaultValue) { var result = object == null ? void 0 : baseGet(object, path); return result === void 0 ? defaultValue : result; } module.exports = get; } }); // node_modules/lodash/fp/_mapping.js var require_mapping = __commonJS({ "node_modules/lodash/fp/_mapping.js"(exports) { exports.aliasToReal = { // Lodash aliases. "each": "forEach", "eachRight": "forEachRight", "entries": "toPairs", "entriesIn": "toPairsIn", "extend": "assignIn", "extendAll": "assignInAll", "extendAllWith": "assignInAllWith", "extendWith": "assignInWith", "first": "head", // Methods that are curried variants of others. "conforms": "conformsTo", "matches": "isMatch", "property": "get", // Ramda aliases. "__": "placeholder", "F": "stubFalse", "T": "stubTrue", "all": "every", "allPass": "overEvery", "always": "constant", "any": "some", "anyPass": "overSome", "apply": "spread", "assoc": "set", "assocPath": "set", "complement": "negate", "compose": "flowRight", "contains": "includes", "dissoc": "unset", "dissocPath": "unset", "dropLast": "dropRight", "dropLastWhile": "dropRightWhile", "equals": "isEqual", "identical": "eq", "indexBy": "keyBy", "init": "initial", "invertObj": "invert", "juxt": "over", "omitAll": "omit", "nAry": "ary", "path": "get", "pathEq": "matchesProperty", "pathOr": "getOr", "paths": "at", "pickAll": "pick", "pipe": "flow", "pluck": "map", "prop": "get", "propEq": "matchesProperty", "propOr": "getOr", "props": "at", "symmetricDifference": "xor", "symmetricDifferenceBy": "xorBy", "symmetricDifferenceWith": "xorWith", "takeLast": "takeRight", "takeLastWhile": "takeRightWhile", "unapply": "rest", "unnest": "flatten", "useWith": "overArgs", "where": "conformsTo", "whereEq": "isMatch", "zipObj": "zipObject" }; exports.aryMethod = { "1": [ "assignAll", "assignInAll", "attempt", "castArray", "ceil", "create", "curry", "curryRight", "defaultsAll", "defaultsDeepAll", "floor", "flow", "flowRight", "fromPairs", "invert", "iteratee", "memoize", "method", "mergeAll", "methodOf", "mixin", "nthArg", "over", "overEvery", "overSome", "rest", "reverse", "round", "runInContext", "spread", "template", "trim", "trimEnd", "trimStart", "uniqueId", "words", "zipAll" ], "2": [ "add", "after", "ary", "assign", "assignAllWith", "assignIn", "assignInAllWith", "at", "before", "bind", "bindAll", "bindKey", "chunk", "cloneDeepWith", "cloneWith", "concat", "conformsTo", "countBy", "curryN", "curryRightN", "debounce", "defaults", "defaultsDeep", "defaultTo", "delay", "difference", "divide", "drop", "dropRight", "dropRightWhile", "dropWhile", "endsWith", "eq", "every", "filter", "find", "findIndex", "findKey", "findLast", "findLastIndex", "findLastKey", "flatMap", "flatMapDeep", "flattenDepth", "forEach", "forEachRight", "forIn", "forInRight", "forOwn", "forOwnRight", "get", "groupBy", "gt", "gte", "has", "hasIn", "includes", "indexOf", "intersection", "invertBy", "invoke", "invokeMap", "isEqual", "isMatch", "join", "keyBy", "lastIndexOf", "lt", "lte", "map", "mapKeys", "mapValues", "matchesProperty", "maxBy", "meanBy", "merge", "mergeAllWith", "minBy", "multiply", "nth", "omit", "omitBy", "overArgs", "pad", "padEnd", "padStart", "parseInt", "partial", "partialRight", "partition", "pick", "pickBy", "propertyOf", "pull", "pullAll", "pullAt", "random", "range", "rangeRight", "rearg", "reject", "remove", "repeat", "restFrom", "result", "sampleSize", "some", "sortBy", "sortedIndex", "sortedIndexOf", "sortedLastIndex", "sortedLastIndexOf", "sortedUniqBy", "split", "spreadFrom", "startsWith", "subtract", "sumBy", "take", "takeRight", "takeRightWhile", "takeWhile", "tap", "throttle", "thru", "times", "trimChars", "trimCharsEnd", "trimCharsStart", "truncate", "union", "uniqBy", "uniqWith", "unset", "unzipWith", "without", "wrap", "xor", "zip", "zipObject", "zipObjectDeep" ], "3": [ "assignInWith", "assignWith", "clamp", "differenceBy", "differenceWith", "findFrom", "findIndexFrom", "findLastFrom", "findLastIndexFrom", "getOr", "includesFrom", "indexOfFrom", "inRange", "intersectionBy", "intersectionWith", "invokeArgs", "invokeArgsMap", "isEqualWith", "isMatchWith", "flatMapDepth", "lastIndexOfFrom", "mergeWith", "orderBy", "padChars", "padCharsEnd", "padCharsStart", "pullAllBy", "pullAllWith", "rangeStep", "rangeStepRight", "reduce", "reduceRight", "replace", "set", "slice", "sortedIndexBy", "sortedLastIndexBy", "transform", "unionBy", "unionWith", "update", "xorBy", "xorWith", "zipWith" ], "4": [ "fill", "setWith", "updateWith" ] }; exports.aryRearg = { "2": [1, 0], "3": [2, 0, 1], "4": [3, 2, 0, 1] }; exports.iterateeAry = { "dropRightWhile": 1, "dropWhile": 1, "every": 1, "filter": 1, "find": 1, "findFrom": 1, "findIndex": 1, "findIndexFrom": 1, "findKey": 1, "findLast": 1, "findLastFrom": 1, "findLastIndex": 1, "findLastIndexFrom": 1, "findLastKey": 1, "flatMap": 1, "flatMapDeep": 1, "flatMapDepth": 1, "forEach": 1, "forEachRight": 1, "forIn": 1, "forInRight": 1, "forOwn": 1, "forOwnRight": 1, "map": 1, "mapKeys": 1, "mapValues": 1, "partition": 1, "reduce": 2, "reduceRight": 2, "reject": 1, "remove": 1, "some": 1, "takeRightWhile": 1, "takeWhile": 1, "times": 1, "transform": 2 }; exports.iterateeRearg = { "mapKeys": [1], "reduceRight": [1, 0] }; exports.methodRearg = { "assignInAllWith": [1, 0], "assignInWith": [1, 2, 0], "assignAllWith": [1, 0], "assignWith": [1, 2, 0], "differenceBy": [1, 2, 0], "differenceWith": [1, 2, 0], "getOr": [2, 1, 0], "intersectionBy": [1, 2, 0], "intersectionWith": [1, 2, 0], "isEqualWith": [1, 2, 0], "isMatchWith": [2, 1, 0], "mergeAllWith": [1, 0], "mergeWith": [1, 2, 0], "padChars": [2, 1, 0], "padCharsEnd": [2, 1, 0], "padCharsStart": [2, 1, 0], "pullAllBy": [2, 1, 0], "pullAllWith": [2, 1, 0], "rangeStep": [1, 2, 0], "rangeStepRight": [1, 2, 0], "setWith": [3, 1, 2, 0], "sortedIndexBy": [2, 1, 0], "sortedLastIndexBy": [2, 1, 0], "unionBy": [1, 2, 0], "unionWith": [1, 2, 0], "updateWith": [3, 1, 2, 0], "xorBy": [1, 2, 0], "xorWith": [1, 2, 0], "zipWith": [1, 2, 0] }; exports.methodSpread = { "assignAll": { "start": 0 }, "assignAllWith": { "start": 0 }, "assignInAll": { "start": 0 }, "assignInAllWith": { "start": 0 }, "defaultsAll": { "start": 0 }, "defaultsDeepAll": { "start": 0 }, "invokeArgs": { "start": 2 }, "invokeArgsMap": { "start": 2 }, "mergeAll": { "start": 0 }, "mergeAllWith": { "start": 0 }, "partial": { "start": 1 }, "partialRight": { "start": 1 }, "without": { "start": 1 }, "zipAll": { "start": 0 } }; exports.mutate = { "array": { "fill": true, "pull": true, "pullAll": true, "pullAllBy": true, "pullAllWith": true, "pullAt": true, "remove": true, "reverse": true }, "object": { "assign": true, "assignAll": true, "assignAllWith": true, "assignIn": true, "assignInAll": true, "assignInAllWith": true, "assignInWith": true, "assignWith": true, "defaults": true, "defaultsAll": true, "defaultsDeep": true, "defaultsDeepAll": true, "merge": true, "mergeAll": true, "mergeAllWith": true, "mergeWith": true }, "set": { "set": true, "setWith": true, "unset": true, "update": true, "updateWith": true } }; exports.realToAlias = function() { var hasOwnProperty = Object.prototype.hasOwnProperty, object = exports.aliasToReal, result = {}; for (var key in object) { var value = object[key]; if (hasOwnProperty.call(result, value)) { result[value].push(key); } else { result[value] = [key]; } } return result; }(); exports.remap = { "assignAll": "assign", "assignAllWith": "assignWith", "assignInAll": "assignIn", "assignInAllWith": "assignInWith", "curryN": "curry", "curryRightN": "curryRight", "defaultsAll": "defaults", "defaultsDeepAll": "defaultsDeep", "findFrom": "find", "findIndexFrom": "findIndex", "findLastFrom": "findLast", "findLastIndexFrom": "findLastIndex", "getOr": "get", "includesFrom": "includes", "indexOfFrom": "indexOf", "invokeArgs": "invoke", "invokeArgsMap": "invokeMap", "lastIndexOfFrom": "lastIndexOf", "mergeAll": "merge", "mergeAllWith": "mergeWith", "padChars": "pad", "padCharsEnd": "padEnd", "padCharsStart": "padStart", "propertyOf": "get", "rangeStep": "range", "rangeStepRight": "rangeRight", "restFrom": "rest", "spreadFrom": "spread", "trimChars": "trim", "trimCharsEnd": "trimEnd", "trimCharsStart": "trimStart", "zipAll": "zip" }; exports.skipFixed = { "castArray": true, "flow": true, "flowRight": true, "iteratee": true, "mixin": true, "rearg": true, "runInContext": true }; exports.skipRearg = { "add": true, "assign": true, "assignIn": true, "bind": true, "bindKey": true, "concat": true, "difference": true, "divide": true, "eq": true, "gt": true, "gte": true, "isEqual": true, "lt": true, "lte": true, "matchesProperty": true, "merge": true, "multiply": true, "overArgs": true, "partial": true, "partialRight": true, "propertyOf": true, "random": true, "range": true, "rangeRight": true, "subtract": true, "zip": true, "zipObject": true, "zipObjectDeep": true }; } }); // node_modules/lodash/fp/placeholder.js var require_placeholder = __commonJS({ "node_modules/lodash/fp/placeholder.js"(exports, module) { module.exports = {}; } }); // node_modules/lodash/fp/_baseConvert.js var require_baseConvert = __commonJS({ "node_modules/lodash/fp/_baseConvert.js"(exports, module) { var mapping = require_mapping(); var fallbackHolder = require_placeholder(); var push = Array.prototype.push; function baseArity(func, n) { return n == 2 ? function(a, b) { return func.apply(void 0, arguments); } : function(a) { return func.apply(void 0, arguments); }; } function baseAry(func, n) { return n == 2 ? function(a, b) { return func(a, b); } : function(a) { return func(a); }; } function cloneArray(array) { var length = array ? array.length : 0, result = Array(length); while (length--) { result[length] = array[length]; } return result; } function createCloner(func) { return function(object) { return func({}, object); }; } function flatSpread(func, start) { return function() { var length = arguments.length, lastIndex = length - 1, args = Array(length); while (length--) { args[length] = arguments[length]; } var array = args[start], otherArgs = args.slice(0, start); if (array) { push.apply(otherArgs, array); } if (start != lastIndex) { push.apply(otherArgs, args.slice(start + 1)); } return func.apply(this, otherArgs); }; } function wrapImmutable(func, cloner) { return function() { var length = arguments.length; if (!length) { return; } var args = Array(length); while (length--) { args[length] = arguments[length]; } var result = args[0] = cloner.apply(void 0, args); func.apply(void 0, args); return result; }; } function baseConvert(util, name, func, options) { var isLib = typeof name == "function", isObj = name === Object(name); if (isObj) { options = func; func = name; name = void 0; } if (func == null) { throw new TypeError(); } options || (options = {}); var config = { "cap": "cap" in options ? options.cap : true, "curry": "curry" in options ? options.curry : true, "fixed": "fixed" in options ? options.fixed : true, "immutable": "immutable" in options ? options.immutable : true, "rearg": "rearg" in options ? options.rearg : true }; var defaultHolder = isLib ? func : fallbackHolder, forceCurry = "curry" in options && options.curry, forceFixed = "fixed" in options && options.fixed, forceRearg = "rearg" in options && options.rearg, pristine = isLib ? func.runInContext() : void 0; var helpers = isLib ? func : { "ary": util.ary, "assign": util.assign, "clone": util.clone, "curry": util.curry, "forEach": util.forEach, "isArray": util.isArray, "isError": util.isError, "isFunction": util.isFunction, "isWeakMap": util.isWeakMap, "iteratee": util.iteratee, "keys": util.keys, "rearg": util.rearg, "toInteger": util.toInteger, "toPath": util.toPath }; var ary = helpers.ary, assign = helpers.assign, clone = helpers.clone, curry = helpers.curry, each = helpers.forEach, isArray = helpers.isArray, isError = helpers.isError, isFunction2 = helpers.isFunction, isWeakMap = helpers.isWeakMap, keys = helpers.keys, rearg = helpers.rearg, toInteger = helpers.toInteger, toPath = helpers.toPath; var aryMethodKeys = keys(mapping.aryMethod); var wrappers = { "castArray": function(castArray) { return function() { var value = arguments[0]; return isArray(value) ? castArray(cloneArray(value)) : castArray.apply(void 0, arguments); }; }, "iteratee": function(iteratee) { return function() { var func2 = arguments[0], arity = arguments[1], result = iteratee(func2, arity), length = result.length; if (config.cap && typeof arity == "number") { arity = arity > 2 ? arity - 2 : 1; return length && length <= arity ? result : baseAry(result, arity); } return result; }; }, "mixin": function(mixin) { return function(source) { var func2 = this; if (!isFunction2(func2)) { return mixin(func2, Object(source)); } var pairs2 = []; each(keys(source), function(key) { if (isFunction2(source[key])) { pairs2.push([key, func2.prototype[key]]); } }); mixin(func2, Object(source)); each(pairs2, function(pair) { var value = pair[1]; if (isFunction2(value)) { func2.prototype[pair[0]] = value; } else { delete func2.prototype[pair[0]]; } }); return func2; }; }, "nthArg": function(nthArg) { return function(n) { var arity = n < 0 ? 1 : toInteger(n) + 1; return curry(nthArg(n), arity); }; }, "rearg": function(rearg2) { return function(func2, indexes) { var arity = indexes ? indexes.length : 0; return curry(rearg2(func2, indexes), arity); }; }, "runInContext": function(runInContext) { return function(context) { return baseConvert(util, runInContext(context), options); }; } }; function castCap(name2, func2) { if (config.cap) { var indexes = mapping.iterateeRearg[name2]; if (indexes) { return iterateeRearg(func2, indexes); } var n = !isLib && mapping.iterateeAry[name2]; if (n) { return iterateeAry(func2, n); } } return func2; } function castCurry(name2, func2, n) { return forceCurry || config.curry && n > 1 ? curry(func2, n) : func2; } function castFixed(name2, func2, n) { if (config.fixed && (forceFixed || !mapping.skipFixed[name2])) { var data = mapping.methodSpread[name2], start = data && data.start; return start === void 0 ? ary(func2, n) : flatSpread(func2, start); } return func2; } function castRearg(name2, func2, n) { return config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name2]) ? rearg(func2, mapping.methodRearg[name2] || mapping.aryRearg[n]) : func2; } function cloneByPath(object, path) { path = toPath(path); var index = -1, length = path.length, lastIndex = length - 1, result = clone(Object(object)), nested = result; while (nested != null && ++index < length) { var key = path[index], value = nested[key]; if (value != null && !(isFunction2(value) || isError(value) || isWeakMap(value))) { nested[key] = clone(index == lastIndex ? value : Object(value)); } nested = nested[key]; } return result; } function convertLib(options2) { return _.runInContext.convert(options2)(void 0); } function createConverter(name2, func2) { var realName = mapping.aliasToReal[name2] || name2, methodName = mapping.remap[realName] || realName, oldOptions = options; return function(options2) { var newUtil = isLib ? pristine : helpers, newFunc = isLib ? pristine[methodName] : func2, newOptions = assign(assign({}, oldOptions), options2); return baseConvert(newUtil, realName, newFunc, newOptions); }; } function iterateeAry(func2, n) { return overArg(func2, function(func3) { return typeof func3 == "function" ? baseAry(func3, n) : func3; }); } function iterateeRearg(func2, indexes) { return overArg(func2, function(func3) { var n = indexes.length; return baseArity(rearg(baseAry(func3, n), indexes), n); }); } function overArg(func2, transform) { return function() { var length = arguments.length; if (!length) { return func2(); } var args = Array(length); while (length--) { args[length] = arguments[length]; } var index = config.rearg ? 0 : length - 1; args[index] = transform(args[index]); return func2.apply(void 0, args); }; } function wrap(name2, func2, placeholder) { var result, realName = mapping.aliasToReal[name2] || name2, wrapped = func2, wrapper = wrappers[realName]; if (wrapper) { wrapped = wrapper(func2); } else if (config.immutable) { if (mapping.mutate.array[realName]) { wrapped = wrapImmutable(func2, cloneArray); } else if (mapping.mutate.object[realName]) { wrapped = wrapImmutable(func2, createCloner(func2)); } else if (mapping.mutate.set[realName]) { wrapped = wrapImmutable(func2, cloneByPath); } } each(aryMethodKeys, function(aryKey) { each(mapping.aryMethod[aryKey], function(otherName) { if (realName == otherName) { var data = mapping.methodSpread[realName], afterRearg = data && data.afterRearg; result = afterRearg ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); result = castCap(realName, result); result = castCurry(realName, result, aryKey); return false; } }); return !result; }); result || (result = wrapped); if (result == func2) { result = forceCurry ? curry(result, 1) : function() { return func2.apply(this, arguments); }; } result.convert = createConverter(realName, func2); result.placeholder = func2.placeholder = placeholder; return result; } if (!isObj) { return wrap(name, func, defaultHolder); } var _ = func; var pairs = []; each(aryMethodKeys, function(aryKey) { each(mapping.aryMethod[aryKey], function(key) { var func2 = _[mapping.remap[key] || key]; if (func2) { pairs.push([key, wrap(key, func2, _)]); } }); }); each(keys(_), function(key) { var func2 = _[key]; if (typeof func2 == "function") { var length = pairs.length; while (length--) { if (pairs[length][0] == key) { return; } } func2.convert = createConverter(key, func2); pairs.push([key, func2]); } }); each(pairs, function(pair) { _[pair[0]] = pair[1]; }); _.convert = convertLib; _.placeholder = _; each(keys(_), function(key) { each(mapping.realToAlias[key] || [], function(alias) { _[alias] = _[key]; }); }); return _; } module.exports = baseConvert; } }); // node_modules/lodash/identity.js var require_identity = __commonJS({ "node_modules/lodash/identity.js"(exports, module) { function identity(value) { return value; } module.exports = identity; } }); // node_modules/lodash/_metaMap.js var require_metaMap = __commonJS({ "node_modules/lodash/_metaMap.js"(exports, module) { var WeakMap2 = require_WeakMap(); var metaMap = WeakMap2 && new WeakMap2(); module.exports = metaMap; } }); // node_modules/lodash/_baseSetData.js var require_baseSetData = __commonJS({ "node_modules/lodash/_baseSetData.js"(exports, module) { var identity = require_identity(); var metaMap = require_metaMap(); var baseSetData = !metaMap ? identity : function(func, data) { metaMap.set(func, data); return func; }; module.exports = baseSetData; } }); // node_modules/lodash/_createCtor.js var require_createCtor = __commonJS({ "node_modules/lodash/_createCtor.js"(exports, module) { var baseCreate = require_baseCreate(); var isObject = require_isObject(); function createCtor(Ctor) { return function() { var args = arguments; switch (args.length) { case 0: return new Ctor(); case 1: return new Ctor(args[0]); case 2: return new Ctor(args[0], args[1]); case 3: return new Ctor(args[0], args[1], args[2]); case 4: return new Ctor(args[0], args[1], args[2], args[3]); case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } var thisBinding = baseCreate(Ctor.prototype), result = Ctor.apply(thisBinding, args); return isObject(result) ? result : thisBinding; }; } module.exports = createCtor; } }); // node_modules/lodash/_createBind.js var require_createBind = __commonJS({ "node_modules/lodash/_createBind.js"(exports, module) { var createCtor = require_createCtor(); var root = require_root(); var WRAP_BIND_FLAG = 1; function createBind(func, bitmask, thisArg) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper() { var fn = this && this !== root && this instanceof wrapper ? Ctor : func; return fn.apply(isBind ? thisArg : this, arguments); } return wrapper; } module.exports = createBind; } }); // node_modules/lodash/_apply.js var require_apply = __commonJS({ "node_modules/lodash/_apply.js"(exports, module) { 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); } module.exports = apply; } }); // node_modules/lodash/_composeArgs.js var require_composeArgs = __commonJS({ "node_modules/lodash/_composeArgs.js"(exports, module) { var nativeMax = Math.max; function composeArgs(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(leftLength + rangeLength), isUncurried = !isCurried; while (++leftIndex < leftLength) { result[leftIndex] = partials[leftIndex]; } while (++argsIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[holders[argsIndex]] = args[argsIndex]; } } while (rangeLength--) { result[leftIndex++] = args[argsIndex++]; } return result; } module.exports = composeArgs; } }); // node_modules/lodash/_composeArgsRight.js var require_composeArgsRight = __commonJS({ "node_modules/lodash/_composeArgsRight.js"(exports, module) { var nativeMax = Math.max; function composeArgsRight(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(rangeLength + rightLength), isUncurried = !isCurried; while (++argsIndex < rangeLength) { result[argsIndex] = args[argsIndex]; } var offset = argsIndex; while (++rightIndex < rightLength) { result[offset + rightIndex] = partials[rightIndex]; } while (++holdersIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[offset + holders[holdersIndex]] = args[argsIndex++]; } } return result; } module.exports = composeArgsRight; } }); // node_modules/lodash/_countHolders.js var require_countHolders = __commonJS({ "node_modules/lodash/_countHolders.js"(exports, module) { function countHolders(array, placeholder) { var length = array.length, result = 0; while (length--) { if (array[length] === placeholder) { ++result; } } return result; } module.exports = countHolders; } }); // node_modules/lodash/_baseLodash.js var require_baseLodash = __commonJS({ "node_modules/lodash/_baseLodash.js"(exports, module) { function baseLodash() { } module.exports = baseLodash; } }); // node_modules/lodash/_LazyWrapper.js var require_LazyWrapper = __commonJS({ "node_modules/lodash/_LazyWrapper.js"(exports, module) { var baseCreate = require_baseCreate(); var baseLodash = require_baseLodash(); var MAX_ARRAY_LENGTH = 4294967295; function LazyWrapper(value) { this.__wrapped__ = value; this.__actions__ = []; this.__dir__ = 1; this.__filtered__ = false; this.__iteratees__ = []; this.__takeCount__ = MAX_ARRAY_LENGTH; this.__views__ = []; } LazyWrapper.prototype = baseCreate(baseLodash.prototype); LazyWrapper.prototype.constructor = LazyWrapper; module.exports = LazyWrapper; } }); // node_modules/lodash/noop.js var require_noop = __commonJS({ "node_modules/lodash/noop.js"(exports, module) { function noop() { } module.exports = noop; } }); // node_modules/lodash/_getData.js var require_getData = __commonJS({ "node_modules/lodash/_getData.js"(exports, module) { var metaMap = require_metaMap(); var noop = require_noop(); var getData = !metaMap ? noop : function(func) { return metaMap.get(func); }; module.exports = getData; } }); // node_modules/lodash/_realNames.js var require_realNames = __commonJS({ "node_modules/lodash/_realNames.js"(exports, module) { var realNames = {}; module.exports = realNames; } }); // node_modules/lodash/_getFuncName.js var require_getFuncName = __commonJS({ "node_modules/lodash/_getFuncName.js"(exports, module) { var realNames = require_realNames(); var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; function getFuncName(func) { var result = func.name + "", array = realNames[result], length = hasOwnProperty.call(realNames, result) ? array.length : 0; while (length--) { var data = array[length], otherFunc = data.func; if (otherFunc == null || otherFunc == func) { return data.name; } } return result; } module.exports = getFuncName; } }); // node_modules/lodash/_LodashWrapper.js var require_LodashWrapper = __commonJS({ "node_modules/lodash/_LodashWrapper.js"(exports, module) { var baseCreate = require_baseCreate(); var baseLodash = require_baseLodash(); function LodashWrapper(value, chainAll) { this.__wrapped__ = value; this.__actions__ = []; this.__chain__ = !!chainAll; this.__index__ = 0; this.__values__ = void 0; } LodashWrapper.prototype = baseCreate(baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; module.exports = LodashWrapper; } }); // node_modules/lodash/_wrapperClone.js var require_wrapperClone = __commonJS({ "node_modules/lodash/_wrapperClone.js"(exports, module) { var LazyWrapper = require_LazyWrapper(); var LodashWrapper = require_LodashWrapper(); var copyArray = require_copyArray(); function wrapperClone(wrapper) { if (wrapper instanceof LazyWrapper) { return wrapper.clone(); } var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); result.__actions__ = copyArray(wrapper.__actions__); result.__index__ = wrapper.__index__; result.__values__ = wrapper.__values__; return result; } module.exports = wrapperClone; } }); // node_modules/lodash/wrapperLodash.js var require_wrapperLodash = __commonJS({ "node_modules/lodash/wrapperLodash.js"(exports, module) { var LazyWrapper = require_LazyWrapper(); var LodashWrapper = require_LodashWrapper(); var baseLodash = require_baseLodash(); var isArray = require_isArray(); var isObjectLike = require_isObjectLike(); var wrapperClone = require_wrapperClone(); var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; function lodash(value) { if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { if (value instanceof LodashWrapper) { return value; } if (hasOwnProperty.call(value, "__wrapped__")) { return wrapperClone(value); } } return new LodashWrapper(value); } lodash.prototype = baseLodash.prototype; lodash.prototype.constructor = lodash; module.exports = lodash; } }); // node_modules/lodash/_isLaziable.js var require_isLaziable = __commonJS({ "node_modules/lodash/_isLaziable.js"(exports, module) { var LazyWrapper = require_LazyWrapper(); var getData = require_getData(); var getFuncName = require_getFuncName(); var lodash = require_wrapperLodash(); function isLaziable(func) { var funcName = getFuncName(func), other = lodash[funcName]; if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) { return false; } if (func === other) { return true; } var data = getData(other); return !!data && func === data[0]; } module.exports = isLaziable; } }); // node_modules/lodash/_shortOut.js var require_shortOut = __commonJS({ "node_modules/lodash/_shortOut.js"(exports, module) { var HOT_COUNT = 800; var HOT_SPAN = 16; var nativeNow = Date.now; 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); }; } module.exports = shortOut; } }); // node_modules/lodash/_setData.js var require_setData = __commonJS({ "node_modules/lodash/_setData.js"(exports, module) { var baseSetData = require_baseSetData(); var shortOut = require_shortOut(); var setData = shortOut(baseSetData); module.exports = setData; } }); // node_modules/lodash/_getWrapDetails.js var require_getWrapDetails = __commonJS({ "node_modules/lodash/_getWrapDetails.js"(exports, module) { var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/; var reSplitDetails = /,? & /; function getWrapDetails(source) { var match = source.match(reWrapDetails); return match ? match[1].split(reSplitDetails) : []; } module.exports = getWrapDetails; } }); // node_modules/lodash/_insertWrapDetails.js var require_insertWrapDetails = __commonJS({ "node_modules/lodash/_insertWrapDetails.js"(exports, module) { var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; function insertWrapDetails(source, details) { var length = details.length; if (!length) { return source; } var lastIndex = length - 1; details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex]; details = details.join(length > 2 ? ", " : " "); return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n"); } module.exports = insertWrapDetails; } }); // node_modules/lodash/constant.js var require_constant = __commonJS({ "node_modules/lodash/constant.js"(exports, module) { function constant(value) { return function() { return value; }; } module.exports = constant; } }); // node_modules/lodash/_baseSetToString.js var require_baseSetToString = __commonJS({ "node_modules/lodash/_baseSetToString.js"(exports, module) { var constant = require_constant(); var defineProperty = require_defineProperty(); var identity = require_identity(); var baseSetToString = !defineProperty ? identity : function(func, string) { return defineProperty(func, "toString", { "configurable": true, "enumerable": false, "value": constant(string), "writable": true }); }; module.exports = baseSetToString; } }); // node_modules/lodash/_setToString.js var require_setToString = __commonJS({ "node_modules/lodash/_setToString.js"(exports, module) { var baseSetToString = require_baseSetToString(); var shortOut = require_shortOut(); var setToString = shortOut(baseSetToString); module.exports = setToString; } }); // node_modules/lodash/_baseFindIndex.js var require_baseFindIndex = __commonJS({ "node_modules/lodash/_baseFindIndex.js"(exports, module) { function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while (fromRight ? index-- : ++index < length) { if (predicate(array[index], index, array)) { return index; } } return -1; } module.exports = baseFindIndex; } }); // node_modules/lodash/_baseIsNaN.js var require_baseIsNaN = __commonJS({ "node_modules/lodash/_baseIsNaN.js"(exports, module) { function baseIsNaN(value) { return value !== value; } module.exports = baseIsNaN; } }); // node_modules/lodash/_strictIndexOf.js var require_strictIndexOf = __commonJS({ "node_modules/lodash/_strictIndexOf.js"(exports, module) { function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } module.exports = strictIndexOf; } }); // node_modules/lodash/_baseIndexOf.js var require_baseIndexOf = __commonJS({ "node_modules/lodash/_baseIndexOf.js"(exports, module) { var baseFindIndex = require_baseFindIndex(); var baseIsNaN = require_baseIsNaN(); var strictIndexOf = require_strictIndexOf(); function baseIndexOf(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } module.exports = baseIndexOf; } }); // node_modules/lodash/_arrayIncludes.js var require_arrayIncludes = __commonJS({ "node_modules/lodash/_arrayIncludes.js"(exports, module) { var baseIndexOf = require_baseIndexOf(); function arrayIncludes(array, value) { var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } module.exports = arrayIncludes; } }); // node_modules/lodash/_updateWrapDetails.js var require_updateWrapDetails = __commonJS({ "node_modules/lodash/_updateWrapDetails.js"(exports, module) { var arrayEach = require_arrayEach(); var arrayIncludes = require_arrayIncludes(); var WRAP_BIND_FLAG = 1; var WRAP_BIND_KEY_FLAG = 2; var WRAP_CURRY_FLAG = 8; var WRAP_CURRY_RIGHT_FLAG = 16; var WRAP_PARTIAL_FLAG = 32; var WRAP_PARTIAL_RIGHT_FLAG = 64; var WRAP_ARY_FLAG = 128; var WRAP_REARG_FLAG = 256; var WRAP_FLIP_FLAG = 512; var wrapFlags = [ ["ary", WRAP_ARY_FLAG], ["bind", WRAP_BIND_FLAG], ["bindKey", WRAP_BIND_KEY_FLAG], ["curry", WRAP_CURRY_FLAG], ["curryRight", WRAP_CURRY_RIGHT_FLAG], ["flip", WRAP_FLIP_FLAG], ["partial", WRAP_PARTIAL_FLAG], ["partialRight", WRAP_PARTIAL_RIGHT_FLAG], ["rearg", WRAP_REARG_FLAG] ]; function updateWrapDetails(details, bitmask) { arrayEach(wrapFlags, function(pair) { var value = "_." + pair[0]; if (bitmask & pair[1] && !arrayIncludes(details, value)) { details.push(value); } }); return details.sort(); } module.exports = updateWrapDetails; } }); // node_modules/lodash/_setWrapToString.js var require_setWrapToString = __commonJS({ "node_modules/lodash/_setWrapToString.js"(exports, module) { var getWrapDetails = require_getWrapDetails(); var insertWrapDetails = require_insertWrapDetails(); var setToString = require_setToString(); var updateWrapDetails = require_updateWrapDetails(); function setWrapToString(wrapper, reference, bitmask) { var source = reference + ""; return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); } module.exports = setWrapToString; } }); // node_modules/lodash/_createRecurry.js var require_createRecurry = __commonJS({ "node_modules/lodash/_createRecurry.js"(exports, module) { var isLaziable = require_isLaziable(); var setData = require_setData(); var setWrapToString = require_setWrapToString(); var WRAP_BIND_FLAG = 1; var WRAP_BIND_KEY_FLAG = 2; var WRAP_CURRY_BOUND_FLAG = 4; var WRAP_CURRY_FLAG = 8; var WRAP_PARTIAL_FLAG = 32; var WRAP_PARTIAL_RIGHT_FLAG = 64; function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : void 0, newHoldersRight = isCurry ? void 0 : holders, newPartials = isCurry ? partials : void 0, newPartialsRight = isCurry ? void 0 : partials; bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG; bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); } var newData = [ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary, arity ]; var result = wrapFunc.apply(void 0, newData); if (isLaziable(func)) { setData(result, newData); } result.placeholder = placeholder; return setWrapToString(result, func, bitmask); } module.exports = createRecurry; } }); // node_modules/lodash/_getHolder.js var require_getHolder = __commonJS({ "node_modules/lodash/_getHolder.js"(exports, module) { function getHolder(func) { var object = func; return object.placeholder; } module.exports = getHolder; } }); // node_modules/lodash/_reorder.js var require_reorder = __commonJS({ "node_modules/lodash/_reorder.js"(exports, module) { var copyArray = require_copyArray(); var isIndex = require_isIndex(); var nativeMin = Math.min; function reorder(array, indexes) { var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array); while (length--) { var index = indexes[length]; array[length] = isIndex(index, arrLength) ? oldArray[index] : void 0; } return array; } module.exports = reorder; } }); // node_modules/lodash/_replaceHolders.js var require_replaceHolders = __commonJS({ "node_modules/lodash/_replaceHolders.js"(exports, module) { var PLACEHOLDER = "__lodash_placeholder__"; function replaceHolders(array, placeholder) { var index = -1, length = array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value === placeholder || value === PLACEHOLDER) { array[index] = PLACEHOLDER; result[resIndex++] = index; } } return result; } module.exports = replaceHolders; } }); // node_modules/lodash/_createHybrid.js var require_createHybrid = __commonJS({ "node_modules/lodash/_createHybrid.js"(exports, module) { var composeArgs = require_composeArgs(); var composeArgsRight = require_composeArgsRight(); var countHolders = require_countHolders(); var createCtor = require_createCtor(); var createRecurry = require_createRecurry(); var getHolder = require_getHolder(); var reorder = require_reorder(); var replaceHolders = require_replaceHolders(); var root = require_root(); var WRAP_BIND_FLAG = 1; var WRAP_BIND_KEY_FLAG = 2; var WRAP_CURRY_FLAG = 8; var WRAP_CURRY_RIGHT_FLAG = 16; var WRAP_ARY_FLAG = 128; var WRAP_FLIP_FLAG = 512; function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? void 0 : createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length; while (index--) { args[index] = arguments[index]; } if (isCurried) { var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); } if (partials) { args = composeArgs(args, partials, holders, isCurried); } if (partialsRight) { args = composeArgsRight(args, partialsRight, holdersRight, isCurried); } length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length ); } var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func; length = args.length; if (argPos) { args = reorder(args, argPos); } else if (isFlip && length > 1) { args.reverse(); } if (isAry && ary < length) { args.length = ary; } if (this && this !== root && this instanceof wrapper) { fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } return wrapper; } module.exports = createHybrid; } }); // node_modules/lodash/_createCurry.js var require_createCurry = __commonJS({ "node_modules/lodash/_createCurry.js"(exports, module) { var apply = require_apply(); var createCtor = require_createCtor(); var createHybrid = require_createHybrid(); var createRecurry = require_createRecurry(); var getHolder = require_getHolder(); var replaceHolders = require_replaceHolders(); var root = require_root(); function createCurry(func, bitmask, arity) { var Ctor = createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length, placeholder = getHolder(wrapper); while (index--) { args[index] = arguments[index]; } var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder); length -= holders.length; if (length < arity) { return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, void 0, args, holders, void 0, void 0, arity - length ); } var fn = this && this !== root && this instanceof wrapper ? Ctor : func; return apply(fn, this, args); } return wrapper; } module.exports = createCurry; } }); // node_modules/lodash/_createPartial.js var require_createPartial = __commonJS({ "node_modules/lodash/_createPartial.js"(exports, module) { var apply = require_apply(); var createCtor = require_createCtor(); var root = require_root(); var WRAP_BIND_FLAG = 1; function createPartial(func, bitmask, thisArg, partials) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper() { var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func; while (++leftIndex < leftLength) { args[leftIndex] = partials[leftIndex]; } while (argsLength--) { args[leftIndex++] = arguments[++argsIndex]; } return apply(fn, isBind ? thisArg : this, args); } return wrapper; } module.exports = createPartial; } }); // node_modules/lodash/_mergeData.js var require_mergeData = __commonJS({ "node_modules/lodash/_mergeData.js"(exports, module) { var composeArgs = require_composeArgs(); var composeArgsRight = require_composeArgsRight(); var replaceHolders = require_replaceHolders(); var PLACEHOLDER = "__lodash_placeholder__"; var WRAP_BIND_FLAG = 1; var WRAP_BIND_KEY_FLAG = 2; var WRAP_CURRY_BOUND_FLAG = 4; var WRAP_CURRY_FLAG = 8; var WRAP_ARY_FLAG = 128; var WRAP_REARG_FLAG = 256; var nativeMin = Math.min; function mergeData(data, source) { var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG; if (!(isCommon || isCombo)) { return data; } if (srcBitmask & WRAP_BIND_FLAG) { data[2] = source[2]; newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; } var value = source[3]; if (value) { var partials = data[3]; data[3] = partials ? composeArgs(partials, value, source[4]) : value; data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; } value = source[5]; if (value) { partials = data[5]; data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; } value = source[7]; if (value) { data[7] = value; } if (srcBitmask & WRAP_ARY_FLAG) { data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); } if (data[9] == null) { data[9] = source[9]; } data[0] = source[0]; data[1] = newBitmask; return data; } module.exports = mergeData; } }); // node_modules/lodash/_trimmedEndIndex.js var require_trimmedEndIndex = __commonJS({ "node_modules/lodash/_trimmedEndIndex.js"(exports, module) { var reWhitespace = /\s/; function trimmedEndIndex(string) { var index = string.length; while (index-- && reWhitespace.test(string.charAt(index))) { } return index; } module.exports = trimmedEndIndex; } }); // node_modules/lodash/_baseTrim.js var require_baseTrim = __commonJS({ "node_modules/lodash/_baseTrim.js"(exports, module) { var trimmedEndIndex = require_trimmedEndIndex(); var reTrimStart = /^\s+/; function baseTrim(string) { return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string; } module.exports = baseTrim; } }); // node_modules/lodash/toNumber.js var require_toNumber = __commonJS({ "node_modules/lodash/toNumber.js"(exports, module) { var baseTrim = require_baseTrim(); var isObject = require_isObject(); var isSymbol = require_isSymbol(); var NAN = 0 / 0; var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; var reIsBinary = /^0b[01]+$/i; var reIsOctal = /^0o[0-7]+$/i; var freeParseInt = parseInt; function toNumber(value) { if (typeof value == "number") { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == "function" ? value.valueOf() : value; value = isObject(other) ? other + "" : other; } if (typeof value != "string") { return value === 0 ? value : +value; } value = baseTrim(value); var isBinary = reIsBinary.test(value); return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; } module.exports = toNumber; } }); // node_modules/lodash/toFinite.js var require_toFinite = __commonJS({ "node_modules/lodash/toFinite.js"(exports, module) { var toNumber = require_toNumber(); var INFINITY = 1 / 0; var MAX_INTEGER = 17976931348623157e292; function toFinite(value) { if (!value) { return value === 0 ? value : 0; } value = toNumber(value); if (value === INFINITY || value === -INFINITY) { var sign = value < 0 ? -1 : 1; return sign * MAX_INTEGER; } return value === value ? value : 0; } module.exports = toFinite; } }); // node_modules/lodash/toInteger.js var require_toInteger = __commonJS({ "node_modules/lodash/toInteger.js"(exports, module) { var toFinite = require_toFinite(); function toInteger(value) { var result = toFinite(value), remainder = result % 1; return result === result ? remainder ? result - remainder : result : 0; } module.exports = toInteger; } }); // node_modules/lodash/_createWrap.js var require_createWrap = __commonJS({ "node_modules/lodash/_createWrap.js"(exports, module) { var baseSetData = require_baseSetData(); var createBind = require_createBind(); var createCurry = require_createCurry(); var createHybrid = require_createHybrid(); var createPartial = require_createPartial(); var getData = require_getData(); var mergeData = require_mergeData(); var setData = require_setData(); var setWrapToString = require_setWrapToString(); var toInteger = require_toInteger(); var FUNC_ERROR_TEXT = "Expected a function"; var WRAP_BIND_FLAG = 1; var WRAP_BIND_KEY_FLAG = 2; var WRAP_CURRY_FLAG = 8; var WRAP_CURRY_RIGHT_FLAG = 16; var WRAP_PARTIAL_FLAG = 32; var WRAP_PARTIAL_RIGHT_FLAG = 64; var nativeMax = Math.max; function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; if (!isBindKey && typeof func != "function") { throw new TypeError(FUNC_ERROR_TEXT); } var length = partials ? partials.length : 0; if (!length) { bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); partials = holders = void 0; } ary = ary === void 0 ? ary : nativeMax(toInteger(ary), 0); arity = arity === void 0 ? arity : toInteger(arity); length -= holders ? holders.length : 0; if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { var partialsRight = partials, holdersRight = holders; partials = holders = void 0; } var data = isBindKey ? void 0 : getData(func); var newData = [ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity ]; if (data) { mergeData(newData, data); } func = newData[0]; bitmask = newData[1]; thisArg = newData[2]; partials = newData[3]; holders = newData[4]; arity = newData[9] = newData[9] === void 0 ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0); if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); } if (!bitmask || bitmask == WRAP_BIND_FLAG) { var result = createBind(func, bitmask, thisArg); } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { result = createCurry(func, bitmask, arity); } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { result = createPartial(func, bitmask, thisArg, partials); } else { result = createHybrid.apply(void 0, newData); } var setter = data ? baseSetData : setData; return setWrapToString(setter(result, newData), func, bitmask); } module.exports = createWrap; } }); // node_modules/lodash/ary.js var require_ary = __commonJS({ "node_modules/lodash/ary.js"(exports, module) { var createWrap = require_createWrap(); var WRAP_ARY_FLAG = 128; function ary(func, n, guard) { n = guard ? void 0 : n; n = func && n == null ? func.length : n; return createWrap(func, WRAP_ARY_FLAG, void 0, void 0, void 0, void 0, n); } module.exports = ary; } }); // node_modules/lodash/curry.js var require_curry = __commonJS({ "node_modules/lodash/curry.js"(exports, module) { var createWrap = require_createWrap(); var WRAP_CURRY_FLAG = 8; function curry(func, arity, guard) { arity = guard ? void 0 : arity; var result = createWrap(func, WRAP_CURRY_FLAG, void 0, void 0, void 0, void 0, void 0, arity); result.placeholder = curry.placeholder; return result; } curry.placeholder = {}; module.exports = curry; } }); // node_modules/lodash/isPlainObject.js var require_isPlainObject = __commonJS({ "node_modules/lodash/isPlainObject.js"(exports, module) { var baseGetTag = require_baseGetTag(); var getPrototype = require_getPrototype(); var isObjectLike = require_isObjectLike(); var objectTag = "[object Object]"; var funcProto = Function.prototype; var objectProto = Object.prototype; var funcToString = funcProto.toString; var hasOwnProperty = objectProto.hasOwnProperty; var objectCtorString = funcToString.call(Object); function isPlainObject3(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor; return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject3; } }); // node_modules/lodash/isError.js var require_isError = __commonJS({ "node_modules/lodash/isError.js"(exports, module) { var baseGetTag = require_baseGetTag(); var isObjectLike = require_isObjectLike(); var isPlainObject3 = require_isPlainObject(); var domExcTag = "[object DOMException]"; var errorTag = "[object Error]"; function isError(value) { if (!isObjectLike(value)) { return false; } var tag = baseGetTag(value); return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject3(value); } module.exports = isError; } }); // node_modules/lodash/isWeakMap.js var require_isWeakMap = __commonJS({ "node_modules/lodash/isWeakMap.js"(exports, module) { var getTag = require_getTag(); var isObjectLike = require_isObjectLike(); var weakMapTag = "[object WeakMap]"; function isWeakMap(value) { return isObjectLike(value) && getTag(value) == weakMapTag; } module.exports = isWeakMap; } }); // node_modules/lodash/_baseIsMatch.js var require_baseIsMatch = __commonJS({ "node_modules/lodash/_baseIsMatch.js"(exports, module) { var Stack = require_Stack(); var baseIsEqual = require_baseIsEqual(); var COMPARE_PARTIAL_FLAG = 1; var COMPARE_UNORDERED_FLAG = 2; function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === void 0 && !(key in object)) { return false; } } else { var stack = new Stack(); if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) { return false; } } } return true; } module.exports = baseIsMatch; } }); // node_modules/lodash/_isStrictComparable.js var require_isStrictComparable = __commonJS({ "node_modules/lodash/_isStrictComparable.js"(exports, module) { var isObject = require_isObject(); function isStrictComparable(value) { return value === value && !isObject(value); } module.exports = isStrictComparable; } }); // node_modules/lodash/_getMatchData.js var require_getMatchData = __commonJS({ "node_modules/lodash/_getMatchData.js"(exports, module) { var isStrictComparable = require_isStrictComparable(); var keys = require_keys(); function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; } return result; } module.exports = getMatchData; } }); // node_modules/lodash/_matchesStrictComparable.js var require_matchesStrictComparable = __commonJS({ "node_modules/lodash/_matchesStrictComparable.js"(exports, module) { function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== void 0 || key in Object(object)); }; } module.exports = matchesStrictComparable; } }); // node_modules/lodash/_baseMatches.js var require_baseMatches = __commonJS({ "node_modules/lodash/_baseMatches.js"(exports, module) { var baseIsMatch = require_baseIsMatch(); var getMatchData = require_getMatchData(); var matchesStrictComparable = require_matchesStrictComparable(); function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); }; } module.exports = baseMatches; } }); // node_modules/lodash/_baseHasIn.js var require_baseHasIn = __commonJS({ "node_modules/lodash/_baseHasIn.js"(exports, module) { function baseHasIn(object, key) { return object != null && key in Object(object); } module.exports = baseHasIn; } }); // node_modules/lodash/_hasPath.js var require_hasPath = __commonJS({ "node_modules/lodash/_hasPath.js"(exports, module) { var castPath = require_castPath(); var isArguments = require_isArguments(); var isArray = require_isArray(); var isIndex = require_isIndex(); var isLength = require_isLength(); var toKey = require_toKey(); function hasPath(object, path, hasFunc) { path = castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } module.exports = hasPath; } }); // node_modules/lodash/hasIn.js var require_hasIn = __commonJS({ "node_modules/lodash/hasIn.js"(exports, module) { var baseHasIn = require_baseHasIn(); var hasPath = require_hasPath(); function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } module.exports = hasIn; } }); // node_modules/lodash/_baseMatchesProperty.js var require_baseMatchesProperty = __commonJS({ "node_modules/lodash/_baseMatchesProperty.js"(exports, module) { var baseIsEqual = require_baseIsEqual(); var get = require_get2(); var hasIn = require_hasIn(); var isKey = require_isKey(); var isStrictComparable = require_isStrictComparable(); var matchesStrictComparable = require_matchesStrictComparable(); var toKey = require_toKey(); var COMPARE_PARTIAL_FLAG = 1; var COMPARE_UNORDERED_FLAG = 2; function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } module.exports = baseMatchesProperty; } }); // node_modules/lodash/_baseProperty.js var require_baseProperty = __commonJS({ "node_modules/lodash/_baseProperty.js"(exports, module) { function baseProperty(key) { return function(object) { return object == null ? void 0 : object[key]; }; } module.exports = baseProperty; } }); // node_modules/lodash/_basePropertyDeep.js var require_basePropertyDeep = __commonJS({ "node_modules/lodash/_basePropertyDeep.js"(exports, module) { var baseGet = require_baseGet(); function basePropertyDeep(path) { return function(object) { return baseGet(object, path); }; } module.exports = basePropertyDeep; } }); // node_modules/lodash/property.js var require_property = __commonJS({ "node_modules/lodash/property.js"(exports, module) { var baseProperty = require_baseProperty(); var basePropertyDeep = require_basePropertyDeep(); var isKey = require_isKey(); var toKey = require_toKey(); function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } module.exports = property; } }); // node_modules/lodash/_baseIteratee.js var require_baseIteratee = __commonJS({ "node_modules/lodash/_baseIteratee.js"(exports, module) { var baseMatches = require_baseMatches(); var baseMatchesProperty = require_baseMatchesProperty(); var identity = require_identity(); var isArray = require_isArray(); var property = require_property(); function baseIteratee(value) { if (typeof value == "function") { return value; } if (value == null) { return identity; } if (typeof value == "object") { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; } }); // node_modules/lodash/iteratee.js var require_iteratee = __commonJS({ "node_modules/lodash/iteratee.js"(exports, module) { var baseClone = require_baseClone(); var baseIteratee = require_baseIteratee(); var CLONE_DEEP_FLAG = 1; function iteratee(func) { return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG)); } module.exports = iteratee; } }); // node_modules/lodash/_isFlattenable.js var require_isFlattenable = __commonJS({ "node_modules/lodash/_isFlattenable.js"(exports, module) { var Symbol2 = require_Symbol(); var isArguments = require_isArguments(); var isArray = require_isArray(); var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0; function isFlattenable(value) { return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } module.exports = isFlattenable; } }); // node_modules/lodash/_baseFlatten.js var require_baseFlatten = __commonJS({ "node_modules/lodash/_baseFlatten.js"(exports, module) { var arrayPush = require_arrayPush(); var isFlattenable = require_isFlattenable(); function baseFlatten(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; predicate || (predicate = isFlattenable); result || (result = []); while (++index < length) { var value = array[index]; if (depth > 0 && predicate(value)) { if (depth > 1) { baseFlatten(value, depth - 1, predicate, isStrict, result); } else { arrayPush(result, value); } } else if (!isStrict) { result[result.length] = value; } } return result; } module.exports = baseFlatten; } }); // node_modules/lodash/flatten.js var require_flatten = __commonJS({ "node_modules/lodash/flatten.js"(exports, module) { var baseFlatten = require_baseFlatten(); function flatten2(array) { var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } module.exports = flatten2; } }); // node_modules/lodash/_overRest.js var require_overRest = __commonJS({ "node_modules/lodash/_overRest.js"(exports, module) { var apply = require_apply(); var nativeMax = Math.max; 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(func, this, otherArgs); }; } module.exports = overRest; } }); // node_modules/lodash/_flatRest.js var require_flatRest = __commonJS({ "node_modules/lodash/_flatRest.js"(exports, module) { var flatten2 = require_flatten(); var overRest = require_overRest(); var setToString = require_setToString(); function flatRest(func) { return setToString(overRest(func, void 0, flatten2), func + ""); } module.exports = flatRest; } }); // node_modules/lodash/rearg.js var require_rearg = __commonJS({ "node_modules/lodash/rearg.js"(exports, module) { var createWrap = require_createWrap(); var flatRest = require_flatRest(); var WRAP_REARG_FLAG = 256; var rearg = flatRest(function(func, indexes) { return createWrap(func, WRAP_REARG_FLAG, void 0, void 0, void 0, indexes); }); module.exports = rearg; } }); // node_modules/lodash/fp/_util.js var require_util2 = __commonJS({ "node_modules/lodash/fp/_util.js"(exports, module) { module.exports = { "ary": require_ary(), "assign": require_baseAssign(), "clone": require_clone(), "curry": require_curry(), "forEach": require_arrayEach(), "isArray": require_isArray(), "isError": require_isError(), "isFunction": require_isFunction(), "isWeakMap": require_isWeakMap(), "iteratee": require_iteratee(), "keys": require_baseKeys(), "rearg": require_rearg(), "toInteger": require_toInteger(), "toPath": require_toPath() }; } }); // node_modules/lodash/fp/convert.js var require_convert = __commonJS({ "node_modules/lodash/fp/convert.js"(exports, module) { var baseConvert = require_baseConvert(); var util = require_util2(); function convert(name, func, options) { return baseConvert(util, name, func, options); } module.exports = convert; } }); // node_modules/lodash/_createFlow.js var require_createFlow = __commonJS({ "node_modules/lodash/_createFlow.js"(exports, module) { var LodashWrapper = require_LodashWrapper(); var flatRest = require_flatRest(); var getData = require_getData(); var getFuncName = require_getFuncName(); var isArray = require_isArray(); var isLaziable = require_isLaziable(); var FUNC_ERROR_TEXT = "Expected a function"; var WRAP_CURRY_FLAG = 8; var WRAP_PARTIAL_FLAG = 32; var WRAP_ARY_FLAG = 128; var WRAP_REARG_FLAG = 256; function createFlow(fromRight) { return flatRest(function(funcs) { var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru; if (fromRight) { funcs.reverse(); } while (index--) { var func = funcs[index]; if (typeof func != "function") { throw new TypeError(FUNC_ERROR_TEXT); } if (prereq && !wrapper && getFuncName(func) == "wrapper") { var wrapper = new LodashWrapper([], true); } } index = wrapper ? index : length; while (++index < length) { func = funcs[index]; var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : void 0; if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) { wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); } else { wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func); } } return function() { var args = arguments, value = args[0]; if (wrapper && args.length == 1 && isArray(value)) { return wrapper.plant(value).value(); } var index2 = 0, result = length ? funcs[index2].apply(this, args) : value; while (++index2 < length) { result = funcs[index2].call(this, result); } return result; }; }); } module.exports = createFlow; } }); // node_modules/lodash/flow.js var require_flow = __commonJS({ "node_modules/lodash/flow.js"(exports, module) { var createFlow = require_createFlow(); var flow = createFlow(); module.exports = flow; } }); // node_modules/lodash/fp/flow.js var require_flow2 = __commonJS({ "node_modules/lodash/fp/flow.js"(exports, module) { var convert = require_convert(); var func = convert("flow", require_flow()); func.placeholder = require_placeholder(); module.exports = func; } }); // node_modules/lodash/fp/pipe.js var require_pipe = __commonJS({ "node_modules/lodash/fp/pipe.js"(exports, module) { module.exports = require_flow2(); } }); // node_modules/@strapi/admin/dist/admin/admin/src/utils/cookies.mjs var getCookieValue = (name) => { let result = null; const cookieArray = document.cookie.split(";"); cookieArray.forEach((cookie) => { const [key, value] = cookie.split("=").map((item) => item.trim()); if (key === name) { result = decodeURIComponent(value); } }); return result; }; var setCookie = (name, value, days) => { let expires = ""; document.cookie = `${name}=${encodeURIComponent(value)}; Path=/${expires}`; }; var deleteCookie = (name) => { document.cookie = `${name}=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;`; }; // node_modules/@strapi/admin/dist/admin/admin/src/utils/getFetchClient.mjs var import_pipe = __toESM(require_pipe(), 1); var import_qs = __toESM(require_lib(), 1); var STORAGE_KEYS = { TOKEN: "jwtToken", USER: "userInfo" }; var FetchError = class _FetchError extends Error { constructor(message, response) { var _a, _b, _c, _d; super(message); this.name = "FetchError"; this.message = message; this.response = response; this.code = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.error) == null ? void 0 : _b.status; this.status = (_d = (_c = response == null ? void 0 : response.data) == null ? void 0 : _c.error) == null ? void 0 : _d.status; if (Error.captureStackTrace) { Error.captureStackTrace(this, _FetchError); } } }; var isFetchError = (error) => { return error instanceof FetchError; }; var getToken = () => { const fromLocalStorage = localStorage.getItem(STORAGE_KEYS.TOKEN); if (fromLocalStorage) { return JSON.parse(fromLocalStorage); } const fromCookie = getCookieValue(STORAGE_KEYS.TOKEN); return fromCookie ?? null; }; var getFetchClient = (defaultOptions = {}) => { const backendURL = window.strapi.backendURL; const defaultHeader = { Accept: "application/json", "Content-Type": "application/json", Authorization: `Bearer ${getToken()}` }; const isFormDataRequest = (body) => body instanceof FormData; const addPrependingSlash = (url) => url.charAt(0) !== "/" ? `/${url}` : url; const hasProtocol = (url) => new RegExp("^(?:[a-z+]+:)?//", "i").test(url); const normalizeUrl = (url) => hasProtocol(url) ? url : addPrependingSlash(url); const responseInterceptor = async (response, validateStatus) => { try { const result = await response.json(); if (!response.ok && result.error && !(validateStatus == null ? void 0 : validateStatus(response.status))) { throw new FetchError(result.error.message, { data: result }); } if (!response.ok && !(validateStatus == null ? void 0 : validateStatus(response.status))) { throw new FetchError("Unknown Server Error"); } return { data: result }; } catch (error) { if (error instanceof SyntaxError && response.ok) { return { data: [], status: response.status }; } else { throw error; } } }; const paramsSerializer = (params) => (url) => { if (params) { if (typeof params === "string") { return `${url}?${params}`; } const serializedParams = import_qs.default.stringify(params, { encode: false }); return `${url}?${serializedParams}`; } return url; }; const addBaseUrl = (url) => { return `${backendURL}${url}`; }; const makeCreateRequestUrl = (options) => (0, import_pipe.default)(normalizeUrl, addBaseUrl, paramsSerializer(options == null ? void 0 : options.params)); const fetchClient = { get: async (url, options) => { const headers = new Headers({ ...defaultHeader, ...options == null ? void 0 : options.headers }); const createRequestUrl = makeCreateRequestUrl(options); const response = await fetch(createRequestUrl(url), { signal: (options == null ? void 0 : options.signal) ?? defaultOptions.signal, method: "GET", headers }); return responseInterceptor(response, options == null ? void 0 : options.validateStatus); }, post: async (url, data, options) => { const headers = new Headers({ ...defaultHeader, ...options == null ? void 0 : options.headers }); const createRequestUrl = makeCreateRequestUrl(options); if (isFormDataRequest(data)) { headers.delete("Content-Type"); } const response = await fetch(createRequestUrl(url), { signal: (options == null ? void 0 : options.signal) ?? defaultOptions.signal, method: "POST", headers, body: isFormDataRequest(data) ? data : JSON.stringify(data) }); return responseInterceptor(response, options == null ? void 0 : options.validateStatus); }, put: async (url, data, options) => { const headers = new Headers({ ...defaultHeader, ...options == null ? void 0 : options.headers }); const createRequestUrl = makeCreateRequestUrl(options); if (isFormDataRequest(data)) { headers.delete("Content-Type"); } const response = await fetch(createRequestUrl(url), { signal: (options == null ? void 0 : options.signal) ?? defaultOptions.signal, method: "PUT", headers, body: isFormDataRequest(data) ? data : JSON.stringify(data) }); return responseInterceptor(response, options == null ? void 0 : options.validateStatus); }, del: async (url, options) => { const headers = new Headers({ ...defaultHeader, ...options == null ? void 0 : options.headers }); const createRequestUrl = makeCreateRequestUrl(options); const response = await fetch(createRequestUrl(url), { signal: (options == null ? void 0 : options.signal) ?? defaultOptions.signal, method: "DELETE", headers }); return responseInterceptor(response, options == null ? void 0 : options.validateStatus); } }; return fetchClient; }; // node_modules/@strapi/admin/dist/admin/admin/src/utils/baseQuery.mjs var simpleQuery = async (query, { signal }) => { var _a, _b, _c, _d; try { const { get, post, del, put } = getFetchClient(); if (typeof query === "string") { const result = await get(query, { signal }); return { data: result.data }; } else { const { url, method = "GET", data, config } = query; if (method === "POST") { const result2 = await post(url, data, { ...config, signal }); return { data: result2.data }; } if (method === "DELETE") { const result2 = await del(url, { ...config, signal }); return { data: result2.data }; } if (method === "PUT") { const result2 = await put(url, data, { ...config, signal }); return { data: result2.data }; } const result = await get(url, { ...config, signal }); return { data: result.data }; } } catch (err) { if (isFetchError(err)) { if (typeof ((_a = err.response) == null ? void 0 : _a.data) === "object" && ((_b = err.response) == null ? void 0 : _b.data) !== null && "error" in ((_c = err.response) == null ? void 0 : _c.data)) { return { data: void 0, error: (_d = err.response) == null ? void 0 : _d.data.error }; } else { return { data: void 0, error: { name: "UnknownError", message: err.message, details: err.response, status: err.status } }; } } const error = err; return { data: void 0, error: { name: error.name, message: error.message, stack: error.stack } }; } }; var fetchBaseQuery = () => simpleQuery; var isBaseQueryError = (error) => { return error.name !== void 0; }; // node_modules/@reduxjs/toolkit/dist/query/rtk-query.esm.js var __generator = function(thisArg, body) { var _ = { label: 0, sent: function() { if (t2[0] & 1) throw t2[1]; return t2[1]; }, trys: [], ops: [] }, f, y, t2, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function(v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done) return t2; if (y = 0, t2) op = [op[0] & 2, t2.value]; switch (op[0]) { case 0: case 1: t2 = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t2[1]) { _.label = t2[1]; t2 = op; break; } if (t2 && _.label < t2[2]) { _.label = t2[2]; _.ops.push(op); break; } if (t2[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e2) { op = [6, e2]; y = 0; } finally { f = t2 = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; var __spreadArray = function(to, from) { for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) to[j] = from[i]; return to; }; var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = function(obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; }; var __spreadValues = function(a, b) { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var _j = 0, _k = __getOwnPropSymbols(b); _j < _k.length; _j++) { var prop = _k[_j]; if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var __spreadProps = function(a, b) { return __defProps(a, __getOwnPropDescs(b)); }; var __async = function(__this, __arguments, generator) { return new Promise(function(resolve, reject) { var fulfilled = function(value) { try { step(generator.next(value)); } catch (e2) { reject(e2); } }; var rejected = function(value) { try { step(generator.throw(value)); } catch (e2) { reject(e2); } }; var step = function(x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); }; step((generator = generator.apply(__this, __arguments)).next()); }); }; var QueryStatus; (function(QueryStatus2) { QueryStatus2["uninitialized"] = "uninitialized"; QueryStatus2["pending"] = "pending"; QueryStatus2["fulfilled"] = "fulfilled"; QueryStatus2["rejected"] = "rejected"; })(QueryStatus || (QueryStatus = {})); function getRequestStatusFlags(status) { return { status, isUninitialized: status === QueryStatus.uninitialized, isLoading: status === QueryStatus.pending, isSuccess: status === QueryStatus.fulfilled, isError: status === QueryStatus.rejected }; } var flatten = function(arr) { return [].concat.apply([], arr); }; function isOnline() { return typeof navigator === "undefined" ? true : navigator.onLine === void 0 ? true : navigator.onLine; } function isDocumentVisible() { if (typeof document === "undefined") { return true; } return document.visibilityState !== "hidden"; } var isPlainObject2 = isPlainObject; function copyWithStructuralSharing(oldObj, newObj) { if (oldObj === newObj || !(isPlainObject2(oldObj) && isPlainObject2(newObj) || Array.isArray(oldObj) && Array.isArray(newObj))) { return newObj; } var newKeys = Object.keys(newObj); var oldKeys = Object.keys(oldObj); var isSameObject = newKeys.length === oldKeys.length; var mergeObj = Array.isArray(newObj) ? [] : {}; for (var _j = 0, newKeys_1 = newKeys; _j < newKeys_1.length; _j++) { var key = newKeys_1[_j]; mergeObj[key] = copyWithStructuralSharing(oldObj[key], newObj[key]); if (isSameObject) isSameObject = oldObj[key] === mergeObj[key]; } return isSameObject ? oldObj : mergeObj; } var HandledError = ( /** @class */ /* @__PURE__ */ function() { function HandledError2(value, meta) { if (meta === void 0) { meta = void 0; } this.value = value; this.meta = meta; } return HandledError2; }() ); function defaultBackoff(attempt, maxRetries) { if (attempt === void 0) { attempt = 0; } if (maxRetries === void 0) { maxRetries = 5; } return __async(this, null, function() { var attempts, timeout; return __generator(this, function(_j) { switch (_j.label) { case 0: attempts = Math.min(attempt, maxRetries); timeout = ~~((Math.random() + 0.4) * (300 << attempts)); return [4, new Promise(function(resolve) { return setTimeout(function(res) { return resolve(res); }, timeout); })]; case 1: _j.sent(); return [ 2 /*return*/ ]; } }); }); } function fail(e2) { throw Object.assign(new HandledError({ error: e2 }), { throwImmediately: true }); } var EMPTY_OPTIONS = {}; var retryWithBackoff = function(baseQuery, defaultOptions) { return function(args, api, extraOptions) { return __async(void 0, null, function() { var possibleMaxRetries, maxRetries, defaultRetryCondition, options, retry2, result, e_3; return __generator(this, function(_j) { switch (_j.label) { case 0: possibleMaxRetries = [ 5, (defaultOptions || EMPTY_OPTIONS).maxRetries, (extraOptions || EMPTY_OPTIONS).maxRetries ].filter(function(x) { return x !== void 0; }); maxRetries = possibleMaxRetries.slice(-1)[0]; defaultRetryCondition = function(_, __, _j2) { var attempt = _j2.attempt; return attempt <= maxRetries; }; options = __spreadValues(__spreadValues({ maxRetries, backoff: defaultBackoff, retryCondition: defaultRetryCondition }, defaultOptions), extraOptions); retry2 = 0; _j.label = 1; case 1: if (false) return [3, 7]; _j.label = 2; case 2: _j.trys.push([2, 4, , 6]); return [4, baseQuery(args, api, extraOptions)]; case 3: result = _j.sent(); if (result.error) { throw new HandledError(result); } return [2, result]; case 4: e_3 = _j.sent(); retry2++; if (e_3.throwImmediately) { if (e_3 instanceof HandledError) { return [2, e_3.value]; } throw e_3; } if (e_3 instanceof HandledError && !options.retryCondition(e_3.value.error, args, { attempt: retry2, baseQueryApi: api, extraOptions })) { return [2, e_3.value]; } return [4, options.backoff(retry2, options.maxRetries)]; case 5: _j.sent(); return [3, 6]; case 6: return [3, 1]; case 7: return [ 2 /*return*/ ]; } }); }); }; }; var retry = Object.assign(retryWithBackoff, { fail }); var onFocus = createAction("__rtkq/focused"); var onFocusLost = createAction("__rtkq/unfocused"); var onOnline = createAction("__rtkq/online"); var onOffline = createAction("__rtkq/offline"); var DefinitionType; (function(DefinitionType22) { DefinitionType22["query"] = "query"; DefinitionType22["mutation"] = "mutation"; })(DefinitionType || (DefinitionType = {})); function isQueryDefinition(e2) { return e2.type === DefinitionType.query; } function isMutationDefinition(e2) { return e2.type === DefinitionType.mutation; } function calculateProvidedBy(description, result, error, queryArg, meta, assertTagTypes) { if (isFunction(description)) { return description(result, error, queryArg, meta).map(expandTagDescription).map(assertTagTypes); } if (Array.isArray(description)) { return description.map(expandTagDescription).map(assertTagTypes); } return []; } function isFunction(t2) { return typeof t2 === "function"; } function expandTagDescription(description) { return typeof description === "string" ? { type: description } : description; } function isNotNullish(v) { return v != null; } var forceQueryFnSymbol = Symbol("forceQueryFn"); var isUpsertQuery = function(arg) { return typeof arg[forceQueryFnSymbol] === "function"; }; function buildInitiate(_j) { var serializeQueryArgs = _j.serializeQueryArgs, queryThunk = _j.queryThunk, mutationThunk = _j.mutationThunk, api = _j.api, context = _j.context; var runningQueries = /* @__PURE__ */ new Map(); var runningMutations = /* @__PURE__ */ new Map(); var _k = api.internalActions, unsubscribeQueryResult = _k.unsubscribeQueryResult, removeMutationResult = _k.removeMutationResult, updateSubscriptionOptions = _k.updateSubscriptionOptions; return { buildInitiateQuery, buildInitiateMutation, getRunningQueryThunk, getRunningMutationThunk, getRunningQueriesThunk, getRunningMutationsThunk, getRunningOperationPromises, removalWarning }; function removalWarning() { throw new Error("This method had to be removed due to a conceptual bug in RTK.\n Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\n See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR."); } function getRunningOperationPromises() { if (typeof process !== "undefined" && true) { removalWarning(); } else { var extract = function(v) { return Array.from(v.values()).flatMap(function(queriesForStore) { return queriesForStore ? Object.values(queriesForStore) : []; }); }; return __spreadArray(__spreadArray([], extract(runningQueries)), extract(runningMutations)).filter(isNotNullish); } } function getRunningQueryThunk(endpointName, queryArgs) { return function(dispatch) { var _a; var endpointDefinition = context.endpointDefinitions[endpointName]; var queryCacheKey = serializeQueryArgs({ queryArgs, endpointDefinition, endpointName }); return (_a = runningQueries.get(dispatch)) == null ? void 0 : _a[queryCacheKey]; }; } function getRunningMutationThunk(_endpointName, fixedCacheKeyOrRequestId) { return function(dispatch) { var _a; return (_a = runningMutations.get(dispatch)) == null ? void 0 : _a[fixedCacheKeyOrRequestId]; }; } function getRunningQueriesThunk() { return function(dispatch) { return Object.values(runningQueries.get(dispatch) || {}).filter(isNotNullish); }; } function getRunningMutationsThunk() { return function(dispatch) { return Object.values(runningMutations.get(dispatch) || {}).filter(isNotNullish); }; } function middlewareWarning(dispatch) { if (true) { if (middlewareWarning.triggered) return; var registered = dispatch(api.internalActions.internal_probeSubscription({ queryCacheKey: "DOES_NOT_EXIST", requestId: "DUMMY_REQUEST_ID" })); middlewareWarning.triggered = true; if (typeof registered !== "boolean") { throw new Error('Warning: Middleware for RTK-Query API at reducerPath "' + api.reducerPath + '" has not been added to the store.\nYou must add the middleware for RTK-Query to function correctly!'); } } } function buildInitiateQuery(endpointName, endpointDefinition) { var queryAction = function(arg, _j2) { var _k2 = _j2 === void 0 ? {} : _j2, _l = _k2.subscribe, subscribe = _l === void 0 ? true : _l, forceRefetch = _k2.forceRefetch, subscriptionOptions = _k2.subscriptionOptions, _m = forceQueryFnSymbol, forceQueryFn = _k2[_m]; return function(dispatch, getState) { var _j3; var _a; var queryCacheKey = serializeQueryArgs({ queryArgs: arg, endpointDefinition, endpointName }); var thunk = queryThunk((_j3 = { type: "query", subscribe, forceRefetch, subscriptionOptions, endpointName, originalArgs: arg, queryCacheKey }, _j3[forceQueryFnSymbol] = forceQueryFn, _j3)); var selector = api.endpoints[endpointName].select(arg); var thunkResult = dispatch(thunk); var stateAfter = selector(getState()); middlewareWarning(dispatch); var requestId = thunkResult.requestId, abort = thunkResult.abort; var skippedSynchronously = stateAfter.requestId !== requestId; var runningQuery = (_a = runningQueries.get(dispatch)) == null ? void 0 : _a[queryCacheKey]; var selectFromState = function() { return selector(getState()); }; var statePromise = Object.assign(forceQueryFn ? thunkResult.then(selectFromState) : skippedSynchronously && !runningQuery ? Promise.resolve(stateAfter) : Promise.all([runningQuery, thunkResult]).then(selectFromState), { arg, requestId, subscriptionOptions, queryCacheKey, abort, unwrap: function() { return __async(this, null, function() { var result; return __generator(this, function(_j4) { switch (_j4.label) { case 0: return [4, statePromise]; case 1: result = _j4.sent(); if (result.isError) { throw result.error; } return [2, result.data]; } }); }); }, refetch: function() { return dispatch(queryAction(arg, { subscribe: false, forceRefetch: true })); }, unsubscribe: function() { if (subscribe) dispatch(unsubscribeQueryResult({ queryCacheKey, requestId })); }, updateSubscriptionOptions: function(options) { statePromise.subscriptionOptions = options; dispatch(updateSubscriptionOptions({ endpointName, requestId, queryCacheKey, options })); } }); if (!runningQuery && !skippedSynchronously && !forceQueryFn) { var running_1 = runningQueries.get(dispatch) || {}; running_1[queryCacheKey] = statePromise; runningQueries.set(dispatch, running_1); statePromise.then(function() { delete running_1[queryCacheKey]; if (!Object.keys(running_1).length) { runningQueries.delete(dispatch); } }); } return statePromise; }; }; return queryAction; } function buildInitiateMutation(endpointName) { return function(arg, _j2) { var _k2 = _j2 === void 0 ? {} : _j2, _l = _k2.track, track = _l === void 0 ? true : _l, fixedCacheKey = _k2.fixedCacheKey; return function(dispatch, getState) { var thunk = mutationThunk({ type: "mutation", endpointName, originalArgs: arg, track, fixedCacheKey }); var thunkResult = dispatch(thunk); middlewareWarning(dispatch); var requestId = thunkResult.requestId, abort = thunkResult.abort, unwrap = thunkResult.unwrap; var returnValuePromise = thunkResult.unwrap().then(function(data) { return { data }; }).catch(function(error) { return { error }; }); var reset = function() { dispatch(removeMutationResult({ requestId, fixedCacheKey })); }; var ret = Object.assign(returnValuePromise, { arg: thunkResult.arg, requestId, abort, unwrap, unsubscribe: reset, reset }); var running = runningMutations.get(dispatch) || {}; runningMutations.set(dispatch, running); running[requestId] = ret; ret.then(function() { delete running[requestId]; if (!Object.keys(running).length) { runningMutations.delete(dispatch); } }); if (fixedCacheKey) { running[fixedCacheKey] = ret; ret.then(function() { if (running[fixedCacheKey] === ret) { delete running[fixedCacheKey]; if (!Object.keys(running).length) { runningMutations.delete(dispatch); } } }); } return ret; }; }; } } function defaultTransformResponse(baseQueryReturnValue) { return baseQueryReturnValue; } function buildThunks(_j) { var _this = this; var reducerPath = _j.reducerPath, baseQuery = _j.baseQuery, endpointDefinitions = _j.context.endpointDefinitions, serializeQueryArgs = _j.serializeQueryArgs, api = _j.api, assertTagType = _j.assertTagType; var patchQueryData = function(endpointName, args, patches, updateProvided) { return function(dispatch, getState) { var endpointDefinition = endpointDefinitions[endpointName]; var queryCacheKey = serializeQueryArgs({ queryArgs: args, endpointDefinition, endpointName }); dispatch(api.internalActions.queryResultPatched({ queryCacheKey, patches })); if (!updateProvided) { return; } var newValue = api.endpoints[endpointName].select(args)(getState()); var providedTags = calculateProvidedBy(endpointDefinition.providesTags, newValue.data, void 0, args, {}, assertTagType); dispatch(api.internalActions.updateProvidedBy({ queryCacheKey, providedTags })); }; }; var updateQueryData = function(endpointName, args, updateRecipe, updateProvided) { if (updateProvided === void 0) { updateProvided = true; } return function(dispatch, getState) { var _j2, _k; var endpointDefinition = api.endpoints[endpointName]; var currentState = endpointDefinition.select(args)(getState()); var ret = { patches: [], inversePatches: [], undo: function() { return dispatch(api.util.patchQueryData(endpointName, args, ret.inversePatches, updateProvided)); } }; if (currentState.status === QueryStatus.uninitialized) { return ret; } var newValue; if ("data" in currentState) { if (t(currentState.data)) { var _l = cn(currentState.data, updateRecipe), value = _l[0], patches = _l[1], inversePatches = _l[2]; (_j2 = ret.patches).push.apply(_j2, patches); (_k = ret.inversePatches).push.apply(_k, inversePatches); newValue = value; } else { newValue = updateRecipe(currentState.data); ret.patches.push({ op: "replace", path: [], value: newValue }); ret.inversePatches.push({ op: "replace", path: [], value: currentState.data }); } } dispatch(api.util.patchQueryData(endpointName, args, ret.patches, updateProvided)); return ret; }; }; var upsertQueryData = function(endpointName, args, value) { return function(dispatch) { var _j2; return dispatch(api.endpoints[endpointName].initiate(args, (_j2 = { subscribe: false, forceRefetch: true }, _j2[forceQueryFnSymbol] = function() { return { data: value }; }, _j2))); }; }; var executeEndpoint = function(_0, _1) { return __async(_this, [_0, _1], function(arg, _j2) { var endpointDefinition, transformResponse, result, baseQueryApi_1, forceQueryFn, what, err, _k, _l, key, _m, error_1, catchedError, transformErrorResponse, _o, e_4; var _p, _q; var signal = _j2.signal, abort = _j2.abort, rejectWithValue = _j2.rejectWithValue, fulfillWithValue = _j2.fulfillWithValue, dispatch = _j2.dispatch, getState = _j2.getState, extra = _j2.extra; return __generator(this, function(_r) { switch (_r.label) { case 0: endpointDefinition = endpointDefinitions[arg.endpointName]; _r.label = 1; case 1: _r.trys.push([1, 8, , 13]); transformResponse = defaultTransformResponse; result = void 0; baseQueryApi_1 = { signal, abort, dispatch, getState, extra, endpoint: arg.endpointName, type: arg.type, forced: arg.type === "query" ? isForcedQuery(arg, getState()) : void 0 }; forceQueryFn = arg.type === "query" ? arg[forceQueryFnSymbol] : void 0; if (!forceQueryFn) return [3, 2]; result = forceQueryFn(); return [3, 6]; case 2: if (!endpointDefinition.query) return [3, 4]; return [4, baseQuery(endpointDefinition.query(arg.originalArgs), baseQueryApi_1, endpointDefinition.extraOptions)]; case 3: result = _r.sent(); if (endpointDefinition.transformResponse) { transformResponse = endpointDefinition.transformResponse; } return [3, 6]; case 4: return [4, endpointDefinition.queryFn(arg.originalArgs, baseQueryApi_1, endpointDefinition.extraOptions, function(arg2) { return baseQuery(arg2, baseQueryApi_1, endpointDefinition.extraOptions); })]; case 5: result = _r.sent(); _r.label = 6; case 6: if (typeof process !== "undefined" && true) { what = endpointDefinition.query ? "`baseQuery`" : "`queryFn`"; err = void 0; if (!result) { err = what + " did not return anything."; } else if (typeof result !== "object") { err = what + " did not return an object."; } else if (result.error && result.data) { err = what + " returned an object containing both `error` and `result`."; } else if (result.error === void 0 && result.data === void 0) { err = what + " returned an object containing neither a valid `error` and `result`. At least one of them should not be `undefined`"; } else { for (_k = 0, _l = Object.keys(result); _k < _l.length; _k++) { key = _l[_k]; if (key !== "error" && key !== "data" && key !== "meta") { err = "The object returned by " + what + " has the unknown property " + key + "."; break; } } } if (err) { console.error("Error encountered handling the endpoint " + arg.endpointName + ".\n " + err + "\n It needs to return an object with either the shape `{ data: }` or `{ error: }` that may contain an optional `meta` property.\n Object returned was:", result); } } if (result.error) throw new HandledError(result.error, result.meta); _m = fulfillWithValue; return [4, transformResponse(result.data, result.meta, arg.originalArgs)]; case 7: return [2, _m.apply(void 0, [_r.sent(), (_p = { fulfilledTimeStamp: Date.now(), baseQueryMeta: result.meta }, _p[SHOULD_AUTOBATCH] = true, _p)])]; case 8: error_1 = _r.sent(); catchedError = error_1; if (!(catchedError instanceof HandledError)) return [3, 12]; transformErrorResponse = defaultTransformResponse; if (endpointDefinition.query && endpointDefinition.transformErrorResponse) { transformErrorResponse = endpointDefinition.transformErrorResponse; } _r.label = 9; case 9: _r.trys.push([9, 11, , 12]); _o = rejectWithValue; return [4, transformErrorResponse(catchedError.value, catchedError.meta, arg.originalArgs)]; case 10: return [2, _o.apply(void 0, [_r.sent(), (_q = { baseQueryMeta: catchedError.meta }, _q[SHOULD_AUTOBATCH] = true, _q)])]; case 11: e_4 = _r.sent(); catchedError = e_4; return [3, 12]; case 12: if (typeof process !== "undefined" && true) { console.error('An unhandled error occurred processing a request for the endpoint "' + arg.endpointName + '".\nIn the case of an unhandled error, no tags will be "provided" or "invalidated".', catchedError); } else { console.error(catchedError); } throw catchedError; case 13: return [ 2 /*return*/ ]; } }); }); }; function isForcedQuery(arg, state) { var _a, _b, _c, _d; var requestState = (_b = (_a = state[reducerPath]) == null ? void 0 : _a.queries) == null ? void 0 : _b[arg.queryCacheKey]; var baseFetchOnMountOrArgChange = (_c = state[reducerPath]) == null ? void 0 : _c.config.refetchOnMountOrArgChange; var fulfilledVal = requestState == null ? void 0 : requestState.fulfilledTimeStamp; var refetchVal = (_d = arg.forceRefetch) != null ? _d : arg.subscribe && baseFetchOnMountOrArgChange; if (refetchVal) { return refetchVal === true || (Number(/* @__PURE__ */ new Date()) - Number(fulfilledVal)) / 1e3 >= refetchVal; } return false; } var queryThunk = createAsyncThunk(reducerPath + "/executeQuery", executeEndpoint, { getPendingMeta: function() { var _j2; return _j2 = { startedTimeStamp: Date.now() }, _j2[SHOULD_AUTOBATCH] = true, _j2; }, condition: function(queryThunkArgs, _j2) { var getState = _j2.getState; var _a, _b, _c; var state = getState(); var requestState = (_b = (_a = state[reducerPath]) == null ? void 0 : _a.queries) == null ? void 0 : _b[queryThunkArgs.queryCacheKey]; var fulfilledVal = requestState == null ? void 0 : requestState.fulfilledTimeStamp; var currentArg = queryThunkArgs.originalArgs; var previousArg = requestState == null ? void 0 : requestState.originalArgs; var endpointDefinition = endpointDefinitions[queryThunkArgs.endpointName]; if (isUpsertQuery(queryThunkArgs)) { return true; } if ((requestState == null ? void 0 : requestState.status) === "pending") { return false; } if (isForcedQuery(queryThunkArgs, state)) { return true; } if (isQueryDefinition(endpointDefinition) && ((_c = endpointDefinition == null ? void 0 : endpointDefinition.forceRefetch) == null ? void 0 : _c.call(endpointDefinition, { currentArg, previousArg, endpointState: requestState, state }))) { return true; } if (fulfilledVal) { return false; } return true; }, dispatchConditionRejection: true }); var mutationThunk = createAsyncThunk(reducerPath + "/executeMutation", executeEndpoint, { getPendingMeta: function() { var _j2; return _j2 = { startedTimeStamp: Date.now() }, _j2[SHOULD_AUTOBATCH] = true, _j2; } }); var hasTheForce = function(options) { return "force" in options; }; var hasMaxAge = function(options) { return "ifOlderThan" in options; }; var prefetch = function(endpointName, arg, options) { return function(dispatch, getState) { var force = hasTheForce(options) && options.force; var maxAge = hasMaxAge(options) && options.ifOlderThan; var queryAction = function(force2) { if (force2 === void 0) { force2 = true; } return api.endpoints[endpointName].initiate(arg, { forceRefetch: force2 }); }; var latestStateValue = api.endpoints[endpointName].select(arg)(getState()); if (force) { dispatch(queryAction()); } else if (maxAge) { var lastFulfilledTs = latestStateValue == null ? void 0 : latestStateValue.fulfilledTimeStamp; if (!lastFulfilledTs) { dispatch(queryAction()); return; } var shouldRetrigger = (Number(/* @__PURE__ */ new Date()) - Number(new Date(lastFulfilledTs))) / 1e3 >= maxAge; if (shouldRetrigger) { dispatch(queryAction()); } } else { dispatch(queryAction(false)); } }; }; function matchesEndpoint(endpointName) { return function(action) { var _a, _b; return ((_b = (_a = action == null ? void 0 : action.meta) == null ? void 0 : _a.arg) == null ? void 0 : _b.endpointName) === endpointName; }; } function buildMatchThunkActions(thunk, endpointName) { return { matchPending: isAllOf(isPending(thunk), matchesEndpoint(endpointName)), matchFulfilled: isAllOf(isFulfilled(thunk), matchesEndpoint(endpointName)), matchRejected: isAllOf(isRejected(thunk), matchesEndpoint(endpointName)) }; } return { queryThunk, mutationThunk, prefetch, updateQueryData, upsertQueryData, patchQueryData, buildMatchThunkActions }; } function calculateProvidedByThunk(action, type, endpointDefinitions, assertTagType) { return calculateProvidedBy(endpointDefinitions[action.meta.arg.endpointName][type], isFulfilled(action) ? action.payload : void 0, isRejectedWithValue(action) ? action.payload : void 0, action.meta.arg.originalArgs, "baseQueryMeta" in action.meta ? action.meta.baseQueryMeta : void 0, assertTagType); } function updateQuerySubstateIfExists(state, queryCacheKey, update) { var substate = state[queryCacheKey]; if (substate) { update(substate); } } function getMutationCacheKey(id) { var _a; return (_a = "arg" in id ? id.arg.fixedCacheKey : id.fixedCacheKey) != null ? _a : id.requestId; } function updateMutationSubstateIfExists(state, id, update) { var substate = state[getMutationCacheKey(id)]; if (substate) { update(substate); } } var initialState = {}; function buildSlice(_j) { var reducerPath = _j.reducerPath, queryThunk = _j.queryThunk, mutationThunk = _j.mutationThunk, _k = _j.context, definitions = _k.endpointDefinitions, apiUid = _k.apiUid, extractRehydrationInfo = _k.extractRehydrationInfo, hasRehydrationInfo = _k.hasRehydrationInfo, assertTagType = _j.assertTagType, config = _j.config; var resetApiState = createAction(reducerPath + "/resetApiState"); var querySlice = createSlice({ name: reducerPath + "/queries", initialState, reducers: { removeQueryResult: { reducer: function(draft, _j2) { var queryCacheKey = _j2.payload.queryCacheKey; delete draft[queryCacheKey]; }, prepare: prepareAutoBatched() }, queryResultPatched: { reducer: function(draft, _j2) { var _k2 = _j2.payload, queryCacheKey = _k2.queryCacheKey, patches = _k2.patches; updateQuerySubstateIfExists(draft, queryCacheKey, function(substate) { substate.data = pn(substate.data, patches.concat()); }); }, prepare: prepareAutoBatched() } }, extraReducers: function(builder) { builder.addCase(queryThunk.pending, function(draft, _j2) { var meta = _j2.meta, arg = _j2.meta.arg; var _a, _b; var upserting = isUpsertQuery(arg); if (arg.subscribe || upserting) { (_b = draft[_a = arg.queryCacheKey]) != null ? _b : draft[_a] = { status: QueryStatus.uninitialized, endpointName: arg.endpointName }; } updateQuerySubstateIfExists(draft, arg.queryCacheKey, function(substate) { substate.status = QueryStatus.pending; substate.requestId = upserting && substate.requestId ? substate.requestId : meta.requestId; if (arg.originalArgs !== void 0) { substate.originalArgs = arg.originalArgs; } substate.startedTimeStamp = meta.startedTimeStamp; }); }).addCase(queryThunk.fulfilled, function(draft, _j2) { var meta = _j2.meta, payload = _j2.payload; updateQuerySubstateIfExists(draft, meta.arg.queryCacheKey, function(substate) { var _a; if (substate.requestId !== meta.requestId && !isUpsertQuery(meta.arg)) return; var merge = definitions[meta.arg.endpointName].merge; substate.status = QueryStatus.fulfilled; if (merge) { if (substate.data !== void 0) { var fulfilledTimeStamp_1 = meta.fulfilledTimeStamp, arg_1 = meta.arg, baseQueryMeta_1 = meta.baseQueryMeta, requestId_1 = meta.requestId; var newData = immer_esm_default(substate.data, function(draftSubstateData) { return merge(draftSubstateData, payload, { arg: arg_1.originalArgs, baseQueryMeta: baseQueryMeta_1, fulfilledTimeStamp: fulfilledTimeStamp_1, requestId: requestId_1 }); }); substate.data = newData; } else { substate.data = payload; } } else { substate.data = ((_a = definitions[meta.arg.endpointName].structuralSharing) != null ? _a : true) ? copyWithStructuralSharing(r(substate.data) ? e(substate.data) : substate.data, payload) : payload; } delete substate.error; substate.fulfilledTimeStamp = meta.fulfilledTimeStamp; }); }).addCase(queryThunk.rejected, function(draft, _j2) { var _k2 = _j2.meta, condition = _k2.condition, arg = _k2.arg, requestId = _k2.requestId, error = _j2.error, payload = _j2.payload; updateQuerySubstateIfExists(draft, arg.queryCacheKey, function(substate) { if (condition) { } else { if (substate.requestId !== requestId) return; substate.status = QueryStatus.rejected; substate.error = payload != null ? payload : error; } }); }).addMatcher(hasRehydrationInfo, function(draft, action) { var queries = extractRehydrationInfo(action).queries; for (var _j2 = 0, _k2 = Object.entries(queries); _j2 < _k2.length; _j2++) { var _l = _k2[_j2], key = _l[0], entry = _l[1]; if ((entry == null ? void 0 : entry.status) === QueryStatus.fulfilled || (entry == null ? void 0 : entry.status) === QueryStatus.rejected) { draft[key] = entry; } } }); } }); var mutationSlice = createSlice({ name: reducerPath + "/mutations", initialState, reducers: { removeMutationResult: { reducer: function(draft, _j2) { var payload = _j2.payload; var cacheKey = getMutationCacheKey(payload); if (cacheKey in draft) { delete draft[cacheKey]; } }, prepare: prepareAutoBatched() } }, extraReducers: function(builder) { builder.addCase(mutationThunk.pending, function(draft, _j2) { var meta = _j2.meta, _k2 = _j2.meta, requestId = _k2.requestId, arg = _k2.arg, startedTimeStamp = _k2.startedTimeStamp; if (!arg.track) return; draft[getMutationCacheKey(meta)] = { requestId, status: QueryStatus.pending, endpointName: arg.endpointName, startedTimeStamp }; }).addCase(mutationThunk.fulfilled, function(draft, _j2) { var payload = _j2.payload, meta = _j2.meta; if (!meta.arg.track) return; updateMutationSubstateIfExists(draft, meta, function(substate) { if (substate.requestId !== meta.requestId) return; substate.status = QueryStatus.fulfilled; substate.data = payload; substate.fulfilledTimeStamp = meta.fulfilledTimeStamp; }); }).addCase(mutationThunk.rejected, function(draft, _j2) { var payload = _j2.payload, error = _j2.error, meta = _j2.meta; if (!meta.arg.track) return; updateMutationSubstateIfExists(draft, meta, function(substate) { if (substate.requestId !== meta.requestId) return; substate.status = QueryStatus.rejected; substate.error = payload != null ? payload : error; }); }).addMatcher(hasRehydrationInfo, function(draft, action) { var mutations = extractRehydrationInfo(action).mutations; for (var _j2 = 0, _k2 = Object.entries(mutations); _j2 < _k2.length; _j2++) { var _l = _k2[_j2], key = _l[0], entry = _l[1]; if (((entry == null ? void 0 : entry.status) === QueryStatus.fulfilled || (entry == null ? void 0 : entry.status) === QueryStatus.rejected) && key !== (entry == null ? void 0 : entry.requestId)) { draft[key] = entry; } } }); } }); var invalidationSlice = createSlice({ name: reducerPath + "/invalidation", initialState, reducers: { updateProvidedBy: { reducer: function(draft, action) { var _a, _b, _c, _d; var _j2 = action.payload, queryCacheKey = _j2.queryCacheKey, providedTags = _j2.providedTags; for (var _k2 = 0, _l = Object.values(draft); _k2 < _l.length; _k2++) { var tagTypeSubscriptions = _l[_k2]; for (var _m = 0, _o = Object.values(tagTypeSubscriptions); _m < _o.length; _m++) { var idSubscriptions = _o[_m]; var foundAt = idSubscriptions.indexOf(queryCacheKey); if (foundAt !== -1) { idSubscriptions.splice(foundAt, 1); } } } for (var _p = 0, providedTags_1 = providedTags; _p < providedTags_1.length; _p++) { var _q = providedTags_1[_p], type = _q.type, id = _q.id; var subscribedQueries = (_d = (_b = (_a = draft[type]) != null ? _a : draft[type] = {})[_c = id || "__internal_without_id"]) != null ? _d : _b[_c] = []; var alreadySubscribed = subscribedQueries.includes(queryCacheKey); if (!alreadySubscribed) { subscribedQueries.push(queryCacheKey); } } }, prepare: prepareAutoBatched() } }, extraReducers: function(builder) { builder.addCase(querySlice.actions.removeQueryResult, function(draft, _j2) { var queryCacheKey = _j2.payload.queryCacheKey; for (var _k2 = 0, _l = Object.values(draft); _k2 < _l.length; _k2++) { var tagTypeSubscriptions = _l[_k2]; for (var _m = 0, _o = Object.values(tagTypeSubscriptions); _m < _o.length; _m++) { var idSubscriptions = _o[_m]; var foundAt = idSubscriptions.indexOf(queryCacheKey); if (foundAt !== -1) { idSubscriptions.splice(foundAt, 1); } } } }).addMatcher(hasRehydrationInfo, function(draft, action) { var _a, _b, _c, _d; var provided = extractRehydrationInfo(action).provided; for (var _j2 = 0, _k2 = Object.entries(provided); _j2 < _k2.length; _j2++) { var _l = _k2[_j2], type = _l[0], incomingTags = _l[1]; for (var _m = 0, _o = Object.entries(incomingTags); _m < _o.length; _m++) { var _p = _o[_m], id = _p[0], cacheKeys = _p[1]; var subscribedQueries = (_d = (_b = (_a = draft[type]) != null ? _a : draft[type] = {})[_c = id || "__internal_without_id"]) != null ? _d : _b[_c] = []; for (var _q = 0, cacheKeys_1 = cacheKeys; _q < cacheKeys_1.length; _q++) { var queryCacheKey = cacheKeys_1[_q]; var alreadySubscribed = subscribedQueries.includes(queryCacheKey); if (!alreadySubscribed) { subscribedQueries.push(queryCacheKey); } } } } }).addMatcher(isAnyOf(isFulfilled(queryThunk), isRejectedWithValue(queryThunk)), function(draft, action) { var providedTags = calculateProvidedByThunk(action, "providesTags", definitions, assertTagType); var queryCacheKey = action.meta.arg.queryCacheKey; invalidationSlice.caseReducers.updateProvidedBy(draft, invalidationSlice.actions.updateProvidedBy({ queryCacheKey, providedTags })); }); } }); var subscriptionSlice = createSlice({ name: reducerPath + "/subscriptions", initialState, reducers: { updateSubscriptionOptions: function(d, a) { }, unsubscribeQueryResult: function(d, a) { }, internal_probeSubscription: function(d, a) { } } }); var internalSubscriptionsSlice = createSlice({ name: reducerPath + "/internalSubscriptions", initialState, reducers: { subscriptionsUpdated: { reducer: function(state, action) { return pn(state, action.payload); }, prepare: prepareAutoBatched() } } }); var configSlice = createSlice({ name: reducerPath + "/config", initialState: __spreadValues({ online: isOnline(), focused: isDocumentVisible(), middlewareRegistered: false }, config), reducers: { middlewareRegistered: function(state, _j2) { var payload = _j2.payload; state.middlewareRegistered = state.middlewareRegistered === "conflict" || apiUid !== payload ? "conflict" : true; } }, extraReducers: function(builder) { builder.addCase(onOnline, function(state) { state.online = true; }).addCase(onOffline, function(state) { state.online = false; }).addCase(onFocus, function(state) { state.focused = true; }).addCase(onFocusLost, function(state) { state.focused = false; }).addMatcher(hasRehydrationInfo, function(draft) { return __spreadValues({}, draft); }); } }); var combinedReducer = combineReducers({ queries: querySlice.reducer, mutations: mutationSlice.reducer, provided: invalidationSlice.reducer, subscriptions: internalSubscriptionsSlice.reducer, config: configSlice.reducer }); var reducer = function(state, action) { return combinedReducer(resetApiState.match(action) ? void 0 : state, action); }; var actions = __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, configSlice.actions), querySlice.actions), subscriptionSlice.actions), internalSubscriptionsSlice.actions), mutationSlice.actions), invalidationSlice.actions), { unsubscribeMutationResult: mutationSlice.actions.removeMutationResult, resetApiState }); return { reducer, actions }; } var skipToken = Symbol.for("RTKQ/skipToken"); var initialSubState = { status: QueryStatus.uninitialized }; var defaultQuerySubState = immer_esm_default(initialSubState, function() { }); var defaultMutationSubState = immer_esm_default(initialSubState, function() { }); function buildSelectors(_j) { var serializeQueryArgs = _j.serializeQueryArgs, reducerPath = _j.reducerPath; var selectSkippedQuery = function(state) { return defaultQuerySubState; }; var selectSkippedMutation = function(state) { return defaultMutationSubState; }; return { buildQuerySelector, buildMutationSelector, selectInvalidatedBy }; function withRequestFlags(substate) { return __spreadValues(__spreadValues({}, substate), getRequestStatusFlags(substate.status)); } function selectInternalState(rootState) { var state = rootState[reducerPath]; if (true) { if (!state) { if (selectInternalState.triggered) return state; selectInternalState.triggered = true; console.error("Error: No data found at `state." + reducerPath + "`. Did you forget to add the reducer to the store?"); } } return state; } function buildQuerySelector(endpointName, endpointDefinition) { return function(queryArgs) { var serializedArgs = serializeQueryArgs({ queryArgs, endpointDefinition, endpointName }); var selectQuerySubstate = function(state) { var _a, _b, _c; return (_c = (_b = (_a = selectInternalState(state)) == null ? void 0 : _a.queries) == null ? void 0 : _b[serializedArgs]) != null ? _c : defaultQuerySubState; }; var finalSelectQuerySubState = queryArgs === skipToken ? selectSkippedQuery : selectQuerySubstate; return createSelector(finalSelectQuerySubState, withRequestFlags); }; } function buildMutationSelector() { return function(id) { var _a; var mutationId; if (typeof id === "object") { mutationId = (_a = getMutationCacheKey(id)) != null ? _a : skipToken; } else { mutationId = id; } var selectMutationSubstate = function(state) { var _a2, _b, _c; return (_c = (_b = (_a2 = selectInternalState(state)) == null ? void 0 : _a2.mutations) == null ? void 0 : _b[mutationId]) != null ? _c : defaultMutationSubState; }; var finalSelectMutationSubstate = mutationId === skipToken ? selectSkippedMutation : selectMutationSubstate; return createSelector(finalSelectMutationSubstate, withRequestFlags); }; } function selectInvalidatedBy(state, tags) { var _a; var apiState = state[reducerPath]; var toInvalidate = /* @__PURE__ */ new Set(); for (var _j2 = 0, _k = tags.map(expandTagDescription); _j2 < _k.length; _j2++) { var tag = _k[_j2]; var provided = apiState.provided[tag.type]; if (!provided) { continue; } var invalidateSubscriptions = (_a = tag.id !== void 0 ? provided[tag.id] : flatten(Object.values(provided))) != null ? _a : []; for (var _l = 0, invalidateSubscriptions_1 = invalidateSubscriptions; _l < invalidateSubscriptions_1.length; _l++) { var invalidate = invalidateSubscriptions_1[_l]; toInvalidate.add(invalidate); } } return flatten(Array.from(toInvalidate.values()).map(function(queryCacheKey) { var querySubState = apiState.queries[queryCacheKey]; return querySubState ? [ { queryCacheKey, endpointName: querySubState.endpointName, originalArgs: querySubState.originalArgs } ] : []; })); } } var cache = WeakMap ? /* @__PURE__ */ new WeakMap() : void 0; var defaultSerializeQueryArgs = function(_j) { var endpointName = _j.endpointName, queryArgs = _j.queryArgs; var serialized = ""; var cached = cache == null ? void 0 : cache.get(queryArgs); if (typeof cached === "string") { serialized = cached; } else { var stringified = JSON.stringify(queryArgs, function(key, value) { return isPlainObject(value) ? Object.keys(value).sort().reduce(function(acc, key2) { acc[key2] = value[key2]; return acc; }, {}) : value; }); if (isPlainObject(queryArgs)) { cache == null ? void 0 : cache.set(queryArgs, stringified); } serialized = stringified; } return endpointName + "(" + serialized + ")"; }; function buildCreateApi() { var modules = []; for (var _j = 0; _j < arguments.length; _j++) { modules[_j] = arguments[_j]; } return function baseCreateApi(options) { var extractRehydrationInfo = defaultMemoize(function(action) { var _a, _b; return (_b = options.extractRehydrationInfo) == null ? void 0 : _b.call(options, action, { reducerPath: (_a = options.reducerPath) != null ? _a : "api" }); }); var optionsWithDefaults = __spreadProps(__spreadValues({ reducerPath: "api", keepUnusedDataFor: 60, refetchOnMountOrArgChange: false, refetchOnFocus: false, refetchOnReconnect: false }, options), { extractRehydrationInfo, serializeQueryArgs: function(queryArgsApi) { var finalSerializeQueryArgs = defaultSerializeQueryArgs; if ("serializeQueryArgs" in queryArgsApi.endpointDefinition) { var endpointSQA_1 = queryArgsApi.endpointDefinition.serializeQueryArgs; finalSerializeQueryArgs = function(queryArgsApi2) { var initialResult = endpointSQA_1(queryArgsApi2); if (typeof initialResult === "string") { return initialResult; } else { return defaultSerializeQueryArgs(__spreadProps(__spreadValues({}, queryArgsApi2), { queryArgs: initialResult })); } }; } else if (options.serializeQueryArgs) { finalSerializeQueryArgs = options.serializeQueryArgs; } return finalSerializeQueryArgs(queryArgsApi); }, tagTypes: __spreadArray([], options.tagTypes || []) }); var context = { endpointDefinitions: {}, batch: function(fn) { fn(); }, apiUid: nanoid(), extractRehydrationInfo, hasRehydrationInfo: defaultMemoize(function(action) { return extractRehydrationInfo(action) != null; }) }; var api = { injectEndpoints, enhanceEndpoints: function(_j2) { var addTagTypes = _j2.addTagTypes, endpoints = _j2.endpoints; if (addTagTypes) { for (var _k = 0, addTagTypes_1 = addTagTypes; _k < addTagTypes_1.length; _k++) { var eT = addTagTypes_1[_k]; if (!optionsWithDefaults.tagTypes.includes(eT)) { ; optionsWithDefaults.tagTypes.push(eT); } } } if (endpoints) { for (var _l = 0, _m = Object.entries(endpoints); _l < _m.length; _l++) { var _o = _m[_l], endpointName = _o[0], partialDefinition = _o[1]; if (typeof partialDefinition === "function") { partialDefinition(context.endpointDefinitions[endpointName]); } else { Object.assign(context.endpointDefinitions[endpointName] || {}, partialDefinition); } } } return api; } }; var initializedModules = modules.map(function(m) { return m.init(api, optionsWithDefaults, context); }); function injectEndpoints(inject) { var evaluatedEndpoints = inject.endpoints({ query: function(x) { return __spreadProps(__spreadValues({}, x), { type: DefinitionType.query }); }, mutation: function(x) { return __spreadProps(__spreadValues({}, x), { type: DefinitionType.mutation }); } }); for (var _j2 = 0, _k = Object.entries(evaluatedEndpoints); _j2 < _k.length; _j2++) { var _l = _k[_j2], endpointName = _l[0], definition = _l[1]; if (!inject.overrideExisting && endpointName in context.endpointDefinitions) { if (typeof process !== "undefined" && true) { console.error("called `injectEndpoints` to override already-existing endpointName " + endpointName + " without specifying `overrideExisting: true`"); } continue; } context.endpointDefinitions[endpointName] = definition; for (var _m = 0, initializedModules_1 = initializedModules; _m < initializedModules_1.length; _m++) { var m = initializedModules_1[_m]; m.injectEndpoint(endpointName, definition); } } return api; } return api.injectEndpoints({ endpoints: options.endpoints }); }; } function isObjectEmpty(obj) { for (var k in obj) { return false; } return true; } var THIRTY_TWO_BIT_MAX_TIMER_SECONDS = 2147483647 / 1e3 - 1; var buildCacheCollectionHandler = function(_j) { var reducerPath = _j.reducerPath, api = _j.api, context = _j.context, internalState = _j.internalState; var _k = api.internalActions, removeQueryResult = _k.removeQueryResult, unsubscribeQueryResult = _k.unsubscribeQueryResult; function anySubscriptionsRemainingForKey(queryCacheKey) { var subscriptions = internalState.currentSubscriptions[queryCacheKey]; return !!subscriptions && !isObjectEmpty(subscriptions); } var currentRemovalTimeouts = {}; var handler = function(action, mwApi, internalState2) { var _a; if (unsubscribeQueryResult.match(action)) { var state = mwApi.getState()[reducerPath]; var queryCacheKey = action.payload.queryCacheKey; handleUnsubscribe(queryCacheKey, (_a = state.queries[queryCacheKey]) == null ? void 0 : _a.endpointName, mwApi, state.config); } if (api.util.resetApiState.match(action)) { for (var _j2 = 0, _k2 = Object.entries(currentRemovalTimeouts); _j2 < _k2.length; _j2++) { var _l = _k2[_j2], key = _l[0], timeout = _l[1]; if (timeout) clearTimeout(timeout); delete currentRemovalTimeouts[key]; } } if (context.hasRehydrationInfo(action)) { var state = mwApi.getState()[reducerPath]; var queries = context.extractRehydrationInfo(action).queries; for (var _m = 0, _o = Object.entries(queries); _m < _o.length; _m++) { var _p = _o[_m], queryCacheKey = _p[0], queryState = _p[1]; handleUnsubscribe(queryCacheKey, queryState == null ? void 0 : queryState.endpointName, mwApi, state.config); } } }; function handleUnsubscribe(queryCacheKey, endpointName, api2, config) { var _a; var endpointDefinition = context.endpointDefinitions[endpointName]; var keepUnusedDataFor = (_a = endpointDefinition == null ? void 0 : endpointDefinition.keepUnusedDataFor) != null ? _a : config.keepUnusedDataFor; if (keepUnusedDataFor === Infinity) { return; } var finalKeepUnusedDataFor = Math.max(0, Math.min(keepUnusedDataFor, THIRTY_TWO_BIT_MAX_TIMER_SECONDS)); if (!anySubscriptionsRemainingForKey(queryCacheKey)) { var currentTimeout = currentRemovalTimeouts[queryCacheKey]; if (currentTimeout) { clearTimeout(currentTimeout); } currentRemovalTimeouts[queryCacheKey] = setTimeout(function() { if (!anySubscriptionsRemainingForKey(queryCacheKey)) { api2.dispatch(removeQueryResult({ queryCacheKey })); } delete currentRemovalTimeouts[queryCacheKey]; }, finalKeepUnusedDataFor * 1e3); } } return handler; }; var buildInvalidationByTagsHandler = function(_j) { var reducerPath = _j.reducerPath, context = _j.context, endpointDefinitions = _j.context.endpointDefinitions, mutationThunk = _j.mutationThunk, api = _j.api, assertTagType = _j.assertTagType, refetchQuery = _j.refetchQuery; var removeQueryResult = api.internalActions.removeQueryResult; var isThunkActionWithTags = isAnyOf(isFulfilled(mutationThunk), isRejectedWithValue(mutationThunk)); var handler = function(action, mwApi) { if (isThunkActionWithTags(action)) { invalidateTags(calculateProvidedByThunk(action, "invalidatesTags", endpointDefinitions, assertTagType), mwApi); } if (api.util.invalidateTags.match(action)) { invalidateTags(calculateProvidedBy(action.payload, void 0, void 0, void 0, void 0, assertTagType), mwApi); } }; function invalidateTags(tags, mwApi) { var rootState = mwApi.getState(); var state = rootState[reducerPath]; var toInvalidate = api.util.selectInvalidatedBy(rootState, tags); context.batch(function() { var _a; var valuesArray = Array.from(toInvalidate.values()); for (var _j2 = 0, valuesArray_1 = valuesArray; _j2 < valuesArray_1.length; _j2++) { var queryCacheKey = valuesArray_1[_j2].queryCacheKey; var querySubState = state.queries[queryCacheKey]; var subscriptionSubState = (_a = state.subscriptions[queryCacheKey]) != null ? _a : {}; if (querySubState) { if (Object.keys(subscriptionSubState).length === 0) { mwApi.dispatch(removeQueryResult({ queryCacheKey })); } else if (querySubState.status !== QueryStatus.uninitialized) { mwApi.dispatch(refetchQuery(querySubState, queryCacheKey)); } } } }); } return handler; }; var buildPollingHandler = function(_j) { var reducerPath = _j.reducerPath, queryThunk = _j.queryThunk, api = _j.api, refetchQuery = _j.refetchQuery, internalState = _j.internalState; var currentPolls = {}; var handler = function(action, mwApi) { if (api.internalActions.updateSubscriptionOptions.match(action) || api.internalActions.unsubscribeQueryResult.match(action)) { updatePollingInterval(action.payload, mwApi); } if (queryThunk.pending.match(action) || queryThunk.rejected.match(action) && action.meta.condition) { updatePollingInterval(action.meta.arg, mwApi); } if (queryThunk.fulfilled.match(action) || queryThunk.rejected.match(action) && !action.meta.condition) { startNextPoll(action.meta.arg, mwApi); } if (api.util.resetApiState.match(action)) { clearPolls(); } }; function startNextPoll(_j2, api2) { var queryCacheKey = _j2.queryCacheKey; var state = api2.getState()[reducerPath]; var querySubState = state.queries[queryCacheKey]; var subscriptions = internalState.currentSubscriptions[queryCacheKey]; if (!querySubState || querySubState.status === QueryStatus.uninitialized) return; var lowestPollingInterval = findLowestPollingInterval(subscriptions); if (!Number.isFinite(lowestPollingInterval)) return; var currentPoll = currentPolls[queryCacheKey]; if (currentPoll == null ? void 0 : currentPoll.timeout) { clearTimeout(currentPoll.timeout); currentPoll.timeout = void 0; } var nextPollTimestamp = Date.now() + lowestPollingInterval; var currentInterval = currentPolls[queryCacheKey] = { nextPollTimestamp, pollingInterval: lowestPollingInterval, timeout: setTimeout(function() { currentInterval.timeout = void 0; api2.dispatch(refetchQuery(querySubState, queryCacheKey)); }, lowestPollingInterval) }; } function updatePollingInterval(_j2, api2) { var queryCacheKey = _j2.queryCacheKey; var state = api2.getState()[reducerPath]; var querySubState = state.queries[queryCacheKey]; var subscriptions = internalState.currentSubscriptions[queryCacheKey]; if (!querySubState || querySubState.status === QueryStatus.uninitialized) { return; } var lowestPollingInterval = findLowestPollingInterval(subscriptions); if (!Number.isFinite(lowestPollingInterval)) { cleanupPollForKey(queryCacheKey); return; } var currentPoll = currentPolls[queryCacheKey]; var nextPollTimestamp = Date.now() + lowestPollingInterval; if (!currentPoll || nextPollTimestamp < currentPoll.nextPollTimestamp) { startNextPoll({ queryCacheKey }, api2); } } function cleanupPollForKey(key) { var existingPoll = currentPolls[key]; if (existingPoll == null ? void 0 : existingPoll.timeout) { clearTimeout(existingPoll.timeout); } delete currentPolls[key]; } function clearPolls() { for (var _j2 = 0, _k = Object.keys(currentPolls); _j2 < _k.length; _j2++) { var key = _k[_j2]; cleanupPollForKey(key); } } function findLowestPollingInterval(subscribers) { if (subscribers === void 0) { subscribers = {}; } var lowestPollingInterval = Number.POSITIVE_INFINITY; for (var key in subscribers) { if (!!subscribers[key].pollingInterval) { lowestPollingInterval = Math.min(subscribers[key].pollingInterval, lowestPollingInterval); } } return lowestPollingInterval; } return handler; }; var buildWindowEventHandler = function(_j) { var reducerPath = _j.reducerPath, context = _j.context, api = _j.api, refetchQuery = _j.refetchQuery, internalState = _j.internalState; var removeQueryResult = api.internalActions.removeQueryResult; var handler = function(action, mwApi) { if (onFocus.match(action)) { refetchValidQueries(mwApi, "refetchOnFocus"); } if (onOnline.match(action)) { refetchValidQueries(mwApi, "refetchOnReconnect"); } }; function refetchValidQueries(api2, type) { var state = api2.getState()[reducerPath]; var queries = state.queries; var subscriptions = internalState.currentSubscriptions; context.batch(function() { for (var _j2 = 0, _k = Object.keys(subscriptions); _j2 < _k.length; _j2++) { var queryCacheKey = _k[_j2]; var querySubState = queries[queryCacheKey]; var subscriptionSubState = subscriptions[queryCacheKey]; if (!subscriptionSubState || !querySubState) continue; var shouldRefetch = Object.values(subscriptionSubState).some(function(sub) { return sub[type] === true; }) || Object.values(subscriptionSubState).every(function(sub) { return sub[type] === void 0; }) && state.config[type]; if (shouldRefetch) { if (Object.keys(subscriptionSubState).length === 0) { api2.dispatch(removeQueryResult({ queryCacheKey })); } else if (querySubState.status !== QueryStatus.uninitialized) { api2.dispatch(refetchQuery(querySubState, queryCacheKey)); } } } }); } return handler; }; var neverResolvedError = new Error("Promise never resolved before cacheEntryRemoved."); var buildCacheLifecycleHandler = function(_j) { var api = _j.api, reducerPath = _j.reducerPath, context = _j.context, queryThunk = _j.queryThunk, mutationThunk = _j.mutationThunk, internalState = _j.internalState; var isQueryThunk = isAsyncThunkAction(queryThunk); var isMutationThunk = isAsyncThunkAction(mutationThunk); var isFulfilledThunk = isFulfilled(queryThunk, mutationThunk); var lifecycleMap = {}; var handler = function(action, mwApi, stateBefore) { var cacheKey = getCacheKey(action); if (queryThunk.pending.match(action)) { var oldState = stateBefore[reducerPath].queries[cacheKey]; var state = mwApi.getState()[reducerPath].queries[cacheKey]; if (!oldState && state) { handleNewKey(action.meta.arg.endpointName, action.meta.arg.originalArgs, cacheKey, mwApi, action.meta.requestId); } } else if (mutationThunk.pending.match(action)) { var state = mwApi.getState()[reducerPath].mutations[cacheKey]; if (state) { handleNewKey(action.meta.arg.endpointName, action.meta.arg.originalArgs, cacheKey, mwApi, action.meta.requestId); } } else if (isFulfilledThunk(action)) { var lifecycle = lifecycleMap[cacheKey]; if (lifecycle == null ? void 0 : lifecycle.valueResolved) { lifecycle.valueResolved({ data: action.payload, meta: action.meta.baseQueryMeta }); delete lifecycle.valueResolved; } } else if (api.internalActions.removeQueryResult.match(action) || api.internalActions.removeMutationResult.match(action)) { var lifecycle = lifecycleMap[cacheKey]; if (lifecycle) { delete lifecycleMap[cacheKey]; lifecycle.cacheEntryRemoved(); } } else if (api.util.resetApiState.match(action)) { for (var _j2 = 0, _k = Object.entries(lifecycleMap); _j2 < _k.length; _j2++) { var _l = _k[_j2], cacheKey2 = _l[0], lifecycle = _l[1]; delete lifecycleMap[cacheKey2]; lifecycle.cacheEntryRemoved(); } } }; function getCacheKey(action) { if (isQueryThunk(action)) return action.meta.arg.queryCacheKey; if (isMutationThunk(action)) return action.meta.requestId; if (api.internalActions.removeQueryResult.match(action)) return action.payload.queryCacheKey; if (api.internalActions.removeMutationResult.match(action)) return getMutationCacheKey(action.payload); return ""; } function handleNewKey(endpointName, originalArgs, queryCacheKey, mwApi, requestId) { var endpointDefinition = context.endpointDefinitions[endpointName]; var onCacheEntryAdded = endpointDefinition == null ? void 0 : endpointDefinition.onCacheEntryAdded; if (!onCacheEntryAdded) return; var lifecycle = {}; var cacheEntryRemoved = new Promise(function(resolve) { lifecycle.cacheEntryRemoved = resolve; }); var cacheDataLoaded = Promise.race([ new Promise(function(resolve) { lifecycle.valueResolved = resolve; }), cacheEntryRemoved.then(function() { throw neverResolvedError; }) ]); cacheDataLoaded.catch(function() { }); lifecycleMap[queryCacheKey] = lifecycle; var selector = api.endpoints[endpointName].select(endpointDefinition.type === DefinitionType.query ? originalArgs : queryCacheKey); var extra = mwApi.dispatch(function(_, __, extra2) { return extra2; }); var lifecycleApi = __spreadProps(__spreadValues({}, mwApi), { getCacheEntry: function() { return selector(mwApi.getState()); }, requestId, extra, updateCachedData: endpointDefinition.type === DefinitionType.query ? function(updateRecipe) { return mwApi.dispatch(api.util.updateQueryData(endpointName, originalArgs, updateRecipe)); } : void 0, cacheDataLoaded, cacheEntryRemoved }); var runningHandler = onCacheEntryAdded(originalArgs, lifecycleApi); Promise.resolve(runningHandler).catch(function(e2) { if (e2 === neverResolvedError) return; throw e2; }); } return handler; }; var buildQueryLifecycleHandler = function(_j) { var api = _j.api, context = _j.context, queryThunk = _j.queryThunk, mutationThunk = _j.mutationThunk; var isPendingThunk = isPending(queryThunk, mutationThunk); var isRejectedThunk = isRejected(queryThunk, mutationThunk); var isFullfilledThunk = isFulfilled(queryThunk, mutationThunk); var lifecycleMap = {}; var handler = function(action, mwApi) { var _a, _b, _c; if (isPendingThunk(action)) { var _j2 = action.meta, requestId = _j2.requestId, _k = _j2.arg, endpointName_1 = _k.endpointName, originalArgs_1 = _k.originalArgs; var endpointDefinition = context.endpointDefinitions[endpointName_1]; var onQueryStarted = endpointDefinition == null ? void 0 : endpointDefinition.onQueryStarted; if (onQueryStarted) { var lifecycle_1 = {}; var queryFulfilled = new Promise(function(resolve, reject) { lifecycle_1.resolve = resolve; lifecycle_1.reject = reject; }); queryFulfilled.catch(function() { }); lifecycleMap[requestId] = lifecycle_1; var selector_1 = api.endpoints[endpointName_1].select(endpointDefinition.type === DefinitionType.query ? originalArgs_1 : requestId); var extra = mwApi.dispatch(function(_, __, extra2) { return extra2; }); var lifecycleApi = __spreadProps(__spreadValues({}, mwApi), { getCacheEntry: function() { return selector_1(mwApi.getState()); }, requestId, extra, updateCachedData: endpointDefinition.type === DefinitionType.query ? function(updateRecipe) { return mwApi.dispatch(api.util.updateQueryData(endpointName_1, originalArgs_1, updateRecipe)); } : void 0, queryFulfilled }); onQueryStarted(originalArgs_1, lifecycleApi); } } else if (isFullfilledThunk(action)) { var _l = action.meta, requestId = _l.requestId, baseQueryMeta = _l.baseQueryMeta; (_a = lifecycleMap[requestId]) == null ? void 0 : _a.resolve({ data: action.payload, meta: baseQueryMeta }); delete lifecycleMap[requestId]; } else if (isRejectedThunk(action)) { var _m = action.meta, requestId = _m.requestId, rejectedWithValue = _m.rejectedWithValue, baseQueryMeta = _m.baseQueryMeta; (_c = lifecycleMap[requestId]) == null ? void 0 : _c.reject({ error: (_b = action.payload) != null ? _b : action.error, isUnhandledError: !rejectedWithValue, meta: baseQueryMeta }); delete lifecycleMap[requestId]; } }; return handler; }; var buildDevCheckHandler = function(_j) { var api = _j.api, apiUid = _j.context.apiUid, reducerPath = _j.reducerPath; return function(action, mwApi) { var _a, _b; if (api.util.resetApiState.match(action)) { mwApi.dispatch(api.internalActions.middlewareRegistered(apiUid)); } if (typeof process !== "undefined" && true) { if (api.internalActions.middlewareRegistered.match(action) && action.payload === apiUid && ((_b = (_a = mwApi.getState()[reducerPath]) == null ? void 0 : _a.config) == null ? void 0 : _b.middlewareRegistered) === "conflict") { console.warn('There is a mismatch between slice and middleware for the reducerPath "' + reducerPath + '".\nYou can only have one api per reducer path, this will lead to crashes in various situations!' + (reducerPath === "api" ? "\nIf you have multiple apis, you *have* to specify the reducerPath option when using createApi!" : "")); } } }; }; var promise; var queueMicrotaskShim = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : globalThis) : function(cb) { return (promise || (promise = Promise.resolve())).then(cb).catch(function(err) { return setTimeout(function() { throw err; }, 0); }); }; var buildBatchedActionsHandler = function(_j) { var api = _j.api, queryThunk = _j.queryThunk, internalState = _j.internalState; var subscriptionsPrefix = api.reducerPath + "/subscriptions"; var previousSubscriptions = null; var dispatchQueued = false; var _k = api.internalActions, updateSubscriptionOptions = _k.updateSubscriptionOptions, unsubscribeQueryResult = _k.unsubscribeQueryResult; var actuallyMutateSubscriptions = function(mutableState, action) { var _a, _b, _c, _d, _e, _f, _g, _h, _i; if (updateSubscriptionOptions.match(action)) { var _j2 = action.payload, queryCacheKey = _j2.queryCacheKey, requestId = _j2.requestId, options = _j2.options; if ((_a = mutableState == null ? void 0 : mutableState[queryCacheKey]) == null ? void 0 : _a[requestId]) { mutableState[queryCacheKey][requestId] = options; } return true; } if (unsubscribeQueryResult.match(action)) { var _k2 = action.payload, queryCacheKey = _k2.queryCacheKey, requestId = _k2.requestId; if (mutableState[queryCacheKey]) { delete mutableState[queryCacheKey][requestId]; } return true; } if (api.internalActions.removeQueryResult.match(action)) { delete mutableState[action.payload.queryCacheKey]; return true; } if (queryThunk.pending.match(action)) { var _l = action.meta, arg = _l.arg, requestId = _l.requestId; if (arg.subscribe) { var substate = (_c = mutableState[_b = arg.queryCacheKey]) != null ? _c : mutableState[_b] = {}; substate[requestId] = (_e = (_d = arg.subscriptionOptions) != null ? _d : substate[requestId]) != null ? _e : {}; return true; } } if (queryThunk.rejected.match(action)) { var _m = action.meta, condition = _m.condition, arg = _m.arg, requestId = _m.requestId; if (condition && arg.subscribe) { var substate = (_g = mutableState[_f = arg.queryCacheKey]) != null ? _g : mutableState[_f] = {}; substate[requestId] = (_i = (_h = arg.subscriptionOptions) != null ? _h : substate[requestId]) != null ? _i : {}; return true; } } return false; }; return function(action, mwApi) { var _a, _b; if (!previousSubscriptions) { previousSubscriptions = JSON.parse(JSON.stringify(internalState.currentSubscriptions)); } if (api.util.resetApiState.match(action)) { previousSubscriptions = internalState.currentSubscriptions = {}; return [true, false]; } if (api.internalActions.internal_probeSubscription.match(action)) { var _j2 = action.payload, queryCacheKey = _j2.queryCacheKey, requestId = _j2.requestId; var hasSubscription = !!((_a = internalState.currentSubscriptions[queryCacheKey]) == null ? void 0 : _a[requestId]); return [false, hasSubscription]; } var didMutate = actuallyMutateSubscriptions(internalState.currentSubscriptions, action); if (didMutate) { if (!dispatchQueued) { queueMicrotaskShim(function() { var newSubscriptions = JSON.parse(JSON.stringify(internalState.currentSubscriptions)); var _j3 = cn(previousSubscriptions, function() { return newSubscriptions; }), patches = _j3[1]; mwApi.next(api.internalActions.subscriptionsUpdated(patches)); previousSubscriptions = newSubscriptions; dispatchQueued = false; }); dispatchQueued = true; } var isSubscriptionSliceAction = !!((_b = action.type) == null ? void 0 : _b.startsWith(subscriptionsPrefix)); var isAdditionalSubscriptionAction = queryThunk.rejected.match(action) && action.meta.condition && !!action.meta.arg.subscribe; var actionShouldContinue = !isSubscriptionSliceAction && !isAdditionalSubscriptionAction; return [actionShouldContinue, false]; } return [true, false]; }; }; function buildMiddleware(input) { var reducerPath = input.reducerPath, queryThunk = input.queryThunk, api = input.api, context = input.context; var apiUid = context.apiUid; var actions = { invalidateTags: createAction(reducerPath + "/invalidateTags") }; var isThisApiSliceAction = function(action) { return !!action && typeof action.type === "string" && action.type.startsWith(reducerPath + "/"); }; var handlerBuilders = [ buildDevCheckHandler, buildCacheCollectionHandler, buildInvalidationByTagsHandler, buildPollingHandler, buildCacheLifecycleHandler, buildQueryLifecycleHandler ]; var middleware = function(mwApi) { var initialized2 = false; var internalState = { currentSubscriptions: {} }; var builderArgs = __spreadProps(__spreadValues({}, input), { internalState, refetchQuery }); var handlers = handlerBuilders.map(function(build) { return build(builderArgs); }); var batchedActionsHandler = buildBatchedActionsHandler(builderArgs); var windowEventsHandler = buildWindowEventHandler(builderArgs); return function(next) { return function(action) { if (!initialized2) { initialized2 = true; mwApi.dispatch(api.internalActions.middlewareRegistered(apiUid)); } var mwApiWithNext = __spreadProps(__spreadValues({}, mwApi), { next }); var stateBefore = mwApi.getState(); var _j = batchedActionsHandler(action, mwApiWithNext, stateBefore), actionShouldContinue = _j[0], hasSubscription = _j[1]; var res; if (actionShouldContinue) { res = next(action); } else { res = hasSubscription; } if (!!mwApi.getState()[reducerPath]) { windowEventsHandler(action, mwApiWithNext, stateBefore); if (isThisApiSliceAction(action) || context.hasRehydrationInfo(action)) { for (var _k = 0, handlers_1 = handlers; _k < handlers_1.length; _k++) { var handler = handlers_1[_k]; handler(action, mwApiWithNext, stateBefore); } } } return res; }; }; }; return { middleware, actions }; function refetchQuery(querySubState, queryCacheKey, override) { if (override === void 0) { override = {}; } return queryThunk(__spreadValues({ type: "query", endpointName: querySubState.endpointName, originalArgs: querySubState.originalArgs, subscribe: false, forceRefetch: true, queryCacheKey }, override)); } } function assertCast(v) { } function safeAssign(target) { var args = []; for (var _j = 1; _j < arguments.length; _j++) { args[_j - 1] = arguments[_j]; } Object.assign.apply(Object, __spreadArray([target], args)); } var coreModuleName = Symbol(); var coreModule = function() { return { name: coreModuleName, init: function(api, _j, context) { var baseQuery = _j.baseQuery, tagTypes = _j.tagTypes, reducerPath = _j.reducerPath, serializeQueryArgs = _j.serializeQueryArgs, keepUnusedDataFor = _j.keepUnusedDataFor, refetchOnMountOrArgChange = _j.refetchOnMountOrArgChange, refetchOnFocus = _j.refetchOnFocus, refetchOnReconnect = _j.refetchOnReconnect; T(); assertCast(serializeQueryArgs); var assertTagType = function(tag) { if (typeof process !== "undefined" && true) { if (!tagTypes.includes(tag.type)) { console.error("Tag type '" + tag.type + "' was used, but not specified in `tagTypes`!"); } } return tag; }; Object.assign(api, { reducerPath, endpoints: {}, internalActions: { onOnline, onOffline, onFocus, onFocusLost }, util: {} }); var _k = buildThunks({ baseQuery, reducerPath, context, api, serializeQueryArgs, assertTagType }), queryThunk = _k.queryThunk, mutationThunk = _k.mutationThunk, patchQueryData = _k.patchQueryData, updateQueryData = _k.updateQueryData, upsertQueryData = _k.upsertQueryData, prefetch = _k.prefetch, buildMatchThunkActions = _k.buildMatchThunkActions; var _l = buildSlice({ context, queryThunk, mutationThunk, reducerPath, assertTagType, config: { refetchOnFocus, refetchOnReconnect, refetchOnMountOrArgChange, keepUnusedDataFor, reducerPath } }), reducer = _l.reducer, sliceActions = _l.actions; safeAssign(api.util, { patchQueryData, updateQueryData, upsertQueryData, prefetch, resetApiState: sliceActions.resetApiState }); safeAssign(api.internalActions, sliceActions); var _m = buildMiddleware({ reducerPath, context, queryThunk, mutationThunk, api, assertTagType }), middleware = _m.middleware, middlewareActions = _m.actions; safeAssign(api.util, middlewareActions); safeAssign(api, { reducer, middleware }); var _o = buildSelectors({ serializeQueryArgs, reducerPath }), buildQuerySelector = _o.buildQuerySelector, buildMutationSelector = _o.buildMutationSelector, selectInvalidatedBy = _o.selectInvalidatedBy; safeAssign(api.util, { selectInvalidatedBy }); var _p = buildInitiate({ queryThunk, mutationThunk, api, serializeQueryArgs, context }), buildInitiateQuery = _p.buildInitiateQuery, buildInitiateMutation = _p.buildInitiateMutation, getRunningMutationThunk = _p.getRunningMutationThunk, getRunningMutationsThunk = _p.getRunningMutationsThunk, getRunningQueriesThunk = _p.getRunningQueriesThunk, getRunningQueryThunk = _p.getRunningQueryThunk, getRunningOperationPromises = _p.getRunningOperationPromises, removalWarning = _p.removalWarning; safeAssign(api.util, { getRunningOperationPromises, getRunningOperationPromise: removalWarning, getRunningMutationThunk, getRunningMutationsThunk, getRunningQueryThunk, getRunningQueriesThunk }); return { name: coreModuleName, injectEndpoint: function(endpointName, definition) { var _a, _b; var anyApi = api; (_b = (_a = anyApi.endpoints)[endpointName]) != null ? _b : _a[endpointName] = {}; if (isQueryDefinition(definition)) { safeAssign(anyApi.endpoints[endpointName], { name: endpointName, select: buildQuerySelector(endpointName, definition), initiate: buildInitiateQuery(endpointName, definition) }, buildMatchThunkActions(queryThunk, endpointName)); } else if (isMutationDefinition(definition)) { safeAssign(anyApi.endpoints[endpointName], { name: endpointName, select: buildMutationSelector(), initiate: buildInitiateMutation(endpointName) }, buildMatchThunkActions(mutationThunk, endpointName)); } } }; } }; }; var createApi = buildCreateApi(coreModule()); // node_modules/@reduxjs/toolkit/dist/query/react/rtk-query-react.esm.js var import_react = __toESM(require_react()); var import_react2 = __toESM(require_react()); var import_react3 = __toESM(require_react()); var import_react4 = __toESM(require_react()); var import_react5 = __toESM(require_react()); var __spreadArray2 = function(to, from) { for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) to[j] = from[i]; return to; }; var __defProp2 = Object.defineProperty; var __defProps2 = Object.defineProperties; var __getOwnPropDescs2 = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols2 = Object.getOwnPropertySymbols; var __hasOwnProp2 = Object.prototype.hasOwnProperty; var __propIsEnum2 = Object.prototype.propertyIsEnumerable; var __defNormalProp2 = function(obj, key, value) { return key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; }; var __spreadValues2 = function(a, b) { for (var prop in b || (b = {})) if (__hasOwnProp2.call(b, prop)) __defNormalProp2(a, prop, b[prop]); if (__getOwnPropSymbols2) for (var _i = 0, _c = __getOwnPropSymbols2(b); _i < _c.length; _i++) { var prop = _c[_i]; if (__propIsEnum2.call(b, prop)) __defNormalProp2(a, prop, b[prop]); } return a; }; var __spreadProps2 = function(a, b) { return __defProps2(a, __getOwnPropDescs2(b)); }; function useStableQueryArgs(queryArgs, serialize, endpointDefinition, endpointName) { var incoming = (0, import_react2.useMemo)(function() { return { queryArgs, serialized: typeof queryArgs == "object" ? serialize({ queryArgs, endpointDefinition, endpointName }) : queryArgs }; }, [queryArgs, serialize, endpointDefinition, endpointName]); var cache22 = (0, import_react2.useRef)(incoming); (0, import_react2.useEffect)(function() { if (cache22.current.serialized !== incoming.serialized) { cache22.current = incoming; } }, [incoming]); return cache22.current.serialized === incoming.serialized ? cache22.current.queryArgs : queryArgs; } var UNINITIALIZED_VALUE = Symbol(); function useShallowStableValue(value) { var cache22 = (0, import_react3.useRef)(value); (0, import_react3.useEffect)(function() { if (!shallowEqual(cache22.current, value)) { cache22.current = value; } }, [value]); return shallowEqual(cache22.current, value) ? cache22.current : value; } var cache2 = WeakMap ? /* @__PURE__ */ new WeakMap() : void 0; var defaultSerializeQueryArgs2 = function(_c) { var endpointName = _c.endpointName, queryArgs = _c.queryArgs; var serialized = ""; var cached = cache2 == null ? void 0 : cache2.get(queryArgs); if (typeof cached === "string") { serialized = cached; } else { var stringified = JSON.stringify(queryArgs, function(key, value) { return isPlainObject(value) ? Object.keys(value).sort().reduce(function(acc, key2) { acc[key2] = value[key2]; return acc; }, {}) : value; }); if (isPlainObject(queryArgs)) { cache2 == null ? void 0 : cache2.set(queryArgs, stringified); } serialized = stringified; } return endpointName + "(" + serialized + ")"; }; var useIsomorphicLayoutEffect = typeof window !== "undefined" && !!window.document && !!window.document.createElement ? import_react.useLayoutEffect : import_react.useEffect; var defaultMutationStateSelector = function(x) { return x; }; var noPendingQueryStateSelector = function(selected) { if (selected.isUninitialized) { return __spreadProps2(__spreadValues2({}, selected), { isUninitialized: false, isFetching: true, isLoading: selected.data !== void 0 ? false : true, status: QueryStatus.pending }); } return selected; }; function buildHooks(_c) { var api = _c.api, _d = _c.moduleOptions, batch = _d.batch, useDispatch2 = _d.useDispatch, useSelector2 = _d.useSelector, useStore2 = _d.useStore, unstable__sideEffectsInRender = _d.unstable__sideEffectsInRender, serializeQueryArgs = _c.serializeQueryArgs, context = _c.context; var usePossiblyImmediateEffect = unstable__sideEffectsInRender ? function(cb) { return cb(); } : import_react.useEffect; return { buildQueryHooks, buildMutationHook, usePrefetch }; function queryStatePreSelector(currentState, lastResult, queryArgs) { if ((lastResult == null ? void 0 : lastResult.endpointName) && currentState.isUninitialized) { var endpointName = lastResult.endpointName; var endpointDefinition = context.endpointDefinitions[endpointName]; if (serializeQueryArgs({ queryArgs: lastResult.originalArgs, endpointDefinition, endpointName }) === serializeQueryArgs({ queryArgs, endpointDefinition, endpointName })) lastResult = void 0; } var data = currentState.isSuccess ? currentState.data : lastResult == null ? void 0 : lastResult.data; if (data === void 0) data = currentState.data; var hasData = data !== void 0; var isFetching = currentState.isLoading; var isLoading = !hasData && isFetching; var isSuccess = currentState.isSuccess || isFetching && hasData; return __spreadProps2(__spreadValues2({}, currentState), { data, currentData: currentState.data, isFetching, isLoading, isSuccess }); } function usePrefetch(endpointName, defaultOptions) { var dispatch = useDispatch2(); var stableDefaultOptions = useShallowStableValue(defaultOptions); return (0, import_react.useCallback)(function(arg, options) { return dispatch(api.util.prefetch(endpointName, arg, __spreadValues2(__spreadValues2({}, stableDefaultOptions), options))); }, [endpointName, dispatch, stableDefaultOptions]); } function buildQueryHooks(name) { var useQuerySubscription = function(arg, _c2) { var _d2 = _c2 === void 0 ? {} : _c2, refetchOnReconnect = _d2.refetchOnReconnect, refetchOnFocus = _d2.refetchOnFocus, refetchOnMountOrArgChange = _d2.refetchOnMountOrArgChange, _e = _d2.skip, skip = _e === void 0 ? false : _e, _f = _d2.pollingInterval, pollingInterval = _f === void 0 ? 0 : _f; var initiate = api.endpoints[name].initiate; var dispatch = useDispatch2(); var stableArg = useStableQueryArgs(skip ? skipToken : arg, defaultSerializeQueryArgs2, context.endpointDefinitions[name], name); var stableSubscriptionOptions = useShallowStableValue({ refetchOnReconnect, refetchOnFocus, pollingInterval }); var lastRenderHadSubscription = (0, import_react.useRef)(false); var promiseRef = (0, import_react.useRef)(); var _g = promiseRef.current || {}, queryCacheKey = _g.queryCacheKey, requestId = _g.requestId; var currentRenderHasSubscription = false; if (queryCacheKey && requestId) { var returnedValue = dispatch(api.internalActions.internal_probeSubscription({ queryCacheKey, requestId })); if (true) { if (typeof returnedValue !== "boolean") { throw new Error('Warning: Middleware for RTK-Query API at reducerPath "' + api.reducerPath + '" has not been added to the store.\n You must add the middleware for RTK-Query to function correctly!'); } } currentRenderHasSubscription = !!returnedValue; } var subscriptionRemoved = !currentRenderHasSubscription && lastRenderHadSubscription.current; usePossiblyImmediateEffect(function() { lastRenderHadSubscription.current = currentRenderHasSubscription; }); usePossiblyImmediateEffect(function() { if (subscriptionRemoved) { promiseRef.current = void 0; } }, [subscriptionRemoved]); usePossiblyImmediateEffect(function() { var _a; var lastPromise = promiseRef.current; if (typeof process !== "undefined" && false) { console.log(subscriptionRemoved); } if (stableArg === skipToken) { lastPromise == null ? void 0 : lastPromise.unsubscribe(); promiseRef.current = void 0; return; } var lastSubscriptionOptions = (_a = promiseRef.current) == null ? void 0 : _a.subscriptionOptions; if (!lastPromise || lastPromise.arg !== stableArg) { lastPromise == null ? void 0 : lastPromise.unsubscribe(); var promise2 = dispatch(initiate(stableArg, { subscriptionOptions: stableSubscriptionOptions, forceRefetch: refetchOnMountOrArgChange })); promiseRef.current = promise2; } else if (stableSubscriptionOptions !== lastSubscriptionOptions) { lastPromise.updateSubscriptionOptions(stableSubscriptionOptions); } }, [ dispatch, initiate, refetchOnMountOrArgChange, stableArg, stableSubscriptionOptions, subscriptionRemoved ]); (0, import_react.useEffect)(function() { return function() { var _a; (_a = promiseRef.current) == null ? void 0 : _a.unsubscribe(); promiseRef.current = void 0; }; }, []); return (0, import_react.useMemo)(function() { return { refetch: function() { var _a; if (!promiseRef.current) throw new Error("Cannot refetch a query that has not been started yet."); return (_a = promiseRef.current) == null ? void 0 : _a.refetch(); } }; }, []); }; var useLazyQuerySubscription = function(_c2) { var _d2 = _c2 === void 0 ? {} : _c2, refetchOnReconnect = _d2.refetchOnReconnect, refetchOnFocus = _d2.refetchOnFocus, _e = _d2.pollingInterval, pollingInterval = _e === void 0 ? 0 : _e; var initiate = api.endpoints[name].initiate; var dispatch = useDispatch2(); var _f = (0, import_react.useState)(UNINITIALIZED_VALUE), arg = _f[0], setArg = _f[1]; var promiseRef = (0, import_react.useRef)(); var stableSubscriptionOptions = useShallowStableValue({ refetchOnReconnect, refetchOnFocus, pollingInterval }); usePossiblyImmediateEffect(function() { var _a, _b; var lastSubscriptionOptions = (_a = promiseRef.current) == null ? void 0 : _a.subscriptionOptions; if (stableSubscriptionOptions !== lastSubscriptionOptions) { (_b = promiseRef.current) == null ? void 0 : _b.updateSubscriptionOptions(stableSubscriptionOptions); } }, [stableSubscriptionOptions]); var subscriptionOptionsRef = (0, import_react.useRef)(stableSubscriptionOptions); usePossiblyImmediateEffect(function() { subscriptionOptionsRef.current = stableSubscriptionOptions; }, [stableSubscriptionOptions]); var trigger = (0, import_react.useCallback)(function(arg2, preferCacheValue) { if (preferCacheValue === void 0) { preferCacheValue = false; } var promise2; batch(function() { var _a; (_a = promiseRef.current) == null ? void 0 : _a.unsubscribe(); promiseRef.current = promise2 = dispatch(initiate(arg2, { subscriptionOptions: subscriptionOptionsRef.current, forceRefetch: !preferCacheValue })); setArg(arg2); }); return promise2; }, [dispatch, initiate]); (0, import_react.useEffect)(function() { return function() { var _a; (_a = promiseRef == null ? void 0 : promiseRef.current) == null ? void 0 : _a.unsubscribe(); }; }, []); (0, import_react.useEffect)(function() { if (arg !== UNINITIALIZED_VALUE && !promiseRef.current) { trigger(arg, true); } }, [arg, trigger]); return (0, import_react.useMemo)(function() { return [trigger, arg]; }, [trigger, arg]); }; var useQueryState = function(arg, _c2) { var _d2 = _c2 === void 0 ? {} : _c2, _e = _d2.skip, skip = _e === void 0 ? false : _e, selectFromResult = _d2.selectFromResult; var select = api.endpoints[name].select; var stableArg = useStableQueryArgs(skip ? skipToken : arg, serializeQueryArgs, context.endpointDefinitions[name], name); var lastValue = (0, import_react.useRef)(); var selectDefaultResult = (0, import_react.useMemo)(function() { return createSelector([ select(stableArg), function(_, lastResult) { return lastResult; }, function(_) { return stableArg; } ], queryStatePreSelector); }, [select, stableArg]); var querySelector = (0, import_react.useMemo)(function() { return selectFromResult ? createSelector([selectDefaultResult], selectFromResult) : selectDefaultResult; }, [selectDefaultResult, selectFromResult]); var currentState = useSelector2(function(state) { return querySelector(state, lastValue.current); }, shallowEqual); var store = useStore2(); var newLastValue = selectDefaultResult(store.getState(), lastValue.current); useIsomorphicLayoutEffect(function() { lastValue.current = newLastValue; }, [newLastValue]); return currentState; }; return { useQueryState, useQuerySubscription, useLazyQuerySubscription, useLazyQuery: function(options) { var _c2 = useLazyQuerySubscription(options), trigger = _c2[0], arg = _c2[1]; var queryStateResults = useQueryState(arg, __spreadProps2(__spreadValues2({}, options), { skip: arg === UNINITIALIZED_VALUE })); var info = (0, import_react.useMemo)(function() { return { lastArg: arg }; }, [arg]); return (0, import_react.useMemo)(function() { return [trigger, queryStateResults, info]; }, [trigger, queryStateResults, info]); }, useQuery: function(arg, options) { var querySubscriptionResults = useQuerySubscription(arg, options); var queryStateResults = useQueryState(arg, __spreadValues2({ selectFromResult: arg === skipToken || (options == null ? void 0 : options.skip) ? void 0 : noPendingQueryStateSelector }, options)); var data = queryStateResults.data, status = queryStateResults.status, isLoading = queryStateResults.isLoading, isSuccess = queryStateResults.isSuccess, isError = queryStateResults.isError, error = queryStateResults.error; (0, import_react.useDebugValue)({ data, status, isLoading, isSuccess, isError, error }); return (0, import_react.useMemo)(function() { return __spreadValues2(__spreadValues2({}, queryStateResults), querySubscriptionResults); }, [queryStateResults, querySubscriptionResults]); } }; } function buildMutationHook(name) { return function(_c2) { var _d2 = _c2 === void 0 ? {} : _c2, _e = _d2.selectFromResult, selectFromResult = _e === void 0 ? defaultMutationStateSelector : _e, fixedCacheKey = _d2.fixedCacheKey; var _f = api.endpoints[name], select = _f.select, initiate = _f.initiate; var dispatch = useDispatch2(); var _g = (0, import_react.useState)(), promise2 = _g[0], setPromise = _g[1]; (0, import_react.useEffect)(function() { return function() { if (!(promise2 == null ? void 0 : promise2.arg.fixedCacheKey)) { promise2 == null ? void 0 : promise2.reset(); } }; }, [promise2]); var triggerMutation = (0, import_react.useCallback)(function(arg) { var promise22 = dispatch(initiate(arg, { fixedCacheKey })); setPromise(promise22); return promise22; }, [dispatch, initiate, fixedCacheKey]); var requestId = (promise2 || {}).requestId; var mutationSelector = (0, import_react.useMemo)(function() { return createSelector([select({ fixedCacheKey, requestId: promise2 == null ? void 0 : promise2.requestId })], selectFromResult); }, [select, promise2, selectFromResult, fixedCacheKey]); var currentState = useSelector2(mutationSelector, shallowEqual); var originalArgs = fixedCacheKey == null ? promise2 == null ? void 0 : promise2.arg.originalArgs : void 0; var reset = (0, import_react.useCallback)(function() { batch(function() { if (promise2) { setPromise(void 0); } if (fixedCacheKey) { dispatch(api.internalActions.removeMutationResult({ requestId, fixedCacheKey })); } }); }, [dispatch, fixedCacheKey, promise2, requestId]); var endpointName = currentState.endpointName, data = currentState.data, status = currentState.status, isLoading = currentState.isLoading, isSuccess = currentState.isSuccess, isError = currentState.isError, error = currentState.error; (0, import_react.useDebugValue)({ endpointName, data, status, isLoading, isSuccess, isError, error }); var finalState = (0, import_react.useMemo)(function() { return __spreadProps2(__spreadValues2({}, currentState), { originalArgs, reset }); }, [currentState, originalArgs, reset]); return (0, import_react.useMemo)(function() { return [triggerMutation, finalState]; }, [triggerMutation, finalState]); }; } } var DefinitionType2; (function(DefinitionType22) { DefinitionType22["query"] = "query"; DefinitionType22["mutation"] = "mutation"; })(DefinitionType2 || (DefinitionType2 = {})); function isQueryDefinition2(e2) { return e2.type === DefinitionType2.query; } function isMutationDefinition2(e2) { return e2.type === DefinitionType2.mutation; } function capitalize(str) { return str.replace(str[0], str[0].toUpperCase()); } function safeAssign2(target) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } Object.assign.apply(Object, __spreadArray2([target], args)); } var reactHooksModuleName = Symbol(); var reactHooksModule = function(_c) { var _d = _c === void 0 ? {} : _c, _e = _d.batch, batch = _e === void 0 ? import_react_dom.unstable_batchedUpdates : _e, _f = _d.useDispatch, useDispatch2 = _f === void 0 ? useDispatch : _f, _g = _d.useSelector, useSelector2 = _g === void 0 ? useSelector : _g, _h = _d.useStore, useStore2 = _h === void 0 ? useStore : _h, _j = _d.unstable__sideEffectsInRender, unstable__sideEffectsInRender = _j === void 0 ? false : _j; return { name: reactHooksModuleName, init: function(api, _c2, context) { var serializeQueryArgs = _c2.serializeQueryArgs; var anyApi = api; var _d2 = buildHooks({ api, moduleOptions: { batch, useDispatch: useDispatch2, useSelector: useSelector2, useStore: useStore2, unstable__sideEffectsInRender }, serializeQueryArgs, context }), buildQueryHooks = _d2.buildQueryHooks, buildMutationHook = _d2.buildMutationHook, usePrefetch = _d2.usePrefetch; safeAssign2(anyApi, { usePrefetch }); safeAssign2(context, { batch }); return { injectEndpoint: function(endpointName, definition) { if (isQueryDefinition2(definition)) { var _c3 = buildQueryHooks(endpointName), useQuery = _c3.useQuery, useLazyQuery = _c3.useLazyQuery, useLazyQuerySubscription = _c3.useLazyQuerySubscription, useQueryState = _c3.useQueryState, useQuerySubscription = _c3.useQuerySubscription; safeAssign2(anyApi.endpoints[endpointName], { useQuery, useLazyQuery, useLazyQuerySubscription, useQueryState, useQuerySubscription }); api["use" + capitalize(endpointName) + "Query"] = useQuery; api["useLazy" + capitalize(endpointName) + "Query"] = useLazyQuery; } else if (isMutationDefinition2(definition)) { var useMutation = buildMutationHook(endpointName); safeAssign2(anyApi.endpoints[endpointName], { useMutation }); api["use" + capitalize(endpointName) + "Mutation"] = useMutation; } } }; } }; }; var createApi2 = buildCreateApi(coreModule(), reactHooksModule()); // node_modules/@strapi/admin/dist/admin/admin/src/services/api.mjs var adminApi = createApi2({ reducerPath: "adminApi", baseQuery: fetchBaseQuery(), tagTypes: [], endpoints: () => ({}) }); export { require_isPlainObject, require_identity, require_apply, require_overRest, require_setToString, require_castPath, require_baseGet, require_hasPath, require_hasIn, require_baseFlatten, require_flatRest, require_lib, getCookieValue, setCookie, deleteCookie, skipToken, require_placeholder, require_baseConvert, require_noop, require_baseIndexOf, require_arrayIncludes, require_trimmedEndIndex, require_toNumber, require_toInteger, require_get2 as require_get, require_baseProperty, require_baseIteratee, require_convert, require_pipe, FetchError, isFetchError, getFetchClient, fetchBaseQuery, isBaseQueryError, adminApi }; //# sourceMappingURL=chunk-LCL5TIBZ.js.map