@frontify/fondue 12.0.0-beta.16 → 12.0.0-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/RichTextEditor/Plugins/CheckboxListPlugin/CheckboxListButton/CheckboxListToolbarButton.es.js +8 -8
- package/dist/components/RichTextEditor/Plugins/CheckboxListPlugin/CheckboxListButton/CheckboxListToolbarButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js +4 -2
- package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js +32 -27
- package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/FloatingLink.es.js +13 -6
- package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/FloatingLink.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/InsertLinkModal/index.d.ts +1 -0
- package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.d.ts +2 -0
- package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js +38 -0
- package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js.map +1 -0
- package/dist/index.cjs.js +10 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.umd.js +10 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/node_modules/@udecode/plate-core/dist/index.es.es.js +1482 -0
- package/dist/node_modules/@udecode/plate-core/dist/index.es.es.js.map +1 -0
- package/dist/node_modules/@udecode/plate-floating/dist/index.es.es.js +21 -0
- package/dist/node_modules/@udecode/plate-floating/dist/index.es.es.js.map +1 -0
- package/dist/node_modules/@udecode/zustood/dist/index.es.es.js +439 -0
- package/dist/node_modules/@udecode/zustood/dist/index.es.es.js.map +1 -0
- package/dist/node_modules/@udecode/zustood/node_modules/react-tracked/dist/index.modern.es.js +21 -0
- package/dist/node_modules/@udecode/zustood/node_modules/react-tracked/dist/index.modern.es.js.map +1 -0
- package/dist/node_modules/hotkeys-js/dist/hotkeys.esm.es.js +275 -0
- package/dist/node_modules/hotkeys-js/dist/hotkeys.esm.es.js.map +1 -0
- package/dist/node_modules/jotai/esm/index.es.js +418 -0
- package/dist/node_modules/jotai/esm/index.es.js.map +1 -0
- package/dist/node_modules/proxy-compare/dist/index.modern.es.js +74 -0
- package/dist/node_modules/proxy-compare/dist/index.modern.es.js.map +1 -0
- package/dist/node_modules/react-hotkeys-hook/dist/react-hotkeys-hook.esm.es.js +7 -0
- package/dist/node_modules/react-hotkeys-hook/dist/react-hotkeys-hook.esm.es.js.map +1 -0
- package/dist/node_modules/zustand/esm/index.es.js +62 -0
- package/dist/node_modules/zustand/esm/index.es.js.map +1 -0
- package/dist/node_modules/zustand/esm/middleware.es.js +219 -0
- package/dist/node_modules/zustand/esm/middleware.es.js.map +1 -0
- package/dist/node_modules/zustand/esm/vanilla.es.js +26 -0
- package/dist/node_modules/zustand/esm/vanilla.es.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.es.es.js","sources":["../../../../../node_modules/@udecode/zustood/dist/index.es.js"],"sourcesContent":["import produce, { setAutoFreeze, enableMapSet } from 'immer';\nimport { createTrackedSelector } from 'react-tracked';\nimport create from 'zustand';\nimport { persist, devtools } from 'zustand/middleware';\nimport createVanillaStore from 'zustand/vanilla';\n\nconst generateStateActions = (store, storeName) => {\n const actions = {};\n Object.keys(store.getState()).forEach(key => {\n actions[key] = value => {\n const prevValue = store.getState()[key];\n if (prevValue === value) return;\n const actionKey = key.replace(/^\\S/, s => s.toUpperCase());\n store.setState(draft => {\n draft[key] = value;\n }, `@@${storeName}/set${actionKey}`);\n };\n });\n return actions;\n};\n\nconst extendActions = (builder, api) => {\n const actions = builder(api.set, api.get, api); // Object.keys(actions).forEach((key) => {\n // actions[key] = (...args: any[]) => {\n // // React batch\n // batch(() => {\n // actions[key](...args);\n // });\n // };\n // });\n\n return { ...api,\n set: { ...api.set,\n ...actions\n }\n };\n};\n\nconst extendSelectors = (builder, api) => {\n const use = { ...api.use\n };\n const useTracked = { ...api.useTracked\n };\n const get = { ...api.get\n };\n Object.keys(builder(api.store.getState(), api.get, api)).forEach(key => {\n // @ts-ignore\n use[key] = (...args) => api.useStore(state => {\n const selectors = builder(state, api.get, api);\n const selector = selectors[key];\n return selector(...args);\n }); // @ts-ignore\n\n\n useTracked[key] = (...args) => {\n const trackedState = api.useTrackedStore();\n const selectors = builder(trackedState, api.get, api);\n const selector = selectors[key];\n return selector(...args);\n }; // @ts-ignore\n\n\n get[key] = (...args) => {\n const selectors = builder(api.store.getState(), api.get, api);\n const selector = selectors[key];\n return selector(...args);\n };\n });\n return { ...api,\n get,\n use,\n useTracked\n };\n};\n\nconst storeFactory = api => {\n return { ...api,\n extendSelectors: builder => storeFactory(extendSelectors(builder, api)),\n extendActions: builder => storeFactory(extendActions(builder, api))\n };\n};\n\nconst generateStateGetSelectors = store => {\n const selectors = {};\n Object.keys(store.getState()).forEach(key => {\n // selectors[`get${capitalize(key)}`] = () => store.getState()[key as keyof T];\n selectors[key] = () => store.getState()[key];\n });\n return selectors;\n};\n\nconst generateStateHookSelectors = store => {\n const selectors = {};\n Object.keys(store.getState()).forEach(key => {\n // selectors[`use${capitalize(key)}`] = () =>\n selectors[key] = equalityFn => {\n return store(state => state[key], equalityFn);\n };\n });\n return selectors;\n};\n\nconst generateStateTrackedHooksSelectors = (store, trackedStore) => {\n const selectors = {};\n Object.keys(store.getState()).forEach(key => {\n selectors[key] = () => {\n return trackedStore()[key];\n };\n });\n return selectors;\n};\n\nconst immerMiddleware = config => (set, get, api) => {\n const setState = (fn, actionName) => set(produce(fn), true, actionName);\n\n api.setState = setState;\n return config(setState, get, api);\n};\n\nfunction pipe(x, ...fns) {\n return fns.reduce((y, fn) => fn(y), x);\n}\n\nconst createStore = name => (initialState, options = {}) => {\n var _immer$enabledAutoFre;\n\n const {\n middlewares: _middlewares = [],\n devtools: devtools$1,\n persist: persist$1,\n immer\n } = options;\n setAutoFreeze((_immer$enabledAutoFre = immer === null || immer === void 0 ? void 0 : immer.enabledAutoFreeze) !== null && _immer$enabledAutoFre !== void 0 ? _immer$enabledAutoFre : false);\n\n if (immer !== null && immer !== void 0 && immer.enableMapSet) {\n enableMapSet();\n }\n\n const middlewares = [immerMiddleware, ..._middlewares];\n\n if (persist$1 !== null && persist$1 !== void 0 && persist$1.enabled) {\n var _persist$name;\n\n const options = { ...persist$1,\n name: (_persist$name = persist$1.name) !== null && _persist$name !== void 0 ? _persist$name : name\n };\n middlewares.push(config => persist(config, options));\n }\n\n if (devtools$1 !== null && devtools$1 !== void 0 && devtools$1.enabled) {\n middlewares.push(config => devtools(config, { ...devtools$1,\n name\n }));\n }\n\n middlewares.push(createVanillaStore);\n\n const createStore = createState => pipe(createState, ...middlewares);\n\n const store = createStore(() => initialState);\n const useStore = create(store);\n const stateActions = generateStateActions(useStore, name);\n\n const mergeState = (state, actionName) => {\n store.setState(draft => {\n Object.assign(draft, state);\n }, actionName || `@@${name}/mergeState`);\n };\n\n const setState = (fn, actionName) => {\n store.setState(fn, actionName || `@@${name}/setState`);\n };\n\n const hookSelectors = generateStateHookSelectors(useStore);\n const getterSelectors = generateStateGetSelectors(useStore);\n const useTrackedStore = createTrackedSelector(useStore);\n const trackedHooksSelectors = generateStateTrackedHooksSelectors(useStore, useTrackedStore);\n const api = {\n get: {\n state: store.getState,\n ...getterSelectors\n },\n name,\n set: {\n state: setState,\n mergeState,\n ...stateActions\n },\n store,\n use: hookSelectors,\n useTracked: trackedHooksSelectors,\n useStore,\n useTrackedStore,\n extendSelectors: () => api,\n extendActions: () => api\n };\n return storeFactory(api);\n};\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;\n\nvar _freeGlobal = freeGlobal;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = _freeGlobal || freeSelf || Function('return this')();\n\nvar _root = root;\n\n/** Built-in value references. */\nvar Symbol = _root.Symbol;\n\nvar _Symbol = Symbol;\n\n/** Used for built-in method references. */\nvar objectProto$b = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$8 = objectProto$b.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString$1 = objectProto$b.toString;\n\n/** Built-in value references. */\nvar symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),\n tag = value[symToStringTag$1];\n\n try {\n value[symToStringTag$1] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString$1.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag$1] = tag;\n } else {\n delete value[symToStringTag$1];\n }\n }\n return result;\n}\n\nvar _getRawTag = getRawTag;\n\n/** Used for built-in method references. */\nvar objectProto$a = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto$a.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nvar _objectToString = objectToString;\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? _getRawTag(value)\n : _objectToString(value);\n}\n\nvar _baseGetTag = baseGetTag;\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nvar isObject_1 = isObject;\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag$1 = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject_1(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = _baseGetTag(value);\n return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nvar isFunction_1 = isFunction;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = _root['__core-js_shared__'];\n\nvar _coreJsData = coreJsData;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nvar _isMasked = isMasked;\n\n/** Used for built-in method references. */\nvar funcProto$1 = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString$1 = funcProto$1.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString$1.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nvar _toSource = toSource;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto$9 = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$7 = objectProto$9.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty$7).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject_1(value) || _isMasked(value)) {\n return false;\n }\n var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;\n return pattern.test(_toSource(value));\n}\n\nvar _baseIsNative = baseIsNative;\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nvar _getValue = getValue;\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = _getValue(object, key);\n return _baseIsNative(value) ? value : undefined;\n}\n\nvar _getNative = getNative;\n\nvar defineProperty = (function() {\n try {\n var func = _getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nvar _defineProperty = defineProperty;\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && _defineProperty) {\n _defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nvar _baseAssignValue = baseAssignValue;\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nvar _createBaseFor = createBaseFor;\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = _createBaseFor();\n\nvar _baseFor = baseFor;\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nvar _baseTimes = baseTimes;\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nvar isObjectLike_1 = isObjectLike;\n\n/** `Object#toString` result references. */\nvar argsTag$2 = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike_1(value) && _baseGetTag(value) == argsTag$2;\n}\n\nvar _baseIsArguments = baseIsArguments;\n\n/** Used for built-in method references. */\nvar objectProto$8 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$6 = objectProto$8.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable$1 = objectProto$8.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {\n return isObjectLike_1(value) && hasOwnProperty$6.call(value, 'callee') &&\n !propertyIsEnumerable$1.call(value, 'callee');\n};\n\nvar isArguments_1 = isArguments;\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nvar isArray_1 = isArray;\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nvar stubFalse_1 = stubFalse;\n\nvar isBuffer_1 = createCommonjsModule(function (module, exports) {\n/** Detect free variable `exports`. */\nvar freeExports = exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? _root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse_1;\n\nmodule.exports = isBuffer;\n});\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER$1 = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER$1 : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nvar _isIndex = isIndex;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nvar isLength_1 = isLength;\n\n/** `Object#toString` result references. */\nvar argsTag$1 = '[object Arguments]',\n arrayTag$1 = '[object Array]',\n boolTag$1 = '[object Boolean]',\n dateTag$1 = '[object Date]',\n errorTag$1 = '[object Error]',\n funcTag = '[object Function]',\n mapTag$2 = '[object Map]',\n numberTag$1 = '[object Number]',\n objectTag$2 = '[object Object]',\n regexpTag$1 = '[object RegExp]',\n setTag$2 = '[object Set]',\n stringTag$1 = '[object String]',\n weakMapTag$1 = '[object WeakMap]';\n\nvar arrayBufferTag$1 = '[object ArrayBuffer]',\n dataViewTag$2 = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =\ntypedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] =\ntypedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] =\ntypedArrayTags[errorTag$1] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] =\ntypedArrayTags[objectTag$2] = typedArrayTags[regexpTag$1] =\ntypedArrayTags[setTag$2] = typedArrayTags[stringTag$1] =\ntypedArrayTags[weakMapTag$1] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike_1(value) &&\n isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];\n}\n\nvar _baseIsTypedArray = baseIsTypedArray;\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nvar _baseUnary = baseUnary;\n\nvar _nodeUtil = createCommonjsModule(function (module, exports) {\n/** Detect free variable `exports`. */\nvar freeExports = exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && _freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n});\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;\n\nvar isTypedArray_1 = isTypedArray;\n\n/** Used for built-in method references. */\nvar objectProto$7 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$5 = objectProto$7.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray_1(value),\n isArg = !isArr && isArguments_1(value),\n isBuff = !isArr && !isArg && isBuffer_1(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? _baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty$5.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n _isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nvar _arrayLikeKeys = arrayLikeKeys;\n\n/** Used for built-in method references. */\nvar objectProto$6 = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$6;\n\n return value === proto;\n}\n\nvar _isPrototype = isPrototype;\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nvar _overArg = overArg;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = _overArg(Object.keys, Object);\n\nvar _nativeKeys = nativeKeys;\n\n/** Used for built-in method references. */\nvar objectProto$5 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$4 = objectProto$5.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!_isPrototype(object)) {\n return _nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty$4.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nvar _baseKeys = baseKeys;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength_1(value.length) && !isFunction_1(value);\n}\n\nvar isArrayLike_1 = isArrayLike;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);\n}\n\nvar keys_1 = keys;\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && _baseFor(object, iteratee, keys_1);\n}\n\nvar _baseForOwn = baseForOwn;\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nvar _listCacheClear = listCacheClear;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nvar eq_1 = eq;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq_1(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nvar _assocIndexOf = assocIndexOf;\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = _assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nvar _listCacheDelete = listCacheDelete;\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = _assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nvar _listCacheGet = listCacheGet;\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return _assocIndexOf(this.__data__, key) > -1;\n}\n\nvar _listCacheHas = listCacheHas;\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = _assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nvar _listCacheSet = listCacheSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = _listCacheClear;\nListCache.prototype['delete'] = _listCacheDelete;\nListCache.prototype.get = _listCacheGet;\nListCache.prototype.has = _listCacheHas;\nListCache.prototype.set = _listCacheSet;\n\nvar _ListCache = ListCache;\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new _ListCache;\n this.size = 0;\n}\n\nvar _stackClear = stackClear;\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nvar _stackDelete = stackDelete;\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nvar _stackGet = stackGet;\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nvar _stackHas = stackHas;\n\n/* Built-in method references that are verified to be native. */\nvar Map = _getNative(_root, 'Map');\n\nvar _Map = Map;\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = _getNative(Object, 'create');\n\nvar _nativeCreate = nativeCreate;\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = _nativeCreate ? _nativeCreate(null) : {};\n this.size = 0;\n}\n\nvar _hashClear = hashClear;\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nvar _hashDelete = hashDelete;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED$2 = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto$4 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$3 = objectProto$4.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (_nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED$2 ? undefined : result;\n }\n return hasOwnProperty$3.call(data, key) ? data[key] : undefined;\n}\n\nvar _hashGet = hashGet;\n\n/** Used for built-in method references. */\nvar objectProto$3 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$2 = objectProto$3.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$2.call(data, key);\n}\n\nvar _hashHas = hashHas;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED$1 = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;\n return this;\n}\n\nvar _hashSet = hashSet;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = _hashClear;\nHash.prototype['delete'] = _hashDelete;\nHash.prototype.get = _hashGet;\nHash.prototype.has = _hashHas;\nHash.prototype.set = _hashSet;\n\nvar _Hash = Hash;\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n}\n\nvar _mapCacheClear = mapCacheClear;\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nvar _isKeyable = isKeyable;\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return _isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nvar _getMapData = getMapData;\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = _getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nvar _mapCacheDelete = mapCacheDelete;\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return _getMapData(this, key).get(key);\n}\n\nvar _mapCacheGet = mapCacheGet;\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return _getMapData(this, key).has(key);\n}\n\nvar _mapCacheHas = mapCacheHas;\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = _getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nvar _mapCacheSet = mapCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = _mapCacheClear;\nMapCache.prototype['delete'] = _mapCacheDelete;\nMapCache.prototype.get = _mapCacheGet;\nMapCache.prototype.has = _mapCacheHas;\nMapCache.prototype.set = _mapCacheSet;\n\nvar _MapCache = MapCache;\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof _ListCache) {\n var pairs = data.__data__;\n if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new _MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nvar _stackSet = stackSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new _ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = _stackClear;\nStack.prototype['delete'] = _stackDelete;\nStack.prototype.get = _stackGet;\nStack.prototype.has = _stackHas;\nStack.prototype.set = _stackSet;\n\nvar _Stack = Stack;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nvar _setCacheAdd = setCacheAdd;\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nvar _setCacheHas = setCacheHas;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new _MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = _setCacheAdd;\nSetCache.prototype.has = _setCacheHas;\n\nvar _SetCache = SetCache;\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nvar _arraySome = arraySome;\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nvar _cacheHas = cacheHas;\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG$5 = 1,\n COMPARE_UNORDERED_FLAG$3 = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG$3) ? new _SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!_arraySome(other, function(othValue, othIndex) {\n if (!_cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nvar _equalArrays = equalArrays;\n\n/** Built-in value references. */\nvar Uint8Array = _root.Uint8Array;\n\nvar _Uint8Array = Uint8Array;\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nvar _mapToArray = mapToArray;\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nvar _setToArray = setToArray;\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG$4 = 1,\n COMPARE_UNORDERED_FLAG$2 = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag$1 = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag$1 = '[object Set]',\n stringTag = '[object String]',\n symbolTag$1 = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag$1 = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto$1 = _Symbol ? _Symbol.prototype : undefined,\n symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag$1:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new _Uint8Array(object), new _Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq_1(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag$1:\n var convert = _mapToArray;\n\n case setTag$1:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;\n convert || (convert = _setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG$2;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag$1:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nvar _equalByTag = equalByTag;\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nvar _arrayPush = arrayPush;\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object));\n}\n\nvar _baseGetAllKeys = baseGetAllKeys;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nvar _arrayFilter = arrayFilter;\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nvar stubArray_1 = stubArray;\n\n/** Used for built-in method references. */\nvar objectProto$2 = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto$2.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray_1 : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return _arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nvar _getSymbols = getSymbols;\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return _baseGetAllKeys(object, keys_1, _getSymbols);\n}\n\nvar _getAllKeys = getAllKeys;\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG$3 = 1;\n\n/** Used for built-in method references. */\nvar objectProto$1 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$1 = objectProto$1.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,\n objProps = _getAllKeys(object),\n objLength = objProps.length,\n othProps = _getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nvar _equalObjects = equalObjects;\n\n/* Built-in method references that are verified to be native. */\nvar DataView = _getNative(_root, 'DataView');\n\nvar _DataView = DataView;\n\n/* Built-in method references that are verified to be native. */\nvar Promise$1 = _getNative(_root, 'Promise');\n\nvar _Promise = Promise$1;\n\n/* Built-in method references that are verified to be native. */\nvar Set = _getNative(_root, 'Set');\n\nvar _Set = Set;\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = _getNative(_root, 'WeakMap');\n\nvar _WeakMap = WeakMap;\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag$1 = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = _toSource(_DataView),\n mapCtorString = _toSource(_Map),\n promiseCtorString = _toSource(_Promise),\n setCtorString = _toSource(_Set),\n weakMapCtorString = _toSource(_WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = _baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (_Map && getTag(new _Map) != mapTag) ||\n (_Promise && getTag(_Promise.resolve()) != promiseTag) ||\n (_Set && getTag(new _Set) != setTag) ||\n (_WeakMap && getTag(new _WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = _baseGetTag(value),\n Ctor = result == objectTag$1 ? value.constructor : undefined,\n ctorString = Ctor ? _toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nvar _getTag = getTag;\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG$2 = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray_1(object),\n othIsArr = isArray_1(other),\n objTag = objIsArr ? arrayTag : _getTag(object),\n othTag = othIsArr ? arrayTag : _getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer_1(object)) {\n if (!isBuffer_1(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new _Stack);\n return (objIsArr || isTypedArray_1(object))\n ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new _Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new _Stack);\n return _equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nvar _baseIsEqualDeep = baseIsEqualDeep;\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike_1(value) && !isObjectLike_1(other))) {\n return value !== value && other !== other;\n }\n return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nvar _baseIsEqual = baseIsEqual;\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG$1 = 1,\n COMPARE_UNORDERED_FLAG$1 = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new _Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nvar _baseIsMatch = baseIsMatch;\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject_1(value);\n}\n\nvar _isStrictComparable = isStrictComparable;\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys_1(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, _isStrictComparable(value)];\n }\n return result;\n}\n\nvar _getMatchData = getMatchData;\n\n/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nvar _matchesStrictComparable = matchesStrictComparable;\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = _getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return _matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || _baseIsMatch(object, source, matchData);\n };\n}\n\nvar _baseMatches = baseMatches;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);\n}\n\nvar isSymbol_1 = isSymbol;\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray_1(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol_1(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nvar _isKey = isKey;\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || _MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = _MapCache;\n\nvar memoize_1 = memoize;\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize_1(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nvar _memoizeCapped = memoizeCapped;\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = _memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nvar _stringToPath = stringToPath;\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nvar _arrayMap = arrayMap;\n\n/** Used as references for various `Number` constants. */\nvar INFINITY$1 = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = _Symbol ? _Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray_1(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return _arrayMap(value, baseToString) + '';\n }\n if (isSymbol_1(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;\n}\n\nvar _baseToString = baseToString;\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : _baseToString(value);\n}\n\nvar toString_1 = toString;\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray_1(value)) {\n return value;\n }\n return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));\n}\n\nvar _castPath = castPath;\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol_1(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nvar _toKey = toKey;\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = _castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[_toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nvar _baseGet = baseGet;\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : _baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nvar get_1 = get;\n\n/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nvar _baseHasIn = baseHasIn;\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = _castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = _toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength_1(length) && _isIndex(key, length) &&\n (isArray_1(object) || isArguments_1(object));\n}\n\nvar _hasPath = hasPath;\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && _hasPath(object, path, _baseHasIn);\n}\n\nvar hasIn_1 = hasIn;\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (_isKey(path) && _isStrictComparable(srcValue)) {\n return _matchesStrictComparable(_toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get_1(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn_1(object, path)\n : _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nvar _baseMatchesProperty = baseMatchesProperty;\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nvar identity_1 = identity;\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nvar _baseProperty = baseProperty;\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return _baseGet(object, path);\n };\n}\n\nvar _basePropertyDeep = basePropertyDeep;\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return _isKey(path) ? _baseProperty(_toKey(path)) : _basePropertyDeep(path);\n}\n\nvar property_1 = property;\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity_1;\n }\n if (typeof value == 'object') {\n return isArray_1(value)\n ? _baseMatchesProperty(value[0], value[1])\n : _baseMatches(value);\n }\n return property_1(value);\n}\n\nvar _baseIteratee = baseIteratee;\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n var result = {};\n iteratee = _baseIteratee(iteratee);\n\n _baseForOwn(object, function(value, key, object) {\n _baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n}\n\nvar mapValues_1 = mapValues;\n\nconst mapValuesKey = (key, obj) => mapValues_1(obj, value => value[key]); // export const capitalize = (s: string) => s.charAt(0).toUpperCase() + s.slice(1);\n//\n// type ValueOf<T> = T[keyof T];\n//\n// // todo: hard to map values to key\n// export const createRootStore = <\n// K extends keyof Input,\n// Input extends Record<K, any>\n// >(\n// stores: Input\n// ) => {\n// const rootStore = {};\n//\n// Object.keys(stores).forEach((key) => {\n// const store = stores[key];\n// rootStore[store.name] = store;\n// });\n//\n// return rootStore as {\n// [P in ValueOf<{ [K in keyof Input]: Input[K]['name'] }>]: Input[P];\n// };\n// };\n\nexport { createStore, extendActions, extendSelectors, generateStateActions, generateStateGetSelectors, generateStateHookSelectors, immerMiddleware, mapValuesKey, pipe, storeFactory };\n//# sourceMappingURL=index.es.js.map\n"],"names":["createVanillaStore","Symbol"],"mappings":";;;;;AAMK,MAAC,KAAuB,CAAC,GAAO,MAAc;AACjD,QAAM,IAAU,CAAA;AAChB,gBAAO,KAAK,EAAM,SAAQ,CAAE,EAAE,QAAQ,OAAO;AAC3C,MAAQ,KAAO,OAAS;AAEtB,UAAI,AADc,EAAM,SAAU,EAAC,OACjB;AAAO;AACzB,YAAM,IAAY,EAAI,QAAQ,OAAO,OAAK,EAAE,YAAW,CAAE;AACzD,QAAM,SAAS,OAAS;AACtB,UAAM,KAAO;AAAA,MACrB,GAAS,KAAK,QAAgB,GAAW;AAAA,IACzC;AAAA,EACA,CAAG,GACM;AACT,GAEM,KAAgB,CAAC,GAAS,MAAQ;AACtC,QAAM,IAAU,EAAQ,EAAI,KAAK,EAAI,KAAK,CAAG;AAS7C,SAAO;AAAA,IAAE,GAAG;AAAA,IACV,KAAK;AAAA,MAAE,GAAG,EAAI;AAAA,MACZ,GAAG;AAAA,IACJ;AAAA,EACL;AACA,GAEM,KAAkB,CAAC,GAAS,MAAQ;AACxC,QAAM,IAAM;AAAA,IAAE,GAAG,EAAI;AAAA,EACvB,GACQ,IAAa;AAAA,IAAE,GAAG,EAAI;AAAA,EAC9B,GACQ,IAAM;AAAA,IAAE,GAAG,EAAI;AAAA,EACvB;AACE,gBAAO,KAAK,EAAQ,EAAI,MAAM,SAAQ,GAAI,EAAI,KAAK,CAAG,CAAC,EAAE,QAAQ,OAAO;AAEtE,MAAI,KAAO,IAAI,MAAS,EAAI,SAAS,OAAS;AAE5C,YAAM,IAAW,AADC,EAAQ,GAAO,EAAI,KAAK,CAAG,EAClB;AAC3B,aAAO,EAAS,GAAG,CAAI;AAAA,IAC7B,CAAK,GAGD,EAAW,KAAO,IAAI,MAAS;AAC7B,YAAM,IAAe,EAAI,mBAEnB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,WAAI,EAAM,SAAS,MACjB,EAAM,MAAK,GAEN;AAAA,EACX,CAAG,GAEG,IAAQ,EAAO;AACnB,SAAO;AACT;AAEA,IAAI,KAAiB,IAGjB,KAAa,oGAGb,KAAe;AASA,GAAe,SAAS,GAAQ;AACjD,MAAI,IAAS,CAAA;AACb,SAAI,EAAO,WAAW,CAAC,MAAM,MAC3B,EAAO,KAAK,EAAE,GAEhB,EAAO,QAAQ,IAAY,SAAS,GAAO,GAAQ,GAAO,GAAW;AACnE,MAAO,KAAK,IAAQ,EAAU,QAAQ,IAAc,IAAI,IAAK,KAAU,CAAM;AAAA,EACjF,CAAG,GACM;AACT,CAAC;AA8BE,IAAC,IAAc,IAAU,EAAQ,YAAY;AAC3B,KAAc,EAAY;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useReducer as k, useRef as u, useEffect as d, useCallback as m, useMemo as M, useDebugValue as b } from "react";
|
|
2
|
+
import { isChanged as p, createProxy as h, affectedToPathList as w } from "../../../../../proxy-compare/dist/index.modern.es.js";
|
|
3
|
+
const y = (c, a) => {
|
|
4
|
+
const s = u();
|
|
5
|
+
d(() => {
|
|
6
|
+
s.current = w(c, a);
|
|
7
|
+
}), b(c);
|
|
8
|
+
}, g = (c) => () => {
|
|
9
|
+
const [, s] = k((r) => r + 1, 0), t = /* @__PURE__ */ new WeakMap(), o = u(), e = u(), n = u();
|
|
10
|
+
d(() => {
|
|
11
|
+
o.current = t, e.current !== n.current && p(e.current, n.current, t, /* @__PURE__ */ new WeakMap()) && (e.current = n.current, s());
|
|
12
|
+
});
|
|
13
|
+
const i = m((r) => (n.current = r, e.current && e.current !== r && o.current && !p(e.current, r, o.current, /* @__PURE__ */ new WeakMap()) ? e.current : (e.current = r, r)), []), f = c(i);
|
|
14
|
+
typeof process == "object" && process.env.NODE_ENV !== "production" && y(f, t);
|
|
15
|
+
const l = M(() => /* @__PURE__ */ new WeakMap(), []);
|
|
16
|
+
return h(f, t, l);
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
g as createTrackedSelector
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.modern.es.js.map
|
package/dist/node_modules/@udecode/zustood/node_modules/react-tracked/dist/index.modern.es.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.modern.es.js","sources":["../../../../../../../node_modules/@udecode/zustood/node_modules/react-tracked/dist/index.modern.js"],"sourcesContent":["import { useRef, useEffect, useDebugValue, useReducer, useCallback, useMemo, createContext as createContext$1, useContext, createElement, forwardRef, memo as memo$1 } from 'react';\nimport { createContext, useContextUpdate, useContextSelector } from 'use-context-selector';\nimport { affectedToPathList, isChanged, createProxy, trackMemo } from 'proxy-compare';\nexport { getUntracked as getUntrackedObject } from 'proxy-compare';\n\nconst useAffectedDebugValue = (state, affected) => {\n const pathList = useRef();\n useEffect(() => {\n pathList.current = affectedToPathList(state, affected);\n });\n useDebugValue(state);\n};\n\nconst createTrackedSelector = useSelector => {\n const useTrackedSelector = () => {\n const [, forceUpdate] = useReducer(c => c + 1, 0);\n const affected = new WeakMap();\n const lastAffected = useRef();\n const prevState = useRef();\n const lastState = useRef();\n useEffect(() => {\n lastAffected.current = affected;\n\n if (prevState.current !== lastState.current && isChanged(prevState.current, lastState.current, affected, new WeakMap())) {\n prevState.current = lastState.current;\n forceUpdate();\n }\n });\n const selector = useCallback(nextState => {\n lastState.current = nextState;\n\n if (prevState.current && prevState.current !== nextState && lastAffected.current && !isChanged(prevState.current, nextState, lastAffected.current, new WeakMap())) {\n // not changed\n return prevState.current;\n }\n\n prevState.current = nextState;\n return nextState;\n }, []);\n const state = useSelector(selector);\n\n if (typeof process === 'object' && process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useAffectedDebugValue(state, affected);\n }\n\n const proxyCache = useMemo(() => new WeakMap(), []); // per-hook proxyCache\n\n return createProxy(state, affected, proxyCache);\n };\n\n return useTrackedSelector;\n};\n\n/* eslint react/destructuring-assignment: off */\nconst createContainer = (useValue, options) => {\n var _options, _options2;\n\n if (typeof options === 'boolean') {\n // eslint-disable-next-line no-console\n console.warn('boolean option is deprecated, please specify { concurrentMode: true }');\n options = {\n concurrentMode: options\n };\n }\n\n const {\n stateContextName = 'StateContainer',\n updateContextName = 'UpdateContainer',\n concurrentMode\n } = options || {};\n const StateContext = createContext((_options = options) == null ? void 0 : _options.defaultState);\n const UpdateContext = createContext$1((_options2 = options) == null ? void 0 : _options2.defaultUpdate);\n StateContext.displayName = stateContextName;\n UpdateContext.displayName = updateContextName;\n\n const Provider = props => {\n const [state, update] = useValue(props);\n return createElement(UpdateContext.Provider, {\n value: update\n }, createElement(StateContext.Provider, {\n value: state\n }, props.children));\n };\n\n const useSelector = selector => {\n if (typeof process === 'object' && process.env.NODE_ENV !== 'production') {\n const selectorOrig = selector;\n\n selector = state => {\n if (state === undefined) {\n throw new Error('Please use <Provider>');\n }\n\n return selectorOrig(state);\n };\n }\n\n const selected = useContextSelector(StateContext, selector);\n useDebugValue(selected);\n return selected;\n };\n\n const useTrackedState = createTrackedSelector(useSelector);\n const useUpdate = concurrentMode ? () => {\n if (typeof process === 'object' && process.env.NODE_ENV !== 'production' && useContext(UpdateContext) === undefined) {\n throw new Error('Please use <Provider>');\n }\n\n const contextUpdate = useContextUpdate(StateContext);\n const update = useContext(UpdateContext);\n return useCallback((...args) => {\n let result;\n contextUpdate(() => {\n result = update(...args);\n });\n return result;\n }, [contextUpdate, update]);\n } // not concurrentMode\n : () => {\n if (typeof process === 'object' && process.env.NODE_ENV !== 'production' && useContext(UpdateContext) === undefined) {\n throw new Error('Please use <Provider>');\n }\n\n return useContext(UpdateContext);\n };\n\n const useTracked = () => [useTrackedState(), useUpdate()];\n\n return {\n Provider,\n useTrackedState,\n useTracked,\n useUpdate,\n useSelector\n };\n};\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction memo(Component, propsAreEqual) {\n const WrappedComponent = forwardRef((props, ref) => {\n Object.values(props).forEach(trackMemo);\n return createElement(Component, _extends({}, props, {\n ref\n }));\n });\n return memo$1(WrappedComponent, propsAreEqual);\n}\n\nexport { createContainer, createTrackedSelector, memo };\n//# sourceMappingURL=index.modern.mjs.map\n"],"names":["affectedToPathList","isChanged","createProxy"],"mappings":";;AAKA,MAAM,IAAwB,CAAC,GAAO,MAAa;AACjD,QAAM,IAAW;AACjB,IAAU,MAAM;AACd,MAAS,UAAUA,EAAmB,GAAO,CAAQ;AAAA,EACzD,CAAG,GACD,EAAc,CAAK;AACrB,GAEM,IAAwB,OACD,MAAM;AAC/B,QAAM,CAAA,EAAG,KAAe,EAAW,OAAK,IAAI,GAAG,CAAC,GAC1C,IAAW,oBAAI,WACf,IAAe,KACf,IAAY,KACZ,IAAY;AAClB,IAAU,MAAM;AACd,MAAa,UAAU,GAEnB,EAAU,YAAY,EAAU,WAAWC,EAAU,EAAU,SAAS,EAAU,SAAS,GAAU,oBAAI,QAAS,CAAA,KACpH,GAAU,UAAU,EAAU,SAC9B;EAER,CAAK;AACD,QAAM,IAAW,EAAY,OAC3B,GAAU,UAAU,GAEhB,EAAU,WAAW,EAAU,YAAY,KAAa,EAAa,WAAW,CAACA,EAAU,EAAU,SAAS,GAAW,EAAa,SAAS,oBAAI,QAAO,CAAE,IAEvJ,EAAU,UAGnB,GAAU,UAAU,GACb,KACN,CAAE,CAAA,GACC,IAAQ,EAAY,CAAQ;AAElC,EAAI,OAAO,WAAY,YAAY,QAAQ,IAAI,aAAa,gBAE1D,EAAsB,GAAO,CAAQ;AAGvC,QAAM,IAAa,EAAQ,MAAM,oBAAI,QAAS,GAAE,CAAE,CAAA;AAElD,SAAOC,EAAY,GAAO,GAAU,CAAU;AAClD;"}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
var E = typeof navigator < "u" ? navigator.userAgent.toLowerCase().indexOf("firefox") > 0 : !1;
|
|
2
|
+
function C(e, t, i, r) {
|
|
3
|
+
e.addEventListener ? e.addEventListener(t, i, r) : e.attachEvent && e.attachEvent("on".concat(t), function() {
|
|
4
|
+
i(window.event);
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
function B(e, t) {
|
|
8
|
+
for (var i = t.slice(0, t.length - 1), r = 0; r < i.length; r++)
|
|
9
|
+
i[r] = e[i[r].toLowerCase()];
|
|
10
|
+
return i;
|
|
11
|
+
}
|
|
12
|
+
function T(e) {
|
|
13
|
+
typeof e != "string" && (e = ""), e = e.replace(/\s/g, "");
|
|
14
|
+
for (var t = e.split(","), i = t.lastIndexOf(""); i >= 0; )
|
|
15
|
+
t[i - 1] += ",", t.splice(i, 1), i = t.lastIndexOf("");
|
|
16
|
+
return t;
|
|
17
|
+
}
|
|
18
|
+
function F(e, t) {
|
|
19
|
+
for (var i = e.length >= t.length ? e : t, r = e.length >= t.length ? t : e, n = !0, a = 0; a < i.length; a++)
|
|
20
|
+
r.indexOf(i[a]) === -1 && (n = !1);
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
23
|
+
var A = {
|
|
24
|
+
backspace: 8,
|
|
25
|
+
tab: 9,
|
|
26
|
+
clear: 12,
|
|
27
|
+
enter: 13,
|
|
28
|
+
return: 13,
|
|
29
|
+
esc: 27,
|
|
30
|
+
escape: 27,
|
|
31
|
+
space: 32,
|
|
32
|
+
left: 37,
|
|
33
|
+
up: 38,
|
|
34
|
+
right: 39,
|
|
35
|
+
down: 40,
|
|
36
|
+
del: 46,
|
|
37
|
+
delete: 46,
|
|
38
|
+
ins: 45,
|
|
39
|
+
insert: 45,
|
|
40
|
+
home: 36,
|
|
41
|
+
end: 35,
|
|
42
|
+
pageup: 33,
|
|
43
|
+
pagedown: 34,
|
|
44
|
+
capslock: 20,
|
|
45
|
+
num_0: 96,
|
|
46
|
+
num_1: 97,
|
|
47
|
+
num_2: 98,
|
|
48
|
+
num_3: 99,
|
|
49
|
+
num_4: 100,
|
|
50
|
+
num_5: 101,
|
|
51
|
+
num_6: 102,
|
|
52
|
+
num_7: 103,
|
|
53
|
+
num_8: 104,
|
|
54
|
+
num_9: 105,
|
|
55
|
+
num_multiply: 106,
|
|
56
|
+
num_add: 107,
|
|
57
|
+
num_enter: 108,
|
|
58
|
+
num_subtract: 109,
|
|
59
|
+
num_decimal: 110,
|
|
60
|
+
num_divide: 111,
|
|
61
|
+
"\u21EA": 20,
|
|
62
|
+
",": 188,
|
|
63
|
+
".": 190,
|
|
64
|
+
"/": 191,
|
|
65
|
+
"`": 192,
|
|
66
|
+
"-": E ? 173 : 189,
|
|
67
|
+
"=": E ? 61 : 187,
|
|
68
|
+
";": E ? 59 : 186,
|
|
69
|
+
"'": 222,
|
|
70
|
+
"[": 219,
|
|
71
|
+
"]": 221,
|
|
72
|
+
"\\": 220
|
|
73
|
+
}, v = {
|
|
74
|
+
"\u21E7": 16,
|
|
75
|
+
shift: 16,
|
|
76
|
+
"\u2325": 18,
|
|
77
|
+
alt: 18,
|
|
78
|
+
option: 18,
|
|
79
|
+
"\u2303": 17,
|
|
80
|
+
ctrl: 17,
|
|
81
|
+
control: 17,
|
|
82
|
+
"\u2318": 91,
|
|
83
|
+
cmd: 91,
|
|
84
|
+
command: 91
|
|
85
|
+
}, j = {
|
|
86
|
+
16: "shiftKey",
|
|
87
|
+
18: "altKey",
|
|
88
|
+
17: "ctrlKey",
|
|
89
|
+
91: "metaKey",
|
|
90
|
+
shiftKey: 16,
|
|
91
|
+
ctrlKey: 17,
|
|
92
|
+
altKey: 18,
|
|
93
|
+
metaKey: 91
|
|
94
|
+
}, l = {
|
|
95
|
+
16: !1,
|
|
96
|
+
18: !1,
|
|
97
|
+
17: !1,
|
|
98
|
+
91: !1
|
|
99
|
+
}, o = {};
|
|
100
|
+
for (var b = 1; b < 20; b++)
|
|
101
|
+
A["f".concat(b)] = 111 + b;
|
|
102
|
+
var f = [], L = !1, U = "all", D = [], x = function(t) {
|
|
103
|
+
return A[t.toLowerCase()] || v[t.toLowerCase()] || t.toUpperCase().charCodeAt(0);
|
|
104
|
+
};
|
|
105
|
+
function H(e) {
|
|
106
|
+
U = e || "all";
|
|
107
|
+
}
|
|
108
|
+
function O() {
|
|
109
|
+
return U || "all";
|
|
110
|
+
}
|
|
111
|
+
function G() {
|
|
112
|
+
return f.slice(0);
|
|
113
|
+
}
|
|
114
|
+
function R(e) {
|
|
115
|
+
var t = e.target || e.srcElement, i = t.tagName, r = !0;
|
|
116
|
+
return (t.isContentEditable || (i === "INPUT" || i === "TEXTAREA" || i === "SELECT") && !t.readOnly) && (r = !1), r;
|
|
117
|
+
}
|
|
118
|
+
function V(e) {
|
|
119
|
+
return typeof e == "string" && (e = x(e)), f.indexOf(e) !== -1;
|
|
120
|
+
}
|
|
121
|
+
function X(e, t) {
|
|
122
|
+
var i, r;
|
|
123
|
+
e || (e = O());
|
|
124
|
+
for (var n in o)
|
|
125
|
+
if (Object.prototype.hasOwnProperty.call(o, n))
|
|
126
|
+
for (i = o[n], r = 0; r < i.length; )
|
|
127
|
+
i[r].scope === e ? i.splice(r, 1) : r++;
|
|
128
|
+
O() === e && H(t || "all");
|
|
129
|
+
}
|
|
130
|
+
function $(e) {
|
|
131
|
+
var t = e.keyCode || e.which || e.charCode, i = f.indexOf(t);
|
|
132
|
+
if (i >= 0 && f.splice(i, 1), e.key && e.key.toLowerCase() === "meta" && f.splice(0, f.length), (t === 93 || t === 224) && (t = 91), t in l) {
|
|
133
|
+
l[t] = !1;
|
|
134
|
+
for (var r in v)
|
|
135
|
+
v[r] === t && (g[r] = !1);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function q(e) {
|
|
139
|
+
if (typeof e > "u")
|
|
140
|
+
Object.keys(o).forEach(function(s) {
|
|
141
|
+
return delete o[s];
|
|
142
|
+
});
|
|
143
|
+
else if (Array.isArray(e))
|
|
144
|
+
e.forEach(function(s) {
|
|
145
|
+
s.key && M(s);
|
|
146
|
+
});
|
|
147
|
+
else if (typeof e == "object")
|
|
148
|
+
e.key && M(e);
|
|
149
|
+
else if (typeof e == "string") {
|
|
150
|
+
for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
|
|
151
|
+
i[r - 1] = arguments[r];
|
|
152
|
+
var n = i[0], a = i[1];
|
|
153
|
+
typeof n == "function" && (a = n, n = ""), M({
|
|
154
|
+
key: e,
|
|
155
|
+
scope: n,
|
|
156
|
+
method: a,
|
|
157
|
+
splitKey: "+"
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
var M = function(t) {
|
|
162
|
+
var i = t.key, r = t.scope, n = t.method, a = t.splitKey, s = a === void 0 ? "+" : a, u = T(i);
|
|
163
|
+
u.forEach(function(c) {
|
|
164
|
+
var p = c.split(s), m = p.length, y = p[m - 1], d = y === "*" ? "*" : x(y);
|
|
165
|
+
if (!!o[d]) {
|
|
166
|
+
r || (r = O());
|
|
167
|
+
var K = m > 1 ? B(v, p) : [];
|
|
168
|
+
o[d] = o[d].filter(function(h) {
|
|
169
|
+
var w = n ? h.method === n : !0;
|
|
170
|
+
return !(w && h.scope === r && F(h.mods, K));
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
function S(e, t, i, r) {
|
|
176
|
+
if (t.element === r) {
|
|
177
|
+
var n;
|
|
178
|
+
if (t.scope === i || t.scope === "all") {
|
|
179
|
+
n = t.mods.length > 0;
|
|
180
|
+
for (var a in l)
|
|
181
|
+
Object.prototype.hasOwnProperty.call(l, a) && (!l[a] && t.mods.indexOf(+a) > -1 || l[a] && t.mods.indexOf(+a) === -1) && (n = !1);
|
|
182
|
+
(t.mods.length === 0 && !l[16] && !l[18] && !l[17] && !l[91] || n || t.shortcut === "*") && t.method(e, t) === !1 && (e.preventDefault ? e.preventDefault() : e.returnValue = !1, e.stopPropagation && e.stopPropagation(), e.cancelBubble && (e.cancelBubble = !0));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
function k(e, t) {
|
|
187
|
+
var i = o["*"], r = e.keyCode || e.which || e.charCode;
|
|
188
|
+
if (!!g.filter.call(this, e)) {
|
|
189
|
+
if ((r === 93 || r === 224) && (r = 91), f.indexOf(r) === -1 && r !== 229 && f.push(r), ["ctrlKey", "altKey", "shiftKey", "metaKey"].forEach(function(h) {
|
|
190
|
+
var w = j[h];
|
|
191
|
+
e[h] && f.indexOf(w) === -1 ? f.push(w) : !e[h] && f.indexOf(w) > -1 ? f.splice(f.indexOf(w), 1) : h === "metaKey" && e[h] && f.length === 3 && (e.ctrlKey || e.shiftKey || e.altKey || (f = f.slice(f.indexOf(w))));
|
|
192
|
+
}), r in l) {
|
|
193
|
+
l[r] = !0;
|
|
194
|
+
for (var n in v)
|
|
195
|
+
v[n] === r && (g[n] = !0);
|
|
196
|
+
if (!i)
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
for (var a in l)
|
|
200
|
+
Object.prototype.hasOwnProperty.call(l, a) && (l[a] = e[j[a]]);
|
|
201
|
+
e.getModifierState && !(e.altKey && !e.ctrlKey) && e.getModifierState("AltGraph") && (f.indexOf(17) === -1 && f.push(17), f.indexOf(18) === -1 && f.push(18), l[17] = !0, l[18] = !0);
|
|
202
|
+
var s = O();
|
|
203
|
+
if (i)
|
|
204
|
+
for (var u = 0; u < i.length; u++)
|
|
205
|
+
i[u].scope === s && (e.type === "keydown" && i[u].keydown || e.type === "keyup" && i[u].keyup) && S(e, i[u], s, t);
|
|
206
|
+
if (r in o) {
|
|
207
|
+
for (var c = 0; c < o[r].length; c++)
|
|
208
|
+
if ((e.type === "keydown" && o[r][c].keydown || e.type === "keyup" && o[r][c].keyup) && o[r][c].key) {
|
|
209
|
+
for (var p = o[r][c], m = p.splitKey, y = p.key.split(m), d = [], K = 0; K < y.length; K++)
|
|
210
|
+
d.push(x(y[K]));
|
|
211
|
+
d.sort().join("") === f.sort().join("") && S(e, p, s, t);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
function z(e) {
|
|
217
|
+
return D.indexOf(e) > -1;
|
|
218
|
+
}
|
|
219
|
+
function g(e, t, i) {
|
|
220
|
+
f = [];
|
|
221
|
+
var r = T(e), n = [], a = "all", s = document, u = 0, c = !1, p = !0, m = "+", y = !1;
|
|
222
|
+
for (i === void 0 && typeof t == "function" && (i = t), Object.prototype.toString.call(t) === "[object Object]" && (t.scope && (a = t.scope), t.element && (s = t.element), t.keyup && (c = t.keyup), t.keydown !== void 0 && (p = t.keydown), t.capture !== void 0 && (y = t.capture), typeof t.splitKey == "string" && (m = t.splitKey)), typeof t == "string" && (a = t); u < r.length; u++)
|
|
223
|
+
e = r[u].split(m), n = [], e.length > 1 && (n = B(v, e)), e = e[e.length - 1], e = e === "*" ? "*" : x(e), e in o || (o[e] = []), o[e].push({
|
|
224
|
+
keyup: c,
|
|
225
|
+
keydown: p,
|
|
226
|
+
scope: a,
|
|
227
|
+
mods: n,
|
|
228
|
+
shortcut: r[u],
|
|
229
|
+
method: i,
|
|
230
|
+
key: r[u],
|
|
231
|
+
splitKey: m,
|
|
232
|
+
element: s
|
|
233
|
+
});
|
|
234
|
+
typeof s < "u" && !z(s) && window && (D.push(s), C(s, "keydown", function(d) {
|
|
235
|
+
k(d, s);
|
|
236
|
+
}, y), L || (L = !0, C(window, "focus", function() {
|
|
237
|
+
f = [];
|
|
238
|
+
}, y)), C(s, "keyup", function(d) {
|
|
239
|
+
k(d, s), $(d);
|
|
240
|
+
}, y));
|
|
241
|
+
}
|
|
242
|
+
function J(e) {
|
|
243
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "all";
|
|
244
|
+
Object.keys(o).forEach(function(i) {
|
|
245
|
+
var r = o[i].find(function(n) {
|
|
246
|
+
return n.scope === t && n.shortcut === e;
|
|
247
|
+
});
|
|
248
|
+
r && r.method && r.method();
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
var P = {
|
|
252
|
+
setScope: H,
|
|
253
|
+
getScope: O,
|
|
254
|
+
deleteScope: X,
|
|
255
|
+
getPressedKeyCodes: G,
|
|
256
|
+
isPressed: V,
|
|
257
|
+
filter: R,
|
|
258
|
+
trigger: J,
|
|
259
|
+
unbind: q,
|
|
260
|
+
keyMap: A,
|
|
261
|
+
modifier: v,
|
|
262
|
+
modifierMap: j
|
|
263
|
+
};
|
|
264
|
+
for (var _ in P)
|
|
265
|
+
Object.prototype.hasOwnProperty.call(P, _) && (g[_] = P[_]);
|
|
266
|
+
if (typeof window < "u") {
|
|
267
|
+
var N = window.hotkeys;
|
|
268
|
+
g.noConflict = function(e) {
|
|
269
|
+
return e && window.hotkeys === g && (window.hotkeys = N), g;
|
|
270
|
+
}, window.hotkeys = g;
|
|
271
|
+
}
|
|
272
|
+
export {
|
|
273
|
+
g as default
|
|
274
|
+
};
|
|
275
|
+
//# sourceMappingURL=hotkeys.esm.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hotkeys.esm.es.js","sources":["../../../../node_modules/hotkeys-js/dist/hotkeys.esm.js"],"sourcesContent":["/**! \n * hotkeys-js v3.9.4 \n * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. \n * \n * Copyright (c) 2022 kenny wong <wowohoo@qq.com> \n * http://jaywcjlove.github.io/hotkeys \n * Licensed under the MIT license \n */\n\nvar isff = typeof navigator !== 'undefined' ? navigator.userAgent.toLowerCase().indexOf('firefox') > 0 : false; // 绑定事件\n\nfunction addEvent(object, event, method, useCapture) {\n if (object.addEventListener) {\n object.addEventListener(event, method, useCapture);\n } else if (object.attachEvent) {\n object.attachEvent(\"on\".concat(event), function () {\n method(window.event);\n });\n }\n} // 修饰键转换成对应的键码\n\n\nfunction getMods(modifier, key) {\n var mods = key.slice(0, key.length - 1);\n\n for (var i = 0; i < mods.length; i++) {\n mods[i] = modifier[mods[i].toLowerCase()];\n }\n\n return mods;\n} // 处理传的key字符串转换成数组\n\n\nfunction getKeys(key) {\n if (typeof key !== 'string') key = '';\n key = key.replace(/\\s/g, ''); // 匹配任何空白字符,包括空格、制表符、换页符等等\n\n var keys = key.split(','); // 同时设置多个快捷键,以','分割\n\n var index = keys.lastIndexOf(''); // 快捷键可能包含',',需特殊处理\n\n for (; index >= 0;) {\n keys[index - 1] += ',';\n keys.splice(index, 1);\n index = keys.lastIndexOf('');\n }\n\n return keys;\n} // 比较修饰键的数组\n\n\nfunction compareArray(a1, a2) {\n var arr1 = a1.length >= a2.length ? a1 : a2;\n var arr2 = a1.length >= a2.length ? a2 : a1;\n var isIndex = true;\n\n for (var i = 0; i < arr1.length; i++) {\n if (arr2.indexOf(arr1[i]) === -1) isIndex = false;\n }\n\n return isIndex;\n}\n\nvar _keyMap = {\n backspace: 8,\n tab: 9,\n clear: 12,\n enter: 13,\n return: 13,\n esc: 27,\n escape: 27,\n space: 32,\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n del: 46,\n delete: 46,\n ins: 45,\n insert: 45,\n home: 36,\n end: 35,\n pageup: 33,\n pagedown: 34,\n capslock: 20,\n num_0: 96,\n num_1: 97,\n num_2: 98,\n num_3: 99,\n num_4: 100,\n num_5: 101,\n num_6: 102,\n num_7: 103,\n num_8: 104,\n num_9: 105,\n num_multiply: 106,\n num_add: 107,\n num_enter: 108,\n num_subtract: 109,\n num_decimal: 110,\n num_divide: 111,\n '⇪': 20,\n ',': 188,\n '.': 190,\n '/': 191,\n '`': 192,\n '-': isff ? 173 : 189,\n '=': isff ? 61 : 187,\n ';': isff ? 59 : 186,\n '\\'': 222,\n '[': 219,\n ']': 221,\n '\\\\': 220\n}; // Modifier Keys\n\nvar _modifier = {\n // shiftKey\n '⇧': 16,\n shift: 16,\n // altKey\n '⌥': 18,\n alt: 18,\n option: 18,\n // ctrlKey\n '⌃': 17,\n ctrl: 17,\n control: 17,\n // metaKey\n '⌘': 91,\n cmd: 91,\n command: 91\n};\nvar modifierMap = {\n 16: 'shiftKey',\n 18: 'altKey',\n 17: 'ctrlKey',\n 91: 'metaKey',\n shiftKey: 16,\n ctrlKey: 17,\n altKey: 18,\n metaKey: 91\n};\nvar _mods = {\n 16: false,\n 18: false,\n 17: false,\n 91: false\n};\nvar _handlers = {}; // F1~F12 special key\n\nfor (var k = 1; k < 20; k++) {\n _keyMap[\"f\".concat(k)] = 111 + k;\n}\n\nvar _downKeys = []; // 记录摁下的绑定键\n\nvar winListendFocus = false; // window是否已经监听了focus事件\n\nvar _scope = 'all'; // 默认热键范围\n\nvar elementHasBindEvent = []; // 已绑定事件的节点记录\n// 返回键码\n\nvar code = function code(x) {\n return _keyMap[x.toLowerCase()] || _modifier[x.toLowerCase()] || x.toUpperCase().charCodeAt(0);\n}; // 设置获取当前范围(默认为'所有')\n\n\nfunction setScope(scope) {\n _scope = scope || 'all';\n} // 获取当前范围\n\n\nfunction getScope() {\n return _scope || 'all';\n} // 获取摁下绑定键的键值\n\n\nfunction getPressedKeyCodes() {\n return _downKeys.slice(0);\n} // 表单控件控件判断 返回 Boolean\n// hotkey is effective only when filter return true\n\n\nfunction filter(event) {\n var target = event.target || event.srcElement;\n var tagName = target.tagName;\n var flag = true; // ignore: isContentEditable === 'true', <input> and <textarea> when readOnly state is false, <select>\n\n if (target.isContentEditable || (tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT') && !target.readOnly) {\n flag = false;\n }\n\n return flag;\n} // 判断摁下的键是否为某个键,返回true或者false\n\n\nfunction isPressed(keyCode) {\n if (typeof keyCode === 'string') {\n keyCode = code(keyCode); // 转换成键码\n }\n\n return _downKeys.indexOf(keyCode) !== -1;\n} // 循环删除handlers中的所有 scope(范围)\n\n\nfunction deleteScope(scope, newScope) {\n var handlers;\n var i; // 没有指定scope,获取scope\n\n if (!scope) scope = getScope();\n\n for (var key in _handlers) {\n if (Object.prototype.hasOwnProperty.call(_handlers, key)) {\n handlers = _handlers[key];\n\n for (i = 0; i < handlers.length;) {\n if (handlers[i].scope === scope) handlers.splice(i, 1);else i++;\n }\n }\n } // 如果scope被删除,将scope重置为all\n\n\n if (getScope() === scope) setScope(newScope || 'all');\n} // 清除修饰键\n\n\nfunction clearModifier(event) {\n var key = event.keyCode || event.which || event.charCode;\n\n var i = _downKeys.indexOf(key); // 从列表中清除按压过的键\n\n\n if (i >= 0) {\n _downKeys.splice(i, 1);\n } // 特殊处理 cmmand 键,在 cmmand 组合快捷键 keyup 只执行一次的问题\n\n\n if (event.key && event.key.toLowerCase() === 'meta') {\n _downKeys.splice(0, _downKeys.length);\n } // 修饰键 shiftKey altKey ctrlKey (command||metaKey) 清除\n\n\n if (key === 93 || key === 224) key = 91;\n\n if (key in _mods) {\n _mods[key] = false; // 将修饰键重置为false\n\n for (var k in _modifier) {\n if (_modifier[k] === key) hotkeys[k] = false;\n }\n }\n}\n\nfunction unbind(keysInfo) {\n // unbind(), unbind all keys\n if (typeof keysInfo === 'undefined') {\n Object.keys(_handlers).forEach(function (key) {\n return delete _handlers[key];\n });\n } else if (Array.isArray(keysInfo)) {\n // support like : unbind([{key: 'ctrl+a', scope: 's1'}, {key: 'ctrl-a', scope: 's2', splitKey: '-'}])\n keysInfo.forEach(function (info) {\n if (info.key) eachUnbind(info);\n });\n } else if (typeof keysInfo === 'object') {\n // support like unbind({key: 'ctrl+a, ctrl+b', scope:'abc'})\n if (keysInfo.key) eachUnbind(keysInfo);\n } else if (typeof keysInfo === 'string') {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n // support old method\n // eslint-disable-line\n var scope = args[0],\n method = args[1];\n\n if (typeof scope === 'function') {\n method = scope;\n scope = '';\n }\n\n eachUnbind({\n key: keysInfo,\n scope: scope,\n method: method,\n splitKey: '+'\n });\n }\n} // 解除绑定某个范围的快捷键\n\n\nvar eachUnbind = function eachUnbind(_ref) {\n var key = _ref.key,\n scope = _ref.scope,\n method = _ref.method,\n _ref$splitKey = _ref.splitKey,\n splitKey = _ref$splitKey === void 0 ? '+' : _ref$splitKey;\n var multipleKeys = getKeys(key);\n multipleKeys.forEach(function (originKey) {\n var unbindKeys = originKey.split(splitKey);\n var len = unbindKeys.length;\n var lastKey = unbindKeys[len - 1];\n var keyCode = lastKey === '*' ? '*' : code(lastKey);\n if (!_handlers[keyCode]) return; // 判断是否传入范围,没有就获取范围\n\n if (!scope) scope = getScope();\n var mods = len > 1 ? getMods(_modifier, unbindKeys) : [];\n _handlers[keyCode] = _handlers[keyCode].filter(function (record) {\n // 通过函数判断,是否解除绑定,函数相等直接返回\n var isMatchingMethod = method ? record.method === method : true;\n return !(isMatchingMethod && record.scope === scope && compareArray(record.mods, mods));\n });\n });\n}; // 对监听对应快捷键的回调函数进行处理\n\n\nfunction eventHandler(event, handler, scope, element) {\n if (handler.element !== element) {\n return;\n }\n\n var modifiersMatch; // 看它是否在当前范围\n\n if (handler.scope === scope || handler.scope === 'all') {\n // 检查是否匹配修饰符(如果有返回true)\n modifiersMatch = handler.mods.length > 0;\n\n for (var y in _mods) {\n if (Object.prototype.hasOwnProperty.call(_mods, y)) {\n if (!_mods[y] && handler.mods.indexOf(+y) > -1 || _mods[y] && handler.mods.indexOf(+y) === -1) {\n modifiersMatch = false;\n }\n }\n } // 调用处理程序,如果是修饰键不做处理\n\n\n if (handler.mods.length === 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91] || modifiersMatch || handler.shortcut === '*') {\n if (handler.method(event, handler) === false) {\n if (event.preventDefault) event.preventDefault();else event.returnValue = false;\n if (event.stopPropagation) event.stopPropagation();\n if (event.cancelBubble) event.cancelBubble = true;\n }\n }\n }\n} // 处理keydown事件\n\n\nfunction dispatch(event, element) {\n var asterisk = _handlers['*'];\n var key = event.keyCode || event.which || event.charCode; // 表单控件过滤 默认表单控件不触发快捷键\n\n if (!hotkeys.filter.call(this, event)) return; // Gecko(Firefox)的command键值224,在Webkit(Chrome)中保持一致\n // Webkit左右 command 键值不一样\n\n if (key === 93 || key === 224) key = 91;\n /**\n * Collect bound keys\n * If an Input Method Editor is processing key input and the event is keydown, return 229.\n * https://stackoverflow.com/questions/25043934/is-it-ok-to-ignore-keydown-events-with-keycode-229\n * http://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html\n */\n\n if (_downKeys.indexOf(key) === -1 && key !== 229) _downKeys.push(key);\n /**\n * Jest test cases are required.\n * ===============================\n */\n\n ['ctrlKey', 'altKey', 'shiftKey', 'metaKey'].forEach(function (keyName) {\n var keyNum = modifierMap[keyName];\n\n if (event[keyName] && _downKeys.indexOf(keyNum) === -1) {\n _downKeys.push(keyNum);\n } else if (!event[keyName] && _downKeys.indexOf(keyNum) > -1) {\n _downKeys.splice(_downKeys.indexOf(keyNum), 1);\n } else if (keyName === 'metaKey' && event[keyName] && _downKeys.length === 3) {\n /**\n * Fix if Command is pressed:\n * ===============================\n */\n if (!(event.ctrlKey || event.shiftKey || event.altKey)) {\n _downKeys = _downKeys.slice(_downKeys.indexOf(keyNum));\n }\n }\n });\n /**\n * -------------------------------\n */\n\n if (key in _mods) {\n _mods[key] = true; // 将特殊字符的key注册到 hotkeys 上\n\n for (var k in _modifier) {\n if (_modifier[k] === key) hotkeys[k] = true;\n }\n\n if (!asterisk) return;\n } // 将 modifierMap 里面的修饰键绑定到 event 中\n\n\n for (var e in _mods) {\n if (Object.prototype.hasOwnProperty.call(_mods, e)) {\n _mods[e] = event[modifierMap[e]];\n }\n }\n /**\n * https://github.com/jaywcjlove/hotkeys/pull/129\n * This solves the issue in Firefox on Windows where hotkeys corresponding to special characters would not trigger.\n * An example of this is ctrl+alt+m on a Swedish keyboard which is used to type μ.\n * Browser support: https://caniuse.com/#feat=keyboardevent-getmodifierstate\n */\n\n\n if (event.getModifierState && !(event.altKey && !event.ctrlKey) && event.getModifierState('AltGraph')) {\n if (_downKeys.indexOf(17) === -1) {\n _downKeys.push(17);\n }\n\n if (_downKeys.indexOf(18) === -1) {\n _downKeys.push(18);\n }\n\n _mods[17] = true;\n _mods[18] = true;\n } // 获取范围 默认为 `all`\n\n\n var scope = getScope(); // 对任何快捷键都需要做的处理\n\n if (asterisk) {\n for (var i = 0; i < asterisk.length; i++) {\n if (asterisk[i].scope === scope && (event.type === 'keydown' && asterisk[i].keydown || event.type === 'keyup' && asterisk[i].keyup)) {\n eventHandler(event, asterisk[i], scope, element);\n }\n }\n } // key 不在 _handlers 中返回\n\n\n if (!(key in _handlers)) return;\n\n for (var _i = 0; _i < _handlers[key].length; _i++) {\n if (event.type === 'keydown' && _handlers[key][_i].keydown || event.type === 'keyup' && _handlers[key][_i].keyup) {\n if (_handlers[key][_i].key) {\n var record = _handlers[key][_i];\n var splitKey = record.splitKey;\n var keyShortcut = record.key.split(splitKey);\n var _downKeysCurrent = []; // 记录当前按键键值\n\n for (var a = 0; a < keyShortcut.length; a++) {\n _downKeysCurrent.push(code(keyShortcut[a]));\n }\n\n if (_downKeysCurrent.sort().join('') === _downKeys.sort().join('')) {\n // 找到处理内容\n eventHandler(event, record, scope, element);\n }\n }\n }\n }\n} // 判断 element 是否已经绑定事件\n\n\nfunction isElementBind(element) {\n return elementHasBindEvent.indexOf(element) > -1;\n}\n\nfunction hotkeys(key, option, method) {\n _downKeys = [];\n var keys = getKeys(key); // 需要处理的快捷键列表\n\n var mods = [];\n var scope = 'all'; // scope默认为all,所有范围都有效\n\n var element = document; // 快捷键事件绑定节点\n\n var i = 0;\n var keyup = false;\n var keydown = true;\n var splitKey = '+';\n var capture = false; // 对为设定范围的判断\n\n if (method === undefined && typeof option === 'function') {\n method = option;\n }\n\n if (Object.prototype.toString.call(option) === '[object Object]') {\n if (option.scope) scope = option.scope; // eslint-disable-line\n\n if (option.element) element = option.element; // eslint-disable-line\n\n if (option.keyup) keyup = option.keyup; // eslint-disable-line\n\n if (option.keydown !== undefined) keydown = option.keydown; // eslint-disable-line\n\n if (option.capture !== undefined) capture = option.capture; // eslint-disable-line\n\n if (typeof option.splitKey === 'string') splitKey = option.splitKey; // eslint-disable-line\n }\n\n if (typeof option === 'string') scope = option; // 对于每个快捷键进行处理\n\n for (; i < keys.length; i++) {\n key = keys[i].split(splitKey); // 按键列表\n\n mods = []; // 如果是组合快捷键取得组合快捷键\n\n if (key.length > 1) mods = getMods(_modifier, key); // 将非修饰键转化为键码\n\n key = key[key.length - 1];\n key = key === '*' ? '*' : code(key); // *表示匹配所有快捷键\n // 判断key是否在_handlers中,不在就赋一个空数组\n\n if (!(key in _handlers)) _handlers[key] = [];\n\n _handlers[key].push({\n keyup: keyup,\n keydown: keydown,\n scope: scope,\n mods: mods,\n shortcut: keys[i],\n method: method,\n key: keys[i],\n splitKey: splitKey,\n element: element\n });\n } // 在全局document上设置快捷键\n\n\n if (typeof element !== 'undefined' && !isElementBind(element) && window) {\n elementHasBindEvent.push(element);\n addEvent(element, 'keydown', function (e) {\n dispatch(e, element);\n }, capture);\n\n if (!winListendFocus) {\n winListendFocus = true;\n addEvent(window, 'focus', function () {\n _downKeys = [];\n }, capture);\n }\n\n addEvent(element, 'keyup', function (e) {\n dispatch(e, element);\n clearModifier(e);\n }, capture);\n }\n}\n\nfunction trigger(shortcut) {\n var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'all';\n Object.keys(_handlers).forEach(function (key) {\n var data = _handlers[key].find(function (item) {\n return item.scope === scope && item.shortcut === shortcut;\n });\n\n if (data && data.method) {\n data.method();\n }\n });\n}\n\nvar _api = {\n setScope: setScope,\n getScope: getScope,\n deleteScope: deleteScope,\n getPressedKeyCodes: getPressedKeyCodes,\n isPressed: isPressed,\n filter: filter,\n trigger: trigger,\n unbind: unbind,\n keyMap: _keyMap,\n modifier: _modifier,\n modifierMap: modifierMap\n};\n\nfor (var a in _api) {\n if (Object.prototype.hasOwnProperty.call(_api, a)) {\n hotkeys[a] = _api[a];\n }\n}\n\nif (typeof window !== 'undefined') {\n var _hotkeys = window.hotkeys;\n\n hotkeys.noConflict = function (deep) {\n if (deep && window.hotkeys === hotkeys) {\n window.hotkeys = _hotkeys;\n }\n\n return hotkeys;\n };\n\n window.hotkeys = hotkeys;\n}\n\nexport { hotkeys as default };\n"],"names":[],"mappings":"AASA,IAAI,IAAO,OAAO,YAAc,MAAc,UAAU,UAAU,YAAa,EAAC,QAAQ,SAAS,IAAI,IAAI;AAEzG,WAAkB,GAAQ,GAAO,GAAQ,GAAY;AACnD,EAAI,EAAO,mBACT,EAAO,iBAAiB,GAAO,GAAQ,CAAU,IACxC,EAAO,eAChB,EAAO,YAAY,KAAK,OAAO,CAAK,GAAG,WAAY;AACjD,MAAO,OAAO,KAAK;AAAA,EACzB,CAAK;AAEL;AAGA,WAAiB,GAAU,GAAK;AAG9B,WAFI,IAAO,EAAI,MAAM,GAAG,EAAI,SAAS,CAAC,GAE7B,IAAI,GAAG,IAAI,EAAK,QAAQ;AAC/B,MAAK,KAAK,EAAS,EAAK,GAAG,YAAW;AAGxC,SAAO;AACT;AAGA,WAAiB,GAAK;AACpB,EAAI,OAAO,KAAQ,YAAU,KAAM,KACnC,IAAM,EAAI,QAAQ,OAAO,EAAE;AAM3B,WAJI,IAAO,EAAI,MAAM,GAAG,GAEpB,IAAQ,EAAK,YAAY,EAAE,GAExB,KAAS;AACd,MAAK,IAAQ,MAAM,KACnB,EAAK,OAAO,GAAO,CAAC,GACpB,IAAQ,EAAK,YAAY,EAAE;AAG7B,SAAO;AACT;AAGA,WAAsB,GAAI,GAAI;AAK5B,WAJI,IAAO,EAAG,UAAU,EAAG,SAAS,IAAK,GACrC,IAAO,EAAG,UAAU,EAAG,SAAS,IAAK,GACrC,IAAU,IAEL,IAAI,GAAG,IAAI,EAAK,QAAQ;AAC/B,IAAI,EAAK,QAAQ,EAAK,EAAE,MAAM,MAAI,KAAU;AAG9C,SAAO;AACT;AAEA,IAAI,IAAU;AAAA,EACZ,WAAW;AAAA,EACX,KAAK;AAAA,EACL,OAAO;AAAA,EAC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