{"version":3,"file":"inertia-CCA1Vqb2.js","sources":["../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/lodash/fp/_mapping.js","../../../node_modules/lodash/fp/placeholder.js","../../../node_modules/lodash/fp/_baseConvert.js","../../../node_modules/lodash/identity.js","../../../node_modules/lodash/_freeGlobal.js","../../../node_modules/lodash/_root.js","../../../node_modules/lodash/_Symbol.js","../../../node_modules/lodash/_getRawTag.js","../../../node_modules/lodash/_objectToString.js","../../../node_modules/lodash/_baseGetTag.js","../../../node_modules/lodash/isObject.js","../../../node_modules/lodash/isFunction.js","../../../node_modules/lodash/_coreJsData.js","../../../node_modules/lodash/_isMasked.js","../../../node_modules/lodash/_toSource.js","../../../node_modules/lodash/_baseIsNative.js","../../../node_modules/lodash/_getValue.js","../../../node_modules/lodash/_getNative.js","../../../node_modules/lodash/_WeakMap.js","../../../node_modules/lodash/_metaMap.js","../../../node_modules/lodash/_baseSetData.js","../../../node_modules/lodash/_baseCreate.js","../../../node_modules/lodash/_createCtor.js","../../../node_modules/lodash/_createBind.js","../../../node_modules/lodash/_apply.js","../../../node_modules/lodash/_composeArgs.js","../../../node_modules/lodash/_composeArgsRight.js","../../../node_modules/lodash/_countHolders.js","../../../node_modules/lodash/_baseLodash.js","../../../node_modules/lodash/_LazyWrapper.js","../../../node_modules/lodash/noop.js","../../../node_modules/lodash/_getData.js","../../../node_modules/lodash/_realNames.js","../../../node_modules/lodash/_getFuncName.js","../../../node_modules/lodash/_LodashWrapper.js","../../../node_modules/lodash/isArray.js","../../../node_modules/lodash/isObjectLike.js","../../../node_modules/lodash/_copyArray.js","../../../node_modules/lodash/_wrapperClone.js","../../../node_modules/lodash/wrapperLodash.js","../../../node_modules/lodash/_isLaziable.js","../../../node_modules/lodash/_shortOut.js","../../../node_modules/lodash/_setData.js","../../../node_modules/lodash/_getWrapDetails.js","../../../node_modules/lodash/_insertWrapDetails.js","../../../node_modules/lodash/constant.js","../../../node_modules/lodash/_defineProperty.js","../../../node_modules/lodash/_baseSetToString.js","../../../node_modules/lodash/_setToString.js","../../../node_modules/lodash/_arrayEach.js","../../../node_modules/lodash/_baseFindIndex.js","../../../node_modules/lodash/_baseIsNaN.js","../../../node_modules/lodash/_strictIndexOf.js","../../../node_modules/lodash/_baseIndexOf.js","../../../node_modules/lodash/_arrayIncludes.js","../../../node_modules/lodash/_updateWrapDetails.js","../../../node_modules/lodash/_setWrapToString.js","../../../node_modules/lodash/_createRecurry.js","../../../node_modules/lodash/_getHolder.js","../../../node_modules/lodash/_isIndex.js","../../../node_modules/lodash/_reorder.js","../../../node_modules/lodash/_replaceHolders.js","../../../node_modules/lodash/_createHybrid.js","../../../node_modules/lodash/_createCurry.js","../../../node_modules/lodash/_createPartial.js","../../../node_modules/lodash/_mergeData.js","../../../node_modules/lodash/_trimmedEndIndex.js","../../../node_modules/lodash/_baseTrim.js","../../../node_modules/lodash/isSymbol.js","../../../node_modules/lodash/toNumber.js","../../../node_modules/lodash/toFinite.js","../../../node_modules/lodash/toInteger.js","../../../node_modules/lodash/_createWrap.js","../../../node_modules/lodash/ary.js","../../../node_modules/lodash/_baseAssignValue.js","../../../node_modules/lodash/eq.js","../../../node_modules/lodash/_assignValue.js","../../../node_modules/lodash/_copyObject.js","../../../node_modules/lodash/_baseTimes.js","../../../node_modules/lodash/_baseIsArguments.js","../../../node_modules/lodash/isArguments.js","../../../node_modules/lodash/stubFalse.js","../../../node_modules/lodash/isBuffer.js","../../../node_modules/lodash/isLength.js","../../../node_modules/lodash/_baseIsTypedArray.js","../../../node_modules/lodash/_baseUnary.js","../../../node_modules/lodash/_nodeUtil.js","../../../node_modules/lodash/isTypedArray.js","../../../node_modules/lodash/_arrayLikeKeys.js","../../../node_modules/lodash/_isPrototype.js","../../../node_modules/lodash/_overArg.js","../../../node_modules/lodash/_nativeKeys.js","../../../node_modules/lodash/_baseKeys.js","../../../node_modules/lodash/isArrayLike.js","../../../node_modules/lodash/keys.js","../../../node_modules/lodash/_baseAssign.js","../../../node_modules/lodash/_listCacheClear.js","../../../node_modules/lodash/_assocIndexOf.js","../../../node_modules/lodash/_listCacheDelete.js","../../../node_modules/lodash/_listCacheGet.js","../../../node_modules/lodash/_listCacheHas.js","../../../node_modules/lodash/_listCacheSet.js","../../../node_modules/lodash/_ListCache.js","../../../node_modules/lodash/_stackClear.js","../../../node_modules/lodash/_stackDelete.js","../../../node_modules/lodash/_stackGet.js","../../../node_modules/lodash/_stackHas.js","../../../node_modules/lodash/_Map.js","../../../node_modules/lodash/_nativeCreate.js","../../../node_modules/lodash/_hashClear.js","../../../node_modules/lodash/_hashDelete.js","../../../node_modules/lodash/_hashGet.js","../../../node_modules/lodash/_hashHas.js","../../../node_modules/lodash/_hashSet.js","../../../node_modules/lodash/_Hash.js","../../../node_modules/lodash/_mapCacheClear.js","../../../node_modules/lodash/_isKeyable.js","../../../node_modules/lodash/_getMapData.js","../../../node_modules/lodash/_mapCacheDelete.js","../../../node_modules/lodash/_mapCacheGet.js","../../../node_modules/lodash/_mapCacheHas.js","../../../node_modules/lodash/_mapCacheSet.js","../../../node_modules/lodash/_MapCache.js","../../../node_modules/lodash/_stackSet.js","../../../node_modules/lodash/_Stack.js","../../../node_modules/lodash/_nativeKeysIn.js","../../../node_modules/lodash/_baseKeysIn.js","../../../node_modules/lodash/keysIn.js","../../../node_modules/lodash/_baseAssignIn.js","../../../node_modules/lodash/_cloneBuffer.js","../../../node_modules/lodash/_arrayFilter.js","../../../node_modules/lodash/stubArray.js","../../../node_modules/lodash/_getSymbols.js","../../../node_modules/lodash/_copySymbols.js","../../../node_modules/lodash/_arrayPush.js","../../../node_modules/lodash/_getPrototype.js","../../../node_modules/lodash/_getSymbolsIn.js","../../../node_modules/lodash/_copySymbolsIn.js","../../../node_modules/lodash/_baseGetAllKeys.js","../../../node_modules/lodash/_getAllKeys.js","../../../node_modules/lodash/_getAllKeysIn.js","../../../node_modules/lodash/_DataView.js","../../../node_modules/lodash/_Promise.js","../../../node_modules/lodash/_Set.js","../../../node_modules/lodash/_getTag.js","../../../node_modules/lodash/_initCloneArray.js","../../../node_modules/lodash/_Uint8Array.js","../../../node_modules/lodash/_cloneArrayBuffer.js","../../../node_modules/lodash/_cloneDataView.js","../../../node_modules/lodash/_cloneRegExp.js","../../../node_modules/lodash/_cloneSymbol.js","../../../node_modules/lodash/_cloneTypedArray.js","../../../node_modules/lodash/_initCloneByTag.js","../../../node_modules/lodash/_initCloneObject.js","../../../node_modules/lodash/_baseIsMap.js","../../../node_modules/lodash/isMap.js","../../../node_modules/lodash/_baseIsSet.js","../../../node_modules/lodash/isSet.js","../../../node_modules/lodash/_baseClone.js","../../../node_modules/lodash/clone.js","../../../node_modules/lodash/curry.js","../../../node_modules/lodash/isPlainObject.js","../../../node_modules/lodash/isError.js","../../../node_modules/lodash/isWeakMap.js","../../../node_modules/lodash/_setCacheAdd.js","../../../node_modules/lodash/_setCacheHas.js","../../../node_modules/lodash/_SetCache.js","../../../node_modules/lodash/_arraySome.js","../../../node_modules/lodash/_cacheHas.js","../../../node_modules/lodash/_equalArrays.js","../../../node_modules/lodash/_mapToArray.js","../../../node_modules/lodash/_setToArray.js","../../../node_modules/lodash/_equalByTag.js","../../../node_modules/lodash/_equalObjects.js","../../../node_modules/lodash/_baseIsEqualDeep.js","../../../node_modules/lodash/_baseIsEqual.js","../../../node_modules/lodash/_baseIsMatch.js","../../../node_modules/lodash/_isStrictComparable.js","../../../node_modules/lodash/_getMatchData.js","../../../node_modules/lodash/_matchesStrictComparable.js","../../../node_modules/lodash/_baseMatches.js","../../../node_modules/lodash/_isKey.js","../../../node_modules/lodash/memoize.js","../../../node_modules/lodash/_memoizeCapped.js","../../../node_modules/lodash/_stringToPath.js","../../../node_modules/lodash/_arrayMap.js","../../../node_modules/lodash/_baseToString.js","../../../node_modules/lodash/toString.js","../../../node_modules/lodash/_castPath.js","../../../node_modules/lodash/_toKey.js","../../../node_modules/lodash/_baseGet.js","../../../node_modules/lodash/get.js","../../../node_modules/lodash/_baseHasIn.js","../../../node_modules/lodash/_hasPath.js","../../../node_modules/lodash/hasIn.js","../../../node_modules/lodash/_baseMatchesProperty.js","../../../node_modules/lodash/_baseProperty.js","../../../node_modules/lodash/_basePropertyDeep.js","../../../node_modules/lodash/property.js","../../../node_modules/lodash/_baseIteratee.js","../../../node_modules/lodash/iteratee.js","../../../node_modules/lodash/_isFlattenable.js","../../../node_modules/lodash/_baseFlatten.js","../../../node_modules/lodash/flatten.js","../../../node_modules/lodash/_overRest.js","../../../node_modules/lodash/_flatRest.js","../../../node_modules/lodash/rearg.js","../../../node_modules/lodash/toPath.js","../../../node_modules/lodash/fp/_util.js","../../../node_modules/lodash/fp/convert.js","../../../node_modules/lodash/_baseRest.js","../../../node_modules/lodash/_assignMergeValue.js","../../../node_modules/lodash/_createBaseFor.js","../../../node_modules/lodash/_baseFor.js","../../../node_modules/lodash/isArrayLikeObject.js","../../../node_modules/lodash/_safeGet.js","../../../node_modules/lodash/toPlainObject.js","../../../node_modules/lodash/_baseMergeDeep.js","../../../node_modules/lodash/_baseMerge.js","../../../node_modules/lodash/_customDefaultsMerge.js","../../../node_modules/lodash/_isIterateeCall.js","../../../node_modules/lodash/_createAssigner.js","../../../node_modules/lodash/mergeWith.js","../../../node_modules/lodash/defaultsDeep.js","../../../node_modules/lodash/fp/defaultsDeep.js","../../../node_modules/lodash/isEqual.js","../../../node_modules/lodash/_arrayIncludesWith.js","../../../node_modules/lodash/_baseDifference.js","../../../node_modules/lodash/last.js","../../../node_modules/lodash/differenceWith.js","../../../node_modules/vis-network/standalone/esm/vis-network.js","../../../node_modules/react-vis-network-graph/node_modules/uuid/rng-browser.js","../../../node_modules/react-vis-network-graph/node_modules/uuid/uuid.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/index.js","../../../node_modules/react-vis-network-graph/lib/index.js","../../../app/javascript/pages/NetworkGraph.jsx","../../../node_modules/axios/lib/helpers/bind.js","../../../node_modules/axios/lib/utils.js","../../../node_modules/axios/lib/core/AxiosError.js","../../../node_modules/axios/lib/helpers/null.js","../../../node_modules/axios/lib/helpers/toFormData.js","../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../../node_modules/axios/lib/helpers/buildURL.js","../../../node_modules/axios/lib/core/InterceptorManager.js","../../../node_modules/axios/lib/defaults/transitional.js","../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../../../node_modules/axios/lib/platform/browser/classes/FormData.js","../../../node_modules/axios/lib/platform/browser/classes/Blob.js","../../../node_modules/axios/lib/platform/browser/index.js","../../../node_modules/axios/lib/platform/common/utils.js","../../../node_modules/axios/lib/platform/index.js","../../../node_modules/axios/lib/helpers/toURLEncodedForm.js","../../../node_modules/axios/lib/helpers/formDataToJSON.js","../../../node_modules/axios/lib/defaults/index.js","../../../node_modules/axios/lib/helpers/parseHeaders.js","../../../node_modules/axios/lib/core/AxiosHeaders.js","../../../node_modules/axios/lib/core/transformData.js","../../../node_modules/axios/lib/cancel/isCancel.js","../../../node_modules/axios/lib/cancel/CanceledError.js","../../../node_modules/axios/lib/core/settle.js","../../../node_modules/axios/lib/helpers/parseProtocol.js","../../../node_modules/axios/lib/helpers/speedometer.js","../../../node_modules/axios/lib/helpers/throttle.js","../../../node_modules/axios/lib/helpers/progressEventReducer.js","../../../node_modules/axios/lib/helpers/isURLSameOrigin.js","../../../node_modules/axios/lib/helpers/cookies.js","../../../node_modules/axios/lib/helpers/isAbsoluteURL.js","../../../node_modules/axios/lib/helpers/combineURLs.js","../../../node_modules/axios/lib/core/buildFullPath.js","../../../node_modules/axios/lib/core/mergeConfig.js","../../../node_modules/axios/lib/helpers/resolveConfig.js","../../../node_modules/axios/lib/adapters/xhr.js","../../../node_modules/axios/lib/helpers/composeSignals.js","../../../node_modules/axios/lib/helpers/trackStream.js","../../../node_modules/axios/lib/adapters/fetch.js","../../../node_modules/axios/lib/adapters/adapters.js","../../../node_modules/axios/lib/core/dispatchRequest.js","../../../node_modules/axios/lib/env/data.js","../../../node_modules/axios/lib/helpers/validator.js","../../../node_modules/axios/lib/core/Axios.js","../../../node_modules/axios/lib/cancel/CancelToken.js","../../../node_modules/axios/lib/helpers/spread.js","../../../node_modules/axios/lib/helpers/isAxiosError.js","../../../node_modules/axios/lib/helpers/HttpStatusCode.js","../../../node_modules/axios/lib/axios.js","../../../node_modules/deepmerge/dist/cjs.js","../../../node_modules/es-errors/index.js","../../../node_modules/es-errors/eval.js","../../../node_modules/es-errors/range.js","../../../node_modules/es-errors/ref.js","../../../node_modules/es-errors/syntax.js","../../../node_modules/es-errors/type.js","../../../node_modules/es-errors/uri.js","../../../node_modules/has-symbols/shams.js","../../../node_modules/has-symbols/index.js","../../../node_modules/has-proto/index.js","../../../node_modules/function-bind/implementation.js","../../../node_modules/function-bind/index.js","../../../node_modules/hasown/index.js","../../../node_modules/get-intrinsic/index.js","../../../node_modules/es-define-property/index.js","../../../node_modules/gopd/index.js","../../../node_modules/define-data-property/index.js","../../../node_modules/has-property-descriptors/index.js","../../../node_modules/set-function-length/index.js","../../../node_modules/call-bind/index.js","../../../node_modules/call-bind/callBound.js","../../../__vite-browser-external","../../../node_modules/object-inspect/index.js","../../../node_modules/side-channel/index.js","../../../node_modules/qs/lib/formats.js","../../../node_modules/qs/lib/utils.js","../../../node_modules/qs/lib/stringify.js","../../../node_modules/qs/lib/parse.js","../../../node_modules/qs/lib/index.js","../../../node_modules/nprogress/nprogress.js","../../../node_modules/@inertiajs/core/dist/index.esm.js","../../../node_modules/lodash.isequal/index.js","../../../node_modules/@inertiajs/react/dist/index.esm.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/client.js","../../../app/javascript/entrypoints/inertia.js"],"sourcesContent":["/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1 2 ? (arity - 2) : 1;\n return (length && length <= arity) ? result : baseAry(result, arity);\n }\n return result;\n };\n },\n 'mixin': function(mixin) {\n return function(source) {\n var func = this;\n if (!isFunction(func)) {\n return mixin(func, Object(source));\n }\n var pairs = [];\n each(keys(source), function(key) {\n if (isFunction(source[key])) {\n pairs.push([key, func.prototype[key]]);\n }\n });\n\n mixin(func, Object(source));\n\n each(pairs, function(pair) {\n var value = pair[1];\n if (isFunction(value)) {\n func.prototype[pair[0]] = value;\n } else {\n delete func.prototype[pair[0]];\n }\n });\n return func;\n };\n },\n 'nthArg': function(nthArg) {\n return function(n) {\n var arity = n < 0 ? 1 : (toInteger(n) + 1);\n return curry(nthArg(n), arity);\n };\n },\n 'rearg': function(rearg) {\n return function(func, indexes) {\n var arity = indexes ? indexes.length : 0;\n return curry(rearg(func, indexes), arity);\n };\n },\n 'runInContext': function(runInContext) {\n return function(context) {\n return baseConvert(util, runInContext(context), options);\n };\n }\n };\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Casts `func` to a function with an arity capped iteratee if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @returns {Function} Returns the cast function.\n */\n function castCap(name, func) {\n if (config.cap) {\n var indexes = mapping.iterateeRearg[name];\n if (indexes) {\n return iterateeRearg(func, indexes);\n }\n var n = !isLib && mapping.iterateeAry[name];\n if (n) {\n return iterateeAry(func, n);\n }\n }\n return func;\n }\n\n /**\n * Casts `func` to a curried function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castCurry(name, func, n) {\n return (forceCurry || (config.curry && n > 1))\n ? curry(func, n)\n : func;\n }\n\n /**\n * Casts `func` to a fixed arity function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the cast function.\n */\n function castFixed(name, func, n) {\n if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {\n var data = mapping.methodSpread[name],\n start = data && data.start;\n\n return start === undefined ? ary(func, n) : flatSpread(func, start);\n }\n return func;\n }\n\n /**\n * Casts `func` to an rearged function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castRearg(name, func, n) {\n return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))\n ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])\n : func;\n }\n\n /**\n * Creates a clone of `object` by `path`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {Array|string} path The path to clone by.\n * @returns {Object} Returns the cloned object.\n */\n function cloneByPath(object, path) {\n path = toPath(path);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n result = clone(Object(object)),\n nested = result;\n\n while (nested != null && ++index < length) {\n var key = path[index],\n value = nested[key];\n\n if (value != null &&\n !(isFunction(value) || isError(value) || isWeakMap(value))) {\n nested[key] = clone(index == lastIndex ? value : Object(value));\n }\n nested = nested[key];\n }\n return result;\n }\n\n /**\n * Converts `lodash` to an immutable auto-curried iteratee-first data-last\n * version with conversion `options` applied.\n *\n * @param {Object} [options] The options object. See `baseConvert` for more details.\n * @returns {Function} Returns the converted `lodash`.\n */\n function convertLib(options) {\n return _.runInContext.convert(options)(undefined);\n }\n\n /**\n * Create a converter function for `func` of `name`.\n *\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @returns {Function} Returns the new converter function.\n */\n function createConverter(name, func) {\n var realName = mapping.aliasToReal[name] || name,\n methodName = mapping.remap[realName] || realName,\n oldOptions = options;\n\n return function(options) {\n var newUtil = isLib ? pristine : helpers,\n newFunc = isLib ? pristine[methodName] : func,\n newOptions = assign(assign({}, oldOptions), options);\n\n return baseConvert(newUtil, realName, newFunc, newOptions);\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee, with up to `n`\n * arguments, ignoring any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap iteratee arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\n function iterateeAry(func, n) {\n return overArg(func, function(func) {\n return typeof func == 'function' ? baseAry(func, n) : func;\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee with arguments\n * arranged according to the specified `indexes` where the argument value at\n * the first index is provided as the first argument, the argument value at\n * the second index is provided as the second argument, and so on.\n *\n * @private\n * @param {Function} func The function to rearrange iteratee arguments for.\n * @param {number[]} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n */\n function iterateeRearg(func, indexes) {\n return overArg(func, function(func) {\n var n = indexes.length;\n return baseArity(rearg(baseAry(func, n), indexes), n);\n });\n }\n\n /**\n * Creates a function that invokes `func` with its first 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 */\n function overArg(func, transform) {\n return function() {\n var length = arguments.length;\n if (!length) {\n return func();\n }\n var args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var index = config.rearg ? 0 : (length - 1);\n args[index] = transform(args[index]);\n return func.apply(undefined, args);\n };\n }\n\n /**\n * Creates a function that wraps `func` and applys the conversions\n * rules by `name`.\n *\n * @private\n * @param {string} name The name of the function to wrap.\n * @param {Function} func The function to wrap.\n * @returns {Function} Returns the converted function.\n */\n function wrap(name, func, placeholder) {\n var result,\n realName = mapping.aliasToReal[name] || name,\n wrapped = func,\n wrapper = wrappers[realName];\n\n if (wrapper) {\n wrapped = wrapper(func);\n }\n else if (config.immutable) {\n if (mapping.mutate.array[realName]) {\n wrapped = wrapImmutable(func, cloneArray);\n }\n else if (mapping.mutate.object[realName]) {\n wrapped = wrapImmutable(func, createCloner(func));\n }\n else if (mapping.mutate.set[realName]) {\n wrapped = wrapImmutable(func, cloneByPath);\n }\n }\n each(aryMethodKeys, function(aryKey) {\n each(mapping.aryMethod[aryKey], function(otherName) {\n if (realName == otherName) {\n var data = mapping.methodSpread[realName],\n afterRearg = data && data.afterRearg;\n\n result = afterRearg\n ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)\n : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);\n\n result = castCap(realName, result);\n result = castCurry(realName, result, aryKey);\n return false;\n }\n });\n return !result;\n });\n\n result || (result = wrapped);\n if (result == func) {\n result = forceCurry ? curry(result, 1) : function() {\n return func.apply(this, arguments);\n };\n }\n result.convert = createConverter(realName, func);\n result.placeholder = func.placeholder = placeholder;\n\n return result;\n }\n\n /*--------------------------------------------------------------------------*/\n\n if (!isObj) {\n return wrap(name, func, defaultHolder);\n }\n var _ = func;\n\n // Convert methods by ary cap.\n var pairs = [];\n each(aryMethodKeys, function(aryKey) {\n each(mapping.aryMethod[aryKey], function(key) {\n var func = _[mapping.remap[key] || key];\n if (func) {\n pairs.push([key, wrap(key, func, _)]);\n }\n });\n });\n\n // Convert remaining methods.\n each(keys(_), function(key) {\n var func = _[key];\n if (typeof func == 'function') {\n var length = pairs.length;\n while (length--) {\n if (pairs[length][0] == key) {\n return;\n }\n }\n func.convert = createConverter(key, func);\n pairs.push([key, func]);\n }\n });\n\n // Assign to `_` leaving `_.prototype` unchanged to allow chaining.\n each(pairs, function(pair) {\n _[pair[0]] = pair[1];\n });\n\n _.convert = convertLib;\n _.placeholder = _;\n\n // Assign aliases.\n each(keys(_), function(key) {\n each(mapping.realToAlias[key] || [], function(alias) {\n _[alias] = _[key];\n });\n });\n\n return _;\n}\n\nmodule.exports = baseConvert;\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\nmodule.exports = identity;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_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\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\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 * 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.toString;\n\n/** Built-in value references. */\nvar symToStringTag = 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.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = 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.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\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_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\nmodule.exports = baseGetTag;\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\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[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(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 || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var coreJsData = require('./_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\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.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.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_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 = 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 = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).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(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\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\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_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\nmodule.exports = getNative;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var WeakMap = require('./_WeakMap');\n\n/** Used to store function metadata. */\nvar metaMap = WeakMap && new WeakMap;\n\nmodule.exports = metaMap;\n","var identity = require('./identity'),\n metaMap = require('./_metaMap');\n\n/**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n};\n\nmodule.exports = baseSetData;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var baseCreate = require('./_baseCreate'),\n isObject = require('./isObject');\n\n/**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n}\n\nmodule.exports = createCtor;\n","var createCtor = require('./_createCtor'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n}\n\nmodule.exports = createBind;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n}\n\nmodule.exports = composeArgs;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n}\n\nmodule.exports = composeArgsRight;\n","/**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\nfunction countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n}\n\nmodule.exports = countHolders;\n","/**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\nfunction baseLodash() {\n // No operation performed.\n}\n\nmodule.exports = baseLodash;\n","var baseCreate = require('./_baseCreate'),\n baseLodash = require('./_baseLodash');\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\nfunction LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n}\n\n// Ensure `LazyWrapper` is an instance of `baseLodash`.\nLazyWrapper.prototype = baseCreate(baseLodash.prototype);\nLazyWrapper.prototype.constructor = LazyWrapper;\n\nmodule.exports = LazyWrapper;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var metaMap = require('./_metaMap'),\n noop = require('./noop');\n\n/**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\nvar getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n};\n\nmodule.exports = getData;\n","/** Used to lookup unminified function names. */\nvar realNames = {};\n\nmodule.exports = realNames;\n","var realNames = require('./_realNames');\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 * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\nfunction getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n}\n\nmodule.exports = getFuncName;\n","var baseCreate = require('./_baseCreate'),\n baseLodash = require('./_baseLodash');\n\n/**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\nfunction LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n}\n\nLodashWrapper.prototype = baseCreate(baseLodash.prototype);\nLodashWrapper.prototype.constructor = LodashWrapper;\n\nmodule.exports = LodashWrapper;\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\nmodule.exports = isArray;\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\nmodule.exports = isObjectLike;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var LazyWrapper = require('./_LazyWrapper'),\n LodashWrapper = require('./_LodashWrapper'),\n copyArray = require('./_copyArray');\n\n/**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\nfunction wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n}\n\nmodule.exports = wrapperClone;\n","var LazyWrapper = require('./_LazyWrapper'),\n LodashWrapper = require('./_LodashWrapper'),\n baseLodash = require('./_baseLodash'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike'),\n wrapperClone = require('./_wrapperClone');\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 * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\nfunction lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n}\n\n// Ensure wrappers are instances of `baseLodash`.\nlodash.prototype = baseLodash.prototype;\nlodash.prototype.constructor = lodash;\n\nmodule.exports = lodash;\n","var LazyWrapper = require('./_LazyWrapper'),\n getData = require('./_getData'),\n getFuncName = require('./_getFuncName'),\n lodash = require('./wrapperLodash');\n\n/**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\nfunction isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n}\n\nmodule.exports = isLaziable;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetData = require('./_baseSetData'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar setData = shortOut(baseSetData);\n\nmodule.exports = setData;\n","/** Used to match wrap detail comments. */\nvar reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n/**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\nfunction getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n}\n\nmodule.exports = getWrapDetails;\n","/** Used to match wrap detail comments. */\nvar reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/;\n\n/**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\nfunction insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n}\n\nmodule.exports = insertWrapDetails;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee 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 `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","var arrayEach = require('./_arrayEach'),\n arrayIncludes = require('./_arrayIncludes');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n/** Used to associate wrap methods with their bit flags. */\nvar wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n];\n\n/**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\nfunction updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n}\n\nmodule.exports = updateWrapDetails;\n","var getWrapDetails = require('./_getWrapDetails'),\n insertWrapDetails = require('./_insertWrapDetails'),\n setToString = require('./_setToString'),\n updateWrapDetails = require('./_updateWrapDetails');\n\n/**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\nfunction setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n}\n\nmodule.exports = setWrapToString;\n","var isLaziable = require('./_isLaziable'),\n setData = require('./_setData'),\n setWrapToString = require('./_setWrapToString');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n}\n\nmodule.exports = createRecurry;\n","/**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\nfunction getHolder(func) {\n var object = func;\n return object.placeholder;\n}\n\nmodule.exports = getHolder;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 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 : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var copyArray = require('./_copyArray'),\n isIndex = require('./_isIndex');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\nfunction reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n}\n\nmodule.exports = reorder;\n","/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\nfunction replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n}\n\nmodule.exports = replaceHolders;\n","var composeArgs = require('./_composeArgs'),\n composeArgsRight = require('./_composeArgsRight'),\n countHolders = require('./_countHolders'),\n createCtor = require('./_createCtor'),\n createRecurry = require('./_createRecurry'),\n getHolder = require('./_getHolder'),\n reorder = require('./_reorder'),\n replaceHolders = require('./_replaceHolders'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_ARY_FLAG = 128,\n WRAP_FLIP_FLAG = 512;\n\n/**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n}\n\nmodule.exports = createHybrid;\n","var apply = require('./_apply'),\n createCtor = require('./_createCtor'),\n createHybrid = require('./_createHybrid'),\n createRecurry = require('./_createRecurry'),\n getHolder = require('./_getHolder'),\n replaceHolders = require('./_replaceHolders'),\n root = require('./_root');\n\n/**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n}\n\nmodule.exports = createCurry;\n","var apply = require('./_apply'),\n createCtor = require('./_createCtor'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n}\n\nmodule.exports = createPartial;\n","var composeArgs = require('./_composeArgs'),\n composeArgsRight = require('./_composeArgsRight'),\n replaceHolders = require('./_replaceHolders');\n\n/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\nfunction mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n}\n\nmodule.exports = mergeData;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\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(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var baseSetData = require('./_baseSetData'),\n createBind = require('./_createBind'),\n createCurry = require('./_createCurry'),\n createHybrid = require('./_createHybrid'),\n createPartial = require('./_createPartial'),\n getData = require('./_getData'),\n mergeData = require('./_mergeData'),\n setData = require('./_setData'),\n setWrapToString = require('./_setWrapToString'),\n toInteger = require('./toInteger');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n}\n\nmodule.exports = createWrap;\n","var createWrap = require('./_createWrap');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_ARY_FLAG = 128;\n\n/**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\nfunction ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n}\n\nmodule.exports = ary;\n","var defineProperty = require('./_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\nmodule.exports = baseAssignValue;\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\nmodule.exports = eq;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\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 * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\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 assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\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\nmodule.exports = baseTimes;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[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(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\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/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.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(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\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\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == '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;\n\nmodule.exports = isBuffer;\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\nmodule.exports = isLength;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[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] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = 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(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\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\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == '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","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\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\nmodule.exports = isTypedArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\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 * 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(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(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.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\nmodule.exports = arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = 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;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\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\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\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 * 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.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\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(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./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(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\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\nmodule.exports = listCacheClear;\n","var eq = require('./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(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_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\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\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\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\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\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\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\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_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\nmodule.exports = ListCache;\n","var ListCache = require('./_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\nmodule.exports = stackClear;\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\nmodule.exports = stackDelete;\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\nmodule.exports = stackGet;\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\nmodule.exports = stackHas;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_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\nmodule.exports = hashClear;\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\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\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 * 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 ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\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 * 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.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__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 : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_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\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\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\nmodule.exports = mapCacheClear;\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\nmodule.exports = isKeyable;\n","var isKeyable = require('./_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\nmodule.exports = getMapData;\n","var getMapData = require('./_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\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\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\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\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\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\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\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_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\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_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\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_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\nmodule.exports = Stack;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\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 * The base implementation of `_.keysIn` 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 baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\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 * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == '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 allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\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\nmodule.exports = arrayFilter;\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\nmodule.exports = stubArray;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.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 : 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\nmodule.exports = getSymbols;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\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\nmodule.exports = arrayPush;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\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 and inherited 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 getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\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(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\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, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * 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 getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[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 ? 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\nmodule.exports = getTag;\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 * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[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/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\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 map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\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 set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[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 supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = clone;\n","var createWrap = require('./_createWrap');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_FLAG = 8;\n\n/**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\nfunction curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n}\n\n// Assign default placeholders.\ncurry.placeholder = {};\n\nmodule.exports = curry;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = 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 = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike'),\n isPlainObject = require('./isPlainObject');\n\n/** `Object#toString` result references. */\nvar domExcTag = '[object DOMException]',\n errorTag = '[object Error]';\n\n/**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\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 an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\nfunction isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n}\n\nmodule.exports = isError;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar weakMapTag = '[object WeakMap]';\n\n/**\n * Checks if `value` is classified as a `WeakMap` object.\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 weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\nfunction isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n}\n\nmodule.exports = isWeakMap;\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\nmodule.exports = setCacheAdd;\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\nmodule.exports = setCacheHas;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_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\nmodule.exports = SetCache;\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\nmodule.exports = arraySome;\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\nmodule.exports = cacheHas;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 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,\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) ? 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\nmodule.exports = equalArrays;\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\nmodule.exports = mapToArray;\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\nmodule.exports = setToArray;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.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:\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(+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:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\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;\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:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\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 `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,\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.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\nmodule.exports = equalObjects;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 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(object),\n othIsArr = isArray(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(object)) {\n if (!isBuffer(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(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)) {\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\nmodule.exports = baseIsEqualDeep;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\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(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\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 `_.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 | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","var isObject = require('./isObject');\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(value);\n}\n\nmodule.exports = isStrictComparable;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\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(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\nmodule.exports = getMatchData;\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\nmodule.exports = matchesStrictComparable;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_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\nmodule.exports = baseMatches;\n","var isArray = require('./isArray'),\n isSymbol = require('./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(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","var MapCache = require('./_MapCache');\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\nmodule.exports = memoize;\n","var memoize = require('./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(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\nmodule.exports = memoizeCapped;\n","var memoizeCapped = require('./_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\nmodule.exports = stringToPath;\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\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 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(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_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\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./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(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isSymbol = require('./isSymbol');\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(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n toKey = require('./_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\nmodule.exports = baseGet;\n","var baseGet = require('./_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\nmodule.exports = get;\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\nmodule.exports = baseHasIn;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\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(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_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\nmodule.exports = hasIn;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\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(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\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\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\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\nmodule.exports = basePropertyDeep;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\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\nmodule.exports = property;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./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;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n","var baseClone = require('./_baseClone'),\n baseIteratee = require('./_baseIteratee');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a function that invokes `func` with the arguments of the created\n * function. If `func` is a property name, the created function returns the\n * property value for a given element. If `func` is an array or object, the\n * created function returns `true` for elements that contain the equivalent\n * source properties, otherwise it returns `false`.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Util\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @returns {Function} Returns the callback.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, _.iteratee(['user', 'fred']));\n * // => [{ 'user': 'fred', 'age': 40 }]\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, _.iteratee('user'));\n * // => ['barney', 'fred']\n *\n * // Create custom iteratee shorthands.\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\n * return func.test(string);\n * };\n * });\n *\n * _.filter(['abc', 'def'], /ef/);\n * // => ['def']\n */\nfunction iteratee(func) {\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n}\n\nmodule.exports = iteratee;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var createWrap = require('./_createWrap'),\n flatRest = require('./_flatRest');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_REARG_FLAG = 256;\n\n/**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\nvar rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n});\n\nmodule.exports = rearg;\n","var arrayMap = require('./_arrayMap'),\n copyArray = require('./_copyArray'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol'),\n stringToPath = require('./_stringToPath'),\n toKey = require('./_toKey'),\n toString = require('./toString');\n\n/**\n * Converts `value` to a property path array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {*} value The value to convert.\n * @returns {Array} Returns the new property path array.\n * @example\n *\n * _.toPath('a.b.c');\n * // => ['a', 'b', 'c']\n *\n * _.toPath('a[0].b.c');\n * // => ['a', '0', 'b', 'c']\n */\nfunction toPath(value) {\n if (isArray(value)) {\n return arrayMap(value, toKey);\n }\n return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n}\n\nmodule.exports = toPath;\n","module.exports = {\n 'ary': require('../ary'),\n 'assign': require('../_baseAssign'),\n 'clone': require('../clone'),\n 'curry': require('../curry'),\n 'forEach': require('../_arrayEach'),\n 'isArray': require('../isArray'),\n 'isError': require('../isError'),\n 'isFunction': require('../isFunction'),\n 'isWeakMap': require('../isWeakMap'),\n 'iteratee': require('../iteratee'),\n 'keys': require('../_baseKeys'),\n 'rearg': require('../rearg'),\n 'toInteger': require('../toInteger'),\n 'toPath': require('../toPath')\n};\n","var baseConvert = require('./_baseConvert'),\n util = require('./_util');\n\n/**\n * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last\n * version with conversion `options` applied. If `name` is an object its methods\n * will be converted.\n *\n * @param {string} name The name of the function to wrap.\n * @param {Function} [func] The function to wrap.\n * @param {Object} [options] The options object. See `baseConvert` for more details.\n * @returns {Function|Object} Returns the converted function or object.\n */\nfunction convert(name, func, options) {\n return baseConvert(util, name, func, options);\n}\n\nmodule.exports = convert;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\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 assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignMergeValue;\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\nmodule.exports = createBaseFor;\n","var createBaseFor = require('./_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\nmodule.exports = baseFor;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an 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 an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\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 safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nmodule.exports = safeGet;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n","var assignMergeValue = require('./_assignMergeValue'),\n cloneBuffer = require('./_cloneBuffer'),\n cloneTypedArray = require('./_cloneTypedArray'),\n copyArray = require('./_copyArray'),\n initCloneObject = require('./_initCloneObject'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n isBuffer = require('./isBuffer'),\n isFunction = require('./isFunction'),\n isObject = require('./isObject'),\n isPlainObject = require('./isPlainObject'),\n isTypedArray = require('./isTypedArray'),\n safeGet = require('./_safeGet'),\n toPlainObject = require('./toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nmodule.exports = baseMergeDeep;\n","var Stack = require('./_Stack'),\n assignMergeValue = require('./_assignMergeValue'),\n baseFor = require('./_baseFor'),\n baseMergeDeep = require('./_baseMergeDeep'),\n isObject = require('./isObject'),\n keysIn = require('./keysIn'),\n safeGet = require('./_safeGet');\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nmodule.exports = baseMerge;\n","var baseMerge = require('./_baseMerge'),\n isObject = require('./isObject');\n\n/**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\nfunction customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n}\n\nmodule.exports = customDefaultsMerge;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","var baseMerge = require('./_baseMerge'),\n createAssigner = require('./_createAssigner');\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n});\n\nmodule.exports = mergeWith;\n","var apply = require('./_apply'),\n baseRest = require('./_baseRest'),\n customDefaultsMerge = require('./_customDefaultsMerge'),\n mergeWith = require('./mergeWith');\n\n/**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\nvar defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n});\n\nmodule.exports = defaultsDeep;\n","var convert = require('./convert'),\n func = convert('defaultsDeep', require('../defaultsDeep'));\n\nfunc.placeholder = require('./placeholder');\nmodule.exports = func;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.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 * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseDifference;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n last = require('./last');\n\n/**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\nvar differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n});\n\nmodule.exports = differenceWith;\n","/**\n * vis-network\n * https://visjs.github.io/vis-network/\n *\n * A dynamic, browser-based visualization library.\n *\n * @version 7.10.2\n * @date 2020-07-25T19:58:51.154Z\n *\n * @copyright (c) 2011-2017 Almende B.V, http://almende.com\n * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs\n *\n * @license\n * vis.js is dual licensed under both\n *\n * 1. The Apache 2.0 License\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * and\n *\n * 2. The MIT License\n * http://opensource.org/licenses/MIT\n *\n * vis.js may be distributed under either license.\n */\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction createCommonjsModule(fn, basedir, module) {\n\treturn module = {\n\t path: basedir,\n\t exports: {},\n\t require: function (path, base) {\n return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);\n }\n\t}, fn(module, module.exports), module.exports;\n}\n\nfunction commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');\n}\n\nvar check = function (it) {\n return it && it.Math == Math && it;\n}; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n\n\nvar global_1 = // eslint-disable-next-line no-undef\ncheck(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func\nFunction('return this')();\n\nvar fails = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n\nvar descriptors = !fails(function () {\n return Object.defineProperty({}, 1, {\n get: function () {\n return 7;\n }\n })[1] != 7;\n});\n\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug\n\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({\n 1: 2\n}, 1); // `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\n\nvar f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\nvar objectPropertyIsEnumerable = {\n f: f\n};\n\nvar createPropertyDescriptor = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\nvar toString = {}.toString;\n\nvar classofRaw = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\nvar split = ''.split; // fallback for non-array-like ES3 and non-enumerable old V8 strings\n\nvar indexedObject = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nvar requireObjectCoercible = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\nvar toIndexedObject = function (it) {\n return indexedObject(requireObjectCoercible(it));\n};\n\nvar isObject = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\n\nvar toPrimitive = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nvar has = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\nvar document$1 = global_1.document; // typeof document.createElement is 'object' in old IE\n\nvar EXISTS = isObject(document$1) && isObject(document$1.createElement);\n\nvar documentCreateElement = function (it) {\n return EXISTS ? document$1.createElement(it) : {};\n};\n\nvar ie8DomDefine = !descriptors && !fails(function () {\n return Object.defineProperty(documentCreateElement('div'), 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\n\nvar f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (ie8DomDefine) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) {\n /* empty */\n }\n if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);\n};\nvar objectGetOwnPropertyDescriptor = {\n f: f$1\n};\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == 'function' ? fails(detection) : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\nvar isForced_1 = isForced;\n\nvar path = {};\n\nvar aFunction = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n }\n\n return it;\n};\n\nvar functionBindContext = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n\n switch (length) {\n case 0:\n return function () {\n return fn.call(that);\n };\n\n case 1:\n return function (a) {\n return fn.call(that, a);\n };\n\n case 2:\n return function (a, b) {\n return fn.call(that, a, b);\n };\n\n case 3:\n return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n\n return function ()\n /* ...args */\n {\n return fn.apply(that, arguments);\n };\n};\n\nvar anObject = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n }\n\n return it;\n};\n\nvar nativeDefineProperty = Object.defineProperty; // `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\n\nvar f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (ie8DomDefine) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) {\n /* empty */\n }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\nvar objectDefineProperty = {\n f: f$2\n};\n\nvar createNonEnumerableProperty = descriptors ? function (object, key, value) {\n return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\nvar getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;\n\nvar wrapConstructor = function (NativeConstructor) {\n var Wrapper = function (a, b, c) {\n if (this instanceof NativeConstructor) {\n switch (arguments.length) {\n case 0:\n return new NativeConstructor();\n\n case 1:\n return new NativeConstructor(a);\n\n case 2:\n return new NativeConstructor(a, b);\n }\n\n return new NativeConstructor(a, b, c);\n }\n\n return NativeConstructor.apply(this, arguments);\n };\n\n Wrapper.prototype = NativeConstructor.prototype;\n return Wrapper;\n};\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\n\n\nvar _export = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var PROTO = options.proto;\n var nativeSource = GLOBAL ? global_1 : STATIC ? global_1[TARGET] : (global_1[TARGET] || {}).prototype;\n var target = GLOBAL ? path : path[TARGET] || (path[TARGET] = {});\n var targetPrototype = target.prototype;\n var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;\n var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;\n\n for (key in source) {\n FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contains in native\n\n USE_NATIVE = !FORCED && nativeSource && has(nativeSource, key);\n targetProperty = target[key];\n if (USE_NATIVE) if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor$1(nativeSource, key);\n nativeProperty = descriptor && descriptor.value;\n } else nativeProperty = nativeSource[key]; // export native or implementation\n\n sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key];\n if (USE_NATIVE && typeof targetProperty === typeof sourceProperty) continue; // bind timers to global for call from export context\n\n if (options.bind && USE_NATIVE) resultProperty = functionBindContext(sourceProperty, global_1); // wrap global constructors for prevent changs in this version\n else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty); // make static versions for prototype methods\n else if (PROTO && typeof sourceProperty == 'function') resultProperty = functionBindContext(Function.call, sourceProperty); // default case\n else resultProperty = sourceProperty; // add a flag to not completely full polyfills\n\n if (options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) {\n createNonEnumerableProperty(resultProperty, 'sham', true);\n }\n\n target[key] = resultProperty;\n\n if (PROTO) {\n VIRTUAL_PROTOTYPE = TARGET + 'Prototype';\n\n if (!has(path, VIRTUAL_PROTOTYPE)) {\n createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});\n } // export virtual prototype methods\n\n\n path[VIRTUAL_PROTOTYPE][key] = sourceProperty; // export real prototype methods\n\n if (options.real && targetPrototype && !targetPrototype[key]) {\n createNonEnumerableProperty(targetPrototype, key, sourceProperty);\n }\n }\n }\n};\n\nvar slice = [].slice;\nvar factories = {};\n\nvar construct = function (C, argsLength, args) {\n if (!(argsLength in factories)) {\n for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']'; // eslint-disable-next-line no-new-func\n\n\n factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');\n }\n\n return factories[argsLength](C, args);\n}; // `Function.prototype.bind` method implementation\n// https://tc39.github.io/ecma262/#sec-function.prototype.bind\n\n\nvar functionBind = Function.bind || function bind(that\n/* , ...args */\n) {\n var fn = aFunction(this);\n var partArgs = slice.call(arguments, 1);\n\n var boundFunction = function bound()\n /* args... */\n {\n var args = partArgs.concat(slice.call(arguments));\n return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);\n };\n\n if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;\n return boundFunction;\n};\n\n// https://tc39.github.io/ecma262/#sec-function.prototype.bind\n\n_export({\n target: 'Function',\n proto: true\n}, {\n bind: functionBind\n});\n\nvar entryVirtual = function (CONSTRUCTOR) {\n return path[CONSTRUCTOR + 'Prototype'];\n};\n\nvar bind = entryVirtual('Function').bind;\n\nvar FunctionPrototype = Function.prototype;\n\nvar bind_1 = function (it) {\n var own = it.bind;\n return it === FunctionPrototype || it instanceof Function && own === FunctionPrototype.bind ? bind : own;\n};\n\nvar bind$1 = bind_1;\n\nvar bind$2 = bind$1;\n\nvar ceil = Math.ceil;\nvar floor = Math.floor; // `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\n\nvar toInteger = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n\nvar min = Math.min; // `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\n\nvar toLength = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n\nvar max = Math.max;\nvar min$1 = Math.min; // Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\n\nvar toAbsoluteIndex = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min$1(integer, length);\n};\n\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value; // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++]; // eslint-disable-next-line no-self-compare\n\n if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not\n } else for (; length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n }\n return !IS_INCLUDES && -1;\n };\n};\n\nvar arrayIncludes = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n\nvar hiddenKeys = {};\n\nvar indexOf = arrayIncludes.indexOf;\n\nvar objectKeysInternal = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); // Don't enum bug & hidden keys\n\n\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n\n return result;\n};\n\n// IE8- don't enum bug keys\nvar enumBugKeys = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf'];\n\n// https://tc39.github.io/ecma262/#sec-object.keys\n\nvar objectKeys = Object.keys || function keys(O) {\n return objectKeysInternal(O, enumBugKeys);\n};\n\nvar f$3 = Object.getOwnPropertySymbols;\nvar objectGetOwnPropertySymbols = {\n f: f$3\n};\n\n// https://tc39.github.io/ecma262/#sec-toobject\n\nvar toObject = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n\nvar nativeAssign = Object.assign;\nvar defineProperty = Object.defineProperty; // `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\n\nvar objectAssign = !nativeAssign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (descriptors && nativeAssign({\n b: 1\n }, nativeAssign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), {\n b: 2\n })).b !== 1) return true; // should work with symbols and should have deterministic property order (V8 bug)\n\n var A = {};\n var B = {}; // eslint-disable-next-line no-undef\n\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) {\n B[chr] = chr;\n });\n return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) {\n // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;\n var propertyIsEnumerable = objectPropertyIsEnumerable.f;\n\n while (argumentsLength > index) {\n var S = indexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n\n while (length > j) {\n key = keys[j++];\n if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n }\n\n return T;\n} : nativeAssign;\n\n// https://tc39.github.io/ecma262/#sec-object.assign\n\n_export({\n target: 'Object',\n stat: true,\n forced: Object.assign !== objectAssign\n}, {\n assign: objectAssign\n});\n\nvar assign = path.Object.assign;\n\nvar assign$1 = assign;\n\nvar assign$2 = assign$1;\n\n/**\r\n * Draw a circle.\r\n *\r\n * @param ctx - The context this shape will be rendered to.\r\n * @param x - The position of the center on the x axis.\r\n * @param y - The position of the center on the y axis.\r\n * @param r - The radius of the circle.\r\n */\nfunction drawCircle(ctx, x, y, r) {\n ctx.beginPath();\n ctx.arc(x, y, r, 0, 2 * Math.PI, false);\n ctx.closePath();\n}\n/**\r\n * Draw a square.\r\n *\r\n * @param ctx - The context this shape will be rendered to.\r\n * @param x - The position of the center on the x axis.\r\n * @param y - The position of the center on the y axis.\r\n * @param r - Half of the width and height of the square.\r\n */\n\nfunction drawSquare(ctx, x, y, r) {\n ctx.beginPath();\n ctx.rect(x - r, y - r, r * 2, r * 2);\n ctx.closePath();\n}\n/**\r\n * Draw an equilateral triangle standing on a side.\r\n *\r\n * @param ctx - The context this shape will be rendered to.\r\n * @param x - The position of the center on the x axis.\r\n * @param y - The position of the center on the y axis.\r\n * @param r - Half of the length of the sides.\r\n *\r\n * @remarks\r\n * http://en.wikipedia.org/wiki/Equilateral_triangle\r\n */\n\nfunction drawTriangle(ctx, x, y, r) {\n ctx.beginPath(); // the change in radius and the offset is here to center the shape\n\n r *= 1.15;\n y += 0.275 * r;\n var s = r * 2;\n var s2 = s / 2;\n var ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n\n var h = Math.sqrt(s * s - s2 * s2); // height\n\n ctx.moveTo(x, y - (h - ir));\n ctx.lineTo(x + s2, y + ir);\n ctx.lineTo(x - s2, y + ir);\n ctx.lineTo(x, y - (h - ir));\n ctx.closePath();\n}\n/**\r\n * Draw an equilateral triangle standing on a vertex.\r\n *\r\n * @param ctx - The context this shape will be rendered to.\r\n * @param x - The position of the center on the x axis.\r\n * @param y - The position of the center on the y axis.\r\n * @param r - Half of the length of the sides.\r\n *\r\n * @remarks\r\n * http://en.wikipedia.org/wiki/Equilateral_triangle\r\n */\n\nfunction drawTriangleDown(ctx, x, y, r) {\n ctx.beginPath(); // the change in radius and the offset is here to center the shape\n\n r *= 1.15;\n y -= 0.275 * r;\n var s = r * 2;\n var s2 = s / 2;\n var ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n\n var h = Math.sqrt(s * s - s2 * s2); // height\n\n ctx.moveTo(x, y + (h - ir));\n ctx.lineTo(x + s2, y - ir);\n ctx.lineTo(x - s2, y - ir);\n ctx.lineTo(x, y + (h - ir));\n ctx.closePath();\n}\n/**\r\n * Draw a star.\r\n *\r\n * @param ctx - The context this shape will be rendered to.\r\n * @param x - The position of the center on the x axis.\r\n * @param y - The position of the center on the y axis.\r\n * @param r - The outer radius of the star.\r\n */\n\nfunction drawStar(ctx, x, y, r) {\n // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\n ctx.beginPath(); // the change in radius and the offset is here to center the shape\n\n r *= 0.82;\n y += 0.1 * r;\n\n for (var n = 0; n < 10; n++) {\n var radius = n % 2 === 0 ? r * 1.3 : r * 0.5;\n ctx.lineTo(x + radius * Math.sin(n * 2 * Math.PI / 10), y - radius * Math.cos(n * 2 * Math.PI / 10));\n }\n\n ctx.closePath();\n}\n/**\r\n * Draw a diamond.\r\n *\r\n * @param ctx - The context this shape will be rendered to.\r\n * @param x - The position of the center on the x axis.\r\n * @param y - The position of the center on the y axis.\r\n * @param r - Half of the width and height of the diamond.\r\n *\r\n * @remarks\r\n * http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\r\n */\n\nfunction drawDiamond(ctx, x, y, r) {\n ctx.beginPath();\n ctx.lineTo(x, y + r);\n ctx.lineTo(x + r, y);\n ctx.lineTo(x, y - r);\n ctx.lineTo(x - r, y);\n ctx.closePath();\n}\n/**\r\n * Draw a rectangle with rounded corners.\r\n *\r\n * @param ctx - The context this shape will be rendered to.\r\n * @param x - The position of the center on the x axis.\r\n * @param y - The position of the center on the y axis.\r\n * @param w - The width of the rectangle.\r\n * @param h - The height of the rectangle.\r\n * @param r - The radius of the corners.\r\n *\r\n * @remarks\r\n * http://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-on-html-canvas\r\n */\n\nfunction drawRoundRect(ctx, x, y, w, h, r) {\n var r2d = Math.PI / 180;\n\n if (w - 2 * r < 0) {\n r = w / 2;\n } //ensure that the radius isn't too large for x\n\n\n if (h - 2 * r < 0) {\n r = h / 2;\n } //ensure that the radius isn't too large for y\n\n\n ctx.beginPath();\n ctx.moveTo(x + r, y);\n ctx.lineTo(x + w - r, y);\n ctx.arc(x + w - r, y + r, r, r2d * 270, r2d * 360, false);\n ctx.lineTo(x + w, y + h - r);\n ctx.arc(x + w - r, y + h - r, r, 0, r2d * 90, false);\n ctx.lineTo(x + r, y + h);\n ctx.arc(x + r, y + h - r, r, r2d * 90, r2d * 180, false);\n ctx.lineTo(x, y + r);\n ctx.arc(x + r, y + r, r, r2d * 180, r2d * 270, false);\n ctx.closePath();\n}\n/**\r\n * Draw an ellipse.\r\n *\r\n * @param ctx - The context this shape will be rendered to.\r\n * @param x - The position of the center on the x axis.\r\n * @param y - The position of the center on the y axis.\r\n * @param w - The width of the ellipse.\r\n * @param h - The height of the ellipse.\r\n *\r\n * @remarks\r\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\r\n *\r\n * Postfix '_vis' added to discern it from standard method ellipse().\r\n */\n\nfunction drawEllipse(ctx, x, y, w, h) {\n var kappa = 0.5522848,\n ox = w / 2 * kappa,\n // control point offset horizontal\n oy = h / 2 * kappa,\n // control point offset vertical\n xe = x + w,\n // x-end\n ye = y + h,\n // y-end\n xm = x + w / 2,\n // x-middle\n ym = y + h / 2; // y-middle\n\n ctx.beginPath();\n ctx.moveTo(x, ym);\n ctx.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n ctx.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n ctx.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n ctx.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n ctx.closePath();\n}\n/**\r\n * Draw an isometric cylinder.\r\n *\r\n * @param ctx - The context this shape will be rendered to.\r\n * @param x - The position of the center on the x axis.\r\n * @param y - The position of the center on the y axis.\r\n * @param w - The width of the database.\r\n * @param h - The height of the database.\r\n *\r\n * @remarks\r\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\r\n */\n\nfunction drawDatabase(ctx, x, y, w, h) {\n var f = 1 / 3;\n var wEllipse = w;\n var hEllipse = h * f;\n var kappa = 0.5522848,\n ox = wEllipse / 2 * kappa,\n // control point offset horizontal\n oy = hEllipse / 2 * kappa,\n // control point offset vertical\n xe = x + wEllipse,\n // x-end\n ye = y + hEllipse,\n // y-end\n xm = x + wEllipse / 2,\n // x-middle\n ym = y + hEllipse / 2,\n // y-middle\n ymb = y + (h - hEllipse / 2),\n // y-midlle, bottom ellipse\n yeb = y + h; // y-end, bottom ellipse\n\n ctx.beginPath();\n ctx.moveTo(xe, ym);\n ctx.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n ctx.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n ctx.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n ctx.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n ctx.lineTo(xe, ymb);\n ctx.bezierCurveTo(xe, ymb + oy, xm + ox, yeb, xm, yeb);\n ctx.bezierCurveTo(xm - ox, yeb, x, ymb + oy, x, ymb);\n ctx.lineTo(x, ym);\n}\n/**\r\n * Draw a dashed line.\r\n *\r\n * @param ctx - The context this shape will be rendered to.\r\n * @param x - The start position on the x axis.\r\n * @param y - The start position on the y axis.\r\n * @param x2 - The end position on the x axis.\r\n * @param y2 - The end position on the y axis.\r\n * @param pattern - List of lengths starting with line and then alternating between space and line.\r\n *\r\n * @author David Jordan\r\n * @date 2012-08-08\r\n * @remarks\r\n * http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas\r\n */\n\nfunction drawDashedLine(ctx, x, y, x2, y2, pattern) {\n ctx.beginPath();\n ctx.moveTo(x, y);\n var patternLength = pattern.length;\n var dx = x2 - x;\n var dy = y2 - y;\n var slope = dy / dx;\n var distRemaining = Math.sqrt(dx * dx + dy * dy);\n var patternIndex = 0;\n var draw = true;\n var xStep = 0;\n var dashLength = +pattern[0];\n\n while (distRemaining >= 0.1) {\n dashLength = +pattern[patternIndex++ % patternLength];\n\n if (dashLength > distRemaining) {\n dashLength = distRemaining;\n }\n\n xStep = Math.sqrt(dashLength * dashLength / (1 + slope * slope));\n xStep = dx < 0 ? -xStep : xStep;\n x += xStep;\n y += slope * xStep;\n\n if (draw === true) {\n ctx.lineTo(x, y);\n } else {\n ctx.moveTo(x, y);\n }\n\n distRemaining -= dashLength;\n draw = !draw;\n }\n}\n/**\r\n * Draw a hexagon.\r\n *\r\n * @param ctx - The context this shape will be rendered to.\r\n * @param x - The position of the center on the x axis.\r\n * @param y - The position of the center on the y axis.\r\n * @param r - The radius of the hexagon.\r\n */\n\nfunction drawHexagon(ctx, x, y, r) {\n ctx.beginPath();\n var sides = 6;\n var a = Math.PI * 2 / sides;\n ctx.moveTo(x + r, y);\n\n for (var i = 1; i < sides; i++) {\n ctx.lineTo(x + r * Math.cos(a * i), y + r * Math.sin(a * i));\n }\n\n ctx.closePath();\n}\nvar shapeMap = {\n circle: drawCircle,\n dashedLine: drawDashedLine,\n database: drawDatabase,\n diamond: drawDiamond,\n ellipse: drawEllipse,\n ellipse_vis: drawEllipse,\n hexagon: drawHexagon,\n roundRect: drawRoundRect,\n square: drawSquare,\n star: drawStar,\n triangle: drawTriangle,\n triangleDown: drawTriangleDown\n};\n/**\r\n * Returns either custom or native drawing function base on supplied name.\r\n *\r\n * @param name - The name of the function. Either the name of a\r\n * CanvasRenderingContext2D property or an export from shapes.ts without the\r\n * draw prefix.\r\n *\r\n * @returns The function that can be used for rendering. In case of native\r\n * CanvasRenderingContext2D function the API is normalized to\r\n * `(ctx: CanvasRenderingContext2D, ...originalArgs) => void`.\r\n */\n\nfunction getShape(name) {\n if (Object.prototype.hasOwnProperty.call(shapeMap, name)) {\n return shapeMap[name];\n } else {\n return function (ctx) {\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 CanvasRenderingContext2D.prototype[name].call(ctx, args);\n };\n }\n}\n\nvar componentEmitter = createCommonjsModule(function (module) {\n /**\r\n * Expose `Emitter`.\r\n */\n {\n module.exports = Emitter;\n }\n /**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\n\n\n function Emitter(obj) {\n if (obj) return mixin(obj);\n }\n /**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\n\n function mixin(obj) {\n for (var key in Emitter.prototype) {\n obj[key] = Emitter.prototype[key];\n }\n\n return obj;\n }\n /**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\n\n\n Emitter.prototype.on = Emitter.prototype.addEventListener = function (event, fn) {\n this._callbacks = this._callbacks || {};\n (this._callbacks['$' + event] = this._callbacks['$' + event] || []).push(fn);\n return this;\n };\n /**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\n\n\n Emitter.prototype.once = function (event, fn) {\n function on() {\n this.off(event, on);\n fn.apply(this, arguments);\n }\n\n on.fn = fn;\n this.on(event, on);\n return this;\n };\n /**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\n\n\n Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function (event, fn) {\n this._callbacks = this._callbacks || {}; // all\n\n if (0 == arguments.length) {\n this._callbacks = {};\n return this;\n } // specific event\n\n\n var callbacks = this._callbacks['$' + event];\n if (!callbacks) return this; // remove all handlers\n\n if (1 == arguments.length) {\n delete this._callbacks['$' + event];\n return this;\n } // remove specific handler\n\n\n var cb;\n\n for (var i = 0; i < callbacks.length; i++) {\n cb = callbacks[i];\n\n if (cb === fn || cb.fn === fn) {\n callbacks.splice(i, 1);\n break;\n }\n } // Remove event specific arrays for event types that no\n // one is subscribed for to avoid memory leak.\n\n\n if (callbacks.length === 0) {\n delete this._callbacks['$' + event];\n }\n\n return this;\n };\n /**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\n\n\n Emitter.prototype.emit = function (event) {\n this._callbacks = this._callbacks || {};\n var args = new Array(arguments.length - 1),\n callbacks = this._callbacks['$' + event];\n\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n\n if (callbacks) {\n callbacks = callbacks.slice(0);\n\n for (var i = 0, len = callbacks.length; i < len; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n\n return this;\n };\n /**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\n\n\n Emitter.prototype.listeners = function (event) {\n this._callbacks = this._callbacks || {};\n return this._callbacks['$' + event] || [];\n };\n /**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\n\n\n Emitter.prototype.hasListeners = function (event) {\n return !!this.listeners(event).length;\n };\n});\n\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\n\n_export({\n target: 'Object',\n stat: true,\n forced: !descriptors,\n sham: !descriptors\n}, {\n defineProperty: objectDefineProperty.f\n});\n\nvar defineProperty_1 = createCommonjsModule(function (module) {\n var Object = path.Object;\n\n var defineProperty = module.exports = function defineProperty(it, key, desc) {\n return Object.defineProperty(it, key, desc);\n };\n\n if (Object.defineProperty.sham) defineProperty.sham = true;\n});\n\nvar defineProperty$1 = defineProperty_1;\n\nvar defineProperty$2 = defineProperty$1;\n\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\n\nvar objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n\n while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);\n\n return O;\n};\n\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\n\n_export({\n target: 'Object',\n stat: true,\n forced: !descriptors,\n sham: !descriptors\n}, {\n defineProperties: objectDefineProperties\n});\n\nvar defineProperties_1 = createCommonjsModule(function (module) {\n var Object = path.Object;\n\n var defineProperties = module.exports = function defineProperties(T, D) {\n return Object.defineProperties(T, D);\n };\n\n if (Object.defineProperties.sham) defineProperties.sham = true;\n});\n\nvar defineProperties = defineProperties_1;\n\nvar defineProperties$1 = defineProperties;\n\nvar aFunction$1 = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nvar getBuiltIn = function (namespace, method) {\n return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace]) : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];\n};\n\nvar hiddenKeys$1 = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n\nvar f$4 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return objectKeysInternal(O, hiddenKeys$1);\n};\n\nvar objectGetOwnPropertyNames = {\n f: f$4\n};\n\nvar ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = objectGetOwnPropertyNames.f(anObject(it));\n var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n\nvar createProperty = function (object, key, value) {\n var propertyKey = toPrimitive(key);\n if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));else object[propertyKey] = value;\n};\n\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors\n\n_export({\n target: 'Object',\n stat: true,\n sham: !descriptors\n}, {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n var O = toIndexedObject(object);\n var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;\n var keys = ownKeys(O);\n var result = {};\n var index = 0;\n var key, descriptor;\n\n while (keys.length > index) {\n descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);\n if (descriptor !== undefined) createProperty(result, key, descriptor);\n }\n\n return result;\n }\n});\n\nvar getOwnPropertyDescriptors = path.Object.getOwnPropertyDescriptors;\n\nvar getOwnPropertyDescriptors$1 = getOwnPropertyDescriptors;\n\nvar getOwnPropertyDescriptors$2 = getOwnPropertyDescriptors$1;\n\nvar nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;\nvar FAILS_ON_PRIMITIVES = fails(function () {\n nativeGetOwnPropertyDescriptor$1(1);\n});\nvar FORCED = !descriptors || FAILS_ON_PRIMITIVES; // `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\n\n_export({\n target: 'Object',\n stat: true,\n forced: FORCED,\n sham: !descriptors\n}, {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {\n return nativeGetOwnPropertyDescriptor$1(toIndexedObject(it), key);\n }\n});\n\nvar getOwnPropertyDescriptor_1 = createCommonjsModule(function (module) {\n var Object = path.Object;\n\n var getOwnPropertyDescriptor = module.exports = function getOwnPropertyDescriptor(it, key) {\n return Object.getOwnPropertyDescriptor(it, key);\n };\n\n if (Object.getOwnPropertyDescriptor.sham) getOwnPropertyDescriptor.sham = true;\n});\n\nvar getOwnPropertyDescriptor$2 = getOwnPropertyDescriptor_1;\n\nvar getOwnPropertyDescriptor$3 = getOwnPropertyDescriptor$2;\n\nvar nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n});\n\nvar useSymbolAsUid = nativeSymbol // eslint-disable-next-line no-undef\n&& !Symbol.sham // eslint-disable-next-line no-undef\n&& typeof Symbol.iterator == 'symbol';\n\n// https://tc39.github.io/ecma262/#sec-isarray\n\nvar isArray = Array.isArray || function isArray(arg) {\n return classofRaw(arg) == 'Array';\n};\n\nvar html = getBuiltIn('document', 'documentElement');\n\nvar setGlobal = function (key, value) {\n try {\n createNonEnumerableProperty(global_1, key, value);\n } catch (error) {\n global_1[key] = value;\n }\n\n return value;\n};\n\nvar SHARED = '__core-js_shared__';\nvar store = global_1[SHARED] || setGlobal(SHARED, {});\nvar sharedStore = store;\n\nvar shared = createCommonjsModule(function (module) {\n (module.exports = function (key, value) {\n return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});\n })('versions', []).push({\n version: '3.6.4',\n mode: 'pure' ,\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n });\n});\n\nvar id = 0;\nvar postfix = Math.random();\n\nvar uid = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n\nvar keys = shared('keys');\n\nvar sharedKey = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () {\n /* empty */\n};\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n}; // Create object with fake `null` prototype: use ActiveX Object with cleared prototype\n\n\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n\n return temp;\n}; // Create object with fake `null` prototype: use iframe Object with cleared prototype\n\n\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe); // https://github.com/zloirock/core-js/issues/475\n\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n}; // Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\n\n\nvar activeXDocument;\n\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) {\n /* ignore */\n }\n\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true; // `Object.create` method\n// https://tc39.github.io/ecma262/#sec-object.create\n\nvar objectCreate = Object.create || function create(O, Properties) {\n var result;\n\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null; // add \"__proto__\" for Object.getPrototypeOf polyfill\n\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n\n return Properties === undefined ? result : objectDefineProperties(result, Properties);\n};\n\nvar nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f;\nvar toString$1 = {}.toString;\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return nativeGetOwnPropertyNames(it);\n } catch (error) {\n return windowNames.slice();\n }\n}; // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\n\n\nvar f$5 = function getOwnPropertyNames(it) {\n return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : nativeGetOwnPropertyNames(toIndexedObject(it));\n};\n\nvar objectGetOwnPropertyNamesExternal = {\n f: f$5\n};\n\nvar redefine = function (target, key, value, options) {\n if (options && options.enumerable) target[key] = value;else createNonEnumerableProperty(target, key, value);\n};\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol$1 = global_1.Symbol;\nvar createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;\n\nvar wellKnownSymbol = function (name) {\n if (!has(WellKnownSymbolsStore, name)) {\n if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\n\n return WellKnownSymbolsStore[name];\n};\n\nvar f$6 = wellKnownSymbol;\nvar wellKnownSymbolWrapped = {\n f: f$6\n};\n\nvar defineProperty$3 = objectDefineProperty.f;\n\nvar defineWellKnownSymbol = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!has(Symbol, NAME)) defineProperty$3(Symbol, NAME, {\n value: wellKnownSymbolWrapped.f(NAME)\n });\n};\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\ntest[TO_STRING_TAG] = 'z';\nvar toStringTagSupport = String(test) === '[object z]';\n\nvar TO_STRING_TAG$1 = wellKnownSymbol('toStringTag'); // ES3 wrong here\n\nvar CORRECT_ARGUMENTS = classofRaw(function () {\n return arguments;\n}()) == 'Arguments'; // fallback for IE11 Script Access Denied error\n\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) {\n /* empty */\n }\n}; // getting tag from ES6+ `Object.prototype.toString`\n\n\nvar classof = toStringTagSupport ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n\n\nvar objectToString = toStringTagSupport ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n\nvar defineProperty$4 = objectDefineProperty.f;\nvar TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');\n\nvar setToStringTag = function (it, TAG, STATIC, SET_METHOD) {\n if (it) {\n var target = STATIC ? it : it.prototype;\n\n if (!has(target, TO_STRING_TAG$2)) {\n defineProperty$4(target, TO_STRING_TAG$2, {\n configurable: true,\n value: TAG\n });\n }\n\n if (SET_METHOD && !toStringTagSupport) {\n createNonEnumerableProperty(target, 'toString', objectToString);\n }\n }\n};\n\nvar functionToString = Function.toString; // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\n\nif (typeof sharedStore.inspectSource != 'function') {\n sharedStore.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nvar inspectSource = sharedStore.inspectSource;\n\nvar WeakMap = global_1.WeakMap;\nvar nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n\nvar WeakMap$1 = global_1.WeakMap;\nvar set, get, has$1;\n\nvar enforce = function (it) {\n return has$1(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n }\n\n return state;\n };\n};\n\nif (nativeWeakMap) {\n var store$1 = new WeakMap$1();\n var wmget = store$1.get;\n var wmhas = store$1.has;\n var wmset = store$1.set;\n\n set = function (it, metadata) {\n wmset.call(store$1, it, metadata);\n return metadata;\n };\n\n get = function (it) {\n return wmget.call(store$1, it) || {};\n };\n\n has$1 = function (it) {\n return wmhas.call(store$1, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n\n set = function (it, metadata) {\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n\n get = function (it) {\n return has(it, STATE) ? it[STATE] : {};\n };\n\n has$1 = function (it) {\n return has(it, STATE);\n };\n}\n\nvar internalState = {\n set: set,\n get: get,\n has: has$1,\n enforce: enforce,\n getterFor: getterFor\n};\n\nvar SPECIES = wellKnownSymbol('species'); // `ArraySpeciesCreate` abstract operation\n// https://tc39.github.io/ecma262/#sec-arrayspeciescreate\n\nvar arraySpeciesCreate = function (originalArray, length) {\n var C;\n\n if (isArray(originalArray)) {\n C = originalArray.constructor; // cross-realm fallback\n\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n }\n\n return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n\nvar push = [].push; // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation\n\nvar createMethod$1 = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = indexedObject(O);\n var boundFunction = functionBindContext(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var value, result;\n\n for (; length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3:\n return true;\n // some\n\n case 5:\n return value;\n // find\n\n case 6:\n return index;\n // findIndex\n\n case 2:\n push.call(target, value);\n // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nvar arrayIteration = {\n // `Array.prototype.forEach` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n forEach: createMethod$1(0),\n // `Array.prototype.map` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.map\n map: createMethod$1(1),\n // `Array.prototype.filter` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.filter\n filter: createMethod$1(2),\n // `Array.prototype.some` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.some\n some: createMethod$1(3),\n // `Array.prototype.every` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.every\n every: createMethod$1(4),\n // `Array.prototype.find` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\n find: createMethod$1(5),\n // `Array.prototype.findIndex` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod$1(6)\n};\n\nvar $forEach = arrayIteration.forEach;\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE$1 = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar setInternalState = internalState.set;\nvar getInternalState = internalState.getterFor(SYMBOL);\nvar ObjectPrototype = Object[PROTOTYPE$1];\nvar $Symbol = global_1.Symbol;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar nativeGetOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;\nvar nativeDefineProperty$1 = objectDefineProperty.f;\nvar nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable$1 = objectPropertyIsEnumerable.f;\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore$1 = shared('wks');\nvar QObject = global_1.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\n\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\n\nvar setSymbolDescriptor = descriptors && fails(function () {\n return objectCreate(nativeDefineProperty$1({}, 'a', {\n get: function () {\n return nativeDefineProperty$1(this, 'a', {\n value: 7\n }).a;\n }\n })).a != 7;\n}) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$2(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty$1(O, P, Attributes);\n\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty$1(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n} : nativeDefineProperty$1;\n\nvar wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = objectCreate($Symbol[PROTOTYPE$1]);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!descriptors) symbol.description = description;\n return symbol;\n};\n\nvar isSymbol = useSymbolAsUid ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return Object(it) instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPrimitive(P, true);\n anObject(Attributes);\n\n if (has(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!has(O, HIDDEN)) nativeDefineProperty$1(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = objectCreate(Attributes, {\n enumerable: createPropertyDescriptor(0, false)\n });\n }\n\n return setSymbolDescriptor(O, key, Attributes);\n }\n\n return nativeDefineProperty$1(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!descriptors || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n};\n\nvar $create = function create(O, Properties) {\n return Properties === undefined ? objectCreate(O) : $defineProperties(objectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPrimitive(V, true);\n var enumerable = nativePropertyIsEnumerable$1.call(this, P);\n if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPrimitive(P, true);\n if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor$2(it, key);\n\n if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n\n return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames$1(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);\n });\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames$1(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {\n result.push(AllSymbols[key]);\n }\n });\n return result;\n}; // `Symbol` constructor\n// https://tc39.github.io/ecma262/#sec-symbol-constructor\n\n\nif (!nativeSymbol) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);\n var tag = uid(description);\n\n var setter = function (value) {\n if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n\n if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, {\n configurable: true,\n set: setter\n });\n return wrap(tag, description);\n };\n\n redefine($Symbol[PROTOTYPE$1], 'toString', function toString() {\n return getInternalState(this).tag;\n });\n redefine($Symbol, 'withoutSetter', function (description) {\n return wrap(uid(description), description);\n });\n objectPropertyIsEnumerable.f = $propertyIsEnumerable;\n objectDefineProperty.f = $defineProperty;\n objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;\n objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;\n\n wellKnownSymbolWrapped.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n\n if (descriptors) {\n // https://github.com/tc39/proposal-Symbol-description\n nativeDefineProperty$1($Symbol[PROTOTYPE$1], 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n }\n}\n\n_export({\n global: true,\n wrap: true,\n forced: !nativeSymbol,\n sham: !nativeSymbol\n}, {\n Symbol: $Symbol\n});\n$forEach(objectKeys(WellKnownSymbolsStore$1), function (name) {\n defineWellKnownSymbol(name);\n});\n_export({\n target: SYMBOL,\n stat: true,\n forced: !nativeSymbol\n}, {\n // `Symbol.for` method\n // https://tc39.github.io/ecma262/#sec-symbol.for\n 'for': function (key) {\n var string = String(key);\n if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = $Symbol(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n },\n // `Symbol.keyFor` method\n // https://tc39.github.io/ecma262/#sec-symbol.keyfor\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n },\n useSetter: function () {\n USE_SETTER = true;\n },\n useSimple: function () {\n USE_SETTER = false;\n }\n});\n_export({\n target: 'Object',\n stat: true,\n forced: !nativeSymbol,\n sham: !descriptors\n}, {\n // `Object.create` method\n // https://tc39.github.io/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n_export({\n target: 'Object',\n stat: true,\n forced: !nativeSymbol\n}, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames,\n // `Object.getOwnPropertySymbols` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols\n getOwnPropertySymbols: $getOwnPropertySymbols\n}); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n\n_export({\n target: 'Object',\n stat: true,\n forced: fails(function () {\n objectGetOwnPropertySymbols.f(1);\n })\n}, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return objectGetOwnPropertySymbols.f(toObject(it));\n }\n}); // `JSON.stringify` method behavior with symbols\n// https://tc39.github.io/ecma262/#sec-json.stringify\n\nif ($stringify) {\n var FORCED_JSON_STRINGIFY = !nativeSymbol || fails(function () {\n var symbol = $Symbol(); // MS Edge converts symbol values to JSON as {}\n\n return $stringify([symbol]) != '[null]' // WebKit converts symbol values to JSON as null\n || $stringify({\n a: symbol\n }) != '{}' // V8 throws on boxed symbols\n || $stringify(Object(symbol)) != '{}';\n });\n _export({\n target: 'JSON',\n stat: true,\n forced: FORCED_JSON_STRINGIFY\n }, {\n // eslint-disable-next-line no-unused-vars\n stringify: function stringify(it, replacer, space) {\n var args = [it];\n var index = 1;\n var $replacer;\n\n while (arguments.length > index) args.push(arguments[index++]);\n\n $replacer = replacer;\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return $stringify.apply(null, args);\n }\n });\n} // `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive\n\n\nif (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) {\n createNonEnumerableProperty($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);\n} // `Symbol.prototype[@@toStringTag]` property\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag\n\n\nsetToStringTag($Symbol, SYMBOL);\nhiddenKeys[HIDDEN] = true;\n\nvar getOwnPropertySymbols = path.Object.getOwnPropertySymbols;\n\nvar getOwnPropertySymbols$1 = getOwnPropertySymbols;\n\nvar getOwnPropertySymbols$2 = getOwnPropertySymbols$1;\n\nvar iterators = {};\n\nvar correctPrototypeGetter = !fails(function () {\n function F() {\n /* empty */\n }\n\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n\nvar IE_PROTO$1 = sharedKey('IE_PROTO');\nvar ObjectPrototype$1 = Object.prototype; // `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\n\nvar objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];\n\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n }\n\n return O instanceof Object ? ObjectPrototype$1 : null;\n};\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object\n\n\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\nif ([].keys) {\n arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next`\n\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;else {\n PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nif (IteratorPrototype == undefined) IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n\nvar iteratorsCore = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n\nvar IteratorPrototype$1 = iteratorsCore.IteratorPrototype;\n\nvar returnThis = function () {\n return this;\n};\n\nvar createIteratorConstructor = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, {\n next: createPropertyDescriptor(1, next)\n });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n\nvar aPossiblePrototype = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n }\n\n return it;\n};\n\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n\n/* eslint-disable no-proto */\n\nvar objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) {\n /* empty */\n }\n\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n\nvar IteratorPrototype$2 = iteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR$1 = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis$1 = function () {\n return this;\n};\n\nvar defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];\n\n switch (KIND) {\n case KEYS:\n return function keys() {\n return new IteratorConstructor(this, KIND);\n };\n\n case VALUES:\n return function values() {\n return new IteratorConstructor(this, KIND);\n };\n\n case ENTRIES:\n return function entries() {\n return new IteratorConstructor(this, KIND);\n };\n }\n\n return function () {\n return new IteratorConstructor(this);\n };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR$1] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY; // fix native\n\n if (anyNativeIterator) {\n CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));\n\n if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {\n\n\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n iterators[TO_STRING_TAG] = returnThis$1;\n }\n } // fix Array#{values, @@iterator}.name in V8 / FF\n\n\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n\n defaultIterator = function values() {\n return nativeIterator.call(this);\n };\n } // define iterator\n\n\n if (( FORCED) && IterablePrototype[ITERATOR$1] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR$1, defaultIterator);\n }\n\n iterators[NAME] = defaultIterator; // export additional methods\n\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else _export({\n target: NAME,\n proto: true,\n forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME\n }, methods);\n }\n\n return methods;\n};\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState$1 = internalState.set;\nvar getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR); // `Array.prototype.entries` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.github.io/ecma262/#sec-createarrayiterator\n\nvar es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState$1(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated),\n // target\n index: 0,\n // next index\n kind: kind // kind\n\n }); // `%ArrayIteratorPrototype%.next` method\n // https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState$1(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n\n if (!target || index >= target.length) {\n state.target = undefined;\n return {\n value: undefined,\n done: true\n };\n }\n\n if (kind == 'keys') return {\n value: index,\n done: false\n };\n if (kind == 'values') return {\n value: target[index],\n done: false\n };\n return {\n value: [index, target[index]],\n done: false\n };\n}, 'values'); // argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject\n\niterators.Arguments = iterators.Array; // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\n\n// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nvar domIterables = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n\nvar TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');\n\nfor (var COLLECTION_NAME in domIterables) {\n var Collection = global_1[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n\n if (CollectionPrototype && classof(CollectionPrototype) !== TO_STRING_TAG$3) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$3, COLLECTION_NAME);\n }\n\n iterators[COLLECTION_NAME] = iterators.Array;\n}\n\nvar createMethod$2 = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? S.charAt(position) : first : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nvar stringMultibyte = {\n // `String.prototype.codePointAt` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod$2(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod$2(true)\n};\n\nvar charAt = stringMultibyte.charAt;\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState$2 = internalState.set;\nvar getInternalState$2 = internalState.getterFor(STRING_ITERATOR); // `String.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator\n\ndefineIterator(String, 'String', function (iterated) {\n setInternalState$2(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n }); // `%StringIteratorPrototype%.next` method\n // https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState$2(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return {\n value: undefined,\n done: true\n };\n point = charAt(string, index);\n state.index += point.length;\n return {\n value: point,\n done: false\n };\n});\n\nvar ITERATOR$2 = wellKnownSymbol('iterator');\n\nvar getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR$2] || it['@@iterator'] || iterators[classof(it)];\n};\n\nvar getIterator = function (it) {\n var iteratorMethod = getIteratorMethod(it);\n\n if (typeof iteratorMethod != 'function') {\n throw TypeError(String(it) + ' is not iterable');\n }\n\n return anObject(iteratorMethod.call(it));\n};\n\nvar getIterator_1 = getIterator;\n\nvar getIterator$1 = getIterator_1;\n\nvar getIteratorMethod_1 = getIteratorMethod;\n\nvar getIteratorMethod$1 = getIteratorMethod_1;\n\nvar callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) anObject(returnMethod.call(iterator));\n throw error;\n }\n};\n\nvar ITERATOR$3 = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype; // check on default Array iterator\n\nvar isArrayIteratorMethod = function (it) {\n return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR$3] === it);\n};\n\n// https://tc39.github.io/ecma262/#sec-array.from\n\n\nvar arrayFrom = function from(arrayLike\n/* , mapfn = undefined, thisArg = undefined */\n) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2); // if the target is not iterable or it's an array with the default iterator - use a simple case\n\n if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = iteratorMethod.call(O);\n next = iterator.next;\n result = new C();\n\n for (; !(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = toLength(O.length);\n result = new C(length);\n\n for (; length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n\n result.length = index;\n return result;\n};\n\nvar ITERATOR$4 = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return {\n done: !!called++\n };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n\n iteratorWithReturn[ITERATOR$4] = function () {\n return this;\n }; // eslint-disable-next-line no-throw-literal\n\n\n Array.from(iteratorWithReturn, function () {\n throw 2;\n });\n} catch (error) {\n /* empty */\n}\n\nvar checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n\n try {\n var object = {};\n\n object[ITERATOR$4] = function () {\n return {\n next: function () {\n return {\n done: ITERATION_SUPPORT = true\n };\n }\n };\n };\n\n exec(object);\n } catch (error) {\n /* empty */\n }\n\n return ITERATION_SUPPORT;\n};\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n Array.from(iterable);\n}); // `Array.from` method\n// https://tc39.github.io/ecma262/#sec-array.from\n\n_export({\n target: 'Array',\n stat: true,\n forced: INCORRECT_ITERATION\n}, {\n from: arrayFrom\n});\n\nvar from_1 = path.Array.from;\n\nvar from_1$1 = from_1;\n\nvar from_1$2 = from_1$1;\n\n// https://tc39.github.io/ecma262/#sec-object.create\n\n_export({\n target: 'Object',\n stat: true,\n sham: !descriptors\n}, {\n create: objectCreate\n});\n\nvar Object$1 = path.Object;\n\nvar create = function create(P, D) {\n return Object$1.create(P, D);\n};\n\nvar create$1 = create;\n\nvar create$2 = create$1;\n\nvar defineProperty$5 = defineProperty_1;\n\nvar defineProperty$6 = defineProperty$5;\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n defineProperty$6(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nvar defineProperty$7 = _defineProperty;\n\n// a string of all valid unicode whitespaces\n// eslint-disable-next-line max-len\nvar whitespaces = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\n\nvar createMethod$3 = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nvar stringTrim = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart\n start: createMethod$3(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimend\n end: createMethod$3(2),\n // `String.prototype.trim` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.trim\n trim: createMethod$3(3)\n};\n\nvar non = '\\u200B\\u0085\\u180E'; // check that a method works with the correct list\n// of whitespaces and has a correct name\n\nvar stringTrimForced = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n\nvar $trim = stringTrim.trim; // `String.prototype.trim` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.trim\n\n_export({\n target: 'String',\n proto: true,\n forced: stringTrimForced('trim')\n}, {\n trim: function trim() {\n return $trim(this);\n }\n});\n\nvar trim = entryVirtual('String').trim;\n\nvar arrayMethodIsStrict = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal\n method.call(null, argument || function () {\n throw 1;\n }, 1);\n });\n};\n\nvar defineProperty$8 = Object.defineProperty;\nvar cache = {};\n\nvar thrower = function (it) {\n throw it;\n};\n\nvar arrayMethodUsesToLength = function (METHOD_NAME, options) {\n if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];\n if (!options) options = {};\n var method = [][METHOD_NAME];\n var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;\n var argument0 = has(options, 0) ? options[0] : thrower;\n var argument1 = has(options, 1) ? options[1] : undefined;\n return cache[METHOD_NAME] = !!method && !fails(function () {\n if (ACCESSORS && !descriptors) return true;\n var O = {\n length: -1\n };\n if (ACCESSORS) defineProperty$8(O, 1, {\n enumerable: true,\n get: thrower\n });else O[1] = 1;\n method.call(O, argument0, argument1);\n });\n};\n\nvar $forEach$1 = arrayIteration.forEach;\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('forEach'); // `Array.prototype.forEach` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n\nvar arrayForEach = !STRICT_METHOD || !USES_TO_LENGTH ? function forEach(callbackfn\n/* , thisArg */\n) {\n return $forEach$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n} : [].forEach;\n\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n\n\n_export({\n target: 'Array',\n proto: true,\n forced: [].forEach != arrayForEach\n}, {\n forEach: arrayForEach\n});\n\nvar forEach = entryVirtual('Array').forEach;\n\nvar forEach$1 = forEach;\n\nvar ArrayPrototype$1 = Array.prototype;\nvar DOMIterables = {\n DOMTokenList: true,\n NodeList: true\n};\n\nvar forEach_1 = function (it) {\n var own = it.forEach;\n return it === ArrayPrototype$1 || it instanceof Array && own === ArrayPrototype$1.forEach // eslint-disable-next-line no-prototype-builtins\n || DOMIterables.hasOwnProperty(classof(it)) ? forEach$1 : own;\n};\n\nvar forEach$2 = forEach_1;\n\nvar trim$1 = stringTrim.trim;\nvar $parseInt = global_1.parseInt;\nvar hex = /^[+-]?0[Xx]/;\nvar FORCED$1 = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22; // `parseInt` method\n// https://tc39.github.io/ecma262/#sec-parseint-string-radix\n\nvar numberParseInt = FORCED$1 ? function parseInt(string, radix) {\n var S = trim$1(String(string));\n return $parseInt(S, radix >>> 0 || (hex.test(S) ? 16 : 10));\n} : $parseInt;\n\n// https://tc39.github.io/ecma262/#sec-parseint-string-radix\n\n_export({\n global: true,\n forced: parseInt != numberParseInt\n}, {\n parseInt: numberParseInt\n});\n\nvar _parseInt = path.parseInt;\n\nvar _parseInt$1 = _parseInt;\n\nvar _parseInt$2 = _parseInt$1;\n\nvar propertyIsEnumerable = objectPropertyIsEnumerable.f; // `Object.{ entries, values }` methods implementation\n\nvar createMethod$4 = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n\n while (length > i) {\n key = keys[i++];\n\n if (!descriptors || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n\n return result;\n };\n};\n\nvar objectToArray = {\n // `Object.entries` method\n // https://tc39.github.io/ecma262/#sec-object.entries\n entries: createMethod$4(true),\n // `Object.values` method\n // https://tc39.github.io/ecma262/#sec-object.values\n values: createMethod$4(false)\n};\n\nvar $values = objectToArray.values; // `Object.values` method\n// https://tc39.github.io/ecma262/#sec-object.values\n\n_export({\n target: 'Object',\n stat: true\n}, {\n values: function values(O) {\n return $values(O);\n }\n});\n\nvar values = path.Object.values;\n\nvar engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';\n\nvar process = global_1.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] + match[1];\n} else if (engineUserAgent) {\n match = engineUserAgent.match(/Edge\\/(\\d+)/);\n\n if (!match || match[1] >= 74) {\n match = engineUserAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nvar engineV8Version = version && +version;\n\nvar SPECIES$1 = wellKnownSymbol('species');\n\nvar arrayMethodHasSpeciesSupport = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return engineV8Version >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n\n constructor[SPECIES$1] = function () {\n return {\n foo: 1\n };\n };\n\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n\nvar $filter = arrayIteration.filter;\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter'); // Edge 14- issue\n\nvar USES_TO_LENGTH$1 = arrayMethodUsesToLength('filter'); // `Array.prototype.filter` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n\n_export({\n target: 'Array',\n proto: true,\n forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH$1\n}, {\n filter: function filter(callbackfn\n /* , thisArg */\n ) {\n return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\nvar filter = entryVirtual('Array').filter;\n\nvar ArrayPrototype$2 = Array.prototype;\n\nvar filter_1 = function (it) {\n var own = it.filter;\n return it === ArrayPrototype$2 || it instanceof Array && own === ArrayPrototype$2.filter ? filter : own;\n};\n\nvar filter$1 = filter_1;\n\nvar filter$2 = filter$1;\n\nvar FAILS_ON_PRIMITIVES$1 = fails(function () {\n objectGetPrototypeOf(1);\n}); // `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\n\n_export({\n target: 'Object',\n stat: true,\n forced: FAILS_ON_PRIMITIVES$1,\n sham: !correctPrototypeGetter\n}, {\n getPrototypeOf: function getPrototypeOf(it) {\n return objectGetPrototypeOf(toObject(it));\n }\n});\n\nvar getPrototypeOf = path.Object.getPrototypeOf;\n\nvar getPrototypeOf$1 = getPrototypeOf;\n\nvar getPrototypeOf$2 = getPrototypeOf$1;\n\nvar $indexOf = arrayIncludes.indexOf;\nvar nativeIndexOf = [].indexOf;\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;\nvar STRICT_METHOD$1 = arrayMethodIsStrict('indexOf');\nvar USES_TO_LENGTH$2 = arrayMethodUsesToLength('indexOf', {\n ACCESSORS: true,\n 1: 0\n}); // `Array.prototype.indexOf` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n\n_export({\n target: 'Array',\n proto: true,\n forced: NEGATIVE_ZERO || !STRICT_METHOD$1 || !USES_TO_LENGTH$2\n}, {\n indexOf: function indexOf(searchElement\n /* , fromIndex = 0 */\n ) {\n return NEGATIVE_ZERO // convert -0 to +0\n ? nativeIndexOf.apply(this, arguments) || 0 : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\nvar indexOf$1 = entryVirtual('Array').indexOf;\n\nvar ArrayPrototype$3 = Array.prototype;\n\nvar indexOf_1 = function (it) {\n var own = it.indexOf;\n return it === ArrayPrototype$3 || it instanceof Array && own === ArrayPrototype$3.indexOf ? indexOf$1 : own;\n};\n\nvar indexOf$2 = indexOf_1;\n\nvar indexOf$3 = indexOf$2;\n\n// https://tc39.github.io/ecma262/#sec-array.isarray\n\n_export({\n target: 'Array',\n stat: true\n}, {\n isArray: isArray\n});\n\nvar isArray$1 = path.Array.isArray;\n\nvar isArray$2 = isArray$1;\n\nvar isArray$3 = isArray$2;\n\nfunction _arrayWithHoles(arr) {\n if (isArray$3(arr)) return arr;\n}\n\nvar arrayWithHoles = _arrayWithHoles;\n\nvar ITERATOR$5 = wellKnownSymbol('iterator');\n\nvar isIterable = function (it) {\n var O = Object(it);\n return O[ITERATOR$5] !== undefined || '@@iterator' in O // eslint-disable-next-line no-prototype-builtins\n || iterators.hasOwnProperty(classof(O));\n};\n\nvar isIterable_1 = isIterable;\n\nvar isIterable$1 = isIterable_1;\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; // We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\n\nvar IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED$2 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; // `Array.prototype.concat` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n\n_export({\n target: 'Array',\n proto: true,\n forced: FORCED$2\n}, {\n concat: function concat(arg) {\n // eslint-disable-line no-unused-vars\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n\n if (isConcatSpreadable(E)) {\n len = toLength(E.length);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n\n A.length = n;\n return A;\n }\n});\n\n// https://tc39.github.io/ecma262/#sec-symbol.asynciterator\n\ndefineWellKnownSymbol('asyncIterator');\n\n// https://tc39.github.io/ecma262/#sec-symbol.hasinstance\n\ndefineWellKnownSymbol('hasInstance');\n\n// https://tc39.github.io/ecma262/#sec-symbol.isconcatspreadable\n\ndefineWellKnownSymbol('isConcatSpreadable');\n\n// https://tc39.github.io/ecma262/#sec-symbol.iterator\n\ndefineWellKnownSymbol('iterator');\n\n// https://tc39.github.io/ecma262/#sec-symbol.match\n\ndefineWellKnownSymbol('match');\n\ndefineWellKnownSymbol('matchAll');\n\n// https://tc39.github.io/ecma262/#sec-symbol.replace\n\ndefineWellKnownSymbol('replace');\n\n// https://tc39.github.io/ecma262/#sec-symbol.search\n\ndefineWellKnownSymbol('search');\n\n// https://tc39.github.io/ecma262/#sec-symbol.species\n\ndefineWellKnownSymbol('species');\n\n// https://tc39.github.io/ecma262/#sec-symbol.split\n\ndefineWellKnownSymbol('split');\n\n// https://tc39.github.io/ecma262/#sec-symbol.toprimitive\n\ndefineWellKnownSymbol('toPrimitive');\n\n// https://tc39.github.io/ecma262/#sec-symbol.tostringtag\n\ndefineWellKnownSymbol('toStringTag');\n\n// https://tc39.github.io/ecma262/#sec-symbol.unscopables\n\ndefineWellKnownSymbol('unscopables');\n\n// https://tc39.github.io/ecma262/#sec-math-@@tostringtag\n\nsetToStringTag(Math, 'Math', true);\n\n// https://tc39.github.io/ecma262/#sec-json-@@tostringtag\n\nsetToStringTag(global_1.JSON, 'JSON', true);\n\nvar symbol = path.Symbol;\n\n// https://github.com/tc39/proposal-using-statement\n\ndefineWellKnownSymbol('asyncDispose');\n\n// https://github.com/tc39/proposal-using-statement\n\ndefineWellKnownSymbol('dispose');\n\n// https://github.com/tc39/proposal-observable\n\ndefineWellKnownSymbol('observable');\n\n// https://github.com/tc39/proposal-pattern-matching\n\ndefineWellKnownSymbol('patternMatch');\n\ndefineWellKnownSymbol('replaceAll');\n\nvar symbol$1 = symbol;\n\nvar symbol$2 = symbol$1;\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof symbol$2 === \"undefined\" || !isIterable$1(Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = getIterator$1(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nvar iterableToArrayLimit = _iterableToArrayLimit;\n\nvar from_1$3 = from_1;\n\nvar from_1$4 = from_1$3;\n\nvar HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('slice');\nvar USES_TO_LENGTH$3 = arrayMethodUsesToLength('slice', {\n ACCESSORS: true,\n 0: 0,\n 1: 2\n});\nvar SPECIES$2 = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max$1 = Math.max; // `Array.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n\n_export({\n target: 'Array',\n proto: true,\n forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$3\n}, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length); // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n\n var Constructor, result, n;\n\n if (isArray(O)) {\n Constructor = O.constructor; // cross-realm fallback\n\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES$2];\n if (Constructor === null) Constructor = undefined;\n }\n\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n\n result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));\n\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n\n result.length = n;\n return result;\n }\n});\n\nvar slice$1 = entryVirtual('Array').slice;\n\nvar ArrayPrototype$4 = Array.prototype;\n\nvar slice_1 = function (it) {\n var own = it.slice;\n return it === ArrayPrototype$4 || it instanceof Array && own === ArrayPrototype$4.slice ? slice$1 : own;\n};\n\nvar slice$2 = slice_1;\n\nvar slice$3 = slice$2;\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nvar arrayLikeToArray = _arrayLikeToArray;\n\nfunction _unsupportedIterableToArray(o, minLen) {\n var _context;\n\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n\n var n = slice$3(_context = Object.prototype.toString.call(o)).call(_context, 8, -1);\n\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return from_1$4(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nvar unsupportedIterableToArray = _unsupportedIterableToArray;\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar nonIterableRest = _nonIterableRest;\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nvar slicedToArray = _slicedToArray;\n\n// https://tc39.github.io/ecma262/#sec-date.now\n\n_export({\n target: 'Date',\n stat: true\n}, {\n now: function now() {\n return new Date().getTime();\n }\n});\n\nvar now = path.Date.now;\n\nvar now$1 = now;\n\nvar now$2 = now$1;\n\nvar FAILS_ON_PRIMITIVES$2 = fails(function () {\n objectKeys(1);\n}); // `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\n\n_export({\n target: 'Object',\n stat: true,\n forced: FAILS_ON_PRIMITIVES$2\n}, {\n keys: function keys(it) {\n return objectKeys(toObject(it));\n }\n});\n\nvar keys$1 = path.Object.keys;\n\nvar keys$2 = keys$1;\n\nvar keys$3 = keys$2;\n\nvar $map = arrayIteration.map;\nvar HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('map'); // FF49- issue\n\nvar USES_TO_LENGTH$4 = arrayMethodUsesToLength('map'); // `Array.prototype.map` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n\n_export({\n target: 'Array',\n proto: true,\n forced: !HAS_SPECIES_SUPPORT$2 || !USES_TO_LENGTH$4\n}, {\n map: function map(callbackfn\n /* , thisArg */\n ) {\n return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\nvar map = entryVirtual('Array').map;\n\nvar ArrayPrototype$5 = Array.prototype;\n\nvar map_1 = function (it) {\n var own = it.map;\n return it === ArrayPrototype$5 || it instanceof Array && own === ArrayPrototype$5.map ? map : own;\n};\n\nvar map$1 = map_1;\n\nvar map$2 = map$1;\n\nvar isArray$4 = isArray$1;\n\nvar isArray$5 = isArray$4;\n\nvar iterator = wellKnownSymbolWrapped.f('iterator');\n\nvar iterator$1 = iterator;\n\nvar iterator$2 = iterator$1;\n\nvar _typeof_1 = createCommonjsModule(function (module) {\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof symbol$2 === \"function\" && typeof iterator$2 === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof symbol$2 === \"function\" && obj.constructor === symbol$2 && obj !== symbol$2.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n module.exports = _typeof;\n});\n\n// https://tc39.github.io/ecma262/#sec-reflect.ownkeys\n\n_export({\n target: 'Reflect',\n stat: true\n}, {\n ownKeys: ownKeys\n});\n\nvar ownKeys$1 = path.Reflect.ownKeys;\n\nvar ownKeys$2 = ownKeys$1;\n\nvar ownKeys$3 = ownKeys$2;\n\nvar slice$4 = slice_1;\n\nvar slice$5 = slice$4;\n\nfunction _arrayWithoutHoles(arr) {\n if (isArray$3(arr)) return arrayLikeToArray(arr);\n}\n\nvar arrayWithoutHoles = _arrayWithoutHoles;\n\nfunction _iterableToArray(iter) {\n if (typeof symbol$2 !== \"undefined\" && isIterable$1(Object(iter))) return from_1$4(iter);\n}\n\nvar iterableToArray = _iterableToArray;\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar nonIterableSpread = _nonIterableSpread;\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nvar toConsumableArray = _toConsumableArray;\n\nvar concat = entryVirtual('Array').concat;\n\nvar ArrayPrototype$6 = Array.prototype;\n\nvar concat_1 = function (it) {\n var own = it.concat;\n return it === ArrayPrototype$6 || it instanceof Array && own === ArrayPrototype$6.concat ? concat : own;\n};\n\nvar concat$1 = concat_1;\n\nvar concat$2 = concat$1;\n\nvar symbol$3 = symbol;\n\nvar symbol$4 = symbol$3;\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof symbol$4 === \"undefined\" || getIteratorMethod$1(o) == null) { if (isArray$5(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = getIterator$1(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray$1(o, minLen) { var _context13; if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray$1(o, minLen); var n = slice$5(_context13 = Object.prototype.toString.call(o)).call(_context13, 8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return from_1$2(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }\n\nfunction _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\n * vis-util\n * https://github.com/visjs/vis-util\n *\n * utilitie collection for visjs\n *\n * @version 4.3.3\n * @date 2020-07-18T16:20:10.745Z\n *\n * @copyright (c) 2011-2017 Almende B.V, http://almende.com\n * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs\n *\n * @license\n * vis.js is dual licensed under both\n *\n * 1. The Apache 2.0 License\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * and\n *\n * 2. The MIT License\n * http://opensource.org/licenses/MIT\n *\n * vis.js may be distributed under either license.\n */\n\n/**\r\n * Use this symbol to delete properies in deepObjectAssign.\r\n */\nvar DELETE = symbol$4(\"DELETE\");\n/**\r\n * Pure version of deepObjectAssign, it doesn't modify any of it's arguments.\r\n *\r\n * @param base - The base object that fullfils the whole interface T.\r\n * @param updates - Updates that may change or delete props.\r\n *\r\n * @returns A brand new instance with all the supplied objects deeply merged.\r\n */\n\n\nfunction pureDeepObjectAssign(base) {\n var _context;\n\n for (var _len = arguments.length, updates = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n updates[_key - 1] = arguments[_key];\n }\n\n return deepObjectAssign.apply(void 0, concat$2(_context = [{}, base]).call(_context, updates));\n}\n/**\r\n * Deep version of object assign with additional deleting by the DELETE symbol.\r\n *\r\n * @param values - Objects to be deeply merged.\r\n *\r\n * @returns The first object from values.\r\n */\n\n\nfunction deepObjectAssign() {\n var merged = deepObjectAssignNonentry.apply(void 0, arguments);\n stripDelete(merged);\n return merged;\n}\n/**\r\n * Deep version of object assign with additional deleting by the DELETE symbol.\r\n *\r\n * @remarks\r\n * This doesn't strip the DELETE symbols so they may end up in the final object.\r\n *\r\n * @param values - Objects to be deeply merged.\r\n *\r\n * @returns The first object from values.\r\n */\n\n\nfunction deepObjectAssignNonentry() {\n for (var _len2 = arguments.length, values = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n values[_key2] = arguments[_key2];\n }\n\n if (values.length < 2) {\n return values[0];\n } else if (values.length > 2) {\n var _context2;\n\n return deepObjectAssignNonentry.apply(void 0, concat$2(_context2 = [deepObjectAssign(values[0], values[1])]).call(_context2, toConsumableArray(slice$5(values).call(values, 2))));\n }\n\n var a = values[0];\n var b = values[1];\n\n var _iterator = _createForOfIteratorHelper(ownKeys$3(b)),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var prop = _step.value;\n if (Object.prototype.propertyIsEnumerable.call(b, b[prop])) ;else if (b[prop] === DELETE) {\n delete a[prop];\n } else if (a[prop] !== null && b[prop] !== null && _typeof_1(a[prop]) === \"object\" && _typeof_1(b[prop]) === \"object\" && !isArray$5(a[prop]) && !isArray$5(b[prop])) {\n a[prop] = deepObjectAssignNonentry(a[prop], b[prop]);\n } else {\n a[prop] = clone(b[prop]);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return a;\n}\n/**\r\n * Deep clone given object or array. In case of primitive simply return.\r\n *\r\n * @param a - Anything.\r\n *\r\n * @returns Deep cloned object/array or unchanged a.\r\n */\n\n\nfunction clone(a) {\n if (isArray$5(a)) {\n return map$2(a).call(a, function (value) {\n return clone(value);\n });\n } else if (_typeof_1(a) === \"object\" && a !== null) {\n return deepObjectAssignNonentry({}, a);\n } else {\n return a;\n }\n}\n/**\r\n * Strip DELETE from given object.\r\n *\r\n * @param a - Object which may contain DELETE but won't after this is executed.\r\n */\n\n\nfunction stripDelete(a) {\n for (var _i = 0, _Object$keys = keys$3(a); _i < _Object$keys.length; _i++) {\n var prop = _Object$keys[_i];\n\n if (a[prop] === DELETE) {\n delete a[prop];\n } else if (_typeof_1(a[prop]) === \"object\" && a[prop] !== null) {\n stripDelete(a[prop]);\n }\n }\n}\n/**\r\n * Seedable, fast and reasonably good (not crypto but more than okay for our\r\n * needs) random number generator.\r\n *\r\n * @remarks\r\n * Adapted from {@link https://web.archive.org/web/20110429100736/http://baagoe.com:80/en/RandomMusings/javascript}.\r\n * Original algorithm created by Johannes Baagøe \\ in 2010.\r\n */\n\n/**\r\n * Create a seeded pseudo random generator based on Alea by Johannes Baagøe.\r\n *\r\n * @param seed - All supplied arguments will be used as a seed. In case nothing\r\n * is supplied the current time will be used to seed the generator.\r\n *\r\n * @returns A ready to use seeded generator.\r\n */\n\n\nfunction Alea() {\n for (var _len3 = arguments.length, seed = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n seed[_key3] = arguments[_key3];\n }\n\n return AleaImplementation(seed.length ? seed : [now$2()]);\n}\n/**\r\n * An implementation of [[Alea]] without user input validation.\r\n *\r\n * @param seed - The data that will be used to seed the generator.\r\n *\r\n * @returns A ready to use seeded generator.\r\n */\n\n\nfunction AleaImplementation(seed) {\n var _mashSeed = mashSeed(seed),\n _mashSeed2 = slicedToArray(_mashSeed, 3),\n s0 = _mashSeed2[0],\n s1 = _mashSeed2[1],\n s2 = _mashSeed2[2];\n\n var c = 1;\n\n var random = function random() {\n var t = 2091639 * s0 + c * 2.3283064365386963e-10; // 2^-32\n\n s0 = s1;\n s1 = s2;\n return s2 = t - (c = t | 0);\n };\n\n random.uint32 = function () {\n return random() * 0x100000000;\n }; // 2^32\n\n\n random.fract53 = function () {\n return random() + (random() * 0x200000 | 0) * 1.1102230246251565e-16;\n }; // 2^-53\n\n\n random.algorithm = \"Alea\";\n random.seed = seed;\n random.version = \"0.9\";\n return random;\n}\n/**\r\n * Turn arbitrary data into values [[AleaImplementation]] can use to generate\r\n * random numbers.\r\n *\r\n * @param seed - Arbitrary data that will be used as the seed.\r\n *\r\n * @returns Three numbers to use as initial values for [[AleaImplementation]].\r\n */\n\n\nfunction mashSeed() {\n var mash = Mash();\n var s0 = mash(\" \");\n var s1 = mash(\" \");\n var s2 = mash(\" \");\n\n for (var i = 0; i < arguments.length; i++) {\n s0 -= mash(i < 0 || arguments.length <= i ? undefined : arguments[i]);\n\n if (s0 < 0) {\n s0 += 1;\n }\n\n s1 -= mash(i < 0 || arguments.length <= i ? undefined : arguments[i]);\n\n if (s1 < 0) {\n s1 += 1;\n }\n\n s2 -= mash(i < 0 || arguments.length <= i ? undefined : arguments[i]);\n\n if (s2 < 0) {\n s2 += 1;\n }\n }\n\n return [s0, s1, s2];\n}\n/**\r\n * Create a new mash function.\r\n *\r\n * @returns A nonpure function that takes arbitrary [[Mashable]] data and turns\r\n * them into numbers.\r\n */\n\n\nfunction Mash() {\n var n = 0xefc8249d;\n return function (data) {\n var string = data.toString();\n\n for (var i = 0; i < string.length; i++) {\n n += string.charCodeAt(i);\n var h = 0.02519603282416938 * n;\n n = h >>> 0;\n h -= n;\n h *= n;\n n = h >>> 0;\n h -= n;\n n += h * 0x100000000; // 2^32\n }\n\n return (n >>> 0) * 2.3283064365386963e-10; // 2^-32\n };\n} // utility functions\n\nvar fullHexRE = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\nvar shortHexRE = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\nvar rgbRE = /^rgb\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *\\)$/i;\nvar rgbaRE = /^rgba\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *([01]|0?\\.\\d+) *\\)$/i;\n/**\r\n * Test whether given object is a number.\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if number, false otherwise.\r\n */\n\nfunction isNumber(value) {\n return value instanceof Number || typeof value === \"number\";\n}\n/**\r\n * Remove everything in the DOM object.\r\n *\r\n * @param DOMobject - Node whose child nodes will be recursively deleted.\r\n */\n\n\nfunction recursiveDOMDelete(DOMobject) {\n if (DOMobject) {\n while (DOMobject.hasChildNodes() === true) {\n var child = DOMobject.firstChild;\n\n if (child) {\n recursiveDOMDelete(child);\n DOMobject.removeChild(child);\n }\n }\n }\n}\n/**\r\n * Test whether given object is a string.\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if string, false otherwise.\r\n */\n\n\nfunction isString(value) {\n return value instanceof String || typeof value === \"string\";\n}\n/**\r\n * Test whether given object is a object (not primitive or null).\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if not null object, false otherwise.\r\n */\n\n\nfunction isObject$1(value) {\n return _typeof_1(value) === \"object\" && value !== null;\n}\n/**\r\n * Copy property from b to a if property present in a.\r\n * If property in b explicitly set to null, delete it if `allowDeletion` set.\r\n *\r\n * Internal helper routine, should not be exported. Not added to `exports` for that reason.\r\n *\r\n * @param a - Target object.\r\n * @param b - Source object.\r\n * @param prop - Name of property to copy from b to a.\r\n * @param allowDeletion - If true, delete property in a if explicitly set to null in b.\r\n */\n\n\nfunction copyOrDelete(a, b, prop, allowDeletion) {\n var doDeletion = false;\n\n if (allowDeletion === true) {\n doDeletion = b[prop] === null && a[prop] !== undefined;\n }\n\n if (doDeletion) {\n delete a[prop];\n } else {\n a[prop] = b[prop]; // Remember, this is a reference copy!\n }\n}\n/**\r\n * Fill an object with a possibly partially defined other object.\r\n *\r\n * Only copies values for the properties already present in a.\r\n * That means an object is not created on a property if only the b object has it.\r\n *\r\n * @param a - The object that will have it's properties updated.\r\n * @param b - The object with property updates.\r\n * @param allowDeletion - If true, delete properties in a that are explicitly set to null in b.\r\n */\n\n\nfunction fillIfDefined(a, b) {\n var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n // NOTE: iteration of properties of a\n // NOTE: prototype properties iterated over as well\n for (var prop in a) {\n if (b[prop] !== undefined) {\n if (b[prop] === null || _typeof_1(b[prop]) !== \"object\") {\n // Note: typeof null === 'object'\n copyOrDelete(a, b, prop, allowDeletion);\n } else {\n var aProp = a[prop];\n var bProp = b[prop];\n\n if (isObject$1(aProp) && isObject$1(bProp)) {\n fillIfDefined(aProp, bProp, allowDeletion);\n }\n }\n }\n }\n}\n/**\r\n * Extend object a with selected properties of object b.\r\n * Only properties with defined values are copied.\r\n *\r\n * @remarks\r\n * Previous version of this routine implied that multiple source objects could\r\n * be used; however, the implementation was **wrong**. Since multiple (\\>1)\r\n * sources weren't used anywhere in the `vis.js` code, this has been removed\r\n *\r\n * @param props - Names of first-level properties to copy over.\r\n * @param a - Target object.\r\n * @param b - Source object.\r\n * @param allowDeletion - If true, delete property in a if explicitly set to null in b.\r\n *\r\n * @returns Argument a.\r\n */\n\n\nfunction selectiveDeepExtend(props, a, b) {\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n // TODO: add support for Arrays to deepExtend\n if (isArray$5(b)) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n }\n\n for (var p = 0; p < props.length; p++) {\n var prop = props[p];\n\n if (Object.prototype.hasOwnProperty.call(b, prop)) {\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop], false, allowDeletion);\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (isArray$5(b[prop])) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n }\n\n return a;\n}\n/**\r\n * Extend object `a` with properties of object `b`, ignoring properties which\r\n * are explicitly specified to be excluded.\r\n *\r\n * @remarks\r\n * The properties of `b` are considered for copying. Properties which are\r\n * themselves objects are are also extended. Only properties with defined\r\n * values are copied.\r\n *\r\n * @param propsToExclude - Names of properties which should *not* be copied.\r\n * @param a - Object to extend.\r\n * @param b - Object to take properties from for extension.\r\n * @param allowDeletion - If true, delete properties in a that are explicitly\r\n * set to null in b.\r\n *\r\n * @returns Argument a.\r\n */\n\n\nfunction selectiveNotDeepExtend(propsToExclude, a, b) {\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n // TODO: add support for Arrays to deepExtend\n // NOTE: array properties have an else-below; apparently, there is a problem here.\n if (isArray$5(b)) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n }\n\n for (var prop in b) {\n if (!Object.prototype.hasOwnProperty.call(b, prop)) {\n continue;\n } // Handle local properties only\n\n\n if (indexOf$3(propsToExclude).call(propsToExclude, prop) !== -1) {\n continue;\n } // In exclusion list, skip\n\n\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop]); // NOTE: allowDeletion not propagated!\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (isArray$5(b[prop])) {\n a[prop] = [];\n\n for (var i = 0; i < b[prop].length; i++) {\n a[prop].push(b[prop][i]);\n }\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n\n return a;\n}\n/**\r\n * Deep extend an object a with the properties of object b.\r\n *\r\n * @param a - Target object.\r\n * @param b - Source object.\r\n * @param protoExtend - If true, the prototype values will also be extended.\r\n * (That is the options objects that inherit from others will also get the\r\n * inherited options).\r\n * @param allowDeletion - If true, the values of fields that are null will be deleted.\r\n *\r\n * @returns Argument a.\r\n */\n\n\nfunction deepExtend(a, b) {\n var protoExtend = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n for (var prop in b) {\n if (Object.prototype.hasOwnProperty.call(b, prop) || protoExtend === true) {\n if (_typeof_1(b[prop]) === \"object\" && b[prop] !== null && getPrototypeOf$2(b[prop]) === Object.prototype) {\n if (a[prop] === undefined) {\n a[prop] = deepExtend({}, b[prop], protoExtend); // NOTE: allowDeletion not propagated!\n } else if (_typeof_1(a[prop]) === \"object\" && a[prop] !== null && getPrototypeOf$2(a[prop]) === Object.prototype) {\n deepExtend(a[prop], b[prop], protoExtend); // NOTE: allowDeletion not propagated!\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (isArray$5(b[prop])) {\n var _context3;\n\n a[prop] = slice$5(_context3 = b[prop]).call(_context3);\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n }\n\n return a;\n}\n/**\r\n * Get the type of an object, for example exports.getType([]) returns 'Array'.\r\n *\r\n * @param object - Input value of unknown type.\r\n *\r\n * @returns Detected type.\r\n */\n\n\nfunction getType(object) {\n var type = _typeof_1(object);\n\n if (type === \"object\") {\n if (object === null) {\n return \"null\";\n }\n\n if (object instanceof Boolean) {\n return \"Boolean\";\n }\n\n if (object instanceof Number) {\n return \"Number\";\n }\n\n if (object instanceof String) {\n return \"String\";\n }\n\n if (isArray$5(object)) {\n return \"Array\";\n }\n\n if (object instanceof Date) {\n return \"Date\";\n }\n\n return \"Object\";\n }\n\n if (type === \"number\") {\n return \"Number\";\n }\n\n if (type === \"boolean\") {\n return \"Boolean\";\n }\n\n if (type === \"string\") {\n return \"String\";\n }\n\n if (type === undefined) {\n return \"undefined\";\n }\n\n return type;\n}\n/**\r\n * Used to extend an array and copy it. This is used to propagate paths recursively.\r\n *\r\n * @param arr - First part.\r\n * @param newValue - The value to be aadded into the array.\r\n *\r\n * @returns A new array with all items from arr and newValue (which is last).\r\n */\n\n\nfunction copyAndExtendArray(arr, newValue) {\n var _context4;\n\n return concat$2(_context4 = []).call(_context4, toConsumableArray(arr), [newValue]);\n}\n/**\r\n * Used to extend an array and copy it. This is used to propagate paths recursively.\r\n *\r\n * @param arr - The array to be copied.\r\n *\r\n * @returns Shallow copy of arr.\r\n */\n\n\nfunction copyArray(arr) {\n return slice$5(arr).call(arr);\n}\n/**\r\n * Retrieve the absolute left value of a DOM element.\r\n *\r\n * @param elem - A dom element, for example a div.\r\n *\r\n * @returns The absolute left position of this element in the browser page.\r\n */\n\n\nfunction getAbsoluteLeft(elem) {\n return elem.getBoundingClientRect().left;\n}\n/**\r\n * Retrieve the absolute top value of a DOM element.\r\n *\r\n * @param elem - A dom element, for example a div.\r\n *\r\n * @returns The absolute top position of this element in the browser page.\r\n */\n\n\nfunction getAbsoluteTop(elem) {\n return elem.getBoundingClientRect().top;\n}\n/**\r\n * Add a className to the given elements style.\r\n *\r\n * @param elem - The element to which the classes will be added.\r\n * @param classNames - Space separated list of classes.\r\n */\n\n\nfunction addClassName(elem, classNames) {\n var classes = elem.className.split(\" \");\n var newClasses = classNames.split(\" \");\n classes = concat$2(classes).call(classes, filter$2(newClasses).call(newClasses, function (className) {\n return indexOf$3(classes).call(classes, className) < 0;\n }));\n elem.className = classes.join(\" \");\n}\n/**\r\n * Remove a className from the given elements style.\r\n *\r\n * @param elem - The element from which the classes will be removed.\r\n * @param classNames - Space separated list of classes.\r\n */\n\n\nfunction removeClassName(elem, classNames) {\n var classes = elem.className.split(\" \");\n var oldClasses = classNames.split(\" \");\n classes = filter$2(classes).call(classes, function (className) {\n return indexOf$3(oldClasses).call(oldClasses, className) < 0;\n });\n elem.className = classes.join(\" \");\n}\n/**\r\n * For each method for both arrays and objects.\r\n * In case of an array, the built-in Array.forEach() is applied (**No, it's not!**).\r\n * In case of an Object, the method loops over all properties of the object.\r\n *\r\n * @param object - An Object or Array to be iterated over.\r\n * @param callback - Array.forEach-like callback.\r\n */\n\n\nfunction forEach$3(object, callback) {\n if (isArray$5(object)) {\n // array\n var len = object.length;\n\n for (var i = 0; i < len; i++) {\n callback(object[i], i, object);\n }\n } else {\n // object\n for (var key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n callback(object[key], key, object);\n }\n }\n }\n}\n/**\r\n * Add and event listener. Works for all browsers.\r\n *\r\n * @param element - The element to bind the event listener to.\r\n * @param action - Same as Element.addEventListener(action, —, —).\r\n * @param listener - Same as Element.addEventListener(—, listener, —).\r\n * @param useCapture - Same as Element.addEventListener(—, —, useCapture).\r\n */\n\n\nfunction addEventListener(element, action, listener, useCapture) {\n if (element.addEventListener) {\n var _context5;\n\n if (useCapture === undefined) {\n useCapture = false;\n }\n\n if (action === \"mousewheel\" && indexOf$3(_context5 = navigator.userAgent).call(_context5, \"Firefox\") >= 0) {\n action = \"DOMMouseScroll\"; // For Firefox\n }\n\n element.addEventListener(action, listener, useCapture);\n } else {\n // @TODO: IE types? Does anyone care?\n element.attachEvent(\"on\" + action, listener); // IE browsers\n }\n}\n/**\r\n * Remove an event listener from an element.\r\n *\r\n * @param element - The element to bind the event listener to.\r\n * @param action - Same as Element.removeEventListener(action, —, —).\r\n * @param listener - Same as Element.removeEventListener(—, listener, —).\r\n * @param useCapture - Same as Element.removeEventListener(—, —, useCapture).\r\n */\n\n\nfunction removeEventListener(element, action, listener, useCapture) {\n if (element.removeEventListener) {\n var _context6;\n\n // non-IE browsers\n if (useCapture === undefined) {\n useCapture = false;\n }\n\n if (action === \"mousewheel\" && indexOf$3(_context6 = navigator.userAgent).call(_context6, \"Firefox\") >= 0) {\n action = \"DOMMouseScroll\"; // For Firefox\n }\n\n element.removeEventListener(action, listener, useCapture);\n } else {\n // @TODO: IE types? Does anyone care?\n element.detachEvent(\"on\" + action, listener); // IE browsers\n }\n}\n/**\r\n * Convert hex color string into RGB color object.\r\n *\r\n * @remarks\r\n * {@link http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb}\r\n *\r\n * @param hex - Hex color string (3 or 6 digits, with or without #).\r\n *\r\n * @returns RGB color object.\r\n */\n\nfunction hexToRGB(hex) {\n var result;\n\n switch (hex.length) {\n case 3:\n case 4:\n result = shortHexRE.exec(hex);\n return result ? {\n r: _parseInt$2(result[1] + result[1], 16),\n g: _parseInt$2(result[2] + result[2], 16),\n b: _parseInt$2(result[3] + result[3], 16)\n } : null;\n\n case 6:\n case 7:\n result = fullHexRE.exec(hex);\n return result ? {\n r: _parseInt$2(result[1], 16),\n g: _parseInt$2(result[2], 16),\n b: _parseInt$2(result[3], 16)\n } : null;\n\n default:\n return null;\n }\n}\n/**\r\n * This function takes string color in hex or RGB format and adds the opacity, RGBA is passed through unchanged.\r\n *\r\n * @param color - The color string (hex, RGB, RGBA).\r\n * @param opacity - The new opacity.\r\n *\r\n * @returns RGBA string, for example 'rgba(255, 0, 127, 0.3)'.\r\n */\n\n\nfunction overrideOpacity(color, opacity) {\n if (indexOf$3(color).call(color, \"rgba\") !== -1) {\n return color;\n } else if (indexOf$3(color).call(color, \"rgb\") !== -1) {\n var rgb = color.substr(indexOf$3(color).call(color, \"(\") + 1).replace(\")\", \"\").split(\",\");\n return \"rgba(\" + rgb[0] + \",\" + rgb[1] + \",\" + rgb[2] + \",\" + opacity + \")\";\n } else {\n var _rgb = hexToRGB(color);\n\n if (_rgb == null) {\n return color;\n } else {\n return \"rgba(\" + _rgb.r + \",\" + _rgb.g + \",\" + _rgb.b + \",\" + opacity + \")\";\n }\n }\n}\n/**\r\n * Convert RGB \\<0, 255\\> into hex color string.\r\n *\r\n * @param red - Red channel.\r\n * @param green - Green channel.\r\n * @param blue - Blue channel.\r\n *\r\n * @returns Hex color string (for example: '#0acdc0').\r\n */\n\n\nfunction RGBToHex(red, green, blue) {\n var _context7;\n\n return \"#\" + slice$5(_context7 = ((1 << 24) + (red << 16) + (green << 8) + blue).toString(16)).call(_context7, 1);\n}\n/**\r\n * Parse a color property into an object with border, background, and highlight colors.\r\n *\r\n * @param inputColor - Shorthand color string or input color object.\r\n * @param defaultColor - Full color object to fill in missing values in inputColor.\r\n *\r\n * @returns Color object.\r\n */\n\n\nfunction parseColor(inputColor, defaultColor) {\n if (isString(inputColor)) {\n var colorStr = inputColor;\n\n if (isValidRGB(colorStr)) {\n var _context8;\n\n var rgb = map$2(_context8 = colorStr.substr(4).substr(0, colorStr.length - 5).split(\",\")).call(_context8, function (value) {\n return _parseInt$2(value);\n });\n\n colorStr = RGBToHex(rgb[0], rgb[1], rgb[2]);\n }\n\n if (isValidHex(colorStr) === true) {\n var hsv = hexToHSV(colorStr);\n var lighterColorHSV = {\n h: hsv.h,\n s: hsv.s * 0.8,\n v: Math.min(1, hsv.v * 1.02)\n };\n var darkerColorHSV = {\n h: hsv.h,\n s: Math.min(1, hsv.s * 1.25),\n v: hsv.v * 0.8\n };\n var darkerColorHex = HSVToHex(darkerColorHSV.h, darkerColorHSV.s, darkerColorHSV.v);\n var lighterColorHex = HSVToHex(lighterColorHSV.h, lighterColorHSV.s, lighterColorHSV.v);\n return {\n background: colorStr,\n border: darkerColorHex,\n highlight: {\n background: lighterColorHex,\n border: darkerColorHex\n },\n hover: {\n background: lighterColorHex,\n border: darkerColorHex\n }\n };\n } else {\n return {\n background: colorStr,\n border: colorStr,\n highlight: {\n background: colorStr,\n border: colorStr\n },\n hover: {\n background: colorStr,\n border: colorStr\n }\n };\n }\n } else {\n if (defaultColor) {\n var color = {\n background: inputColor.background || defaultColor.background,\n border: inputColor.border || defaultColor.border,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || defaultColor.highlight.background,\n border: inputColor.highlight && inputColor.highlight.border || defaultColor.highlight.border\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || defaultColor.hover.border,\n background: inputColor.hover && inputColor.hover.background || defaultColor.hover.background\n }\n };\n return color;\n } else {\n var _color = {\n background: inputColor.background || undefined,\n border: inputColor.border || undefined,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || undefined,\n border: inputColor.highlight && inputColor.highlight.border || undefined\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || undefined,\n background: inputColor.hover && inputColor.hover.background || undefined\n }\n };\n return _color;\n }\n }\n}\n/**\r\n * Convert RGB \\<0, 255\\> into HSV object.\r\n *\r\n * @remarks\r\n * {@link http://www.javascripter.net/faq/rgb2hsv.htm}\r\n *\r\n * @param red - Red channel.\r\n * @param green - Green channel.\r\n * @param blue - Blue channel.\r\n *\r\n * @returns HSV color object.\r\n */\n\n\nfunction RGBToHSV(red, green, blue) {\n red = red / 255;\n green = green / 255;\n blue = blue / 255;\n var minRGB = Math.min(red, Math.min(green, blue));\n var maxRGB = Math.max(red, Math.max(green, blue)); // Black-gray-white\n\n if (minRGB === maxRGB) {\n return {\n h: 0,\n s: 0,\n v: minRGB\n };\n } // Colors other than black-gray-white:\n\n\n var d = red === minRGB ? green - blue : blue === minRGB ? red - green : blue - red;\n var h = red === minRGB ? 3 : blue === minRGB ? 1 : 5;\n var hue = 60 * (h - d / (maxRGB - minRGB)) / 360;\n var saturation = (maxRGB - minRGB) / maxRGB;\n var value = maxRGB;\n return {\n h: hue,\n s: saturation,\n v: value\n };\n}\n/**\r\n * Convert HSV \\<0, 1\\> into RGB color object.\r\n *\r\n * @remarks\r\n * {@link https://gist.github.com/mjijackson/5311256}\r\n *\r\n * @param h - Hue.\r\n * @param s - Saturation.\r\n * @param v - Value.\r\n *\r\n * @returns RGB color object.\r\n */\n\n\nfunction HSVToRGB(h, s, v) {\n var r;\n var g;\n var b;\n var i = Math.floor(h * 6);\n var f = h * 6 - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n\n switch (i % 6) {\n case 0:\n r = v, g = t, b = p;\n break;\n\n case 1:\n r = q, g = v, b = p;\n break;\n\n case 2:\n r = p, g = v, b = t;\n break;\n\n case 3:\n r = p, g = q, b = v;\n break;\n\n case 4:\n r = t, g = p, b = v;\n break;\n\n case 5:\n r = v, g = p, b = q;\n break;\n }\n\n return {\n r: Math.floor(r * 255),\n g: Math.floor(g * 255),\n b: Math.floor(b * 255)\n };\n}\n/**\r\n * Convert HSV \\<0, 1\\> into hex color string.\r\n *\r\n * @param h - Hue.\r\n * @param s - Saturation.\r\n * @param v - Value.\r\n *\r\n * @returns Hex color string.\r\n */\n\n\nfunction HSVToHex(h, s, v) {\n var rgb = HSVToRGB(h, s, v);\n return RGBToHex(rgb.r, rgb.g, rgb.b);\n}\n/**\r\n * Convert hex color string into HSV \\<0, 1\\>.\r\n *\r\n * @param hex - Hex color string.\r\n *\r\n * @returns HSV color object.\r\n */\n\n\nfunction hexToHSV(hex) {\n var rgb = hexToRGB(hex);\n\n if (!rgb) {\n throw new TypeError(\"'\".concat(hex, \"' is not a valid color.\"));\n }\n\n return RGBToHSV(rgb.r, rgb.g, rgb.b);\n}\n/**\r\n * Validate hex color string.\r\n *\r\n * @param hex - Unknown string that may contain a color.\r\n *\r\n * @returns True if the string is valid, false otherwise.\r\n */\n\n\nfunction isValidHex(hex) {\n var isOk = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex);\n return isOk;\n}\n/**\r\n * Validate RGB color string.\r\n *\r\n * @param rgb - Unknown string that may contain a color.\r\n *\r\n * @returns True if the string is valid, false otherwise.\r\n */\n\n\nfunction isValidRGB(rgb) {\n return rgbRE.test(rgb);\n}\n/**\r\n * Validate RGBA color string.\r\n *\r\n * @param rgba - Unknown string that may contain a color.\r\n *\r\n * @returns True if the string is valid, false otherwise.\r\n */\n\n\nfunction isValidRGBA(rgba) {\n return rgbaRE.test(rgba);\n}\n/**\r\n * This recursively redirects the prototype of JSON objects to the referenceObject.\r\n * This is used for default options.\r\n *\r\n * @param referenceObject - The original object.\r\n *\r\n * @returns The Element if the referenceObject is an Element, or a new object inheriting from the referenceObject.\r\n */\n\n\nfunction bridgeObject(referenceObject) {\n if (referenceObject === null || _typeof_1(referenceObject) !== \"object\") {\n return null;\n }\n\n if (referenceObject instanceof Element) {\n // Avoid bridging DOM objects\n return referenceObject;\n }\n\n var objectTo = create$2(referenceObject);\n\n for (var i in referenceObject) {\n if (Object.prototype.hasOwnProperty.call(referenceObject, i)) {\n if (_typeof_1(referenceObject[i]) == \"object\") {\n objectTo[i] = bridgeObject(referenceObject[i]);\n }\n }\n }\n\n return objectTo;\n}\n/**\r\n * This is used to set the options of subobjects in the options object.\r\n *\r\n * A requirement of these subobjects is that they have an 'enabled' element\r\n * which is optional for the user but mandatory for the program.\r\n *\r\n * The added value here of the merge is that option 'enabled' is set as required.\r\n *\r\n * @param mergeTarget - Either this.options or the options used for the groups.\r\n * @param options - Options.\r\n * @param option - Option key in the options argument.\r\n * @param globalOptions - Global options, passed in to determine value of option 'enabled'.\r\n */\n\n\nfunction mergeOptions(mergeTarget, options, option) {\n var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n // Local helpers\n var isPresent = function isPresent(obj) {\n return obj !== null && obj !== undefined;\n };\n\n var isObject = function isObject(obj) {\n return obj !== null && _typeof_1(obj) === \"object\";\n }; // https://stackoverflow.com/a/34491287/1223531\n\n\n var isEmpty = function isEmpty(obj) {\n for (var x in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, x)) {\n return false;\n }\n }\n\n return true;\n }; // Guards\n\n\n if (!isObject(mergeTarget)) {\n throw new Error(\"Parameter mergeTarget must be an object\");\n }\n\n if (!isObject(options)) {\n throw new Error(\"Parameter options must be an object\");\n }\n\n if (!isPresent(option)) {\n throw new Error(\"Parameter option must have a value\");\n }\n\n if (!isObject(globalOptions)) {\n throw new Error(\"Parameter globalOptions must be an object\");\n } //\n // Actual merge routine, separated from main logic\n // Only a single level of options is merged. Deeper levels are ref'd. This may actually be an issue.\n //\n\n\n var doMerge = function doMerge(target, options, option) {\n if (!isObject(target[option])) {\n target[option] = {};\n }\n\n var src = options[option];\n var dst = target[option];\n\n for (var prop in src) {\n if (Object.prototype.hasOwnProperty.call(src, prop)) {\n dst[prop] = src[prop];\n }\n }\n }; // Local initialization\n\n\n var srcOption = options[option];\n var globalPassed = isObject(globalOptions) && !isEmpty(globalOptions);\n var globalOption = globalPassed ? globalOptions[option] : undefined;\n var globalEnabled = globalOption ? globalOption.enabled : undefined; /////////////////////////////////////////\n // Main routine\n /////////////////////////////////////////\n\n if (srcOption === undefined) {\n return; // Nothing to do\n }\n\n if (typeof srcOption === \"boolean\") {\n if (!isObject(mergeTarget[option])) {\n mergeTarget[option] = {};\n }\n\n mergeTarget[option].enabled = srcOption;\n return;\n }\n\n if (srcOption === null && !isObject(mergeTarget[option])) {\n // If possible, explicit copy from globals\n if (isPresent(globalOption)) {\n mergeTarget[option] = create$2(globalOption);\n } else {\n return; // Nothing to do\n }\n }\n\n if (!isObject(srcOption)) {\n return;\n } //\n // Ensure that 'enabled' is properly set. It is required internally\n // Note that the value from options will always overwrite the existing value\n //\n\n\n var enabled = true; // default value\n\n if (srcOption.enabled !== undefined) {\n enabled = srcOption.enabled;\n } else {\n // Take from globals, if present\n if (globalEnabled !== undefined) {\n enabled = globalOption.enabled;\n }\n }\n\n doMerge(mergeTarget, options, option);\n mergeTarget[option].enabled = enabled;\n}\n/*\r\n * Easing Functions.\r\n * Only considering the t value for the range [0, 1] => [0, 1].\r\n *\r\n * Inspiration: from http://gizma.com/easing/\r\n * https://gist.github.com/gre/1650294\r\n */\n\n\nvar easingFunctions = {\n /**\r\n * Provides no easing and no acceleration.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\n linear: function linear(t) {\n return t;\n },\n\n /**\r\n * Accelerate from zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\n easeInQuad: function easeInQuad(t) {\n return t * t;\n },\n\n /**\r\n * Decelerate to zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\n easeOutQuad: function easeOutQuad(t) {\n return t * (2 - t);\n },\n\n /**\r\n * Accelerate until halfway, then decelerate.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\n easeInOutQuad: function easeInOutQuad(t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n },\n\n /**\r\n * Accelerate from zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\n easeInCubic: function easeInCubic(t) {\n return t * t * t;\n },\n\n /**\r\n * Decelerate to zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\n easeOutCubic: function easeOutCubic(t) {\n return --t * t * t + 1;\n },\n\n /**\r\n * Accelerate until halfway, then decelerate.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\n easeInOutCubic: function easeInOutCubic(t) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n },\n\n /**\r\n * Accelerate from zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\n easeInQuart: function easeInQuart(t) {\n return t * t * t * t;\n },\n\n /**\r\n * Decelerate to zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\n easeOutQuart: function easeOutQuart(t) {\n return 1 - --t * t * t * t;\n },\n\n /**\r\n * Accelerate until halfway, then decelerate.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\n easeInOutQuart: function easeInOutQuart(t) {\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;\n },\n\n /**\r\n * Accelerate from zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\n easeInQuint: function easeInQuint(t) {\n return t * t * t * t * t;\n },\n\n /**\r\n * Decelerate to zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\n easeOutQuint: function easeOutQuint(t) {\n return 1 + --t * t * t * t * t;\n },\n\n /**\r\n * Accelerate until halfway, then decelerate.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\n easeInOutQuint: function easeInOutQuint(t) {\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;\n }\n};\n// It works only for single property objects,\n// otherwise it combines all of the types in a union.\n// export function topMost (\n// pile: Record[],\n// accessors: K1 | [K1]\n// ): undefined | V1\n// export function topMost (\n// pile: Record>[],\n// accessors: [K1, K2]\n// ): undefined | V1 | V2\n// export function topMost (\n// pile: Record>>[],\n// accessors: [K1, K2, K3]\n// ): undefined | V1 | V2 | V3\n\n/**\r\n * Get the top most property value from a pile of objects.\r\n *\r\n * @param pile - Array of objects, no required format.\r\n * @param accessors - Array of property names.\r\n * For example `object['foo']['bar']` → `['foo', 'bar']`.\r\n *\r\n * @returns Value of the property with given accessors path from the first pile item where it's not undefined.\r\n */\n\n\nfunction topMost(pile, accessors) {\n var candidate;\n\n if (!isArray$5(accessors)) {\n accessors = [accessors];\n }\n\n var _iterator2 = _createForOfIteratorHelper(pile),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var member = _step2.value;\n\n if (member) {\n candidate = member[accessors[0]];\n\n for (var i = 1; i < accessors.length; i++) {\n if (candidate) {\n candidate = candidate[accessors[i]];\n }\n }\n\n if (typeof candidate !== \"undefined\") {\n break;\n }\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return candidate;\n}\n\nvar HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('splice');\nvar USES_TO_LENGTH$5 = arrayMethodUsesToLength('splice', {\n ACCESSORS: true,\n 0: 0,\n 1: 2\n});\nvar max$2 = Math.max;\nvar min$2 = Math.min;\nvar MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; // `Array.prototype.splice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n\n_export({\n target: 'Array',\n proto: true,\n forced: !HAS_SPECIES_SUPPORT$3 || !USES_TO_LENGTH$5\n}, {\n splice: function splice(start, deleteCount\n /* , ...items */\n ) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min$2(max$2(toInteger(deleteCount), 0), len - actualStart);\n }\n\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$1) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n\n A = arraySpeciesCreate(O, actualDeleteCount);\n\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n\n A.length = actualDeleteCount;\n\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];else delete O[to];\n }\n\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];else delete O[to];\n }\n }\n\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n\nvar splice = entryVirtual('Array').splice;\n\nvar ArrayPrototype$7 = Array.prototype;\n\nvar splice_1 = function (it) {\n var own = it.splice;\n return it === ArrayPrototype$7 || it instanceof Array && own === ArrayPrototype$7.splice ? splice : own;\n};\n\nvar splice$1 = splice_1;\n\nvar splice$2 = splice$1;\n\nvar $includes = arrayIncludes.includes;\nvar USES_TO_LENGTH$6 = arrayMethodUsesToLength('indexOf', {\n ACCESSORS: true,\n 1: 0\n}); // `Array.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.includes\n\n_export({\n target: 'Array',\n proto: true,\n forced: !USES_TO_LENGTH$6\n}, {\n includes: function includes(el\n /* , fromIndex = 0 */\n ) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n}); // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\n\nvar includes = entryVirtual('Array').includes;\n\nvar MATCH = wellKnownSymbol('match'); // `IsRegExp` abstract operation\n// https://tc39.github.io/ecma262/#sec-isregexp\n\nvar isRegexp = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');\n};\n\nvar notARegexp = function (it) {\n if (isRegexp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n }\n\n return it;\n};\n\nvar MATCH$1 = wellKnownSymbol('match');\n\nvar correctIsRegexpLogic = function (METHOD_NAME) {\n var regexp = /./;\n\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (e) {\n try {\n regexp[MATCH$1] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (f) {\n /* empty */\n }\n }\n\n return false;\n};\n\n// https://tc39.github.io/ecma262/#sec-string.prototype.includes\n\n\n_export({\n target: 'String',\n proto: true,\n forced: !correctIsRegexpLogic('includes')\n}, {\n includes: function includes(searchString\n /* , position = 0 */\n ) {\n return !!~String(requireObjectCoercible(this)).indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\nvar includes$1 = entryVirtual('String').includes;\n\nvar ArrayPrototype$8 = Array.prototype;\nvar StringPrototype = String.prototype;\n\nvar includes$2 = function (it) {\n var own = it.includes;\n if (it === ArrayPrototype$8 || it instanceof Array && own === ArrayPrototype$8.includes) return includes;\n\n if (typeof it === 'string' || it === StringPrototype || it instanceof String && own === StringPrototype.includes) {\n return includes$1;\n }\n\n return own;\n};\n\nvar includes$3 = includes$2;\n\nvar includes$4 = includes$3;\n\n/* eslint-disable max-statements */\n\n/* eslint-disable no-prototype-builtins */\n\n/* eslint-disable no-unused-vars */\n\n/* eslint-disable no-var */\n\n/**\n * Parse a text source containing data in DOT language into a JSON object.\n * The object contains two lists: one with nodes and one with edges.\n *\n * DOT language reference: http://www.graphviz.org/doc/info/lang.html\n *\n * DOT language attributes: http://graphviz.org/content/attrs\n *\n * @param {string} data Text containing a graph in DOT-notation\n * @return {Object} graph An object containing two parameters:\n * {Object[]} nodes\n * {Object[]} edges\n *\n * -------------------------------------------\n * TODO\n * ====\n *\n * For label handling, this is an incomplete implementation. From docs (quote #3015):\n * \n * > the escape sequences \"\\n\", \"\\l\" and \"\\r\" divide the label into lines, centered, \n * > left-justified, and right-justified, respectively.\n *\n * Source: http://www.graphviz.org/content/attrs#kescString\n *\n * > As another aid for readability, dot allows double-quoted strings to span multiple physical\n * > lines using the standard C convention of a backslash immediately preceding a newline\n * > character\n * > In addition, double-quoted strings can be concatenated using a '+' operator.\n * > As HTML strings can contain newline characters, which are used solely for formatting,\n * > the language does not allow escaped newlines or concatenation operators to be used\n * > within them.\n *\n * - Currently, only '\\\\n' is handled\n * - Note that text explicitly says 'labels'; the dot parser currently handles escape\n * sequences in **all** strings.\n */\nfunction parseDOT(data) {\n dot = data;\n return parseGraph();\n} // mapping of attributes from DOT (the keys) to vis.js (the values)\n\nvar NODE_ATTR_MAPPING = {\n 'fontsize': 'font.size',\n 'fontcolor': 'font.color',\n 'labelfontcolor': 'font.color',\n 'fontname': 'font.face',\n 'color': ['color.border', 'color.background'],\n 'fillcolor': 'color.background',\n 'tooltip': 'title',\n 'labeltooltip': 'title'\n};\n\nvar EDGE_ATTR_MAPPING = create$2(NODE_ATTR_MAPPING);\n\nEDGE_ATTR_MAPPING.color = 'color.color';\nEDGE_ATTR_MAPPING.style = 'dashes'; // token types enumeration\n\nvar TOKENTYPE = {\n NULL: 0,\n DELIMITER: 1,\n IDENTIFIER: 2,\n UNKNOWN: 3\n}; // map with all delimiters\n\nvar DELIMITERS = {\n '{': true,\n '}': true,\n '[': true,\n ']': true,\n ';': true,\n '=': true,\n ',': true,\n '->': true,\n '--': true\n};\nvar dot = ''; // current dot file\n\nvar index = 0; // current index in dot file\n\nvar c = ''; // current token character in expr\n\nvar token = ''; // current token\n\nvar tokenType = TOKENTYPE.NULL; // type of the token\n\n/**\n * Get the first character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\n\nfunction first() {\n index = 0;\n c = dot.charAt(0);\n}\n/**\n * Get the next character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\n\n\nfunction next() {\n index++;\n c = dot.charAt(index);\n}\n/**\n * Preview the next character from the dot file.\n * @return {string} cNext\n */\n\n\nfunction nextPreview() {\n return dot.charAt(index + 1);\n}\n\nvar regexAlphaNumeric = /[a-zA-Z_0-9.:#]/;\n/**\n * Test whether given character is alphabetic or numeric\n * @param {string} c\n * @return {Boolean} isAlphaNumeric\n */\n\nfunction isAlphaNumeric(c) {\n return regexAlphaNumeric.test(c);\n}\n/**\n * Merge all options of object b into object b\n * @param {Object} a\n * @param {Object} b\n * @return {Object} a\n */\n\n\nfunction merge(a, b) {\n if (!a) {\n a = {};\n }\n\n if (b) {\n for (var name in b) {\n if (b.hasOwnProperty(name)) {\n a[name] = b[name];\n }\n }\n }\n\n return a;\n}\n/**\n * Set a value in an object, where the provided parameter name can be a\n * path with nested parameters. For example:\n *\n * var obj = {a: 2};\n * setValue(obj, 'b.c', 3); // obj = {a: 2, b: {c: 3}}\n *\n * @param {Object} obj\n * @param {string} path A parameter name or dot-separated parameter path,\n * like \"color.highlight.border\".\n * @param {*} value\n */\n\n\nfunction setValue(obj, path, value) {\n var keys = path.split('.');\n var o = obj;\n\n while (keys.length) {\n var key = keys.shift();\n\n if (keys.length) {\n // this isn't the end point\n if (!o[key]) {\n o[key] = {};\n }\n\n o = o[key];\n } else {\n // this is the end point\n o[key] = value;\n }\n }\n}\n/**\n * Add a node to a graph object. If there is already a node with\n * the same id, their attributes will be merged.\n * @param {Object} graph\n * @param {Object} node\n */\n\n\nfunction addNode(graph, node) {\n var i, len;\n var current = null; // find root graph (in case of subgraph)\n\n var graphs = [graph]; // list with all graphs from current graph to root graph\n\n var root = graph;\n\n while (root.parent) {\n graphs.push(root.parent);\n root = root.parent;\n } // find existing node (at root level) by its id\n\n\n if (root.nodes) {\n for (i = 0, len = root.nodes.length; i < len; i++) {\n if (node.id === root.nodes[i].id) {\n current = root.nodes[i];\n break;\n }\n }\n }\n\n if (!current) {\n // this is a new node\n current = {\n id: node.id\n };\n\n if (graph.node) {\n // clone default attributes\n current.attr = merge(current.attr, graph.node);\n }\n } // add node to this (sub)graph and all its parent graphs\n\n\n for (i = graphs.length - 1; i >= 0; i--) {\n var _context;\n\n var g = graphs[i];\n\n if (!g.nodes) {\n g.nodes = [];\n }\n\n if (indexOf$3(_context = g.nodes).call(_context, current) === -1) {\n g.nodes.push(current);\n }\n } // merge attributes\n\n\n if (node.attr) {\n current.attr = merge(current.attr, node.attr);\n }\n}\n/**\n * Add an edge to a graph object\n * @param {Object} graph\n * @param {Object} edge\n */\n\n\nfunction addEdge(graph, edge) {\n if (!graph.edges) {\n graph.edges = [];\n }\n\n graph.edges.push(edge);\n\n if (graph.edge) {\n var attr = merge({}, graph.edge); // clone default attributes\n\n edge.attr = merge(attr, edge.attr); // merge attributes\n }\n}\n/**\n * Create an edge to a graph object\n * @param {Object} graph\n * @param {string | number | Object} from\n * @param {string | number | Object} to\n * @param {string} type\n * @param {Object | null} attr\n * @return {Object} edge\n */\n\n\nfunction createEdge(graph, from, to, type, attr) {\n var edge = {\n from: from,\n to: to,\n type: type\n };\n\n if (graph.edge) {\n edge.attr = merge({}, graph.edge); // clone default attributes\n }\n\n edge.attr = merge(edge.attr || {}, attr); // merge attributes\n // Move arrows attribute from attr to edge temporally created in\n // parseAttributeList().\n\n if (attr != null) {\n if (attr.hasOwnProperty('arrows') && attr['arrows'] != null) {\n edge['arrows'] = {\n to: {\n enabled: true,\n type: attr.arrows.type\n }\n };\n attr['arrows'] = null;\n }\n }\n\n return edge;\n}\n/**\n * Get next token in the current dot file.\n * The token and token type are available as token and tokenType\n */\n\n\nfunction getToken() {\n tokenType = TOKENTYPE.NULL;\n token = ''; // skip over whitespaces\n\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') {\n // space, tab, enter\n next();\n }\n\n do {\n var isComment = false; // skip comment\n\n if (c === '#') {\n // find the previous non-space character\n var i = index - 1;\n\n while (dot.charAt(i) === ' ' || dot.charAt(i) === '\\t') {\n i--;\n }\n\n if (dot.charAt(i) === '\\n' || dot.charAt(i) === '') {\n // the # is at the start of a line, this is indeed a line comment\n while (c != '' && c != '\\n') {\n next();\n }\n\n isComment = true;\n }\n }\n\n if (c === '/' && nextPreview() === '/') {\n // skip line comment\n while (c != '' && c != '\\n') {\n next();\n }\n\n isComment = true;\n }\n\n if (c === '/' && nextPreview() === '*') {\n // skip block comment\n while (c != '') {\n if (c === '*' && nextPreview() === '/') {\n // end of block comment found. skip these last two characters\n next();\n next();\n break;\n } else {\n next();\n }\n }\n\n isComment = true;\n } // skip over whitespaces\n\n\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') {\n // space, tab, enter\n next();\n }\n } while (isComment); // check for end of dot file\n\n\n if (c === '') {\n // token is still empty\n tokenType = TOKENTYPE.DELIMITER;\n return;\n } // check for delimiters consisting of 2 characters\n\n\n var c2 = c + nextPreview();\n\n if (DELIMITERS[c2]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c2;\n next();\n next();\n return;\n } // check for delimiters consisting of 1 character\n\n\n if (DELIMITERS[c]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c;\n next();\n return;\n } // check for an identifier (number or string)\n // TODO: more precise parsing of numbers/strings (and the port separator ':')\n\n\n if (isAlphaNumeric(c) || c === '-') {\n token += c;\n next();\n\n while (isAlphaNumeric(c)) {\n token += c;\n next();\n }\n\n if (token === 'false') {\n token = false; // convert to boolean\n } else if (token === 'true') {\n token = true; // convert to boolean\n } else if (!isNaN(Number(token))) {\n token = Number(token); // convert to number\n }\n\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n } // check for a string enclosed by double quotes\n\n\n if (c === '\"') {\n next();\n\n while (c != '' && (c != '\"' || c === '\"' && nextPreview() === '\"')) {\n if (c === '\"') {\n // skip the escape character\n token += c;\n next();\n } else if (c === '\\\\' && nextPreview() === 'n') {\n // Honor a newline escape sequence\n token += '\\n';\n next();\n } else {\n token += c;\n }\n\n next();\n }\n\n if (c != '\"') {\n throw newSyntaxError('End of string \" expected');\n }\n\n next();\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n } // something unknown is found, wrong characters, a syntax error\n\n\n tokenType = TOKENTYPE.UNKNOWN;\n\n while (c != '') {\n token += c;\n next();\n }\n\n throw new SyntaxError('Syntax error in part \"' + chop(token, 30) + '\"');\n}\n/**\n * Parse a graph.\n * @returns {Object} graph\n */\n\n\nfunction parseGraph() {\n var graph = {};\n first();\n getToken(); // optional strict keyword\n\n if (token === 'strict') {\n graph.strict = true;\n getToken();\n } // graph or digraph keyword\n\n\n if (token === 'graph' || token === 'digraph') {\n graph.type = token;\n getToken();\n } // optional graph id\n\n\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n graph.id = token;\n getToken();\n } // open angle bracket\n\n\n if (token != '{') {\n throw newSyntaxError('Angle bracket { expected');\n }\n\n getToken(); // statements\n\n parseStatements(graph); // close angle bracket\n\n if (token != '}') {\n throw newSyntaxError('Angle bracket } expected');\n }\n\n getToken(); // end of file\n\n if (token !== '') {\n throw newSyntaxError('End of file expected');\n }\n\n getToken(); // remove temporary default options\n\n delete graph.node;\n delete graph.edge;\n delete graph.graph;\n return graph;\n}\n/**\n * Parse a list with statements.\n * @param {Object} graph\n */\n\n\nfunction parseStatements(graph) {\n while (token !== '' && token != '}') {\n parseStatement(graph);\n\n if (token === ';') {\n getToken();\n }\n }\n}\n/**\n * Parse a single statement. Can be a an attribute statement, node\n * statement, a series of node statements and edge statements, or a\n * parameter.\n * @param {Object} graph\n */\n\n\nfunction parseStatement(graph) {\n // parse subgraph\n var subgraph = parseSubgraph(graph);\n\n if (subgraph) {\n // edge statements\n parseEdge(graph, subgraph);\n return;\n } // parse an attribute statement\n\n\n var attr = parseAttributeStatement(graph);\n\n if (attr) {\n return;\n } // parse node\n\n\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier expected');\n }\n\n var id = token; // id can be a string or a number\n\n getToken();\n\n if (token === '=') {\n // id statement\n getToken();\n\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier expected');\n }\n\n graph[id] = token;\n getToken(); // TODO: implement comma separated list with \"a_list: ID=ID [','] [a_list] \"\n } else {\n parseNodeStatement(graph, id);\n }\n}\n/**\n * Parse a subgraph\n * @param {Object} graph parent graph object\n * @return {Object | null} subgraph\n */\n\n\nfunction parseSubgraph(graph) {\n var subgraph = null; // optional subgraph keyword\n\n if (token === 'subgraph') {\n subgraph = {};\n subgraph.type = 'subgraph';\n getToken(); // optional graph id\n\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n subgraph.id = token;\n getToken();\n }\n } // open angle bracket\n\n\n if (token === '{') {\n getToken();\n\n if (!subgraph) {\n subgraph = {};\n }\n\n subgraph.parent = graph;\n subgraph.node = graph.node;\n subgraph.edge = graph.edge;\n subgraph.graph = graph.graph; // statements\n\n parseStatements(subgraph); // close angle bracket\n\n if (token != '}') {\n throw newSyntaxError('Angle bracket } expected');\n }\n\n getToken(); // remove temporary default options\n\n delete subgraph.node;\n delete subgraph.edge;\n delete subgraph.graph;\n delete subgraph.parent; // register at the parent graph\n\n if (!graph.subgraphs) {\n graph.subgraphs = [];\n }\n\n graph.subgraphs.push(subgraph);\n }\n\n return subgraph;\n}\n/**\n * parse an attribute statement like \"node [shape=circle fontSize=16]\".\n * Available keywords are 'node', 'edge', 'graph'.\n * The previous list with default attributes will be replaced\n * @param {Object} graph\n * @returns {String | null} keyword Returns the name of the parsed attribute\n * (node, edge, graph), or null if nothing\n * is parsed.\n */\n\n\nfunction parseAttributeStatement(graph) {\n // attribute statements\n if (token === 'node') {\n getToken(); // node attributes\n\n graph.node = parseAttributeList();\n return 'node';\n } else if (token === 'edge') {\n getToken(); // edge attributes\n\n graph.edge = parseAttributeList();\n return 'edge';\n } else if (token === 'graph') {\n getToken(); // graph attributes\n\n graph.graph = parseAttributeList();\n return 'graph';\n }\n\n return null;\n}\n/**\n * parse a node statement\n * @param {Object} graph\n * @param {string | number} id\n */\n\n\nfunction parseNodeStatement(graph, id) {\n // node statement\n var node = {\n id: id\n };\n var attr = parseAttributeList();\n\n if (attr) {\n node.attr = attr;\n }\n\n addNode(graph, node); // edge statements\n\n parseEdge(graph, id);\n}\n/**\n * Parse an edge or a series of edges\n * @param {Object} graph\n * @param {string | number} from Id of the from node\n */\n\n\nfunction parseEdge(graph, from) {\n while (token === '->' || token === '--') {\n var to;\n var type = token;\n getToken();\n var subgraph = parseSubgraph(graph);\n\n if (subgraph) {\n to = subgraph;\n } else {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier or subgraph expected');\n }\n\n to = token;\n addNode(graph, {\n id: to\n });\n getToken();\n } // parse edge attributes\n\n\n var attr = parseAttributeList(); // create edge\n\n var edge = createEdge(graph, from, to, type, attr);\n addEdge(graph, edge);\n from = to;\n }\n}\n/**\n * Parse a set with attributes,\n * for example [label=\"1.000\", shape=solid]\n * @return {Object | null} attr\n */\n\n\nfunction parseAttributeList() {\n var i;\n var attr = null; // edge styles of dot and vis\n\n var edgeStyles = {\n 'dashed': true,\n 'solid': false,\n 'dotted': [1, 5]\n };\n /**\n * Define arrow types.\n * vis currently supports types defined in 'arrowTypes'.\n * Details of arrow shapes are described in\n * http://www.graphviz.org/content/arrow-shapes\n */\n\n var arrowTypes = {\n dot: 'circle',\n box: 'box',\n crow: 'crow',\n curve: 'curve',\n icurve: 'inv_curve',\n normal: 'triangle',\n inv: 'inv_triangle',\n diamond: 'diamond',\n tee: 'bar',\n vee: 'vee'\n };\n /**\n * 'attr_list' contains attributes for checking if some of them are affected\n * later. For instance, both of 'arrowhead' and 'dir' (edge style defined\n * in DOT) make changes to 'arrows' attribute in vis.\n */\n\n var attr_list = new Array();\n var attr_names = new Array(); // used for checking the case.\n // parse attributes\n\n while (token === '[') {\n getToken();\n attr = {};\n\n while (token !== '' && token != ']') {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Attribute name expected');\n }\n\n var name = token;\n getToken();\n\n if (token != '=') {\n throw newSyntaxError('Equal sign = expected');\n }\n\n getToken();\n\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Attribute value expected');\n }\n\n var value = token; // convert from dot style to vis\n\n if (name === 'style') {\n value = edgeStyles[value];\n }\n\n var arrowType;\n\n if (name === 'arrowhead') {\n arrowType = arrowTypes[value];\n name = 'arrows';\n value = {\n 'to': {\n 'enabled': true,\n 'type': arrowType\n }\n };\n }\n\n if (name === 'arrowtail') {\n arrowType = arrowTypes[value];\n name = 'arrows';\n value = {\n 'from': {\n 'enabled': true,\n 'type': arrowType\n }\n };\n }\n\n attr_list.push({\n 'attr': attr,\n 'name': name,\n 'value': value\n });\n attr_names.push(name);\n getToken();\n\n if (token == ',') {\n getToken();\n }\n }\n\n if (token != ']') {\n throw newSyntaxError('Bracket ] expected');\n }\n\n getToken();\n }\n /**\n * As explained in [1], graphviz has limitations for combination of\n * arrow[head|tail] and dir. If attribute list includes 'dir',\n * following cases just be supported.\n * 1. both or none + arrowhead, arrowtail\n * 2. forward + arrowhead (arrowtail is not affedted)\n * 3. back + arrowtail (arrowhead is not affected)\n * [1] https://www.graphviz.org/doc/info/attrs.html#h:undir_note\n */\n\n\n if (includes$4(attr_names).call(attr_names, 'dir')) {\n var idx = {}; // get index of 'arrows' and 'dir'\n\n idx.arrows = {};\n\n for (i = 0; i < attr_list.length; i++) {\n if (attr_list[i].name === 'arrows') {\n if (attr_list[i].value.to != null) {\n idx.arrows.to = i;\n } else if (attr_list[i].value.from != null) {\n idx.arrows.from = i;\n } else {\n throw newSyntaxError('Invalid value of arrows');\n }\n } else if (attr_list[i].name === 'dir') {\n idx.dir = i;\n }\n } // first, add default arrow shape if it is not assigned to avoid error\n\n\n var dir_type = attr_list[idx.dir].value;\n\n if (!includes$4(attr_names).call(attr_names, 'arrows')) {\n if (dir_type === 'both') {\n attr_list.push({\n 'attr': attr_list[idx.dir].attr,\n 'name': 'arrows',\n 'value': {\n to: {\n enabled: true\n }\n }\n });\n idx.arrows.to = attr_list.length - 1;\n attr_list.push({\n 'attr': attr_list[idx.dir].attr,\n 'name': 'arrows',\n 'value': {\n from: {\n enabled: true\n }\n }\n });\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'forward') {\n attr_list.push({\n 'attr': attr_list[idx.dir].attr,\n 'name': 'arrows',\n 'value': {\n to: {\n enabled: true\n }\n }\n });\n idx.arrows.to = attr_list.length - 1;\n } else if (dir_type === 'back') {\n attr_list.push({\n 'attr': attr_list[idx.dir].attr,\n 'name': 'arrows',\n 'value': {\n from: {\n enabled: true\n }\n }\n });\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'none') {\n attr_list.push({\n 'attr': attr_list[idx.dir].attr,\n 'name': 'arrows',\n 'value': ''\n });\n idx.arrows.to = attr_list.length - 1;\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n }\n\n var from_type;\n var to_type; // update 'arrows' attribute from 'dir'.\n\n if (dir_type === 'both') {\n // both of shapes of 'from' and 'to' are given\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n };\n\n splice$2(attr_list).call(attr_list, idx.arrows.from, 1); // shape of 'to' is assigned and use default to 'from'\n\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = 'arrow';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n }; // only shape of 'from' is assigned and use default for 'to'\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n };\n }\n } else if (dir_type === 'back') {\n // given both of shapes, but use only 'from'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n }; // given shape of 'to', but does not use it\n } else if (idx.arrows.to) {\n to_type = '';\n from_type = 'arrow';\n idx.arrows.from = idx.arrows.to;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n }; // assign given 'from' shape\n } else if (idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n };\n }\n\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n from: {\n enabled: true,\n type: attr_list[idx.arrows.from].value.from.type\n }\n }\n };\n } else if (dir_type === 'none') {\n var idx_arrow;\n\n if (idx.arrows.to) {\n idx_arrow = idx.arrows.to;\n } else {\n idx_arrow = idx.arrows.from;\n }\n\n attr_list[idx_arrow] = {\n 'attr': attr_list[idx_arrow].attr,\n 'name': attr_list[idx_arrow].name,\n 'value': ''\n };\n } else if (dir_type === 'forward') {\n // given both of shapes, but use only 'to'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n }; // assign given 'to' shape\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n }; // given shape of 'from', but does not use it\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = '';\n idx.arrows.to = idx.arrows.from;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n };\n }\n\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to: {\n enabled: true,\n type: attr_list[idx.arrows.to].value.to.type\n }\n }\n };\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n } // remove 'dir' attribute no need anymore\n\n\n splice$2(attr_list).call(attr_list, idx.dir, 1);\n } // parse 'penwidth'\n\n\n var nof_attr_list;\n\n if (includes$4(attr_names).call(attr_names, 'penwidth')) {\n var tmp_attr_list = [];\n nof_attr_list = attr_list.length;\n\n for (i = 0; i < nof_attr_list; i++) {\n // exclude 'width' from attr_list if 'penwidth' exists\n if (attr_list[i].name !== 'width') {\n if (attr_list[i].name === 'penwidth') {\n attr_list[i].name = 'width';\n }\n\n tmp_attr_list.push(attr_list[i]);\n }\n }\n\n attr_list = tmp_attr_list;\n }\n\n nof_attr_list = attr_list.length;\n\n for (i = 0; i < nof_attr_list; i++) {\n setValue(attr_list[i].attr, attr_list[i].name, attr_list[i].value);\n }\n\n return attr;\n}\n/**\n * Create a syntax error with extra information on current token and index.\n * @param {string} message\n * @returns {SyntaxError} err\n */\n\n\nfunction newSyntaxError(message) {\n return new SyntaxError(message + ', got \"' + chop(token, 30) + '\" (char ' + index + ')');\n}\n/**\n * Chop off text after a maximum length\n * @param {string} text\n * @param {number} maxLength\n * @returns {String}\n */\n\n\nfunction chop(text, maxLength) {\n return text.length <= maxLength ? text : text.substr(0, 27) + '...';\n}\n/**\n * Execute a function fn for each pair of elements in two arrays\n * @param {Array | *} array1\n * @param {Array | *} array2\n * @param {function} fn\n */\n\n\nfunction forEach2(array1, array2, fn) {\n if (isArray$5(array1)) {\n forEach$2(array1).call(array1, function (elem1) {\n if (isArray$5(array2)) {\n forEach$2(array2).call(array2, function (elem2) {\n fn(elem1, elem2);\n });\n } else {\n fn(elem1, array2);\n }\n });\n } else {\n if (isArray$5(array2)) {\n forEach$2(array2).call(array2, function (elem2) {\n fn(array1, elem2);\n });\n } else {\n fn(array1, array2);\n }\n }\n}\n/**\n * Set a nested property on an object\n * When nested objects are missing, they will be created.\n * For example setProp({}, 'font.color', 'red') will return {font: {color: 'red'}}\n * @param {Object} object\n * @param {string} path A dot separated string like 'font.color'\n * @param {*} value Value for the property\n * @return {Object} Returns the original object, allows for chaining.\n */\n\n\nfunction setProp(object, path, value) {\n var names = path.split('.');\n var prop = names.pop(); // traverse over the nested objects\n\n var obj = object;\n\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n\n if (!(name in obj)) {\n obj[name] = {};\n }\n\n obj = obj[name];\n } // set the property value\n\n\n obj[prop] = value;\n return object;\n}\n/**\n * Convert an object with DOT attributes to their vis.js equivalents.\n * @param {Object} attr Object with DOT attributes\n * @param {Object} mapping\n * @return {Object} Returns an object with vis.js attributes\n */\n\n\nfunction convertAttr(attr, mapping) {\n var converted = {};\n\n for (var prop in attr) {\n if (attr.hasOwnProperty(prop)) {\n var visProp = mapping[prop];\n\n if (isArray$5(visProp)) {\n forEach$2(visProp).call(visProp, function (visPropI) {\n setProp(converted, visPropI, attr[prop]);\n });\n } else if (typeof visProp === 'string') {\n setProp(converted, visProp, attr[prop]);\n } else {\n setProp(converted, prop, attr[prop]);\n }\n }\n }\n\n return converted;\n}\n/**\n * Convert a string containing a graph in DOT language into a map containing\n * with nodes and edges in the format of graph.\n * @param {string} data Text containing a graph in DOT-notation\n * @return {Object} graphData\n */\n\n\nfunction DOTToGraph(data) {\n // parse the DOT file\n var dotData = parseDOT(data);\n var graphData = {\n nodes: [],\n edges: [],\n options: {}\n }; // copy the nodes\n\n if (dotData.nodes) {\n var _context2;\n\n forEach$2(_context2 = dotData.nodes).call(_context2, function (dotNode) {\n var graphNode = {\n id: dotNode.id,\n label: String(dotNode.label || dotNode.id)\n };\n merge(graphNode, convertAttr(dotNode.attr, NODE_ATTR_MAPPING));\n\n if (graphNode.image) {\n graphNode.shape = 'image';\n }\n\n graphData.nodes.push(graphNode);\n });\n } // copy the edges\n\n\n if (dotData.edges) {\n var _context3;\n\n /**\n * Convert an edge in DOT format to an edge with VisGraph format\n * @param {Object} dotEdge\n * @returns {Object} graphEdge\n */\n var convertEdge = function convertEdge(dotEdge) {\n var graphEdge = {\n from: dotEdge.from,\n to: dotEdge.to\n };\n merge(graphEdge, convertAttr(dotEdge.attr, EDGE_ATTR_MAPPING)); // Add arrows attribute to default styled arrow.\n // The reason why default style is not added in parseAttributeList() is\n // because only default is cleared before here.\n\n if (graphEdge.arrows == null && dotEdge.type === '->') {\n graphEdge.arrows = 'to';\n }\n\n return graphEdge;\n };\n\n forEach$2(_context3 = dotData.edges).call(_context3, function (dotEdge) {\n var from, to;\n\n if (dotEdge.from instanceof Object) {\n from = dotEdge.from.nodes;\n } else {\n from = {\n id: dotEdge.from\n };\n }\n\n if (dotEdge.to instanceof Object) {\n to = dotEdge.to.nodes;\n } else {\n to = {\n id: dotEdge.to\n };\n }\n\n if (dotEdge.from instanceof Object && dotEdge.from.edges) {\n var _context4;\n\n forEach$2(_context4 = dotEdge.from.edges).call(_context4, function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n\n forEach2(from, to, function (from, to) {\n var subEdge = createEdge(graphData, from.id, to.id, dotEdge.type, dotEdge.attr);\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n\n if (dotEdge.to instanceof Object && dotEdge.to.edges) {\n var _context5;\n\n forEach$2(_context5 = dotEdge.to.edges).call(_context5, function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n });\n } // copy the options\n\n\n if (dotData.attr) {\n graphData.options = dotData.attr;\n }\n\n return graphData;\n}\n\nvar dotparser = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tparseDOT: parseDOT,\n\tDOTToGraph: DOTToGraph\n});\n\n/**\r\n * Convert Gephi to Vis.\r\n *\r\n * @param gephiJSON - The parsed JSON data in Gephi format.\r\n * @param optionsObj - Additional options.\r\n *\r\n * @returns The converted data ready to be used in Vis.\r\n */\nfunction parseGephi(gephiJSON, optionsObj) {\n var _context;\n\n var options = {\n edges: {\n inheritColor: false\n },\n nodes: {\n fixed: false,\n parseColor: false\n }\n };\n\n if (optionsObj != null) {\n if (optionsObj.fixed != null) {\n options.nodes.fixed = optionsObj.fixed;\n }\n\n if (optionsObj.parseColor != null) {\n options.nodes.parseColor = optionsObj.parseColor;\n }\n\n if (optionsObj.inheritColor != null) {\n options.edges.inheritColor = optionsObj.inheritColor;\n }\n }\n\n var gEdges = gephiJSON.edges;\n\n var vEdges = map$2(gEdges).call(gEdges, function (gEdge) {\n var vEdge = {\n from: gEdge.source,\n id: gEdge.id,\n to: gEdge.target\n };\n\n if (gEdge.attributes != null) {\n vEdge.attributes = gEdge.attributes;\n }\n\n if (gEdge.label != null) {\n vEdge.label = gEdge.label;\n }\n\n if (gEdge.attributes != null && gEdge.attributes.title != null) {\n vEdge.title = gEdge.attributes.title;\n }\n\n if (gEdge.type === \"Directed\") {\n vEdge.arrows = \"to\";\n } // edge['value'] = gEdge.attributes != null ? gEdge.attributes.Weight : undefined;\n // edge['width'] = edge['value'] != null ? undefined : edgegEdge.size;\n\n\n if (gEdge.color && options.edges.inheritColor === false) {\n vEdge.color = gEdge.color;\n }\n\n return vEdge;\n });\n\n var vNodes = map$2(_context = gephiJSON.nodes).call(_context, function (gNode) {\n var vNode = {\n id: gNode.id,\n fixed: options.nodes.fixed && gNode.x != null && gNode.y != null\n };\n\n if (gNode.attributes != null) {\n vNode.attributes = gNode.attributes;\n }\n\n if (gNode.label != null) {\n vNode.label = gNode.label;\n }\n\n if (gNode.size != null) {\n vNode.size = gNode.size;\n }\n\n if (gNode.attributes != null && gNode.attributes.title != null) {\n vNode.title = gNode.attributes.title;\n }\n\n if (gNode.title != null) {\n vNode.title = gNode.title;\n }\n\n if (gNode.x != null) {\n vNode.x = gNode.x;\n }\n\n if (gNode.y != null) {\n vNode.y = gNode.y;\n }\n\n if (gNode.color != null) {\n if (options.nodes.parseColor === true) {\n vNode.color = gNode.color;\n } else {\n vNode.color = {\n background: gNode.color,\n border: gNode.color,\n highlight: {\n background: gNode.color,\n border: gNode.color\n },\n hover: {\n background: gNode.color,\n border: gNode.color\n }\n };\n }\n }\n\n return vNode;\n });\n\n return {\n nodes: vNodes,\n edges: vEdges\n };\n}\n\nvar gephiParser = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tparseGephi: parseGephi\n});\n\nfunction styleInject(css, ref) {\n if (ref === void 0) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') {\n return;\n }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z = \".vis-overlay {\\n position: absolute;\\n top: 0px;\\n right: 0px;\\n bottom: 0px;\\n left: 0px;\\n\\n /* Must be displayed above for example selected Timeline items */\\n z-index: 10;\\n}\\n\\n.vis-active {\\n box-shadow: 0 0 10px #86d5f8;\\n}\\n\";\nstyleInject(css_248z);\n\nvar keycharm = createCommonjsModule(function (module, exports) {\n /**\r\n * Created by Alex on 11/6/2014.\r\n */\n // https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60\n // if the module has no dependencies, the above pattern can be simplified to\n\n (function (root, factory) {\n {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory();\n }\n })(commonjsGlobal, function () {\n function keycharm(options) {\n var preventDefault = options && options.preventDefault || false;\n var container = options && options.container || window;\n var _exportFunctions = {};\n var _bound = {\n keydown: {},\n keyup: {}\n };\n var _keys = {};\n var i; // a - z\n\n for (i = 97; i <= 122; i++) {\n _keys[String.fromCharCode(i)] = {\n code: 65 + (i - 97),\n shift: false\n };\n } // A - Z\n\n\n for (i = 65; i <= 90; i++) {\n _keys[String.fromCharCode(i)] = {\n code: i,\n shift: true\n };\n } // 0 - 9\n\n\n for (i = 0; i <= 9; i++) {\n _keys['' + i] = {\n code: 48 + i,\n shift: false\n };\n } // F1 - F12\n\n\n for (i = 1; i <= 12; i++) {\n _keys['F' + i] = {\n code: 111 + i,\n shift: false\n };\n } // num0 - num9\n\n\n for (i = 0; i <= 9; i++) {\n _keys['num' + i] = {\n code: 96 + i,\n shift: false\n };\n } // numpad misc\n\n\n _keys['num*'] = {\n code: 106,\n shift: false\n };\n _keys['num+'] = {\n code: 107,\n shift: false\n };\n _keys['num-'] = {\n code: 109,\n shift: false\n };\n _keys['num/'] = {\n code: 111,\n shift: false\n };\n _keys['num.'] = {\n code: 110,\n shift: false\n }; // arrows\n\n _keys['left'] = {\n code: 37,\n shift: false\n };\n _keys['up'] = {\n code: 38,\n shift: false\n };\n _keys['right'] = {\n code: 39,\n shift: false\n };\n _keys['down'] = {\n code: 40,\n shift: false\n }; // extra keys\n\n _keys['space'] = {\n code: 32,\n shift: false\n };\n _keys['enter'] = {\n code: 13,\n shift: false\n };\n _keys['shift'] = {\n code: 16,\n shift: undefined\n };\n _keys['esc'] = {\n code: 27,\n shift: false\n };\n _keys['backspace'] = {\n code: 8,\n shift: false\n };\n _keys['tab'] = {\n code: 9,\n shift: false\n };\n _keys['ctrl'] = {\n code: 17,\n shift: false\n };\n _keys['alt'] = {\n code: 18,\n shift: false\n };\n _keys['delete'] = {\n code: 46,\n shift: false\n };\n _keys['pageup'] = {\n code: 33,\n shift: false\n };\n _keys['pagedown'] = {\n code: 34,\n shift: false\n }; // symbols\n\n _keys['='] = {\n code: 187,\n shift: false\n };\n _keys['-'] = {\n code: 189,\n shift: false\n };\n _keys[']'] = {\n code: 221,\n shift: false\n };\n _keys['['] = {\n code: 219,\n shift: false\n };\n\n var down = function (event) {\n handleEvent(event, 'keydown');\n };\n\n var up = function (event) {\n handleEvent(event, 'keyup');\n }; // handle the actualy bound key with the event\n\n\n var handleEvent = function (event, type) {\n if (_bound[type][event.keyCode] !== undefined) {\n var bound = _bound[type][event.keyCode];\n\n for (var i = 0; i < bound.length; i++) {\n if (bound[i].shift === undefined) {\n bound[i].fn(event);\n } else if (bound[i].shift == true && event.shiftKey == true) {\n bound[i].fn(event);\n } else if (bound[i].shift == false && event.shiftKey == false) {\n bound[i].fn(event);\n }\n }\n\n if (preventDefault == true) {\n event.preventDefault();\n }\n }\n }; // bind a key to a callback\n\n\n _exportFunctions.bind = function (key, callback, type) {\n if (type === undefined) {\n type = 'keydown';\n }\n\n if (_keys[key] === undefined) {\n throw new Error(\"unsupported key: \" + key);\n }\n\n if (_bound[type][_keys[key].code] === undefined) {\n _bound[type][_keys[key].code] = [];\n }\n\n _bound[type][_keys[key].code].push({\n fn: callback,\n shift: _keys[key].shift\n });\n }; // bind all keys to a call back (demo purposes)\n\n\n _exportFunctions.bindAll = function (callback, type) {\n if (type === undefined) {\n type = 'keydown';\n }\n\n for (var key in _keys) {\n if (_keys.hasOwnProperty(key)) {\n _exportFunctions.bind(key, callback, type);\n }\n }\n }; // get the key label from an event\n\n\n _exportFunctions.getKey = function (event) {\n for (var key in _keys) {\n if (_keys.hasOwnProperty(key)) {\n if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) {\n return key;\n } else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) {\n return key;\n } else if (event.keyCode == _keys[key].code && key == 'shift') {\n return key;\n }\n }\n }\n\n return \"unknown key, currently not supported\";\n }; // unbind either a specific callback from a key or all of them (by leaving callback undefined)\n\n\n _exportFunctions.unbind = function (key, callback, type) {\n if (type === undefined) {\n type = 'keydown';\n }\n\n if (_keys[key] === undefined) {\n throw new Error(\"unsupported key: \" + key);\n }\n\n if (callback !== undefined) {\n var newBindings = [];\n var bound = _bound[type][_keys[key].code];\n\n if (bound !== undefined) {\n for (var i = 0; i < bound.length; i++) {\n if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) {\n newBindings.push(_bound[type][_keys[key].code][i]);\n }\n }\n }\n\n _bound[type][_keys[key].code] = newBindings;\n } else {\n _bound[type][_keys[key].code] = [];\n }\n }; // reset all bound variables.\n\n\n _exportFunctions.reset = function () {\n _bound = {\n keydown: {},\n keyup: {}\n };\n }; // unbind all listeners and reset all variables.\n\n\n _exportFunctions.destroy = function () {\n _bound = {\n keydown: {},\n keyup: {}\n };\n container.removeEventListener('keydown', down, true);\n container.removeEventListener('keyup', up, true);\n }; // create listeners.\n\n\n container.addEventListener('keydown', down, true);\n container.addEventListener('keyup', up, true); // return the public functions.\n\n return _exportFunctions;\n }\n\n return keycharm;\n });\n});\n\n/*! Hammer.JS - v2.0.17-rc - 2019-12-16\n * http://naver.github.io/egjs\n *\n * Forked By Naver egjs\n * Copyright (c) hammerjs\n * Licensed under the MIT license */\nfunction _extends() {\n _extends = Object.assign || 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\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\n\n\nvar assign$3;\n\nif (typeof Object.assign !== 'function') {\n assign$3 = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n\n return output;\n };\n} else {\n assign$3 = Object.assign;\n}\n\nvar assign$1$1 = assign$3;\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = typeof document === \"undefined\" ? {\n style: {}\n} : document.createElement('div');\nvar TYPE_FUNCTION = 'function';\nvar round = Math.round,\n abs = Math.abs;\nvar now$3 = Date.now;\n/**\n * @private\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\n\nfunction prefixed(obj, property) {\n var prefix;\n var prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n var i = 0;\n\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = prefix ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n\n i++;\n }\n\n return undefined;\n}\n/* eslint-disable no-new-func, no-nested-ternary */\n\n\nvar win;\n\nif (typeof window === \"undefined\") {\n // window is undefined in node.js\n win = {};\n} else {\n win = window;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n\n var touchMap = {};\n var cssSupports = win.CSS && win.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) {\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n return touchMap[val] = cssSupports ? win.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\n\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\nvar SUPPORT_TOUCH = ('ontouchstart' in win);\nvar SUPPORT_POINTER_EVENTS = prefixed(win, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\nvar COMPUTE_INTERVAL = 25;\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n/**\n * @private\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\n\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n/**\n * @private\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\n\n\nfunction boolOrFn(val, args) {\n if (typeof val === TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n\n return val;\n}\n/**\n * @private\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\n\n\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n/**\n * @private\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\n\n\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n } // pan-x OR pan-y\n\n\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n } // manipulation\n\n\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n/**\n * @private\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\n\n\nvar TouchAction = /*#__PURE__*/function () {\n function TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n }\n /**\n * @private\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n\n\n var _proto = TouchAction.prototype;\n\n _proto.set = function set(value) {\n // find out the touch-action by the event handlers\n if (value === TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n\n this.actions = value.toLowerCase().trim();\n };\n /**\n * @private\n * just re-set the touchAction value\n */\n\n\n _proto.update = function update() {\n this.set(this.manager.options.touchAction);\n };\n /**\n * @private\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n\n\n _proto.compute = function compute() {\n var actions = [];\n each(this.manager.recognizers, function (recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n };\n /**\n * @private\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n\n\n _proto.preventDefaults = function preventDefaults(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection; // if the touch action did prevented once this session\n\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n // do not prevent defaults if this is a tap gesture\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) {\n return this.preventSrc(srcEvent);\n }\n };\n /**\n * @private\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n\n\n _proto.preventSrc = function preventSrc(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n };\n\n return TouchAction;\n}();\n/**\n * @private\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\n\n\nfunction hasParent(node, parent) {\n while (node) {\n if (node === parent) {\n return true;\n }\n\n node = node.parentNode;\n }\n\n return false;\n}\n/**\n * @private\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\n\n\nfunction getCenter(pointers) {\n var pointersLength = pointers.length; // no need to loop when only one touch\n\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0;\n var y = 0;\n var i = 0;\n\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n/**\n * @private\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\n\n\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now$3(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n/**\n * @private\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\n\n\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.sqrt(x * x + y * y);\n}\n/**\n * @private\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\n\n\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n/**\n * @private\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\n\n\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center; // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session;\n // jscs throwing error on defalut destructured values and without defaults tests fail\n\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n/**\n * @private\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\n\n\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n/**\n * @private\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\n\n\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n/**\n * @private\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\n\n\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n/**\n * @private\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\n\n\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input;\n var deltaTime = input.timeStamp - last.timeStamp;\n var velocity;\n var velocityX;\n var velocityY;\n var direction;\n\n if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = abs(v.x) > abs(v.y) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n/**\n* @private\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\n\n\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length; // store the first input to calculate the distance and direction\n\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n } // to compute scale and rotation we need to store the multiple touches\n\n\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput,\n firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n var center = input.center = getCenter(pointers);\n input.timeStamp = now$3();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y;\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers;\n computeIntervalInputData(session, input); // find the correct target\n\n var target = manager.element;\n var srcEvent = input.srcEvent;\n var srcEventTarget;\n\n if (srcEvent.composedPath) {\n srcEventTarget = srcEvent.composedPath()[0];\n } else if (srcEvent.path) {\n srcEventTarget = srcEvent.path[0];\n } else {\n srcEventTarget = srcEvent.target;\n }\n\n if (hasParent(srcEventTarget, target)) {\n target = srcEventTarget;\n }\n\n input.target = target;\n}\n/**\n * @private\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\n\n\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0;\n var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0;\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n } // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n\n\n input.eventType = eventType; // compute scale, rotation etc\n\n computeInputData(manager, input); // emit secret event\n\n manager.emit('hammer.input', input);\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n/**\n * @private\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\n\n\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n/**\n * @private\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\n\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.addEventListener(type, handler, false);\n });\n}\n/**\n * @private\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\n\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.removeEventListener(type, handler, false);\n });\n}\n/**\n * @private\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\n\n\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return doc.defaultView || doc.parentWindow || window;\n}\n/**\n * @private\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\n\n\nvar Input = /*#__PURE__*/function () {\n function Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget; // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n\n this.domHandler = function (ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n }\n /**\n * @private\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n\n\n var _proto = Input.prototype;\n\n _proto.handler = function handler() {};\n /**\n * @private\n * bind the events\n */\n\n\n _proto.init = function init() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n /**\n * @private\n * unbind the events\n */\n\n\n _proto.destroy = function destroy() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n\n return Input;\n}();\n/**\n * @private\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\n\n\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n\n while (i < src.length) {\n if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) {\n // do not use === here, test fails\n return i;\n }\n\n i++;\n }\n\n return -1;\n }\n}\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n}; // in IE10 the pointer types is defined as an enum\n\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n\n};\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; // IE10 has prefixed support, and case-sensitive\n\nif (win.MSPointerEvent && !win.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n/**\n * @private\n * Pointer events input\n * @constructor\n * @extends Input\n */\n\n\nvar PointerEventInput = /*#__PURE__*/function (_Input) {\n _inheritsLoose(PointerEventInput, _Input);\n\n function PointerEventInput() {\n var _this;\n\n var proto = PointerEventInput.prototype;\n proto.evEl = POINTER_ELEMENT_EVENTS;\n proto.evWin = POINTER_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.store = _this.manager.session.pointerEvents = [];\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = PointerEventInput.prototype;\n\n _proto.handler = function handler(ev) {\n var store = this.store;\n var removePointer = false;\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n var isTouch = pointerType === INPUT_TYPE_TOUCH; // get index of the event in the store\n\n var storeIndex = inArray(store, ev.pointerId, 'pointerId'); // start and mouse must be down\n\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n } // it not found, so the pointer hasn't been down (so it's probably a hover)\n\n\n if (storeIndex < 0) {\n return;\n } // update the event in the store\n\n\n store[storeIndex] = ev;\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n };\n\n return PointerEventInput;\n}(Input);\n/**\n * @private\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\n\n\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n/**\n * @private\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\n\n\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function (a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\n\nvar TouchInput = /*#__PURE__*/function (_Input) {\n _inheritsLoose(TouchInput, _Input);\n\n function TouchInput() {\n var _this;\n\n TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.targetIds = {}; // this.evTarget = TOUCH_TARGET_EVENTS;\n\n return _this;\n }\n\n var _proto = TouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return TouchInput;\n}(Input);\n\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds; // when there is only one touch, the process can be simplified\n\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i;\n var targetTouches;\n var changedTouches = toArray(ev.changedTouches);\n var changedTargetTouches = [];\n var target = this.target; // get target touches from touches\n\n targetTouches = allTouches.filter(function (touch) {\n return hasParent(touch.target, target);\n }); // collect touches\n\n if (type === INPUT_START) {\n i = 0;\n\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n } // filter changed touches to only contain touches that exist in the collected target ids\n\n\n i = 0;\n\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n } // cleanup removed touches\n\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches];\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n/**\n * @private\n * Mouse events input\n * @constructor\n * @extends Input\n */\n\nvar MouseInput = /*#__PURE__*/function (_Input) {\n _inheritsLoose(MouseInput, _Input);\n\n function MouseInput() {\n var _this;\n\n var proto = MouseInput.prototype;\n proto.evEl = MOUSE_ELEMENT_EVENTS;\n proto.evWin = MOUSE_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.pressed = false; // mousedown state\n\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = MouseInput.prototype;\n\n _proto.handler = function handler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type]; // on start we want to have the left mouse button down\n\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n } // mouse must be down\n\n\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n };\n\n return MouseInput;\n}(Input);\n/**\n * @private\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction setLastTouch(eventData) {\n var _eventData$changedPoi = eventData.changedPointers,\n touch = _eventData$changedPoi[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {\n x: touch.clientX,\n y: touch.clientY\n };\n var lts = this.lastTouches;\n this.lastTouches.push(lastTouch);\n\n var removeLastTouch = function removeLastTouch() {\n var i = lts.indexOf(lastTouch);\n\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX;\n var y = eventData.srcEvent.clientY;\n\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x);\n var dy = Math.abs(y - t.y);\n\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n\n return false;\n}\n\nvar TouchMouseInput = /*#__PURE__*/function () {\n var TouchMouseInput = /*#__PURE__*/function (_Input) {\n _inheritsLoose(TouchMouseInput, _Input);\n\n function TouchMouseInput(_manager, callback) {\n var _this;\n\n _this = _Input.call(this, _manager, callback) || this;\n\n _this.handler = function (manager, inputEvent, inputData) {\n var isTouch = inputData.pointerType === INPUT_TYPE_TOUCH;\n var isMouse = inputData.pointerType === INPUT_TYPE_MOUSE;\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n } // when we're in a touch event, record touches to de-dupe synthetic mouse event\n\n\n if (isTouch) {\n recordTouches.call(_assertThisInitialized(_assertThisInitialized(_this)), inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(_assertThisInitialized(_assertThisInitialized(_this)), inputData)) {\n return;\n }\n\n _this.callback(manager, inputEvent, inputData);\n };\n\n _this.touch = new TouchInput(_this.manager, _this.handler);\n _this.mouse = new MouseInput(_this.manager, _this.handler);\n _this.primaryTouch = null;\n _this.lastTouches = [];\n return _this;\n }\n /**\n * @private\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n\n\n var _proto = TouchMouseInput.prototype;\n /**\n * @private\n * remove the event listeners\n */\n\n _proto.destroy = function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n };\n\n return TouchMouseInput;\n }(Input);\n\n return TouchMouseInput;\n}();\n/**\n * @private\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\n\n\nfunction createInputInstance(manager) {\n var Type; // let inputClass = manager.options.inputClass;\n\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n\n return new Type(manager, inputHandler);\n}\n/**\n * @private\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\n\n\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n\n return false;\n}\n\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n/**\n * @private\n * get a unique id\n * @returns {number} uniqueId\n */\n\nvar _uniqueId = 1;\n\nfunction uniqueId() {\n return _uniqueId++;\n}\n/**\n * @private\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\n\n\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n\n if (manager) {\n return manager.get(otherRecognizer);\n }\n\n return otherRecognizer;\n}\n/**\n * @private\n * get a usable string, used as event postfix\n * @param {constant} state\n * @returns {String} state\n */\n\n\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n\n return '';\n}\n/**\n * @private\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\n\n/**\n * @private\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\n\n\nvar Recognizer = /*#__PURE__*/function () {\n function Recognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n this.options = _extends({\n enable: true\n }, options);\n this.id = uniqueId();\n this.manager = null; // default is enable true\n\n this.state = STATE_POSSIBLE;\n this.simultaneous = {};\n this.requireFail = [];\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n\n\n var _proto = Recognizer.prototype;\n\n _proto.set = function set(options) {\n assign$1$1(this.options, options); // also update the touchAction, in case something changed about the directions/enabled state\n\n this.manager && this.manager.touchAction.update();\n return this;\n };\n /**\n * @private\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.recognizeWith = function recognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRecognizeWith = function dropRecognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n };\n /**\n * @private\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.requireFailure = function requireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRequireFailure = function dropRequireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n\n return this;\n };\n /**\n * @private\n * has require failures boolean\n * @returns {boolean}\n */\n\n\n _proto.hasRequireFailures = function hasRequireFailures() {\n return this.requireFail.length > 0;\n };\n /**\n * @private\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n\n\n _proto.canRecognizeWith = function canRecognizeWith(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n };\n /**\n * @private\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n\n\n _proto.emit = function emit(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n } // 'panstart' and 'panmove'\n\n\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) {\n // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n } // panend and pancancel\n\n\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n };\n /**\n * @private\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n\n\n _proto.tryEmit = function tryEmit(input) {\n if (this.canEmit()) {\n return this.emit(input);\n } // it's failing anyway\n\n\n this.state = STATE_FAILED;\n };\n /**\n * @private\n * can we emit?\n * @returns {boolean}\n */\n\n\n _proto.canEmit = function canEmit() {\n var i = 0;\n\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n\n i++;\n }\n\n return true;\n };\n /**\n * @private\n * update the recognizer\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign$1$1({}, inputData); // is is enabled and allow recognizing?\n\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n } // reset when we've reached the end\n\n\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone); // the recognizer has recognized a gesture\n // so trigger an event\n\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n };\n /**\n * @private\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {constant} STATE\n */\n\n /* jshint ignore:start */\n\n\n _proto.process = function process(inputData) {};\n /* jshint ignore:end */\n\n /**\n * @private\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n\n\n _proto.getTouchAction = function getTouchAction() {};\n /**\n * @private\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n\n\n _proto.reset = function reset() {};\n\n return Recognizer;\n}();\n/**\n * @private\n * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\n\n\nvar TapRecognizer = /*#__PURE__*/function (_Recognizer) {\n _inheritsLoose(TapRecognizer, _Recognizer);\n\n function TapRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300,\n // max time between the multi-tap taps\n time: 250,\n // max time of the pointer to be down (like finger on the screen)\n threshold: 9,\n // a minimal movement is ok, but keep it low\n posThreshold: 10\n }, options)) || this; // previous time and center,\n // used for tap counting\n\n _this.pTime = false;\n _this.pCenter = false;\n _this._timer = null;\n _this._input = null;\n _this.count = 0;\n return _this;\n }\n\n var _proto = TapRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_MANIPULATION];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n this.reset();\n\n if (input.eventType & INPUT_START && this.count === 0) {\n return this.failTimeout();\n } // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType !== INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input; // if tap count matches we have recognized it,\n // else it has began recognizing...\n\n var tapCount = this.count % options.taps;\n\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.interval);\n return STATE_BEGAN;\n }\n }\n }\n\n return STATE_FAILED;\n };\n\n _proto.failTimeout = function failTimeout() {\n var _this3 = this;\n\n this._timer = setTimeout(function () {\n _this3.state = STATE_FAILED;\n }, this.options.interval);\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit() {\n if (this.state === STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return TapRecognizer;\n}(Recognizer);\n/**\n * @private\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\n\n\nvar AttrRecognizer = /*#__PURE__*/function (_Recognizer) {\n _inheritsLoose(AttrRecognizer, _Recognizer);\n\n function AttrRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _Recognizer.call(this, _extends({\n pointers: 1\n }, options)) || this;\n }\n /**\n * @private\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n\n\n var _proto = AttrRecognizer.prototype;\n\n _proto.attrTest = function attrTest(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n };\n /**\n * @private\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n\n\n _proto.process = function process(input) {\n var state = this.state;\n var eventType = input.eventType;\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input); // on cancel input and we've recognized before, return STATE_CANCELLED\n\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n\n return state | STATE_CHANGED;\n }\n\n return STATE_FAILED;\n };\n\n return AttrRecognizer;\n}(Recognizer);\n/**\n * @private\n * direction cons to string\n * @param {constant} direction\n * @returns {String}\n */\n\n\nfunction directionStr(direction) {\n if (direction === DIRECTION_DOWN) {\n return 'down';\n } else if (direction === DIRECTION_UP) {\n return 'up';\n } else if (direction === DIRECTION_LEFT) {\n return 'left';\n } else if (direction === DIRECTION_RIGHT) {\n return 'right';\n }\n\n return '';\n}\n/**\n * @private\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\n\nvar PanRecognizer = /*#__PURE__*/function (_AttrRecognizer) {\n _inheritsLoose(PanRecognizer, _AttrRecognizer);\n\n function PanRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _AttrRecognizer.call(this, _extends({\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n }, options)) || this;\n _this.pX = null;\n _this.pY = null;\n return _this;\n }\n\n var _proto = PanRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n var direction = this.options.direction;\n var actions = [];\n\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n\n return actions;\n };\n\n _proto.directionTest = function directionTest(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY; // lock to axis?\n\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x !== this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y !== this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n };\n\n _proto.attrTest = function attrTest(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) && ( // replace with a super call\n this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input));\n };\n\n _proto.emit = function emit(input) {\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PanRecognizer;\n}(AttrRecognizer);\n/**\n * @private\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\n\nvar SwipeRecognizer = /*#__PURE__*/function (_AttrRecognizer) {\n _inheritsLoose(SwipeRecognizer, _AttrRecognizer);\n\n function SwipeRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n }, options)) || this;\n }\n\n var _proto = SwipeRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n };\n\n _proto.attrTest = function attrTest(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return _AttrRecognizer.prototype.attrTest.call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers === this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n };\n\n _proto.emit = function emit(input) {\n var direction = directionStr(input.offsetDirection);\n\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n };\n\n return SwipeRecognizer;\n}(AttrRecognizer);\n/**\n * @private\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\n\n\nvar PinchRecognizer = /*#__PURE__*/function (_AttrRecognizer) {\n _inheritsLoose(PinchRecognizer, _AttrRecognizer);\n\n function PinchRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'pinch',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = PinchRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n _proto.emit = function emit(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PinchRecognizer;\n}(AttrRecognizer);\n/**\n * @private\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\n\n\nvar RotateRecognizer = /*#__PURE__*/function (_AttrRecognizer) {\n _inheritsLoose(RotateRecognizer, _AttrRecognizer);\n\n function RotateRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'rotate',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = RotateRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n return RotateRecognizer;\n}(AttrRecognizer);\n/**\n * @private\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\n\n\nvar PressRecognizer = /*#__PURE__*/function (_Recognizer) {\n _inheritsLoose(PressRecognizer, _Recognizer);\n\n function PressRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'press',\n pointers: 1,\n time: 251,\n // minimal time of the pointer to be pressed\n threshold: 9\n }, options)) || this;\n _this._timer = null;\n _this._input = null;\n return _this;\n }\n\n var _proto = PressRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_AUTO];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n this._input = input; // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.time);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && input.eventType & INPUT_END) {\n this.manager.emit(this.options.event + \"up\", input);\n } else {\n this._input.timeStamp = now$3();\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return PressRecognizer;\n}(Recognizer);\n\nvar defaults = {\n /**\n * @private\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * @private\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @private\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * @private\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * @private\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * @private\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * @private\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: \"none\",\n\n /**\n * @private\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: \"none\",\n\n /**\n * @private\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: \"none\",\n\n /**\n * @private\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: \"none\",\n\n /**\n * @private\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: \"none\",\n\n /**\n * @private\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: \"rgba(0,0,0,0)\"\n }\n};\n/**\n * @private\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * This is separated with other defaults because of tree-shaking.\n * @type {Array}\n */\n\nvar preset = [[RotateRecognizer, {\n enable: false\n}], [PinchRecognizer, {\n enable: false\n}, ['rotate']], [SwipeRecognizer, {\n direction: DIRECTION_HORIZONTAL\n}], [PanRecognizer, {\n direction: DIRECTION_HORIZONTAL\n}, ['swipe']], [TapRecognizer], [TapRecognizer, {\n event: 'doubletap',\n taps: 2\n}, ['tap']], [PressRecognizer]];\nvar STOP = 1;\nvar FORCED_STOP = 2;\n/**\n * @private\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\n\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n\n if (!element.style) {\n return;\n }\n\n var prop;\n each(manager.options.cssProps, function (value, name) {\n prop = prefixed(element.style, name);\n\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || \"\";\n }\n });\n\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n/**\n * @private\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\n\n\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent(\"Event\");\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n/**\n* @private\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\n\nvar Manager = /*#__PURE__*/function () {\n function Manager(element, options) {\n var _this = this;\n\n this.options = assign$1$1({}, defaults, options || {});\n this.options.inputTarget = this.options.inputTarget || element;\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n toggleCssProps(this, true);\n each(this.options.recognizers, function (item) {\n var recognizer = _this.add(new item[0](item[1]));\n\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n\n\n var _proto = Manager.prototype;\n\n _proto.set = function set(options) {\n assign$1$1(this.options, options); // Options that need a little more setup\n\n if (options.touchAction) {\n this.touchAction.update();\n }\n\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n\n return this;\n };\n /**\n * @private\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n\n\n _proto.stop = function stop(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n };\n /**\n * @private\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n var session = this.session;\n\n if (session.stopped) {\n return;\n } // run the touch-action polyfill\n\n\n this.touchAction.preventDefaults(inputData);\n var recognizer;\n var recognizers = this.recognizers; // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n\n var curRecognizer = session.curRecognizer; // reset when the last recognizer is recognized\n // or when we're in a new session\n\n if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) {\n session.curRecognizer = null;\n curRecognizer = null;\n }\n\n var i = 0;\n\n while (i < recognizers.length) {\n recognizer = recognizers[i]; // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer === curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) {\n // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n } // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n\n\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n session.curRecognizer = recognizer;\n curRecognizer = recognizer;\n }\n\n i++;\n }\n };\n /**\n * @private\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n\n\n _proto.get = function get(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event === recognizer) {\n return recognizers[i];\n }\n }\n\n return null;\n };\n /**\n * @private add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n\n\n _proto.add = function add(recognizer) {\n if (invokeArrayArg(recognizer, \"add\", this)) {\n return this;\n } // remove existing\n\n\n var existing = this.get(recognizer.options.event);\n\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n this.touchAction.update();\n return recognizer;\n };\n /**\n * @private\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n\n\n _proto.remove = function remove(recognizer) {\n if (invokeArrayArg(recognizer, \"remove\", this)) {\n return this;\n }\n\n var targetRecognizer = this.get(recognizer); // let's make sure this recognizer exists\n\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, targetRecognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n };\n /**\n * @private\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n\n\n _proto.on = function on(events, handler) {\n if (events === undefined || handler === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n };\n /**\n * @private unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n\n\n _proto.off = function off(events, handler) {\n if (events === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n };\n /**\n * @private emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n\n\n _proto.emit = function emit(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n } // no handlers, so skip it all\n\n\n var handlers = this.handlers[event] && this.handlers[event].slice();\n\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n\n data.preventDefault = function () {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n };\n /**\n * @private\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n\n\n _proto.destroy = function destroy() {\n this.element && toggleCssProps(this, false);\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n };\n\n return Manager;\n}();\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Touch events input\n * @constructor\n * @extends Input\n */\n\nvar SingleTouchInput = /*#__PURE__*/function (_Input) {\n _inheritsLoose(SingleTouchInput, _Input);\n\n function SingleTouchInput() {\n var _this;\n\n var proto = SingleTouchInput.prototype;\n proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.started = false;\n return _this;\n }\n\n var _proto = SingleTouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; // should we handle the touch events?\n\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type); // when done, reset the started state\n\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return SingleTouchInput;\n}(Input);\n\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n/**\n * @private\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\n\n\nfunction deprecate(method, name, message) {\n var deprecationMessage = \"DEPRECATED METHOD: \" + name + \"\\n\" + message + \" AT \\n\";\n return function () {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '').replace(/^\\s+at\\s+/gm, '').replace(/^Object.\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n var log = window.console && (window.console.warn || window.console.log);\n\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n\n return method.apply(this, arguments);\n };\n}\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\n\n\nvar extend = deprecate(function (dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n\n while (i < keys.length) {\n if (!merge || merge && dest[keys[i]] === undefined) {\n dest[keys[i]] = src[keys[i]];\n }\n\n i++;\n }\n\n return dest;\n}, 'extend', 'Use `assign`.');\n/**\n * @private\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\n\nvar merge$1 = deprecate(function (dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n/**\n * @private\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\n\nfunction inherit(child, base, properties) {\n var baseP = base.prototype;\n var childP;\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign$1$1(childP, properties);\n }\n}\n/**\n * @private\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\n\n\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n/**\n * @private\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\n\nvar Hammer = /*#__PURE__*/function () {\n var Hammer =\n /**\n * @private\n * @const {string}\n */\n function Hammer(element, options) {\n if (options === void 0) {\n options = {};\n }\n\n return new Manager(element, _extends({\n recognizers: preset.concat()\n }, options));\n };\n\n Hammer.VERSION = \"2.0.17-rc\";\n Hammer.DIRECTION_ALL = DIRECTION_ALL;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.DIRECTION_LEFT = DIRECTION_LEFT;\n Hammer.DIRECTION_RIGHT = DIRECTION_RIGHT;\n Hammer.DIRECTION_UP = DIRECTION_UP;\n Hammer.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;\n Hammer.DIRECTION_VERTICAL = DIRECTION_VERTICAL;\n Hammer.DIRECTION_NONE = DIRECTION_NONE;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.INPUT_START = INPUT_START;\n Hammer.INPUT_MOVE = INPUT_MOVE;\n Hammer.INPUT_END = INPUT_END;\n Hammer.INPUT_CANCEL = INPUT_CANCEL;\n Hammer.STATE_POSSIBLE = STATE_POSSIBLE;\n Hammer.STATE_BEGAN = STATE_BEGAN;\n Hammer.STATE_CHANGED = STATE_CHANGED;\n Hammer.STATE_ENDED = STATE_ENDED;\n Hammer.STATE_RECOGNIZED = STATE_RECOGNIZED;\n Hammer.STATE_CANCELLED = STATE_CANCELLED;\n Hammer.STATE_FAILED = STATE_FAILED;\n Hammer.Manager = Manager;\n Hammer.Input = Input;\n Hammer.TouchAction = TouchAction;\n Hammer.TouchInput = TouchInput;\n Hammer.MouseInput = MouseInput;\n Hammer.PointerEventInput = PointerEventInput;\n Hammer.TouchMouseInput = TouchMouseInput;\n Hammer.SingleTouchInput = SingleTouchInput;\n Hammer.Recognizer = Recognizer;\n Hammer.AttrRecognizer = AttrRecognizer;\n Hammer.Tap = TapRecognizer;\n Hammer.Pan = PanRecognizer;\n Hammer.Swipe = SwipeRecognizer;\n Hammer.Pinch = PinchRecognizer;\n Hammer.Rotate = RotateRecognizer;\n Hammer.Press = PressRecognizer;\n Hammer.on = addEventListeners;\n Hammer.off = removeEventListeners;\n Hammer.each = each;\n Hammer.merge = merge$1;\n Hammer.extend = extend;\n Hammer.bindFn = bindFn;\n Hammer.assign = assign$1$1;\n Hammer.inherit = inherit;\n Hammer.bindFn = bindFn;\n Hammer.prefixed = prefixed;\n Hammer.toArray = toArray;\n Hammer.inArray = inArray;\n Hammer.uniqueArray = uniqueArray;\n Hammer.splitStr = splitStr;\n Hammer.boolOrFn = boolOrFn;\n Hammer.hasParent = hasParent;\n Hammer.addEventListeners = addEventListeners;\n Hammer.removeEventListeners = removeEventListeners;\n Hammer.defaults = assign$1$1({}, defaults, {\n preset: preset\n });\n return Hammer;\n}(); // style loader but by script tag, not by the loader.\n\nvar hammer = createCommonjsModule(function (module) {\n /**\n * Setup a mock hammer.js object, for unit testing.\n *\n * Inspiration: https://github.com/uber/deck.gl/pull/658\n *\n * @returns {{on: noop, off: noop, destroy: noop, emit: noop, get: get}}\n */\n function hammerMock() {\n var noop = function noop() {};\n\n return {\n on: noop,\n off: noop,\n destroy: noop,\n emit: noop,\n get: function get(m) {\n //eslint-disable-line no-unused-vars\n return {\n set: noop\n };\n }\n };\n }\n\n if (typeof window !== 'undefined') {\n var Hammer$1 = window['Hammer'] || Hammer;\n module.exports = Hammer$1;\n } else {\n module.exports = function () {\n // hammer.js is only available in a browser, not in node.js. Replacing it with a mock object.\n return hammerMock();\n };\n }\n});\n\n/**\n * Turn an element into an clickToUse element.\n * When not active, the element has a transparent overlay. When the overlay is\n * clicked, the mode is changed to active.\n * When active, the element is displayed with a blue border around it, and\n * the interactive contents of the element can be used. When clicked outside\n * the element, the elements mode is changed to inactive.\n * @param {Element} container\n * @constructor Activator\n */\n\nfunction Activator(container) {\n var _context,\n _this = this,\n _context2;\n\n this.active = false;\n this.dom = {\n container: container\n };\n this.dom.overlay = document.createElement('div');\n this.dom.overlay.className = 'vis-overlay';\n this.dom.container.appendChild(this.dom.overlay);\n this.hammer = hammer(this.dom.overlay);\n this.hammer.on('tap', bind$2(_context = this._onTapOverlay).call(_context, this)); // block all touch events (except tap)\n\n var events = ['tap', 'doubletap', 'press', 'pinch', 'pan', 'panstart', 'panmove', 'panend'];\n\n forEach$2(events).call(events, function (event) {\n _this.hammer.on(event, function (event) {\n event.srcEvent.stopPropagation();\n });\n }); // attach a click event to the window, in order to deactivate when clicking outside the timeline\n\n\n if (document && document.body) {\n this.onClick = function (event) {\n if (!_hasParent(event.target, container)) {\n _this.deactivate();\n }\n };\n\n document.body.addEventListener('click', this.onClick);\n }\n\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n\n this.keycharm = keycharm(); // keycharm listener only bounded when active)\n\n this.escListener = bind$2(_context2 = this.deactivate).call(_context2, this);\n} // turn into an event emitter\n\n\ncomponentEmitter(Activator.prototype); // The currently active activator\n\nActivator.current = null;\n/**\n * Destroy the activator. Cleans up all created DOM and event listeners\n */\n\nActivator.prototype.destroy = function () {\n this.deactivate(); // remove dom\n\n this.dom.overlay.parentNode.removeChild(this.dom.overlay); // remove global event listener\n\n if (this.onClick) {\n document.body.removeEventListener('click', this.onClick);\n } // remove keycharm\n\n\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n\n this.keycharm = null; // cleanup hammer instances\n\n this.hammer.destroy();\n this.hammer = null; // FIXME: cleaning up hammer instances doesn't work (Timeline not removed from memory)\n};\n/**\n * Activate the element\n * Overlay is hidden, element is decorated with a blue shadow border\n */\n\n\nActivator.prototype.activate = function () {\n var _context3;\n\n // we allow only one active activator at a time\n if (Activator.current) {\n Activator.current.deactivate();\n }\n\n Activator.current = this;\n this.active = true;\n this.dom.overlay.style.display = 'none';\n addClassName(this.dom.container, 'vis-active');\n this.emit('change');\n this.emit('activate'); // ugly hack: bind ESC after emitting the events, as the Network rebinds all\n // keyboard events on a 'change' event\n\n bind$2(_context3 = this.keycharm).call(_context3, 'esc', this.escListener);\n};\n/**\n * Deactivate the element\n * Overlay is displayed on top of the element\n */\n\n\nActivator.prototype.deactivate = function () {\n this.active = false;\n this.dom.overlay.style.display = 'block';\n removeClassName(this.dom.container, 'vis-active');\n this.keycharm.unbind('esc', this.escListener);\n this.emit('change');\n this.emit('deactivate');\n};\n/**\n * Handle a tap event: activate the container\n * @param {Event} event The event\n * @private\n */\n\n\nActivator.prototype._onTapOverlay = function (event) {\n // activate the container\n this.activate();\n event.srcEvent.stopPropagation();\n};\n/**\n * Test whether the element has the requested parent element somewhere in\n * its chain of parent nodes.\n * @param {HTMLElement} element\n * @param {HTMLElement} parent\n * @returns {boolean} Returns true when the parent is found somewhere in the\n * chain of parent nodes.\n * @private\n */\n\n\nfunction _hasParent(element, parent) {\n while (element) {\n if (element === parent) {\n return true;\n }\n\n element = element.parentNode;\n }\n\n return false;\n}\n\n// English\nvar en = {\n addDescription: \"Click in an empty space to place a new node.\",\n addEdge: \"Add Edge\",\n addNode: \"Add Node\",\n back: \"Back\",\n createEdgeError: \"Cannot link edges to a cluster.\",\n del: \"Delete selected\",\n deleteClusterError: \"Clusters cannot be deleted.\",\n edgeDescription: \"Click on a node and drag the edge to another node to connect them.\",\n edit: \"Edit\",\n editClusterError: \"Clusters cannot be edited.\",\n editEdge: \"Edit Edge\",\n editEdgeDescription: \"Click on the control points and drag them to a node to connect to it.\",\n editNode: \"Edit Node\"\n}; // German\n\nvar de = {\n addDescription: \"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.\",\n addEdge: \"Kante hinzuf\\xFCgen\",\n addNode: \"Knoten hinzuf\\xFCgen\",\n back: \"Zur\\xFCck\",\n createEdgeError: \"Es ist nicht m\\xF6glich, Kanten mit Clustern zu verbinden.\",\n del: \"L\\xF6sche Auswahl\",\n deleteClusterError: \"Cluster k\\xF6nnen nicht gel\\xF6scht werden.\",\n edgeDescription: \"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.\",\n edit: \"Editieren\",\n editClusterError: \"Cluster k\\xF6nnen nicht editiert werden.\",\n editEdge: \"Kante editieren\",\n editEdgeDescription: \"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.\",\n editNode: \"Knoten editieren\"\n}; // Spanish\n\nvar es = {\n addDescription: \"Haga clic en un lugar vac\\xEDo para colocar un nuevo nodo.\",\n addEdge: \"A\\xF1adir arista\",\n addNode: \"A\\xF1adir nodo\",\n back: \"Atr\\xE1s\",\n createEdgeError: \"No se puede conectar una arista a un grupo.\",\n del: \"Eliminar selecci\\xF3n\",\n deleteClusterError: \"No es posible eliminar grupos.\",\n edgeDescription: \"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.\",\n edit: \"Editar\",\n editClusterError: \"No es posible editar grupos.\",\n editEdge: \"Editar arista\",\n editEdgeDescription: \"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.\",\n editNode: \"Editar nodo\"\n}; //Italiano\n\nvar it = {\n addDescription: \"Clicca per aggiungere un nuovo nodo\",\n addEdge: \"Aggiungi un vertice\",\n addNode: \"Aggiungi un nodo\",\n back: \"Indietro\",\n createEdgeError: \"Non si possono collegare vertici ad un cluster\",\n del: \"Cancella la selezione\",\n deleteClusterError: \"I cluster non possono essere cancellati\",\n edgeDescription: \"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.\",\n edit: \"Modifica\",\n editClusterError: \"I clusters non possono essere modificati.\",\n editEdge: \"Modifica il vertice\",\n editEdgeDescription: \"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.\",\n editNode: \"Modifica il nodo\"\n}; // Dutch\n\nvar nl = {\n addDescription: \"Klik op een leeg gebied om een nieuwe node te maken.\",\n addEdge: \"Link toevoegen\",\n addNode: \"Node toevoegen\",\n back: \"Terug\",\n createEdgeError: \"Kan geen link maken naar een cluster.\",\n del: \"Selectie verwijderen\",\n deleteClusterError: \"Clusters kunnen niet worden verwijderd.\",\n edgeDescription: \"Klik op een node en sleep de link naar een andere node om ze te verbinden.\",\n edit: \"Wijzigen\",\n editClusterError: \"Clusters kunnen niet worden aangepast.\",\n editEdge: \"Link wijzigen\",\n editEdgeDescription: \"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.\",\n editNode: \"Node wijzigen\"\n}; // Portuguese Brazil\n\nvar pt = {\n addDescription: \"Clique em um espaço em branco para adicionar um novo nó\",\n addEdge: \"Adicionar aresta\",\n addNode: \"Adicionar nó\",\n back: \"Voltar\",\n createEdgeError: \"Não foi possível linkar arestas a um cluster.\",\n del: \"Remover selecionado\",\n deleteClusterError: \"Clusters não puderam ser removidos.\",\n edgeDescription: \"Clique em um nó e arraste a aresta até outro nó para conectá-los\",\n edit: \"Editar\",\n editClusterError: \"Clusters não puderam ser editados.\",\n editEdge: \"Editar aresta\",\n editEdgeDescription: \"Clique nos pontos de controle e os arraste para um nó para conectá-los\",\n editNode: \"Editar nó\"\n}; // Russian\n\nvar ru = {\n addDescription: \"Кликните в свободное место, чтобы добавить новый узел.\",\n addEdge: \"Добавить ребро\",\n addNode: \"Добавить узел\",\n back: \"Назад\",\n createEdgeError: \"Невозможно соединить ребра в кластер.\",\n del: \"Удалить выбранное\",\n deleteClusterError: \"Кластеры не могут быть удалены\",\n edgeDescription: \"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.\",\n edit: \"Редактировать\",\n editClusterError: \"Кластеры недоступны для редактирования.\",\n editEdge: \"Редактировать ребро\",\n editEdgeDescription: \"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.\",\n editNode: \"Редактировать узел\"\n}; // Chinese\n\nvar cn = {\n addDescription: \"单击空白处放置新节点。\",\n addEdge: \"添加连接线\",\n addNode: \"添加节点\",\n back: \"返回\",\n createEdgeError: \"无法将连接线连接到群集。\",\n del: \"删除选定\",\n deleteClusterError: \"无法删除群集。\",\n edgeDescription: \"单击某个节点并将该连接线拖动到另一个节点以连接它们。\",\n edit: \"编辑\",\n editClusterError: \"无法编辑群集。\",\n editEdge: \"编辑连接线\",\n editEdgeDescription: \"单击控制节点并将它们拖到节点上连接。\",\n editNode: \"编辑节点\"\n}; // Ukrainian\n\nvar uk = {\n addDescription: \"Kлікніть на вільне місце, щоб додати новий вузол.\",\n addEdge: \"Додати край\",\n addNode: \"Додати вузол\",\n back: \"Назад\",\n createEdgeError: \"Не можливо об'єднати краї в групу.\",\n del: \"Видалити обране\",\n deleteClusterError: \"Групи не можуть бути видалені.\",\n edgeDescription: \"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.\",\n edit: \"Редагувати\",\n editClusterError: \"Групи недоступні для редагування.\",\n editEdge: \"Редагувати край\",\n editEdgeDescription: \"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.\",\n editNode: \"Редагувати вузол\"\n}; // French\n\nvar fr = {\n addDescription: \"Cliquez dans un endroit vide pour placer un nœud.\",\n addEdge: \"Ajouter un lien\",\n addNode: \"Ajouter un nœud\",\n back: \"Retour\",\n createEdgeError: \"Impossible de créer un lien vers un cluster.\",\n del: \"Effacer la sélection\",\n deleteClusterError: \"Les clusters ne peuvent pas être effacés.\",\n edgeDescription: \"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.\",\n edit: \"Éditer\",\n editClusterError: \"Les clusters ne peuvent pas être édités.\",\n editEdge: \"Éditer le lien\",\n editEdgeDescription: \"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.\",\n editNode: \"Éditer le nœud\"\n}; // Czech\n\nvar cs = {\n addDescription: \"Kluknutím do prázdného prostoru můžete přidat nový vrchol.\",\n addEdge: \"Přidat hranu\",\n addNode: \"Přidat vrchol\",\n back: \"Zpět\",\n createEdgeError: \"Nelze připojit hranu ke shluku.\",\n del: \"Smazat výběr\",\n deleteClusterError: \"Nelze mazat shluky.\",\n edgeDescription: \"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.\",\n edit: \"Upravit\",\n editClusterError: \"Nelze upravovat shluky.\",\n editEdge: \"Upravit hranu\",\n editEdgeDescription: \"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.\",\n editNode: \"Upravit vrchol\"\n};\n\nvar locales = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\ten: en,\n\tde: de,\n\tes: es,\n\tit: it,\n\tnl: nl,\n\tpt: pt,\n\tru: ru,\n\tcn: cn,\n\tuk: uk,\n\tfr: fr,\n\tcs: cs\n});\n\n/**\r\n * Normalizes language code into the format used internally.\r\n *\r\n * @param locales - All the available locales.\r\n * @param rawCode - The original code as supplied by the user.\r\n *\r\n * @returns Language code in the format language-COUNTRY or language, eventually\r\n * fallbacks to en.\r\n */\nfunction normalizeLanguageCode(locales, rawCode) {\n try {\n var _rawCode$split = rawCode.split(/[-_ \\/]/, 2),\n _rawCode$split2 = slicedToArray(_rawCode$split, 2),\n rawLanguage = _rawCode$split2[0],\n rawCountry = _rawCode$split2[1];\n\n var language = rawLanguage != null ? rawLanguage.toLowerCase() : null;\n var country = rawCountry != null ? rawCountry.toUpperCase() : null;\n\n if (language && country) {\n var code = language + \"-\" + country;\n\n if (Object.prototype.hasOwnProperty.call(locales, code)) {\n return code;\n } else {\n var _context;\n\n console.warn(concat$2(_context = \"Unknown variant \".concat(country, \" of language \")).call(_context, language, \".\"));\n }\n }\n\n if (language) {\n var _code = language;\n\n if (Object.prototype.hasOwnProperty.call(locales, _code)) {\n return _code;\n } else {\n console.warn(\"Unknown language \".concat(language));\n }\n }\n\n console.warn(\"Unknown locale \".concat(rawCode, \", falling back to English.\"));\n return \"en\";\n } catch (error) {\n console.error(error);\n console.warn(\"Unexpected error while normalizing locale \".concat(rawCode, \", falling back to English.\"));\n return \"en\";\n }\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nvar classCallCheck = _classCallCheck;\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n\n defineProperty$6(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nvar createClass = _createClass;\n\n/**\n * Associates a canvas to a given image, containing a number of renderings\n * of the image at various sizes.\n *\n * This technique is known as 'mipmapping'.\n *\n * NOTE: Images can also be of type 'data:svg+xml`. This code also works\n * for svg, but the mipmapping may not be necessary.\n *\n * @param {Image} image\n */\nvar CachedImage = /*#__PURE__*/function () {\n /**\n * @ignore\n */\n function CachedImage() {\n classCallCheck(this, CachedImage);\n\n // eslint-disable-line no-unused-vars\n this.NUM_ITERATIONS = 4; // Number of items in the coordinates array\n\n this.image = new Image();\n this.canvas = document.createElement('canvas');\n }\n /**\n * Called when the image has been successfully loaded.\n */\n\n\n createClass(CachedImage, [{\n key: \"init\",\n value: function init() {\n if (this.initialized()) return;\n this.src = this.image.src; // For same interface with Image\n\n var w = this.image.width;\n var h = this.image.height; // Ease external access\n\n this.width = w;\n this.height = h;\n var h2 = Math.floor(h / 2);\n var h4 = Math.floor(h / 4);\n var h8 = Math.floor(h / 8);\n var h16 = Math.floor(h / 16);\n var w2 = Math.floor(w / 2);\n var w4 = Math.floor(w / 4);\n var w8 = Math.floor(w / 8);\n var w16 = Math.floor(w / 16); // Make canvas as small as possible\n\n this.canvas.width = 3 * w4;\n this.canvas.height = h2; // Coordinates and sizes of images contained in the canvas\n // Values per row: [top x, left y, width, height]\n\n this.coordinates = [[0, 0, w2, h2], [w2, 0, w4, h4], [w2, h4, w8, h8], [5 * w8, h4, w16, h16]];\n\n this._fillMipMap();\n }\n /**\n * @return {Boolean} true if init() has been called, false otherwise.\n */\n\n }, {\n key: \"initialized\",\n value: function initialized() {\n return this.coordinates !== undefined;\n }\n /**\n * Redraw main image in various sizes to the context.\n *\n * The rationale behind this is to reduce artefacts due to interpolation\n * at differing zoom levels.\n *\n * Source: http://stackoverflow.com/q/18761404/1223531\n *\n * This methods takes the resizing out of the drawing loop, in order to\n * reduce performance overhead.\n *\n * TODO: The code assumes that a 2D context can always be gotten. This is\n * not necessarily true! OTOH, if not true then usage of this class\n * is senseless.\n *\n * @private\n */\n\n }, {\n key: \"_fillMipMap\",\n value: function _fillMipMap() {\n var ctx = this.canvas.getContext('2d'); // First zoom-level comes from the image\n\n var to = this.coordinates[0];\n ctx.drawImage(this.image, to[0], to[1], to[2], to[3]); // The rest are copy actions internal to the canvas/context\n\n for (var iterations = 1; iterations < this.NUM_ITERATIONS; iterations++) {\n var from = this.coordinates[iterations - 1];\n var _to = this.coordinates[iterations];\n ctx.drawImage(this.canvas, from[0], from[1], from[2], from[3], _to[0], _to[1], _to[2], _to[3]);\n }\n }\n /**\n * Draw the image, using the mipmap if necessary.\n *\n * MipMap is only used if param factor > 2; otherwise, original bitmap\n * is resized. This is also used to skip mipmap usage, e.g. by setting factor = 1\n *\n * Credits to 'Alex de Mulder' for original implementation.\n *\n * @param {CanvasRenderingContext2D} ctx context on which to draw zoomed image\n * @param {Float} factor scale factor at which to draw\n * @param {number} left\n * @param {number} top\n * @param {number} width\n * @param {number} height\n */\n\n }, {\n key: \"drawImageAtPosition\",\n value: function drawImageAtPosition(ctx, factor, left, top, width, height) {\n if (!this.initialized()) return; //can't draw image yet not intialized\n\n if (factor > 2) {\n // Determine which zoomed image to use\n factor *= 0.5;\n var iterations = 0;\n\n while (factor > 2 && iterations < this.NUM_ITERATIONS) {\n factor *= 0.5;\n iterations += 1;\n }\n\n if (iterations >= this.NUM_ITERATIONS) {\n iterations = this.NUM_ITERATIONS - 1;\n } //console.log(\"iterations: \" + iterations);\n\n\n var from = this.coordinates[iterations];\n ctx.drawImage(this.canvas, from[0], from[1], from[2], from[3], left, top, width, height);\n } else {\n // Draw image directly\n ctx.drawImage(this.image, left, top, width, height);\n }\n }\n }]);\n\n return CachedImage;\n}();\n\n/**\n * This callback is a callback that accepts an Image.\n * @callback ImageCallback\n * @param {Image} image\n */\n\n/**\n * This class loads images and keeps them stored.\n *\n * @param {ImageCallback} callback\n */\n\nvar Images = /*#__PURE__*/function () {\n /**\n * @param {ImageCallback} callback\n */\n function Images(callback) {\n classCallCheck(this, Images);\n\n this.images = {};\n this.imageBroken = {};\n this.callback = callback;\n }\n /**\n * @param {string} url The original Url that failed to load, if the broken image is successfully loaded it will be added to the cache using this Url as the key so that subsequent requests for this Url will return the broken image\n * @param {string} brokenUrl Url the broken image to try and load\n * @param {Image} imageToLoadBrokenUrlOn The image object\n */\n\n\n createClass(Images, [{\n key: \"_tryloadBrokenUrl\",\n value: function _tryloadBrokenUrl(url, brokenUrl, imageToLoadBrokenUrlOn) {\n //If these parameters aren't specified then exit the function because nothing constructive can be done\n if (url === undefined || imageToLoadBrokenUrlOn === undefined) return;\n\n if (brokenUrl === undefined) {\n console.warn(\"No broken url image defined\");\n return;\n } //Clear the old subscription to the error event and put a new in place that only handle errors in loading the brokenImageUrl\n\n\n imageToLoadBrokenUrlOn.image.onerror = function () {\n console.error(\"Could not load brokenImage:\", brokenUrl); // cache item will contain empty image, this should be OK for default\n }; //Set the source of the image to the brokenUrl, this is actually what kicks off the loading of the broken image\n\n\n imageToLoadBrokenUrlOn.image.src = brokenUrl;\n }\n /**\n *\n * @param {vis.Image} imageToRedrawWith\n * @private\n */\n\n }, {\n key: \"_redrawWithImage\",\n value: function _redrawWithImage(imageToRedrawWith) {\n if (this.callback) {\n this.callback(imageToRedrawWith);\n }\n }\n /**\n * @param {string} url Url of the image\n * @param {string} brokenUrl Url of an image to use if the url image is not found\n * @return {Image} img The image object\n */\n\n }, {\n key: \"load\",\n value: function load(url, brokenUrl) {\n var _this = this;\n\n //Try and get the image from the cache, if successful then return the cached image \n var cachedImage = this.images[url];\n if (cachedImage) return cachedImage; //Create a new image\n\n var img = new CachedImage(); // Need to add to cache here, otherwise final return will spawn different copies of the same image,\n // Also, there will be multiple loads of the same image.\n\n this.images[url] = img; //Subscribe to the event that is raised if the image loads successfully \n\n img.image.onload = function () {\n // Properly init the cached item and then request a redraw\n _this._fixImageCoordinates(img.image);\n\n img.init();\n\n _this._redrawWithImage(img);\n }; //Subscribe to the event that is raised if the image fails to load\n\n\n img.image.onerror = function () {\n console.error(\"Could not load image:\", url); //Try and load the image specified by the brokenUrl using\n\n _this._tryloadBrokenUrl(url, brokenUrl, img);\n }; //Set the source of the image to the url, this is what actually kicks off the loading of the image\n\n\n img.image.src = url; //Return the new image\n\n return img;\n }\n /**\n * IE11 fix -- thanks dponch!\n *\n * Local helper function\n * @param {vis.Image} imageToCache\n * @private\n */\n\n }, {\n key: \"_fixImageCoordinates\",\n value: function _fixImageCoordinates(imageToCache) {\n if (imageToCache.width === 0) {\n document.body.appendChild(imageToCache);\n imageToCache.width = imageToCache.offsetWidth;\n imageToCache.height = imageToCache.offsetHeight;\n document.body.removeChild(imageToCache);\n }\n }\n }]);\n\n return Images;\n}();\n\n/**\n * This class can store groups and options specific for groups.\n */\nvar Groups = /*#__PURE__*/function () {\n /**\n * @ignore\n */\n function Groups() {\n classCallCheck(this, Groups);\n\n this.clear();\n this.defaultIndex = 0;\n this.groupsArray = [];\n this.groupIndex = 0;\n this.defaultGroups = [{\n border: \"#2B7CE9\",\n background: \"#97C2FC\",\n highlight: {\n border: \"#2B7CE9\",\n background: \"#D2E5FF\"\n },\n hover: {\n border: \"#2B7CE9\",\n background: \"#D2E5FF\"\n }\n }, // 0: blue\n {\n border: \"#FFA500\",\n background: \"#FFFF00\",\n highlight: {\n border: \"#FFA500\",\n background: \"#FFFFA3\"\n },\n hover: {\n border: \"#FFA500\",\n background: \"#FFFFA3\"\n }\n }, // 1: yellow\n {\n border: \"#FA0A10\",\n background: \"#FB7E81\",\n highlight: {\n border: \"#FA0A10\",\n background: \"#FFAFB1\"\n },\n hover: {\n border: \"#FA0A10\",\n background: \"#FFAFB1\"\n }\n }, // 2: red\n {\n border: \"#41A906\",\n background: \"#7BE141\",\n highlight: {\n border: \"#41A906\",\n background: \"#A1EC76\"\n },\n hover: {\n border: \"#41A906\",\n background: \"#A1EC76\"\n }\n }, // 3: green\n {\n border: \"#E129F0\",\n background: \"#EB7DF4\",\n highlight: {\n border: \"#E129F0\",\n background: \"#F0B3F5\"\n },\n hover: {\n border: \"#E129F0\",\n background: \"#F0B3F5\"\n }\n }, // 4: magenta\n {\n border: \"#7C29F0\",\n background: \"#AD85E4\",\n highlight: {\n border: \"#7C29F0\",\n background: \"#D3BDF0\"\n },\n hover: {\n border: \"#7C29F0\",\n background: \"#D3BDF0\"\n }\n }, // 5: purple\n {\n border: \"#C37F00\",\n background: \"#FFA807\",\n highlight: {\n border: \"#C37F00\",\n background: \"#FFCA66\"\n },\n hover: {\n border: \"#C37F00\",\n background: \"#FFCA66\"\n }\n }, // 6: orange\n {\n border: \"#4220FB\",\n background: \"#6E6EFD\",\n highlight: {\n border: \"#4220FB\",\n background: \"#9B9BFD\"\n },\n hover: {\n border: \"#4220FB\",\n background: \"#9B9BFD\"\n }\n }, // 7: darkblue\n {\n border: \"#FD5A77\",\n background: \"#FFC0CB\",\n highlight: {\n border: \"#FD5A77\",\n background: \"#FFD1D9\"\n },\n hover: {\n border: \"#FD5A77\",\n background: \"#FFD1D9\"\n }\n }, // 8: pink\n {\n border: \"#4AD63A\",\n background: \"#C2FABC\",\n highlight: {\n border: \"#4AD63A\",\n background: \"#E6FFE3\"\n },\n hover: {\n border: \"#4AD63A\",\n background: \"#E6FFE3\"\n }\n }, // 9: mint\n {\n border: \"#990000\",\n background: \"#EE0000\",\n highlight: {\n border: \"#BB0000\",\n background: \"#FF3333\"\n },\n hover: {\n border: \"#BB0000\",\n background: \"#FF3333\"\n }\n }, // 10:bright red\n {\n border: \"#FF6000\",\n background: \"#FF6000\",\n highlight: {\n border: \"#FF6000\",\n background: \"#FF6000\"\n },\n hover: {\n border: \"#FF6000\",\n background: \"#FF6000\"\n }\n }, // 12: real orange\n {\n border: \"#97C2FC\",\n background: \"#2B7CE9\",\n highlight: {\n border: \"#D2E5FF\",\n background: \"#2B7CE9\"\n },\n hover: {\n border: \"#D2E5FF\",\n background: \"#2B7CE9\"\n }\n }, // 13: blue\n {\n border: \"#399605\",\n background: \"#255C03\",\n highlight: {\n border: \"#399605\",\n background: \"#255C03\"\n },\n hover: {\n border: \"#399605\",\n background: \"#255C03\"\n }\n }, // 14: green\n {\n border: \"#B70054\",\n background: \"#FF007E\",\n highlight: {\n border: \"#B70054\",\n background: \"#FF007E\"\n },\n hover: {\n border: \"#B70054\",\n background: \"#FF007E\"\n }\n }, // 15: magenta\n {\n border: \"#AD85E4\",\n background: \"#7C29F0\",\n highlight: {\n border: \"#D3BDF0\",\n background: \"#7C29F0\"\n },\n hover: {\n border: \"#D3BDF0\",\n background: \"#7C29F0\"\n }\n }, // 16: purple\n {\n border: \"#4557FA\",\n background: \"#000EA1\",\n highlight: {\n border: \"#6E6EFD\",\n background: \"#000EA1\"\n },\n hover: {\n border: \"#6E6EFD\",\n background: \"#000EA1\"\n }\n }, // 17: darkblue\n {\n border: \"#FFC0CB\",\n background: \"#FD5A77\",\n highlight: {\n border: \"#FFD1D9\",\n background: \"#FD5A77\"\n },\n hover: {\n border: \"#FFD1D9\",\n background: \"#FD5A77\"\n }\n }, // 18: pink\n {\n border: \"#C2FABC\",\n background: \"#74D66A\",\n highlight: {\n border: \"#E6FFE3\",\n background: \"#74D66A\"\n },\n hover: {\n border: \"#E6FFE3\",\n background: \"#74D66A\"\n }\n }, // 19: mint\n {\n border: \"#EE0000\",\n background: \"#990000\",\n highlight: {\n border: \"#FF3333\",\n background: \"#BB0000\"\n },\n hover: {\n border: \"#FF3333\",\n background: \"#BB0000\"\n }\n } // 20:bright red\n ];\n this.options = {};\n this.defaultOptions = {\n useDefaultGroups: true\n };\n\n assign$2(this.options, this.defaultOptions);\n }\n /**\n *\n * @param {Object} options\n */\n\n\n createClass(Groups, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n var optionFields = ['useDefaultGroups'];\n\n if (options !== undefined) {\n for (var groupName in options) {\n if (Object.prototype.hasOwnProperty.call(options, groupName)) {\n if (indexOf$3(optionFields).call(optionFields, groupName) === -1) {\n var group = options[groupName];\n this.add(groupName, group);\n }\n }\n }\n }\n }\n /**\n * Clear all groups\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this.groups = {};\n this.groupsArray = [];\n }\n /**\n * Get group options of a groupname.\n * If groupname is not found, a new group may be created.\n *\n * @param {*} groupname Can be a number, string, Date, etc.\n * @param {boolean} [shouldCreate=true] If true, create a new group\n * @return {Object} The found or created group\n */\n\n }, {\n key: \"get\",\n value: function get(groupname) {\n var shouldCreate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var group = this.groups[groupname];\n\n if (group === undefined && shouldCreate) {\n if (this.options.useDefaultGroups === false && this.groupsArray.length > 0) {\n // create new group\n var index = this.groupIndex % this.groupsArray.length;\n this.groupIndex++;\n group = {};\n group.color = this.groups[this.groupsArray[index]];\n this.groups[groupname] = group;\n } else {\n // create new group\n var _index = this.defaultIndex % this.defaultGroups.length;\n\n this.defaultIndex++;\n group = {};\n group.color = this.defaultGroups[_index];\n this.groups[groupname] = group;\n }\n }\n\n return group;\n }\n /**\n * Add a custom group style\n * @param {string} groupName\n * @param {Object} style An object containing borderColor,\n * backgroundColor, etc.\n * @return {Object} group The created group object\n */\n\n }, {\n key: \"add\",\n value: function add(groupName, style) {\n this.groups[groupName] = style;\n this.groupsArray.push(groupName);\n return style;\n }\n }]);\n\n return Groups;\n}();\n\nvar slice$6 = [].slice;\nvar MSIE = /MSIE .\\./.test(engineUserAgent); // <- dirty ie9- check\n\nvar wrap$1 = function (scheduler) {\n return function (handler, timeout\n /* , ...arguments */\n ) {\n var boundArgs = arguments.length > 2;\n var args = boundArgs ? slice$6.call(arguments, 2) : undefined;\n return scheduler(boundArgs ? function () {\n // eslint-disable-next-line no-new-func\n (typeof handler == 'function' ? handler : Function(handler)).apply(this, args);\n } : handler, timeout);\n };\n}; // ie9- setTimeout & setInterval additional parameters fix\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers\n\n\n_export({\n global: true,\n bind: true,\n forced: MSIE\n}, {\n // `setTimeout` method\n // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout\n setTimeout: wrap$1(global_1.setTimeout),\n // `setInterval` method\n // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval\n setInterval: wrap$1(global_1.setInterval)\n});\n\nvar setTimeout$1 = path.setTimeout;\n\nvar setTimeout$2 = setTimeout$1;\n\nvar $some = arrayIteration.some;\nvar STRICT_METHOD$2 = arrayMethodIsStrict('some');\nvar USES_TO_LENGTH$7 = arrayMethodUsesToLength('some'); // `Array.prototype.some` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.some\n\n_export({\n target: 'Array',\n proto: true,\n forced: !STRICT_METHOD$2 || !USES_TO_LENGTH$7\n}, {\n some: function some(callbackfn\n /* , thisArg */\n ) {\n return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\nvar some = entryVirtual('Array').some;\n\nvar ArrayPrototype$9 = Array.prototype;\n\nvar some_1 = function (it) {\n var own = it.some;\n return it === ArrayPrototype$9 || it instanceof Array && own === ArrayPrototype$9.some ? some : own;\n};\n\nvar some$1 = some_1;\n\nvar some$2 = some$1;\n\nvar globalIsFinite = global_1.isFinite; // `Number.isFinite` method\n// https://tc39.github.io/ecma262/#sec-number.isfinite\n\nvar numberIsFinite = Number.isFinite || function isFinite(it) {\n return typeof it == 'number' && globalIsFinite(it);\n};\n\n// https://tc39.github.io/ecma262/#sec-number.isfinite\n\n_export({\n target: 'Number',\n stat: true\n}, {\n isFinite: numberIsFinite\n});\n\nvar _isFinite = path.Number.isFinite;\n\nvar _isFinite$1 = _isFinite;\n\nvar _isFinite$2 = _isFinite$1;\n\n// https://tc39.github.io/ecma262/#sec-number.isnan\n\n_export({\n target: 'Number',\n stat: true\n}, {\n isNaN: function isNaN(number) {\n // eslint-disable-next-line no-self-compare\n return number != number;\n }\n});\n\nvar isNan = path.Number.isNaN;\n\nvar isNan$1 = isNan;\n\nvar isNan$2 = isNan$1;\n\nfunction _assertThisInitialized$1(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nvar assertThisInitialized = _assertThisInitialized$1;\n\nvar nativeConstruct = getBuiltIn('Reflect', 'construct'); // `Reflect.construct` method\n// https://tc39.github.io/ecma262/#sec-reflect.construct\n// MS Edge supports only 2 arguments and argumentsList argument is optional\n// FF Nightly sets third argument as `new.target`, but does not create `this` from it\n\nvar NEW_TARGET_BUG = fails(function () {\n function F() {\n /* empty */\n }\n\n return !(nativeConstruct(function () {\n /* empty */\n }, [], F) instanceof F);\n});\nvar ARGS_BUG = !fails(function () {\n nativeConstruct(function () {\n /* empty */\n });\n});\nvar FORCED$3 = NEW_TARGET_BUG || ARGS_BUG;\n_export({\n target: 'Reflect',\n stat: true,\n forced: FORCED$3,\n sham: FORCED$3\n}, {\n construct: function construct(Target, args\n /* , newTarget */\n ) {\n aFunction(Target);\n anObject(args);\n var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);\n if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);\n\n if (Target == newTarget) {\n // w/o altered newTarget, optimization for 0-4 arguments\n switch (args.length) {\n case 0:\n return new Target();\n\n case 1:\n return new Target(args[0]);\n\n case 2:\n return new Target(args[0], args[1]);\n\n case 3:\n return new Target(args[0], args[1], args[2]);\n\n case 4:\n return new Target(args[0], args[1], args[2], args[3]);\n } // w/o altered newTarget, lot of arguments case\n\n\n var $args = [null];\n $args.push.apply($args, args);\n return new (functionBind.apply(Target, $args))();\n } // with altered newTarget, not support built-in constructors\n\n\n var proto = newTarget.prototype;\n var instance = objectCreate(isObject(proto) ? proto : Object.prototype);\n var result = Function.apply.call(Target, instance, args);\n return isObject(result) ? result : instance;\n }\n});\n\nvar construct$1 = path.Reflect.construct;\n\nvar construct$2 = construct$1;\n\nvar construct$3 = construct$2;\n\nvar entries = entryVirtual('Array').entries;\n\nvar entries$1 = entries;\n\nvar ArrayPrototype$a = Array.prototype;\nvar DOMIterables$1 = {\n DOMTokenList: true,\n NodeList: true\n};\n\nvar entries_1 = function (it) {\n var own = it.entries;\n return it === ArrayPrototype$a || it instanceof Array && own === ArrayPrototype$a.entries // eslint-disable-next-line no-prototype-builtins\n || DOMIterables$1.hasOwnProperty(classof(it)) ? entries$1 : own;\n};\n\nvar entries$2 = entries_1;\n\nvar $stringify$1 = getBuiltIn('JSON', 'stringify');\nvar re = /[\\uD800-\\uDFFF]/g;\nvar low = /^[\\uD800-\\uDBFF]$/;\nvar hi = /^[\\uDC00-\\uDFFF]$/;\n\nvar fix = function (match, offset, string) {\n var prev = string.charAt(offset - 1);\n var next = string.charAt(offset + 1);\n\n if (low.test(match) && !hi.test(next) || hi.test(match) && !low.test(prev)) {\n return '\\\\u' + match.charCodeAt(0).toString(16);\n }\n\n return match;\n};\n\nvar FORCED$4 = fails(function () {\n return $stringify$1('\\uDF06\\uD834') !== '\"\\\\udf06\\\\ud834\"' || $stringify$1('\\uDEAD') !== '\"\\\\udead\"';\n});\n\nif ($stringify$1) {\n // https://github.com/tc39/proposal-well-formed-stringify\n _export({\n target: 'JSON',\n stat: true,\n forced: FORCED$4\n }, {\n // eslint-disable-next-line no-unused-vars\n stringify: function stringify(it, replacer, space) {\n var result = $stringify$1.apply(null, arguments);\n return typeof result == 'string' ? result.replace(re, fix) : result;\n }\n });\n}\n\nif (!path.JSON) path.JSON = {\n stringify: JSON.stringify\n}; // eslint-disable-next-line no-unused-vars\n\nvar stringify = function stringify(it, replacer, space) {\n return path.JSON.stringify.apply(null, arguments);\n};\n\nvar stringify$1 = stringify;\n\nvar stringify$2 = stringify$1;\n\nvar values$1 = entryVirtual('Array').values;\n\nvar values$2 = values$1;\n\nvar ArrayPrototype$b = Array.prototype;\nvar DOMIterables$2 = {\n DOMTokenList: true,\n NodeList: true\n};\n\nvar values_1 = function (it) {\n var own = it.values;\n return it === ArrayPrototype$b || it instanceof Array && own === ArrayPrototype$b.values // eslint-disable-next-line no-prototype-builtins\n || DOMIterables$2.hasOwnProperty(classof(it)) ? values$2 : own;\n};\n\nvar values$3 = values_1;\n\nvar keys$4 = entryVirtual('Array').keys;\n\nvar keys$5 = keys$4;\n\nvar ArrayPrototype$c = Array.prototype;\nvar DOMIterables$3 = {\n DOMTokenList: true,\n NodeList: true\n};\n\nvar keys_1 = function (it) {\n var own = it.keys;\n return it === ArrayPrototype$c || it instanceof Array && own === ArrayPrototype$c.keys // eslint-disable-next-line no-prototype-builtins\n || DOMIterables$3.hasOwnProperty(classof(it)) ? keys$5 : own;\n};\n\nvar keys$6 = keys_1;\n\nvar create$3 = create;\n\nvar create$4 = create$3;\n\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n\n_export({\n target: 'Object',\n stat: true\n}, {\n setPrototypeOf: objectSetPrototypeOf\n});\n\nvar setPrototypeOf = path.Object.setPrototypeOf;\n\nvar setPrototypeOf$1 = setPrototypeOf;\n\nvar setPrototypeOf$2 = setPrototypeOf$1;\n\nvar setPrototypeOf$3 = createCommonjsModule(function (module) {\n function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = setPrototypeOf$2 || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n module.exports = _setPrototypeOf;\n});\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = create$4(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf$3(subClass, superClass);\n}\n\nvar inherits = _inherits;\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof_1(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nvar possibleConstructorReturn = _possibleConstructorReturn;\n\nvar getPrototypeOf$3 = getPrototypeOf;\n\nvar getPrototypeOf$4 = getPrototypeOf$3;\n\nvar getPrototypeOf$5 = createCommonjsModule(function (module) {\n function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = setPrototypeOf$2 ? getPrototypeOf$4 : function _getPrototypeOf(o) {\n return o.__proto__ || getPrototypeOf$4(o);\n };\n return _getPrototypeOf(o);\n }\n\n module.exports = _getPrototypeOf;\n});\n\nvar test$1 = [];\nvar nativeSort = test$1.sort; // IE8-\n\nvar FAILS_ON_UNDEFINED = fails(function () {\n test$1.sort(undefined);\n}); // V8 bug\n\nvar FAILS_ON_NULL = fails(function () {\n test$1.sort(null);\n}); // Old WebKit\n\nvar STRICT_METHOD$3 = arrayMethodIsStrict('sort');\nvar FORCED$5 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$3; // `Array.prototype.sort` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.sort\n\n_export({\n target: 'Array',\n proto: true,\n forced: FORCED$5\n}, {\n sort: function sort(comparefn) {\n return comparefn === undefined ? nativeSort.call(toObject(this)) : nativeSort.call(toObject(this), aFunction(comparefn));\n }\n});\n\nvar sort = entryVirtual('Array').sort;\n\nvar ArrayPrototype$d = Array.prototype;\n\nvar sort_1 = function (it) {\n var own = it.sort;\n return it === ArrayPrototype$d || it instanceof Array && own === ArrayPrototype$d.sort ? sort : own;\n};\n\nvar sort$1 = sort_1;\n\nvar sort$2 = sort$1;\n\nvar freezing = !fails(function () {\n return Object.isExtensible(Object.preventExtensions({}));\n});\n\nvar internalMetadata = createCommonjsModule(function (module) {\n var defineProperty = objectDefineProperty.f;\n var METADATA = uid('meta');\n var id = 0;\n\n var isExtensible = Object.isExtensible || function () {\n return true;\n };\n\n var setMetadata = function (it) {\n defineProperty(it, METADATA, {\n value: {\n objectID: 'O' + ++id,\n // object ID\n weakData: {} // weak collections IDs\n\n }\n });\n };\n\n var fastKey = function (it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F'; // not necessary to add metadata\n\n if (!create) return 'E'; // add missing metadata\n\n setMetadata(it); // return object ID\n }\n\n return it[METADATA].objectID;\n };\n\n var getWeakData = function (it, create) {\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true; // not necessary to add metadata\n\n if (!create) return false; // add missing metadata\n\n setMetadata(it); // return the store of weak collections IDs\n }\n\n return it[METADATA].weakData;\n }; // add metadata on freeze-family methods calling\n\n\n var onFreeze = function (it) {\n if (freezing && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);\n return it;\n };\n\n var meta = module.exports = {\n REQUIRED: false,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n };\n hiddenKeys[METADATA] = true;\n});\n\nvar iterate_1 = createCommonjsModule(function (module) {\n var Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n };\n\n var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {\n var boundFunction = functionBindContext(fn, that, AS_ENTRIES ? 2 : 1);\n var iterator, iterFn, index, length, result, next, step;\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable'); // optimisation for array iterators\n\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = AS_ENTRIES ? boundFunction(anObject(step = iterable[index])[0], step[1]) : boundFunction(iterable[index]);\n if (result && result instanceof Result) return result;\n }\n\n return new Result(false);\n }\n\n iterator = iterFn.call(iterable);\n }\n\n next = iterator.next;\n\n while (!(step = next.call(iterator)).done) {\n result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);\n if (typeof result == 'object' && result && result instanceof Result) return result;\n }\n\n return new Result(false);\n };\n\n iterate.stop = function (result) {\n return new Result(true, result);\n };\n});\n\nvar anInstance = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n }\n\n return it;\n};\n\nvar defineProperty$9 = objectDefineProperty.f;\nvar forEach$4 = arrayIteration.forEach;\nvar setInternalState$3 = internalState.set;\nvar internalStateGetterFor = internalState.getterFor;\n\nvar collection = function (CONSTRUCTOR_NAME, wrapper, common) {\n var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n var ADDER = IS_MAP ? 'set' : 'add';\n var NativeConstructor = global_1[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var exported = {};\n var Constructor;\n\n if (!descriptors || typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n }))) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n internalMetadata.REQUIRED = true;\n } else {\n Constructor = wrapper(function (target, iterable) {\n setInternalState$3(anInstance(target, Constructor, CONSTRUCTOR_NAME), {\n type: CONSTRUCTOR_NAME,\n collection: new NativeConstructor()\n });\n if (iterable != undefined) iterate_1(iterable, target[ADDER], target, IS_MAP);\n });\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n forEach$4(['add', 'clear', 'delete', 'forEach', 'get', 'has', 'set', 'keys', 'values', 'entries'], function (KEY) {\n var IS_ADDER = KEY == 'add' || KEY == 'set';\n\n if (KEY in NativePrototype && !(IS_WEAK && KEY == 'clear')) {\n createNonEnumerableProperty(Constructor.prototype, KEY, function (a, b) {\n var collection = getInternalState(this).collection;\n if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;\n var result = collection[KEY](a === 0 ? 0 : a, b);\n return IS_ADDER ? this : result;\n });\n }\n });\n IS_WEAK || defineProperty$9(Constructor.prototype, 'size', {\n configurable: true,\n get: function () {\n return getInternalState(this).collection.size;\n }\n });\n }\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME, false, true);\n exported[CONSTRUCTOR_NAME] = Constructor;\n _export({\n global: true,\n forced: true\n }, exported);\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n return Constructor;\n};\n\nvar redefineAll = function (target, src, options) {\n for (var key in src) {\n if (options && options.unsafe && target[key]) target[key] = src[key];else redefine(target, key, src[key], options);\n }\n\n return target;\n};\n\nvar SPECIES$3 = wellKnownSymbol('species');\n\nvar setSpecies = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = objectDefineProperty.f;\n\n if (descriptors && Constructor && !Constructor[SPECIES$3]) {\n defineProperty(Constructor, SPECIES$3, {\n configurable: true,\n get: function () {\n return this;\n }\n });\n }\n};\n\nvar defineProperty$a = objectDefineProperty.f;\nvar fastKey = internalMetadata.fastKey;\nvar setInternalState$4 = internalState.set;\nvar internalStateGetterFor$1 = internalState.getterFor;\nvar collectionStrong = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState$4(that, {\n type: CONSTRUCTOR_NAME,\n index: objectCreate(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!descriptors) that.size = 0;\n if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP);\n });\n var getInternalState = internalStateGetterFor$1(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index; // change existing entry\n\n if (entry) {\n entry.value = value; // create new entry\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first) state.first = entry;\n if (previous) previous.next = entry;\n if (descriptors) state.size++;else that.size++; // add to index\n\n if (index !== 'F') state.index[index] = entry;\n }\n\n return that;\n };\n\n var getEntry = function (that, key) {\n var state = getInternalState(that); // fast case\n\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return state.index[index]; // frozen object case\n\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key == key) return entry;\n }\n };\n\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var data = state.index;\n var entry = state.first;\n\n while (entry) {\n entry.removed = true;\n if (entry.previous) entry.previous = entry.previous.next = undefined;\n delete data[entry.index];\n entry = entry.next;\n }\n\n state.first = state.last = undefined;\n if (descriptors) state.size = 0;else that.size = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev) prev.next = next;\n if (next) next.previous = prev;\n if (state.first == entry) state.first = next;\n if (state.last == entry) state.last = prev;\n if (descriptors) state.size--;else that.size--;\n }\n\n return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn\n /* , that = undefined */\n ) {\n var state = getInternalState(this);\n var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this); // revert to the last existing entry\n\n while (entry && entry.removed) entry = entry.previous;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n redefineAll(C.prototype, IS_MAP ? {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (descriptors) defineProperty$a(C.prototype, 'size', {\n get: function () {\n return getInternalState(this).size;\n }\n });\n return C;\n },\n setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor$1(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor$1(ITERATOR_NAME); // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n\n defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState$4(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last; // revert to the last existing entry\n\n while (entry && entry.removed) entry = entry.previous; // get next entry\n\n\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n // or finish the iteration\n state.target = undefined;\n return {\n value: undefined,\n done: true\n };\n } // return step by kind\n\n\n if (kind == 'keys') return {\n value: entry.key,\n done: false\n };\n if (kind == 'values') return {\n value: entry.value,\n done: false\n };\n return {\n value: [entry.key, entry.value],\n done: false\n };\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2\n\n setSpecies(CONSTRUCTOR_NAME);\n }\n};\n\n// https://tc39.github.io/ecma262/#sec-set-objects\n\n\nvar es_set = collection('Set', function (init) {\n return function Set() {\n return init(this, arguments.length ? arguments[0] : undefined);\n };\n}, collectionStrong);\n\nvar set$1 = path.Set;\n\nvar set$2 = set$1;\n\nvar set$3 = set$2;\n\n// https://tc39.github.io/ecma262/#sec-map-objects\n\n\nvar es_map = collection('Map', function (init) {\n return function Map() {\n return init(this, arguments.length ? arguments[0] : undefined);\n };\n}, collectionStrong);\n\nvar map$3 = path.Map;\n\nvar map$4 = map$3;\n\nvar map$5 = map$4;\n\nvar runtime_1 = createCommonjsModule(function (module) {\n /**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n var runtime = function (exports) {\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined$1; // More compressible than void 0.\n\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n return generator;\n }\n\n exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\"; // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n\n var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n\n function Generator() {}\n\n function GeneratorFunction() {}\n\n function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n\n\n var IteratorPrototype = {};\n\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n\n if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = \"GeneratorFunction\"; // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n prototype[method] = function (arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function (genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\" : false;\n };\n\n exports.mark = function (genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n\n genFun.prototype = Object.create(Gp);\n return genFun;\n }; // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n\n\n exports.awrap = function (arg) {\n return {\n __await: arg\n };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n\n if (value && typeof value === \"object\" && hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function (unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function (error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise = // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n } // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n\n\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n\n exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n\n exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n } // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n\n\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n var record = tryCatch(innerFn, self, context);\n\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done ? GenStateCompleted : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n } else if (record.type === \"throw\") {\n state = GenStateCompleted; // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n } // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n\n\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n\n if (method === undefined$1) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined$1;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (!info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).\n\n context.next = delegate.nextLoc; // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined$1;\n }\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n } // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n\n\n context.delegate = null;\n return ContinueSentinel;\n } // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n\n\n defineIteratorMethods(Gp);\n Gp[toStringTagSymbol] = \"Generator\"; // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n\n Gp[iteratorSymbol] = function () {\n return this;\n };\n\n Gp.toString = function () {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{\n tryLoc: \"root\"\n }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function (object) {\n var keys = [];\n\n for (var key in object) {\n keys.push(key);\n }\n\n keys.reverse(); // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n } // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n\n\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined$1;\n next.done = true;\n return next;\n };\n\n return next.next = next;\n }\n } // Return an iterator with no values.\n\n\n return {\n next: doneResult\n };\n }\n\n exports.values = values;\n\n function doneResult() {\n return {\n value: undefined$1,\n done: true\n };\n }\n\n Context.prototype = {\n constructor: Context,\n reset: function (skipTempReset) {\n this.prev = 0;\n this.next = 0; // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n\n this.sent = this._sent = undefined$1;\n this.done = false;\n this.delegate = null;\n this.method = \"next\";\n this.arg = undefined$1;\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {\n this[name] = undefined$1;\n }\n }\n }\n },\n stop: function () {\n this.done = true;\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n dispatchException: function (exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined$1;\n }\n\n return !!caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n abrupt: function (type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry && (type === \"break\" || type === \"continue\") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n complete: function (record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" || record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n finish: function (finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n \"catch\": function (tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n\n return thrown;\n }\n } // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n\n\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function (iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined$1;\n }\n\n return ContinueSentinel;\n }\n }; // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n\n return exports;\n }( // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n module.exports );\n\n try {\n regeneratorRuntime = runtime;\n } catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n});\n\nvar regenerator = runtime_1;\n\nvar iterator$3 = iterator;\n\nvar iterator$4 = iterator$3;\n\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\n\n\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? functionBindContext(mapper, thisArg, 3) : false;\n var element;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n if (depth > 0 && isArray(element)) {\n targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;\n } else {\n if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n\n sourceIndex++;\n }\n\n return targetIndex;\n};\n\nvar flattenIntoArray_1 = flattenIntoArray;\n\n// https://github.com/tc39/proposal-flatMap\n\n\n_export({\n target: 'Array',\n proto: true\n}, {\n flatMap: function flatMap(callbackfn\n /* , thisArg */\n ) {\n var O = toObject(this);\n var sourceLen = toLength(O.length);\n var A;\n aFunction(callbackfn);\n A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray_1(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return A;\n }\n});\n\nvar flatMap = entryVirtual('Array').flatMap;\n\nvar ArrayPrototype$e = Array.prototype;\n\nvar flatMap_1 = function (it) {\n var own = it.flatMap;\n return it === ArrayPrototype$e || it instanceof Array && own === ArrayPrototype$e.flatMap ? flatMap : own;\n};\n\nvar flatMap$1 = flatMap_1;\n\nvar flatMap$2 = flatMap$1;\n\nvar createMethod$5 = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = indexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n\n index += i;\n\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n\n for (; IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n\n return memo;\n };\n};\n\nvar arrayReduce = {\n // `Array.prototype.reduce` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.reduce\n left: createMethod$5(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright\n right: createMethod$5(true)\n};\n\nvar $reduce = arrayReduce.left;\nvar STRICT_METHOD$4 = arrayMethodIsStrict('reduce');\nvar USES_TO_LENGTH$8 = arrayMethodUsesToLength('reduce', {\n 1: 0\n}); // `Array.prototype.reduce` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.reduce\n\n_export({\n target: 'Array',\n proto: true,\n forced: !STRICT_METHOD$4 || !USES_TO_LENGTH$8\n}, {\n reduce: function reduce(callbackfn\n /* , initialValue */\n ) {\n return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\nvar reduce = entryVirtual('Array').reduce;\n\nvar ArrayPrototype$f = Array.prototype;\n\nvar reduce_1 = function (it) {\n var own = it.reduce;\n return it === ArrayPrototype$f || it instanceof Array && own === ArrayPrototype$f.reduce ? reduce : own;\n};\n\nvar reduce$1 = reduce_1;\n\nvar reduce$2 = reduce$1;\n\n// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n// find the complete implementation of crypto (msCrypto) on IE11.\nvar getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\nvar rnds8 = new Uint8Array(16);\nfunction rng() {\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n\n return getRandomValues(rnds8);\n}\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction bytesToUuid(buf, offset_) {\n var offset = offset_ || 0; // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n\n return (byteToHex[buf[offset + 0]] + byteToHex[buf[offset + 1]] + byteToHex[buf[offset + 2]] + byteToHex[buf[offset + 3]] + '-' + byteToHex[buf[offset + 4]] + byteToHex[buf[offset + 5]] + '-' + byteToHex[buf[offset + 6]] + byteToHex[buf[offset + 7]] + '-' + byteToHex[buf[offset + 8]] + byteToHex[buf[offset + 9]] + '-' + byteToHex[buf[offset + 10]] + byteToHex[buf[offset + 11]] + byteToHex[buf[offset + 12]] + byteToHex[buf[offset + 13]] + byteToHex[buf[offset + 14]] + byteToHex[buf[offset + 15]]).toLowerCase();\n}\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return bytesToUuid(rnds);\n}\n\nvar moment = createCommonjsModule(function (module, exports) {\n\n (function (global, factory) {\n module.exports = factory() ;\n })(commonjsGlobal, function () {\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n } // This is done to register the method called with moment()\n // without creating circular dependencies.\n\n\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [],\n i;\n\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n\n return res;\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n\n return m._pf;\n }\n\n var some;\n\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);\n\n if (m._strict) {\n isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n } // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n\n\n var momentProperties = hooks.momentProperties = [],\n updateInProgress = false;\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n } // Moment prototype object\n\n\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n\n if (!this.isValid()) {\n this._d = new Date(NaN);\n } // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n\n\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return obj instanceof Moment || obj != null && obj._isAMomentObject != null;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n\n if (firstTime) {\n var args = [],\n arg,\n i,\n key;\n\n for (i = 0; i < arguments.length; i++) {\n arg = '';\n\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n\n args.push(arg);\n }\n\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + new Error().stack);\n firstTime = false;\n }\n\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return typeof Function !== 'undefined' && input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set(config) {\n var prop, i;\n\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n\n this._config = config; // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n\n this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\\d{1,2}/.source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {}; // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n\n if (token) {\n formatTokenFunctions[token] = func;\n }\n\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n\n return output;\n };\n } // format date using native date object\n\n\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.match(formattingTokens).map(function (tok) {\n if (tok === 'MMMM' || tok === 'MM' || tok === 'DD' || tok === 'dddd') {\n return tok.slice(1);\n }\n\n return tok;\n }).join('');\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({\n unit: u,\n priority: priorities[u]\n });\n }\n }\n\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n value = toInt(value);\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n } // MOMENTS\n\n\n function stringGet(units) {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units]();\n }\n\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i;\n\n for (i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n\n return this;\n }\n\n var match1 = /\\d/,\n // 0 - 9\n match2 = /\\d\\d/,\n // 00 - 99\n match3 = /\\d{3}/,\n // 000 - 999\n match4 = /\\d{4}/,\n // 0000 - 9999\n match6 = /[+-]?\\d{6}/,\n // -999999 - 999999\n match1to2 = /\\d\\d?/,\n // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/,\n // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/,\n // 99999 - 999999\n match1to3 = /\\d{1,3}/,\n // 0 - 999\n match1to4 = /\\d{1,4}/,\n // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/,\n // -999999 - 999999\n matchUnsigned = /\\d+/,\n // 0 - inf\n matchSigned = /[+-]?\\d+/,\n // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi,\n // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi,\n // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/,\n // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n\n\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback;\n\n if (typeof token === 'string') {\n token = [token];\n }\n\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\n function mod(n, x) {\n return (n % x + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;\n } // FORMATTING\n\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n }); // ALIASES\n\n addUnitAlias('month', 'M'); // PRIORITY\n\n addUnitPriority('month', 8); // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid.\n\n\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n }); // LOCALES\n\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months) ? this._months : this._months['standalone'];\n }\n\n return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];\n }\n\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n } // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value); // TODO: Another silent failure?\n\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n\n return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n\n return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n } // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n });\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES\n\n addUnitAlias('year', 'y'); // PRIORITIES\n\n addUnitPriority('year', 1); // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n }); // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n } // HOOKS\n\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n }; // MOMENTS\n\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date; // the date constructor remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date, args; // the Date.UTC function remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset\n\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n } // start-of-first-week - start-of-year\n\n\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n\n\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n } // FORMATTING\n\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W'); // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5); // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }); // HELPERS\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n } // MOMENTS\n\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n } // FORMATTING\n\n\n addFormatToken('d', 0, 'do', 'day');\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E'); // PRIORITY\n\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11); // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid\n\n\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n }); // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n\n return isNaN(input) ? null : input;\n } // LOCALES\n\n\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone'];\n return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;\n }\n\n function localeWeekdaysShort(m) {\n return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n function localeWeekdaysMin(m) {\n return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n } // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n\n return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n\n return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n\n return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n } // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false); // ALIASES\n\n addUnitAlias('hour', 'h'); // PRIORITY\n\n addUnitPriority('hour', 13); // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n }); // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n week: defaultLocaleWeek,\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n meridiemParse: defaultLocaleMeridiemParse\n }; // internal storage for locale config files\n\n var locales = {},\n localeFamilies = {},\n globalLocale;\n\n function commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n\n return minl;\n }\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n } // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n\n\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n\n if (locale) {\n return locale;\n }\n\n if (next && next.length >= j && commonPrefix(split, next) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n\n j--;\n }\n\n i++;\n }\n\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null,\n aliasedRequire; // TODO: Find a better way to register and load all the locales in Node\n\n if (locales[name] === undefined && 'object' !== 'undefined' && module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = commonjsRequire;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n\n return locales[name];\n } // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n\n\n function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n } // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n\n\n getSetGlobalLocale(name);\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n\n config = mergeConfigs(parentConfig, config);\n\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n } // backwards compat for now: also set the locale\n\n\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n\n return locales[name];\n } // returns locale data\n\n\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n\n if (locale) {\n return locale;\n }\n\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n } // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n\n\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/], ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/], ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/], ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false], ['YYYY-DDD', /\\d{4}-\\d{3}/], ['YYYY-MM', /\\d{4}-\\d\\d/, false], ['YYYYYYMMDD', /[+-]\\d{10}/], ['YYYYMMDD', /\\d{8}/], ['GGGG[W]WWE', /\\d{4}W\\d{3}/], ['GGGG[W]WW', /\\d{4}W\\d{2}/, false], ['YYYYDDD', /\\d{7}/], ['YYYYMM', /\\d{6}/, false], ['YYYY', /\\d{4}/, false]],\n // iso time formats and regexes\n isoTimes = [['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/], ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/], ['HH:mm', /\\d\\d:\\d\\d/], ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/], ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/], ['HHmmss', /\\d\\d\\d\\d\\d\\d/], ['HHmm', /\\d\\d\\d\\d/], ['HH', /\\d\\d/]],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n }; // date from iso format\n\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n\n return true;\n }\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n } // date and time from ref 2822 format\n\n\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n\n if (match) {\n parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n config._d = createUTCDate.apply(null, config._a);\n\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n } // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n\n\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n }\n\n hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }); // Pick the first defined of two or three arguments.\n\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n\n if (b != null) {\n return b;\n }\n\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n } // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n\n\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays\n\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n } //if the day of the year is set, figure out what it is\n\n\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n } // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n\n\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n } // Zero out whatever was not defaulted, including time\n\n\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n } // Check for 24:00:00.000\n\n\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n } // check for mismatching day of week\n\n\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n w = config._w;\n\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n curWeek = weekOfYear(createLocal(), dow, doy);\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week.\n\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n } // constant that refers to the ISO standard\n\n\n hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form\n\n\n hooks.RFC_2822 = function () {}; // date from string and format string\n\n\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era;\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n } // don't parse if it's not a known token\n\n\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n } // add remaining unparsed input length to the string\n\n\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n } // clear _12h flag if hour is <= 12\n\n\n if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem; // handle meridiem\n\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); // handle era\n\n era = getParsingFlags(config).era;\n\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n\n if (isPm && hour < 12) {\n hour += 12;\n }\n\n if (!isPm && hour === 12) {\n hour = 0;\n }\n\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n } // date from string and array of format strings\n\n\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n } // if there is any input that was not parsed add a penalty for that format\n\n\n currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens\n\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (scoreToBeat == null || currentScore < scoreToBeat || validFormatFound) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map([i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || format === undefined && input === '') {\n return createInvalid({\n nullInput: true\n });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {\n input = undefined;\n } // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n\n\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }),\n prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }); // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n\n function pickBy(fn, moments) {\n var res, i;\n\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n\n if (!moments.length) {\n return createLocal();\n }\n\n res = moments[0];\n\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n\n return res;\n } // TODO: Use [].sort instead?\n\n\n function min() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i;\n\n for (key in m) {\n if (hasOwnProp(m, key) && !(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n for (i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove\n\n this._milliseconds = +milliseconds + seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n\n this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n\n this._months = +months + quarters * 3 + years * 12;\n this._data = {};\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n } // compare two arrays, return the number of differences\n\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {\n diffs++;\n }\n }\n\n return diffs + lengthDiff;\n } // FORMATTING\n\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', ''); // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n }); // HELPERS\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n } // Return a moment from input, that is local/utc/zone equivalent to model.\n\n\n function cloneWithOffset(input, model) {\n var res, diff;\n\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api.\n\n res._d.setTime(res._d.valueOf() + diff);\n\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n } // HOOKS\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n\n\n hooks.updateOffset = function () {}; // MOMENTS\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n\n\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n\n this._offset = input;\n this._isUTC = true;\n\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n\n input = input ? createLocal(input).utcOffset() : 0;\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n } // ASP.NET json date format regex\n\n\n var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if (match = aspNetRegex.exec(input)) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n\n };\n } else if (match = isoRegex.exec(input)) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign)\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it\n\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n res.months = other.month() - base.month() + (other.year() - base.year()) * 12;\n\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n\n if (!(base.isValid() && other.isValid())) {\n return {\n milliseconds: 0,\n months: 0\n };\n }\n\n other = cloneWithOffset(other, base);\n\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n } // TODO: remove 'name' arg after deprecation is removed\n\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp; //invert the arguments, but complain about it\n\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\n function isString(input) {\n return typeof input === 'string' || input instanceof String;\n } // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n\n\n function isMomentInput(input) {\n return isMoment(input) || isDate(input) || isString(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === undefined;\n }\n\n function isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = ['years', 'year', 'y', 'months', 'month', 'M', 'days', 'day', 'd', 'dates', 'date', 'D', 'hours', 'hour', 'h', 'minutes', 'minute', 'm', 'seconds', 'second', 's', 'milliseconds', 'millisecond', 'ms'],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n\n if (arrayTest) {\n dataTypeTest = input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n\n return arrayTest && dataTypeTest;\n }\n\n function isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = ['sameDay', 'nextDay', 'lastDay', 'nextWeek', 'lastWeek', 'sameElse'],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n } // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n\n\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n\n case 'month':\n output = monthDiff(this, that);\n break;\n\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n\n case 'second':\n output = (this - that) / 1e3;\n break;\n // 1000\n\n case 'minute':\n output = (this - that) / 6e4;\n break;\n // 1000 * 60\n\n case 'hour':\n output = (this - that) / 36e5;\n break;\n // 1000 * 60 * 60\n\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break;\n // 1000 * 60 * 60 * 24, negate dst\n\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break;\n // 1000 * 60 * 60 * 24 * 7, negate dst\n\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n } // difference in months\n\n\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor2 - anchor);\n } //check for negative zero, return zero if negative zero\n\n\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n\n\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n to: this,\n from: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n from: this,\n to: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n } // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n\n\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n\n return this;\n }\n }\n\n var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n });\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970):\n\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n }\n\n addFormatToken('N', 0, 0, 'eraAbbr');\n addFormatToken('NN', 0, 0, 'eraAbbr');\n addFormatToken('NNN', 0, 0, 'eraAbbr');\n addFormatToken('NNNN', 0, 0, 'eraName');\n addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n addFormatToken('y', ['yy', 2], 0, 'eraYear');\n addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n addRegexToken('N', matchEraAbbr);\n addRegexToken('NN', matchEraAbbr);\n addRegexToken('NNN', matchEraAbbr);\n addRegexToken('NNNN', matchEraName);\n addRegexToken('NNNNN', matchEraNarrow);\n addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n });\n addRegexToken('y', matchUnsigned);\n addRegexToken('yy', matchUnsigned);\n addRegexToken('yyy', matchUnsigned);\n addRegexToken('yyyy', matchUnsigned);\n addRegexToken('yo', matchEraYearOrdinal);\n addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n addParseToken(['yo'], function (input, array, config, token) {\n var match;\n\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n });\n\n function localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n\n return eras;\n }\n\n function localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n }\n\n function localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n }\n\n function getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n }\n\n function getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n }\n\n function getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n }\n\n function getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1; // truncate time\n\n val = this.startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until || eras[i].until <= val && val <= eras[i].since) {\n return (this.year() - hooks(eras[i].since).year()) * dir + eras[i].offset;\n }\n }\n\n return this.year();\n }\n\n function erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n\n return isStrict ? this._erasNameRegex : this._erasRegex;\n }\n\n function erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n }\n\n function erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n }\n\n function matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n }\n\n function matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n }\n\n function matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n }\n\n function matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n }\n\n function computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp('^(' + narrowPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG'); // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1); // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n }); // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n } // FORMATTING\n\n\n addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES\n\n addUnitAlias('quarter', 'Q'); // PRIORITY\n\n addUnitPriority('quarter', 7); // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n }); // MOMENTS\n\n function getSetQuarter(input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n } // FORMATTING\n\n\n addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES\n\n addUnitAlias('date', 'D'); // PRIORITY\n\n addUnitPriority('date', 9); // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;\n });\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n }); // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD'); // PRIORITY\n\n addUnitPriority('dayOfYear', 4); // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n }); // HELPERS\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n } // FORMATTING\n\n\n addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES\n\n addUnitAlias('minute', 'm'); // PRIORITY\n\n addUnitPriority('minute', 14); // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE); // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false); // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES\n\n addUnitAlias('second', 's'); // PRIORITY\n\n addUnitPriority('second', 15); // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND); // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false); // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n }); // ALIASES\n\n addUnitAlias('millisecond', 'ms'); // PRIORITY\n\n addUnitPriority('millisecond', 16); // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n var token, getSetMillisecond;\n\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n\n getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n\n if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n }\n\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.eraName = getEraName;\n proto.eraNarrow = getEraNarrow;\n proto.eraAbbr = getEraAbbr;\n proto.eraYear = getEraYear;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.weeksInWeekYear = getWeeksInWeekYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.eras = localeEras;\n proto$1.erasParse = localeErasParse;\n proto$1.erasConvertYear = localeErasConvertYear;\n proto$1.erasAbbrRegex = erasAbbrRegex;\n proto$1.erasNameRegex = erasNameRegex;\n proto$1.erasNarrowRegex = erasNarrowRegex;\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n\n return out;\n } // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n\n\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n eras: [{\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD'\n }, {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC'\n }],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n }); // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n return duration._bubble();\n } // supports only 2.0-style add(1, 's') or add(duration)\n\n\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n } // supports only 2.0-style subtract(1, 's') or subtract(duration)\n\n\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays; // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n\n if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n } // The following code bubbles up values, see the tests for\n // examples of what that means.\n\n\n data.milliseconds = milliseconds % 1000;\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n days += absFloor(hours / 24); // convert days to months\n\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12;\n data.days = days;\n data.months = months;\n data.years = years;\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n\n var days,\n months,\n milliseconds = this._milliseconds;\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n\n switch (units) {\n case 'month':\n return months;\n\n case 'quarter':\n return months / 3;\n\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n\n case 'day':\n return days + milliseconds / 864e5;\n\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n } // TODO: Use this.as('ms')?\n\n\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n\n return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round,\n thresholds = {\n ss: 44,\n // a few seconds to seconds\n s: 45,\n // seconds to minute\n m: 45,\n // minutes to hour\n h: 22,\n // hours to day\n d: 26,\n // days to month/week\n w: null,\n // weeks to month\n M: 11 // months to year\n\n }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days];\n\n if (thresholds.w != null) {\n a = a || weeks <= 1 && ['w'] || weeks < thresholds.w && ['ww', weeks];\n }\n\n a = a || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n } // This function allows you to set the rounding function for relative time strings\n\n\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n\n return false;\n } // This function allows you to set a threshold for relative time strings\n\n\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n\n if (limit === undefined) {\n return thresholds[threshold];\n }\n\n thresholds[threshold] = limit;\n\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n\n return true;\n }\n\n function humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n } // 3600 seconds -> 60 minutes -> 1 hour\n\n\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60; // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n return totalSign + 'P' + (years ? ymSign + years + 'Y' : '') + (months ? ymSign + months + 'M' : '') + (days ? daysSign + days + 'D' : '') + (hours || minutes || seconds ? 'T' : '') + (hours ? hmsSign + hours + 'H' : '') + (minutes ? hmsSign + minutes + 'M' : '') + (seconds ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang; // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf'); // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n }); //! moment.js\n\n hooks.version = '2.27.0';\n setHookCallback(createLocal);\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats\n\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',\n // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',\n // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',\n // \n DATE: 'YYYY-MM-DD',\n // \n TIME: 'HH:mm',\n // \n TIME_SECONDS: 'HH:mm:ss',\n // \n TIME_MS: 'HH:mm:ss.SSS',\n // \n WEEK: 'GGGG-[W]WW',\n // \n MONTH: 'YYYY-MM' // \n\n };\n return hooks;\n });\n});\n\nfunction ownKeys$4(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); if (enumerableOnly) symbols = filter$2(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context28; forEach$2(_context28 = ownKeys$4(Object(source), true)).call(_context28, function (key) { defineProperty$7(target, key, source[key]); }); } else if (getOwnPropertyDescriptors$2) { defineProperties$1(target, getOwnPropertyDescriptors$2(source)); } else { var _context29; forEach$2(_context29 = ownKeys$4(Object(source))).call(_context29, function (key) { defineProperty$2(target, key, getOwnPropertyDescriptor$3(source, key)); }); } } return target; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _createForOfIteratorHelper$1(o, allowArrayLike) { var it; if (typeof symbol$4 === \"undefined\" || getIteratorMethod$1(o) == null) { if (isArray$5(o) || (it = _unsupportedIterableToArray$2(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = getIterator$1(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray$2(o, minLen) { var _context19; if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray$2(o, minLen); var n = slice$5(_context19 = Object.prototype.toString.call(o)).call(_context19, 8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return from_1$2(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen); }\n\nfunction _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n/* eslint @typescript-eslint/member-ordering: [\"error\", { \"classes\": [\"field\", \"constructor\", \"method\"] }] */\n\n/**\r\n * Create new data pipe.\r\n *\r\n * @param from - The source data set or data view.\r\n *\r\n * @remarks\r\n * Example usage:\r\n * ```typescript\r\n * interface AppItem {\r\n * whoami: string;\r\n * appData: unknown;\r\n * visData: VisItem;\r\n * }\r\n * interface VisItem {\r\n * id: number;\r\n * label: string;\r\n * color: string;\r\n * x: number;\r\n * y: number;\r\n * }\r\n *\r\n * const ds1 = new DataSet([], { fieldId: \"whoami\" });\r\n * const ds2 = new DataSet();\r\n *\r\n * const pipe = createNewDataPipeFrom(ds1)\r\n * .filter((item): boolean => item.enabled === true)\r\n * .map((item): VisItem => item.visData)\r\n * .to(ds2);\r\n *\r\n * pipe.start();\r\n * ```\r\n *\r\n * @returns A factory whose methods can be used to configure the pipe.\r\n */\n\nfunction createNewDataPipeFrom(from) {\n return new DataPipeUnderConstruction(from);\n}\n/**\r\n * Internal implementation of the pipe. This should be accessible only through\r\n * `createNewDataPipeFrom` from the outside.\r\n *\r\n * @typeparam SI - Source item type.\r\n * @typeparam SP - Source item type's id property name.\r\n * @typeparam TI - Target item type.\r\n * @typeparam TP - Target item type's id property name.\r\n */\n\n\nvar SimpleDataPipe = /*#__PURE__*/function () {\n /**\r\n * Create a new data pipe.\r\n *\r\n * @param _source - The data set or data view that will be observed.\r\n * @param _transformers - An array of transforming functions to be used to\r\n * filter or transform the items in the pipe.\r\n * @param _target - The data set or data view that will receive the items.\r\n */\n function SimpleDataPipe(_source, _transformers, _target) {\n var _context, _context2, _context3;\n\n classCallCheck(this, SimpleDataPipe);\n\n this._source = _source;\n this._transformers = _transformers;\n this._target = _target;\n /**\r\n * Bound listeners for use with `DataInterface['on' | 'off']`.\r\n */\n\n this._listeners = {\n add: bind$2(_context = this._add).call(_context, this),\n remove: bind$2(_context2 = this._remove).call(_context2, this),\n update: bind$2(_context3 = this._update).call(_context3, this)\n };\n }\n /** @inheritdoc */\n\n\n createClass(SimpleDataPipe, [{\n key: \"all\",\n value: function all() {\n this._target.update(this._transformItems(this._source.get()));\n\n return this;\n }\n /** @inheritdoc */\n\n }, {\n key: \"start\",\n value: function start() {\n this._source.on(\"add\", this._listeners.add);\n\n this._source.on(\"remove\", this._listeners.remove);\n\n this._source.on(\"update\", this._listeners.update);\n\n return this;\n }\n /** @inheritdoc */\n\n }, {\n key: \"stop\",\n value: function stop() {\n this._source.off(\"add\", this._listeners.add);\n\n this._source.off(\"remove\", this._listeners.remove);\n\n this._source.off(\"update\", this._listeners.update);\n\n return this;\n }\n /**\r\n * Apply the transformers to the items.\r\n *\r\n * @param items - The items to be transformed.\r\n *\r\n * @returns The transformed items.\r\n */\n\n }, {\n key: \"_transformItems\",\n value: function _transformItems(items) {\n var _context4;\n\n return reduce$2(_context4 = this._transformers).call(_context4, function (items, transform) {\n return transform(items);\n }, items);\n }\n /**\r\n * Handle an add event.\r\n *\r\n * @param _name - Ignored.\r\n * @param payload - The payload containing the ids of the added items.\r\n */\n\n }, {\n key: \"_add\",\n value: function _add(_name, payload) {\n if (payload == null) {\n return;\n }\n\n this._target.add(this._transformItems(this._source.get(payload.items)));\n }\n /**\r\n * Handle an update event.\r\n *\r\n * @param _name - Ignored.\r\n * @param payload - The payload containing the ids of the updated items.\r\n */\n\n }, {\n key: \"_update\",\n value: function _update(_name, payload) {\n if (payload == null) {\n return;\n }\n\n this._target.update(this._transformItems(this._source.get(payload.items)));\n }\n /**\r\n * Handle a remove event.\r\n *\r\n * @param _name - Ignored.\r\n * @param payload - The payload containing the data of the removed items.\r\n */\n\n }, {\n key: \"_remove\",\n value: function _remove(_name, payload) {\n if (payload == null) {\n return;\n }\n\n this._target.remove(this._transformItems(payload.oldData));\n }\n }]);\n\n return SimpleDataPipe;\n}();\n/**\r\n * Internal implementation of the pipe factory. This should be accessible\r\n * only through `createNewDataPipeFrom` from the outside.\r\n *\r\n * @typeparam TI - Target item type.\r\n * @typeparam TP - Target item type's id property name.\r\n */\n\n\nvar DataPipeUnderConstruction = /*#__PURE__*/function () {\n /**\r\n * Create a new data pipe factory. This is an internal constructor that\r\n * should never be called from outside of this file.\r\n *\r\n * @param _source - The source data set or data view for this pipe.\r\n */\n function DataPipeUnderConstruction(_source) {\n classCallCheck(this, DataPipeUnderConstruction);\n\n this._source = _source;\n /**\r\n * Array transformers used to transform items within the pipe. This is typed\r\n * as any for the sake of simplicity.\r\n */\n\n this._transformers = [];\n }\n /**\r\n * Filter the items.\r\n *\r\n * @param callback - A filtering function that returns true if given item\r\n * should be piped and false if not.\r\n *\r\n * @returns This factory for further configuration.\r\n */\n\n\n createClass(DataPipeUnderConstruction, [{\n key: \"filter\",\n value: function filter(callback) {\n this._transformers.push(function (input) {\n return filter$2(input).call(input, callback);\n });\n\n return this;\n }\n /**\r\n * Map each source item to a new type.\r\n *\r\n * @param callback - A mapping function that takes a source item and returns\r\n * corresponding mapped item.\r\n *\r\n * @typeparam TI - Target item type.\r\n * @typeparam TP - Target item type's id property name.\r\n *\r\n * @returns This factory for further configuration.\r\n */\n\n }, {\n key: \"map\",\n value: function map(callback) {\n this._transformers.push(function (input) {\n return map$2(input).call(input, callback);\n });\n\n return this;\n }\n /**\r\n * Map each source item to zero or more items of a new type.\r\n *\r\n * @param callback - A mapping function that takes a source item and returns\r\n * an array of corresponding mapped items.\r\n *\r\n * @typeparam TI - Target item type.\r\n * @typeparam TP - Target item type's id property name.\r\n *\r\n * @returns This factory for further configuration.\r\n */\n\n }, {\n key: \"flatMap\",\n value: function flatMap(callback) {\n this._transformers.push(function (input) {\n return flatMap$2(input).call(input, callback);\n });\n\n return this;\n }\n /**\r\n * Connect this pipe to given data set.\r\n *\r\n * @param target - The data set that will receive the items from this pipe.\r\n *\r\n * @returns The pipe connected between given data sets and performing\r\n * configured transformation on the processed items.\r\n */\n\n }, {\n key: \"to\",\n value: function to(target) {\n return new SimpleDataPipe(this._source, this._transformers, target);\n }\n }]);\n\n return DataPipeUnderConstruction;\n}(); // utility functions\n// parse ASP.Net Date pattern,\n// for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/'\n// code from http://momentjs.com/\n\n\nvar ASPDateRegex = /^\\/?Date\\((-?\\d+)/i;\n/**\r\n * Test whether given object is a Moment date.\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if Moment instance, false otherwise.\r\n */\n\nfunction isMoment(value) {\n return moment.isMoment(value);\n}\n/**\r\n * Convert an object into another type\r\n *\r\n * @param object - Value of unknown type.\r\n * @param type - Name of the desired type.\r\n *\r\n * @returns Object in the desired type.\r\n * @throws Error\r\n */\n\n\nfunction convert(object, type) {\n var match;\n\n if (object === undefined) {\n return undefined;\n }\n\n if (object === null) {\n return null;\n }\n\n if (!type) {\n return object;\n }\n\n if (!(typeof type === \"string\") && !(type instanceof String)) {\n throw new Error(\"Type must be a string\");\n } //noinspection FallthroughInSwitchStatementJS\n\n\n switch (type) {\n case \"boolean\":\n case \"Boolean\":\n return Boolean(object);\n\n case \"number\":\n case \"Number\":\n if (isString(object) && !isNaN(Date.parse(object))) {\n return moment(object).valueOf();\n } else {\n // @TODO: I don't think that Number and String constructors are a good idea.\n // This could also fail if the object doesn't have valueOf method or if it's redefined.\n // For example: Object.create(null) or { valueOf: 7 }.\n return Number(object.valueOf());\n }\n\n case \"string\":\n case \"String\":\n return String(object);\n\n case \"Date\":\n if (isNumber(object)) {\n return new Date(object);\n }\n\n if (object instanceof Date) {\n return new Date(object.valueOf());\n } else if (isMoment(object)) {\n return new Date(object.valueOf());\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])); // parse number\n } else {\n return moment(new Date(object)).toDate(); // parse string\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type Date\");\n }\n\n case \"Moment\":\n if (isNumber(object)) {\n return moment(object);\n }\n\n if (object instanceof Date) {\n return moment(object.valueOf());\n } else if (isMoment(object)) {\n return moment(object);\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return moment(Number(match[1])); // parse number\n } else {\n return moment(object); // parse string\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type Date\");\n }\n\n case \"ISODate\":\n if (isNumber(object)) {\n return new Date(object);\n } else if (object instanceof Date) {\n return object.toISOString();\n } else if (isMoment(object)) {\n return object.toDate().toISOString();\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])).toISOString(); // parse number\n } else {\n return moment(object).format(); // ISO 8601\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type ISODate\");\n }\n\n case \"ASPDate\":\n if (isNumber(object)) {\n return \"/Date(\" + object + \")/\";\n } else if (object instanceof Date || isMoment(object)) {\n return \"/Date(\" + object.valueOf() + \")/\";\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n var value;\n\n if (match) {\n // object is an ASP date\n value = new Date(Number(match[1])).valueOf(); // parse number\n } else {\n value = new Date(object).valueOf(); // parse string\n }\n\n return \"/Date(\" + value + \")/\";\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type ASPDate\");\n }\n\n default:\n var never = type;\n throw new Error(\"Unknown type \".concat(never));\n }\n}\n/**\r\n * Determine whether a value can be used as an id.\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if the value is valid id, false otherwise.\r\n */\n\n\nfunction isId(value) {\n return typeof value === \"string\" || typeof value === \"number\";\n}\n/* eslint @typescript-eslint/member-ordering: [\"error\", { \"classes\": [\"field\", \"constructor\", \"method\"] }] */\n\n/**\r\n * A queue.\r\n *\r\n * @typeParam T - The type of method names to be replaced by queued versions.\r\n */\n\n\nvar Queue = /*#__PURE__*/function () {\n /**\r\n * Construct a new Queue.\r\n *\r\n * @param options - Queue configuration.\r\n */\n function Queue(options) {\n classCallCheck(this, Queue);\n\n this._queue = [];\n this._timeout = null;\n this._extended = null; // options\n\n this.delay = null;\n this.max = Infinity;\n this.setOptions(options);\n }\n /**\r\n * Update the configuration of the queue.\r\n *\r\n * @param options - Queue configuration.\r\n */\n\n\n createClass(Queue, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options && typeof options.delay !== \"undefined\") {\n this.delay = options.delay;\n }\n\n if (options && typeof options.max !== \"undefined\") {\n this.max = options.max;\n }\n\n this._flushIfNeeded();\n }\n /**\r\n * Extend an object with queuing functionality.\r\n * The object will be extended with a function flush, and the methods provided in options.replace will be replaced with queued ones.\r\n *\r\n * @param object - The object to be extended.\r\n * @param options - Additional options.\r\n *\r\n * @returns The created queue.\r\n */\n\n }, {\n key: \"destroy\",\n\n /**\r\n * Destroy the queue. The queue will first flush all queued actions, and in case it has extended an object, will restore the original object.\r\n */\n value: function destroy() {\n this.flush();\n\n if (this._extended) {\n var object = this._extended.object;\n var methods = this._extended.methods;\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n\n if (method.original) {\n // @TODO: better solution?\n object[method.name] = method.original;\n } else {\n // @TODO: better solution?\n delete object[method.name];\n }\n }\n\n this._extended = null;\n }\n }\n /**\r\n * Replace a method on an object with a queued version.\r\n *\r\n * @param object - Object having the method.\r\n * @param method - The method name.\r\n */\n\n }, {\n key: \"replace\",\n value: function replace(object, method) {\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n var me = this;\n var original = object[method];\n\n if (!original) {\n throw new Error(\"Method \" + method + \" undefined\");\n }\n\n object[method] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // add this call to the queue\n me.queue({\n args: args,\n fn: original,\n context: this\n });\n };\n }\n /**\r\n * Queue a call.\r\n *\r\n * @param entry - The function or entry to be queued.\r\n */\n\n }, {\n key: \"queue\",\n value: function queue(entry) {\n if (typeof entry === \"function\") {\n this._queue.push({\n fn: entry\n });\n } else {\n this._queue.push(entry);\n }\n\n this._flushIfNeeded();\n }\n /**\r\n * Check whether the queue needs to be flushed.\r\n */\n\n }, {\n key: \"_flushIfNeeded\",\n value: function _flushIfNeeded() {\n var _this = this;\n\n // flush when the maximum is exceeded.\n if (this._queue.length > this.max) {\n this.flush();\n } // flush after a period of inactivity when a delay is configured\n\n\n if (this._timeout != null) {\n clearTimeout(this._timeout);\n this._timeout = null;\n }\n\n if (this.queue.length > 0 && typeof this.delay === \"number\") {\n this._timeout = setTimeout$2(function () {\n _this.flush();\n }, this.delay);\n }\n }\n /**\r\n * Flush all queued calls\r\n */\n\n }, {\n key: \"flush\",\n value: function flush() {\n var _context5, _context6;\n\n forEach$2(_context5 = splice$2(_context6 = this._queue).call(_context6, 0)).call(_context5, function (entry) {\n entry.fn.apply(entry.context || entry.fn, entry.args || []);\n });\n }\n }], [{\n key: \"extend\",\n value: function extend(object, options) {\n var queue = new Queue(options);\n\n if (object.flush !== undefined) {\n throw new Error(\"Target object already has a property flush\");\n }\n\n object.flush = function () {\n queue.flush();\n };\n\n var methods = [{\n name: \"flush\",\n original: undefined\n }];\n\n if (options && options.replace) {\n for (var i = 0; i < options.replace.length; i++) {\n var name = options.replace[i];\n methods.push({\n name: name,\n // @TODO: better solution?\n original: object[name]\n }); // @TODO: better solution?\n\n queue.replace(object, name);\n }\n }\n\n queue._extended = {\n object: object,\n methods: methods\n };\n return queue;\n }\n }]);\n\n return Queue;\n}();\n/* eslint-disable @typescript-eslint/member-ordering */\n\n/**\r\n * [[DataSet]] code that can be reused in [[DataView]] or other similar implementations of [[DataInterface]].\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\n\n\nvar DataSetPart = /*#__PURE__*/function () {\n function DataSetPart() {\n classCallCheck(this, DataSetPart);\n\n this._subscribers = {\n \"*\": [],\n add: [],\n remove: [],\n update: []\n };\n /**\r\n * @deprecated Use on instead (PS: DataView.subscribe === DataView.on).\r\n */\n\n this.subscribe = DataSetPart.prototype.on;\n /**\r\n * @deprecated Use off instead (PS: DataView.unsubscribe === DataView.off).\r\n */\n\n this.unsubscribe = DataSetPart.prototype.off;\n }\n /**\r\n * Trigger an event\r\n *\r\n * @param event - Event name.\r\n * @param payload - Event payload.\r\n * @param senderId - Id of the sender.\r\n */\n\n\n createClass(DataSetPart, [{\n key: \"_trigger\",\n value: function _trigger(event, payload, senderId) {\n var _context7, _context8;\n\n if (event === \"*\") {\n throw new Error(\"Cannot trigger event *\");\n }\n\n forEach$2(_context7 = concat$2(_context8 = []).call(_context8, toConsumableArray(this._subscribers[event]), toConsumableArray(this._subscribers[\"*\"]))).call(_context7, function (subscriber) {\n subscriber(event, payload, senderId != null ? senderId : null);\n });\n }\n /**\r\n * Subscribe to an event, add an event listener.\r\n *\r\n * @remarks Non-function callbacks are ignored.\r\n *\r\n * @param event - Event name.\r\n * @param callback - Callback method.\r\n */\n\n }, {\n key: \"on\",\n value: function on(event, callback) {\n if (typeof callback === \"function\") {\n this._subscribers[event].push(callback);\n } // @TODO: Maybe throw for invalid callbacks?\n\n }\n /**\r\n * Unsubscribe from an event, remove an event listener.\r\n *\r\n * @remarks If the same callback was subscribed more than once **all** occurences will be removed.\r\n *\r\n * @param event - Event name.\r\n * @param callback - Callback method.\r\n */\n\n }, {\n key: \"off\",\n value: function off(event, callback) {\n var _context9;\n\n this._subscribers[event] = filter$2(_context9 = this._subscribers[event]).call(_context9, function (subscriber) {\n return subscriber !== callback;\n });\n }\n }]);\n\n return DataSetPart;\n}();\n/**\r\n * Data stream\r\n *\r\n * @remarks\r\n * [[DataStream]] offers an always up to date stream of items from a [[DataSet]] or [[DataView]].\r\n * That means that the stream is evaluated at the time of iteration, conversion to another data type or when [[cache]] is called, not when the [[DataStream]] was created.\r\n * Multiple invocations of for example [[toItemArray]] may yield different results (if the data source like for example [[DataSet]] gets modified).\r\n *\r\n * @typeparam Item - The item type this stream is going to work with.\r\n */\n\n\nvar DataStream = /*#__PURE__*/function () {\n /**\r\n * Create a new data stream.\r\n *\r\n * @param _pairs - The id, item pairs.\r\n */\n function DataStream(_pairs) {\n classCallCheck(this, DataStream);\n\n this._pairs = _pairs;\n }\n /**\r\n * Return an iterable of key, value pairs for every entry in the stream.\r\n */\n\n\n createClass(DataStream, [{\n key: iterator$4,\n value: /*#__PURE__*/regenerator.mark(function value() {\n var _iterator, _step, _step$value, id, item;\n\n return regenerator.wrap(function value$(_context10) {\n while (1) {\n switch (_context10.prev = _context10.next) {\n case 0:\n _iterator = _createForOfIteratorHelper$1(this._pairs);\n _context10.prev = 1;\n\n _iterator.s();\n\n case 3:\n if ((_step = _iterator.n()).done) {\n _context10.next = 9;\n break;\n }\n\n _step$value = slicedToArray(_step.value, 2), id = _step$value[0], item = _step$value[1];\n _context10.next = 7;\n return [id, item];\n\n case 7:\n _context10.next = 3;\n break;\n\n case 9:\n _context10.next = 14;\n break;\n\n case 11:\n _context10.prev = 11;\n _context10.t0 = _context10[\"catch\"](1);\n\n _iterator.e(_context10.t0);\n\n case 14:\n _context10.prev = 14;\n\n _iterator.f();\n\n return _context10.finish(14);\n\n case 17:\n case \"end\":\n return _context10.stop();\n }\n }\n }, value, this, [[1, 11, 14, 17]]);\n })\n /**\r\n * Return an iterable of key, value pairs for every entry in the stream.\r\n */\n\n }, {\n key: \"entries\",\n value: /*#__PURE__*/regenerator.mark(function entries() {\n var _iterator2, _step2, _step2$value, id, item;\n\n return regenerator.wrap(function entries$(_context11) {\n while (1) {\n switch (_context11.prev = _context11.next) {\n case 0:\n _iterator2 = _createForOfIteratorHelper$1(this._pairs);\n _context11.prev = 1;\n\n _iterator2.s();\n\n case 3:\n if ((_step2 = _iterator2.n()).done) {\n _context11.next = 9;\n break;\n }\n\n _step2$value = slicedToArray(_step2.value, 2), id = _step2$value[0], item = _step2$value[1];\n _context11.next = 7;\n return [id, item];\n\n case 7:\n _context11.next = 3;\n break;\n\n case 9:\n _context11.next = 14;\n break;\n\n case 11:\n _context11.prev = 11;\n _context11.t0 = _context11[\"catch\"](1);\n\n _iterator2.e(_context11.t0);\n\n case 14:\n _context11.prev = 14;\n\n _iterator2.f();\n\n return _context11.finish(14);\n\n case 17:\n case \"end\":\n return _context11.stop();\n }\n }\n }, entries, this, [[1, 11, 14, 17]]);\n })\n /**\r\n * Return an iterable of keys in the stream.\r\n */\n\n }, {\n key: \"keys\",\n value: /*#__PURE__*/regenerator.mark(function keys() {\n var _iterator3, _step3, _step3$value, id;\n\n return regenerator.wrap(function keys$(_context12) {\n while (1) {\n switch (_context12.prev = _context12.next) {\n case 0:\n _iterator3 = _createForOfIteratorHelper$1(this._pairs);\n _context12.prev = 1;\n\n _iterator3.s();\n\n case 3:\n if ((_step3 = _iterator3.n()).done) {\n _context12.next = 9;\n break;\n }\n\n _step3$value = slicedToArray(_step3.value, 1), id = _step3$value[0];\n _context12.next = 7;\n return id;\n\n case 7:\n _context12.next = 3;\n break;\n\n case 9:\n _context12.next = 14;\n break;\n\n case 11:\n _context12.prev = 11;\n _context12.t0 = _context12[\"catch\"](1);\n\n _iterator3.e(_context12.t0);\n\n case 14:\n _context12.prev = 14;\n\n _iterator3.f();\n\n return _context12.finish(14);\n\n case 17:\n case \"end\":\n return _context12.stop();\n }\n }\n }, keys, this, [[1, 11, 14, 17]]);\n })\n /**\r\n * Return an iterable of values in the stream.\r\n */\n\n }, {\n key: \"values\",\n value: /*#__PURE__*/regenerator.mark(function values() {\n var _iterator4, _step4, _step4$value, item;\n\n return regenerator.wrap(function values$(_context13) {\n while (1) {\n switch (_context13.prev = _context13.next) {\n case 0:\n _iterator4 = _createForOfIteratorHelper$1(this._pairs);\n _context13.prev = 1;\n\n _iterator4.s();\n\n case 3:\n if ((_step4 = _iterator4.n()).done) {\n _context13.next = 9;\n break;\n }\n\n _step4$value = slicedToArray(_step4.value, 2), item = _step4$value[1];\n _context13.next = 7;\n return item;\n\n case 7:\n _context13.next = 3;\n break;\n\n case 9:\n _context13.next = 14;\n break;\n\n case 11:\n _context13.prev = 11;\n _context13.t0 = _context13[\"catch\"](1);\n\n _iterator4.e(_context13.t0);\n\n case 14:\n _context13.prev = 14;\n\n _iterator4.f();\n\n return _context13.finish(14);\n\n case 17:\n case \"end\":\n return _context13.stop();\n }\n }\n }, values, this, [[1, 11, 14, 17]]);\n })\n /**\r\n * Return an array containing all the ids in this stream.\r\n *\r\n * @remarks\r\n * The array may contain duplicities.\r\n *\r\n * @returns The array with all ids from this stream.\r\n */\n\n }, {\n key: \"toIdArray\",\n value: function toIdArray() {\n var _context14;\n\n return map$2(_context14 = toConsumableArray(this._pairs)).call(_context14, function (pair) {\n return pair[0];\n });\n }\n /**\r\n * Return an array containing all the items in this stream.\r\n *\r\n * @remarks\r\n * The array may contain duplicities.\r\n *\r\n * @returns The array with all items from this stream.\r\n */\n\n }, {\n key: \"toItemArray\",\n value: function toItemArray() {\n var _context15;\n\n return map$2(_context15 = toConsumableArray(this._pairs)).call(_context15, function (pair) {\n return pair[1];\n });\n }\n /**\r\n * Return an array containing all the entries in this stream.\r\n *\r\n * @remarks\r\n * The array may contain duplicities.\r\n *\r\n * @returns The array with all entries from this stream.\r\n */\n\n }, {\n key: \"toEntryArray\",\n value: function toEntryArray() {\n return toConsumableArray(this._pairs);\n }\n /**\r\n * Return an object map containing all the items in this stream accessible by ids.\r\n *\r\n * @remarks\r\n * In case of duplicate ids (coerced to string so `7 == '7'`) the last encoutered appears in the returned object.\r\n *\r\n * @returns The object map of all id → item pairs from this stream.\r\n */\n\n }, {\n key: \"toObjectMap\",\n value: function toObjectMap() {\n var map = create$2(null);\n\n var _iterator5 = _createForOfIteratorHelper$1(this._pairs),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var _step5$value = slicedToArray(_step5.value, 2),\n id = _step5$value[0],\n item = _step5$value[1];\n\n map[id] = item;\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n return map;\n }\n /**\r\n * Return a map containing all the items in this stream accessible by ids.\r\n *\r\n * @returns The map of all id → item pairs from this stream.\r\n */\n\n }, {\n key: \"toMap\",\n value: function toMap() {\n return new map$5(this._pairs);\n }\n /**\r\n * Return a set containing all the (unique) ids in this stream.\r\n *\r\n * @returns The set of all ids from this stream.\r\n */\n\n }, {\n key: \"toIdSet\",\n value: function toIdSet() {\n return new set$3(this.toIdArray());\n }\n /**\r\n * Return a set containing all the (unique) items in this stream.\r\n *\r\n * @returns The set of all items from this stream.\r\n */\n\n }, {\n key: \"toItemSet\",\n value: function toItemSet() {\n return new set$3(this.toItemArray());\n }\n /**\r\n * Cache the items from this stream.\r\n *\r\n * @remarks\r\n * This method allows for items to be fetched immediatelly and used (possibly multiple times) later.\r\n * It can also be used to optimize performance as [[DataStream]] would otherwise reevaluate everything upon each iteration.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * const ds = new DataSet([…])\r\n *\r\n * const cachedStream = ds.stream()\r\n * .filter(…)\r\n * .sort(…)\r\n * .map(…)\r\n * .cached(…) // Data are fetched, processed and cached here.\r\n *\r\n * ds.clear()\r\n * chachedStream // Still has all the items.\r\n * ```\r\n *\r\n * @returns A new [[DataStream]] with cached items (detached from the original [[DataSet]]).\r\n */\n\n }, {\n key: \"cache\",\n value: function cache() {\n return new DataStream(toConsumableArray(this._pairs));\n }\n /**\r\n * Get the distinct values of given property.\r\n *\r\n * @param callback - The function that picks and possibly converts the property.\r\n *\r\n * @typeparam T - The type of the distinct value.\r\n *\r\n * @returns A set of all distinct properties.\r\n */\n\n }, {\n key: \"distinct\",\n value: function distinct(callback) {\n var set = new set$3();\n\n var _iterator6 = _createForOfIteratorHelper$1(this._pairs),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var _step6$value = slicedToArray(_step6.value, 2),\n id = _step6$value[0],\n item = _step6$value[1];\n\n set.add(callback(item, id));\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n\n return set;\n }\n /**\r\n * Filter the items of the stream.\r\n *\r\n * @param callback - The function that decides whether an item will be included.\r\n *\r\n * @returns A new data stream with the filtered items.\r\n */\n\n }, {\n key: \"filter\",\n value: function filter(callback) {\n var pairs = this._pairs;\n return new DataStream(defineProperty$7({}, iterator$4, /*#__PURE__*/regenerator.mark(function _callee() {\n var _iterator7, _step7, _step7$value, id, item;\n\n return regenerator.wrap(function _callee$(_context16) {\n while (1) {\n switch (_context16.prev = _context16.next) {\n case 0:\n _iterator7 = _createForOfIteratorHelper$1(pairs);\n _context16.prev = 1;\n\n _iterator7.s();\n\n case 3:\n if ((_step7 = _iterator7.n()).done) {\n _context16.next = 10;\n break;\n }\n\n _step7$value = slicedToArray(_step7.value, 2), id = _step7$value[0], item = _step7$value[1];\n\n if (!callback(item, id)) {\n _context16.next = 8;\n break;\n }\n\n _context16.next = 8;\n return [id, item];\n\n case 8:\n _context16.next = 3;\n break;\n\n case 10:\n _context16.next = 15;\n break;\n\n case 12:\n _context16.prev = 12;\n _context16.t0 = _context16[\"catch\"](1);\n\n _iterator7.e(_context16.t0);\n\n case 15:\n _context16.prev = 15;\n\n _iterator7.f();\n\n return _context16.finish(15);\n\n case 18:\n case \"end\":\n return _context16.stop();\n }\n }\n }, _callee, null, [[1, 12, 15, 18]]);\n })));\n }\n /**\r\n * Execute a callback for each item of the stream.\r\n *\r\n * @param callback - The function that will be invoked for each item.\r\n */\n\n }, {\n key: \"forEach\",\n value: function forEach(callback) {\n var _iterator8 = _createForOfIteratorHelper$1(this._pairs),\n _step8;\n\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var _step8$value = slicedToArray(_step8.value, 2),\n id = _step8$value[0],\n item = _step8$value[1];\n\n callback(item, id);\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n }\n /**\r\n * Map the items into a different type.\r\n *\r\n * @param callback - The function that does the conversion.\r\n *\r\n * @typeparam Mapped - The type of the item after mapping.\r\n *\r\n * @returns A new data stream with the mapped items.\r\n */\n\n }, {\n key: \"map\",\n value: function map(callback) {\n var pairs = this._pairs;\n return new DataStream(defineProperty$7({}, iterator$4, /*#__PURE__*/regenerator.mark(function _callee2() {\n var _iterator9, _step9, _step9$value, id, item;\n\n return regenerator.wrap(function _callee2$(_context17) {\n while (1) {\n switch (_context17.prev = _context17.next) {\n case 0:\n _iterator9 = _createForOfIteratorHelper$1(pairs);\n _context17.prev = 1;\n\n _iterator9.s();\n\n case 3:\n if ((_step9 = _iterator9.n()).done) {\n _context17.next = 9;\n break;\n }\n\n _step9$value = slicedToArray(_step9.value, 2), id = _step9$value[0], item = _step9$value[1];\n _context17.next = 7;\n return [id, callback(item, id)];\n\n case 7:\n _context17.next = 3;\n break;\n\n case 9:\n _context17.next = 14;\n break;\n\n case 11:\n _context17.prev = 11;\n _context17.t0 = _context17[\"catch\"](1);\n\n _iterator9.e(_context17.t0);\n\n case 14:\n _context17.prev = 14;\n\n _iterator9.f();\n\n return _context17.finish(14);\n\n case 17:\n case \"end\":\n return _context17.stop();\n }\n }\n }, _callee2, null, [[1, 11, 14, 17]]);\n })));\n }\n /**\r\n * Get the item with the maximum value of given property.\r\n *\r\n * @param callback - The function that picks and possibly converts the property.\r\n *\r\n * @returns The item with the maximum if found otherwise null.\r\n */\n\n }, {\n key: \"max\",\n value: function max(callback) {\n var iter = getIterator$1(this._pairs);\n\n var curr = iter.next();\n\n if (curr.done) {\n return null;\n }\n\n var maxItem = curr.value[1];\n var maxValue = callback(curr.value[1], curr.value[0]);\n\n while (!(curr = iter.next()).done) {\n var _curr$value = slicedToArray(curr.value, 2),\n id = _curr$value[0],\n item = _curr$value[1];\n\n var _value = callback(item, id);\n\n if (_value > maxValue) {\n maxValue = _value;\n maxItem = item;\n }\n }\n\n return maxItem;\n }\n /**\r\n * Get the item with the minimum value of given property.\r\n *\r\n * @param callback - The function that picks and possibly converts the property.\r\n *\r\n * @returns The item with the minimum if found otherwise null.\r\n */\n\n }, {\n key: \"min\",\n value: function min(callback) {\n var iter = getIterator$1(this._pairs);\n\n var curr = iter.next();\n\n if (curr.done) {\n return null;\n }\n\n var minItem = curr.value[1];\n var minValue = callback(curr.value[1], curr.value[0]);\n\n while (!(curr = iter.next()).done) {\n var _curr$value2 = slicedToArray(curr.value, 2),\n id = _curr$value2[0],\n item = _curr$value2[1];\n\n var _value2 = callback(item, id);\n\n if (_value2 < minValue) {\n minValue = _value2;\n minItem = item;\n }\n }\n\n return minItem;\n }\n /**\r\n * Reduce the items into a single value.\r\n *\r\n * @param callback - The function that does the reduction.\r\n * @param accumulator - The initial value of the accumulator.\r\n *\r\n * @typeparam T - The type of the accumulated value.\r\n *\r\n * @returns The reduced value.\r\n */\n\n }, {\n key: \"reduce\",\n value: function reduce(callback, accumulator) {\n var _iterator10 = _createForOfIteratorHelper$1(this._pairs),\n _step10;\n\n try {\n for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {\n var _step10$value = slicedToArray(_step10.value, 2),\n id = _step10$value[0],\n item = _step10$value[1];\n\n accumulator = callback(accumulator, item, id);\n }\n } catch (err) {\n _iterator10.e(err);\n } finally {\n _iterator10.f();\n }\n\n return accumulator;\n }\n /**\r\n * Sort the items.\r\n *\r\n * @param callback - Item comparator.\r\n *\r\n * @returns A new stream with sorted items.\r\n */\n\n }, {\n key: \"sort\",\n value: function sort(callback) {\n var _this2 = this;\n\n return new DataStream(defineProperty$7({}, iterator$4, function () {\n var _context18;\n\n return getIterator$1(sort$2(_context18 = toConsumableArray(_this2._pairs)).call(_context18, function (_ref, _ref2) {\n var _ref3 = slicedToArray(_ref, 2),\n idA = _ref3[0],\n itemA = _ref3[1];\n\n var _ref4 = slicedToArray(_ref2, 2),\n idB = _ref4[0],\n itemB = _ref4[1];\n\n return callback(itemA, itemB, idA, idB);\n }));\n }));\n }\n }]);\n\n return DataStream;\n}();\n/* eslint @typescript-eslint/member-ordering: [\"error\", { \"classes\": [\"field\", \"constructor\", \"method\"] }] */\n\n\nvar warnTypeCorectionDeprecation = function warnTypeCorectionDeprecation() {\n console.warn(\"Type coercion has been deprecated. \" + \"Please, use data pipes instead. \" + \"See https://visjs.github.io/vis-data/data/datapipe.html#TypeCoercion for more details with working migration example.\");\n};\n/**\r\n * # DataSet\r\n *\r\n * Vis.js comes with a flexible DataSet, which can be used to hold and manipulate unstructured data and listen for changes in the data. The DataSet is key/value based. Data items can be added, updated and removed from the DataSet, and one can subscribe to changes in the DataSet. The data in the DataSet can be filtered and ordered, and fields (like dates) can be converted to a specific type. Data can be normalized when appending it to the DataSet as well.\r\n *\r\n * ## Example\r\n *\r\n * The following example shows how to use a DataSet.\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * var options = {};\r\n * var data = new vis.DataSet(options);\r\n *\r\n * // add items\r\n * // note that the data items can contain different properties and data formats\r\n * data.add([\r\n * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},\r\n * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},\r\n * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},\r\n * {id: 4, text: 'item 4'}\r\n * ]);\r\n *\r\n * // subscribe to any change in the DataSet\r\n * data.on('*', function (event, properties, senderId) {\r\n * console.log('event', event, properties);\r\n * });\r\n *\r\n * // update an existing item\r\n * data.update({id: 2, group: 1});\r\n *\r\n * // remove an item\r\n * data.remove(4);\r\n *\r\n * // get all ids\r\n * var ids = data.getIds();\r\n * console.log('ids', ids);\r\n *\r\n * // get a specific item\r\n * var item1 = data.get(1);\r\n * console.log('item1', item1);\r\n *\r\n * // retrieve a filtered subset of the data\r\n * var items = data.get({\r\n * filter: function (item) {\r\n * return item.group == 1;\r\n * }\r\n * });\r\n * console.log('filtered items', items);\r\n * ```\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\n\n\nvar DataSet = /*#__PURE__*/function (_DataSetPart) {\n inherits(DataSet, _DataSetPart);\n\n var _super = _createSuper(DataSet);\n\n /**\r\n * Construct a new DataSet.\r\n *\r\n * @param data - Initial data or options.\r\n * @param options - Options (type error if data is also options).\r\n */\n function DataSet(data, options) {\n var _this3;\n\n classCallCheck(this, DataSet);\n\n _this3 = _super.call(this); // correctly read optional arguments\n\n if (data && !isArray$5(data)) {\n options = data;\n data = [];\n }\n\n _this3._options = options || {};\n _this3._data = new map$5(); // map with data indexed by id\n\n _this3.length = 0; // number of items in the DataSet\n\n _this3._idProp = _this3._options.fieldId || \"id\"; // name of the field containing id\n\n _this3._type = {}; // internal field types (NOTE: this can differ from this._options.type)\n // all variants of a Date are internally stored as Date, so we can convert\n // from everything to everything (also from ISODate to Number for example)\n\n if (_this3._options.type) {\n warnTypeCorectionDeprecation();\n\n var fields = keys$3(_this3._options.type);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var _value3 = _this3._options.type[field];\n\n if (_value3 == \"Date\" || _value3 == \"ISODate\" || _value3 == \"ASPDate\") {\n _this3._type[field] = \"Date\";\n } else {\n _this3._type[field] = _value3;\n }\n }\n } // add initial data when provided\n\n\n if (data && data.length) {\n _this3.add(data);\n }\n\n _this3.setOptions(options);\n\n return _this3;\n }\n /**\r\n * Set new options.\r\n *\r\n * @param options - The new options.\r\n */\n\n\n createClass(DataSet, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options && options.queue !== undefined) {\n if (options.queue === false) {\n // delete queue if loaded\n if (this._queue) {\n this._queue.destroy();\n\n delete this._queue;\n }\n } else {\n // create queue and update its options\n if (!this._queue) {\n this._queue = Queue.extend(this, {\n replace: [\"add\", \"update\", \"remove\"]\n });\n }\n\n if (options.queue && _typeof_1(options.queue) === \"object\") {\n this._queue.setOptions(options.queue);\n }\n }\n }\n }\n /**\r\n * Add a data item or an array with items.\r\n *\r\n * After the items are added to the DataSet, the DataSet will trigger an event `add`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet()\r\n *\r\n * // add items\r\n * const ids = data.add([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { text: 'item without an id' }\r\n * ])\r\n *\r\n * console.log(ids) // [1, 2, '']\r\n * ```\r\n *\r\n * @param data - Items to be added (ids will be generated if missing).\r\n * @param senderId - Sender id.\r\n *\r\n * @returns addedIds - Array with the ids (generated if not present) of the added items.\r\n *\r\n * @throws When an item with the same id as any of the added items already exists.\r\n */\n\n }, {\n key: \"add\",\n value: function add(data, senderId) {\n var _this4 = this;\n\n var addedIds = [];\n var id;\n\n if (isArray$5(data)) {\n // Array\n var idsToAdd = map$2(data).call(data, function (d) {\n return d[_this4._idProp];\n });\n\n if (some$2(idsToAdd).call(idsToAdd, function (id) {\n return _this4._data.has(id);\n })) {\n throw new Error(\"A duplicate id was found in the parameter array.\");\n }\n\n for (var i = 0, len = data.length; i < len; i++) {\n id = this._addItem(data[i]);\n addedIds.push(id);\n }\n } else if (data && _typeof_1(data) === \"object\") {\n // Single item\n id = this._addItem(data);\n addedIds.push(id);\n } else {\n throw new Error(\"Unknown dataType\");\n }\n\n if (addedIds.length) {\n this._trigger(\"add\", {\n items: addedIds\n }, senderId);\n }\n\n return addedIds;\n }\n /**\r\n * Update existing items. When an item does not exist, it will be created.\r\n *\r\n * @remarks\r\n * The provided properties will be merged in the existing item. When an item does not exist, it will be created.\r\n *\r\n * After the items are updated, the DataSet will trigger an event `add` for the added items, and an event `update`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' }\r\n * ])\r\n *\r\n * // update items\r\n * const ids = data.update([\r\n * { id: 2, text: 'item 2 (updated)' },\r\n * { id: 4, text: 'item 4 (new)' }\r\n * ])\r\n *\r\n * console.log(ids) // [2, 4]\r\n * ```\r\n *\r\n * ## Warning for TypeScript users\r\n * This method may introduce partial items into the data set. Use add or updateOnly instead for better type safety.\r\n *\r\n * @param data - Items to be updated (if the id is already present) or added (if the id is missing).\r\n * @param senderId - Sender id.\r\n *\r\n * @returns updatedIds - The ids of the added (these may be newly generated if there was no id in the item from the data) or updated items.\r\n *\r\n * @throws When the supplied data is neither an item nor an array of items.\r\n */\n\n }, {\n key: \"update\",\n value: function update(data, senderId) {\n var _this5 = this;\n\n var addedIds = [];\n var updatedIds = [];\n var oldData = [];\n var updatedData = [];\n var idProp = this._idProp;\n\n var addOrUpdate = function addOrUpdate(item) {\n var origId = item[idProp];\n\n if (origId != null && _this5._data.has(origId)) {\n var fullItem = item; // it has an id, therefore it is a fullitem\n\n var oldItem = assign$2({}, _this5._data.get(origId)); // update item\n\n\n var id = _this5._updateItem(fullItem);\n\n updatedIds.push(id);\n updatedData.push(fullItem);\n oldData.push(oldItem);\n } else {\n // add new item\n var _id = _this5._addItem(item);\n\n addedIds.push(_id);\n }\n };\n\n if (isArray$5(data)) {\n // Array\n for (var i = 0, len = data.length; i < len; i++) {\n if (data[i] && _typeof_1(data[i]) === \"object\") {\n addOrUpdate(data[i]);\n } else {\n console.warn(\"Ignoring input item, which is not an object at index \" + i);\n }\n }\n } else if (data && _typeof_1(data) === \"object\") {\n // Single item\n addOrUpdate(data);\n } else {\n throw new Error(\"Unknown dataType\");\n }\n\n if (addedIds.length) {\n this._trigger(\"add\", {\n items: addedIds\n }, senderId);\n }\n\n if (updatedIds.length) {\n var props = {\n items: updatedIds,\n oldData: oldData,\n data: updatedData\n }; // TODO: remove deprecated property 'data' some day\n //Object.defineProperty(props, 'data', {\n // 'get': (function() {\n // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data');\n // return updatedData;\n // }).bind(this)\n //});\n\n this._trigger(\"update\", props, senderId);\n }\n\n return concat$2(addedIds).call(addedIds, updatedIds);\n }\n /**\r\n * Update existing items. When an item does not exist, an error will be thrown.\r\n *\r\n * @remarks\r\n * The provided properties will be deeply merged into the existing item.\r\n * When an item does not exist (id not present in the data set or absent), an error will be thrown and nothing will be changed.\r\n *\r\n * After the items are updated, the DataSet will trigger an event `update`.\r\n * When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' },\r\n * ])\r\n *\r\n * // update items\r\n * const ids = data.update([\r\n * { id: 2, text: 'item 2 (updated)' }, // works\r\n * // { id: 4, text: 'item 4 (new)' }, // would throw\r\n * // { text: 'item 4 (new)' }, // would also throw\r\n * ])\r\n *\r\n * console.log(ids) // [2]\r\n * ```\r\n *\r\n * @param data - Updates (the id and optionally other props) to the items in this data set.\r\n * @param senderId - Sender id.\r\n *\r\n * @returns updatedIds - The ids of the updated items.\r\n *\r\n * @throws When the supplied data is neither an item nor an array of items, when the ids are missing.\r\n */\n\n }, {\n key: \"updateOnly\",\n value: function updateOnly(data, senderId) {\n var _context20,\n _this6 = this;\n\n if (!isArray$5(data)) {\n data = [data];\n }\n\n var updateEventData = map$2(_context20 = map$2(data).call(data, function (update) {\n var oldData = _this6._data.get(update[_this6._idProp]);\n\n if (oldData == null) {\n throw new Error(\"Updating non-existent items is not allowed.\");\n }\n\n return {\n oldData: oldData,\n update: update\n };\n })).call(_context20, function (_ref5) {\n var oldData = _ref5.oldData,\n update = _ref5.update;\n var id = oldData[_this6._idProp];\n var updatedData = pureDeepObjectAssign(oldData, update);\n\n _this6._data.set(id, updatedData);\n\n return {\n id: id,\n oldData: oldData,\n updatedData: updatedData\n };\n });\n\n if (updateEventData.length) {\n var props = {\n items: map$2(updateEventData).call(updateEventData, function (value) {\n return value.id;\n }),\n oldData: map$2(updateEventData).call(updateEventData, function (value) {\n return value.oldData;\n }),\n data: map$2(updateEventData).call(updateEventData, function (value) {\n return value.updatedData;\n })\n }; // TODO: remove deprecated property 'data' some day\n //Object.defineProperty(props, 'data', {\n // 'get': (function() {\n // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data');\n // return updatedData;\n // }).bind(this)\n //});\n\n this._trigger(\"update\", props, senderId);\n\n return props.items;\n } else {\n return [];\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"get\",\n value: function get(first, second) {\n // @TODO: Woudn't it be better to split this into multiple methods?\n // parse the arguments\n var id = undefined;\n var ids = undefined;\n var options = undefined;\n\n if (isId(first)) {\n // get(id [, options])\n id = first;\n options = second;\n } else if (isArray$5(first)) {\n // get(ids [, options])\n ids = first;\n options = second;\n } else {\n // get([, options])\n options = first;\n } // determine the return type\n\n\n var returnType = options && options.returnType === \"Object\" ? \"Object\" : \"Array\"; // @TODO: WTF is this? Or am I missing something?\n // var returnType\n // if (options && options.returnType) {\n // var allowedValues = ['Array', 'Object']\n // returnType =\n // allowedValues.indexOf(options.returnType) == -1\n // ? 'Array'\n // : options.returnType\n // } else {\n // returnType = 'Array'\n // }\n // build options\n\n var type = options && options.type || this._options.type;\n\n var filter = options && filter$2(options);\n\n var items = [];\n var item = null;\n var itemIds = null;\n var itemId = null; // convert items\n\n if (id != null) {\n // return a single item\n item = this._getItem(id, type);\n\n if (item && filter && !filter(item)) {\n item = null;\n }\n } else if (ids != null) {\n // return a subset of items\n for (var i = 0, len = ids.length; i < len; i++) {\n item = this._getItem(ids[i], type);\n\n if (item != null && (!filter || filter(item))) {\n items.push(item);\n }\n }\n } else {\n var _context21;\n\n // return all items\n itemIds = toConsumableArray(keys$6(_context21 = this._data).call(_context21));\n\n for (var _i = 0, _len2 = itemIds.length; _i < _len2; _i++) {\n itemId = itemIds[_i];\n item = this._getItem(itemId, type);\n\n if (item != null && (!filter || filter(item))) {\n items.push(item);\n }\n }\n } // order the results\n\n\n if (options && options.order && id == undefined) {\n this._sort(items, options.order);\n } // filter fields of the items\n\n\n if (options && options.fields) {\n var fields = options.fields;\n\n if (id != undefined && item != null) {\n item = this._filterFields(item, fields);\n } else {\n for (var _i2 = 0, _len3 = items.length; _i2 < _len3; _i2++) {\n items[_i2] = this._filterFields(items[_i2], fields);\n }\n }\n } // return the results\n\n\n if (returnType == \"Object\") {\n var result = {};\n\n for (var _i3 = 0, _len4 = items.length; _i3 < _len4; _i3++) {\n var resultant = items[_i3]; // @TODO: Shoudn't this be this._fieldId?\n // result[resultant.id] = resultant\n\n var _id2 = resultant[this._idProp];\n result[_id2] = resultant;\n }\n\n return result;\n } else {\n if (id != null) {\n // a single item\n return item;\n } else {\n // just return our array\n return items;\n }\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getIds\",\n value: function getIds(options) {\n var data = this._data;\n\n var filter = options && filter$2(options);\n\n var order = options && options.order;\n var type = options && options.type || this._options.type;\n\n var itemIds = toConsumableArray(keys$6(data).call(data));\n\n var ids = [];\n var item;\n var items;\n\n if (filter) {\n // get filtered items\n if (order) {\n // create ordered list\n items = [];\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n item = this._getItem(id, type);\n\n if (filter(item)) {\n items.push(item);\n }\n }\n\n this._sort(items, order);\n\n for (var _i4 = 0, _len5 = items.length; _i4 < _len5; _i4++) {\n ids.push(items[_i4][this._idProp]);\n }\n } else {\n // create unordered list\n for (var _i5 = 0, _len6 = itemIds.length; _i5 < _len6; _i5++) {\n var _id3 = itemIds[_i5];\n item = this._getItem(_id3, type);\n\n if (filter(item)) {\n ids.push(item[this._idProp]);\n }\n }\n }\n } else {\n // get all items\n if (order) {\n // create an ordered list\n items = [];\n\n for (var _i6 = 0, _len7 = itemIds.length; _i6 < _len7; _i6++) {\n var _id4 = itemIds[_i6];\n items.push(data.get(_id4));\n }\n\n this._sort(items, order);\n\n for (var _i7 = 0, _len8 = items.length; _i7 < _len8; _i7++) {\n ids.push(items[_i7][this._idProp]);\n }\n } else {\n // create unordered list\n for (var _i8 = 0, _len9 = itemIds.length; _i8 < _len9; _i8++) {\n var _id5 = itemIds[_i8];\n item = data.get(_id5);\n ids.push(item[this._idProp]);\n }\n }\n }\n\n return ids;\n }\n /** @inheritdoc */\n\n }, {\n key: \"getDataSet\",\n value: function getDataSet() {\n return this;\n }\n /** @inheritdoc */\n\n }, {\n key: \"forEach\",\n value: function forEach(callback, options) {\n var filter = options && filter$2(options);\n\n var type = options && options.type || this._options.type;\n var data = this._data;\n\n var itemIds = toConsumableArray(keys$6(data).call(data));\n\n if (options && options.order) {\n // execute forEach on ordered list\n var items = this.get(options);\n\n for (var i = 0, len = items.length; i < len; i++) {\n var item = items[i];\n var id = item[this._idProp];\n callback(item, id);\n }\n } else {\n // unordered\n for (var _i9 = 0, _len10 = itemIds.length; _i9 < _len10; _i9++) {\n var _id6 = itemIds[_i9];\n\n var _item = this._getItem(_id6, type);\n\n if (!filter || filter(_item)) {\n callback(_item, _id6);\n }\n }\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"map\",\n value: function map(callback, options) {\n var filter = options && filter$2(options);\n\n var type = options && options.type || this._options.type;\n var mappedItems = [];\n var data = this._data;\n\n var itemIds = toConsumableArray(keys$6(data).call(data)); // convert and filter items\n\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n\n var item = this._getItem(id, type);\n\n if (!filter || filter(item)) {\n mappedItems.push(callback(item, id));\n }\n } // order items\n\n\n if (options && options.order) {\n this._sort(mappedItems, options.order);\n }\n\n return mappedItems;\n }\n /**\r\n * Filter the fields of an item.\r\n *\r\n * @param item - The item whose fields should be filtered.\r\n * @param fields - The names of the fields that will be kept.\r\n *\r\n * @typeParam K - Field name type.\r\n *\r\n * @returns The item without any additional fields.\r\n */\n\n }, {\n key: \"_filterFields\",\n value: function _filterFields(item, fields) {\n var _context22;\n\n if (!item) {\n // item is null\n return item;\n }\n\n return reduce$2(_context22 = isArray$5(fields) ? // Use the supplied array\n fields : // Use the keys of the supplied object\n keys$3(fields)).call(_context22, function (filteredItem, field) {\n filteredItem[field] = item[field];\n return filteredItem;\n }, {});\n }\n /**\r\n * Sort the provided array with items.\r\n *\r\n * @param items - Items to be sorted in place.\r\n * @param order - A field name or custom sort function.\r\n *\r\n * @typeParam T - The type of the items in the items array.\r\n */\n\n }, {\n key: \"_sort\",\n value: function _sort(items, order) {\n if (typeof order === \"string\") {\n // order by provided field name\n var name = order; // field name\n\n sort$2(items).call(items, function (a, b) {\n // @TODO: How to treat missing properties?\n var av = a[name];\n var bv = b[name];\n return av > bv ? 1 : av < bv ? -1 : 0;\n });\n } else if (typeof order === \"function\") {\n // order by sort function\n sort$2(items).call(items, order);\n } else {\n // TODO: extend order by an Object {field:string, direction:string}\n // where direction can be 'asc' or 'desc'\n throw new TypeError(\"Order must be a function or a string\");\n }\n }\n /**\r\n * Remove an item or multiple items by “reference” (only the id is used) or by id.\r\n *\r\n * The method ignores removal of non-existing items, and returns an array containing the ids of the items which are actually removed from the DataSet.\r\n *\r\n * After the items are removed, the DataSet will trigger an event `remove` for the removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' }\r\n * ])\r\n *\r\n * // remove items\r\n * const ids = data.remove([2, { id: 3 }, 4])\r\n *\r\n * console.log(ids) // [2, 3]\r\n * ```\r\n *\r\n * @param id - One or more items or ids of items to be removed.\r\n * @param senderId - Sender id.\r\n *\r\n * @returns The ids of the removed items.\r\n */\n\n }, {\n key: \"remove\",\n value: function remove(id, senderId) {\n var removedIds = [];\n var removedItems = []; // force everything to be an array for simplicity\n\n var ids = isArray$5(id) ? id : [id];\n\n for (var i = 0, len = ids.length; i < len; i++) {\n var item = this._remove(ids[i]);\n\n if (item) {\n var itemId = item[this._idProp];\n\n if (itemId != null) {\n removedIds.push(itemId);\n removedItems.push(item);\n }\n }\n }\n\n if (removedIds.length) {\n this._trigger(\"remove\", {\n items: removedIds,\n oldData: removedItems\n }, senderId);\n }\n\n return removedIds;\n }\n /**\r\n * Remove an item by its id or reference.\r\n *\r\n * @param id - Id of an item or the item itself.\r\n *\r\n * @returns The removed item if removed, null otherwise.\r\n */\n\n }, {\n key: \"_remove\",\n value: function _remove(id) {\n // @TODO: It origianlly returned the item although the docs say id.\n // The code expects the item, so probably an error in the docs.\n var ident; // confirm the id to use based on the args type\n\n if (isId(id)) {\n ident = id;\n } else if (id && _typeof_1(id) === \"object\") {\n ident = id[this._idProp]; // look for the identifier field using ._idProp\n } // do the removing if the item is found\n\n\n if (ident != null && this._data.has(ident)) {\n var item = this._data.get(ident) || null;\n\n this._data.delete(ident);\n\n --this.length;\n return item;\n }\n\n return null;\n }\n /**\r\n * Clear the entire data set.\r\n *\r\n * After the items are removed, the [[DataSet]] will trigger an event `remove` for all removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * @param senderId - Sender id.\r\n *\r\n * @returns removedIds - The ids of all removed items.\r\n */\n\n }, {\n key: \"clear\",\n value: function clear(senderId) {\n var _context23;\n\n var ids = toConsumableArray(keys$6(_context23 = this._data).call(_context23));\n\n var items = [];\n\n for (var i = 0, len = ids.length; i < len; i++) {\n items.push(this._data.get(ids[i]));\n }\n\n this._data.clear();\n\n this.length = 0;\n\n this._trigger(\"remove\", {\n items: ids,\n oldData: items\n }, senderId);\n\n return ids;\n }\n /**\r\n * Find the item with maximum value of a specified field.\r\n *\r\n * @param field - Name of the property that should be searched for max value.\r\n *\r\n * @returns Item containing max value, or null if no items.\r\n */\n\n }, {\n key: \"max\",\n value: function max(field) {\n var _context24;\n\n var max = null;\n var maxField = null;\n\n var _iterator11 = _createForOfIteratorHelper$1(values$3(_context24 = this._data).call(_context24)),\n _step11;\n\n try {\n for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {\n var item = _step11.value;\n var itemField = item[field];\n\n if (typeof itemField === \"number\" && (maxField == null || itemField > maxField)) {\n max = item;\n maxField = itemField;\n }\n }\n } catch (err) {\n _iterator11.e(err);\n } finally {\n _iterator11.f();\n }\n\n return max || null;\n }\n /**\r\n * Find the item with minimum value of a specified field.\r\n *\r\n * @param field - Name of the property that should be searched for min value.\r\n *\r\n * @returns Item containing min value, or null if no items.\r\n */\n\n }, {\n key: \"min\",\n value: function min(field) {\n var _context25;\n\n var min = null;\n var minField = null;\n\n var _iterator12 = _createForOfIteratorHelper$1(values$3(_context25 = this._data).call(_context25)),\n _step12;\n\n try {\n for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {\n var item = _step12.value;\n var itemField = item[field];\n\n if (typeof itemField === \"number\" && (minField == null || itemField < minField)) {\n min = item;\n minField = itemField;\n }\n }\n } catch (err) {\n _iterator12.e(err);\n } finally {\n _iterator12.f();\n }\n\n return min || null;\n }\n /**\r\n * Find all distinct values of a specified field\r\n *\r\n * @param prop - The property name whose distinct values should be returned.\r\n *\r\n * @returns Unordered array containing all distinct values. Items without specified property are ignored.\r\n */\n\n }, {\n key: \"distinct\",\n value: function distinct(prop) {\n var data = this._data;\n\n var itemIds = toConsumableArray(keys$6(data).call(data));\n\n var values = [];\n var fieldType = this._options.type && this._options.type[prop] || null;\n var count = 0;\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data.get(id);\n var _value4 = item[prop];\n var exists = false;\n\n for (var j = 0; j < count; j++) {\n if (values[j] == _value4) {\n exists = true;\n break;\n }\n }\n\n if (!exists && _value4 !== undefined) {\n values[count] = _value4;\n count++;\n }\n }\n\n if (fieldType) {\n for (var _i10 = 0, _len11 = values.length; _i10 < _len11; _i10++) {\n values[_i10] = convert(values[_i10], fieldType);\n }\n }\n\n return values;\n }\n /**\r\n * Add a single item. Will fail when an item with the same id already exists.\r\n *\r\n * @param item - A new item to be added.\r\n *\r\n * @returns Added item's id. An id is generated when it is not present in the item.\r\n */\n\n }, {\n key: \"_addItem\",\n value: function _addItem(item) {\n var id = item[this._idProp];\n\n if (id != null) {\n // check whether this id is already taken\n if (this._data.has(id)) {\n // item already exists\n throw new Error(\"Cannot add item: item with id \" + id + \" already exists\");\n }\n } else {\n // generate an id\n id = v4();\n item[this._idProp] = id;\n }\n\n var d = {};\n\n var fields = keys$3(item);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var fieldType = this._type[field]; // type may be undefined\n\n d[field] = convert(item[field], fieldType);\n }\n\n this._data.set(id, d);\n\n ++this.length;\n return id;\n }\n /**\r\n * Get an item. Fields can be converted to a specific type\r\n *\r\n * @param id - Id of the requested item.\r\n * @param types - Property name to type name object map of type converstions.\r\n *\r\n * @returns The item, optionally after type conversion.\r\n */\n\n }, {\n key: \"_getItem\",\n value: function _getItem(id, types) {\n // @TODO: I have no idea how to type this.\n // get the item from the dataset\n var raw = this._data.get(id);\n\n if (!raw) {\n return null;\n } // convert the items field types\n\n\n var converted;\n\n var fields = keys$3(raw);\n\n if (types) {\n warnTypeCorectionDeprecation();\n converted = {};\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var _value5 = raw[field];\n converted[field] = convert(_value5, types[field]);\n }\n } else {\n // no field types specified, no converting needed\n converted = _objectSpread({}, raw);\n }\n\n if (converted[this._idProp] == null) {\n converted[this._idProp] = raw.id;\n }\n\n return converted;\n }\n /**\r\n * Update a single item: merge with existing item.\r\n * Will fail when the item has no id, or when there does not exist an item with the same id.\r\n *\r\n * @param item - The new item\r\n *\r\n * @returns The id of the updated item.\r\n */\n\n }, {\n key: \"_updateItem\",\n value: function _updateItem(item) {\n var id = item[this._idProp];\n\n if (id == null) {\n throw new Error(\"Cannot update item: item has no id (item: \" + stringify$2(item) + \")\");\n }\n\n var d = this._data.get(id);\n\n if (!d) {\n // item doesn't exist\n throw new Error(\"Cannot update item: no item with id \" + id + \" found\");\n } // merge with current item\n\n\n var fields = keys$3(item);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var fieldType = this._type[field]; // type may be undefined\n\n d[field] = convert(item[field], fieldType);\n }\n\n return id;\n }\n /** @inheritdoc */\n\n }, {\n key: \"stream\",\n value: function stream(ids) {\n if (ids) {\n var data = this._data;\n return new DataStream(defineProperty$7({}, iterator$4, /*#__PURE__*/regenerator.mark(function _callee3() {\n var _iterator13, _step13, id, item;\n\n return regenerator.wrap(function _callee3$(_context26) {\n while (1) {\n switch (_context26.prev = _context26.next) {\n case 0:\n _iterator13 = _createForOfIteratorHelper$1(ids);\n _context26.prev = 1;\n\n _iterator13.s();\n\n case 3:\n if ((_step13 = _iterator13.n()).done) {\n _context26.next = 11;\n break;\n }\n\n id = _step13.value;\n item = data.get(id);\n\n if (!(item != null)) {\n _context26.next = 9;\n break;\n }\n\n _context26.next = 9;\n return [id, item];\n\n case 9:\n _context26.next = 3;\n break;\n\n case 11:\n _context26.next = 16;\n break;\n\n case 13:\n _context26.prev = 13;\n _context26.t0 = _context26[\"catch\"](1);\n\n _iterator13.e(_context26.t0);\n\n case 16:\n _context26.prev = 16;\n\n _iterator13.f();\n\n return _context26.finish(16);\n\n case 19:\n case \"end\":\n return _context26.stop();\n }\n }\n }, _callee3, null, [[1, 13, 16, 19]]);\n })));\n } else {\n var _context27;\n\n return new DataStream(defineProperty$7({}, iterator$4, bind$2(_context27 = entries$2(this._data)).call(_context27, this._data)));\n }\n }\n }]);\n\n return DataSet;\n}(DataSetPart);\n/**\r\n * DataView\r\n *\r\n * A DataView offers a filtered and/or formatted view on a DataSet. One can subscribe to changes in a DataView, and easily get filtered or formatted data without having to specify filters and field types all the time.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * // create a DataSet\r\n * var data = new vis.DataSet();\r\n * data.add([\r\n * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},\r\n * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},\r\n * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},\r\n * {id: 4, text: 'item 4'}\r\n * ]);\r\n *\r\n * // create a DataView\r\n * // the view will only contain items having a property group with value 1,\r\n * // and will only output fields id, text, and date.\r\n * var view = new vis.DataView(data, {\r\n * filter: function (item) {\r\n * return (item.group == 1);\r\n * },\r\n * fields: ['id', 'text', 'date']\r\n * });\r\n *\r\n * // subscribe to any change in the DataView\r\n * view.on('*', function (event, properties, senderId) {\r\n * console.log('event', event, properties);\r\n * });\r\n *\r\n * // update an item in the data set\r\n * data.update({id: 2, group: 1});\r\n *\r\n * // get all ids in the view\r\n * var ids = view.getIds();\r\n * console.log('ids', ids); // will output [1, 2]\r\n *\r\n * // get all items in the view\r\n * var items = view.get();\r\n * ```\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\n\n\nvar DataView = /*#__PURE__*/function (_DataSetPart2) {\n inherits(DataView, _DataSetPart2);\n\n var _super2 = _createSuper(DataView);\n\n /**\r\n * Create a DataView.\r\n *\r\n * @param data - The instance containing data (directly or indirectly).\r\n * @param options - Options to configure this data view.\r\n */\n function DataView(data, options) {\n var _context30;\n\n var _this7;\n\n classCallCheck(this, DataView);\n\n _this7 = _super2.call(this);\n /** @inheritdoc */\n\n _this7.length = 0;\n _this7._ids = new set$3(); // ids of the items currently in memory (just contains a boolean true)\n\n _this7._options = options || {};\n _this7._listener = bind$2(_context30 = _this7._onEvent).call(_context30, assertThisInitialized(_this7));\n\n _this7.setData(data);\n\n return _this7;\n } // TODO: implement a function .config() to dynamically update things like configured filter\n // and trigger changes accordingly\n\n /**\r\n * Set a data source for the view.\r\n *\r\n * @param data - The instance containing data (directly or indirectly).\r\n *\r\n * @remarks\r\n * Note that when the data view is bound to a data set it won't be garbage\r\n * collected unless the data set is too. Use `dataView.setData(null)` or\r\n * `dataView.dispose()` to enable garbage collection before you lose the last\r\n * reference.\r\n */\n\n\n createClass(DataView, [{\n key: \"setData\",\n value: function setData(data) {\n if (this._data) {\n // unsubscribe from current dataset\n if (this._data.off) {\n this._data.off(\"*\", this._listener);\n } // trigger a remove of all items in memory\n\n\n var ids = this._data.getIds({\n filter: filter$2(this._options)\n });\n\n var items = this._data.get(ids);\n\n this._ids.clear();\n\n this.length = 0;\n\n this._trigger(\"remove\", {\n items: ids,\n oldData: items\n });\n }\n\n if (data != null) {\n this._data = data; // trigger an add of all added items\n\n var _ids = this._data.getIds({\n filter: filter$2(this._options)\n });\n\n for (var i = 0, len = _ids.length; i < len; i++) {\n var id = _ids[i];\n\n this._ids.add(id);\n }\n\n this.length = _ids.length;\n\n this._trigger(\"add\", {\n items: _ids\n });\n } else {\n this._data = new DataSet();\n } // subscribe to new dataset\n\n\n if (this._data.on) {\n this._data.on(\"*\", this._listener);\n }\n }\n /**\r\n * Refresh the DataView.\r\n * Useful when the DataView has a filter function containing a variable parameter.\r\n */\n\n }, {\n key: \"refresh\",\n value: function refresh() {\n var ids = this._data.getIds({\n filter: filter$2(this._options)\n });\n\n var oldIds = toConsumableArray(this._ids);\n\n var newIds = {};\n var addedIds = [];\n var removedIds = [];\n var removedItems = []; // check for additions\n\n for (var i = 0, len = ids.length; i < len; i++) {\n var id = ids[i];\n newIds[id] = true;\n\n if (!this._ids.has(id)) {\n addedIds.push(id);\n\n this._ids.add(id);\n }\n } // check for removals\n\n\n for (var _i11 = 0, _len12 = oldIds.length; _i11 < _len12; _i11++) {\n var _id7 = oldIds[_i11];\n\n var item = this._data.get(_id7);\n\n if (item == null) {\n // @TODO: Investigate.\n // Doesn't happen during tests or examples.\n // Is it really impossible or could it eventually happen?\n // How to handle it if it does? The types guarantee non-nullable items.\n console.error(\"If you see this, report it please.\");\n } else if (!newIds[_id7]) {\n removedIds.push(_id7);\n removedItems.push(item);\n\n this._ids.delete(_id7);\n }\n }\n\n this.length += addedIds.length - removedIds.length; // trigger events\n\n if (addedIds.length) {\n this._trigger(\"add\", {\n items: addedIds\n });\n }\n\n if (removedIds.length) {\n this._trigger(\"remove\", {\n items: removedIds,\n oldData: removedItems\n });\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"get\",\n value: function get(first, second) {\n if (this._data == null) {\n return null;\n } // parse the arguments\n\n\n var ids = null;\n var options;\n\n if (isId(first) || isArray$5(first)) {\n ids = first;\n options = second;\n } else {\n options = first;\n } // extend the options with the default options and provided options\n\n\n var viewOptions = assign$2({}, this._options, options); // create a combined filter method when needed\n\n\n var thisFilter = filter$2(this._options);\n\n var optionsFilter = options && filter$2(options);\n\n if (thisFilter && optionsFilter) {\n viewOptions.filter = function (item) {\n return thisFilter(item) && optionsFilter(item);\n };\n }\n\n if (ids == null) {\n return this._data.get(viewOptions);\n } else {\n return this._data.get(ids, viewOptions);\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getIds\",\n value: function getIds(options) {\n if (this._data.length) {\n var defaultFilter = filter$2(this._options);\n\n var optionsFilter = options != null ? filter$2(options) : null;\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n return this._data.getIds({\n filter: filter,\n order: options && options.order\n });\n } else {\n return [];\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"forEach\",\n value: function forEach(callback, options) {\n if (this._data) {\n var _context31;\n\n var defaultFilter = filter$2(this._options);\n\n var optionsFilter = options && filter$2(options);\n\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n forEach$2(_context31 = this._data).call(_context31, callback, {\n filter: filter,\n order: options && options.order\n });\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"map\",\n value: function map(callback, options) {\n if (this._data) {\n var _context32;\n\n var defaultFilter = filter$2(this._options);\n\n var optionsFilter = options && filter$2(options);\n\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n return map$2(_context32 = this._data).call(_context32, callback, {\n filter: filter,\n order: options && options.order\n });\n } else {\n return [];\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getDataSet\",\n value: function getDataSet() {\n return this._data.getDataSet();\n }\n /** @inheritdoc */\n\n }, {\n key: \"stream\",\n value: function stream(ids) {\n var _context33;\n\n return this._data.stream(ids || defineProperty$7({}, iterator$4, bind$2(_context33 = keys$6(this._ids)).call(_context33, this._ids)));\n }\n /**\r\n * Render the instance unusable prior to garbage collection.\r\n *\r\n * @remarks\r\n * The intention of this method is to help discover scenarios where the data\r\n * view is being used when the programmer thinks it has been garbage collected\r\n * already. It's stricter version of `dataView.setData(null)`.\r\n */\n\n }, {\n key: \"dispose\",\n value: function dispose() {\n var _a;\n\n if ((_a = this._data) === null || _a === void 0 ? void 0 : _a.off) {\n this._data.off(\"*\", this._listener);\n }\n\n var message = \"This data view has already been disposed of.\";\n\n defineProperty$2(this, \"_data\", {\n get: function get() {\n throw new Error(message);\n },\n set: function set() {\n throw new Error(message);\n },\n configurable: false\n });\n }\n /**\r\n * Event listener. Will propagate all events from the connected data set to the subscribers of the DataView, but will filter the items and only trigger when there are changes in the filtered data set.\r\n *\r\n * @param event - The name of the event.\r\n * @param params - Parameters of the event.\r\n * @param senderId - Id supplied by the sender.\r\n */\n\n }, {\n key: \"_onEvent\",\n value: function _onEvent(event, params, senderId) {\n if (!params || !params.items || !this._data) {\n return;\n }\n\n var ids = params.items;\n var addedIds = [];\n var updatedIds = [];\n var removedIds = [];\n var oldItems = [];\n var updatedItems = [];\n var removedItems = [];\n\n switch (event) {\n case \"add\":\n // filter the ids of the added items\n for (var i = 0, len = ids.length; i < len; i++) {\n var id = ids[i];\n var item = this.get(id);\n\n if (item) {\n this._ids.add(id);\n\n addedIds.push(id);\n }\n }\n\n break;\n\n case \"update\":\n // determine the event from the views viewpoint: an updated\n // item can be added, updated, or removed from this view.\n for (var _i12 = 0, _len13 = ids.length; _i12 < _len13; _i12++) {\n var _id8 = ids[_i12];\n\n var _item2 = this.get(_id8);\n\n if (_item2) {\n if (this._ids.has(_id8)) {\n updatedIds.push(_id8);\n updatedItems.push(params.data[_i12]);\n oldItems.push(params.oldData[_i12]);\n } else {\n this._ids.add(_id8);\n\n addedIds.push(_id8);\n }\n } else {\n if (this._ids.has(_id8)) {\n this._ids.delete(_id8);\n\n removedIds.push(_id8);\n removedItems.push(params.oldData[_i12]);\n }\n }\n }\n\n break;\n\n case \"remove\":\n // filter the ids of the removed items\n for (var _i13 = 0, _len14 = ids.length; _i13 < _len14; _i13++) {\n var _id9 = ids[_i13];\n\n if (this._ids.has(_id9)) {\n this._ids.delete(_id9);\n\n removedIds.push(_id9);\n removedItems.push(params.oldData[_i13]);\n }\n }\n\n break;\n }\n\n this.length += addedIds.length - removedIds.length;\n\n if (addedIds.length) {\n this._trigger(\"add\", {\n items: addedIds\n }, senderId);\n }\n\n if (updatedIds.length) {\n this._trigger(\"update\", {\n items: updatedIds,\n oldData: oldItems,\n data: updatedItems\n }, senderId);\n }\n\n if (removedIds.length) {\n this._trigger(\"remove\", {\n items: removedIds,\n oldData: removedItems\n }, senderId);\n }\n }\n }]);\n\n return DataView;\n}(DataSetPart);\n\nvar index$1 = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tDELETE: DELETE,\n\tDataSet: DataSet,\n\tDataStream: DataStream,\n\tDataView: DataView,\n\tQueue: Queue,\n\tcreateNewDataPipeFrom: createNewDataPipeFrom\n});\n\nvar nativeGetOwnPropertyNames$2 = objectGetOwnPropertyNamesExternal.f;\nvar FAILS_ON_PRIMITIVES$3 = fails(function () {\n return !Object.getOwnPropertyNames(1);\n}); // `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n\n_export({\n target: 'Object',\n stat: true,\n forced: FAILS_ON_PRIMITIVES$3\n}, {\n getOwnPropertyNames: nativeGetOwnPropertyNames$2\n});\n\nvar Object$2 = path.Object;\n\nvar getOwnPropertyNames = function getOwnPropertyNames(it) {\n return Object$2.getOwnPropertyNames(it);\n};\n\nvar getOwnPropertyNames$1 = getOwnPropertyNames;\n\nvar getOwnPropertyNames$2 = getOwnPropertyNames$1;\n\nvar trim$2 = stringTrim.trim;\nvar $parseFloat = global_1.parseFloat;\nvar FORCED$6 = 1 / $parseFloat(whitespaces + '-0') !== -Infinity; // `parseFloat` method\n// https://tc39.github.io/ecma262/#sec-parsefloat-string\n\nvar numberParseFloat = FORCED$6 ? function parseFloat(string) {\n var trimmedString = trim$2(String(string));\n var result = $parseFloat(trimmedString);\n return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;\n} : $parseFloat;\n\n// https://tc39.github.io/ecma262/#sec-parsefloat-string\n\n_export({\n global: true,\n forced: parseFloat != numberParseFloat\n}, {\n parseFloat: numberParseFloat\n});\n\nvar _parseFloat = path.parseFloat;\n\nvar _parseFloat$1 = _parseFloat;\n\nvar _parseFloat$2 = _parseFloat$1;\n\n/**\n * Helper functions for components\n */\n\n/**\n * Determine values to use for (sub)options of 'chosen'.\n *\n * This option is either a boolean or an object whose values should be examined further.\n * The relevant structures are:\n *\n * - chosen: \n * - chosen: { subOption: }\n *\n * Where subOption is 'node', 'edge' or 'label'.\n *\n * The intention of this method appears to be to set a specific priority to the options;\n * Since most properties are either bridged or merged into the local options objects, there\n * is not much point in handling them separately.\n * TODO: examine if 'most' in previous sentence can be replaced with 'all'. In that case, we\n * should be able to get rid of this method.\n *\n * @param {string} subOption option within object 'chosen' to consider; either 'node', 'edge' or 'label'\n * @param {Object} pile array of options objects to consider\n * \n * @return {boolean|function} value for passed subOption of 'chosen' to use\n */\n\nfunction choosify(subOption, pile) {\n // allowed values for subOption\n var allowed = ['node', 'edge', 'label'];\n var value = true;\n var chosen = topMost(pile, 'chosen');\n\n if (typeof chosen === 'boolean') {\n value = chosen;\n } else if (_typeof_1(chosen) === 'object') {\n if (indexOf$3(allowed).call(allowed, subOption) === -1) {\n throw new Error('choosify: subOption \\'' + subOption + '\\' should be one of ' + \"'\" + allowed.join(\"', '\") + \"'\");\n }\n\n var chosenEdge = topMost(pile, ['chosen', subOption]);\n\n if (typeof chosenEdge === 'boolean' || typeof chosenEdge === 'function') {\n value = chosenEdge;\n }\n }\n\n return value;\n}\n/**\n * Check if the point falls within the given rectangle.\n *\n * @param {rect} rect\n * @param {point} point\n * @param {rotationPoint} [rotationPoint] if specified, the rotation that applies to the rectangle.\n * @returns {boolean} true if point within rectangle, false otherwise\n */\n\nfunction pointInRect(rect, point, rotationPoint) {\n if (rect.width <= 0 || rect.height <= 0) {\n return false; // early out\n }\n\n if (rotationPoint !== undefined) {\n // Rotate the point the same amount as the rectangle\n var tmp = {\n x: point.x - rotationPoint.x,\n y: point.y - rotationPoint.y\n };\n\n if (rotationPoint.angle !== 0) {\n // In order to get the coordinates the same, you need to \n // rotate in the reverse direction\n var angle = -rotationPoint.angle;\n var tmp2 = {\n x: Math.cos(angle) * tmp.x - Math.sin(angle) * tmp.y,\n y: Math.sin(angle) * tmp.x + Math.cos(angle) * tmp.y\n };\n point = tmp2;\n } else {\n point = tmp;\n } // Note that if a rotation is specified, the rectangle coordinates\n // are **not* the full canvas coordinates. They are relative to the\n // rotationPoint. Hence, the point coordinates need not be translated\n // back in this case.\n\n }\n\n var right = rect.x + rect.width;\n var bottom = rect.y + rect.width;\n return rect.left < point.x && right > point.x && rect.top < point.y && bottom > point.y;\n}\n/**\n * Check if given value is acceptable as a label text.\n *\n * @param {*} text value to check; can be anything at this point\n * @returns {boolean} true if valid label value, false otherwise\n */\n\nfunction isValidLabel(text) {\n // Note that this is quite strict: types that *might* be converted to string are disallowed\n return typeof text === 'string' && text !== '';\n}\n/**\n * Returns x, y of self reference circle based on provided angle\n *\n * @param {Object} ctx\n * @param {number} angle \n * @param {number} radius \n * @param {VisNode} node \n *\n * @returns {Object} x and y coordinates\n */\n\nfunction getSelfRefCoordinates(ctx, angle, radius, node) {\n var x = node.x;\n var y = node.y;\n\n if (typeof node.distanceToBorder === \"function\") {\n //calculating opposite and adjacent\n //distaneToBorder becomes Hypotenuse. \n //Formulas sin(a) = Opposite / Hypotenuse and cos(a) = Adjacent / Hypotenuse\n var toBorderDist = node.distanceToBorder(ctx, angle);\n var yFromNodeCenter = Math.sin(angle) * toBorderDist;\n var xFromNodeCenter = Math.cos(angle) * toBorderDist; //xFromNodeCenter is basically x and if xFromNodeCenter equals to the distance to border then it means\n //that y does not need calculation because it is equal node.height / 2 or node.y\n //same thing with yFromNodeCenter and if yFromNodeCenter equals to the distance to border then it means\n //that x is equal node.width / 2 or node.x\n\n if (xFromNodeCenter === toBorderDist) {\n x += toBorderDist;\n y = node.y;\n } else if (yFromNodeCenter === toBorderDist) {\n x = node.x;\n y -= toBorderDist;\n } else {\n x += xFromNodeCenter;\n y -= yFromNodeCenter;\n }\n } else if (node.shape.width > node.shape.height) {\n x = node.x + node.shape.width * 0.5;\n y = node.y - radius;\n } else {\n x = node.x + radius;\n y = node.y - node.shape.height * 0.5;\n }\n\n return {\n x: x,\n y: y\n };\n}\n\n/**\n * Callback to determine text dimensions, using the parent label settings.\n * @callback MeasureText\n * @param {text} text\n * @param {text} mod\n * @return {Object} { width, values} width in pixels and font attributes\n */\n\n/**\n * Helper class for Label which collects results of splitting labels into lines and blocks.\n *\n * @private\n */\nvar LabelAccumulator = /*#__PURE__*/function () {\n /**\n * @param {MeasureText} measureText\n */\n function LabelAccumulator(measureText) {\n classCallCheck(this, LabelAccumulator);\n\n this.measureText = measureText;\n this.current = 0;\n this.width = 0;\n this.height = 0;\n this.lines = [];\n }\n /**\n * Append given text to the given line.\n *\n * @param {number} l index of line to add to\n * @param {string} text string to append to line\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n * @private\n */\n\n\n createClass(LabelAccumulator, [{\n key: \"_add\",\n value: function _add(l, text) {\n var mod = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'normal';\n\n if (this.lines[l] === undefined) {\n this.lines[l] = {\n width: 0,\n height: 0,\n blocks: []\n };\n } // We still need to set a block for undefined and empty texts, hence return at this point\n // This is necessary because we don't know at this point if we're at the\n // start of an empty line or not.\n // To compensate, empty blocks are removed in `finalize()`.\n //\n // Empty strings should still have a height\n\n\n var tmpText = text;\n if (text === undefined || text === \"\") tmpText = \" \"; // Determine width and get the font properties\n\n var result = this.measureText(tmpText, mod);\n\n var block = assign$2({}, values$3(result));\n\n block.text = text;\n block.width = result.width;\n block.mod = mod;\n\n if (text === undefined || text === \"\") {\n block.width = 0;\n }\n\n this.lines[l].blocks.push(block); // Update the line width. We need this for determining if a string goes over max width\n\n this.lines[l].width += block.width;\n }\n /**\n * Returns the width in pixels of the current line.\n *\n * @returns {number}\n */\n\n }, {\n key: \"curWidth\",\n value: function curWidth() {\n var line = this.lines[this.current];\n if (line === undefined) return 0;\n return line.width;\n }\n /**\n * Add text in block to current line\n *\n * @param {string} text\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n */\n\n }, {\n key: \"append\",\n value: function append(text) {\n var mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'normal';\n\n this._add(this.current, text, mod);\n }\n /**\n * Add text in block to current line and start a new line\n *\n * @param {string} text\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n */\n\n }, {\n key: \"newLine\",\n value: function newLine(text) {\n var mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'normal';\n\n this._add(this.current, text, mod);\n\n this.current++;\n }\n /**\n * Determine and set the heights of all the lines currently contained in this instance\n *\n * Note that width has already been set.\n * \n * @private\n */\n\n }, {\n key: \"determineLineHeights\",\n value: function determineLineHeights() {\n for (var k = 0; k < this.lines.length; k++) {\n var line = this.lines[k]; // Looking for max height of blocks in line\n\n var height = 0;\n\n if (line.blocks !== undefined) {\n // Can happen if text contains e.g. '\\n '\n for (var l = 0; l < line.blocks.length; l++) {\n var block = line.blocks[l];\n\n if (height < block.height) {\n height = block.height;\n }\n }\n }\n\n line.height = height;\n }\n }\n /**\n * Determine the full size of the label text, as determined by current lines and blocks\n * \n * @private\n */\n\n }, {\n key: \"determineLabelSize\",\n value: function determineLabelSize() {\n var width = 0;\n var height = 0;\n\n for (var k = 0; k < this.lines.length; k++) {\n var line = this.lines[k];\n\n if (line.width > width) {\n width = line.width;\n }\n\n height += line.height;\n }\n\n this.width = width;\n this.height = height;\n }\n /**\n * Remove all empty blocks and empty lines we don't need\n * \n * This must be done after the width/height determination,\n * so that these are set properly for processing here.\n *\n * @returns {Array} Lines with empty blocks (and some empty lines) removed\n * @private\n */\n\n }, {\n key: \"removeEmptyBlocks\",\n value: function removeEmptyBlocks() {\n var tmpLines = [];\n\n for (var k = 0; k < this.lines.length; k++) {\n var line = this.lines[k]; // Note: an empty line in between text has width zero but is still relevant to layout.\n // So we can't use width for testing empty line here\n\n if (line.blocks.length === 0) continue; // Discard final empty line always\n\n if (k === this.lines.length - 1) {\n if (line.width === 0) continue;\n }\n\n var tmpLine = {};\n\n assign$2(tmpLine, line);\n\n tmpLine.blocks = [];\n var firstEmptyBlock = void 0;\n var tmpBlocks = [];\n\n for (var l = 0; l < line.blocks.length; l++) {\n var block = line.blocks[l];\n\n if (block.width !== 0) {\n tmpBlocks.push(block);\n } else {\n if (firstEmptyBlock === undefined) {\n firstEmptyBlock = block;\n }\n }\n } // Ensure that there is *some* text present\n\n\n if (tmpBlocks.length === 0 && firstEmptyBlock !== undefined) {\n tmpBlocks.push(firstEmptyBlock);\n }\n\n tmpLine.blocks = tmpBlocks;\n tmpLines.push(tmpLine);\n }\n\n return tmpLines;\n }\n /**\n * Set the sizes for all lines and the whole thing.\n *\n * @returns {{width: (number|*), height: (number|*), lines: Array}}\n */\n\n }, {\n key: \"finalize\",\n value: function finalize() {\n //console.log(JSON.stringify(this.lines, null, 2));\n this.determineLineHeights();\n this.determineLabelSize();\n var tmpLines = this.removeEmptyBlocks(); // Return a simple hash object for further processing.\n\n return {\n width: this.width,\n height: this.height,\n lines: tmpLines\n };\n }\n }]);\n\n return LabelAccumulator;\n}();\n\nvar tagPattern = {\n // HTML\n '': //,\n '': //,\n '': //,\n '': /<\\/b>/,\n '': /<\\/i>/,\n '': /<\\/code>/,\n // Markdown\n '*': /\\*/,\n // bold\n '_': /\\_/,\n // ital\n '`': /`/,\n // mono\n 'afterBold': /[^\\*]/,\n 'afterItal': /[^_]/,\n 'afterMono': /[^`]/\n};\n/**\n * Internal helper class for parsing the markup tags for HTML and Markdown.\n *\n * NOTE: Sequences of tabs and spaces are reduced to single space.\n * Scan usage of `this.spacing` within method\n */\n\nvar MarkupAccumulator = /*#__PURE__*/function () {\n /**\n * Create an instance\n *\n * @param {string} text text to parse for markup\n */\n function MarkupAccumulator(text) {\n classCallCheck(this, MarkupAccumulator);\n\n this.text = text;\n this.bold = false;\n this.ital = false;\n this.mono = false;\n this.spacing = false;\n this.position = 0;\n this.buffer = \"\";\n this.modStack = [];\n this.blocks = [];\n }\n /**\n * Return the mod label currently on the top of the stack\n *\n * @returns {string} label of topmost mod \n * @private\n */\n\n\n createClass(MarkupAccumulator, [{\n key: \"mod\",\n value: function mod() {\n return this.modStack.length === 0 ? 'normal' : this.modStack[0];\n }\n /**\n * Return the mod label currently active\n * \n * @returns {string} label of active mod \n * @private\n */\n\n }, {\n key: \"modName\",\n value: function modName() {\n if (this.modStack.length === 0) return 'normal';else if (this.modStack[0] === 'mono') return 'mono';else {\n if (this.bold && this.ital) {\n return 'boldital';\n } else if (this.bold) {\n return 'bold';\n } else if (this.ital) {\n return 'ital';\n }\n }\n }\n /**\n * @private\n */\n\n }, {\n key: \"emitBlock\",\n value: function emitBlock() {\n if (this.spacing) {\n this.add(\" \");\n this.spacing = false;\n }\n\n if (this.buffer.length > 0) {\n this.blocks.push({\n text: this.buffer,\n mod: this.modName()\n });\n this.buffer = \"\";\n }\n }\n /**\n * Output text to buffer\n *\n * @param {string} text text to add\n * @private\n */\n\n }, {\n key: \"add\",\n value: function add(text) {\n if (text === \" \") {\n this.spacing = true;\n }\n\n if (this.spacing) {\n this.buffer += \" \";\n this.spacing = false;\n }\n\n if (text != \" \") {\n this.buffer += text;\n }\n }\n /**\n * Handle parsing of whitespace\n *\n * @param {string} ch the character to check\n * @returns {boolean} true if the character was processed as whitespace, false otherwise\n */\n\n }, {\n key: \"parseWS\",\n value: function parseWS(ch) {\n if (/[ \\t]/.test(ch)) {\n if (!this.mono) {\n this.spacing = true;\n } else {\n this.add(ch);\n }\n\n return true;\n }\n\n return false;\n }\n /**\n * @param {string} tagName label for block type to set\n * @private\n */\n\n }, {\n key: \"setTag\",\n value: function setTag(tagName) {\n this.emitBlock();\n this[tagName] = true;\n this.modStack.unshift(tagName);\n }\n /**\n * @param {string} tagName label for block type to unset\n * @private\n */\n\n }, {\n key: \"unsetTag\",\n value: function unsetTag(tagName) {\n this.emitBlock();\n this[tagName] = false;\n this.modStack.shift();\n }\n /**\n * @param {string} tagName label for block type we are currently processing\n * @param {string|RegExp} tag string to match in text\n * @returns {boolean} true if the tag was processed, false otherwise\n */\n\n }, {\n key: \"parseStartTag\",\n value: function parseStartTag(tagName, tag) {\n // Note: if 'mono' passed as tagName, there is a double check here. This is OK\n if (!this.mono && !this[tagName] && this.match(tag)) {\n this.setTag(tagName);\n return true;\n }\n\n return false;\n }\n /**\n * @param {string|RegExp} tag\n * @param {number} [advance=true] if set, advance current position in text\n * @returns {boolean} true if match at given position, false otherwise\n * @private\n */\n\n }, {\n key: \"match\",\n value: function match(tag) {\n var advance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n var _this$prepareRegExp = this.prepareRegExp(tag),\n _this$prepareRegExp2 = slicedToArray(_this$prepareRegExp, 2),\n regExp = _this$prepareRegExp2[0],\n length = _this$prepareRegExp2[1];\n\n var matched = regExp.test(this.text.substr(this.position, length));\n\n if (matched && advance) {\n this.position += length - 1;\n }\n\n return matched;\n }\n /**\n * @param {string} tagName label for block type we are currently processing\n * @param {string|RegExp} tag string to match in text\n * @param {RegExp} [nextTag] regular expression to match for characters *following* the current tag \n * @returns {boolean} true if the tag was processed, false otherwise\n */\n\n }, {\n key: \"parseEndTag\",\n value: function parseEndTag(tagName, tag, nextTag) {\n var checkTag = this.mod() === tagName;\n\n if (tagName === 'mono') {\n // special handling for 'mono'\n checkTag = checkTag && this.mono;\n } else {\n checkTag = checkTag && !this.mono;\n }\n\n if (checkTag && this.match(tag)) {\n if (nextTag !== undefined) {\n // Purpose of the following match is to prevent a direct unset/set of a given tag\n // E.g. '*bold **still bold*' => '*bold still bold*'\n if (this.position === this.text.length - 1 || this.match(nextTag, false)) {\n this.unsetTag(tagName);\n }\n } else {\n this.unsetTag(tagName);\n }\n\n return true;\n }\n\n return false;\n }\n /**\n * @param {string|RegExp} tag string to match in text\n * @param {value} value string to replace tag with, if found at current position\n * @returns {boolean} true if the tag was processed, false otherwise\n */\n\n }, {\n key: \"replace\",\n value: function replace(tag, value) {\n if (this.match(tag)) {\n this.add(value);\n this.position += length - 1;\n return true;\n }\n\n return false;\n }\n /**\n * Create a regular expression for the tag if it isn't already one.\n *\n * The return value is an array `[RegExp, number]`, with exactly two value, where:\n * - RegExp is the regular expression to use\n * - number is the lenth of the input string to match\n *\n * @param {string|RegExp} tag string to match in text\n * @returns {Array} regular expression to use and length of input string to match\n * @private\n */\n\n }, {\n key: \"prepareRegExp\",\n value: function prepareRegExp(tag) {\n var length;\n var regExp;\n\n if (tag instanceof RegExp) {\n regExp = tag;\n length = 1; // ASSUMPTION: regexp only tests one character\n } else {\n // use prepared regexp if present\n var prepared = tagPattern[tag];\n\n if (prepared !== undefined) {\n regExp = prepared;\n } else {\n regExp = new RegExp(tag);\n }\n\n length = tag.length;\n }\n\n return [regExp, length];\n }\n }]);\n\n return MarkupAccumulator;\n}();\n/**\n * Helper class for Label which explodes the label text into lines and blocks within lines\n *\n * @private\n */\n\n\nvar LabelSplitter = /*#__PURE__*/function () {\n /**\n * @param {CanvasRenderingContext2D} ctx Canvas rendering context\n * @param {Label} parent reference to the Label instance using current instance\n * @param {boolean} selected \n * @param {boolean} hover\n */\n function LabelSplitter(ctx, parent, selected, hover) {\n var _this = this;\n\n classCallCheck(this, LabelSplitter);\n\n this.ctx = ctx;\n this.parent = parent;\n this.selected = selected;\n this.hover = hover;\n /**\n * Callback to determine text width; passed to LabelAccumulator instance\n *\n * @param {String} text string to determine width of\n * @param {String} mod font type to use for this text\n * @return {Object} { width, values} width in pixels and font attributes\n */\n\n var textWidth = function textWidth(text, mod) {\n if (text === undefined) return 0; // TODO: This can be done more efficiently with caching\n // This will set the ctx.font correctly, depending on selected/hover and mod - so that ctx.measureText() will be accurate.\n\n var values = _this.parent.getFormattingValues(ctx, selected, hover, mod);\n\n var width = 0;\n\n if (text !== '') {\n var measure = _this.ctx.measureText(text);\n\n width = measure.width;\n }\n\n return {\n width: width,\n values: values\n };\n };\n\n this.lines = new LabelAccumulator(textWidth);\n }\n /**\n * Split passed text of a label into lines and blocks.\n *\n * # NOTE\n *\n * The handling of spacing is option dependent:\n *\n * - if `font.multi : false`, all spaces are retained\n * - if `font.multi : true`, every sequence of spaces is compressed to a single space\n *\n * This might not be the best way to do it, but this is as it has been working till now.\n * In order not to break existing functionality, for the time being this behaviour will\n * be retained in any code changes. \n *\n * @param {string} text text to split\n * @returns {Array}\n */\n\n\n createClass(LabelSplitter, [{\n key: \"process\",\n value: function process(text) {\n if (!isValidLabel(text)) {\n return this.lines.finalize();\n }\n\n var font = this.parent.fontOptions; // Normalize the end-of-line's to a single representation - order important\n\n text = text.replace(/\\r\\n/g, '\\n'); // Dos EOL's\n\n text = text.replace(/\\r/g, '\\n'); // Mac EOL's\n // Note that at this point, there can be no \\r's in the text.\n // This is used later on splitStringIntoLines() to split multifont texts.\n\n var nlLines = String(text).split('\\n');\n var lineCount = nlLines.length;\n\n if (font.multi) {\n // Multi-font case: styling tags active\n for (var i = 0; i < lineCount; i++) {\n var blocks = this.splitBlocks(nlLines[i], font.multi); // Post: Sequences of tabs and spaces are reduced to single space\n\n if (blocks === undefined) continue;\n\n if (blocks.length === 0) {\n this.lines.newLine(\"\");\n continue;\n }\n\n if (font.maxWdt > 0) {\n // widthConstraint.maximum defined\n //console.log('Running widthConstraint multi, max: ' + this.fontOptions.maxWdt);\n for (var j = 0; j < blocks.length; j++) {\n var mod = blocks[j].mod;\n var _text = blocks[j].text;\n this.splitStringIntoLines(_text, mod, true);\n }\n } else {\n // widthConstraint.maximum NOT defined\n for (var _j = 0; _j < blocks.length; _j++) {\n var _mod = blocks[_j].mod;\n var _text2 = blocks[_j].text;\n this.lines.append(_text2, _mod);\n }\n }\n\n this.lines.newLine();\n }\n } else {\n // Single-font case\n if (font.maxWdt > 0) {\n // widthConstraint.maximum defined\n // console.log('Running widthConstraint normal, max: ' + this.fontOptions.maxWdt);\n for (var _i = 0; _i < lineCount; _i++) {\n this.splitStringIntoLines(nlLines[_i]);\n }\n } else {\n // widthConstraint.maximum NOT defined\n for (var _i2 = 0; _i2 < lineCount; _i2++) {\n this.lines.newLine(nlLines[_i2]);\n }\n }\n }\n\n return this.lines.finalize();\n }\n /**\n * normalize the markup system\n *\n * @param {boolean|'md'|'markdown'|'html'} markupSystem\n * @returns {string}\n */\n\n }, {\n key: \"decodeMarkupSystem\",\n value: function decodeMarkupSystem(markupSystem) {\n var system = 'none';\n\n if (markupSystem === 'markdown' || markupSystem === 'md') {\n system = 'markdown';\n } else if (markupSystem === true || markupSystem === 'html') {\n system = 'html';\n }\n\n return system;\n }\n /**\n *\n * @param {string} text\n * @returns {Array}\n */\n\n }, {\n key: \"splitHtmlBlocks\",\n value: function splitHtmlBlocks(text) {\n var s = new MarkupAccumulator(text);\n\n var parseEntities = function parseEntities(ch) {\n if (/&/.test(ch)) {\n var parsed = s.replace(s.text, '<', '<') || s.replace(s.text, '&', '&');\n\n if (!parsed) {\n s.add(\"&\");\n }\n\n return true;\n }\n\n return false;\n };\n\n while (s.position < s.text.length) {\n var ch = s.text.charAt(s.position);\n var parsed = s.parseWS(ch) || /') || s.parseStartTag('ital', '') || s.parseStartTag('mono', '') || s.parseEndTag('bold', '') || s.parseEndTag('ital', '') || s.parseEndTag('mono', '')) || parseEntities(ch);\n\n if (!parsed) {\n s.add(ch);\n }\n\n s.position++;\n }\n\n s.emitBlock();\n return s.blocks;\n }\n /**\n *\n * @param {string} text\n * @returns {Array}\n */\n\n }, {\n key: \"splitMarkdownBlocks\",\n value: function splitMarkdownBlocks(text) {\n var _this2 = this;\n\n var s = new MarkupAccumulator(text);\n var beginable = true;\n\n var parseOverride = function parseOverride(ch) {\n if (/\\\\/.test(ch)) {\n if (s.position < _this2.text.length + 1) {\n s.position++;\n ch = _this2.text.charAt(s.position);\n\n if (/ \\t/.test(ch)) {\n s.spacing = true;\n } else {\n s.add(ch);\n beginable = false;\n }\n }\n\n return true;\n }\n\n return false;\n };\n\n while (s.position < s.text.length) {\n var ch = s.text.charAt(s.position);\n var parsed = s.parseWS(ch) || parseOverride(ch) || (beginable || s.spacing) && (s.parseStartTag('bold', '*') || s.parseStartTag('ital', '_') || s.parseStartTag('mono', '`')) || s.parseEndTag('bold', '*', 'afterBold') || s.parseEndTag('ital', '_', 'afterItal') || s.parseEndTag('mono', '`', 'afterMono');\n\n if (!parsed) {\n s.add(ch);\n beginable = false;\n }\n\n s.position++;\n }\n\n s.emitBlock();\n return s.blocks;\n }\n /**\n * Explodes a piece of text into single-font blocks using a given markup\n *\n * @param {string} text\n * @param {boolean|'md'|'markdown'|'html'} markupSystem\n * @returns {Array.<{text: string, mod: string}>}\n * @private\n */\n\n }, {\n key: \"splitBlocks\",\n value: function splitBlocks(text, markupSystem) {\n var system = this.decodeMarkupSystem(markupSystem);\n\n if (system === 'none') {\n return [{\n text: text,\n mod: 'normal'\n }];\n } else if (system === 'markdown') {\n return this.splitMarkdownBlocks(text);\n } else if (system === 'html') {\n return this.splitHtmlBlocks(text);\n }\n }\n /**\n * @param {string} text\n * @returns {boolean} true if text length over the current max with\n * @private\n */\n\n }, {\n key: \"overMaxWidth\",\n value: function overMaxWidth(text) {\n var width = this.ctx.measureText(text).width;\n return this.lines.curWidth() + width > this.parent.fontOptions.maxWdt;\n }\n /**\n * Determine the longest part of the sentence which still fits in the \n * current max width.\n * \n * @param {Array} words Array of strings signifying a text lines\n * @return {number} index of first item in string making string go over max\n * @private\n */\n\n }, {\n key: \"getLongestFit\",\n value: function getLongestFit(words) {\n var text = '';\n var w = 0;\n\n while (w < words.length) {\n var pre = text === '' ? '' : ' ';\n var newText = text + pre + words[w];\n if (this.overMaxWidth(newText)) break;\n text = newText;\n w++;\n }\n\n return w;\n }\n /**\n * Determine the longest part of the string which still fits in the\n * current max width.\n * \n * @param {Array} words Array of strings signifying a text lines\n * @return {number} index of first item in string making string go over max\n */\n\n }, {\n key: \"getLongestFitWord\",\n value: function getLongestFitWord(words) {\n var w = 0;\n\n while (w < words.length) {\n if (this.overMaxWidth(slice$5(words).call(words, 0, w))) break;\n w++;\n }\n\n return w;\n }\n /**\n * Split the passed text into lines, according to width constraint (if any).\n * \n * The method assumes that the input string is a single line, i.e. without lines break.\n *\n * This method retains spaces, if still present (case `font.multi: false`).\n * A space which falls on an internal line break, will be replaced by a newline.\n * There is no special handling of tabs; these go along with the flow.\n * \n * @param {string} str\n * @param {string} [mod='normal']\n * @param {boolean} [appendLast=false]\n * @private\n */\n\n }, {\n key: \"splitStringIntoLines\",\n value: function splitStringIntoLines(str) {\n var mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'normal';\n var appendLast = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n // Set the canvas context font, based upon the current selected/hover state\n // and the provided mod, so the text measurement performed by getLongestFit\n // will be accurate - and not just use the font of whoever last used the canvas.\n this.parent.getFormattingValues(this.ctx, this.selected, this.hover, mod); // Still-present spaces are relevant, retain them\n\n str = str.replace(/^( +)/g, '$1\\r');\n str = str.replace(/([^\\r][^ ]*)( +)/g, '$1\\r$2\\r');\n var words = str.split('\\r');\n\n while (words.length > 0) {\n var w = this.getLongestFit(words);\n\n if (w === 0) {\n // Special case: the first word is already larger than the max width.\n var word = words[0]; // Break the word to the largest part that fits the line\n\n var x = this.getLongestFitWord(word);\n this.lines.newLine(slice$5(word).call(word, 0, x), mod); // Adjust the word, so that the rest will be done next iteration\n\n words[0] = slice$5(word).call(word, x);\n } else {\n // skip any space that is replaced by a newline\n var newW = w;\n\n if (words[w - 1] === ' ') {\n w--;\n } else if (words[newW] === ' ') {\n newW++;\n }\n\n var text = slice$5(words).call(words, 0, w).join(\"\");\n\n if (w == words.length && appendLast) {\n this.lines.append(text, mod);\n } else {\n this.lines.newLine(text, mod);\n } // Adjust the word, so that the rest will be done next iteration\n\n\n words = slice$5(words).call(words, newW);\n }\n }\n }\n }]);\n\n return LabelSplitter;\n}();\n\n/**\n * List of special styles for multi-fonts\n * @private\n */\n\nvar multiFontStyle = ['bold', 'ital', 'boldital', 'mono'];\n/**\n * A Label to be used for Nodes or Edges.\n */\n\nvar Label = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {Object} options\n * @param {boolean} [edgelabel=false]\n */\n function Label(body, options) {\n var edgelabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n classCallCheck(this, Label);\n\n this.body = body;\n this.pointToSelf = false;\n this.baseSize = undefined;\n this.fontOptions = {}; // instance variable containing the *instance-local* font options\n\n this.setOptions(options);\n this.size = {\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n yLine: 0\n };\n this.isEdgeLabel = edgelabel;\n }\n /**\n * @param {Object} options the options of the parent Node-instance\n */\n\n\n createClass(Label, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.elementOptions = options; // Reference to the options of the parent Node-instance \n\n this.initFontOptions(options.font);\n\n if (isValidLabel(options.label)) {\n this.labelDirty = true;\n } else {\n // Bad label! Change the option value to prevent bad stuff happening\n options.label = undefined;\n }\n\n if (options.font !== undefined && options.font !== null) {\n // font options can be deleted at various levels\n if (typeof options.font === 'string') {\n this.baseSize = this.fontOptions.size;\n } else if (_typeof_1(options.font) === 'object') {\n var size = options.font.size;\n\n if (size !== undefined) {\n this.baseSize = size;\n }\n }\n }\n }\n /**\n * Init the font Options structure.\n *\n * Member fontOptions serves as an accumulator for the current font options.\n * As such, it needs to be completely separated from the node options.\n *\n * @param {Object} newFontOptions the new font options to process\n * @private\n */\n\n }, {\n key: \"initFontOptions\",\n value: function initFontOptions(newFontOptions) {\n var _this = this;\n\n // Prepare the multi-font option objects.\n // These will be filled in propagateFonts(), if required\n forEach$3(multiFontStyle, function (style) {\n _this.fontOptions[style] = {};\n }); // Handle shorthand option, if present\n\n if (Label.parseFontString(this.fontOptions, newFontOptions)) {\n this.fontOptions.vadjust = 0;\n return;\n } // Copy over the non-multifont options, if specified\n\n\n forEach$3(newFontOptions, function (prop, n) {\n if (prop !== undefined && prop !== null && _typeof_1(prop) !== 'object') {\n _this.fontOptions[n] = prop;\n }\n });\n }\n /**\n * If in-variable is a string, parse it as a font specifier.\n *\n * Note that following is not done here and have to be done after the call:\n * - Not all font options are set (vadjust, mod)\n *\n * @param {Object} outOptions out-parameter, object in which to store the parse results (if any)\n * @param {Object} inOptions font options to parse\n * @return {boolean} true if font parsed as string, false otherwise\n * @static\n */\n\n }, {\n key: \"constrain\",\n\n /**\n * Set the width and height constraints based on 'nearest' value\n *\n * @param {Array} pile array of option objects to consider\n * @returns {object} the actual constraint values to use\n * @private\n */\n value: function constrain(pile) {\n // NOTE: constrainWidth and constrainHeight never set!\n // NOTE: for edge labels, only 'maxWdt' set\n // Node labels can set all the fields\n var fontOptions = {\n constrainWidth: false,\n maxWdt: -1,\n minWdt: -1,\n constrainHeight: false,\n minHgt: -1,\n valign: 'middle'\n };\n var widthConstraint = topMost(pile, 'widthConstraint');\n\n if (typeof widthConstraint === 'number') {\n fontOptions.maxWdt = Number(widthConstraint);\n fontOptions.minWdt = Number(widthConstraint);\n } else if (_typeof_1(widthConstraint) === 'object') {\n var widthConstraintMaximum = topMost(pile, ['widthConstraint', 'maximum']);\n\n if (typeof widthConstraintMaximum === 'number') {\n fontOptions.maxWdt = Number(widthConstraintMaximum);\n }\n\n var widthConstraintMinimum = topMost(pile, ['widthConstraint', 'minimum']);\n\n if (typeof widthConstraintMinimum === 'number') {\n fontOptions.minWdt = Number(widthConstraintMinimum);\n }\n }\n\n var heightConstraint = topMost(pile, 'heightConstraint');\n\n if (typeof heightConstraint === 'number') {\n fontOptions.minHgt = Number(heightConstraint);\n } else if (_typeof_1(heightConstraint) === 'object') {\n var heightConstraintMinimum = topMost(pile, ['heightConstraint', 'minimum']);\n\n if (typeof heightConstraintMinimum === 'number') {\n fontOptions.minHgt = Number(heightConstraintMinimum);\n }\n\n var heightConstraintValign = topMost(pile, ['heightConstraint', 'valign']);\n\n if (typeof heightConstraintValign === 'string') {\n if (heightConstraintValign === 'top' || heightConstraintValign === 'bottom') {\n fontOptions.valign = heightConstraintValign;\n }\n }\n }\n\n return fontOptions;\n }\n /**\n * Set options and update internal state\n *\n * @param {Object} options options to set\n * @param {Array} pile array of option objects to consider for option 'chosen'\n */\n\n }, {\n key: \"update\",\n value: function update(options, pile) {\n this.setOptions(options, true);\n this.propagateFonts(pile);\n deepExtend(this.fontOptions, this.constrain(pile));\n this.fontOptions.chooser = choosify('label', pile);\n }\n /**\n * When margins are set in an element, adjust sizes is called to remove them\n * from the width/height constraints. This must be done prior to label sizing.\n *\n * @param {{top: number, right: number, bottom: number, left: number}} margins\n */\n\n }, {\n key: \"adjustSizes\",\n value: function adjustSizes(margins) {\n var widthBias = margins ? margins.right + margins.left : 0;\n\n if (this.fontOptions.constrainWidth) {\n this.fontOptions.maxWdt -= widthBias;\n this.fontOptions.minWdt -= widthBias;\n }\n\n var heightBias = margins ? margins.top + margins.bottom : 0;\n\n if (this.fontOptions.constrainHeight) {\n this.fontOptions.minHgt -= heightBias;\n }\n } /////////////////////////////////////////////////////////\n // Methods for handling options piles\n // Eventually, these will be moved to a separate class\n /////////////////////////////////////////////////////////\n\n /**\n * Add the font members of the passed list of option objects to the pile.\n *\n * @param {Pile} dstPile pile of option objects add to \n * @param {Pile} srcPile pile of option objects to take font options from\n * @private\n */\n\n }, {\n key: \"addFontOptionsToPile\",\n value: function addFontOptionsToPile(dstPile, srcPile) {\n for (var i = 0; i < srcPile.length; ++i) {\n this.addFontToPile(dstPile, srcPile[i]);\n }\n }\n /**\n * Add given font option object to the list of objects (the 'pile') to consider for determining\n * multi-font option values.\n *\n * @param {Pile} pile pile of option objects to use\n * @param {object} options instance to add to pile\n * @private\n */\n\n }, {\n key: \"addFontToPile\",\n value: function addFontToPile(pile, options) {\n if (options === undefined) return;\n if (options.font === undefined || options.font === null) return;\n var item = options.font;\n pile.push(item);\n }\n /**\n * Collect all own-property values from the font pile that aren't multi-font option objectss.\n *\n * @param {Pile} pile pile of option objects to use\n * @returns {object} object with all current own basic font properties\n * @private\n */\n\n }, {\n key: \"getBasicOptions\",\n value: function getBasicOptions(pile) {\n var ret = {}; // Scans the whole pile to get all options present\n\n for (var n = 0; n < pile.length; ++n) {\n var fontOptions = pile[n]; // Convert shorthand if necessary\n\n var tmpShorthand = {};\n\n if (Label.parseFontString(tmpShorthand, fontOptions)) {\n fontOptions = tmpShorthand;\n }\n\n forEach$3(fontOptions, function (opt, name) {\n if (opt === undefined) return; // multi-font option need not be present \n\n if (Object.prototype.hasOwnProperty.call(ret, name)) return; // Keep first value we encounter\n\n if (indexOf$3(multiFontStyle).call(multiFontStyle, name) !== -1) {\n // Skip multi-font properties but we do need the structure\n ret[name] = {};\n } else {\n ret[name] = opt;\n }\n });\n }\n\n return ret;\n }\n /**\n * Return the value for given option for the given multi-font.\n *\n * All available option objects are trawled in the set order to construct the option values.\n *\n * ---------------------------------------------------------------------\n * ## Traversal of pile for multi-fonts\n *\n * The determination of multi-font option values is a special case, because any values not\n * present in the multi-font options should by definition be taken from the main font options,\n * i.e. from the current 'parent' object of the multi-font option.\n *\n * ### Search order for multi-fonts\n *\n * 'bold' used as example:\n *\n * - search in option group 'bold' in local properties\n * - search in main font option group in local properties\n *\n * ---------------------------------------------------------------------\n *\n * @param {Pile} pile pile of option objects to use\n * @param {MultiFontStyle} multiName sub path for the multi-font\n * @param {string} option the option to search for, for the given multi-font\n * @returns {string|number} the value for the given option\n * @private\n */\n\n }, {\n key: \"getFontOption\",\n value: function getFontOption(pile, multiName, option) {\n var multiFont; // Search multi font in local properties\n\n for (var n = 0; n < pile.length; ++n) {\n var fontOptions = pile[n];\n\n if (Object.prototype.hasOwnProperty.call(fontOptions, multiName)) {\n multiFont = fontOptions[multiName];\n if (multiFont === undefined || multiFont === null) continue; // Convert shorthand if necessary\n // TODO: inefficient to do this conversion every time; find a better way.\n\n var tmpShorthand = {};\n\n if (Label.parseFontString(tmpShorthand, multiFont)) {\n multiFont = tmpShorthand;\n }\n\n if (Object.prototype.hasOwnProperty.call(multiFont, option)) {\n return multiFont[option];\n }\n }\n } // Option is not mentioned in the multi font options; take it from the parent font options.\n // These have already been converted with getBasicOptions(), so use the converted values.\n\n\n if (Object.prototype.hasOwnProperty.call(this.fontOptions, option)) {\n return this.fontOptions[option];\n } // A value **must** be found; you should never get here.\n\n\n throw new Error(\"Did not find value for multi-font for property: '\" + option + \"'\");\n }\n /**\n * Return all options values for the given multi-font.\n *\n * All available option objects are trawled in the set order to construct the option values.\n *\n * @param {Pile} pile pile of option objects to use\n * @param {MultiFontStyle} multiName sub path for the mod-font\n * @returns {MultiFontOptions}\n * @private\n */\n\n }, {\n key: \"getFontOptions\",\n value: function getFontOptions(pile, multiName) {\n var result = {};\n var optionNames = ['color', 'size', 'face', 'mod', 'vadjust']; // List of allowed options per multi-font\n\n for (var i = 0; i < optionNames.length; ++i) {\n var mod = optionNames[i];\n result[mod] = this.getFontOption(pile, multiName, mod);\n }\n\n return result;\n } /////////////////////////////////////////////////////////\n // End methods for handling options piles\n /////////////////////////////////////////////////////////\n\n /**\n * Collapse the font options for the multi-font to single objects, from\n * the chain of option objects passed (the 'pile').\n *\n * @param {Pile} pile sequence of option objects to consider.\n * First item in list assumed to be the newly set options.\n */\n\n }, {\n key: \"propagateFonts\",\n value: function propagateFonts(pile) {\n var _this2 = this;\n\n var fontPile = []; // sequence of font objects to consider, order important\n // Note that this.elementOptions is not used here.\n\n this.addFontOptionsToPile(fontPile, pile);\n this.fontOptions = this.getBasicOptions(fontPile); // We set multifont values even if multi === false, for consistency (things break otherwise)\n\n var _loop = function _loop(i) {\n var mod = multiFontStyle[i];\n var modOptions = _this2.fontOptions[mod];\n\n var tmpMultiFontOptions = _this2.getFontOptions(fontPile, mod); // Copy over found values\n\n\n forEach$3(tmpMultiFontOptions, function (option, n) {\n modOptions[n] = option;\n });\n modOptions.size = Number(modOptions.size);\n modOptions.vadjust = Number(modOptions.vadjust);\n };\n\n for (var i = 0; i < multiFontStyle.length; ++i) {\n _loop(i);\n }\n }\n /**\n * Main function. This is called from anything that wants to draw a label.\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} [baseline='middle']\n */\n\n }, {\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover) {\n var baseline = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'middle';\n // if no label, return\n if (this.elementOptions.label === undefined) return; // check if we have to render the label\n\n var viewFontSize = this.fontOptions.size * this.body.view.scale;\n if (this.elementOptions.label && viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) return; // This ensures that there will not be HUGE letters on screen\n // by setting an upper limit on the visible text size (regardless of zoomLevel)\n\n if (viewFontSize >= this.elementOptions.scaling.label.maxVisible) {\n viewFontSize = Number(this.elementOptions.scaling.label.maxVisible) / this.body.view.scale;\n } // update the size cache if required\n\n\n this.calculateLabelSize(ctx, selected, hover, x, y, baseline);\n\n this._drawBackground(ctx);\n\n this._drawText(ctx, x, this.size.yLine, baseline, viewFontSize);\n }\n /**\n * Draws the label background\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n\n }, {\n key: \"_drawBackground\",\n value: function _drawBackground(ctx) {\n if (this.fontOptions.background !== undefined && this.fontOptions.background !== \"none\") {\n ctx.fillStyle = this.fontOptions.background;\n var size = this.getSize();\n ctx.fillRect(size.left, size.top, size.width, size.height);\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {string} [baseline='middle']\n * @param {number} viewFontSize \n * @private\n */\n\n }, {\n key: \"_drawText\",\n value: function _drawText(ctx, x, y) {\n var baseline = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'middle';\n var viewFontSize = arguments.length > 4 ? arguments[4] : undefined;\n\n var _this$_setAlignment = this._setAlignment(ctx, x, y, baseline);\n\n var _this$_setAlignment2 = slicedToArray(_this$_setAlignment, 2);\n\n x = _this$_setAlignment2[0];\n y = _this$_setAlignment2[1];\n ctx.textAlign = 'left';\n x = x - this.size.width / 2; // Shift label 1/2-distance to the left\n\n if (this.fontOptions.valign && this.size.height > this.size.labelHeight) {\n if (this.fontOptions.valign === 'top') {\n y -= (this.size.height - this.size.labelHeight) / 2;\n }\n\n if (this.fontOptions.valign === 'bottom') {\n y += (this.size.height - this.size.labelHeight) / 2;\n }\n } // draw the text\n\n\n for (var i = 0; i < this.lineCount; i++) {\n var line = this.lines[i];\n\n if (line && line.blocks) {\n var width = 0;\n\n if (this.isEdgeLabel || this.fontOptions.align === 'center') {\n width += (this.size.width - line.width) / 2;\n } else if (this.fontOptions.align === 'right') {\n width += this.size.width - line.width;\n }\n\n for (var j = 0; j < line.blocks.length; j++) {\n var block = line.blocks[j];\n ctx.font = block.font;\n\n var _this$_getColor = this._getColor(block.color, viewFontSize, block.strokeColor),\n _this$_getColor2 = slicedToArray(_this$_getColor, 2),\n fontColor = _this$_getColor2[0],\n strokeColor = _this$_getColor2[1];\n\n if (block.strokeWidth > 0) {\n ctx.lineWidth = block.strokeWidth;\n ctx.strokeStyle = strokeColor;\n ctx.lineJoin = 'round';\n }\n\n ctx.fillStyle = fontColor;\n\n if (block.strokeWidth > 0) {\n ctx.strokeText(block.text, x + width, y + block.vadjust);\n }\n\n ctx.fillText(block.text, x + width, y + block.vadjust);\n width += block.width;\n }\n\n y += line.height;\n }\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {string} baseline\n * @returns {Array.}\n * @private\n */\n\n }, {\n key: \"_setAlignment\",\n value: function _setAlignment(ctx, x, y, baseline) {\n // check for label alignment (for edges)\n // TODO: make alignment for nodes\n if (this.isEdgeLabel && this.fontOptions.align !== 'horizontal' && this.pointToSelf === false) {\n x = 0;\n y = 0;\n var lineMargin = 2;\n\n if (this.fontOptions.align === 'top') {\n ctx.textBaseline = 'alphabetic';\n y -= 2 * lineMargin; // distance from edge, required because we use alphabetic. Alphabetic has less difference between browsers\n } else if (this.fontOptions.align === 'bottom') {\n ctx.textBaseline = 'hanging';\n y += 2 * lineMargin; // distance from edge, required because we use hanging. Hanging has less difference between browsers\n } else {\n ctx.textBaseline = 'middle';\n }\n } else {\n ctx.textBaseline = baseline;\n }\n\n return [x, y];\n }\n /**\n * fade in when relative scale is between threshold and threshold - 1.\n * If the relative scale would be smaller than threshold -1 the draw function would have returned before coming here.\n *\n * @param {string} color The font color to use\n * @param {number} viewFontSize\n * @param {string} initialStrokeColor\n * @returns {Array.} An array containing the font color and stroke color\n * @private\n */\n\n }, {\n key: \"_getColor\",\n value: function _getColor(color, viewFontSize, initialStrokeColor) {\n var fontColor = color || '#000000';\n var strokeColor = initialStrokeColor || '#ffffff';\n\n if (viewFontSize <= this.elementOptions.scaling.label.drawThreshold) {\n var opacity = Math.max(0, Math.min(1, 1 - (this.elementOptions.scaling.label.drawThreshold - viewFontSize)));\n fontColor = overrideOpacity(fontColor, opacity);\n strokeColor = overrideOpacity(strokeColor, opacity);\n }\n\n return [fontColor, strokeColor];\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {{width: number, height: number}}\n */\n\n }, {\n key: \"getTextSize\",\n value: function getTextSize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n this._processLabel(ctx, selected, hover);\n\n return {\n width: this.size.width,\n height: this.size.height,\n lineCount: this.lineCount\n };\n }\n /**\n * Get the current dimensions of the label\n *\n * @return {rect}\n */\n\n }, {\n key: \"getSize\",\n value: function getSize() {\n var lineMargin = 2;\n var x = this.size.left; // default values which might be overridden below\n\n var y = this.size.top - 0.5 * lineMargin; // idem\n\n if (this.isEdgeLabel) {\n var x2 = -this.size.width * 0.5;\n\n switch (this.fontOptions.align) {\n case 'middle':\n x = x2;\n y = -this.size.height * 0.5;\n break;\n\n case 'top':\n x = x2;\n y = -(this.size.height + lineMargin);\n break;\n\n case 'bottom':\n x = x2;\n y = lineMargin;\n break;\n }\n }\n\n var ret = {\n left: x,\n top: y,\n width: this.size.width,\n height: this.size.height\n };\n return ret;\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {number} [x=0]\n * @param {number} [y=0]\n * @param {'middle'|'hanging'} [baseline='middle']\n */\n\n }, {\n key: \"calculateLabelSize\",\n value: function calculateLabelSize(ctx, selected, hover) {\n var x = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var y = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var baseline = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'middle';\n\n this._processLabel(ctx, selected, hover);\n\n this.size.left = x - this.size.width * 0.5;\n this.size.top = y - this.size.height * 0.5;\n this.size.yLine = y + (1 - this.lineCount) * 0.5 * this.fontOptions.size;\n\n if (baseline === \"hanging\") {\n this.size.top += 0.5 * this.fontOptions.size;\n this.size.top += 4; // distance from node, required because we use hanging. Hanging has less difference between browsers\n\n this.size.yLine += 4; // distance from node\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} mod\n * @returns {{color, size, face, mod, vadjust, strokeWidth: *, strokeColor: (*|string|allOptions.edges.font.strokeColor|{string}|allOptions.nodes.font.strokeColor|Array)}}\n */\n\n }, {\n key: \"getFormattingValues\",\n value: function getFormattingValues(ctx, selected, hover, mod) {\n var getValue = function getValue(fontOptions, mod, option) {\n if (mod === \"normal\") {\n if (option === 'mod') return \"\";\n return fontOptions[option];\n }\n\n if (fontOptions[mod][option] !== undefined) {\n // Grumbl leaving out test on undefined equals false for \"\" \n return fontOptions[mod][option];\n } else {\n // Take from parent font option\n return fontOptions[option];\n }\n };\n\n var values = {\n color: getValue(this.fontOptions, mod, 'color'),\n size: getValue(this.fontOptions, mod, 'size'),\n face: getValue(this.fontOptions, mod, 'face'),\n mod: getValue(this.fontOptions, mod, 'mod'),\n vadjust: getValue(this.fontOptions, mod, 'vadjust'),\n strokeWidth: this.fontOptions.strokeWidth,\n strokeColor: this.fontOptions.strokeColor\n };\n\n if (selected || hover) {\n if (mod === \"normal\" && this.fontOptions.chooser === true && this.elementOptions.labelHighlightBold) {\n values.mod = 'bold';\n } else {\n if (typeof this.fontOptions.chooser === 'function') {\n this.fontOptions.chooser(values, this.elementOptions.id, selected, hover);\n }\n }\n }\n\n var fontString = \"\";\n\n if (values.mod !== undefined && values.mod !== \"\") {\n // safeguard for undefined - this happened\n fontString += values.mod + \" \";\n }\n\n fontString += values.size + \"px \" + values.face;\n ctx.font = fontString.replace(/\"/g, \"\");\n values.font = ctx.font;\n values.height = values.size;\n return values;\n }\n /**\n *\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {boolean}\n */\n\n }, {\n key: \"differentState\",\n value: function differentState(selected, hover) {\n return selected !== this.selectedState || hover !== this.hoverState;\n }\n /**\n * This explodes the passed text into lines and determines the width, height and number of lines.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} inText the text to explode\n * @returns {{width, height, lines}|*}\n * @private\n */\n\n }, {\n key: \"_processLabelText\",\n value: function _processLabelText(ctx, selected, hover, inText) {\n var splitter = new LabelSplitter(ctx, this, selected, hover);\n return splitter.process(inText);\n }\n /**\n * This explodes the label string into lines and sets the width, height and number of lines.\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n\n }, {\n key: \"_processLabel\",\n value: function _processLabel(ctx, selected, hover) {\n if (this.labelDirty === false && !this.differentState(selected, hover)) return;\n\n var state = this._processLabelText(ctx, selected, hover, this.elementOptions.label);\n\n if (this.fontOptions.minWdt > 0 && state.width < this.fontOptions.minWdt) {\n state.width = this.fontOptions.minWdt;\n }\n\n this.size.labelHeight = state.height;\n\n if (this.fontOptions.minHgt > 0 && state.height < this.fontOptions.minHgt) {\n state.height = this.fontOptions.minHgt;\n }\n\n this.lines = state.lines;\n this.lineCount = state.lines.length;\n this.size.width = state.width;\n this.size.height = state.height;\n this.selectedState = selected;\n this.hoverState = hover;\n this.labelDirty = false;\n }\n /**\n * Check if this label is visible\n *\n * @return {boolean} true if this label will be show, false otherwise\n */\n\n }, {\n key: \"visible\",\n value: function visible() {\n if (this.size.width === 0 || this.size.height === 0 || this.elementOptions.label === undefined) {\n return false; // nothing to display\n }\n\n var viewFontSize = this.fontOptions.size * this.body.view.scale;\n\n if (viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) {\n return false; // Too small or too far away to show\n }\n\n return true;\n }\n }], [{\n key: \"parseFontString\",\n value: function parseFontString(outOptions, inOptions) {\n if (!inOptions || typeof inOptions !== 'string') return false;\n var newOptionsArray = inOptions.split(\" \");\n outOptions.size = +newOptionsArray[0].replace(\"px\", '');\n outOptions.face = newOptionsArray[1];\n outOptions.color = newOptionsArray[2];\n return true;\n }\n }]);\n\n return Label;\n}();\n\n// https://tc39.github.io/ecma262/#sec-array.prototype.fill\n\n\nvar arrayFill = function fill(value\n/* , start = 0, end = @length */\n) {\n var O = toObject(this);\n var length = toLength(O.length);\n var argumentsLength = arguments.length;\n var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n var end = argumentsLength > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n\n while (endPos > index) O[index++] = value;\n\n return O;\n};\n\n// https://tc39.github.io/ecma262/#sec-array.prototype.fill\n\n_export({\n target: 'Array',\n proto: true\n}, {\n fill: arrayFill\n}); // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\n\nvar fill = entryVirtual('Array').fill;\n\nvar ArrayPrototype$g = Array.prototype;\n\nvar fill_1 = function (it) {\n var own = it.fill;\n return it === ArrayPrototype$g || it instanceof Array && own === ArrayPrototype$g.fill ? fill : own;\n};\n\nvar fill$1 = fill_1;\n\nvar fill$2 = fill$1;\n\n/**\n * The Base class for all Nodes.\n */\nvar NodeBase = /*#__PURE__*/function () {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function NodeBase(options, body, labelModule) {\n classCallCheck(this, NodeBase);\n\n this.body = body;\n this.labelModule = labelModule;\n this.setOptions(options);\n this.top = undefined;\n this.left = undefined;\n this.height = undefined;\n this.width = undefined;\n this.radius = undefined;\n this.margin = undefined;\n this.refreshNeeded = true;\n this.boundingBox = {\n top: 0,\n left: 0,\n right: 0,\n bottom: 0\n };\n }\n /**\n *\n * @param {Object} options\n */\n\n\n createClass(NodeBase, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n }\n /**\n *\n * @param {Label} labelModule\n * @private\n */\n\n }, {\n key: \"_setMargins\",\n value: function _setMargins(labelModule) {\n this.margin = {};\n\n if (this.options.margin) {\n if (_typeof_1(this.options.margin) == 'object') {\n this.margin.top = this.options.margin.top;\n this.margin.right = this.options.margin.right;\n this.margin.bottom = this.options.margin.bottom;\n this.margin.left = this.options.margin.left;\n } else {\n this.margin.top = this.options.margin;\n this.margin.right = this.options.margin;\n this.margin.bottom = this.options.margin;\n this.margin.left = this.options.margin;\n }\n }\n\n labelModule.adjustSizes(this.margin);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_distanceToBorder\",\n value: function _distanceToBorder(ctx, angle) {\n var borderWidth = this.options.borderWidth;\n\n if (ctx) {\n this.resize(ctx);\n }\n\n return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth;\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"enableShadow\",\n value: function enableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"disableShadow\",\n value: function disableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = 'rgba(0,0,0,0)';\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"enableBorderDashes\",\n value: function enableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n var dashes = values.borderDashes;\n\n if (dashes === true) {\n dashes = [5, 15];\n }\n\n ctx.setLineDash(dashes);\n } else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"disableBorderDashes\",\n value: function disableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([0]);\n } else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n /**\n * Determine if the shape of a node needs to be recalculated.\n *\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {boolean}\n * @protected\n */\n\n }, {\n key: \"needsRefresh\",\n value: function needsRefresh(selected, hover) {\n if (this.refreshNeeded === true) {\n // This is probably not the best location to reset this member.\n // However, in the current logic, it is the most convenient one.\n this.refreshNeeded = false;\n return true;\n }\n\n return this.width === undefined || this.labelModule.differentState(selected, hover);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"initContextForDraw\",\n value: function initContextForDraw(ctx, values) {\n var borderWidth = values.borderWidth / this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, borderWidth);\n ctx.strokeStyle = values.borderColor;\n ctx.fillStyle = values.color;\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"performStroke\",\n value: function performStroke(ctx, values) {\n var borderWidth = values.borderWidth / this.body.view.scale; //draw dashed border if enabled, save and restore is required for firefox not to crash on unix.\n\n ctx.save(); // if borders are zero width, they will be drawn with width 1 by default. This prevents that\n\n if (borderWidth > 0) {\n this.enableBorderDashes(ctx, values); //draw the border\n\n ctx.stroke(); //disable dashed border for other elements\n\n this.disableBorderDashes(ctx, values);\n }\n\n ctx.restore();\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"performFill\",\n value: function performFill(ctx, values) {\n ctx.save();\n ctx.fillStyle = values.color; // draw shadow if enabled\n\n this.enableShadow(ctx, values); // draw the background\n\n fill$2(ctx).call(ctx); // disable shadows for other elements.\n\n\n this.disableShadow(ctx, values);\n ctx.restore();\n this.performStroke(ctx, values);\n }\n /**\n *\n * @param {number} margin\n * @private\n */\n\n }, {\n key: \"_addBoundingBoxMargin\",\n value: function _addBoundingBoxMargin(margin) {\n this.boundingBox.left -= margin;\n this.boundingBox.top -= margin;\n this.boundingBox.bottom += margin;\n this.boundingBox.right += margin;\n }\n /**\n * Actual implementation of this method call.\n *\n * Doing it like this makes it easier to override\n * in the child classes.\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n\n }, {\n key: \"_updateBoundingBox\",\n value: function _updateBoundingBox(x, y, ctx, selected, hover) {\n if (ctx !== undefined) {\n this.resize(ctx, selected, hover);\n }\n\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this.boundingBox.left = this.left;\n this.boundingBox.top = this.top;\n this.boundingBox.bottom = this.top + this.height;\n this.boundingBox.right = this.left + this.width;\n }\n /**\n * Default implementation of this method call.\n * This acts as a stub which can be overridden.\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n\n }, {\n key: \"updateBoundingBox\",\n value: function updateBoundingBox(x, y, ctx, selected, hover) {\n this._updateBoundingBox(x, y, ctx, selected, hover);\n }\n /**\n * Determine the dimensions to use for nodes with an internal label\n *\n * Currently, these are: Circle, Ellipse, Database, Box\n * The other nodes have external labels, and will not call this method\n *\n * If there is no label, decent default values are supplied.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n * @returns {{width:number, height:number}}\n */\n\n }, {\n key: \"getDimensionsFromLabel\",\n value: function getDimensionsFromLabel(ctx, selected, hover) {\n // NOTE: previously 'textSize' was not put in 'this' for Ellipse\n // TODO: examine the consequences.\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n var width = this.textSize.width;\n var height = this.textSize.height;\n var DEFAULT_SIZE = 14;\n\n if (width === 0) {\n // This happens when there is no label text set\n width = DEFAULT_SIZE; // use a decent default\n\n height = DEFAULT_SIZE; // if width zero, then height also always zero\n }\n\n return {\n width: width,\n height: height\n };\n }\n }]);\n\n return NodeBase;\n}();\n\nfunction _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$1() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A Box Node/Cluster shape.\n *\n * @extends NodeBase\n */\n\nvar Box = /*#__PURE__*/function (_NodeBase) {\n inherits(Box, _NodeBase);\n\n var _super = _createSuper$1(Box);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function Box(options, body, labelModule) {\n var _this;\n\n classCallCheck(this, Box);\n\n _this = _super.call(this, options, body, labelModule);\n\n _this._setMargins(labelModule);\n\n return _this;\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n\n\n createClass(Box, [{\n key: \"resize\",\n value: function resize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n this.width = dimensions.width + this.margin.right + this.margin.left;\n this.height = dimensions.height + this.margin.top + this.margin.bottom;\n this.radius = this.width / 2;\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this.initContextForDraw(ctx, values);\n drawRoundRect(ctx, this.left, this.top, this.width, this.height, values.borderRadius);\n this.performFill(ctx, values);\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n /**\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n\n }, {\n key: \"updateBoundingBox\",\n value: function updateBoundingBox(x, y, ctx, selected, hover) {\n this._updateBoundingBox(x, y, ctx, selected, hover);\n\n var borderRadius = this.options.shapeProperties.borderRadius; // only effective for box\n\n this._addBoundingBoxMargin(borderRadius);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n if (ctx) {\n this.resize(ctx);\n }\n\n var borderWidth = this.options.borderWidth;\n return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth;\n }\n }]);\n\n return Box;\n}(NodeBase);\n\nfunction _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$2() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * NOTE: This is a bad base class\n *\n * Child classes are:\n *\n * Image - uses *only* image methods\n * Circle - uses *only* _drawRawCircle\n * CircleImage - uses all\n *\n * TODO: Refactor, move _drawRawCircle to different module, derive Circle from NodeBase\n * Rename this to ImageBase\n * Consolidate common code in Image and CircleImage to base class\n *\n * @extends NodeBase\n */\n\nvar CircleImageBase = /*#__PURE__*/function (_NodeBase) {\n inherits(CircleImageBase, _NodeBase);\n\n var _super = _createSuper$2(CircleImageBase);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function CircleImageBase(options, body, labelModule) {\n var _this;\n\n classCallCheck(this, CircleImageBase);\n\n _this = _super.call(this, options, body, labelModule);\n _this.labelOffset = 0;\n _this.selected = false;\n return _this;\n }\n /**\n *\n * @param {Object} options\n * @param {Object} [imageObj]\n * @param {Object} [imageObjAlt]\n */\n\n\n createClass(CircleImageBase, [{\n key: \"setOptions\",\n value: function setOptions(options, imageObj, imageObjAlt) {\n this.options = options;\n\n if (!(imageObj === undefined && imageObjAlt === undefined)) {\n this.setImages(imageObj, imageObjAlt);\n }\n }\n /**\n * Set the images for this node.\n *\n * The images can be updated after the initial setting of options;\n * therefore, this method needs to be reentrant. \n *\n * For correct working in error cases, it is necessary to properly set\n * field 'nodes.brokenImage' in the options.\n *\n * @param {Image} imageObj required; main image to show for this node\n * @param {Image|undefined} imageObjAlt optional; image to show when node is selected\n */\n\n }, {\n key: \"setImages\",\n value: function setImages(imageObj, imageObjAlt) {\n if (imageObjAlt && this.selected) {\n this.imageObj = imageObjAlt;\n this.imageObjAlt = imageObj;\n } else {\n this.imageObj = imageObj;\n this.imageObjAlt = imageObjAlt;\n }\n }\n /**\n * Set selection and switch between the base and the selected image.\n *\n * Do the switch only if imageObjAlt exists.\n *\n * @param {boolean} selected value of new selected state for current node\n */\n\n }, {\n key: \"switchImages\",\n value: function switchImages(selected) {\n var selection_changed = selected && !this.selected || !selected && this.selected;\n this.selected = selected; // Remember new selection\n\n if (this.imageObjAlt !== undefined && selection_changed) {\n var imageTmp = this.imageObj;\n this.imageObj = this.imageObjAlt;\n this.imageObjAlt = imageTmp;\n }\n }\n /**\n * Returns Image Padding from node options\n *\n * @returns {{top: number,left: number,bottom: number,right: number}} image padding inside this shape\n * @private\n */\n\n }, {\n key: \"_getImagePadding\",\n value: function _getImagePadding() {\n var imgPadding = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n\n if (this.options.imagePadding) {\n var optImgPadding = this.options.imagePadding;\n\n if (_typeof_1(optImgPadding) == 'object') {\n imgPadding.top = optImgPadding.top;\n imgPadding.right = optImgPadding.right;\n imgPadding.bottom = optImgPadding.bottom;\n imgPadding.left = optImgPadding.left;\n } else {\n imgPadding.top = optImgPadding;\n imgPadding.right = optImgPadding;\n imgPadding.bottom = optImgPadding;\n imgPadding.left = optImgPadding;\n }\n }\n\n return imgPadding;\n }\n /**\n * Adjust the node dimensions for a loaded image.\n *\n * Pre: this.imageObj is valid\n */\n\n }, {\n key: \"_resizeImage\",\n value: function _resizeImage() {\n var width, height;\n\n if (this.options.shapeProperties.useImageSize === false) {\n // Use the size property\n var ratio_width = 1;\n var ratio_height = 1; // Only calculate the proper ratio if both width and height not zero\n\n if (this.imageObj.width && this.imageObj.height) {\n if (this.imageObj.width > this.imageObj.height) {\n ratio_width = this.imageObj.width / this.imageObj.height;\n } else {\n ratio_height = this.imageObj.height / this.imageObj.width;\n }\n }\n\n width = this.options.size * 2 * ratio_width;\n height = this.options.size * 2 * ratio_height;\n } else {\n // Use the image size with image padding\n var imgPadding = this._getImagePadding();\n\n width = this.imageObj.width + imgPadding.left + imgPadding.right;\n height = this.imageObj.height + imgPadding.top + imgPadding.bottom;\n }\n\n this.width = width;\n this.height = height;\n this.radius = 0.5 * this.width;\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {ArrowOptions} values\n * @private\n */\n\n }, {\n key: \"_drawRawCircle\",\n value: function _drawRawCircle(ctx, x, y, values) {\n this.initContextForDraw(ctx, values);\n drawCircle(ctx, x, y, values.size);\n this.performFill(ctx, values);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @private\n */\n\n }, {\n key: \"_drawImageAtPosition\",\n value: function _drawImageAtPosition(ctx, values) {\n if (this.imageObj.width != 0) {\n // draw the image\n ctx.globalAlpha = values.opacity !== undefined ? values.opacity : 1; // draw shadow if enabled\n\n this.enableShadow(ctx, values);\n var factor = 1;\n\n if (this.options.shapeProperties.interpolation === true) {\n factor = this.imageObj.width / this.width / this.body.view.scale;\n }\n\n var imgPadding = this._getImagePadding();\n\n var imgPosLeft = this.left + imgPadding.left;\n var imgPosTop = this.top + imgPadding.top;\n var imgWidth = this.width - imgPadding.left - imgPadding.right;\n var imgHeight = this.height - imgPadding.top - imgPadding.bottom;\n this.imageObj.drawImageAtPosition(ctx, factor, imgPosLeft, imgPosTop, imgWidth, imgHeight); // disable shadows for other elements.\n\n this.disableShadow(ctx, values);\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n\n }, {\n key: \"_drawImageLabel\",\n value: function _drawImageLabel(ctx, x, y, selected, hover) {\n var offset = 0;\n\n if (this.height !== undefined) {\n offset = this.height * 0.5;\n var labelDimensions = this.labelModule.getTextSize(ctx, selected, hover);\n\n if (labelDimensions.lineCount >= 1) {\n offset += labelDimensions.height / 2;\n }\n }\n\n var yLabel = y + offset;\n\n if (this.options.label) {\n this.labelOffset = offset;\n }\n\n this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging');\n }\n }]);\n\n return CircleImageBase;\n}(NodeBase);\n\nfunction _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$3() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A Circle Node/Cluster shape.\n *\n * @extends CircleImageBase\n */\n\nvar Circle = /*#__PURE__*/function (_CircleImageBase) {\n inherits(Circle, _CircleImageBase);\n\n var _super = _createSuper$3(Circle);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function Circle(options, body, labelModule) {\n var _this;\n\n classCallCheck(this, Circle);\n\n _this = _super.call(this, options, body, labelModule);\n\n _this._setMargins(labelModule);\n\n return _this;\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n\n\n createClass(Circle, [{\n key: \"resize\",\n value: function resize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n var diameter = Math.max(dimensions.width + this.margin.right + this.margin.left, dimensions.height + this.margin.top + this.margin.bottom);\n this.options.size = diameter / 2; // NOTE: this size field only set here, not in Ellipse, Database, Box\n\n this.width = diameter;\n this.height = diameter;\n this.radius = this.width / 2;\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this._drawRawCircle(ctx, x, y, values);\n\n this.updateBoundingBox(x, y);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, y, selected, hover);\n }\n /**\n *\n * @param {number} x width\n * @param {number} y height\n */\n\n }, {\n key: \"updateBoundingBox\",\n value: function updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle - Unused\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n // eslint-disable-line no-unused-vars\n if (ctx) {\n this.resize(ctx);\n }\n\n return this.width * 0.5;\n }\n }]);\n\n return Circle;\n}(CircleImageBase);\n\nfunction _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$4() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A CircularImage Node/Cluster shape.\n *\n * @extends CircleImageBase\n */\n\nvar CircularImage = /*#__PURE__*/function (_CircleImageBase) {\n inherits(CircularImage, _CircleImageBase);\n\n var _super = _createSuper$4(CircularImage);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n * @param {Image} imageObj\n * @param {Image} imageObjAlt\n */\n function CircularImage(options, body, labelModule, imageObj, imageObjAlt) {\n var _this;\n\n classCallCheck(this, CircularImage);\n\n _this = _super.call(this, options, body, labelModule);\n\n _this.setImages(imageObj, imageObjAlt);\n\n return _this;\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n\n\n createClass(CircularImage, [{\n key: \"resize\",\n value: function resize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n var imageAbsent = this.imageObj.src === undefined || this.imageObj.width === undefined || this.imageObj.height === undefined;\n\n if (imageAbsent) {\n var diameter = this.options.size * 2;\n this.width = diameter;\n this.height = diameter;\n this.radius = 0.5 * this.width;\n return;\n } // At this point, an image is present, i.e. this.imageObj is valid.\n\n\n if (this.needsRefresh(selected, hover)) {\n this._resizeImage();\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this.switchImages(selected);\n this.resize();\n var labelX = x,\n labelY = y;\n\n if (this.options.shapeProperties.coordinateOrigin === 'top-left') {\n this.left = x;\n this.top = y;\n labelX += this.width / 2;\n labelY += this.height / 2;\n } else {\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n } // draw the background circle. IMPORTANT: the stroke in this method is used by the clip method below.\n\n\n this._drawRawCircle(ctx, labelX, labelY, values); // now we draw in the circle, we save so we can revert the clip operation after drawing.\n\n\n ctx.save(); // clip is used to use the stroke in drawRawCircle as an area that we can draw in.\n\n ctx.clip(); // draw the image\n\n this._drawImageAtPosition(ctx, values); // restore so we can again draw on the full canvas\n\n\n ctx.restore();\n\n this._drawImageLabel(ctx, labelX, labelY, selected, hover);\n\n this.updateBoundingBox(x, y);\n } // TODO: compare with Circle.updateBoundingBox(), consolidate? More stuff is happening here\n\n /**\n *\n * @param {number} x width\n * @param {number} y height\n */\n\n }, {\n key: \"updateBoundingBox\",\n value: function updateBoundingBox(x, y) {\n if (this.options.shapeProperties.coordinateOrigin === 'top-left') {\n this.boundingBox.top = y;\n this.boundingBox.left = x;\n this.boundingBox.right = x + this.options.size * 2;\n this.boundingBox.bottom = y + this.options.size * 2;\n } else {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n } // TODO: compare with Image.updateBoundingBox(), consolidate?\n\n\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle - Unused\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n // eslint-disable-line no-unused-vars\n if (ctx) {\n this.resize(ctx);\n }\n\n return this.width * 0.5;\n }\n }]);\n\n return CircularImage;\n}(CircleImageBase);\n\nfunction ownKeys$5(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); if (enumerableOnly) symbols = filter$2(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context; forEach$2(_context = ownKeys$5(Object(source), true)).call(_context, function (key) { defineProperty$7(target, key, source[key]); }); } else if (getOwnPropertyDescriptors$2) { defineProperties$1(target, getOwnPropertyDescriptors$2(source)); } else { var _context2; forEach$2(_context2 = ownKeys$5(Object(source))).call(_context2, function (key) { defineProperty$2(target, key, getOwnPropertyDescriptor$3(source, key)); }); } } return target; }\n\nfunction _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$5() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * Base class for constructing Node/Cluster Shapes.\n *\n * @extends NodeBase\n */\n\nvar ShapeBase = /*#__PURE__*/function (_NodeBase) {\n inherits(ShapeBase, _NodeBase);\n\n var _super = _createSuper$5(ShapeBase);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function ShapeBase(options, body, labelModule) {\n classCallCheck(this, ShapeBase);\n\n return _super.call(this, options, body, labelModule);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n * @param {Object} [values={size: this.options.size}]\n */\n\n\n createClass(ShapeBase, [{\n key: \"resize\",\n value: function resize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n var values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {\n size: this.options.size\n };\n\n if (this.needsRefresh(selected, hover)) {\n this.labelModule.getTextSize(ctx, selected, hover);\n var size = 2 * values.size;\n this.width = size;\n this.height = size;\n this.radius = 0.5 * this.width;\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} shape\n * @param {number} sizeMultiplier - Unused! TODO: Remove next major release\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @param {function} customRenderer - a custom shape renderer similar to getShape(shape) functions\n * @private\n */\n\n }, {\n key: \"_drawShape\",\n value: function _drawShape(ctx, shape, sizeMultiplier, x, y, selected, hover, values, customRenderer) {\n this.resize(ctx, selected, hover, values);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n if (shape === 'custom') {\n ctx.save();\n customRenderer({\n ctx: ctx,\n x: x,\n y: y,\n state: {\n selected: selected,\n hover: hover\n },\n style: _objectSpread$1({}, values),\n label: this.options.label\n });\n ctx.restore();\n return;\n } else {\n this.initContextForDraw(ctx, values);\n getShape(shape)(ctx, x, y, values.size);\n this.performFill(ctx, values);\n }\n\n if (this.options.icon !== undefined) {\n if (this.options.icon.code !== undefined) {\n ctx.font = (selected ? \"bold \" : \"\") + this.height / 2 + \"px \" + (this.options.icon.face || 'FontAwesome');\n ctx.fillStyle = this.options.icon.color || \"black\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n ctx.fillText(this.options.icon.code, x, y);\n }\n }\n\n if (this.options.label !== undefined) {\n // Need to call following here in order to ensure value for `this.labelModule.size.height`\n this.labelModule.calculateLabelSize(ctx, selected, hover, x, y, 'hanging');\n var yLabel = y + 0.5 * this.height + 0.5 * this.labelModule.size.height;\n this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging');\n }\n\n this.updateBoundingBox(x, y);\n }\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n\n }, {\n key: \"updateBoundingBox\",\n value: function updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height);\n }\n }\n }]);\n\n return ShapeBase;\n}(NodeBase);\n\nfunction _createSuper$6(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$6(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$6() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A CustomShape Node/Cluster shape.\n *\n * @extends ShapeBase\n */\n\nvar CustomShape = /*#__PURE__*/function (_ShapeBase) {\n inherits(CustomShape, _ShapeBase);\n\n var _super = _createSuper$6(CustomShape);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n * @param {function} ctxRenderer\n */\n function CustomShape(options, body, labelModule, ctxRenderer) {\n var _this;\n\n classCallCheck(this, CustomShape);\n\n _this = _super.call(this, options, body, labelModule, ctxRenderer);\n _this.ctxRenderer = ctxRenderer;\n return _this;\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n\n createClass(CustomShape, [{\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'custom', 4, x, y, selected, hover, values, this.ctxRenderer);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n\n return CustomShape;\n}(ShapeBase);\n\nfunction _createSuper$7(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$7(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$7() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A Database Node/Cluster shape.\n *\n * @extends NodeBase\n */\n\nvar Database = /*#__PURE__*/function (_NodeBase) {\n inherits(Database, _NodeBase);\n\n var _super = _createSuper$7(Database);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function Database(options, body, labelModule) {\n var _this;\n\n classCallCheck(this, Database);\n\n _this = _super.call(this, options, body, labelModule);\n\n _this._setMargins(labelModule);\n\n return _this;\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n\n\n createClass(Database, [{\n key: \"resize\",\n value: function resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n var size = dimensions.width + this.margin.right + this.margin.left;\n this.width = size;\n this.height = size;\n this.radius = this.width / 2;\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this.initContextForDraw(ctx, values);\n drawDatabase(ctx, x - this.width / 2, y - this.height / 2, this.width, this.height);\n this.performFill(ctx, values);\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n\n return Database;\n}(NodeBase);\n\nfunction _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$8() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A Diamond Node/Cluster shape.\n *\n * @extends ShapeBase\n */\n\nvar Diamond = /*#__PURE__*/function (_ShapeBase) {\n inherits(Diamond, _ShapeBase);\n\n var _super = _createSuper$8(Diamond);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function Diamond(options, body, labelModule) {\n classCallCheck(this, Diamond);\n\n return _super.call(this, options, body, labelModule);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n\n createClass(Diamond, [{\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'diamond', 4, x, y, selected, hover, values);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n\n return Diamond;\n}(ShapeBase);\n\nfunction _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$9() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A Dot Node/Cluster shape.\n *\n * @extends ShapeBase\n */\n\nvar Dot = /*#__PURE__*/function (_ShapeBase) {\n inherits(Dot, _ShapeBase);\n\n var _super = _createSuper$9(Dot);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function Dot(options, body, labelModule) {\n classCallCheck(this, Dot);\n\n return _super.call(this, options, body, labelModule);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n\n createClass(Dot, [{\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'circle', 2, x, y, selected, hover, values);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n // eslint-disable-line no-unused-vars\n if (ctx) {\n this.resize(ctx);\n }\n\n return this.options.size;\n }\n }]);\n\n return Dot;\n}(ShapeBase);\n\nfunction _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$a() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * Am Ellipse Node/Cluster shape.\n *\n * @extends NodeBase\n */\n\nvar Ellipse = /*#__PURE__*/function (_NodeBase) {\n inherits(Ellipse, _NodeBase);\n\n var _super = _createSuper$a(Ellipse);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function Ellipse(options, body, labelModule) {\n classCallCheck(this, Ellipse);\n\n return _super.call(this, options, body, labelModule);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n\n\n createClass(Ellipse, [{\n key: \"resize\",\n value: function resize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n this.height = dimensions.height * 2;\n this.width = dimensions.width + dimensions.height;\n this.radius = 0.5 * this.width;\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width * 0.5;\n this.top = y - this.height * 0.5;\n this.initContextForDraw(ctx, values);\n drawEllipse(ctx, this.left, this.top, this.width, this.height);\n this.performFill(ctx, values);\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, x, y, selected, hover);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n if (ctx) {\n this.resize(ctx);\n }\n\n var a = this.width * 0.5;\n var b = this.height * 0.5;\n var w = Math.sin(angle) * a;\n var h = Math.cos(angle) * b;\n return a * b / Math.sqrt(w * w + h * h);\n }\n }]);\n\n return Ellipse;\n}(NodeBase);\n\nfunction _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$b() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * An icon replacement for the default Node shape.\n *\n * @extends NodeBase\n */\n\nvar Icon = /*#__PURE__*/function (_NodeBase) {\n inherits(Icon, _NodeBase);\n\n var _super = _createSuper$b(Icon);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function Icon(options, body, labelModule) {\n var _this;\n\n classCallCheck(this, Icon);\n\n _this = _super.call(this, options, body, labelModule);\n\n _this._setMargins(labelModule);\n\n return _this;\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx - Unused.\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n\n\n createClass(Icon, [{\n key: \"resize\",\n value: function resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n this.iconSize = {\n width: Number(this.options.icon.size),\n height: Number(this.options.icon.size)\n };\n this.width = this.iconSize.width + this.margin.right + this.margin.left;\n this.height = this.iconSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5 * this.width;\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.options.icon.size = this.options.icon.size || 50;\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this._icon(ctx, x, y, selected, hover, values);\n\n if (this.options.label !== undefined) {\n var iconTextSpacing = 5;\n this.labelModule.draw(ctx, this.left + this.iconSize.width / 2 + this.margin.left, y + this.height / 2 + iconTextSpacing, selected);\n }\n\n this.updateBoundingBox(x, y);\n }\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n\n }, {\n key: \"updateBoundingBox\",\n value: function updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.icon.size * 0.5;\n this.boundingBox.left = x - this.options.icon.size * 0.5;\n this.boundingBox.right = x + this.options.icon.size * 0.5;\n this.boundingBox.bottom = y + this.options.icon.size * 0.5;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n var iconTextSpacing = 5;\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height + iconTextSpacing);\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover - Unused\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"_icon\",\n value: function _icon(ctx, x, y, selected, hover, values) {\n var iconSize = Number(this.options.icon.size);\n\n if (this.options.icon.code !== undefined) {\n ctx.font = [this.options.icon.weight != null ? this.options.icon.weight : selected ? \"bold\" : \"\", // If the weight is forced (for example to make Font Awesome 5 work\n // properly) substitute slightly bigger size for bold font face.\n (this.options.icon.weight != null && selected ? 5 : 0) + iconSize + \"px\", this.options.icon.face].join(\" \"); // draw icon\n\n ctx.fillStyle = this.options.icon.color || \"black\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\"; // draw shadow if enabled\n\n this.enableShadow(ctx, values);\n ctx.fillText(this.options.icon.code, x, y); // disable shadows for other elements.\n\n this.disableShadow(ctx, values);\n } else {\n console.error('When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.');\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n\n return Icon;\n}(NodeBase);\n\nfunction _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$c() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * An image-based replacement for the default Node shape.\n *\n * @extends CircleImageBase\n */\n\nvar Image$1 = /*#__PURE__*/function (_CircleImageBase) {\n inherits(Image, _CircleImageBase);\n\n var _super = _createSuper$c(Image);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n * @param {Image} imageObj\n * @param {Image} imageObjAlt\n */\n function Image(options, body, labelModule, imageObj, imageObjAlt) {\n var _this;\n\n classCallCheck(this, Image);\n\n _this = _super.call(this, options, body, labelModule);\n\n _this.setImages(imageObj, imageObjAlt);\n\n return _this;\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx - Unused.\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n\n\n createClass(Image, [{\n key: \"resize\",\n value: function resize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n var imageAbsent = this.imageObj.src === undefined || this.imageObj.width === undefined || this.imageObj.height === undefined;\n\n if (imageAbsent) {\n var side = this.options.size * 2;\n this.width = side;\n this.height = side;\n return;\n }\n\n if (this.needsRefresh(selected, hover)) {\n this._resizeImage();\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n ctx.save();\n this.switchImages(selected);\n this.resize();\n var labelX = x,\n labelY = y;\n\n if (this.options.shapeProperties.coordinateOrigin === 'top-left') {\n this.left = x;\n this.top = y;\n labelX += this.width / 2;\n labelY += this.height / 2;\n } else {\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n }\n\n if (this.options.shapeProperties.useBorderWithImage === true) {\n var neutralborderWidth = this.options.borderWidth;\n var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth;\n var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, borderWidth);\n ctx.beginPath();\n var strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border;\n var fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background;\n\n if (values.opacity !== undefined) {\n strokeStyle = overrideOpacity(strokeStyle, values.opacity);\n fillStyle = overrideOpacity(fillStyle, values.opacity);\n } // setup the line properties.\n\n\n ctx.strokeStyle = strokeStyle; // set a fillstyle\n\n ctx.fillStyle = fillStyle; // draw a rectangle to form the border around. This rectangle is filled so the opacity of a picture (in future vis releases?) can be used to tint the image\n\n ctx.rect(this.left - 0.5 * ctx.lineWidth, this.top - 0.5 * ctx.lineWidth, this.width + ctx.lineWidth, this.height + ctx.lineWidth);\n\n fill$2(ctx).call(ctx);\n\n this.performStroke(ctx, values);\n ctx.closePath();\n }\n\n this._drawImageAtPosition(ctx, values);\n\n this._drawImageLabel(ctx, labelX, labelY, selected, hover);\n\n this.updateBoundingBox(x, y);\n ctx.restore();\n }\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n\n }, {\n key: \"updateBoundingBox\",\n value: function updateBoundingBox(x, y) {\n this.resize();\n\n if (this.options.shapeProperties.coordinateOrigin === 'top-left') {\n this.left = x;\n this.top = y;\n } else {\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n }\n\n this.boundingBox.left = this.left;\n this.boundingBox.top = this.top;\n this.boundingBox.bottom = this.top + this.height;\n this.boundingBox.right = this.left + this.width;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n\n return Image;\n}(CircleImageBase);\n\nfunction _createSuper$d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$d(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$d() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A Square Node/Cluster shape.\n *\n * @extends ShapeBase\n */\n\nvar Square = /*#__PURE__*/function (_ShapeBase) {\n inherits(Square, _ShapeBase);\n\n var _super = _createSuper$d(Square);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function Square(options, body, labelModule) {\n classCallCheck(this, Square);\n\n return _super.call(this, options, body, labelModule);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n\n createClass(Square, [{\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'square', 2, x, y, selected, hover, values);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n\n return Square;\n}(ShapeBase);\n\nfunction _createSuper$e(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$e(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$e() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A Hexagon Node/Cluster shape.\n *\n * @extends ShapeBase\n */\n\nvar Hexagon = /*#__PURE__*/function (_ShapeBase) {\n inherits(Hexagon, _ShapeBase);\n\n var _super = _createSuper$e(Hexagon);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function Hexagon(options, body, labelModule) {\n classCallCheck(this, Hexagon);\n\n return _super.call(this, options, body, labelModule);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n\n createClass(Hexagon, [{\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'hexagon', 4, x, y, selected, hover, values);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n\n return Hexagon;\n}(ShapeBase);\n\nfunction _createSuper$f(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$f(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$f() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A Star Node/Cluster shape.\n *\n * @extends ShapeBase\n */\n\nvar Star = /*#__PURE__*/function (_ShapeBase) {\n inherits(Star, _ShapeBase);\n\n var _super = _createSuper$f(Star);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function Star(options, body, labelModule) {\n classCallCheck(this, Star);\n\n return _super.call(this, options, body, labelModule);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n\n createClass(Star, [{\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'star', 4, x, y, selected, hover, values);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n\n return Star;\n}(ShapeBase);\n\nfunction _createSuper$g(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$g(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$g() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A text-based replacement for the default Node shape.\n *\n * @extends NodeBase\n */\n\nvar Text = /*#__PURE__*/function (_NodeBase) {\n inherits(Text, _NodeBase);\n\n var _super = _createSuper$g(Text);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function Text(options, body, labelModule) {\n var _this;\n\n classCallCheck(this, Text);\n\n _this = _super.call(this, options, body, labelModule);\n\n _this._setMargins(labelModule);\n\n return _this;\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n\n\n createClass(Text, [{\n key: \"resize\",\n value: function resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n this.width = this.textSize.width + this.margin.right + this.margin.left;\n this.height = this.textSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5 * this.width;\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n }, {\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2; // draw shadow if enabled\n\n this.enableShadow(ctx, values);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover); // disable shadows for other elements.\n\n this.disableShadow(ctx, values);\n this.updateBoundingBox(x, y, ctx, selected, hover);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n\n return Text;\n}(NodeBase);\n\nfunction _createSuper$h(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$h(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$h() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A Triangle Node/Cluster shape.\n *\n * @extends ShapeBase\n */\n\nvar Triangle = /*#__PURE__*/function (_ShapeBase) {\n inherits(Triangle, _ShapeBase);\n\n var _super = _createSuper$h(Triangle);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function Triangle(options, body, labelModule) {\n classCallCheck(this, Triangle);\n\n return _super.call(this, options, body, labelModule);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n\n createClass(Triangle, [{\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'triangle', 3, x, y, selected, hover, values);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n\n return Triangle;\n}(ShapeBase);\n\nfunction _createSuper$i(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$i(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$i() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A downward facing Triangle Node/Cluster shape.\n *\n * @extends ShapeBase\n */\n\nvar TriangleDown = /*#__PURE__*/function (_ShapeBase) {\n inherits(TriangleDown, _ShapeBase);\n\n var _super = _createSuper$i(TriangleDown);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n function TriangleDown(options, body, labelModule) {\n classCallCheck(this, TriangleDown);\n\n return _super.call(this, options, body, labelModule);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n\n\n createClass(TriangleDown, [{\n key: \"draw\",\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'triangleDown', 3, x, y, selected, hover, values);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n\n return TriangleDown;\n}(ShapeBase);\n\nvar errorFound = false;\nvar allOptions;\nvar printStyle = 'background: #FFeeee; color: #dd0000';\n/**\n * Used to validate options.\n */\n\nvar Validator = /*#__PURE__*/function () {\n /**\n * @ignore\n */\n function Validator() {\n classCallCheck(this, Validator);\n }\n /**\n * Main function to be called\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {Object} subObject\n * @returns {boolean}\n * @static\n */\n\n\n createClass(Validator, null, [{\n key: \"validate\",\n value: function validate(options, referenceOptions, subObject) {\n errorFound = false;\n allOptions = referenceOptions;\n var usedOptions = referenceOptions;\n\n if (subObject !== undefined) {\n usedOptions = referenceOptions[subObject];\n }\n\n Validator.parse(options, usedOptions, []);\n return errorFound;\n }\n /**\n * Will traverse an object recursively and check every value\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {array} path | where to look for the actual option\n * @static\n */\n\n }, {\n key: \"parse\",\n value: function parse(options, referenceOptions, path) {\n for (var option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option)) {\n Validator.check(option, options, referenceOptions, path);\n }\n }\n }\n /**\n * Check every value. If the value is an object, call the parse function on that object.\n * @param {string} option\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {array} path | where to look for the actual option\n * @static\n */\n\n }, {\n key: \"check\",\n value: function check(option, options, referenceOptions, path) {\n if (referenceOptions[option] === undefined && referenceOptions.__any__ === undefined) {\n Validator.getSuggestion(option, referenceOptions, path);\n return;\n }\n\n var referenceOption = option;\n var is_object = true;\n\n if (referenceOptions[option] === undefined && referenceOptions.__any__ !== undefined) {\n // NOTE: This only triggers if the __any__ is in the top level of the options object.\n // THAT'S A REALLY BAD PLACE TO ALLOW IT!!!!\n // TODO: Examine if needed, remove if possible\n // __any__ is a wildcard. Any value is accepted and will be further analysed by reference.\n referenceOption = '__any__'; // if the any-subgroup is not a predefined object in the configurator,\n // we do not look deeper into the object.\n\n is_object = Validator.getType(options[option]) === 'object';\n }\n\n var refOptionObj = referenceOptions[referenceOption];\n\n if (is_object && refOptionObj.__type__ !== undefined) {\n refOptionObj = refOptionObj.__type__;\n }\n\n Validator.checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path);\n }\n /**\n *\n * @param {string} option | the option property\n * @param {Object} options | The supplied options object\n * @param {Object} referenceOptions | The reference options containing all options and their allowed formats\n * @param {string} referenceOption | Usually this is the same as option, except when handling an __any__ tag.\n * @param {string} refOptionObj | This is the type object from the reference options\n * @param {Array} path | where in the object is the option\n * @static\n */\n\n }, {\n key: \"checkFields\",\n value: function checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path) {\n var log = function log(message) {\n console.log('%c' + message + Validator.printLocation(path, option), printStyle);\n };\n\n var optionType = Validator.getType(options[option]);\n var refOptionType = refOptionObj[optionType];\n\n if (refOptionType !== undefined) {\n // if the type is correct, we check if it is supposed to be one of a few select values\n if (Validator.getType(refOptionType) === 'array' && indexOf$3(refOptionType).call(refOptionType, options[option]) === -1) {\n log('Invalid option detected in \"' + option + '\".' + ' Allowed values are:' + Validator.print(refOptionType) + ' not \"' + options[option] + '\". ');\n errorFound = true;\n } else if (optionType === 'object' && referenceOption !== \"__any__\") {\n path = copyAndExtendArray(path, option);\n Validator.parse(options[option], referenceOptions[referenceOption], path);\n }\n } else if (refOptionObj['any'] === undefined) {\n // type of the field is incorrect and the field cannot be any\n log('Invalid type received for \"' + option + '\". Expected: ' + Validator.print(keys$3(refOptionObj)) + '. Received [' + optionType + '] \"' + options[option] + '\"');\n errorFound = true;\n }\n }\n /**\n *\n * @param {Object|boolean|number|string|Array.|Date|Node|Moment|undefined|null} object\n * @returns {string}\n * @static\n */\n\n }, {\n key: \"getType\",\n value: function getType(object) {\n var type = _typeof_1(object);\n\n if (type === 'object') {\n if (object === null) {\n return 'null';\n }\n\n if (object instanceof Boolean) {\n return 'boolean';\n }\n\n if (object instanceof Number) {\n return 'number';\n }\n\n if (object instanceof String) {\n return 'string';\n }\n\n if (isArray$5(object)) {\n return 'array';\n }\n\n if (object instanceof Date) {\n return 'date';\n }\n\n if (object.nodeType !== undefined) {\n return 'dom';\n }\n\n if (object._isAMomentObject === true) {\n return 'moment';\n }\n\n return 'object';\n } else if (type === 'number') {\n return 'number';\n } else if (type === 'boolean') {\n return 'boolean';\n } else if (type === 'string') {\n return 'string';\n } else if (type === undefined) {\n return 'undefined';\n }\n\n return type;\n }\n /**\n * @param {string} option\n * @param {Object} options\n * @param {Array.} path\n * @static\n */\n\n }, {\n key: \"getSuggestion\",\n value: function getSuggestion(option, options, path) {\n var localSearch = Validator.findInOptions(option, options, path, false);\n var globalSearch = Validator.findInOptions(option, allOptions, [], true);\n var localSearchThreshold = 8;\n var globalSearchThreshold = 4;\n var msg;\n\n if (localSearch.indexMatch !== undefined) {\n msg = ' in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was incomplete? Did you mean: \"' + localSearch.indexMatch + '\"?\\n\\n';\n } else if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) {\n msg = ' in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was misplaced? Matching option found at: ' + Validator.printLocation(globalSearch.path, globalSearch.closestMatch, '');\n } else if (localSearch.distance <= localSearchThreshold) {\n msg = '. Did you mean \"' + localSearch.closestMatch + '\"?' + Validator.printLocation(localSearch.path, option);\n } else {\n msg = '. Did you mean one of these: ' + Validator.print(keys$3(options)) + Validator.printLocation(path, option);\n }\n\n console.log('%cUnknown option detected: \"' + option + '\"' + msg, printStyle);\n errorFound = true;\n }\n /**\n * traverse the options in search for a match.\n * @param {string} option\n * @param {Object} options\n * @param {Array} path | where to look for the actual option\n * @param {boolean} [recursive=false]\n * @returns {{closestMatch: string, path: Array, distance: number}}\n * @static\n */\n\n }, {\n key: \"findInOptions\",\n value: function findInOptions(option, options, path) {\n var recursive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var min = 1e9;\n var closestMatch = '';\n var closestMatchPath = [];\n var lowerCaseOption = option.toLowerCase();\n var indexMatch = undefined;\n\n for (var op in options) {\n // eslint-disable-line guard-for-in\n var distance = void 0;\n\n if (options[op].__type__ !== undefined && recursive === true) {\n var result = Validator.findInOptions(option, options[op], copyAndExtendArray(path, op));\n\n if (min > result.distance) {\n closestMatch = result.closestMatch;\n closestMatchPath = result.path;\n min = result.distance;\n indexMatch = result.indexMatch;\n }\n } else {\n var _context;\n\n if (indexOf$3(_context = op.toLowerCase()).call(_context, lowerCaseOption) !== -1) {\n indexMatch = op;\n }\n\n distance = Validator.levenshteinDistance(option, op);\n\n if (min > distance) {\n closestMatch = op;\n closestMatchPath = copyArray(path);\n min = distance;\n }\n }\n }\n\n return {\n closestMatch: closestMatch,\n path: closestMatchPath,\n distance: min,\n indexMatch: indexMatch\n };\n }\n /**\n * @param {Array.} path\n * @param {Object} option\n * @param {string} prefix\n * @returns {String}\n * @static\n */\n\n }, {\n key: \"printLocation\",\n value: function printLocation(path, option) {\n var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Problem value found at: \\n';\n var str = '\\n\\n' + prefix + 'options = {\\n';\n\n for (var i = 0; i < path.length; i++) {\n for (var j = 0; j < i + 1; j++) {\n str += ' ';\n }\n\n str += path[i] + ': {\\n';\n }\n\n for (var _j = 0; _j < path.length + 1; _j++) {\n str += ' ';\n }\n\n str += option + '\\n';\n\n for (var _i = 0; _i < path.length + 1; _i++) {\n for (var _j2 = 0; _j2 < path.length - _i; _j2++) {\n str += ' ';\n }\n\n str += '}\\n';\n }\n\n return str + '\\n\\n';\n }\n /**\n * @param {Object} options\n * @returns {String}\n * @static\n */\n\n }, {\n key: \"print\",\n value: function print(options) {\n return stringify$2(options).replace(/(\\\")|(\\[)|(\\])|(,\"__type__\")/g, \"\").replace(/(\\,)/g, ', ');\n }\n /**\n * Compute the edit distance between the two given strings\n * http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript\n *\n * Copyright (c) 2011 Andrei Mackenzie\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n * @param {string} a\n * @param {string} b\n * @returns {Array.>}}\n * @static\n */\n\n }, {\n key: \"levenshteinDistance\",\n value: function levenshteinDistance(a, b) {\n if (a.length === 0) return b.length;\n if (b.length === 0) return a.length;\n var matrix = []; // increment along the first column of each row\n\n var i;\n\n for (i = 0; i <= b.length; i++) {\n matrix[i] = [i];\n } // increment each column in the first row\n\n\n var j;\n\n for (j = 0; j <= a.length; j++) {\n matrix[0][j] = j;\n } // Fill in the rest of the matrix\n\n\n for (i = 1; i <= b.length; i++) {\n for (j = 1; j <= a.length; j++) {\n if (b.charAt(i - 1) == a.charAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution\n Math.min(matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j] + 1)); // deletion\n }\n }\n }\n\n return matrix[b.length][a.length];\n }\n }]);\n\n return Validator;\n}();\n\nfunction ownKeys$6(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); if (enumerableOnly) symbols = filter$2(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context5; forEach$2(_context5 = ownKeys$6(Object(source), true)).call(_context5, function (key) { defineProperty$7(target, key, source[key]); }); } else if (getOwnPropertyDescriptors$2) { defineProperties$1(target, getOwnPropertyDescriptors$2(source)); } else { var _context6; forEach$2(_context6 = ownKeys$6(Object(source))).call(_context6, function (key) { defineProperty$2(target, key, getOwnPropertyDescriptor$3(source, key)); }); } } return target; }\n/**\n * A node. A node can be connected to other nodes via one or multiple edges.\n */\n\nvar Node = /*#__PURE__*/function () {\n /**\n *\n * @param {object} options An object containing options for the node. All\n * options are optional, except for the id.\n * {number} id Id of the node. Required\n * {string} label Text label for the node\n * {number} x Horizontal position of the node\n * {number} y Vertical position of the node\n * {string} shape Node shape\n * {string} image An image url\n * {string} title A title text, can be HTML\n * {anytype} group A group name or number\n *\n * @param {Object} body Shared state of current network instance\n * @param {Network.Images} imagelist A list with images. Only needed when the node has an image\n * @param {Groups} grouplist A list with groups. Needed for retrieving group options\n * @param {Object} globalOptions Current global node options; these serve as defaults for the node instance\n * @param {Object} defaultOptions Global default options for nodes; note that this is also the prototype\n * for parameter `globalOptions`.\n */\n function Node(options, body, imagelist, grouplist, globalOptions, defaultOptions) {\n classCallCheck(this, Node);\n\n this.options = bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.body = body;\n this.edges = []; // all edges connected to this node\n // set defaults for the options\n\n this.id = undefined;\n this.imagelist = imagelist;\n this.grouplist = grouplist; // state options\n\n this.x = undefined;\n this.y = undefined;\n this.baseSize = this.options.size;\n this.baseFontSize = this.options.font.size;\n this.predefinedPosition = false; // used to check if initial fit should just take the range or approximate\n\n this.selected = false;\n this.hover = false;\n this.labelModule = new Label(this.body, this.options, false\n /* Not edge label */\n );\n this.setOptions(options);\n }\n /**\n * Attach a edge to the node\n * @param {Edge} edge\n */\n\n\n createClass(Node, [{\n key: \"attachEdge\",\n value: function attachEdge(edge) {\n var _context;\n\n if (indexOf$3(_context = this.edges).call(_context, edge) === -1) {\n this.edges.push(edge);\n }\n }\n /**\n * Detach a edge from the node\n *\n * @param {Edge} edge\n */\n\n }, {\n key: \"detachEdge\",\n value: function detachEdge(edge) {\n var _context2;\n\n var index = indexOf$3(_context2 = this.edges).call(_context2, edge);\n\n if (index != -1) {\n var _context3;\n\n splice$2(_context3 = this.edges).call(_context3, index, 1);\n }\n }\n /**\n * Set or overwrite options for the node\n *\n * @param {Object} options an object with options\n * @returns {null|boolean}\n */\n\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var currentShape = this.options.shape;\n\n if (!options) {\n return; // Note that the return value will be 'undefined'! This is OK.\n } // Save the color for later.\n // This is necessary in order to prevent local color from being overwritten by group color.\n // TODO: To prevent such workarounds the way options are handled should be rewritten from scratch.\n // This is not the only problem with current options handling.\n\n\n if (typeof options.color !== 'undefined') {\n this._localColor = options.color;\n } // basic options\n\n\n if (options.id !== undefined) {\n this.id = options.id;\n }\n\n if (this.id === undefined) {\n throw new Error(\"Node must have an id\");\n }\n\n Node.checkMass(options, this.id); // set these options locally\n // clear x and y positions\n\n if (options.x !== undefined) {\n if (options.x === null) {\n this.x = undefined;\n this.predefinedPosition = false;\n } else {\n this.x = _parseInt$2(options.x);\n this.predefinedPosition = true;\n }\n }\n\n if (options.y !== undefined) {\n if (options.y === null) {\n this.y = undefined;\n this.predefinedPosition = false;\n } else {\n this.y = _parseInt$2(options.y);\n this.predefinedPosition = true;\n }\n }\n\n if (options.size !== undefined) {\n this.baseSize = options.size;\n }\n\n if (options.value !== undefined) {\n options.value = _parseFloat$2(options.value);\n } // this transforms all shorthands into fully defined options\n\n\n Node.parseOptions(this.options, options, true, this.globalOptions, this.grouplist);\n var pile = [options, this.options, this.defaultOptions];\n this.chooser = choosify('node', pile);\n\n this._load_images();\n\n this.updateLabelModule(options); // Need to set local opacity after `this.updateLabelModule(options);` because `this.updateLabelModule(options);` overrites local opacity with group opacity\n\n if (options.opacity !== undefined && Node.checkOpacity(options.opacity)) {\n this.options.opacity = options.opacity;\n }\n\n this.updateShape(currentShape);\n return options.hidden !== undefined || options.physics !== undefined;\n }\n /**\n * Load the images from the options, for the nodes that need them.\n *\n * Images are always loaded, even if they are not used in the current shape.\n * The user may switch to an image shape later on.\n *\n * @private\n */\n\n }, {\n key: \"_load_images\",\n value: function _load_images() {\n if (this.options.shape === 'circularImage' || this.options.shape === 'image') {\n if (this.options.image === undefined) {\n throw new Error(\"Option image must be defined for node type '\" + this.options.shape + \"'\");\n }\n }\n\n if (this.options.image === undefined) {\n return;\n }\n\n if (this.imagelist === undefined) {\n throw new Error(\"Internal Error: No images provided\");\n }\n\n if (typeof this.options.image === 'string') {\n this.imageObj = this.imagelist.load(this.options.image, this.options.brokenImage, this.id);\n } else {\n if (this.options.image.unselected === undefined) {\n throw new Error(\"No unselected image provided\");\n }\n\n this.imageObj = this.imagelist.load(this.options.image.unselected, this.options.brokenImage, this.id);\n\n if (this.options.image.selected !== undefined) {\n this.imageObjAlt = this.imagelist.load(this.options.image.selected, this.options.brokenImage, this.id);\n } else {\n this.imageObjAlt = undefined;\n }\n }\n }\n /**\n * Check that opacity is only between 0 and 1\n * \n * @param {Number} opacity \n * @returns {boolean}\n */\n\n }, {\n key: \"getFormattingValues\",\n\n /**\n *\n * @returns {{color: *, borderWidth: *, borderColor: *, size: *, borderDashes: (boolean|Array|allOptions.nodes.shapeProperties.borderDashes|{boolean, array}), borderRadius: (number|allOptions.nodes.shapeProperties.borderRadius|{number}|Array), shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *}}\n */\n value: function getFormattingValues() {\n var values = {\n color: this.options.color.background,\n opacity: this.options.opacity,\n borderWidth: this.options.borderWidth,\n borderColor: this.options.color.border,\n size: this.options.size,\n borderDashes: this.options.shapeProperties.borderDashes,\n borderRadius: this.options.shapeProperties.borderRadius,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y\n };\n\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n values.borderWidth *= 2;\n values.color = this.options.color.highlight.background;\n values.borderColor = this.options.color.highlight.border;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n values.color = this.options.color.hover.background;\n values.borderColor = this.options.color.hover.border;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === 'function') {\n this.chooser(values, this.options.id, this.selected, this.hover);\n\n if (values.shadow === false) {\n if (values.shadowColor !== this.options.shadow.color || values.shadowSize !== this.options.shadow.size || values.shadowX !== this.options.shadow.x || values.shadowY !== this.options.shadow.y) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n }\n\n if (this.options.opacity !== undefined) {\n var opacity = this.options.opacity;\n values.borderColor = overrideOpacity(values.borderColor, opacity);\n values.color = overrideOpacity(values.color, opacity);\n values.shadowColor = overrideOpacity(values.shadowColor, opacity);\n }\n\n return values;\n }\n /**\n *\n * @param {Object} options\n */\n\n }, {\n key: \"updateLabelModule\",\n value: function updateLabelModule(options) {\n if (this.options.label === undefined || this.options.label === null) {\n this.options.label = '';\n }\n\n Node.updateGroupOptions(this.options, _objectSpread$2(_objectSpread$2({}, options), {}, {\n color: options && options.color || this._localColor || undefined\n }), this.grouplist); //\n // Note:The prototype chain for this.options is:\n //\n // this.options -> NodesHandler.options -> NodesHandler.defaultOptions\n // (also: this.globalOptions)\n //\n // Note that the prototypes are mentioned explicitly in the pile list below;\n // WE DON'T WANT THE ORDER OF THE PROTOTYPES!!!! At least, not for font handling of labels.\n // This is a good indication that the prototype usage of options is deficient.\n //\n\n var currentGroup = this.grouplist.get(this.options.group, false);\n var pile = [options, // new options\n this.options, // current node options, see comment above for prototype\n currentGroup, // group options, if any\n this.globalOptions, // Currently set global node options\n this.defaultOptions // Default global node options\n ];\n this.labelModule.update(this.options, pile);\n\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n }\n /**\n *\n * @param {string} currentShape\n */\n\n }, {\n key: \"updateShape\",\n value: function updateShape(currentShape) {\n if (currentShape === this.options.shape && this.shape) {\n this.shape.setOptions(this.options, this.imageObj, this.imageObjAlt);\n } else {\n // choose draw method depending on the shape\n switch (this.options.shape) {\n case 'box':\n this.shape = new Box(this.options, this.body, this.labelModule);\n break;\n\n case 'circle':\n this.shape = new Circle(this.options, this.body, this.labelModule);\n break;\n\n case 'circularImage':\n this.shape = new CircularImage(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n\n case 'custom':\n this.shape = new CustomShape(this.options, this.body, this.labelModule, this.options.ctxRenderer);\n break;\n\n case 'database':\n this.shape = new Database(this.options, this.body, this.labelModule);\n break;\n\n case 'diamond':\n this.shape = new Diamond(this.options, this.body, this.labelModule);\n break;\n\n case 'dot':\n this.shape = new Dot(this.options, this.body, this.labelModule);\n break;\n\n case 'ellipse':\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n break;\n\n case 'icon':\n this.shape = new Icon(this.options, this.body, this.labelModule);\n break;\n\n case 'image':\n this.shape = new Image$1(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n\n case 'square':\n this.shape = new Square(this.options, this.body, this.labelModule);\n break;\n\n case 'hexagon':\n this.shape = new Hexagon(this.options, this.body, this.labelModule);\n break;\n\n case 'star':\n this.shape = new Star(this.options, this.body, this.labelModule);\n break;\n\n case 'text':\n this.shape = new Text(this.options, this.body, this.labelModule);\n break;\n\n case 'triangle':\n this.shape = new Triangle(this.options, this.body, this.labelModule);\n break;\n\n case 'triangleDown':\n this.shape = new TriangleDown(this.options, this.body, this.labelModule);\n break;\n\n default:\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n break;\n }\n }\n\n this.needsRefresh();\n }\n /**\n * select this node\n */\n\n }, {\n key: \"select\",\n value: function select() {\n this.selected = true;\n this.needsRefresh();\n }\n /**\n * unselect this node\n */\n\n }, {\n key: \"unselect\",\n value: function unselect() {\n this.selected = false;\n this.needsRefresh();\n }\n /**\n * Reset the calculated size of the node, forces it to recalculate its size\n */\n\n }, {\n key: \"needsRefresh\",\n value: function needsRefresh() {\n this.shape.refreshNeeded = true;\n }\n /**\n * get the title of this node.\n * @return {string} title The title of the node, or undefined when no title\n * has been set.\n */\n\n }, {\n key: \"getTitle\",\n value: function getTitle() {\n return this.options.title;\n }\n /**\n * Calculate the distance to the border of the Node\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle Angle in radians\n * @returns {number} distance Distance to the border in pixels\n */\n\n }, {\n key: \"distanceToBorder\",\n value: function distanceToBorder(ctx, angle) {\n return this.shape.distanceToBorder(ctx, angle);\n }\n /**\n * Check if this node has a fixed x and y position\n * @return {boolean} true if fixed, false if not\n */\n\n }, {\n key: \"isFixed\",\n value: function isFixed() {\n return this.options.fixed.x && this.options.fixed.y;\n }\n /**\n * check if this node is selecte\n * @return {boolean} selected True if node is selected, else false\n */\n\n }, {\n key: \"isSelected\",\n value: function isSelected() {\n return this.selected;\n }\n /**\n * Retrieve the value of the node. Can be undefined\n * @return {number} value\n */\n\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.options.value;\n }\n /**\n * Get the current dimensions of the label\n *\n * @return {rect}\n */\n\n }, {\n key: \"getLabelSize\",\n value: function getLabelSize() {\n return this.labelModule.size();\n }\n /**\n * Adjust the value range of the node. The node will adjust it's size\n * based on its value.\n * @param {number} min\n * @param {number} max\n * @param {number} total\n */\n\n }, {\n key: \"setValueRange\",\n value: function setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n var sizeDiff = this.options.scaling.max - this.options.scaling.min;\n\n if (this.options.scaling.label.enabled === true) {\n var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n\n this.options.size = this.options.scaling.min + scale * sizeDiff;\n } else {\n this.options.size = this.baseSize;\n this.options.font.size = this.baseFontSize;\n }\n\n this.updateLabelModule();\n }\n /**\n * Draw this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n\n }, {\n key: \"draw\",\n value: function draw(ctx) {\n var values = this.getFormattingValues();\n this.shape.draw(ctx, this.x, this.y, this.selected, this.hover, values);\n }\n /**\n * Update the bounding box of the shape\n * @param {CanvasRenderingContext2D} ctx\n */\n\n }, {\n key: \"updateBoundingBox\",\n value: function updateBoundingBox(ctx) {\n this.shape.updateBoundingBox(this.x, this.y, ctx);\n }\n /**\n * Recalculate the size of this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n\n }, {\n key: \"resize\",\n value: function resize(ctx) {\n var values = this.getFormattingValues();\n this.shape.resize(ctx, this.selected, this.hover, values);\n }\n /**\n * Determine all visual elements of this node instance, in which the given\n * point falls within the bounding shape.\n *\n * @param {point} point\n * @returns {Array.} list with the items which are on the point\n */\n\n }, {\n key: \"getItemsOnPoint\",\n value: function getItemsOnPoint(point) {\n var ret = [];\n\n if (this.labelModule.visible()) {\n if (pointInRect(this.labelModule.getSize(), point)) {\n ret.push({\n nodeId: this.id,\n labelId: 0\n });\n }\n }\n\n if (pointInRect(this.shape.boundingBox, point)) {\n ret.push({\n nodeId: this.id\n });\n }\n\n return ret;\n }\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top, right, bottom\n * @return {boolean} True if location is located on node\n */\n\n }, {\n key: \"isOverlappingWith\",\n value: function isOverlappingWith(obj) {\n return this.shape.left < obj.right && this.shape.left + this.shape.width > obj.left && this.shape.top < obj.bottom && this.shape.top + this.shape.height > obj.top;\n }\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top, right, bottom\n * @return {boolean} True if location is located on node\n */\n\n }, {\n key: \"isBoundingBoxOverlappingWith\",\n value: function isBoundingBoxOverlappingWith(obj) {\n return this.shape.boundingBox.left < obj.right && this.shape.boundingBox.right > obj.left && this.shape.boundingBox.top < obj.bottom && this.shape.boundingBox.bottom > obj.top;\n }\n /**\n * Check valid values for mass\n *\n * The mass may not be negative or zero. If it is, reset to 1\n *\n * @param {object} options\n * @param {Node.id} id\n * @static\n */\n\n }], [{\n key: \"checkOpacity\",\n value: function checkOpacity(opacity) {\n return 0 <= opacity && opacity <= 1;\n }\n /**\n * Check that origin is 'center' or 'top-left'\n * \n * @param {String} origin \n * @returns {boolean}\n */\n\n }, {\n key: \"checkCoordinateOrigin\",\n value: function checkCoordinateOrigin(origin) {\n return origin === undefined || origin === 'center' || origin === 'top-left';\n }\n /**\n * Copy group option values into the node options.\n *\n * The group options override the global node options, so the copy of group options\n * must happen *after* the global node options have been set.\n *\n * This method must also be called also if the global node options have changed and the group options did not.\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions new values for the options, currently only passed in for check\n * @param {Object} groupList\n */\n\n }, {\n key: \"updateGroupOptions\",\n value: function updateGroupOptions(parentOptions, newOptions, groupList) {\n var _context4;\n\n if (groupList === undefined) return; // No groups, nothing to do\n\n var group = parentOptions.group; // paranoia: the selected group is already merged into node options, check.\n\n if (newOptions !== undefined && newOptions.group !== undefined && group !== newOptions.group) {\n throw new Error(\"updateGroupOptions: group values in options don't match.\");\n }\n\n var hasGroup = typeof group === 'number' || typeof group === 'string' && group != '';\n if (!hasGroup) return; // current node has no group, no need to merge\n\n var groupObj = groupList.get(group);\n\n if (groupObj.opacity !== undefined && newOptions.opacity === undefined) {\n if (!Node.checkOpacity(groupObj.opacity)) {\n console.error(\"Invalid option for node opacity. Value must be between 0 and 1, found: \" + groupObj.opacity);\n groupObj.opacity = undefined;\n }\n } // Skip any new option to avoid them being overridden by the group options.\n\n\n var skipProperties = filter$2(_context4 = getOwnPropertyNames$2(newOptions)).call(_context4, function (p) {\n return newOptions[p] != null;\n }); // Always skip merging group font options into parent; these are required to be distinct for labels\n\n\n skipProperties.push('font');\n selectiveNotDeepExtend(skipProperties, parentOptions, groupObj); // the color object needs to be completely defined.\n // Since groups can partially overwrite the colors, we parse it again, just in case.\n\n parentOptions.color = parseColor(parentOptions.color);\n }\n /**\n * This process all possible shorthands in the new options and makes sure that the parentOptions are fully defined.\n * Static so it can also be used by the handler.\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions\n * @param {boolean} [allowDeletion=false]\n * @param {Object} [globalOptions={}]\n * @param {Object} [groupList]\n * @static\n */\n\n }, {\n key: \"parseOptions\",\n value: function parseOptions(parentOptions, newOptions) {\n var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var groupList = arguments.length > 4 ? arguments[4] : undefined;\n var fields = ['color', 'fixed', 'shadow'];\n selectiveNotDeepExtend(fields, parentOptions, newOptions, allowDeletion);\n Node.checkMass(newOptions);\n\n if (parentOptions.opacity !== undefined) {\n if (!Node.checkOpacity(parentOptions.opacity)) {\n console.error(\"Invalid option for node opacity. Value must be between 0 and 1, found: \" + parentOptions.opacity);\n parentOptions.opacity = undefined;\n }\n }\n\n if (newOptions.opacity !== undefined) {\n if (!Node.checkOpacity(newOptions.opacity)) {\n console.error(\"Invalid option for node opacity. Value must be between 0 and 1, found: \" + newOptions.opacity);\n newOptions.opacity = undefined;\n }\n }\n\n if (newOptions.shapeProperties && !Node.checkCoordinateOrigin(newOptions.shapeProperties.coordinateOrigin)) {\n console.error(\"Invalid option for node coordinateOrigin, found: \" + newOptions.shapeProperties.coordinateOrigin);\n } // merge the shadow options into the parent.\n\n\n mergeOptions(parentOptions, newOptions, 'shadow', globalOptions); // individual shape newOptions\n\n if (newOptions.color !== undefined && newOptions.color !== null) {\n var parsedColor = parseColor(newOptions.color);\n fillIfDefined(parentOptions.color, parsedColor);\n } else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = bridgeObject(globalOptions.color); // set the object back to the global options\n } // handle the fixed options\n\n\n if (newOptions.fixed !== undefined && newOptions.fixed !== null) {\n if (typeof newOptions.fixed === 'boolean') {\n parentOptions.fixed.x = newOptions.fixed;\n parentOptions.fixed.y = newOptions.fixed;\n } else {\n if (newOptions.fixed.x !== undefined && typeof newOptions.fixed.x === 'boolean') {\n parentOptions.fixed.x = newOptions.fixed.x;\n }\n\n if (newOptions.fixed.y !== undefined && typeof newOptions.fixed.y === 'boolean') {\n parentOptions.fixed.y = newOptions.fixed.y;\n }\n }\n }\n\n if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = bridgeObject(globalOptions.font); // set the object back to the global options\n }\n\n Node.updateGroupOptions(parentOptions, newOptions, groupList); // handle the scaling options, specifically the label part\n\n if (newOptions.scaling !== undefined) {\n mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling);\n }\n }\n }, {\n key: \"checkMass\",\n value: function checkMass(options, id) {\n if (options.mass !== undefined && options.mass <= 0) {\n var strId = '';\n\n if (id !== undefined) {\n strId = ' in node id: ' + id;\n }\n\n console.log('%cNegative or zero mass disallowed' + strId + ', setting mass to 1.', printStyle);\n options.mass = 1;\n }\n }\n }]);\n\n return Node;\n}();\n\nfunction _createForOfIteratorHelper$2(o, allowArrayLike) { var it; if (typeof symbol$4 === \"undefined\" || getIteratorMethod$1(o) == null) { if (isArray$5(o) || (it = _unsupportedIterableToArray$3(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = getIterator$1(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray$3(o, minLen) { var _context4; if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray$3(o, minLen); var n = slice$5(_context4 = Object.prototype.toString.call(o)).call(_context4, 8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return from_1$2(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$3(o, minLen); }\n\nfunction _arrayLikeToArray$3(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n/**\n * Handler for Nodes\n */\n\nvar NodesHandler = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {Images} images\n * @param {Array.} groups\n * @param {LayoutEngine} layoutEngine\n */\n function NodesHandler(body, images, groups, layoutEngine) {\n var _context,\n _this = this;\n\n classCallCheck(this, NodesHandler);\n\n this.body = body;\n this.images = images;\n this.groups = groups;\n this.layoutEngine = layoutEngine; // create the node API in the body container\n\n this.body.functions.createNode = bind$2(_context = this.create).call(_context, this);\n this.nodesListeners = {\n add: function add(event, params) {\n _this.add(params.items);\n },\n update: function update(event, params) {\n _this.update(params.items, params.data, params.oldData);\n },\n remove: function remove(event, params) {\n _this.remove(params.items);\n }\n };\n this.defaultOptions = {\n borderWidth: 1,\n borderWidthSelected: 2,\n brokenImage: undefined,\n color: {\n border: '#2B7CE9',\n background: '#97C2FC',\n highlight: {\n border: '#2B7CE9',\n background: '#D2E5FF'\n },\n hover: {\n border: '#2B7CE9',\n background: '#D2E5FF'\n }\n },\n opacity: undefined,\n // number between 0 and 1\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: '#343434',\n size: 14,\n // px\n face: 'arial',\n background: 'none',\n strokeWidth: 0,\n // px\n strokeColor: '#ffffff',\n align: 'center',\n vadjust: 0,\n multi: false,\n bold: {\n mod: 'bold'\n },\n boldital: {\n mod: 'bold italic'\n },\n ital: {\n mod: 'italic'\n },\n mono: {\n mod: '',\n size: 15,\n // px\n face: 'monospace',\n vadjust: 2\n }\n },\n group: undefined,\n hidden: false,\n icon: {\n face: 'FontAwesome',\n //'FontAwesome',\n code: undefined,\n //'\\uf007',\n size: 50,\n //50,\n color: '#2B7CE9' //'#aa00ff'\n\n },\n image: undefined,\n // --> URL\n imagePadding: {\n // only for image shape\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n label: undefined,\n labelHighlightBold: true,\n level: undefined,\n margin: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5\n },\n mass: 1,\n physics: true,\n scaling: {\n min: 10,\n max: 30,\n label: {\n enabled: false,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function customScalingFunction(min, max, total, value) {\n if (max === min) {\n return 0.5;\n } else {\n var scale = 1 / (max - min);\n return Math.max(0, (value - min) * scale);\n }\n }\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: 10,\n x: 5,\n y: 5\n },\n shape: 'ellipse',\n shapeProperties: {\n borderDashes: false,\n // only for borders\n borderRadius: 6,\n // only for box shape\n interpolation: true,\n // only for image and circularImage shapes\n useImageSize: false,\n // only for image and circularImage shapes\n useBorderWithImage: false,\n // only for image shape\n coordinateOrigin: 'center' // only for image and circularImage shapes\n\n },\n size: 25,\n title: undefined,\n value: undefined,\n x: undefined,\n y: undefined\n }; // Protect from idiocy\n\n if (this.defaultOptions.mass <= 0) {\n throw 'Internal error: mass in defaultOptions of NodesHandler may not be zero or negative';\n }\n\n this.options = bridgeObject(this.defaultOptions);\n this.bindEventListeners();\n }\n /**\n * Binds event listeners\n */\n\n\n createClass(NodesHandler, [{\n key: \"bindEventListeners\",\n value: function bindEventListeners() {\n var _context2,\n _context3,\n _this2 = this;\n\n // refresh the nodes. Used when reverting from hierarchical layout\n this.body.emitter.on('refreshNodes', bind$2(_context2 = this.refresh).call(_context2, this));\n this.body.emitter.on('refresh', bind$2(_context3 = this.refresh).call(_context3, this));\n this.body.emitter.on('destroy', function () {\n forEach$3(_this2.nodesListeners, function (callback, event) {\n if (_this2.body.data.nodes) _this2.body.data.nodes.off(event, callback);\n });\n delete _this2.body.functions.createNode;\n delete _this2.nodesListeners.add;\n delete _this2.nodesListeners.update;\n delete _this2.nodesListeners.remove;\n delete _this2.nodesListeners;\n });\n }\n /**\n *\n * @param {Object} options\n */\n\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options !== undefined) {\n Node.parseOptions(this.options, options); // Need to set opacity here because Node.parseOptions is also used for groups,\n // if you set opacity in Node.parseOptions it overwrites group opacity.\n\n if (options.opacity !== undefined) {\n if (isNan$2(options.opacity) || !_isFinite$2(options.opacity) || options.opacity < 0 || options.opacity > 1) {\n console.error(\"Invalid option for node opacity. Value must be between 0 and 1, found: \" + options.opacity);\n } else {\n this.options.opacity = options.opacity;\n }\n } // update the shape in all nodes\n\n\n if (options.shape !== undefined) {\n for (var nodeId in this.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) {\n this.body.nodes[nodeId].updateShape();\n }\n }\n } // Update the labels of nodes if any relevant options changed.\n\n\n if (typeof options.font !== \"undefined\" || typeof options.widthConstraint !== \"undefined\" || typeof options.heightConstraint !== \"undefined\") {\n for (var _i = 0, _Object$keys = keys$3(this.body.nodes); _i < _Object$keys.length; _i++) {\n var _nodeId = _Object$keys[_i];\n\n this.body.nodes[_nodeId].updateLabelModule();\n\n this.body.nodes[_nodeId].needsRefresh();\n }\n } // update the shape size in all nodes\n\n\n if (options.size !== undefined) {\n for (var _nodeId2 in this.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.body.nodes, _nodeId2)) {\n this.body.nodes[_nodeId2].needsRefresh();\n }\n }\n } // update the state of the variables if needed\n\n\n if (options.hidden !== undefined || options.physics !== undefined) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n /**\n * Set a data set with nodes for the network\n * @param {Array | DataSet | DataView} nodes The data containing the nodes.\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n\n }, {\n key: \"setData\",\n value: function setData(nodes) {\n var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var oldNodesData = this.body.data.nodes;\n\n if (nodes instanceof DataSet || nodes instanceof DataView) {\n this.body.data.nodes = nodes;\n } else if (isArray$5(nodes)) {\n this.body.data.nodes = new DataSet();\n this.body.data.nodes.add(nodes);\n } else if (!nodes) {\n this.body.data.nodes = new DataSet();\n } else {\n throw new TypeError('Array or DataSet expected');\n }\n\n if (oldNodesData) {\n // unsubscribe from old dataset\n forEach$3(this.nodesListeners, function (callback, event) {\n oldNodesData.off(event, callback);\n });\n } // remove drawn nodes\n\n\n this.body.nodes = {};\n\n if (this.body.data.nodes) {\n // subscribe to new dataset\n var me = this;\n forEach$3(this.nodesListeners, function (callback, event) {\n me.body.data.nodes.on(event, callback);\n }); // draw all new nodes\n\n var ids = this.body.data.nodes.getIds();\n this.add(ids, true);\n }\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n /**\n * Add nodes\n * @param {number[] | string[]} ids\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n\n }, {\n key: \"add\",\n value: function add(ids) {\n var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var id;\n var newNodes = [];\n\n for (var i = 0; i < ids.length; i++) {\n id = ids[i];\n var properties = this.body.data.nodes.get(id);\n var node = this.create(properties);\n newNodes.push(node);\n this.body.nodes[id] = node; // note: this may replace an existing node\n }\n\n this.layoutEngine.positionInitially(newNodes);\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n /**\n * Update existing nodes, or create them when not yet existing\n * @param {number[] | string[]} ids id's of changed nodes\n * @param {Array} changedData array with changed data\n * @param {Array|undefined} oldData optional; array with previous data\n * @private\n */\n\n }, {\n key: \"update\",\n value: function update(ids, changedData, oldData) {\n var nodes = this.body.nodes;\n var dataChanged = false;\n\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n var node = nodes[id];\n var data = changedData[i];\n\n if (node !== undefined) {\n // update node\n if (node.setOptions(data)) {\n dataChanged = true;\n }\n } else {\n dataChanged = true; // create node\n\n node = this.create(data);\n nodes[id] = node;\n }\n }\n\n if (!dataChanged && oldData !== undefined) {\n // Check for any changes which should trigger a layout recalculation\n // For now, this is just 'level' for hierarchical layout\n // Assumption: old and new data arranged in same order; at time of writing, this holds.\n dataChanged = some$2(changedData).call(changedData, function (newValue, index) {\n var oldValue = oldData[index];\n return oldValue && oldValue.level !== newValue.level;\n });\n }\n\n if (dataChanged === true) {\n this.body.emitter.emit(\"_dataChanged\");\n } else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n /**\n * Remove existing nodes. If nodes do not exist, the method will just ignore it.\n * @param {number[] | string[]} ids\n * @private\n */\n\n }, {\n key: \"remove\",\n value: function remove(ids) {\n var nodes = this.body.nodes;\n\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n delete nodes[id];\n }\n\n this.body.emitter.emit(\"_dataChanged\");\n }\n /**\n * create a node\n * @param {Object} properties\n * @param {class} [constructorClass=Node.default]\n * @returns {*}\n */\n\n }, {\n key: \"create\",\n value: function create(properties) {\n var constructorClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Node;\n return new constructorClass(properties, this.body, this.images, this.groups, this.options, this.defaultOptions);\n }\n /**\n *\n * @param {boolean} [clearPositions=false]\n */\n\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n\n var clearPositions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n forEach$3(this.body.nodes, function (node, nodeId) {\n var data = _this3.body.data.nodes.get(nodeId);\n\n if (data !== undefined) {\n if (clearPositions === true) {\n node.setOptions({\n x: null,\n y: null\n });\n }\n\n node.setOptions({\n fixed: false\n });\n node.setOptions(data);\n }\n });\n }\n /**\n * Returns the positions of the nodes.\n * @param {Array.|String} [ids] --> optional, can be array of nodeIds, can be string\n * @returns {{}}\n */\n\n }, {\n key: \"getPositions\",\n value: function getPositions(ids) {\n var dataArray = {};\n\n if (ids !== undefined) {\n if (isArray$5(ids) === true) {\n for (var i = 0; i < ids.length; i++) {\n if (this.body.nodes[ids[i]] !== undefined) {\n var node = this.body.nodes[ids[i]];\n dataArray[ids[i]] = {\n x: Math.round(node.x),\n y: Math.round(node.y)\n };\n }\n }\n } else {\n if (this.body.nodes[ids] !== undefined) {\n var _node = this.body.nodes[ids];\n dataArray[ids] = {\n x: Math.round(_node.x),\n y: Math.round(_node.y)\n };\n }\n }\n } else {\n for (var _i2 = 0; _i2 < this.body.nodeIndices.length; _i2++) {\n var _node2 = this.body.nodes[this.body.nodeIndices[_i2]];\n dataArray[this.body.nodeIndices[_i2]] = {\n x: Math.round(_node2.x),\n y: Math.round(_node2.y)\n };\n }\n }\n\n return dataArray;\n }\n /**\n * Retrieves the x y position of a specific id.\n *\n * @param {string} id The id to retrieve.\n *\n * @throws {TypeError} If no id is included.\n * @throws {ReferenceError} If an invalid id is provided.\n *\n * @returns {{ x: number, y: number }} Returns X, Y canvas position of the node with given id.\n */\n\n }, {\n key: \"getPosition\",\n value: function getPosition(id) {\n if (id == undefined) {\n throw new TypeError(\"No id was specified for getPosition method.\");\n } else if (this.body.nodes[id] == undefined) {\n throw new ReferenceError(\"NodeId provided for getPosition does not exist. Provided: \".concat(id));\n } else {\n return {\n x: Math.round(this.body.nodes[id].x),\n y: Math.round(this.body.nodes[id].y)\n };\n }\n }\n /**\n * Load the XY positions of the nodes into the dataset.\n */\n\n }, {\n key: \"storePositions\",\n value: function storePositions() {\n // todo: add support for clusters and hierarchical.\n var dataArray = [];\n var dataset = this.body.data.nodes.getDataSet();\n\n var _iterator = _createForOfIteratorHelper$2(dataset.get()),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var dsNode = _step.value;\n var id = dsNode.id;\n var bodyNode = this.body.nodes[id];\n var x = Math.round(bodyNode.x);\n var y = Math.round(bodyNode.y);\n\n if (dsNode.x !== x || dsNode.y !== y) {\n dataArray.push({\n id: id,\n x: x,\n y: y\n });\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n dataset.update(dataArray);\n }\n /**\n * get the bounding box of a node.\n * @param {Node.id} nodeId\n * @returns {j|*}\n */\n\n }, {\n key: \"getBoundingBox\",\n value: function getBoundingBox(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].shape.boundingBox;\n }\n }\n /**\n * Get the Ids of nodes connected to this node.\n * @param {Node.id} nodeId\n * @param {'to'|'from'|undefined} direction values 'from' and 'to' select respectively parent and child nodes only.\n * Any other value returns both parent and child nodes.\n * @returns {Array}\n */\n\n }, {\n key: \"getConnectedNodes\",\n value: function getConnectedNodes(nodeId, direction) {\n var nodeList = [];\n\n if (this.body.nodes[nodeId] !== undefined) {\n var node = this.body.nodes[nodeId];\n var nodeObj = {}; // used to quickly check if node already exists\n\n for (var i = 0; i < node.edges.length; i++) {\n var edge = node.edges[i];\n\n if (direction !== 'to' && edge.toId == node.id) {\n // these are double equals since ids can be numeric or string\n if (nodeObj[edge.fromId] === undefined) {\n nodeList.push(edge.fromId);\n nodeObj[edge.fromId] = true;\n }\n } else if (direction !== 'from' && edge.fromId == node.id) {\n // these are double equals since ids can be numeric or string\n if (nodeObj[edge.toId] === undefined) {\n nodeList.push(edge.toId);\n nodeObj[edge.toId] = true;\n }\n }\n }\n }\n\n return nodeList;\n }\n /**\n * Get the ids of the edges connected to this node.\n * @param {Node.id} nodeId\n * @returns {*}\n */\n\n }, {\n key: \"getConnectedEdges\",\n value: function getConnectedEdges(nodeId) {\n var edgeList = [];\n\n if (this.body.nodes[nodeId] !== undefined) {\n var node = this.body.nodes[nodeId];\n\n for (var i = 0; i < node.edges.length; i++) {\n edgeList.push(node.edges[i].id);\n }\n } else {\n console.log(\"NodeId provided for getConnectedEdges does not exist. Provided: \", nodeId);\n }\n\n return edgeList;\n }\n /**\n * Move a node.\n *\n * @param {Node.id} nodeId\n * @param {number} x\n * @param {number} y\n */\n\n }, {\n key: \"moveNode\",\n value: function moveNode(nodeId, x, y) {\n var _this4 = this;\n\n if (this.body.nodes[nodeId] !== undefined) {\n this.body.nodes[nodeId].x = Number(x);\n this.body.nodes[nodeId].y = Number(y);\n\n setTimeout$2(function () {\n _this4.body.emitter.emit(\"startSimulation\");\n }, 0);\n } else {\n console.log(\"Node id supplied to moveNode does not exist. Provided: \", nodeId);\n }\n }\n }]);\n\n return NodesHandler;\n}();\n\nvar getOwnPropertyDescriptor$4 = getOwnPropertyDescriptor_1;\n\nvar getOwnPropertyDescriptor$5 = getOwnPropertyDescriptor$4;\n\n// https://tc39.github.io/ecma262/#sec-reflect.get\n\nfunction get$1(target, propertyKey\n/* , receiver */\n) {\n var receiver = arguments.length < 3 ? target : arguments[2];\n var descriptor, prototype;\n if (anObject(target) === receiver) return target[propertyKey];\n if (descriptor = objectGetOwnPropertyDescriptor.f(target, propertyKey)) return has(descriptor, 'value') ? descriptor.value : descriptor.get === undefined ? undefined : descriptor.get.call(receiver);\n if (isObject(prototype = objectGetPrototypeOf(target))) return get$1(prototype, propertyKey, receiver);\n}\n\n_export({\n target: 'Reflect',\n stat: true\n}, {\n get: get$1\n});\n\nvar get$2 = path.Reflect.get;\n\nvar get$3 = get$2;\n\nvar get$4 = get$3;\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf$5(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nvar superPropBase = _superPropBase;\n\nvar get$5 = createCommonjsModule(function (module) {\n function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && get$4) {\n module.exports = _get = get$4;\n } else {\n module.exports = _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n\n var desc = getOwnPropertyDescriptor$5(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n }\n\n module.exports = _get;\n});\n\nvar $hypot = Math.hypot;\nvar abs$1 = Math.abs;\nvar sqrt = Math.sqrt; // Chrome 77 bug\n// https://bugs.chromium.org/p/v8/issues/detail?id=9546\n\nvar BUGGY = !!$hypot && $hypot(Infinity, NaN) !== Infinity; // `Math.hypot` method\n// https://tc39.github.io/ecma262/#sec-math.hypot\n\n_export({\n target: 'Math',\n stat: true,\n forced: BUGGY\n}, {\n hypot: function hypot(value1, value2) {\n // eslint-disable-line no-unused-vars\n var sum = 0;\n var i = 0;\n var aLen = arguments.length;\n var larg = 0;\n var arg, div;\n\n while (i < aLen) {\n arg = abs$1(arguments[i++]);\n\n if (larg < arg) {\n div = larg / arg;\n sum = sum * div * div + 1;\n larg = arg;\n } else if (arg > 0) {\n div = arg / larg;\n sum += div * div;\n } else sum += arg;\n }\n\n return larg === Infinity ? Infinity : larg * sqrt(sum);\n }\n});\n\nvar hypot = path.Math.hypot;\n\nvar hypot$1 = hypot;\n\nvar hypot$2 = hypot$1;\n\nfunction _createSuper$j(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$j(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$j() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\r\n * Common methods for endpoints\r\n *\r\n * @class\r\n */\n\nvar EndPoint = /*#__PURE__*/function () {\n function EndPoint() {\n classCallCheck(this, EndPoint);\n }\n\n createClass(EndPoint, null, [{\n key: \"transform\",\n\n /**\r\n * Apply transformation on points for display.\r\n *\r\n * The following is done:\r\n * - rotate by the specified angle\r\n * - multiply the (normalized) coordinates by the passed length\r\n * - offset by the target coordinates\r\n *\r\n * @param points - The point(s) to be transformed.\r\n * @param arrowData - The data determining the result of the transformation.\r\n */\n value: function transform(points, arrowData) {\n if (!isArray$5(points)) {\n points = [points];\n }\n\n var x = arrowData.point.x;\n var y = arrowData.point.y;\n var angle = arrowData.angle;\n var length = arrowData.length;\n\n for (var i = 0; i < points.length; ++i) {\n var p = points[i];\n var xt = p.x * Math.cos(angle) - p.y * Math.sin(angle);\n var yt = p.x * Math.sin(angle) + p.y * Math.cos(angle);\n p.x = x + length * xt;\n p.y = y + length * yt;\n }\n }\n /**\r\n * Draw a closed path using the given real coordinates.\r\n *\r\n * @param ctx - The path will be rendered into this context.\r\n * @param points - The points of the path.\r\n */\n\n }, {\n key: \"drawPath\",\n value: function drawPath(ctx, points) {\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n\n for (var i = 1; i < points.length; ++i) {\n ctx.lineTo(points[i].x, points[i].y);\n }\n\n ctx.closePath();\n }\n }]);\n\n return EndPoint;\n}();\n/**\r\n * Drawing methods for the arrow endpoint.\r\n */\n\n\nvar Image$2 = /*#__PURE__*/function (_EndPoint) {\n inherits(Image, _EndPoint);\n\n var _super = _createSuper$j(Image);\n\n function Image() {\n classCallCheck(this, Image);\n\n return _super.apply(this, arguments);\n }\n\n createClass(Image, null, [{\n key: \"draw\",\n\n /**\r\n * Draw this shape at the end of a line.\r\n *\r\n * @param ctx - The shape will be rendered into this context.\r\n * @param arrowData - The data determining the shape.\r\n *\r\n * @returns False as there is no way to fill an image.\r\n */\n value: function draw(ctx, arrowData) {\n if (arrowData.image) {\n ctx.save();\n ctx.translate(arrowData.point.x, arrowData.point.y);\n ctx.rotate(Math.PI / 2 + arrowData.angle);\n var width = arrowData.imageWidth != null ? arrowData.imageWidth : arrowData.image.width;\n var height = arrowData.imageHeight != null ? arrowData.imageHeight : arrowData.image.height;\n arrowData.image.drawImageAtPosition(ctx, 1, // scale\n -width / 2, // x\n 0, // y\n width, height);\n ctx.restore();\n }\n\n return false;\n }\n }]);\n\n return Image;\n}(EndPoint);\n/**\r\n * Drawing methods for the arrow endpoint.\r\n */\n\n\nvar Arrow = /*#__PURE__*/function (_EndPoint2) {\n inherits(Arrow, _EndPoint2);\n\n var _super2 = _createSuper$j(Arrow);\n\n function Arrow() {\n classCallCheck(this, Arrow);\n\n return _super2.apply(this, arguments);\n }\n\n createClass(Arrow, null, [{\n key: \"draw\",\n\n /**\r\n * Draw this shape at the end of a line.\r\n *\r\n * @param ctx - The shape will be rendered into this context.\r\n * @param arrowData - The data determining the shape.\r\n *\r\n * @returns True because ctx.fill() can be used to fill the arrow.\r\n */\n value: function draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [{\n x: 0,\n y: 0\n }, {\n x: -1,\n y: 0.3\n }, {\n x: -0.9,\n y: 0\n }, {\n x: -1,\n y: -0.3\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n }]);\n\n return Arrow;\n}(EndPoint);\n/**\r\n * Drawing methods for the crow endpoint.\r\n */\n\n\nvar Crow = /*#__PURE__*/function () {\n function Crow() {\n classCallCheck(this, Crow);\n }\n\n createClass(Crow, null, [{\n key: \"draw\",\n\n /**\r\n * Draw this shape at the end of a line.\r\n *\r\n * @param ctx - The shape will be rendered into this context.\r\n * @param arrowData - The data determining the shape.\r\n *\r\n * @returns True because ctx.fill() can be used to fill the arrow.\r\n */\n value: function draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [{\n x: -1,\n y: 0\n }, {\n x: 0,\n y: 0.3\n }, {\n x: -0.4,\n y: 0\n }, {\n x: 0,\n y: -0.3\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n }]);\n\n return Crow;\n}();\n/**\r\n * Drawing methods for the curve endpoint.\r\n */\n\n\nvar Curve = /*#__PURE__*/function () {\n function Curve() {\n classCallCheck(this, Curve);\n }\n\n createClass(Curve, null, [{\n key: \"draw\",\n\n /**\r\n * Draw this shape at the end of a line.\r\n *\r\n * @param ctx - The shape will be rendered into this context.\r\n * @param arrowData - The data determining the shape.\r\n *\r\n * @returns True because ctx.fill() can be used to fill the arrow.\r\n */\n value: function draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var point = {\n x: -0.4,\n y: 0\n };\n EndPoint.transform(point, arrowData); // Update endpoint style for drawing transparent arc.\n\n ctx.strokeStyle = ctx.fillStyle;\n ctx.fillStyle = \"rgba(0, 0, 0, 0)\"; // Define curve endpoint as semicircle.\n\n var pi = Math.PI;\n var startAngle = arrowData.angle - pi / 2;\n var endAngle = arrowData.angle + pi / 2;\n ctx.beginPath();\n ctx.arc(point.x, point.y, arrowData.length * 0.4, startAngle, endAngle, false);\n ctx.stroke();\n return true;\n }\n }]);\n\n return Curve;\n}();\n/**\r\n * Drawing methods for the inverted curve endpoint.\r\n */\n\n\nvar InvertedCurve = /*#__PURE__*/function () {\n function InvertedCurve() {\n classCallCheck(this, InvertedCurve);\n }\n\n createClass(InvertedCurve, null, [{\n key: \"draw\",\n\n /**\r\n * Draw this shape at the end of a line.\r\n *\r\n * @param ctx - The shape will be rendered into this context.\r\n * @param arrowData - The data determining the shape.\r\n *\r\n * @returns True because ctx.fill() can be used to fill the arrow.\r\n */\n value: function draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var point = {\n x: -0.3,\n y: 0\n };\n EndPoint.transform(point, arrowData); // Update endpoint style for drawing transparent arc.\n\n ctx.strokeStyle = ctx.fillStyle;\n ctx.fillStyle = \"rgba(0, 0, 0, 0)\"; // Define inverted curve endpoint as semicircle.\n\n var pi = Math.PI;\n var startAngle = arrowData.angle + pi / 2;\n var endAngle = arrowData.angle + 3 * pi / 2;\n ctx.beginPath();\n ctx.arc(point.x, point.y, arrowData.length * 0.4, startAngle, endAngle, false);\n ctx.stroke();\n return true;\n }\n }]);\n\n return InvertedCurve;\n}();\n/**\r\n * Drawing methods for the trinagle endpoint.\r\n */\n\n\nvar Triangle$1 = /*#__PURE__*/function () {\n function Triangle() {\n classCallCheck(this, Triangle);\n }\n\n createClass(Triangle, null, [{\n key: \"draw\",\n\n /**\r\n * Draw this shape at the end of a line.\r\n *\r\n * @param ctx - The shape will be rendered into this context.\r\n * @param arrowData - The data determining the shape.\r\n *\r\n * @returns True because ctx.fill() can be used to fill the arrow.\r\n */\n value: function draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [{\n x: 0.02,\n y: 0\n }, {\n x: -1,\n y: 0.3\n }, {\n x: -1,\n y: -0.3\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n }]);\n\n return Triangle;\n}();\n/**\r\n * Drawing methods for the inverted trinagle endpoint.\r\n */\n\n\nvar InvertedTriangle = /*#__PURE__*/function () {\n function InvertedTriangle() {\n classCallCheck(this, InvertedTriangle);\n }\n\n createClass(InvertedTriangle, null, [{\n key: \"draw\",\n\n /**\r\n * Draw this shape at the end of a line.\r\n *\r\n * @param ctx - The shape will be rendered into this context.\r\n * @param arrowData - The data determining the shape.\r\n *\r\n * @returns True because ctx.fill() can be used to fill the arrow.\r\n */\n value: function draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [{\n x: 0,\n y: 0.3\n }, {\n x: 0,\n y: -0.3\n }, {\n x: -1,\n y: 0\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n }]);\n\n return InvertedTriangle;\n}();\n/**\r\n * Drawing methods for the circle endpoint.\r\n */\n\n\nvar Circle$1 = /*#__PURE__*/function () {\n function Circle() {\n classCallCheck(this, Circle);\n }\n\n createClass(Circle, null, [{\n key: \"draw\",\n\n /**\r\n * Draw this shape at the end of a line.\r\n *\r\n * @param ctx - The shape will be rendered into this context.\r\n * @param arrowData - The data determining the shape.\r\n *\r\n * @returns True because ctx.fill() can be used to fill the arrow.\r\n */\n value: function draw(ctx, arrowData) {\n var point = {\n x: -0.4,\n y: 0\n };\n EndPoint.transform(point, arrowData);\n drawCircle(ctx, point.x, point.y, arrowData.length * 0.4);\n return true;\n }\n }]);\n\n return Circle;\n}();\n/**\r\n * Drawing methods for the bar endpoint.\r\n */\n\n\nvar Bar = /*#__PURE__*/function () {\n function Bar() {\n classCallCheck(this, Bar);\n }\n\n createClass(Bar, null, [{\n key: \"draw\",\n\n /**\r\n * Draw this shape at the end of a line.\r\n *\r\n * @param ctx - The shape will be rendered into this context.\r\n * @param arrowData - The data determining the shape.\r\n *\r\n * @returns True because ctx.fill() can be used to fill the arrow.\r\n */\n value: function draw(ctx, arrowData) {\n /*\r\n var points = [\r\n {x:0, y:0.5},\r\n {x:0, y:-0.5}\r\n ];\r\n EndPoint.transform(points, arrowData);\r\n ctx.beginPath();\r\n ctx.moveTo(points[0].x, points[0].y);\r\n ctx.lineTo(points[1].x, points[1].y);\r\n ctx.stroke();\r\n */\n var points = [{\n x: 0,\n y: 0.5\n }, {\n x: 0,\n y: -0.5\n }, {\n x: -0.15,\n y: -0.5\n }, {\n x: -0.15,\n y: 0.5\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n }]);\n\n return Bar;\n}();\n/**\r\n * Drawing methods for the box endpoint.\r\n */\n\n\nvar Box$1 = /*#__PURE__*/function () {\n function Box() {\n classCallCheck(this, Box);\n }\n\n createClass(Box, null, [{\n key: \"draw\",\n\n /**\r\n * Draw this shape at the end of a line.\r\n *\r\n * @param ctx - The shape will be rendered into this context.\r\n * @param arrowData - The data determining the shape.\r\n *\r\n * @returns True because ctx.fill() can be used to fill the arrow.\r\n */\n value: function draw(ctx, arrowData) {\n var points = [{\n x: 0,\n y: 0.3\n }, {\n x: 0,\n y: -0.3\n }, {\n x: -0.6,\n y: -0.3\n }, {\n x: -0.6,\n y: 0.3\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n }]);\n\n return Box;\n}();\n/**\r\n * Drawing methods for the diamond endpoint.\r\n */\n\n\nvar Diamond$1 = /*#__PURE__*/function () {\n function Diamond() {\n classCallCheck(this, Diamond);\n }\n\n createClass(Diamond, null, [{\n key: \"draw\",\n\n /**\r\n * Draw this shape at the end of a line.\r\n *\r\n * @param ctx - The shape will be rendered into this context.\r\n * @param arrowData - The data determining the shape.\r\n *\r\n * @returns True because ctx.fill() can be used to fill the arrow.\r\n */\n value: function draw(ctx, arrowData) {\n var points = [{\n x: 0,\n y: 0\n }, {\n x: -0.5,\n y: -0.3\n }, {\n x: -1,\n y: 0\n }, {\n x: -0.5,\n y: 0.3\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n }]);\n\n return Diamond;\n}();\n/**\r\n * Drawing methods for the vee endpoint.\r\n */\n\n\nvar Vee = /*#__PURE__*/function () {\n function Vee() {\n classCallCheck(this, Vee);\n }\n\n createClass(Vee, null, [{\n key: \"draw\",\n\n /**\r\n * Draw this shape at the end of a line.\r\n *\r\n * @param ctx - The shape will be rendered into this context.\r\n * @param arrowData - The data determining the shape.\r\n *\r\n * @returns True because ctx.fill() can be used to fill the arrow.\r\n */\n value: function draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [{\n x: -1,\n y: 0.3\n }, {\n x: -0.5,\n y: 0\n }, {\n x: -1,\n y: -0.3\n }, {\n x: 0,\n y: 0\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n }]);\n\n return Vee;\n}();\n/**\r\n * Drawing methods for the endpoints.\r\n */\n\n\nvar EndPoints = /*#__PURE__*/function () {\n function EndPoints() {\n classCallCheck(this, EndPoints);\n }\n\n createClass(EndPoints, null, [{\n key: \"draw\",\n\n /**\r\n * Draw an endpoint.\r\n *\r\n * @param ctx - The shape will be rendered into this context.\r\n * @param arrowData - The data determining the shape.\r\n *\r\n * @returns True if ctx.fill() can be used to fill the arrow, false otherwise.\r\n */\n value: function draw(ctx, arrowData) {\n var type;\n\n if (arrowData.type) {\n type = arrowData.type.toLowerCase();\n }\n\n switch (type) {\n case \"image\":\n return Image$2.draw(ctx, arrowData);\n\n case \"circle\":\n return Circle$1.draw(ctx, arrowData);\n\n case \"box\":\n return Box$1.draw(ctx, arrowData);\n\n case \"crow\":\n return Crow.draw(ctx, arrowData);\n\n case \"curve\":\n return Curve.draw(ctx, arrowData);\n\n case \"diamond\":\n return Diamond$1.draw(ctx, arrowData);\n\n case \"inv_curve\":\n return InvertedCurve.draw(ctx, arrowData);\n\n case \"triangle\":\n return Triangle$1.draw(ctx, arrowData);\n\n case \"inv_triangle\":\n return InvertedTriangle.draw(ctx, arrowData);\n\n case \"bar\":\n return Bar.draw(ctx, arrowData);\n\n case \"vee\":\n return Vee.draw(ctx, arrowData);\n\n case \"arrow\": // fall-through\n\n default:\n return Arrow.draw(ctx, arrowData);\n }\n }\n }]);\n\n return EndPoints;\n}();\n\nfunction ownKeys$7(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); if (enumerableOnly) symbols = filter$2(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context2; forEach$2(_context2 = ownKeys$7(Object(source), true)).call(_context2, function (key) { defineProperty$7(target, key, source[key]); }); } else if (getOwnPropertyDescriptors$2) { defineProperties$1(target, getOwnPropertyDescriptors$2(source)); } else { var _context3; forEach$2(_context3 = ownKeys$7(Object(source))).call(_context3, function (key) { defineProperty$2(target, key, getOwnPropertyDescriptor$3(source, key)); }); } } return target; }\n/**\r\n * The Base Class for all edges.\r\n */\n\nvar EdgeBase = /*#__PURE__*/function () {\n /**\r\n * Create a new instance.\r\n *\r\n * @param options - The options object of given edge.\r\n * @param _body - The body of the network.\r\n * @param _labelModule - Label module.\r\n */\n function EdgeBase(options, _body, _labelModule) {\n classCallCheck(this, EdgeBase);\n\n this._body = _body;\n this._labelModule = _labelModule;\n this.color = {};\n this.colorDirty = true;\n this.hoverWidth = 1.5;\n this.selectionWidth = 2;\n this.setOptions(options);\n this.fromPoint = this.from;\n this.toPoint = this.to;\n }\n /** @inheritdoc */\n\n\n createClass(EdgeBase, [{\n key: \"connect\",\n value: function connect() {\n this.from = this._body.nodes[this.options.from];\n this.to = this._body.nodes[this.options.to];\n }\n /** @inheritdoc */\n\n }, {\n key: \"cleanup\",\n value: function cleanup() {\n return false;\n }\n /**\r\n * Set new edge options.\r\n *\r\n * @param options - The new edge options object.\r\n */\n\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n this.from = this._body.nodes[this.options.from];\n this.to = this._body.nodes[this.options.to];\n this.id = this.options.id;\n }\n /** @inheritdoc */\n\n }, {\n key: \"drawLine\",\n value: function drawLine(ctx, values, _selected, _hover) {\n var viaNode = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.getViaNode();\n // set style\n ctx.strokeStyle = this.getColor(ctx, values);\n ctx.lineWidth = values.width;\n\n if (values.dashes !== false) {\n this._drawDashedLine(ctx, values, viaNode);\n } else {\n this._drawLine(ctx, values, viaNode);\n }\n }\n /**\r\n * Draw a line with given style between two nodes through supplied node(s).\r\n *\r\n * @param ctx - The context that will be used for rendering.\r\n * @param values - Formatting values like color, opacity or shadow.\r\n * @param viaNode - Additional control point(s) for the edge.\r\n * @param fromPoint - TODO: Seems ignored, remove?\r\n * @param toPoint - TODO: Seems ignored, remove?\r\n */\n\n }, {\n key: \"_drawLine\",\n value: function _drawLine(ctx, values, viaNode, fromPoint, toPoint) {\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode, fromPoint, toPoint);\n } else {\n var _this$_getCircleData = this._getCircleData(ctx),\n _this$_getCircleData2 = slicedToArray(_this$_getCircleData, 3),\n x = _this$_getCircleData2[0],\n y = _this$_getCircleData2[1],\n radius = _this$_getCircleData2[2];\n\n this._circle(ctx, values, x, y, radius);\n }\n }\n /**\r\n * Draw a dashed line with given style between two nodes through supplied node(s).\r\n *\r\n * @param ctx - The context that will be used for rendering.\r\n * @param values - Formatting values like color, opacity or shadow.\r\n * @param viaNode - Additional control point(s) for the edge.\r\n * @param _fromPoint - Ignored (TODO: remove in the future).\r\n * @param _toPoint - Ignored (TODO: remove in the future).\r\n */\n\n }, {\n key: \"_drawDashedLine\",\n value: function _drawDashedLine(ctx, values, viaNode, _fromPoint, _toPoint) {\n ctx.lineCap = \"round\";\n var pattern = isArray$5(values.dashes) ? values.dashes : [5, 5]; // only firefox and chrome support this method, else we use the legacy one.\n\n if (ctx.setLineDash !== undefined) {\n ctx.save(); // set dash settings for chrome or firefox\n\n ctx.setLineDash(pattern);\n ctx.lineDashOffset = 0; // draw the line\n\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode);\n } else {\n var _this$_getCircleData3 = this._getCircleData(ctx),\n _this$_getCircleData4 = slicedToArray(_this$_getCircleData3, 3),\n x = _this$_getCircleData4[0],\n y = _this$_getCircleData4[1],\n radius = _this$_getCircleData4[2];\n\n this._circle(ctx, values, x, y, radius);\n } // restore the dash settings.\n\n\n ctx.setLineDash([0]);\n ctx.lineDashOffset = 0;\n ctx.restore();\n } else {\n // unsupporting smooth lines\n if (this.from != this.to) {\n // draw line\n drawDashedLine(ctx, this.from.x, this.from.y, this.to.x, this.to.y, pattern);\n } else {\n var _this$_getCircleData5 = this._getCircleData(ctx),\n _this$_getCircleData6 = slicedToArray(_this$_getCircleData5, 3),\n _x = _this$_getCircleData6[0],\n _y = _this$_getCircleData6[1],\n _radius = _this$_getCircleData6[2];\n\n this._circle(ctx, values, _x, _y, _radius);\n } // draw shadow if enabled\n\n\n this.enableShadow(ctx, values);\n ctx.stroke(); // disable shadows for other elements.\n\n this.disableShadow(ctx, values);\n }\n }\n /**\r\n * Find the intersection between the border of the node and the edge.\r\n *\r\n * @param node - The node (either from or to node of the edge).\r\n * @param ctx - The context that will be used for rendering.\r\n * @param options - Additional options.\r\n *\r\n * @returns Cartesian coordinates of the intersection between the border of the node and the edge.\r\n */\n\n }, {\n key: \"findBorderPosition\",\n value: function findBorderPosition(node, ctx, options) {\n if (this.from != this.to) {\n return this._findBorderPosition(node, ctx, options);\n } else {\n return this._findBorderPositionCircle(node, ctx, options);\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"findBorderPositions\",\n value: function findBorderPositions(ctx) {\n if (this.from != this.to) {\n return {\n from: this._findBorderPosition(this.from, ctx),\n to: this._findBorderPosition(this.to, ctx)\n };\n } else {\n var _context;\n\n var _this$_getCircleData$ = slice$5(_context = this._getCircleData(ctx)).call(_context, 0, 2),\n _this$_getCircleData$2 = slicedToArray(_this$_getCircleData$, 2),\n x = _this$_getCircleData$2[0],\n y = _this$_getCircleData$2[1];\n\n return {\n from: this._findBorderPositionCircle(this.from, ctx, {\n x: x,\n y: y,\n low: 0.25,\n high: 0.6,\n direction: -1\n }),\n to: this._findBorderPositionCircle(this.from, ctx, {\n x: x,\n y: y,\n low: 0.6,\n high: 0.8,\n direction: 1\n })\n };\n }\n }\n /**\r\n * Compute the center point and radius of an edge connected to the same node at both ends.\r\n *\r\n * @param ctx - The context that will be used for rendering.\r\n *\r\n * @returns `[x, y, radius]`\r\n */\n\n }, {\n key: \"_getCircleData\",\n value: function _getCircleData(ctx) {\n var radius = this.options.selfReference.size;\n\n if (ctx !== undefined) {\n if (this.from.shape.width === undefined) {\n this.from.shape.resize(ctx);\n }\n } // get circle coordinates\n\n\n var coordinates = getSelfRefCoordinates(ctx, this.options.selfReference.angle, radius, this.from);\n return [coordinates.x, coordinates.y, radius];\n }\n /**\r\n * Get a point on a circle.\r\n *\r\n * @param x - Center of the circle on the x axis.\r\n * @param y - Center of the circle on the y axis.\r\n * @param radius - Radius of the circle.\r\n * @param position - Value between 0 (line start) and 1 (line end).\r\n *\r\n * @returns Cartesian coordinates of requested point on the circle.\r\n */\n\n }, {\n key: \"_pointOnCircle\",\n value: function _pointOnCircle(x, y, radius, position) {\n var angle = position * 2 * Math.PI;\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n };\n }\n /**\r\n * Find the intersection between the border of the node and the edge.\r\n *\r\n * @remarks\r\n * This function uses binary search to look for the point where the circle crosses the border of the node.\r\n *\r\n * @param nearNode - The node (either from or to node of the edge).\r\n * @param ctx - The context that will be used for rendering.\r\n * @param options - Additional options.\r\n *\r\n * @returns Cartesian coordinates of the intersection between the border of the node and the edge.\r\n */\n\n }, {\n key: \"_findBorderPositionCircle\",\n value: function _findBorderPositionCircle(nearNode, ctx, options) {\n var x = options.x;\n var y = options.y;\n var low = options.low;\n var high = options.high;\n var direction = options.direction;\n var maxIterations = 10;\n var radius = this.options.selfReference.size;\n var threshold = 0.05;\n var pos;\n var middle = (low + high) * 0.5;\n var endPointOffset = 0;\n\n if (this.options.arrowStrikethrough === true) {\n if (direction === -1) {\n endPointOffset = this.options.endPointOffset.from;\n } else if (direction === 1) {\n endPointOffset = this.options.endPointOffset.to;\n }\n }\n\n var iteration = 0;\n\n do {\n middle = (low + high) * 0.5;\n pos = this._pointOnCircle(x, y, radius, middle);\n var angle = Math.atan2(nearNode.y - pos.y, nearNode.x - pos.x);\n var distanceToBorder = nearNode.distanceToBorder(ctx, angle) + endPointOffset;\n var distanceToPoint = Math.sqrt(Math.pow(pos.x - nearNode.x, 2) + Math.pow(pos.y - nearNode.y, 2));\n var difference = distanceToBorder - distanceToPoint;\n\n if (Math.abs(difference) < threshold) {\n break; // found\n } else if (difference > 0) {\n // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (direction > 0) {\n low = middle;\n } else {\n high = middle;\n }\n } else {\n if (direction > 0) {\n high = middle;\n } else {\n low = middle;\n }\n }\n\n ++iteration;\n } while (low <= high && iteration < maxIterations);\n\n return _objectSpread$3(_objectSpread$3({}, pos), {}, {\n t: middle\n });\n }\n /**\r\n * Get the line width of the edge. Depends on width and whether one of the connected nodes is selected.\r\n *\r\n * @param selected - Determines wheter the line is selected.\r\n * @param hover - Determines wheter the line is being hovered, only applies if selected is false.\r\n *\r\n * @returns The width of the line.\r\n */\n\n }, {\n key: \"getLineWidth\",\n value: function getLineWidth(selected, hover) {\n if (selected === true) {\n return Math.max(this.selectionWidth, 0.3 / this._body.view.scale);\n } else if (hover === true) {\n return Math.max(this.hoverWidth, 0.3 / this._body.view.scale);\n } else {\n return Math.max(this.options.width, 0.3 / this._body.view.scale);\n }\n }\n /**\r\n * Compute the color or gradient for given edge.\r\n *\r\n * @param ctx - The context that will be used for rendering.\r\n * @param values - Formatting values like color, opacity or shadow.\r\n * @param _selected - Ignored (TODO: remove in the future).\r\n * @param _hover - Ignored (TODO: remove in the future).\r\n *\r\n * @returns Color string if single color is inherited or gradient if two.\r\n */\n\n }, {\n key: \"getColor\",\n value: function getColor(ctx, values) {\n if (values.inheritsColor !== false) {\n // when this is a loop edge, just use the 'from' method\n if (values.inheritsColor === \"both\" && this.from.id !== this.to.id) {\n var grd = ctx.createLinearGradient(this.from.x, this.from.y, this.to.x, this.to.y);\n var fromColor = this.from.options.color.highlight.border;\n var toColor = this.to.options.color.highlight.border;\n\n if (this.from.selected === false && this.to.selected === false) {\n fromColor = overrideOpacity(this.from.options.color.border, values.opacity);\n toColor = overrideOpacity(this.to.options.color.border, values.opacity);\n } else if (this.from.selected === true && this.to.selected === false) {\n toColor = this.to.options.color.border;\n } else if (this.from.selected === false && this.to.selected === true) {\n fromColor = this.from.options.color.border;\n }\n\n grd.addColorStop(0, fromColor);\n grd.addColorStop(1, toColor); // -------------------- this returns -------------------- //\n\n return grd;\n }\n\n if (values.inheritsColor === \"to\") {\n return overrideOpacity(this.to.options.color.border, values.opacity);\n } else {\n // \"from\"\n return overrideOpacity(this.from.options.color.border, values.opacity);\n }\n } else {\n return overrideOpacity(values.color, values.opacity);\n }\n }\n /**\r\n * Draw a line from a node to itself, a circle.\r\n *\r\n * @param ctx - The context that will be used for rendering.\r\n * @param values - Formatting values like color, opacity or shadow.\r\n * @param x - Center of the circle on the x axis.\r\n * @param y - Center of the circle on the y axis.\r\n * @param radius - Radius of the circle.\r\n */\n\n }, {\n key: \"_circle\",\n value: function _circle(ctx, values, x, y, radius) {\n // draw shadow if enabled\n this.enableShadow(ctx, values); //full circle\n\n var angleFrom = 0;\n var angleTo = Math.PI * 2;\n\n if (!this.options.selfReference.renderBehindTheNode) {\n //render only parts which are not overlaping with parent node\n //need to find x,y of from point and x,y to point\n //calculating radians\n var low = this.options.selfReference.angle;\n var high = this.options.selfReference.angle + Math.PI;\n\n var pointTFrom = this._findBorderPositionCircle(this.from, ctx, {\n x: x,\n y: y,\n low: low,\n high: high,\n direction: -1\n });\n\n var pointTTo = this._findBorderPositionCircle(this.from, ctx, {\n x: x,\n y: y,\n low: low,\n high: high,\n direction: 1\n });\n\n angleFrom = Math.atan2(pointTFrom.y - y, pointTFrom.x - x);\n angleTo = Math.atan2(pointTTo.y - y, pointTTo.x - x);\n } // draw a circle\n\n\n ctx.beginPath();\n ctx.arc(x, y, radius, angleFrom, angleTo, false);\n ctx.stroke(); // disable shadows for other elements.\n\n this.disableShadow(ctx, values);\n }\n /**\r\n * @inheritdoc\r\n *\r\n * @remarks\r\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\r\n */\n\n }, {\n key: \"getDistanceToEdge\",\n value: function getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n if (this.from != this.to) {\n return this._getDistanceToEdge(x1, y1, x2, y2, x3, y3);\n } else {\n var _this$_getCircleData7 = this._getCircleData(undefined),\n _this$_getCircleData8 = slicedToArray(_this$_getCircleData7, 3),\n x = _this$_getCircleData8[0],\n y = _this$_getCircleData8[1],\n radius = _this$_getCircleData8[2];\n\n var dx = x - x3;\n var dy = y - y3;\n return Math.abs(Math.sqrt(dx * dx + dy * dy) - radius);\n }\n }\n /**\r\n * Calculate the distance between a point (x3, y3) and a line segment from (x1, y1) to (x2, y2).\r\n *\r\n * @param x1 - First end of the line segment on the x axis.\r\n * @param y1 - First end of the line segment on the y axis.\r\n * @param x2 - Second end of the line segment on the x axis.\r\n * @param y2 - Second end of the line segment on the y axis.\r\n * @param x3 - Position of the point on the x axis.\r\n * @param y3 - Position of the point on the y axis.\r\n *\r\n * @returns The distance between the line segment and the point.\r\n */\n\n }, {\n key: \"_getDistanceToLine\",\n value: function _getDistanceToLine(x1, y1, x2, y2, x3, y3) {\n var px = x2 - x1;\n var py = y2 - y1;\n var something = px * px + py * py;\n var u = ((x3 - x1) * px + (y3 - y1) * py) / something;\n\n if (u > 1) {\n u = 1;\n } else if (u < 0) {\n u = 0;\n }\n\n var x = x1 + u * px;\n var y = y1 + u * py;\n var dx = x - x3;\n var dy = y - y3; //# Note: If the actual distance does not matter,\n //# if you only want to compare what this function\n //# returns to other results of this function, you\n //# can just return the squared distance instead\n //# (i.e. remove the sqrt) to gain a little performance\n\n return Math.sqrt(dx * dx + dy * dy);\n }\n /** @inheritdoc */\n\n }, {\n key: \"getArrowData\",\n value: function getArrowData(ctx, position, viaNode, _selected, _hover, values) {\n // set lets\n var angle;\n var arrowPoint;\n var node1;\n var node2;\n var reversed;\n var scaleFactor;\n var type;\n var lineWidth = values.width;\n\n if (position === \"from\") {\n node1 = this.from;\n node2 = this.to;\n reversed = values.fromArrowScale < 0;\n scaleFactor = Math.abs(values.fromArrowScale);\n type = values.fromArrowType;\n } else if (position === \"to\") {\n node1 = this.to;\n node2 = this.from;\n reversed = values.toArrowScale < 0;\n scaleFactor = Math.abs(values.toArrowScale);\n type = values.toArrowType;\n } else {\n node1 = this.to;\n node2 = this.from;\n reversed = values.middleArrowScale < 0;\n scaleFactor = Math.abs(values.middleArrowScale);\n type = values.middleArrowType;\n }\n\n var length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge.\n // if not connected to itself\n\n if (node1 != node2) {\n var approximateEdgeLength = hypot$2(node1.x - node2.x, node1.y - node2.y);\n\n var relativeLength = length / approximateEdgeLength;\n\n if (position !== \"middle\") {\n // draw arrow head\n if (this.options.smooth.enabled === true) {\n var pointT = this._findBorderPosition(node1, ctx, {\n via: viaNode\n });\n\n var guidePos = this.getPoint(pointT.t + relativeLength * (position === \"from\" ? 1 : -1), viaNode);\n angle = Math.atan2(pointT.y - guidePos.y, pointT.x - guidePos.x);\n arrowPoint = pointT;\n } else {\n angle = Math.atan2(node1.y - node2.y, node1.x - node2.x);\n arrowPoint = this._findBorderPosition(node1, ctx);\n }\n } else {\n // Negative half length reverses arrow direction.\n var halfLength = (reversed ? -relativeLength : relativeLength) / 2;\n var guidePos1 = this.getPoint(0.5 + halfLength, viaNode);\n var guidePos2 = this.getPoint(0.5 - halfLength, viaNode);\n angle = Math.atan2(guidePos1.y - guidePos2.y, guidePos1.x - guidePos2.x);\n arrowPoint = this.getPoint(0.5, viaNode);\n }\n } else {\n // draw circle\n var _this$_getCircleData9 = this._getCircleData(ctx),\n _this$_getCircleData10 = slicedToArray(_this$_getCircleData9, 3),\n x = _this$_getCircleData10[0],\n y = _this$_getCircleData10[1],\n radius = _this$_getCircleData10[2];\n\n if (position === \"from\") {\n var low = this.options.selfReference.angle;\n var high = this.options.selfReference.angle + Math.PI;\n\n var _pointT = this._findBorderPositionCircle(this.from, ctx, {\n x: x,\n y: y,\n low: low,\n high: high,\n direction: -1\n });\n\n angle = _pointT.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n arrowPoint = _pointT;\n } else if (position === \"to\") {\n var _low = this.options.selfReference.angle;\n\n var _high = this.options.selfReference.angle + Math.PI;\n\n var _pointT2 = this._findBorderPositionCircle(this.from, ctx, {\n x: x,\n y: y,\n low: _low,\n high: _high,\n direction: 1\n });\n\n angle = _pointT2.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI;\n arrowPoint = _pointT2;\n } else {\n var pos = this.options.selfReference.angle / (2 * Math.PI);\n arrowPoint = this._pointOnCircle(x, y, radius, pos);\n angle = pos * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n }\n }\n\n var xi = arrowPoint.x - length * 0.9 * Math.cos(angle);\n var yi = arrowPoint.y - length * 0.9 * Math.sin(angle);\n var arrowCore = {\n x: xi,\n y: yi\n };\n return {\n point: arrowPoint,\n core: arrowCore,\n angle: angle,\n length: length,\n type: type\n };\n }\n /** @inheritdoc */\n\n }, {\n key: \"drawArrowHead\",\n value: function drawArrowHead(ctx, values, _selected, _hover, arrowData) {\n // set style\n ctx.strokeStyle = this.getColor(ctx, values);\n ctx.fillStyle = ctx.strokeStyle;\n ctx.lineWidth = values.width;\n var canFill = EndPoints.draw(ctx, arrowData);\n\n if (canFill) {\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n\n fill$2(ctx).call(ctx); // disable shadows for other elements.\n\n\n this.disableShadow(ctx, values);\n }\n }\n /**\r\n * Set the shadow formatting values in the context if enabled, do nothing otherwise.\r\n *\r\n * @param ctx - The context that will be used for rendering.\r\n * @param values - Formatting values for the shadow.\r\n */\n\n }, {\n key: \"enableShadow\",\n value: function enableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n /**\r\n * Reset the shadow formatting values in the context if enabled, do nothing otherwise.\r\n *\r\n * @param ctx - The context that will be used for rendering.\r\n * @param values - Formatting values for the shadow.\r\n */\n\n }, {\n key: \"disableShadow\",\n value: function disableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = \"rgba(0,0,0,0)\";\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n /**\r\n * Render the background according to the formatting values.\r\n *\r\n * @param ctx - The context that will be used for rendering.\r\n * @param values - Formatting values for the background.\r\n */\n\n }, {\n key: \"drawBackground\",\n value: function drawBackground(ctx, values) {\n if (values.background !== false) {\n // save original line attrs\n var origCtxAttr = {\n strokeStyle: ctx.strokeStyle,\n lineWidth: ctx.lineWidth,\n dashes: ctx.dashes\n };\n ctx.strokeStyle = values.backgroundColor;\n ctx.lineWidth = values.backgroundSize;\n this.setStrokeDashed(ctx, values.backgroundDashes);\n ctx.stroke(); // restore original line attrs\n\n ctx.strokeStyle = origCtxAttr.strokeStyle;\n ctx.lineWidth = origCtxAttr.lineWidth;\n ctx.dashes = origCtxAttr.dashes;\n this.setStrokeDashed(ctx, values.dashes);\n }\n }\n /**\r\n * Set the line dash pattern if supported. Logs a warning to the console if it isn't supported.\r\n *\r\n * @param ctx - The context that will be used for rendering.\r\n * @param dashes - The pattern [line, space, line…], true for default dashed line or false for normal line.\r\n */\n\n }, {\n key: \"setStrokeDashed\",\n value: function setStrokeDashed(ctx, dashes) {\n if (dashes !== false) {\n if (ctx.setLineDash !== undefined) {\n var pattern = isArray$5(dashes) ? dashes : [5, 5];\n ctx.setLineDash(pattern);\n } else {\n console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\");\n }\n } else {\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([]);\n } else {\n console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\");\n }\n }\n }\n }]);\n\n return EdgeBase;\n}();\n\nfunction ownKeys$8(object, enumerableOnly) { var keys = keys$3(object); if (getOwnPropertySymbols$2) { var symbols = getOwnPropertySymbols$2(object); if (enumerableOnly) symbols = filter$2(symbols).call(symbols, function (sym) { return getOwnPropertyDescriptor$3(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context; forEach$2(_context = ownKeys$8(Object(source), true)).call(_context, function (key) { defineProperty$7(target, key, source[key]); }); } else if (getOwnPropertyDescriptors$2) { defineProperties$1(target, getOwnPropertyDescriptors$2(source)); } else { var _context2; forEach$2(_context2 = ownKeys$8(Object(source))).call(_context2, function (key) { defineProperty$2(target, key, getOwnPropertyDescriptor$3(source, key)); }); } } return target; }\n\nfunction _createSuper$k(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$k(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$k() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\r\n * The Base Class for all Bezier edges.\r\n * Bezier curves are used to model smooth gradual curves in paths between nodes.\r\n */\n\nvar BezierEdgeBase = /*#__PURE__*/function (_EdgeBase) {\n inherits(BezierEdgeBase, _EdgeBase);\n\n var _super = _createSuper$k(BezierEdgeBase);\n\n /**\r\n * Create a new instance.\r\n *\r\n * @param options - The options object of given edge.\r\n * @param body - The body of the network.\r\n * @param labelModule - Label module.\r\n */\n function BezierEdgeBase(options, body, labelModule) {\n classCallCheck(this, BezierEdgeBase);\n\n return _super.call(this, options, body, labelModule);\n }\n /**\r\n * Find the intersection between the border of the node and the edge.\r\n *\r\n * @remarks\r\n * This function uses binary search to look for the point where the bezier curve crosses the border of the node.\r\n *\r\n * @param nearNode - The node (either from or to node of the edge).\r\n * @param ctx - The context that will be used for rendering.\r\n * @param viaNode - Additional node(s) the edge passes through.\r\n *\r\n * @returns Cartesian coordinates of the intersection between the border of the node and the edge.\r\n */\n\n\n createClass(BezierEdgeBase, [{\n key: \"_findBorderPositionBezier\",\n value: function _findBorderPositionBezier(nearNode, ctx) {\n var viaNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._getViaCoordinates();\n var maxIterations = 10;\n var threshold = 0.2;\n var from = false;\n var high = 1;\n var low = 0;\n var node = this.to;\n var pos;\n var middle;\n var endPointOffset = this.options.endPointOffset ? this.options.endPointOffset.to : 0;\n\n if (nearNode.id === this.from.id) {\n node = this.from;\n from = true;\n endPointOffset = this.options.endPointOffset ? this.options.endPointOffset.from : 0;\n }\n\n if (this.options.arrowStrikethrough === false) {\n endPointOffset = 0;\n }\n\n var iteration = 0;\n\n do {\n middle = (low + high) * 0.5;\n pos = this.getPoint(middle, viaNode);\n var angle = Math.atan2(node.y - pos.y, node.x - pos.x);\n var distanceToBorder = node.distanceToBorder(ctx, angle) + endPointOffset;\n var distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2));\n var difference = distanceToBorder - distanceToPoint;\n\n if (Math.abs(difference) < threshold) {\n break; // found\n } else if (difference < 0) {\n // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (from === false) {\n low = middle;\n } else {\n high = middle;\n }\n } else {\n if (from === false) {\n high = middle;\n } else {\n low = middle;\n }\n }\n\n ++iteration;\n } while (low <= high && iteration < maxIterations);\n\n return _objectSpread$4(_objectSpread$4({}, pos), {}, {\n t: middle\n });\n }\n /**\r\n * Calculate the distance between a point (x3,y3) and a line segment from (x1,y1) to (x2,y2).\r\n *\r\n * @remarks\r\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\r\n *\r\n * @param x1 - First end of the line segment on the x axis.\r\n * @param y1 - First end of the line segment on the y axis.\r\n * @param x2 - Second end of the line segment on the x axis.\r\n * @param y2 - Second end of the line segment on the y axis.\r\n * @param x3 - Position of the point on the x axis.\r\n * @param y3 - Position of the point on the y axis.\r\n * @param via - The control point for the edge.\r\n *\r\n * @returns The distance between the line segment and the point.\r\n */\n\n }, {\n key: \"_getDistanceToBezierEdge\",\n value: function _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via) {\n // x3,y3 is the point\n var minDistance = 1e9;\n var distance;\n var i, t, x, y;\n var lastX = x1;\n var lastY = y1;\n\n for (i = 1; i < 10; i++) {\n t = 0.1 * i;\n x = Math.pow(1 - t, 2) * x1 + 2 * t * (1 - t) * via.x + Math.pow(t, 2) * x2;\n y = Math.pow(1 - t, 2) * y1 + 2 * t * (1 - t) * via.y + Math.pow(t, 2) * y2;\n\n if (i > 0) {\n distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n minDistance = distance < minDistance ? distance : minDistance;\n }\n\n lastX = x;\n lastY = y;\n }\n\n return minDistance;\n }\n /**\r\n * Render a bezier curve between two nodes.\r\n *\r\n * @remarks\r\n * The method accepts zero, one or two control points.\r\n * Passing zero control points just draws a straight line.\r\n *\r\n * @param ctx - The context that will be used for rendering.\r\n * @param values - Style options for edge drawing.\r\n * @param viaNode1 - First control point for curve drawing.\r\n * @param viaNode2 - Second control point for curve drawing.\r\n */\n\n }, {\n key: \"_bezierCurve\",\n value: function _bezierCurve(ctx, values, viaNode1, viaNode2) {\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y);\n\n if (viaNode1 != null && viaNode1.x != null) {\n if (viaNode2 != null && viaNode2.x != null) {\n ctx.bezierCurveTo(viaNode1.x, viaNode1.y, viaNode2.x, viaNode2.y, this.toPoint.x, this.toPoint.y);\n } else {\n ctx.quadraticCurveTo(viaNode1.x, viaNode1.y, this.toPoint.x, this.toPoint.y);\n }\n } else {\n // fallback to normal straight edge\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n } // draw a background\n\n\n this.drawBackground(ctx, values); // draw shadow if enabled\n\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n /** @inheritdoc */\n\n }, {\n key: \"getViaNode\",\n value: function getViaNode() {\n return this._getViaCoordinates();\n }\n }]);\n\n return BezierEdgeBase;\n}(EdgeBase);\n\nfunction _createSuper$l(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$l(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$l() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\r\n * A Dynamic Bezier Edge. Bezier curves are used to model smooth gradual\r\n * curves in paths between nodes. The Dynamic piece refers to how the curve\r\n * reacts to physics changes.\r\n *\r\n * @extends BezierEdgeBase\r\n */\n\nvar BezierEdgeDynamic = /*#__PURE__*/function (_BezierEdgeBase) {\n inherits(BezierEdgeDynamic, _BezierEdgeBase);\n\n var _super = _createSuper$l(BezierEdgeDynamic);\n\n /**\r\n * Create a new instance.\r\n *\r\n * @param options - The options object of given edge.\r\n * @param body - The body of the network.\r\n * @param labelModule - Label module.\r\n */\n function BezierEdgeDynamic(options, body, labelModule) {\n var _this;\n\n classCallCheck(this, BezierEdgeDynamic);\n\n //this.via = undefined; // Here for completeness but not allowed to defined before super() is invoked.\n _this = _super.call(this, options, body, labelModule); // --> this calls the setOptions below\n\n _this.via = _this.via; // constructor → super → super → setOptions → setupSupportNode\n\n _this._boundFunction = function () {\n _this.positionBezierNode();\n };\n\n _this._body.emitter.on(\"_repositionBezierNodes\", _this._boundFunction);\n\n return _this;\n }\n /** @inheritdoc */\n\n\n createClass(BezierEdgeDynamic, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n get$5(getPrototypeOf$5(BezierEdgeDynamic.prototype), \"setOptions\", this).call(this, options); // check if the physics has changed.\n\n\n var physicsChange = false;\n\n if (this.options.physics !== options.physics) {\n physicsChange = true;\n } // set the options and the to and from nodes\n\n\n this.options = options;\n this.id = this.options.id;\n this.from = this._body.nodes[this.options.from];\n this.to = this._body.nodes[this.options.to]; // setup the support node and connect\n\n this.setupSupportNode();\n this.connect(); // when we change the physics state of the edge, we reposition the support node.\n\n if (physicsChange === true) {\n this.via.setOptions({\n physics: this.options.physics\n });\n this.positionBezierNode();\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"connect\",\n value: function connect() {\n this.from = this._body.nodes[this.options.from];\n this.to = this._body.nodes[this.options.to];\n\n if (this.from === undefined || this.to === undefined || this.options.physics === false) {\n this.via.setOptions({\n physics: false\n });\n } else {\n // fix weird behaviour where a self referencing node has physics enabled\n if (this.from.id === this.to.id) {\n this.via.setOptions({\n physics: false\n });\n } else {\n this.via.setOptions({\n physics: true\n });\n }\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"cleanup\",\n value: function cleanup() {\n this._body.emitter.off(\"_repositionBezierNodes\", this._boundFunction);\n\n if (this.via !== undefined) {\n delete this._body.nodes[this.via.id];\n this.via = undefined;\n return true;\n }\n\n return false;\n }\n /**\r\n * Create and add a support node if not already present.\r\n *\r\n * @remarks\r\n * Bezier curves require an anchor point to calculate the smooth flow.\r\n * These points are nodes.\r\n * These nodes are invisible but are used for the force calculation.\r\n *\r\n * The changed data is not called, if needed, it is returned by the main edge constructor.\r\n */\n\n }, {\n key: \"setupSupportNode\",\n value: function setupSupportNode() {\n if (this.via === undefined) {\n var nodeId = \"edgeId:\" + this.id;\n\n var node = this._body.functions.createNode({\n id: nodeId,\n shape: \"circle\",\n physics: true,\n hidden: true\n });\n\n this._body.nodes[nodeId] = node;\n this.via = node;\n this.via.parentEdgeId = this.id;\n this.positionBezierNode();\n }\n }\n /**\r\n * Position bezier node.\r\n */\n\n }, {\n key: \"positionBezierNode\",\n value: function positionBezierNode() {\n if (this.via !== undefined && this.from !== undefined && this.to !== undefined) {\n this.via.x = 0.5 * (this.from.x + this.to.x);\n this.via.y = 0.5 * (this.from.y + this.to.y);\n } else if (this.via !== undefined) {\n this.via.x = 0;\n this.via.y = 0;\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"_line\",\n value: function _line(ctx, values, viaNode) {\n this._bezierCurve(ctx, values, viaNode);\n }\n /** @inheritdoc */\n\n }, {\n key: \"_getViaCoordinates\",\n value: function _getViaCoordinates() {\n return this.via;\n }\n /** @inheritdoc */\n\n }, {\n key: \"getViaNode\",\n value: function getViaNode() {\n return this.via;\n }\n /** @inheritdoc */\n\n }, {\n key: \"getPoint\",\n value: function getPoint(position) {\n var viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.via;\n\n if (this.from === this.to) {\n var _this$_getCircleData = this._getCircleData(),\n _this$_getCircleData2 = slicedToArray(_this$_getCircleData, 3),\n cx = _this$_getCircleData2[0],\n cy = _this$_getCircleData2[1],\n cr = _this$_getCircleData2[2];\n\n var a = 2 * Math.PI * (1 - position);\n return {\n x: cx + cr * Math.sin(a),\n y: cy + cr - cr * (1 - Math.cos(a))\n };\n } else {\n return {\n x: Math.pow(1 - position, 2) * this.fromPoint.x + 2 * position * (1 - position) * viaNode.x + Math.pow(position, 2) * this.toPoint.x,\n y: Math.pow(1 - position, 2) * this.fromPoint.y + 2 * position * (1 - position) * viaNode.y + Math.pow(position, 2) * this.toPoint.y\n };\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"_findBorderPosition\",\n value: function _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx, this.via);\n }\n /** @inheritdoc */\n\n }, {\n key: \"_getDistanceToEdge\",\n value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, this.via);\n }\n }]);\n\n return BezierEdgeDynamic;\n}(BezierEdgeBase);\n\nfunction _createSuper$m(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$m(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$m() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\r\n * A Static Bezier Edge. Bezier curves are used to model smooth gradual curves in paths between nodes.\r\n */\n\nvar BezierEdgeStatic = /*#__PURE__*/function (_BezierEdgeBase) {\n inherits(BezierEdgeStatic, _BezierEdgeBase);\n\n var _super = _createSuper$m(BezierEdgeStatic);\n\n /**\r\n * Create a new instance.\r\n *\r\n * @param options - The options object of given edge.\r\n * @param body - The body of the network.\r\n * @param labelModule - Label module.\r\n */\n function BezierEdgeStatic(options, body, labelModule) {\n classCallCheck(this, BezierEdgeStatic);\n\n return _super.call(this, options, body, labelModule);\n }\n /** @inheritdoc */\n\n\n createClass(BezierEdgeStatic, [{\n key: \"_line\",\n value: function _line(ctx, values, viaNode) {\n this._bezierCurve(ctx, values, viaNode);\n }\n /** @inheritdoc */\n\n }, {\n key: \"getViaNode\",\n value: function getViaNode() {\n return this._getViaCoordinates();\n }\n /**\r\n * Compute the coordinates of the via node.\r\n *\r\n * @remarks\r\n * We do not use the to and fromPoints here to make the via nodes the same as edges without arrows.\r\n *\r\n * @returns Cartesian coordinates of the via node.\r\n */\n\n }, {\n key: \"_getViaCoordinates\",\n value: function _getViaCoordinates() {\n // Assumption: x/y coordinates in from/to always defined\n var factor = this.options.smooth.roundness;\n var type = this.options.smooth.type;\n var dx = Math.abs(this.from.x - this.to.x);\n var dy = Math.abs(this.from.y - this.to.y);\n\n if (type === \"discrete\" || type === \"diagonalCross\") {\n var stepX;\n var stepY;\n\n if (dx <= dy) {\n stepX = stepY = factor * dy;\n } else {\n stepX = stepY = factor * dx;\n }\n\n if (this.from.x > this.to.x) {\n stepX = -stepX;\n }\n\n if (this.from.y >= this.to.y) {\n stepY = -stepY;\n }\n\n var xVia = this.from.x + stepX;\n var yVia = this.from.y + stepY;\n\n if (type === \"discrete\") {\n if (dx <= dy) {\n xVia = dx < factor * dy ? this.from.x : xVia;\n } else {\n yVia = dy < factor * dx ? this.from.y : yVia;\n }\n }\n\n return {\n x: xVia,\n y: yVia\n };\n } else if (type === \"straightCross\") {\n var _stepX = (1 - factor) * dx;\n\n var _stepY = (1 - factor) * dy;\n\n if (dx <= dy) {\n // up - down\n _stepX = 0;\n\n if (this.from.y < this.to.y) {\n _stepY = -_stepY;\n }\n } else {\n // left - right\n if (this.from.x < this.to.x) {\n _stepX = -_stepX;\n }\n\n _stepY = 0;\n }\n\n return {\n x: this.to.x + _stepX,\n y: this.to.y + _stepY\n };\n } else if (type === \"horizontal\") {\n var _stepX2 = (1 - factor) * dx;\n\n if (this.from.x < this.to.x) {\n _stepX2 = -_stepX2;\n }\n\n return {\n x: this.to.x + _stepX2,\n y: this.from.y\n };\n } else if (type === \"vertical\") {\n var _stepY2 = (1 - factor) * dy;\n\n if (this.from.y < this.to.y) {\n _stepY2 = -_stepY2;\n }\n\n return {\n x: this.from.x,\n y: this.to.y + _stepY2\n };\n } else if (type === \"curvedCW\") {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n var radius = Math.sqrt(dx * dx + dy * dy);\n var pi = Math.PI;\n var originalAngle = Math.atan2(dy, dx);\n var myAngle = (originalAngle + (factor * 0.5 + 0.5) * pi) % (2 * pi);\n return {\n x: this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle),\n y: this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle)\n };\n } else if (type === \"curvedCCW\") {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n\n var _radius = Math.sqrt(dx * dx + dy * dy);\n\n var _pi = Math.PI;\n\n var _originalAngle = Math.atan2(dy, dx);\n\n var _myAngle = (_originalAngle + (-factor * 0.5 + 0.5) * _pi) % (2 * _pi);\n\n return {\n x: this.from.x + (factor * 0.5 + 0.5) * _radius * Math.sin(_myAngle),\n y: this.from.y + (factor * 0.5 + 0.5) * _radius * Math.cos(_myAngle)\n };\n } else {\n // continuous\n var _stepX3;\n\n var _stepY3;\n\n if (dx <= dy) {\n _stepX3 = _stepY3 = factor * dy;\n } else {\n _stepX3 = _stepY3 = factor * dx;\n }\n\n if (this.from.x > this.to.x) {\n _stepX3 = -_stepX3;\n }\n\n if (this.from.y >= this.to.y) {\n _stepY3 = -_stepY3;\n }\n\n var _xVia = this.from.x + _stepX3;\n\n var _yVia = this.from.y + _stepY3;\n\n if (dx <= dy) {\n if (this.from.x <= this.to.x) {\n _xVia = this.to.x < _xVia ? this.to.x : _xVia;\n } else {\n _xVia = this.to.x > _xVia ? this.to.x : _xVia;\n }\n } else {\n if (this.from.y >= this.to.y) {\n _yVia = this.to.y > _yVia ? this.to.y : _yVia;\n } else {\n _yVia = this.to.y < _yVia ? this.to.y : _yVia;\n }\n }\n\n return {\n x: _xVia,\n y: _yVia\n };\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"_findBorderPosition\",\n value: function _findBorderPosition(nearNode, ctx) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return this._findBorderPositionBezier(nearNode, ctx, options.via);\n }\n /** @inheritdoc */\n\n }, {\n key: \"_getDistanceToEdge\",\n value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n var viaNode = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates();\n // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, viaNode);\n }\n /** @inheritdoc */\n\n }, {\n key: \"getPoint\",\n value: function getPoint(position) {\n var viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates();\n var t = position;\n var x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x;\n var y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y;\n return {\n x: x,\n y: y\n };\n }\n }]);\n\n return BezierEdgeStatic;\n}(BezierEdgeBase);\n\nfunction _createSuper$n(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$n(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$n() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\r\n * A Base Class for all Cubic Bezier Edges. Bezier curves are used to model\r\n * smooth gradual curves in paths between nodes.\r\n *\r\n * @extends BezierEdgeBase\r\n */\n\nvar CubicBezierEdgeBase = /*#__PURE__*/function (_BezierEdgeBase) {\n inherits(CubicBezierEdgeBase, _BezierEdgeBase);\n\n var _super = _createSuper$n(CubicBezierEdgeBase);\n\n /**\r\n * Create a new instance.\r\n *\r\n * @param options - The options object of given edge.\r\n * @param body - The body of the network.\r\n * @param labelModule - Label module.\r\n */\n function CubicBezierEdgeBase(options, body, labelModule) {\n classCallCheck(this, CubicBezierEdgeBase);\n\n return _super.call(this, options, body, labelModule);\n }\n /**\r\n * Calculate the distance between a point (x3,y3) and a line segment from (x1,y1) to (x2,y2).\r\n *\r\n * @remarks\r\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\r\n * https://en.wikipedia.org/wiki/B%C3%A9zier_curve\r\n *\r\n * @param x1 - First end of the line segment on the x axis.\r\n * @param y1 - First end of the line segment on the y axis.\r\n * @param x2 - Second end of the line segment on the x axis.\r\n * @param y2 - Second end of the line segment on the y axis.\r\n * @param x3 - Position of the point on the x axis.\r\n * @param y3 - Position of the point on the y axis.\r\n * @param via1 - The first point this edge passes through.\r\n * @param via2 - The second point this edge passes through.\r\n *\r\n * @returns The distance between the line segment and the point.\r\n */\n\n\n createClass(CubicBezierEdgeBase, [{\n key: \"_getDistanceToBezierEdge2\",\n value: function _getDistanceToBezierEdge2(x1, y1, x2, y2, x3, y3, via1, via2) {\n // x3,y3 is the point\n var minDistance = 1e9;\n var lastX = x1;\n var lastY = y1;\n var vec = [0, 0, 0, 0];\n\n for (var i = 1; i < 10; i++) {\n var t = 0.1 * i;\n vec[0] = Math.pow(1 - t, 3);\n vec[1] = 3 * t * Math.pow(1 - t, 2);\n vec[2] = 3 * Math.pow(t, 2) * (1 - t);\n vec[3] = Math.pow(t, 3);\n var x = vec[0] * x1 + vec[1] * via1.x + vec[2] * via2.x + vec[3] * x2;\n var y = vec[0] * y1 + vec[1] * via1.y + vec[2] * via2.y + vec[3] * y2;\n\n if (i > 0) {\n var distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n\n minDistance = distance < minDistance ? distance : minDistance;\n }\n\n lastX = x;\n lastY = y;\n }\n\n return minDistance;\n }\n }]);\n\n return CubicBezierEdgeBase;\n}(BezierEdgeBase);\n\nfunction _createSuper$o(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$o(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$o() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\r\n * A Cubic Bezier Edge. Bezier curves are used to model smooth gradual curves in paths between nodes.\r\n */\n\nvar CubicBezierEdge = /*#__PURE__*/function (_CubicBezierEdgeBase) {\n inherits(CubicBezierEdge, _CubicBezierEdgeBase);\n\n var _super = _createSuper$o(CubicBezierEdge);\n\n /**\r\n * Create a new instance.\r\n *\r\n * @param options - The options object of given edge.\r\n * @param body - The body of the network.\r\n * @param labelModule - Label module.\r\n */\n function CubicBezierEdge(options, body, labelModule) {\n classCallCheck(this, CubicBezierEdge);\n\n return _super.call(this, options, body, labelModule);\n }\n /** @inheritdoc */\n\n\n createClass(CubicBezierEdge, [{\n key: \"_line\",\n value: function _line(ctx, values, viaNodes) {\n // get the coordinates of the support points.\n var via1 = viaNodes[0];\n var via2 = viaNodes[1];\n\n this._bezierCurve(ctx, values, via1, via2);\n }\n /**\r\n * Compute the additional points the edge passes through.\r\n *\r\n * @returns Cartesian coordinates of the points the edge passes through.\r\n */\n\n }, {\n key: \"_getViaCoordinates\",\n value: function _getViaCoordinates() {\n var dx = this.from.x - this.to.x;\n var dy = this.from.y - this.to.y;\n var x1;\n var y1;\n var x2;\n var y2;\n var roundness = this.options.smooth.roundness; // horizontal if x > y or if direction is forced or if direction is horizontal\n\n if ((Math.abs(dx) > Math.abs(dy) || this.options.smooth.forceDirection === true || this.options.smooth.forceDirection === \"horizontal\") && this.options.smooth.forceDirection !== \"vertical\") {\n y1 = this.from.y;\n y2 = this.to.y;\n x1 = this.from.x - roundness * dx;\n x2 = this.to.x + roundness * dx;\n } else {\n y1 = this.from.y - roundness * dy;\n y2 = this.to.y + roundness * dy;\n x1 = this.from.x;\n x2 = this.to.x;\n }\n\n return [{\n x: x1,\n y: y1\n }, {\n x: x2,\n y: y2\n }];\n }\n /** @inheritdoc */\n\n }, {\n key: \"getViaNode\",\n value: function getViaNode() {\n return this._getViaCoordinates();\n }\n /** @inheritdoc */\n\n }, {\n key: \"_findBorderPosition\",\n value: function _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx);\n }\n /** @inheritdoc */\n\n }, {\n key: \"_getDistanceToEdge\",\n value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n var _ref = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates(),\n _ref2 = slicedToArray(_ref, 2),\n via1 = _ref2[0],\n via2 = _ref2[1];\n\n // x3,y3 is the point\n return this._getDistanceToBezierEdge2(x1, y1, x2, y2, x3, y3, via1, via2);\n }\n /** @inheritdoc */\n\n }, {\n key: \"getPoint\",\n value: function getPoint(position) {\n var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates(),\n _ref4 = slicedToArray(_ref3, 2),\n via1 = _ref4[0],\n via2 = _ref4[1];\n\n var t = position;\n var vec = [Math.pow(1 - t, 3), 3 * t * Math.pow(1 - t, 2), 3 * Math.pow(t, 2) * (1 - t), Math.pow(t, 3)];\n var x = vec[0] * this.fromPoint.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.toPoint.x;\n var y = vec[0] * this.fromPoint.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.toPoint.y;\n return {\n x: x,\n y: y\n };\n }\n }]);\n\n return CubicBezierEdge;\n}(CubicBezierEdgeBase);\n\nfunction _createSuper$p(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$p(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$p() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\r\n * A Straight Edge.\r\n */\n\nvar StraightEdge = /*#__PURE__*/function (_EdgeBase) {\n inherits(StraightEdge, _EdgeBase);\n\n var _super = _createSuper$p(StraightEdge);\n\n /**\r\n * Create a new instance.\r\n *\r\n * @param options - The options object of given edge.\r\n * @param body - The body of the network.\r\n * @param labelModule - Label module.\r\n */\n function StraightEdge(options, body, labelModule) {\n classCallCheck(this, StraightEdge);\n\n return _super.call(this, options, body, labelModule);\n }\n /** @inheritdoc */\n\n\n createClass(StraightEdge, [{\n key: \"_line\",\n value: function _line(ctx, values) {\n // draw a straight line\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y);\n ctx.lineTo(this.toPoint.x, this.toPoint.y); // draw shadow if enabled\n\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n /** @inheritdoc */\n\n }, {\n key: \"getViaNode\",\n value: function getViaNode() {\n return undefined;\n }\n /** @inheritdoc */\n\n }, {\n key: \"getPoint\",\n value: function getPoint(position) {\n return {\n x: (1 - position) * this.fromPoint.x + position * this.toPoint.x,\n y: (1 - position) * this.fromPoint.y + position * this.toPoint.y\n };\n }\n /** @inheritdoc */\n\n }, {\n key: \"_findBorderPosition\",\n value: function _findBorderPosition(nearNode, ctx) {\n var node1 = this.to;\n var node2 = this.from;\n\n if (nearNode.id === this.from.id) {\n node1 = this.from;\n node2 = this.to;\n }\n\n var angle = Math.atan2(node1.y - node2.y, node1.x - node2.x);\n var dx = node1.x - node2.x;\n var dy = node1.y - node2.y;\n var edgeSegmentLength = Math.sqrt(dx * dx + dy * dy);\n var toBorderDist = nearNode.distanceToBorder(ctx, angle);\n var toBorderPoint = (edgeSegmentLength - toBorderDist) / edgeSegmentLength;\n return {\n x: (1 - toBorderPoint) * node2.x + toBorderPoint * node1.x,\n y: (1 - toBorderPoint) * node2.y + toBorderPoint * node1.y,\n t: 0\n };\n }\n /** @inheritdoc */\n\n }, {\n key: \"_getDistanceToEdge\",\n value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n // x3,y3 is the point\n return this._getDistanceToLine(x1, y1, x2, y2, x3, y3);\n }\n }]);\n\n return StraightEdge;\n}(EdgeBase);\n\n/**\n * An edge connects two nodes and has a specific direction.\n */\n\nvar Edge = /*#__PURE__*/function () {\n /**\n * @param {Object} options values specific to this edge, must contain at least 'from' and 'to'\n * @param {Object} body shared state from Network instance\n * @param {Network.Images} imagelist A list with images. Only needed when the edge has image arrows.\n * @param {Object} globalOptions options from the EdgesHandler instance\n * @param {Object} defaultOptions default options from the EdgeHandler instance. Value and reference are constant\n */\n function Edge(options, body, imagelist, globalOptions, defaultOptions) {\n classCallCheck(this, Edge);\n\n if (body === undefined) {\n throw new Error(\"No body provided\");\n } // Since globalOptions is constant in values as well as reference,\n // Following needs to be done only once.\n\n\n this.options = bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.body = body;\n this.imagelist = imagelist; // initialize variables\n\n this.id = undefined;\n this.fromId = undefined;\n this.toId = undefined;\n this.selected = false;\n this.hover = false;\n this.labelDirty = true;\n this.baseWidth = this.options.width;\n this.baseFontSize = this.options.font.size;\n this.from = undefined; // a node\n\n this.to = undefined; // a node\n\n this.edgeType = undefined;\n this.connected = false;\n this.labelModule = new Label(this.body, this.options, true\n /* It's an edge label */\n );\n this.setOptions(options);\n }\n /**\n * Set or overwrite options for the edge\n * @param {Object} options an object with options\n * @returns {undefined|boolean} undefined if no options, true if layout affecting data changed, false otherwise.\n */\n\n\n createClass(Edge, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (!options) {\n return;\n } // Following options if changed affect the layout.\n\n\n var affectsLayout = typeof options.physics !== \"undefined\" && this.options.physics !== options.physics || typeof options.hidden !== \"undefined\" && (this.options.hidden || false) !== (options.hidden || false) || typeof options.from !== \"undefined\" && this.options.from !== options.from || typeof options.to !== \"undefined\" && this.options.to !== options.to;\n Edge.parseOptions(this.options, options, true, this.globalOptions);\n\n if (options.id !== undefined) {\n this.id = options.id;\n }\n\n if (options.from !== undefined) {\n this.fromId = options.from;\n }\n\n if (options.to !== undefined) {\n this.toId = options.to;\n }\n\n if (options.title !== undefined) {\n this.title = options.title;\n }\n\n if (options.value !== undefined) {\n options.value = _parseFloat$2(options.value);\n }\n\n var pile = [options, this.options, this.defaultOptions];\n this.chooser = choosify('edge', pile); // update label Module\n\n this.updateLabelModule(options); // Update edge type, this if changed affects the layout.\n\n affectsLayout = this.updateEdgeType() || affectsLayout; // if anything has been updates, reset the selection width and the hover width\n\n this._setInteractionWidths(); // A node is connected when it has a from and to node that both exist in the network.body.nodes.\n\n\n this.connect();\n return affectsLayout;\n }\n /**\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions\n * @param {boolean} [allowDeletion=false]\n * @param {Object} [globalOptions={}]\n * @param {boolean} [copyFromGlobals=false]\n */\n\n }, {\n key: \"getFormattingValues\",\n\n /**\n *\n * @returns {ArrowOptions}\n */\n value: function getFormattingValues() {\n var toArrow = this.options.arrows.to === true || this.options.arrows.to.enabled === true;\n var fromArrow = this.options.arrows.from === true || this.options.arrows.from.enabled === true;\n var middleArrow = this.options.arrows.middle === true || this.options.arrows.middle.enabled === true;\n var inheritsColor = this.options.color.inherit;\n var values = {\n toArrow: toArrow,\n toArrowScale: this.options.arrows.to.scaleFactor,\n toArrowType: this.options.arrows.to.type,\n toArrowSrc: this.options.arrows.to.src,\n toArrowImageWidth: this.options.arrows.to.imageWidth,\n toArrowImageHeight: this.options.arrows.to.imageHeight,\n middleArrow: middleArrow,\n middleArrowScale: this.options.arrows.middle.scaleFactor,\n middleArrowType: this.options.arrows.middle.type,\n middleArrowSrc: this.options.arrows.middle.src,\n middleArrowImageWidth: this.options.arrows.middle.imageWidth,\n middleArrowImageHeight: this.options.arrows.middle.imageHeight,\n fromArrow: fromArrow,\n fromArrowScale: this.options.arrows.from.scaleFactor,\n fromArrowType: this.options.arrows.from.type,\n fromArrowSrc: this.options.arrows.from.src,\n fromArrowImageWidth: this.options.arrows.from.imageWidth,\n fromArrowImageHeight: this.options.arrows.from.imageHeight,\n arrowStrikethrough: this.options.arrowStrikethrough,\n color: inheritsColor ? undefined : this.options.color.color,\n inheritsColor: inheritsColor,\n opacity: this.options.color.opacity,\n hidden: this.options.hidden,\n length: this.options.length,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y,\n dashes: this.options.dashes,\n width: this.options.width,\n background: this.options.background.enabled,\n backgroundColor: this.options.background.color,\n backgroundSize: this.options.background.size,\n backgroundDashes: this.options.background.dashes\n };\n\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n var selectedWidth = this.options.selectionWidth;\n\n if (typeof selectedWidth === 'function') {\n values.width = selectedWidth(values.width);\n } else if (typeof selectedWidth === 'number') {\n values.width += selectedWidth;\n }\n\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.highlight;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n var hoverWidth = this.options.hoverWidth;\n\n if (typeof hoverWidth === 'function') {\n values.width = hoverWidth(values.width);\n } else if (typeof hoverWidth === 'number') {\n values.width += hoverWidth;\n }\n\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.hover;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === 'function') {\n this.chooser(values, this.options.id, this.selected, this.hover);\n\n if (values.color !== undefined) {\n values.inheritsColor = false;\n }\n\n if (values.shadow === false) {\n if (values.shadowColor !== this.options.shadow.color || values.shadowSize !== this.options.shadow.size || values.shadowX !== this.options.shadow.x || values.shadowY !== this.options.shadow.y) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n }\n\n return values;\n }\n /**\n * update the options in the label module\n *\n * @param {Object} options\n */\n\n }, {\n key: \"updateLabelModule\",\n value: function updateLabelModule(options) {\n var pile = [options, this.options, this.globalOptions, // Currently set global edge options\n this.defaultOptions];\n this.labelModule.update(this.options, pile);\n\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n }\n /**\n * update the edge type, set the options\n * @returns {boolean}\n */\n\n }, {\n key: \"updateEdgeType\",\n value: function updateEdgeType() {\n var smooth = this.options.smooth;\n var dataChanged = false;\n var changeInType = true;\n\n if (this.edgeType !== undefined) {\n if (this.edgeType instanceof BezierEdgeDynamic && smooth.enabled === true && smooth.type === 'dynamic' || this.edgeType instanceof CubicBezierEdge && smooth.enabled === true && smooth.type === 'cubicBezier' || this.edgeType instanceof BezierEdgeStatic && smooth.enabled === true && smooth.type !== 'dynamic' && smooth.type !== 'cubicBezier' || this.edgeType instanceof StraightEdge && smooth.type.enabled === false) {\n changeInType = false;\n }\n\n if (changeInType === true) {\n dataChanged = this.cleanup();\n }\n }\n\n if (changeInType === true) {\n if (smooth.enabled === true) {\n if (smooth.type === 'dynamic') {\n dataChanged = true;\n this.edgeType = new BezierEdgeDynamic(this.options, this.body, this.labelModule);\n } else if (smooth.type === 'cubicBezier') {\n this.edgeType = new CubicBezierEdge(this.options, this.body, this.labelModule);\n } else {\n this.edgeType = new BezierEdgeStatic(this.options, this.body, this.labelModule);\n }\n } else {\n this.edgeType = new StraightEdge(this.options, this.body, this.labelModule);\n }\n } else {\n // if nothing changes, we just set the options.\n this.edgeType.setOptions(this.options);\n }\n\n return dataChanged;\n }\n /**\n * Connect an edge to its nodes\n */\n\n }, {\n key: \"connect\",\n value: function connect() {\n this.disconnect();\n this.from = this.body.nodes[this.fromId] || undefined;\n this.to = this.body.nodes[this.toId] || undefined;\n this.connected = this.from !== undefined && this.to !== undefined;\n\n if (this.connected === true) {\n this.from.attachEdge(this);\n this.to.attachEdge(this);\n } else {\n if (this.from) {\n this.from.detachEdge(this);\n }\n\n if (this.to) {\n this.to.detachEdge(this);\n }\n }\n\n this.edgeType.connect();\n }\n /**\n * Disconnect an edge from its nodes\n */\n\n }, {\n key: \"disconnect\",\n value: function disconnect() {\n if (this.from) {\n this.from.detachEdge(this);\n this.from = undefined;\n }\n\n if (this.to) {\n this.to.detachEdge(this);\n this.to = undefined;\n }\n\n this.connected = false;\n }\n /**\n * get the title of this edge.\n * @return {string} title The title of the edge, or undefined when no title\n * has been set.\n */\n\n }, {\n key: \"getTitle\",\n value: function getTitle() {\n return this.title;\n }\n /**\n * check if this node is selecte\n * @return {boolean} selected True if node is selected, else false\n */\n\n }, {\n key: \"isSelected\",\n value: function isSelected() {\n return this.selected;\n }\n /**\n * Retrieve the value of the edge. Can be undefined\n * @return {number} value\n */\n\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.options.value;\n }\n /**\n * Adjust the value range of the edge. The edge will adjust it's width\n * based on its value.\n * @param {number} min\n * @param {number} max\n * @param {number} total\n */\n\n }, {\n key: \"setValueRange\",\n value: function setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n var widthDiff = this.options.scaling.max - this.options.scaling.min;\n\n if (this.options.scaling.label.enabled === true) {\n var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n\n this.options.width = this.options.scaling.min + scale * widthDiff;\n } else {\n this.options.width = this.baseWidth;\n this.options.font.size = this.baseFontSize;\n }\n\n this._setInteractionWidths();\n\n this.updateLabelModule();\n }\n /**\n *\n * @private\n */\n\n }, {\n key: \"_setInteractionWidths\",\n value: function _setInteractionWidths() {\n if (typeof this.options.hoverWidth === 'function') {\n this.edgeType.hoverWidth = this.options.hoverWidth(this.options.width);\n } else {\n this.edgeType.hoverWidth = this.options.hoverWidth + this.options.width;\n }\n\n if (typeof this.options.selectionWidth === 'function') {\n this.edgeType.selectionWidth = this.options.selectionWidth(this.options.width);\n } else {\n this.edgeType.selectionWidth = this.options.selectionWidth + this.options.width;\n }\n }\n /**\n * Redraw a edge\n * Draw this edge in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n\n }, {\n key: \"draw\",\n value: function draw(ctx) {\n var values = this.getFormattingValues();\n\n if (values.hidden) {\n return;\n } // get the via node from the edge type\n\n\n var viaNode = this.edgeType.getViaNode(); // draw line and label\n\n this.edgeType.drawLine(ctx, values, this.selected, this.hover, viaNode);\n this.drawLabel(ctx, viaNode);\n }\n /**\n * Redraw arrows\n * Draw this arrows in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n\n }, {\n key: \"drawArrows\",\n value: function drawArrows(ctx) {\n var values = this.getFormattingValues();\n\n if (values.hidden) {\n return;\n } // get the via node from the edge type\n\n\n var viaNode = this.edgeType.getViaNode();\n var arrowData = {}; // restore edge targets to defaults\n\n this.edgeType.fromPoint = this.edgeType.from;\n this.edgeType.toPoint = this.edgeType.to; // from and to arrows give a different end point for edges. we set them here\n\n if (values.fromArrow) {\n arrowData.from = this.edgeType.getArrowData(ctx, \"from\", viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false) this.edgeType.fromPoint = arrowData.from.core;\n\n if (values.fromArrowSrc) {\n arrowData.from.image = this.imagelist.load(values.fromArrowSrc);\n }\n\n if (values.fromArrowImageWidth) {\n arrowData.from.imageWidth = values.fromArrowImageWidth;\n }\n\n if (values.fromArrowImageHeight) {\n arrowData.from.imageHeight = values.fromArrowImageHeight;\n }\n }\n\n if (values.toArrow) {\n arrowData.to = this.edgeType.getArrowData(ctx, \"to\", viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false) this.edgeType.toPoint = arrowData.to.core;\n\n if (values.toArrowSrc) {\n arrowData.to.image = this.imagelist.load(values.toArrowSrc);\n }\n\n if (values.toArrowImageWidth) {\n arrowData.to.imageWidth = values.toArrowImageWidth;\n }\n\n if (values.toArrowImageHeight) {\n arrowData.to.imageHeight = values.toArrowImageHeight;\n }\n } // the middle arrow depends on the line, which can depend on the to and from arrows so we do this one lastly.\n\n\n if (values.middleArrow) {\n arrowData.middle = this.edgeType.getArrowData(ctx, \"middle\", viaNode, this.selected, this.hover, values);\n\n if (values.middleArrowSrc) {\n arrowData.middle.image = this.imagelist.load(values.middleArrowSrc);\n }\n\n if (values.middleArrowImageWidth) {\n arrowData.middle.imageWidth = values.middleArrowImageWidth;\n }\n\n if (values.middleArrowImageHeight) {\n arrowData.middle.imageHeight = values.middleArrowImageHeight;\n }\n }\n\n if (values.fromArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.from);\n }\n\n if (values.middleArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.middle);\n }\n\n if (values.toArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.to);\n }\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Node} viaNode\n */\n\n }, {\n key: \"drawLabel\",\n value: function drawLabel(ctx, viaNode) {\n if (this.options.label !== undefined) {\n // set style\n var node1 = this.from;\n var node2 = this.to;\n\n if (this.labelModule.differentState(this.selected, this.hover)) {\n this.labelModule.getTextSize(ctx, this.selected, this.hover);\n }\n\n var point;\n\n if (node1.id != node2.id) {\n this.labelModule.pointToSelf = false;\n point = this.edgeType.getPoint(0.5, viaNode);\n ctx.save();\n\n var rotationPoint = this._getRotation(ctx);\n\n if (rotationPoint.angle != 0) {\n ctx.translate(rotationPoint.x, rotationPoint.y);\n ctx.rotate(rotationPoint.angle);\n } // draw the label\n\n\n this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover);\n /*\n // Useful debug code: draw a border around the label\n // This should **not** be enabled in production!\n var size = this.labelModule.getSize();; // ;; intentional so lint catches it\n ctx.strokeStyle = \"#ff0000\";\n ctx.strokeRect(size.left, size.top, size.width, size.height);\n // End debug code\n */\n\n ctx.restore();\n } else {\n // Ignore the orientations.\n this.labelModule.pointToSelf = true; // get circle coordinates\n\n var coordinates = getSelfRefCoordinates(ctx, this.options.selfReference.angle, this.options.selfReference.size, node1);\n point = this._pointOnCircle(coordinates.x, coordinates.y, this.options.selfReference.size, this.options.selfReference.angle);\n this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover);\n }\n }\n }\n /**\n * Determine all visual elements of this edge instance, in which the given\n * point falls within the bounding shape.\n *\n * @param {point} point\n * @returns {Array.} list with the items which are on the point\n */\n\n }, {\n key: \"getItemsOnPoint\",\n value: function getItemsOnPoint(point) {\n var ret = [];\n\n if (this.labelModule.visible()) {\n var rotationPoint = this._getRotation();\n\n if (pointInRect(this.labelModule.getSize(), point, rotationPoint)) {\n ret.push({\n edgeId: this.id,\n labelId: 0\n });\n }\n }\n\n var obj = {\n left: point.x,\n top: point.y\n };\n\n if (this.isOverlappingWith(obj)) {\n ret.push({\n edgeId: this.id\n });\n }\n\n return ret;\n }\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top\n * @return {boolean} True if location is located on the edge\n */\n\n }, {\n key: \"isOverlappingWith\",\n value: function isOverlappingWith(obj) {\n if (this.connected) {\n var distMax = 10;\n var xFrom = this.from.x;\n var yFrom = this.from.y;\n var xTo = this.to.x;\n var yTo = this.to.y;\n var xObj = obj.left;\n var yObj = obj.top;\n var dist = this.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, xObj, yObj);\n return dist < distMax;\n } else {\n return false;\n }\n }\n /** \n * Determine the rotation point, if any.\n *\n * @param {CanvasRenderingContext2D} [ctx] if passed, do a recalculation of the label size\n * @returns {rotationPoint} the point to rotate around and the angle in radians to rotate\n * @private\n */\n\n }, {\n key: \"_getRotation\",\n value: function _getRotation(ctx) {\n var viaNode = this.edgeType.getViaNode();\n var point = this.edgeType.getPoint(0.5, viaNode);\n\n if (ctx !== undefined) {\n this.labelModule.calculateLabelSize(ctx, this.selected, this.hover, point.x, point.y);\n }\n\n var ret = {\n x: point.x,\n y: this.labelModule.size.yLine,\n angle: 0\n };\n\n if (!this.labelModule.visible()) {\n return ret; // Don't even bother doing the atan2, there's nothing to draw\n }\n\n if (this.options.font.align === \"horizontal\") {\n return ret; // No need to calculate angle\n }\n\n var dy = this.from.y - this.to.y;\n var dx = this.from.x - this.to.x;\n var angle = Math.atan2(dy, dx); // radians\n // rotate so that label is readable\n\n if (angle < -1 && dx < 0 || angle > 0 && dx < 0) {\n angle += Math.PI;\n }\n\n ret.angle = angle;\n return ret;\n }\n /**\n * Get a point on a circle\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @param {number} angle \n * @return {Object} point\n * @private\n */\n\n }, {\n key: \"_pointOnCircle\",\n value: function _pointOnCircle(x, y, radius, angle) {\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n };\n }\n /**\n * Sets selected state to true\n */\n\n }, {\n key: \"select\",\n value: function select() {\n this.selected = true;\n }\n /**\n * Sets selected state to false\n */\n\n }, {\n key: \"unselect\",\n value: function unselect() {\n this.selected = false;\n }\n /**\n * cleans all required things on delete\n * @returns {*}\n */\n\n }, {\n key: \"cleanup\",\n value: function cleanup() {\n return this.edgeType.cleanup();\n }\n /**\n * Remove edge from the list and perform necessary cleanup.\n */\n\n }, {\n key: \"remove\",\n value: function remove() {\n this.cleanup();\n this.disconnect();\n delete this.body.edges[this.id];\n }\n /**\n * Check if both connecting nodes exist\n * @returns {boolean}\n */\n\n }, {\n key: \"endPointsValid\",\n value: function endPointsValid() {\n return this.body.nodes[this.fromId] !== undefined && this.body.nodes[this.toId] !== undefined;\n }\n }], [{\n key: \"parseOptions\",\n value: function parseOptions(parentOptions, newOptions) {\n var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var copyFromGlobals = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n var fields = ['endPointOffset', 'arrowStrikethrough', 'id', 'from', 'hidden', 'hoverWidth', 'labelHighlightBold', 'length', 'line', 'opacity', 'physics', 'scaling', 'selectionWidth', 'selfReferenceSize', 'selfReference', 'to', 'title', 'value', 'width', 'font', 'chosen', 'widthConstraint']; // only deep extend the items in the field array. These do not have shorthand.\n\n selectiveDeepExtend(fields, parentOptions, newOptions, allowDeletion); // Only use endPointOffset values (from and to) if it's valid values\n\n if (newOptions.endPointOffset !== undefined && newOptions.endPointOffset.from !== undefined) {\n if (_isFinite$2(newOptions.endPointOffset.from)) {\n parentOptions.endPointOffset.from = newOptions.endPointOffset.from;\n } else {\n parentOptions.endPointOffset.from = globalOptions.endPointOffset.from !== undefined ? globalOptions.endPointOffset.from : 0;\n console.error('endPointOffset.from is not a valid number');\n }\n }\n\n if (newOptions.endPointOffset !== undefined && newOptions.endPointOffset.to !== undefined) {\n if (_isFinite$2(newOptions.endPointOffset.to)) {\n parentOptions.endPointOffset.to = newOptions.endPointOffset.to;\n } else {\n parentOptions.endPointOffset.to = globalOptions.endPointOffset.to !== undefined ? globalOptions.endPointOffset.to : 0;\n console.error('endPointOffset.to is not a valid number');\n }\n } // Only copy label if it's a legal value.\n\n\n if (isValidLabel(newOptions.label)) {\n parentOptions.label = newOptions.label;\n } else if (!isValidLabel(parentOptions.label)) {\n parentOptions.label = undefined;\n }\n\n mergeOptions(parentOptions, newOptions, 'smooth', globalOptions);\n mergeOptions(parentOptions, newOptions, 'shadow', globalOptions);\n mergeOptions(parentOptions, newOptions, 'background', globalOptions);\n\n if (newOptions.dashes !== undefined && newOptions.dashes !== null) {\n parentOptions.dashes = newOptions.dashes;\n } else if (allowDeletion === true && newOptions.dashes === null) {\n parentOptions.dashes = create$2(globalOptions.dashes); // this sets the pointer of the option back to the global option.\n } // set the scaling newOptions\n\n\n if (newOptions.scaling !== undefined && newOptions.scaling !== null) {\n if (newOptions.scaling.min !== undefined) {\n parentOptions.scaling.min = newOptions.scaling.min;\n }\n\n if (newOptions.scaling.max !== undefined) {\n parentOptions.scaling.max = newOptions.scaling.max;\n }\n\n mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling);\n } else if (allowDeletion === true && newOptions.scaling === null) {\n parentOptions.scaling = create$2(globalOptions.scaling); // this sets the pointer of the option back to the global option.\n } // handle multiple input cases for arrows\n\n\n if (newOptions.arrows !== undefined && newOptions.arrows !== null) {\n if (typeof newOptions.arrows === 'string') {\n var arrows = newOptions.arrows.toLowerCase();\n parentOptions.arrows.to.enabled = indexOf$3(arrows).call(arrows, \"to\") != -1;\n parentOptions.arrows.middle.enabled = indexOf$3(arrows).call(arrows, \"middle\") != -1;\n parentOptions.arrows.from.enabled = indexOf$3(arrows).call(arrows, \"from\") != -1;\n } else if (_typeof_1(newOptions.arrows) === 'object') {\n mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', globalOptions.arrows);\n mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', globalOptions.arrows);\n mergeOptions(parentOptions.arrows, newOptions.arrows, 'from', globalOptions.arrows);\n } else {\n throw new Error(\"The arrow newOptions can only be an object or a string. Refer to the documentation. You used:\" + stringify$2(newOptions.arrows));\n }\n } else if (allowDeletion === true && newOptions.arrows === null) {\n parentOptions.arrows = create$2(globalOptions.arrows); // this sets the pointer of the option back to the global option.\n } // handle multiple input cases for color\n\n\n if (newOptions.color !== undefined && newOptions.color !== null) {\n var fromColor = isString(newOptions.color) ? {\n color: newOptions.color,\n highlight: newOptions.color,\n hover: newOptions.color,\n inherit: false,\n opacity: 1\n } : newOptions.color;\n var toColor = parentOptions.color; // If passed, fill in values from default options - required in the case of no prototype bridging\n\n if (copyFromGlobals) {\n deepExtend(toColor, globalOptions.color, false, allowDeletion);\n } else {\n // Clear local properties - need to do it like this in order to retain prototype bridges\n for (var i in toColor) {\n if (Object.prototype.hasOwnProperty.call(toColor, i)) {\n delete toColor[i];\n }\n }\n }\n\n if (isString(toColor)) {\n toColor.color = toColor;\n toColor.highlight = toColor;\n toColor.hover = toColor;\n toColor.inherit = false;\n\n if (fromColor.opacity === undefined) {\n toColor.opacity = 1.0; // set default\n }\n } else {\n var colorsDefined = false;\n\n if (fromColor.color !== undefined) {\n toColor.color = fromColor.color;\n colorsDefined = true;\n }\n\n if (fromColor.highlight !== undefined) {\n toColor.highlight = fromColor.highlight;\n colorsDefined = true;\n }\n\n if (fromColor.hover !== undefined) {\n toColor.hover = fromColor.hover;\n colorsDefined = true;\n }\n\n if (fromColor.inherit !== undefined) {\n toColor.inherit = fromColor.inherit;\n }\n\n if (fromColor.opacity !== undefined) {\n toColor.opacity = Math.min(1, Math.max(0, fromColor.opacity));\n }\n\n if (colorsDefined === true) {\n toColor.inherit = false;\n } else {\n if (toColor.inherit === undefined) {\n toColor.inherit = 'from'; // Set default\n }\n }\n }\n } else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = bridgeObject(globalOptions.color); // set the object back to the global options\n }\n\n if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = bridgeObject(globalOptions.font); // set the object back to the global options\n }\n\n if (Object.prototype.hasOwnProperty.call(newOptions, \"selfReferenceSize\")) {\n console.log('The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}');\n parentOptions.selfReference.size = newOptions.selfReferenceSize;\n }\n }\n }]);\n\n return Edge;\n}();\n\n/**\n * Handler for Edges\n */\n\nvar EdgesHandler = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {Array.} images\n * @param {Array.} groups\n */\n function EdgesHandler(body, images, groups) {\n var _context,\n _this = this;\n\n classCallCheck(this, EdgesHandler);\n\n this.body = body;\n this.images = images;\n this.groups = groups; // create the edge API in the body container\n\n this.body.functions.createEdge = bind$2(_context = this.create).call(_context, this);\n this.edgesListeners = {\n add: function add(event, params) {\n _this.add(params.items);\n },\n update: function update(event, params) {\n _this.update(params.items);\n },\n remove: function remove(event, params) {\n _this.remove(params.items);\n }\n };\n this.options = {};\n this.defaultOptions = {\n arrows: {\n to: {\n enabled: false,\n scaleFactor: 1,\n type: 'arrow'\n },\n // boolean / {arrowScaleFactor:1} / {enabled: false, arrowScaleFactor:1}\n middle: {\n enabled: false,\n scaleFactor: 1,\n type: 'arrow'\n },\n from: {\n enabled: false,\n scaleFactor: 1,\n type: 'arrow'\n }\n },\n endPointOffset: {\n from: 0,\n to: 0\n },\n arrowStrikethrough: true,\n color: {\n color: '#848484',\n highlight: '#848484',\n hover: '#848484',\n inherit: 'from',\n opacity: 1.0\n },\n dashes: false,\n font: {\n color: '#343434',\n size: 14,\n // px\n face: 'arial',\n background: 'none',\n strokeWidth: 2,\n // px\n strokeColor: '#ffffff',\n align: 'horizontal',\n multi: false,\n vadjust: 0,\n bold: {\n mod: 'bold'\n },\n boldital: {\n mod: 'bold italic'\n },\n ital: {\n mod: 'italic'\n },\n mono: {\n mod: '',\n size: 15,\n // px\n face: 'courier new',\n vadjust: 2\n }\n },\n hidden: false,\n hoverWidth: 1.5,\n label: undefined,\n labelHighlightBold: true,\n length: undefined,\n physics: true,\n scaling: {\n min: 1,\n max: 15,\n label: {\n enabled: true,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function customScalingFunction(min, max, total, value) {\n if (max === min) {\n return 0.5;\n } else {\n var scale = 1 / (max - min);\n return Math.max(0, (value - min) * scale);\n }\n }\n },\n selectionWidth: 1.5,\n selfReference: {\n size: 20,\n angle: Math.PI / 4,\n renderBehindTheNode: true\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: 10,\n x: 5,\n y: 5\n },\n background: {\n enabled: false,\n color: 'rgba(111,111,111,1)',\n size: 10,\n dashes: false\n },\n smooth: {\n enabled: true,\n type: \"dynamic\",\n forceDirection: 'none',\n roundness: 0.5\n },\n title: undefined,\n width: 1,\n value: undefined\n };\n deepExtend(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n /**\n * Binds event listeners\n */\n\n\n createClass(EdgesHandler, [{\n key: \"bindEventListeners\",\n value: function bindEventListeners() {\n var _this2 = this,\n _context2,\n _context3;\n\n // this allows external modules to force all dynamic curves to turn static.\n this.body.emitter.on(\"_forceDisableDynamicCurves\", function (type) {\n var emit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (type === 'dynamic') {\n type = 'continuous';\n }\n\n var dataChanged = false;\n\n for (var edgeId in _this2.body.edges) {\n if (Object.prototype.hasOwnProperty.call(_this2.body.edges, edgeId)) {\n var edge = _this2.body.edges[edgeId];\n\n var edgeData = _this2.body.data.edges.get(edgeId); // only forcibly remove the smooth curve if the data has been set of the edge has the smooth curves defined.\n // this is because a change in the global would not affect these curves.\n\n\n if (edgeData != null) {\n var smoothOptions = edgeData.smooth;\n\n if (smoothOptions !== undefined) {\n if (smoothOptions.enabled === true && smoothOptions.type === 'dynamic') {\n if (type === undefined) {\n edge.setOptions({\n smooth: false\n });\n } else {\n edge.setOptions({\n smooth: {\n type: type\n }\n });\n }\n\n dataChanged = true;\n }\n }\n }\n }\n }\n\n if (emit === true && dataChanged === true) {\n _this2.body.emitter.emit(\"_dataChanged\");\n }\n }); // this is called when options of EXISTING nodes or edges have changed.\n //\n // NOTE: Not true, called when options have NOT changed, for both existing as well as new nodes.\n // See update() for logic.\n // TODO: Verify and examine the consequences of this. It might still trigger when\n // non-option fields have changed, but then reconnecting edges is still useless.\n // Alternatively, it might also be called when edges are removed.\n //\n\n this.body.emitter.on(\"_dataUpdated\", function () {\n _this2.reconnectEdges();\n }); // refresh the edges. Used when reverting from hierarchical layout\n\n this.body.emitter.on(\"refreshEdges\", bind$2(_context2 = this.refresh).call(_context2, this));\n this.body.emitter.on(\"refresh\", bind$2(_context3 = this.refresh).call(_context3, this));\n this.body.emitter.on(\"destroy\", function () {\n forEach$3(_this2.edgesListeners, function (callback, event) {\n if (_this2.body.data.edges) _this2.body.data.edges.off(event, callback);\n });\n delete _this2.body.functions.createEdge;\n delete _this2.edgesListeners.add;\n delete _this2.edgesListeners.update;\n delete _this2.edgesListeners.remove;\n delete _this2.edgesListeners;\n });\n }\n /**\n *\n * @param {Object} options\n */\n\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options !== undefined) {\n // use the parser from the Edge class to fill in all shorthand notations\n Edge.parseOptions(this.options, options, true, this.defaultOptions, true); // update smooth settings in all edges\n\n var dataChanged = false;\n\n if (options.smooth !== undefined) {\n for (var edgeId in this.body.edges) {\n if (Object.prototype.hasOwnProperty.call(this.body.edges, edgeId)) {\n dataChanged = this.body.edges[edgeId].updateEdgeType() || dataChanged;\n }\n }\n } // update fonts in all edges\n\n\n if (options.font !== undefined) {\n for (var _edgeId in this.body.edges) {\n if (Object.prototype.hasOwnProperty.call(this.body.edges, _edgeId)) {\n this.body.edges[_edgeId].updateLabelModule();\n }\n }\n } // update the state of the variables if needed\n\n\n if (options.hidden !== undefined || options.physics !== undefined || dataChanged === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n /**\n * Load edges by reading the data table\n * @param {Array | DataSet | DataView} edges The data containing the edges.\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n\n }, {\n key: \"setData\",\n value: function setData(edges) {\n var _this3 = this;\n\n var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var oldEdgesData = this.body.data.edges;\n\n if (edges instanceof DataSet || edges instanceof DataView) {\n this.body.data.edges = edges;\n } else if (isArray$5(edges)) {\n this.body.data.edges = new DataSet();\n this.body.data.edges.add(edges);\n } else if (!edges) {\n this.body.data.edges = new DataSet();\n } else {\n throw new TypeError('Array or DataSet expected');\n } // TODO: is this null or undefined or false?\n\n\n if (oldEdgesData) {\n // unsubscribe from old dataset\n forEach$3(this.edgesListeners, function (callback, event) {\n oldEdgesData.off(event, callback);\n });\n } // remove drawn edges\n\n\n this.body.edges = {}; // TODO: is this null or undefined or false?\n\n if (this.body.data.edges) {\n // subscribe to new dataset\n forEach$3(this.edgesListeners, function (callback, event) {\n _this3.body.data.edges.on(event, callback);\n }); // draw all new nodes\n\n var ids = this.body.data.edges.getIds();\n this.add(ids, true);\n }\n\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n /**\n * Add edges\n * @param {number[] | string[]} ids\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n\n }, {\n key: \"add\",\n value: function add(ids) {\n var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var edges = this.body.edges;\n var edgesData = this.body.data.edges;\n\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n var oldEdge = edges[id];\n\n if (oldEdge) {\n oldEdge.disconnect();\n }\n\n var data = edgesData.get(id, {\n \"showInternalIds\": true\n });\n edges[id] = this.create(data);\n }\n\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n /**\n * Update existing edges, or create them when not yet existing\n * @param {number[] | string[]} ids\n * @private\n */\n\n }, {\n key: \"update\",\n value: function update(ids) {\n var edges = this.body.edges;\n var edgesData = this.body.data.edges;\n var dataChanged = false;\n\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n var data = edgesData.get(id);\n var edge = edges[id];\n\n if (edge !== undefined) {\n // update edge\n edge.disconnect();\n dataChanged = edge.setOptions(data) || dataChanged; // if a support node is added, data can be changed.\n\n edge.connect();\n } else {\n // create edge\n this.body.edges[id] = this.create(data);\n dataChanged = true;\n }\n }\n\n if (dataChanged === true) {\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n this.body.emitter.emit(\"_dataChanged\");\n } else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n /**\n * Remove existing edges. Non existing ids will be ignored\n * @param {number[] | string[]} ids\n * @param {boolean} [emit=true]\n * @private\n */\n\n }, {\n key: \"remove\",\n value: function remove(ids) {\n var emit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (ids.length === 0) return; // early out\n\n var edges = this.body.edges;\n forEach$3(ids, function (id) {\n var edge = edges[id];\n\n if (edge !== undefined) {\n edge.remove();\n }\n });\n\n if (emit) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n /**\n * Refreshes Edge Handler\n */\n\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this4 = this;\n\n forEach$3(this.body.edges, function (edge, edgeId) {\n var data = _this4.body.data.edges.get(edgeId);\n\n if (data !== undefined) {\n edge.setOptions(data);\n }\n });\n }\n /**\n *\n * @param {Object} properties\n * @returns {Edge}\n */\n\n }, {\n key: \"create\",\n value: function create(properties) {\n return new Edge(properties, this.body, this.images, this.options, this.defaultOptions);\n }\n /**\n * Reconnect all edges\n * @private\n */\n\n }, {\n key: \"reconnectEdges\",\n value: function reconnectEdges() {\n var id;\n var nodes = this.body.nodes;\n var edges = this.body.edges;\n\n for (id in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, id)) {\n nodes[id].edges = [];\n }\n }\n\n for (id in edges) {\n if (Object.prototype.hasOwnProperty.call(edges, id)) {\n var edge = edges[id];\n edge.from = null;\n edge.to = null;\n edge.connect();\n }\n }\n }\n /**\n *\n * @param {Edge.id} edgeId\n * @returns {Array}\n */\n\n }, {\n key: \"getConnectedNodes\",\n value: function getConnectedNodes(edgeId) {\n var nodeList = [];\n\n if (this.body.edges[edgeId] !== undefined) {\n var edge = this.body.edges[edgeId];\n\n if (edge.fromId !== undefined) {\n nodeList.push(edge.fromId);\n }\n\n if (edge.toId !== undefined) {\n nodeList.push(edge.toId);\n }\n }\n\n return nodeList;\n }\n /**\n * There is no direct relation between the nodes and the edges DataSet,\n * so the right place to do call this is in the handler for event `_dataUpdated`.\n */\n\n }, {\n key: \"_updateState\",\n value: function _updateState() {\n this._addMissingEdges();\n\n this._removeInvalidEdges();\n }\n /**\n * Scan for missing nodes and remove corresponding edges, if any.\n * @private\n */\n\n }, {\n key: \"_removeInvalidEdges\",\n value: function _removeInvalidEdges() {\n var _this5 = this;\n\n var edgesToDelete = [];\n forEach$3(this.body.edges, function (edge, id) {\n var toNode = _this5.body.nodes[edge.toId];\n var fromNode = _this5.body.nodes[edge.fromId]; // Skip clustering edges here, let the Clustering module handle those\n\n if (toNode !== undefined && toNode.isCluster === true || fromNode !== undefined && fromNode.isCluster === true) {\n return;\n }\n\n if (toNode === undefined || fromNode === undefined) {\n edgesToDelete.push(id);\n }\n });\n this.remove(edgesToDelete, false);\n }\n /**\n * add all edges from dataset that are not in the cached state\n * @private\n */\n\n }, {\n key: \"_addMissingEdges\",\n value: function _addMissingEdges() {\n var edgesData = this.body.data.edges;\n\n if (edgesData === undefined || edgesData === null) {\n return; // No edges DataSet yet; can happen on startup \n }\n\n var edges = this.body.edges;\n var addIds = [];\n\n forEach$2(edgesData).call(edgesData, function (edgeData, edgeId) {\n var edge = edges[edgeId];\n\n if (edge === undefined) {\n addIds.push(edgeId);\n }\n });\n\n this.add(addIds, true);\n }\n }]);\n\n return EdgesHandler;\n}();\n\n/**\n * Barnes Hut Solver\n */\n\nvar BarnesHutSolver = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n function BarnesHutSolver(body, physicsBody, options) {\n classCallCheck(this, BarnesHutSolver);\n\n this.body = body;\n this.physicsBody = physicsBody;\n this.barnesHutTree;\n this.setOptions(options);\n this._rng = Alea(\"BARNES HUT SOLVER\"); // debug: show grid\n // this.body.emitter.on(\"afterDrawing\", (ctx) => {this._debug(ctx,'#ff0000')})\n }\n /**\n *\n * @param {Object} options\n */\n\n\n createClass(BarnesHutSolver, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n this.thetaInversed = 1 / this.options.theta; // if 1 then min distance = 0.5, if 0.5 then min distance = 0.5 + 0.5*node.shape.radius\n\n this.overlapAvoidanceFactor = 1 - Math.max(0, Math.min(1, this.options.avoidOverlap));\n }\n /**\n * This function calculates the forces the nodes apply on each other based on a gravitational model.\n * The Barnes Hut method is used to speed up this N-body simulation.\n *\n * @private\n */\n\n }, {\n key: \"solve\",\n value: function solve() {\n if (this.options.gravitationalConstant !== 0 && this.physicsBody.physicsNodeIndices.length > 0) {\n var node;\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var nodeCount = nodeIndices.length; // create the tree\n\n var barnesHutTree = this._formBarnesHutTree(nodes, nodeIndices); // for debugging\n\n\n this.barnesHutTree = barnesHutTree; // place the nodes one by one recursively\n\n for (var i = 0; i < nodeCount; i++) {\n node = nodes[nodeIndices[i]];\n\n if (node.options.mass > 0) {\n // starting with root is irrelevant, it never passes the BarnesHutSolver condition\n this._getForceContributions(barnesHutTree.root, node);\n }\n }\n }\n }\n /**\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n\n }, {\n key: \"_getForceContributions\",\n value: function _getForceContributions(parentBranch, node) {\n this._getForceContribution(parentBranch.children.NW, node);\n\n this._getForceContribution(parentBranch.children.NE, node);\n\n this._getForceContribution(parentBranch.children.SW, node);\n\n this._getForceContribution(parentBranch.children.SE, node);\n }\n /**\n * This function traverses the barnesHutTree. It checks when it can approximate distant nodes with their center of mass.\n * If a region contains a single node, we check if it is not itself, then we apply the force.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n\n }, {\n key: \"_getForceContribution\",\n value: function _getForceContribution(parentBranch, node) {\n // we get no force contribution from an empty region\n if (parentBranch.childrenCount > 0) {\n // get the distance from the center of mass to the node.\n var dx = parentBranch.centerOfMass.x - node.x;\n var dy = parentBranch.centerOfMass.y - node.y;\n var distance = Math.sqrt(dx * dx + dy * dy); // BarnesHutSolver condition\n // original condition : s/d < theta = passed === d/s > 1/theta = passed\n // calcSize = 1/s --> d * 1/s > 1/theta = passed\n\n if (distance * parentBranch.calcSize > this.thetaInversed) {\n this._calculateForces(distance, dx, dy, node, parentBranch);\n } else {\n // Did not pass the condition, go into children if available\n if (parentBranch.childrenCount === 4) {\n this._getForceContributions(parentBranch, node);\n } else {\n // parentBranch must have only one node, if it was empty we wouldnt be here\n if (parentBranch.children.data.id != node.id) {\n // if it is not self\n this._calculateForces(distance, dx, dy, node, parentBranch);\n }\n }\n }\n }\n }\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Node} node\n * @param {Object} parentBranch\n * @private\n */\n\n }, {\n key: \"_calculateForces\",\n value: function _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1;\n dx = distance;\n }\n\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius);\n } // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n\n\n var gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass / Math.pow(distance, 3);\n var fx = dx * gravityForce;\n var fy = dy * gravityForce;\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n /**\n * This function constructs the barnesHut tree recursively. It creates the root, splits it and starts placing the nodes.\n *\n * @param {Array.} nodes\n * @param {Array.} nodeIndices\n * @returns {{root: {centerOfMass: {x: number, y: number}, mass: number, range: {minX: number, maxX: number, minY: number, maxY: number}, size: number, calcSize: number, children: {data: null}, maxWidth: number, level: number, childrenCount: number}}} BarnesHutTree\n * @private\n */\n\n }, {\n key: \"_formBarnesHutTree\",\n value: function _formBarnesHutTree(nodes, nodeIndices) {\n var node;\n var nodeCount = nodeIndices.length;\n var minX = nodes[nodeIndices[0]].x;\n var minY = nodes[nodeIndices[0]].y;\n var maxX = nodes[nodeIndices[0]].x;\n var maxY = nodes[nodeIndices[0]].y; // get the range of the nodes\n\n for (var i = 1; i < nodeCount; i++) {\n var _node = nodes[nodeIndices[i]];\n var x = _node.x;\n var y = _node.y;\n\n if (_node.options.mass > 0) {\n if (x < minX) {\n minX = x;\n }\n\n if (x > maxX) {\n maxX = x;\n }\n\n if (y < minY) {\n minY = y;\n }\n\n if (y > maxY) {\n maxY = y;\n }\n }\n } // make the range a square\n\n\n var sizeDiff = Math.abs(maxX - minX) - Math.abs(maxY - minY); // difference between X and Y\n\n if (sizeDiff > 0) {\n minY -= 0.5 * sizeDiff;\n maxY += 0.5 * sizeDiff;\n } // xSize > ySize\n else {\n minX += 0.5 * sizeDiff;\n maxX -= 0.5 * sizeDiff;\n } // xSize < ySize\n\n\n var minimumTreeSize = 1e-5;\n var rootSize = Math.max(minimumTreeSize, Math.abs(maxX - minX));\n var halfRootSize = 0.5 * rootSize;\n var centerX = 0.5 * (minX + maxX),\n centerY = 0.5 * (minY + maxY); // construct the barnesHutTree\n\n var barnesHutTree = {\n root: {\n centerOfMass: {\n x: 0,\n y: 0\n },\n mass: 0,\n range: {\n minX: centerX - halfRootSize,\n maxX: centerX + halfRootSize,\n minY: centerY - halfRootSize,\n maxY: centerY + halfRootSize\n },\n size: rootSize,\n calcSize: 1 / rootSize,\n children: {\n data: null\n },\n maxWidth: 0,\n level: 0,\n childrenCount: 4\n }\n };\n\n this._splitBranch(barnesHutTree.root); // place the nodes one by one recursively\n\n\n for (var _i = 0; _i < nodeCount; _i++) {\n node = nodes[nodeIndices[_i]];\n\n if (node.options.mass > 0) {\n this._placeInTree(barnesHutTree.root, node);\n }\n } // make global\n\n\n return barnesHutTree;\n }\n /**\n * this updates the mass of a branch. this is increased by adding a node.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n\n }, {\n key: \"_updateBranchMass\",\n value: function _updateBranchMass(parentBranch, node) {\n var centerOfMass = parentBranch.centerOfMass;\n var totalMass = parentBranch.mass + node.options.mass;\n var totalMassInv = 1 / totalMass;\n centerOfMass.x = centerOfMass.x * parentBranch.mass + node.x * node.options.mass;\n centerOfMass.x *= totalMassInv;\n centerOfMass.y = centerOfMass.y * parentBranch.mass + node.y * node.options.mass;\n centerOfMass.y *= totalMassInv;\n parentBranch.mass = totalMass;\n var biggestSize = Math.max(Math.max(node.height, node.radius), node.width);\n parentBranch.maxWidth = parentBranch.maxWidth < biggestSize ? biggestSize : parentBranch.maxWidth;\n }\n /**\n * determine in which branch the node will be placed.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @param {boolean} skipMassUpdate\n * @private\n */\n\n }, {\n key: \"_placeInTree\",\n value: function _placeInTree(parentBranch, node, skipMassUpdate) {\n if (skipMassUpdate != true || skipMassUpdate === undefined) {\n // update the mass of the branch.\n this._updateBranchMass(parentBranch, node);\n }\n\n var range = parentBranch.children.NW.range;\n var region;\n\n if (range.maxX > node.x) {\n // in NW or SW\n if (range.maxY > node.y) {\n region = \"NW\";\n } else {\n region = \"SW\";\n }\n } else {\n // in NE or SE\n if (range.maxY > node.y) {\n region = \"NE\";\n } else {\n region = \"SE\";\n }\n }\n\n this._placeInRegion(parentBranch, node, region);\n }\n /**\n * actually place the node in a region (or branch)\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @param {'NW'| 'NE' | 'SW' | 'SE'} region\n * @private\n */\n\n }, {\n key: \"_placeInRegion\",\n value: function _placeInRegion(parentBranch, node, region) {\n var children = parentBranch.children[region];\n\n switch (children.childrenCount) {\n case 0:\n // place node here\n children.children.data = node;\n children.childrenCount = 1;\n\n this._updateBranchMass(children, node);\n\n break;\n\n case 1:\n // convert into children\n // if there are two nodes exactly overlapping (on init, on opening of cluster etc.)\n // we move one node a little bit and we do not put it in the tree.\n if (children.children.data.x === node.x && children.children.data.y === node.y) {\n node.x += this._rng();\n node.y += this._rng();\n } else {\n this._splitBranch(children);\n\n this._placeInTree(children, node);\n }\n\n break;\n\n case 4:\n // place in branch\n this._placeInTree(children, node);\n\n break;\n }\n }\n /**\n * this function splits a branch into 4 sub branches. If the branch contained a node, we place it in the subbranch\n * after the split is complete.\n *\n * @param {Object} parentBranch\n * @private\n */\n\n }, {\n key: \"_splitBranch\",\n value: function _splitBranch(parentBranch) {\n // if the branch is shaded with a node, replace the node in the new subset.\n var containedNode = null;\n\n if (parentBranch.childrenCount === 1) {\n containedNode = parentBranch.children.data;\n parentBranch.mass = 0;\n parentBranch.centerOfMass.x = 0;\n parentBranch.centerOfMass.y = 0;\n }\n\n parentBranch.childrenCount = 4;\n parentBranch.children.data = null;\n\n this._insertRegion(parentBranch, \"NW\");\n\n this._insertRegion(parentBranch, \"NE\");\n\n this._insertRegion(parentBranch, \"SW\");\n\n this._insertRegion(parentBranch, \"SE\");\n\n if (containedNode != null) {\n this._placeInTree(parentBranch, containedNode);\n }\n }\n /**\n * This function subdivides the region into four new segments.\n * Specifically, this inserts a single new segment.\n * It fills the children section of the parentBranch\n *\n * @param {Object} parentBranch\n * @param {'NW'| 'NE' | 'SW' | 'SE'} region\n * @private\n */\n\n }, {\n key: \"_insertRegion\",\n value: function _insertRegion(parentBranch, region) {\n var minX, maxX, minY, maxY;\n var childSize = 0.5 * parentBranch.size;\n\n switch (region) {\n case \"NW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n\n case \"NE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n\n case \"SW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n\n case \"SE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n }\n\n parentBranch.children[region] = {\n centerOfMass: {\n x: 0,\n y: 0\n },\n mass: 0,\n range: {\n minX: minX,\n maxX: maxX,\n minY: minY,\n maxY: maxY\n },\n size: 0.5 * parentBranch.size,\n calcSize: 2 * parentBranch.calcSize,\n children: {\n data: null\n },\n maxWidth: 0,\n level: parentBranch.level + 1,\n childrenCount: 0\n };\n } //--------------------------- DEBUGGING BELOW ---------------------------//\n\n /**\n * This function is for debugging purposed, it draws the tree.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} color\n * @private\n */\n\n }, {\n key: \"_debug\",\n value: function _debug(ctx, color) {\n if (this.barnesHutTree !== undefined) {\n ctx.lineWidth = 1;\n\n this._drawBranch(this.barnesHutTree.root, ctx, color);\n }\n }\n /**\n * This function is for debugging purposes. It draws the branches recursively.\n *\n * @param {Object} branch\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} color\n * @private\n */\n\n }, {\n key: \"_drawBranch\",\n value: function _drawBranch(branch, ctx, color) {\n if (color === undefined) {\n color = \"#FF0000\";\n }\n\n if (branch.childrenCount === 4) {\n this._drawBranch(branch.children.NW, ctx);\n\n this._drawBranch(branch.children.NE, ctx);\n\n this._drawBranch(branch.children.SE, ctx);\n\n this._drawBranch(branch.children.SW, ctx);\n }\n\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.minY);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.maxY);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.maxY);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.minY);\n ctx.stroke();\n /*\n if (branch.mass > 0) {\n ctx.circle(branch.centerOfMass.x, branch.centerOfMass.y, 3*branch.mass);\n ctx.stroke();\n }\n */\n }\n }]);\n\n return BarnesHutSolver;\n}();\n\n/**\n * Repulsion Solver\n */\n\nvar RepulsionSolver = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n function RepulsionSolver(body, physicsBody, options) {\n classCallCheck(this, RepulsionSolver);\n\n this._rng = Alea(\"REPULSION SOLVER\");\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n /**\n *\n * @param {Object} options\n */\n\n\n createClass(RepulsionSolver, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n }\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n *\n * @private\n */\n\n }, {\n key: \"solve\",\n value: function solve() {\n var dx, dy, distance, fx, fy, repulsingForce, node1, node2;\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces; // repulsing forces between nodes\n\n var nodeDistance = this.options.nodeDistance; // approximation constants\n\n var a = -2 / 3 / nodeDistance;\n var b = 4 / 3; // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n\n for (var i = 0; i < nodeIndices.length - 1; i++) {\n node1 = nodes[nodeIndices[i]];\n\n for (var j = i + 1; j < nodeIndices.length; j++) {\n node2 = nodes[nodeIndices[j]];\n dx = node2.x - node1.x;\n dy = node2.y - node1.y;\n distance = Math.sqrt(dx * dx + dy * dy); // same condition as BarnesHutSolver, making sure nodes are never 100% overlapping.\n\n if (distance === 0) {\n distance = 0.1 * this._rng();\n dx = distance;\n }\n\n if (distance < 2 * nodeDistance) {\n if (distance < 0.5 * nodeDistance) {\n repulsingForce = 1.0;\n } else {\n repulsingForce = a * distance + b; // linear approx of 1 / (1 + Math.exp((distance / nodeDistance - 1) * steepness))\n }\n\n repulsingForce = repulsingForce / distance;\n fx = dx * repulsingForce;\n fy = dy * repulsingForce;\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n }]);\n\n return RepulsionSolver;\n}();\n\n/**\n * Hierarchical Repulsion Solver\n */\nvar HierarchicalRepulsionSolver = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n function HierarchicalRepulsionSolver(body, physicsBody, options) {\n classCallCheck(this, HierarchicalRepulsionSolver);\n\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n /**\n *\n * @param {Object} options\n */\n\n\n createClass(HierarchicalRepulsionSolver, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n this.overlapAvoidanceFactor = Math.max(0, Math.min(1, this.options.avoidOverlap || 0));\n }\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n *\n * @private\n */\n\n }, {\n key: \"solve\",\n value: function solve() {\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces; // repulsing forces between nodes\n\n var nodeDistance = this.options.nodeDistance; // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n\n for (var i = 0; i < nodeIndices.length - 1; i++) {\n var node1 = nodes[nodeIndices[i]];\n\n for (var j = i + 1; j < nodeIndices.length; j++) {\n var node2 = nodes[nodeIndices[j]]; // nodes only affect nodes on their level\n\n if (node1.level === node2.level) {\n var theseNodesDistance = nodeDistance + this.overlapAvoidanceFactor * ((node1.shape.radius || 0) / 2 + (node2.shape.radius || 0) / 2);\n var dx = node2.x - node1.x;\n var dy = node2.y - node1.y;\n var distance = Math.sqrt(dx * dx + dy * dy);\n var steepness = 0.05;\n var repulsingForce = void 0;\n\n if (distance < theseNodesDistance) {\n repulsingForce = -Math.pow(steepness * distance, 2) + Math.pow(steepness * theseNodesDistance, 2);\n } else {\n repulsingForce = 0;\n } // normalize force with\n\n\n if (distance !== 0) {\n repulsingForce = repulsingForce / distance;\n }\n\n var fx = dx * repulsingForce;\n var fy = dy * repulsingForce;\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n }]);\n\n return HierarchicalRepulsionSolver;\n}();\n\n/**\n * Spring Solver\n */\nvar SpringSolver = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n function SpringSolver(body, physicsBody, options) {\n classCallCheck(this, SpringSolver);\n\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n /**\n *\n * @param {Object} options\n */\n\n\n createClass(SpringSolver, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n }\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n *\n * @private\n */\n\n }, {\n key: \"solve\",\n value: function solve() {\n var edgeLength, edge;\n var edgeIndices = this.physicsBody.physicsEdgeIndices;\n var edges = this.body.edges;\n var node1, node2, node3; // forces caused by the edges, modelled as springs\n\n for (var i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n\n if (edge.connected === true && edge.toId !== edge.fromId) {\n // only calculate forces if nodes are in the same sector\n if (this.body.nodes[edge.toId] !== undefined && this.body.nodes[edge.fromId] !== undefined) {\n if (edge.edgeType.via !== undefined) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n node1 = edge.to;\n node2 = edge.edgeType.via;\n node3 = edge.from;\n\n this._calculateSpringForce(node1, node2, 0.5 * edgeLength);\n\n this._calculateSpringForce(node2, node3, 0.5 * edgeLength);\n } else {\n // the * 1.5 is here so the edge looks as large as a smooth edge. It does not initially because the smooth edges use\n // the support nodes which exert a repulsive force on the to and from nodes, making the edge appear larger.\n edgeLength = edge.options.length === undefined ? this.options.springLength * 1.5 : edge.options.length;\n\n this._calculateSpringForce(edge.from, edge.to, edgeLength);\n }\n }\n }\n }\n }\n /**\n * This is the code actually performing the calculation for the function above.\n *\n * @param {Node} node1\n * @param {Node} node2\n * @param {number} edgeLength\n * @private\n */\n\n }, {\n key: \"_calculateSpringForce\",\n value: function _calculateSpringForce(node1, node2, edgeLength) {\n var dx = node1.x - node2.x;\n var dy = node1.y - node2.y;\n var distance = Math.max(Math.sqrt(dx * dx + dy * dy), 0.01); // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n\n var springForce = this.options.springConstant * (edgeLength - distance) / distance;\n var fx = dx * springForce;\n var fy = dy * springForce; // handle the case where one node is not part of the physcis\n\n if (this.physicsBody.forces[node1.id] !== undefined) {\n this.physicsBody.forces[node1.id].x += fx;\n this.physicsBody.forces[node1.id].y += fy;\n }\n\n if (this.physicsBody.forces[node2.id] !== undefined) {\n this.physicsBody.forces[node2.id].x -= fx;\n this.physicsBody.forces[node2.id].y -= fy;\n }\n }\n }]);\n\n return SpringSolver;\n}();\n\n/**\n * Hierarchical Spring Solver\n */\nvar HierarchicalSpringSolver = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n function HierarchicalSpringSolver(body, physicsBody, options) {\n classCallCheck(this, HierarchicalSpringSolver);\n\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n /**\n *\n * @param {Object} options\n */\n\n\n createClass(HierarchicalSpringSolver, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n }\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n *\n * @private\n */\n\n }, {\n key: \"solve\",\n value: function solve() {\n var edgeLength, edge;\n var dx, dy, fx, fy, springForce, distance;\n var edges = this.body.edges;\n var factor = 0.5;\n var edgeIndices = this.physicsBody.physicsEdgeIndices;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces; // initialize the spring force counters\n\n for (var i = 0; i < nodeIndices.length; i++) {\n var nodeId = nodeIndices[i];\n forces[nodeId].springFx = 0;\n forces[nodeId].springFy = 0;\n } // forces caused by the edges, modelled as springs\n\n\n for (var _i = 0; _i < edgeIndices.length; _i++) {\n edge = edges[edgeIndices[_i]];\n\n if (edge.connected === true) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n dx = edge.from.x - edge.to.x;\n dy = edge.from.y - edge.to.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n distance = distance === 0 ? 0.01 : distance; // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n\n springForce = this.options.springConstant * (edgeLength - distance) / distance;\n fx = dx * springForce;\n fy = dy * springForce;\n\n if (edge.to.level != edge.from.level) {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].springFx -= fx;\n forces[edge.toId].springFy -= fy;\n }\n\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].springFx += fx;\n forces[edge.fromId].springFy += fy;\n }\n } else {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].x -= factor * fx;\n forces[edge.toId].y -= factor * fy;\n }\n\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].x += factor * fx;\n forces[edge.fromId].y += factor * fy;\n }\n }\n }\n } // normalize spring forces\n\n\n springForce = 1;\n var springFx, springFy;\n\n for (var _i2 = 0; _i2 < nodeIndices.length; _i2++) {\n var _nodeId = nodeIndices[_i2];\n springFx = Math.min(springForce, Math.max(-springForce, forces[_nodeId].springFx));\n springFy = Math.min(springForce, Math.max(-springForce, forces[_nodeId].springFy));\n forces[_nodeId].x += springFx;\n forces[_nodeId].y += springFy;\n } // retain energy balance\n\n\n var totalFx = 0;\n var totalFy = 0;\n\n for (var _i3 = 0; _i3 < nodeIndices.length; _i3++) {\n var _nodeId2 = nodeIndices[_i3];\n totalFx += forces[_nodeId2].x;\n totalFy += forces[_nodeId2].y;\n }\n\n var correctionFx = totalFx / nodeIndices.length;\n var correctionFy = totalFy / nodeIndices.length;\n\n for (var _i4 = 0; _i4 < nodeIndices.length; _i4++) {\n var _nodeId3 = nodeIndices[_i4];\n forces[_nodeId3].x -= correctionFx;\n forces[_nodeId3].y -= correctionFy;\n }\n }\n }]);\n\n return HierarchicalSpringSolver;\n}();\n\n/**\n * Central Gravity Solver\n */\nvar CentralGravitySolver = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n function CentralGravitySolver(body, physicsBody, options) {\n classCallCheck(this, CentralGravitySolver);\n\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n /**\n *\n * @param {Object} options\n */\n\n\n createClass(CentralGravitySolver, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n }\n /**\n * Calculates forces for each node\n */\n\n }, {\n key: \"solve\",\n value: function solve() {\n var dx, dy, distance, node;\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n for (var i = 0; i < nodeIndices.length; i++) {\n var nodeId = nodeIndices[i];\n node = nodes[nodeId];\n dx = -node.x;\n dy = -node.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n this._calculateForces(distance, dx, dy, forces, node);\n }\n }\n /**\n * Calculate the forces based on the distance.\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Object} forces\n * @param {Node} node\n * @private\n */\n\n }, {\n key: \"_calculateForces\",\n value: function _calculateForces(distance, dx, dy, forces, node) {\n var gravityForce = distance === 0 ? 0 : this.options.centralGravity / distance;\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n }]);\n\n return CentralGravitySolver;\n}();\n\nfunction _createSuper$q(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$q(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$q() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * @extends BarnesHutSolver\n */\n\nvar ForceAtlas2BasedRepulsionSolver = /*#__PURE__*/function (_BarnesHutSolver) {\n inherits(ForceAtlas2BasedRepulsionSolver, _BarnesHutSolver);\n\n var _super = _createSuper$q(ForceAtlas2BasedRepulsionSolver);\n\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n function ForceAtlas2BasedRepulsionSolver(body, physicsBody, options) {\n var _this;\n\n classCallCheck(this, ForceAtlas2BasedRepulsionSolver);\n\n _this = _super.call(this, body, physicsBody, options);\n _this._rng = Alea(\"FORCE ATLAS 2 BASED REPULSION SOLVER\");\n return _this;\n }\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Node} node\n * @param {Object} parentBranch\n * @private\n */\n\n\n createClass(ForceAtlas2BasedRepulsionSolver, [{\n key: \"_calculateForces\",\n value: function _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1 * this._rng();\n dx = distance;\n }\n\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius);\n }\n\n var degree = node.edges.length + 1; // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n\n var gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass * degree / Math.pow(distance, 2);\n var fx = dx * gravityForce;\n var fy = dy * gravityForce;\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n }]);\n\n return ForceAtlas2BasedRepulsionSolver;\n}(BarnesHutSolver);\n\nfunction _createSuper$r(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$r(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$r() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * @extends CentralGravitySolver\n */\n\nvar ForceAtlas2BasedCentralGravitySolver = /*#__PURE__*/function (_CentralGravitySolver) {\n inherits(ForceAtlas2BasedCentralGravitySolver, _CentralGravitySolver);\n\n var _super = _createSuper$r(ForceAtlas2BasedCentralGravitySolver);\n\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n function ForceAtlas2BasedCentralGravitySolver(body, physicsBody, options) {\n classCallCheck(this, ForceAtlas2BasedCentralGravitySolver);\n\n return _super.call(this, body, physicsBody, options);\n }\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Object} forces\n * @param {Node} node\n * @private\n */\n\n\n createClass(ForceAtlas2BasedCentralGravitySolver, [{\n key: \"_calculateForces\",\n value: function _calculateForces(distance, dx, dy, forces, node) {\n if (distance > 0) {\n var degree = node.edges.length + 1;\n var gravityForce = this.options.centralGravity * degree * node.options.mass;\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n }\n }]);\n\n return ForceAtlas2BasedCentralGravitySolver;\n}(CentralGravitySolver);\n\n/**\n * The physics engine\n */\n\nvar PhysicsEngine = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n */\n function PhysicsEngine(body) {\n classCallCheck(this, PhysicsEngine);\n\n this.body = body;\n this.physicsBody = {\n physicsNodeIndices: [],\n physicsEdgeIndices: [],\n forces: {},\n velocities: {}\n };\n this.physicsEnabled = true;\n this.simulationInterval = 1000 / 60;\n this.requiresTimeout = true;\n this.previousStates = {};\n this.referenceState = {};\n this.freezeCache = {};\n this.renderTimer = undefined; // parameters for the adaptive timestep\n\n this.adaptiveTimestep = false;\n this.adaptiveTimestepEnabled = false;\n this.adaptiveCounter = 0;\n this.adaptiveInterval = 3;\n this.stabilized = false;\n this.startedStabilization = false;\n this.stabilizationIterations = 0;\n this.ready = false; // will be set to true if the stabilize\n // default options\n\n this.options = {};\n this.defaultOptions = {\n enabled: true,\n barnesHut: {\n theta: 0.5,\n gravitationalConstant: -2000,\n centralGravity: 0.3,\n springLength: 95,\n springConstant: 0.04,\n damping: 0.09,\n avoidOverlap: 0\n },\n forceAtlas2Based: {\n theta: 0.5,\n gravitationalConstant: -50,\n centralGravity: 0.01,\n springConstant: 0.08,\n springLength: 100,\n damping: 0.4,\n avoidOverlap: 0\n },\n repulsion: {\n centralGravity: 0.2,\n springLength: 200,\n springConstant: 0.05,\n nodeDistance: 100,\n damping: 0.09,\n avoidOverlap: 0\n },\n hierarchicalRepulsion: {\n centralGravity: 0.0,\n springLength: 100,\n springConstant: 0.01,\n nodeDistance: 120,\n damping: 0.09\n },\n maxVelocity: 50,\n minVelocity: 0.75,\n // px/s\n solver: 'barnesHut',\n stabilization: {\n enabled: true,\n iterations: 1000,\n // maximum number of iteration to stabilize\n updateInterval: 50,\n onlyDynamicEdges: false,\n fit: true\n },\n timestep: 0.5,\n adaptiveTimestep: true,\n wind: {\n x: 0,\n y: 0\n }\n };\n\n assign$2(this.options, this.defaultOptions);\n\n this.timestep = 0.5;\n this.layoutFailed = false;\n this.bindEventListeners();\n }\n /**\n * Binds event listeners\n */\n\n\n createClass(PhysicsEngine, [{\n key: \"bindEventListeners\",\n value: function bindEventListeners() {\n var _this = this;\n\n this.body.emitter.on('initPhysics', function () {\n _this.initPhysics();\n });\n this.body.emitter.on('_layoutFailed', function () {\n _this.layoutFailed = true;\n });\n this.body.emitter.on('resetPhysics', function () {\n _this.stopSimulation();\n\n _this.ready = false;\n });\n this.body.emitter.on('disablePhysics', function () {\n _this.physicsEnabled = false;\n\n _this.stopSimulation();\n });\n this.body.emitter.on('restorePhysics', function () {\n _this.setOptions(_this.options);\n\n if (_this.ready === true) {\n _this.startSimulation();\n }\n });\n this.body.emitter.on('startSimulation', function () {\n if (_this.ready === true) {\n _this.startSimulation();\n }\n });\n this.body.emitter.on('stopSimulation', function () {\n _this.stopSimulation();\n });\n this.body.emitter.on('destroy', function () {\n _this.stopSimulation(false);\n\n _this.body.emitter.off();\n });\n this.body.emitter.on(\"_dataChanged\", function () {\n // Nodes and/or edges have been added or removed, update shortcut lists.\n _this.updatePhysicsData();\n }); // debug: show forces\n // this.body.emitter.on(\"afterDrawing\", (ctx) => {this._drawForces(ctx);});\n }\n /**\n * set the physics options\n * @param {Object} options\n */\n\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options !== undefined) {\n if (options === false) {\n this.options.enabled = false;\n this.physicsEnabled = false;\n this.stopSimulation();\n } else if (options === true) {\n this.options.enabled = true;\n this.physicsEnabled = true;\n this.startSimulation();\n } else {\n this.physicsEnabled = true;\n selectiveNotDeepExtend(['stabilization'], this.options, options);\n mergeOptions(this.options, options, 'stabilization');\n\n if (options.enabled === undefined) {\n this.options.enabled = true;\n }\n\n if (this.options.enabled === false) {\n this.physicsEnabled = false;\n this.stopSimulation();\n }\n\n var wind = this.options.wind;\n\n if (wind) {\n if (typeof wind.x !== 'number' || isNan$2(wind.x)) {\n wind.x = 0;\n }\n\n if (typeof wind.y !== 'number' || isNan$2(wind.y)) {\n wind.y = 0;\n }\n } // set the timestep\n\n\n this.timestep = this.options.timestep;\n }\n }\n\n this.init();\n }\n /**\n * configure the engine.\n */\n\n }, {\n key: \"init\",\n value: function init() {\n var options;\n\n if (this.options.solver === 'forceAtlas2Based') {\n options = this.options.forceAtlas2Based;\n this.nodesSolver = new ForceAtlas2BasedRepulsionSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new ForceAtlas2BasedCentralGravitySolver(this.body, this.physicsBody, options);\n } else if (this.options.solver === 'repulsion') {\n options = this.options.repulsion;\n this.nodesSolver = new RepulsionSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n } else if (this.options.solver === 'hierarchicalRepulsion') {\n options = this.options.hierarchicalRepulsion;\n this.nodesSolver = new HierarchicalRepulsionSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new HierarchicalSpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n } else {\n // barnesHut\n options = this.options.barnesHut;\n this.nodesSolver = new BarnesHutSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n\n this.modelOptions = options;\n }\n /**\n * initialize the engine\n */\n\n }, {\n key: \"initPhysics\",\n value: function initPhysics() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n if (this.options.stabilization.enabled === true) {\n this.stabilize();\n } else {\n this.stabilized = false;\n this.ready = true;\n this.body.emitter.emit('fit', {}, this.layoutFailed); // if the layout failed, we use the approximation for the zoom\n\n this.startSimulation();\n }\n } else {\n this.ready = true;\n this.body.emitter.emit('fit');\n }\n }\n /**\n * Start the simulation\n */\n\n }, {\n key: \"startSimulation\",\n value: function startSimulation() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n this.stabilized = false; // when visible, adaptivity is disabled.\n\n this.adaptiveTimestep = false; // this sets the width of all nodes initially which could be required for the avoidOverlap\n\n this.body.emitter.emit(\"_resizeNodes\");\n\n if (this.viewFunction === undefined) {\n var _context;\n\n this.viewFunction = bind$2(_context = this.simulationStep).call(_context, this);\n this.body.emitter.on('initRedraw', this.viewFunction);\n this.body.emitter.emit('_startRendering');\n }\n } else {\n this.body.emitter.emit('_redraw');\n }\n }\n /**\n * Stop the simulation, force stabilization.\n * @param {boolean} [emit=true]\n */\n\n }, {\n key: \"stopSimulation\",\n value: function stopSimulation() {\n var emit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n this.stabilized = true;\n\n if (emit === true) {\n this._emitStabilized();\n }\n\n if (this.viewFunction !== undefined) {\n this.body.emitter.off('initRedraw', this.viewFunction);\n this.viewFunction = undefined;\n\n if (emit === true) {\n this.body.emitter.emit('_stopRendering');\n }\n }\n }\n /**\n * The viewFunction inserts this step into each render loop. It calls the physics tick and handles the cleanup at stabilized.\n *\n */\n\n }, {\n key: \"simulationStep\",\n value: function simulationStep() {\n // check if the physics have settled\n var startTime = now$2();\n\n this.physicsTick();\n var physicsTime = now$2() - startTime; // run double speed if it is a little graph\n\n if ((physicsTime < 0.4 * this.simulationInterval || this.runDoubleSpeed === true) && this.stabilized === false) {\n this.physicsTick(); // this makes sure there is no jitter. The decision is taken once to run it at double speed.\n\n this.runDoubleSpeed = true;\n }\n\n if (this.stabilized === true) {\n this.stopSimulation();\n }\n }\n /**\n * trigger the stabilized event.\n *\n * @param {number} [amountOfIterations=this.stabilizationIterations]\n * @private\n */\n\n }, {\n key: \"_emitStabilized\",\n value: function _emitStabilized() {\n var _this2 = this;\n\n var amountOfIterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.stabilizationIterations;\n\n if (this.stabilizationIterations > 1 || this.startedStabilization === true) {\n setTimeout$2(function () {\n _this2.body.emitter.emit('stabilized', {\n iterations: amountOfIterations\n });\n\n _this2.startedStabilization = false;\n _this2.stabilizationIterations = 0;\n }, 0);\n }\n }\n /**\n * Calculate the forces for one physics iteration and move the nodes.\n * @private\n */\n\n }, {\n key: \"physicsStep\",\n value: function physicsStep() {\n this.gravitySolver.solve();\n this.nodesSolver.solve();\n this.edgesSolver.solve();\n this.moveNodes();\n }\n /**\n * Make dynamic adjustments to the timestep, based on current state.\n *\n * Helper function for physicsTick().\n * @private\n */\n\n }, {\n key: \"adjustTimeStep\",\n value: function adjustTimeStep() {\n var factor = 1.2; // Factor for increasing the timestep on success.\n // we compare the two steps. if it is acceptable we double the step.\n\n if (this._evaluateStepQuality() === true) {\n this.timestep = factor * this.timestep;\n } else {\n // if not, we decrease the step to a minimum of the options timestep.\n // if the decreased timestep is smaller than the options step, we do not reset the counter\n // we assume that the options timestep is stable enough.\n if (this.timestep / factor < this.options.timestep) {\n this.timestep = this.options.timestep;\n } else {\n // if the timestep was larger than 2 times the option one we check the adaptivity again to ensure\n // that large instabilities do not form.\n this.adaptiveCounter = -1; // check again next iteration\n\n this.timestep = Math.max(this.options.timestep, this.timestep / factor);\n }\n }\n }\n /**\n * A single simulation step (or 'tick') in the physics simulation\n *\n * @private\n */\n\n }, {\n key: \"physicsTick\",\n value: function physicsTick() {\n this._startStabilizing(); // this ensures that there is no start event when the network is already stable.\n\n\n if (this.stabilized === true) return; // adaptivity means the timestep adapts to the situation, only applicable for stabilization\n\n if (this.adaptiveTimestep === true && this.adaptiveTimestepEnabled === true) {\n // timestep remains stable for \"interval\" iterations.\n var doAdaptive = this.adaptiveCounter % this.adaptiveInterval === 0;\n\n if (doAdaptive) {\n // first the big step and revert.\n this.timestep = 2 * this.timestep;\n this.physicsStep();\n this.revert(); // saves the reference state\n // now the normal step. Since this is the last step, it is the more stable one and we will take this.\n\n this.timestep = 0.5 * this.timestep; // since it's half the step, we do it twice.\n\n this.physicsStep();\n this.physicsStep();\n this.adjustTimeStep();\n } else {\n this.physicsStep(); // normal step, keeping timestep constant\n }\n\n this.adaptiveCounter += 1;\n } else {\n // case for the static timestep, we reset it to the one in options and take a normal step.\n this.timestep = this.options.timestep;\n this.physicsStep();\n }\n\n if (this.stabilized === true) this.revert();\n this.stabilizationIterations++;\n }\n /**\n * Nodes and edges can have the physics toggles on or off. A collection of indices is created here so we can skip the check all the time.\n *\n * @private\n */\n\n }, {\n key: \"updatePhysicsData\",\n value: function updatePhysicsData() {\n this.physicsBody.forces = {};\n this.physicsBody.physicsNodeIndices = [];\n this.physicsBody.physicsEdgeIndices = [];\n var nodes = this.body.nodes;\n var edges = this.body.edges; // get node indices for physics\n\n for (var nodeId in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, nodeId)) {\n if (nodes[nodeId].options.physics === true) {\n this.physicsBody.physicsNodeIndices.push(nodes[nodeId].id);\n }\n }\n } // get edge indices for physics\n\n\n for (var edgeId in edges) {\n if (Object.prototype.hasOwnProperty.call(edges, edgeId)) {\n if (edges[edgeId].options.physics === true) {\n this.physicsBody.physicsEdgeIndices.push(edges[edgeId].id);\n }\n }\n } // get the velocity and the forces vector\n\n\n for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n var _nodeId = this.physicsBody.physicsNodeIndices[i];\n this.physicsBody.forces[_nodeId] = {\n x: 0,\n y: 0\n }; // forces can be reset because they are recalculated. Velocities have to persist.\n\n if (this.physicsBody.velocities[_nodeId] === undefined) {\n this.physicsBody.velocities[_nodeId] = {\n x: 0,\n y: 0\n };\n }\n } // clean deleted nodes from the velocity vector\n\n\n for (var _nodeId2 in this.physicsBody.velocities) {\n if (nodes[_nodeId2] === undefined) {\n delete this.physicsBody.velocities[_nodeId2];\n }\n }\n }\n /**\n * Revert the simulation one step. This is done so after stabilization, every new start of the simulation will also say stabilized.\n */\n\n }, {\n key: \"revert\",\n value: function revert() {\n var nodeIds = keys$3(this.previousStates);\n\n var nodes = this.body.nodes;\n var velocities = this.physicsBody.velocities;\n this.referenceState = {};\n\n for (var i = 0; i < nodeIds.length; i++) {\n var nodeId = nodeIds[i];\n\n if (nodes[nodeId] !== undefined) {\n if (nodes[nodeId].options.physics === true) {\n this.referenceState[nodeId] = {\n positions: {\n x: nodes[nodeId].x,\n y: nodes[nodeId].y\n }\n };\n velocities[nodeId].x = this.previousStates[nodeId].vx;\n velocities[nodeId].y = this.previousStates[nodeId].vy;\n nodes[nodeId].x = this.previousStates[nodeId].x;\n nodes[nodeId].y = this.previousStates[nodeId].y;\n }\n } else {\n delete this.previousStates[nodeId];\n }\n }\n }\n /**\n * This compares the reference state to the current state\n *\n * @returns {boolean}\n * @private\n */\n\n }, {\n key: \"_evaluateStepQuality\",\n value: function _evaluateStepQuality() {\n var dx, dy, dpos;\n var nodes = this.body.nodes;\n var reference = this.referenceState;\n var posThreshold = 0.3;\n\n for (var nodeId in this.referenceState) {\n if (Object.prototype.hasOwnProperty.call(this.referenceState, nodeId) && nodes[nodeId] !== undefined) {\n dx = nodes[nodeId].x - reference[nodeId].positions.x;\n dy = nodes[nodeId].y - reference[nodeId].positions.y;\n dpos = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n\n if (dpos > posThreshold) {\n return false;\n }\n }\n }\n\n return true;\n }\n /**\n * move the nodes one timestep and check if they are stabilized\n */\n\n }, {\n key: \"moveNodes\",\n value: function moveNodes() {\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var maxNodeVelocity = 0;\n var averageNodeVelocity = 0; // the velocity threshold (energy in the system) for the adaptivity toggle\n\n var velocityAdaptiveThreshold = 5;\n\n for (var i = 0; i < nodeIndices.length; i++) {\n var nodeId = nodeIndices[i];\n\n var nodeVelocity = this._performStep(nodeId); // stabilized is true if stabilized is true and velocity is smaller than vmin --> all nodes must be stabilized\n\n\n maxNodeVelocity = Math.max(maxNodeVelocity, nodeVelocity);\n averageNodeVelocity += nodeVelocity;\n } // evaluating the stabilized and adaptiveTimestepEnabled conditions\n\n\n this.adaptiveTimestepEnabled = averageNodeVelocity / nodeIndices.length < velocityAdaptiveThreshold;\n this.stabilized = maxNodeVelocity < this.options.minVelocity;\n }\n /**\n * Calculate new velocity for a coordinate direction\n *\n * @param {number} v velocity for current coordinate\n * @param {number} f regular force for current coordinate\n * @param {number} m mass of current node\n * @returns {number} new velocity for current coordinate\n * @private\n */\n\n }, {\n key: \"calculateComponentVelocity\",\n value: function calculateComponentVelocity(v, f, m) {\n var df = this.modelOptions.damping * v; // damping force\n\n var a = (f - df) / m; // acceleration\n\n v += a * this.timestep; // Put a limit on the velocities if it is really high\n\n var maxV = this.options.maxVelocity || 1e9;\n\n if (Math.abs(v) > maxV) {\n v = v > 0 ? maxV : -maxV;\n }\n\n return v;\n }\n /**\n * Perform the actual step\n *\n * @param {Node.id} nodeId\n * @returns {number} the new velocity of given node\n * @private\n */\n\n }, {\n key: \"_performStep\",\n value: function _performStep(nodeId) {\n var node = this.body.nodes[nodeId];\n var force = this.physicsBody.forces[nodeId];\n\n if (this.options.wind) {\n force.x += this.options.wind.x;\n force.y += this.options.wind.y;\n }\n\n var velocity = this.physicsBody.velocities[nodeId]; // store the state so we can revert\n\n this.previousStates[nodeId] = {\n x: node.x,\n y: node.y,\n vx: velocity.x,\n vy: velocity.y\n };\n\n if (node.options.fixed.x === false) {\n velocity.x = this.calculateComponentVelocity(velocity.x, force.x, node.options.mass);\n node.x += velocity.x * this.timestep;\n } else {\n force.x = 0;\n velocity.x = 0;\n }\n\n if (node.options.fixed.y === false) {\n velocity.y = this.calculateComponentVelocity(velocity.y, force.y, node.options.mass);\n node.y += velocity.y * this.timestep;\n } else {\n force.y = 0;\n velocity.y = 0;\n }\n\n var totalVelocity = Math.sqrt(Math.pow(velocity.x, 2) + Math.pow(velocity.y, 2));\n return totalVelocity;\n }\n /**\n * When initializing and stabilizing, we can freeze nodes with a predefined position.\n * This greatly speeds up stabilization because only the supportnodes for the smoothCurves have to settle.\n *\n * @private\n */\n\n }, {\n key: \"_freezeNodes\",\n value: function _freezeNodes() {\n var nodes = this.body.nodes;\n\n for (var id in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, id)) {\n if (nodes[id].x && nodes[id].y) {\n var fixed = nodes[id].options.fixed;\n this.freezeCache[id] = {\n x: fixed.x,\n y: fixed.y\n };\n fixed.x = true;\n fixed.y = true;\n }\n }\n }\n }\n /**\n * Unfreezes the nodes that have been frozen by _freezeDefinedNodes.\n *\n * @private\n */\n\n }, {\n key: \"_restoreFrozenNodes\",\n value: function _restoreFrozenNodes() {\n var nodes = this.body.nodes;\n\n for (var id in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, id)) {\n if (this.freezeCache[id] !== undefined) {\n nodes[id].options.fixed.x = this.freezeCache[id].x;\n nodes[id].options.fixed.y = this.freezeCache[id].y;\n }\n }\n }\n\n this.freezeCache = {};\n }\n /**\n * Find a stable position for all nodes\n *\n * @param {number} [iterations=this.options.stabilization.iterations]\n */\n\n }, {\n key: \"stabilize\",\n value: function stabilize() {\n var _this3 = this;\n\n var iterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.stabilization.iterations;\n\n if (typeof iterations !== 'number') {\n iterations = this.options.stabilization.iterations;\n console.log('The stabilize method needs a numeric amount of iterations. Switching to default: ', iterations);\n }\n\n if (this.physicsBody.physicsNodeIndices.length === 0) {\n this.ready = true;\n return;\n } // enable adaptive timesteps\n\n\n this.adaptiveTimestep = this.options.adaptiveTimestep; // this sets the width of all nodes initially which could be required for the avoidOverlap\n\n this.body.emitter.emit(\"_resizeNodes\");\n this.stopSimulation(); // stop the render loop\n\n this.stabilized = false; // block redraw requests\n\n this.body.emitter.emit('_blockRedraw');\n this.targetIterations = iterations; // start the stabilization\n\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._freezeNodes();\n }\n\n this.stabilizationIterations = 0;\n\n setTimeout$2(function () {\n return _this3._stabilizationBatch();\n }, 0);\n }\n /**\n * If not already stabilizing, start it and emit a start event.\n *\n * @returns {boolean} true if stabilization started with this call\n * @private\n */\n\n }, {\n key: \"_startStabilizing\",\n value: function _startStabilizing() {\n if (this.startedStabilization === true) return false;\n this.body.emitter.emit('startStabilizing');\n this.startedStabilization = true;\n return true;\n }\n /**\n * One batch of stabilization\n * @private\n */\n\n }, {\n key: \"_stabilizationBatch\",\n value: function _stabilizationBatch() {\n var _this4 = this;\n\n var running = function running() {\n return _this4.stabilized === false && _this4.stabilizationIterations < _this4.targetIterations;\n };\n\n var sendProgress = function sendProgress() {\n _this4.body.emitter.emit('stabilizationProgress', {\n iterations: _this4.stabilizationIterations,\n total: _this4.targetIterations\n });\n };\n\n if (this._startStabilizing()) {\n sendProgress(); // Ensure that there is at least one start event.\n }\n\n var count = 0;\n\n while (running() && count < this.options.stabilization.updateInterval) {\n this.physicsTick();\n count++;\n }\n\n sendProgress();\n\n if (running()) {\n var _context2;\n\n setTimeout$2(bind$2(_context2 = this._stabilizationBatch).call(_context2, this), 0);\n } else {\n this._finalizeStabilization();\n }\n }\n /**\n * Wrap up the stabilization, fit and emit the events.\n * @private\n */\n\n }, {\n key: \"_finalizeStabilization\",\n value: function _finalizeStabilization() {\n this.body.emitter.emit('_allowRedraw');\n\n if (this.options.stabilization.fit === true) {\n this.body.emitter.emit('fit');\n }\n\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._restoreFrozenNodes();\n }\n\n this.body.emitter.emit('stabilizationIterationsDone');\n this.body.emitter.emit('_requestRedraw');\n\n if (this.stabilized === true) {\n this._emitStabilized();\n } else {\n this.startSimulation();\n }\n\n this.ready = true;\n } //--------------------------- DEBUGGING BELOW ---------------------------//\n\n /**\n * Debug function that display arrows for the forces currently active in the network.\n *\n * Use this when debugging only.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n\n }, {\n key: \"_drawForces\",\n value: function _drawForces(ctx) {\n for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n var index = this.physicsBody.physicsNodeIndices[i];\n var node = this.body.nodes[index];\n var force = this.physicsBody.forces[index];\n var factor = 20;\n var colorFactor = 0.03;\n var forceSize = Math.sqrt(Math.pow(force.x, 2) + Math.pow(force.x, 2));\n var size = Math.min(Math.max(5, forceSize), 15);\n var arrowSize = 3 * size;\n var color = HSVToHex((180 - Math.min(1, Math.max(0, colorFactor * forceSize)) * 180) / 360, 1, 1);\n var point = {\n x: node.x + factor * force.x,\n y: node.y + factor * force.y\n };\n ctx.lineWidth = size;\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(node.x, node.y);\n ctx.lineTo(point.x, point.y);\n ctx.stroke();\n var angle = Math.atan2(force.y, force.x);\n ctx.fillStyle = color;\n EndPoints.draw(ctx, {\n type: 'arrow',\n point: point,\n angle: angle,\n length: arrowSize\n });\n\n fill$2(ctx).call(ctx);\n }\n }\n }]);\n\n return PhysicsEngine;\n}();\n\nvar nativeReverse = [].reverse;\nvar test$2 = [1, 2]; // `Array.prototype.reverse` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.reverse\n// fix for Safari 12.0 bug\n// https://bugs.webkit.org/show_bug.cgi?id=188794\n\n_export({\n target: 'Array',\n proto: true,\n forced: String(test$2) === String(test$2.reverse())\n}, {\n reverse: function reverse() {\n // eslint-disable-next-line no-self-assign\n if (isArray(this)) this.length = this.length;\n return nativeReverse.call(this);\n }\n});\n\nvar reverse = entryVirtual('Array').reverse;\n\nvar ArrayPrototype$h = Array.prototype;\n\nvar reverse_1 = function (it) {\n var own = it.reverse;\n return it === ArrayPrototype$h || it instanceof Array && own === ArrayPrototype$h.reverse ? reverse : own;\n};\n\nvar reverse$1 = reverse_1;\n\nvar reverse$2 = reverse$1;\n\n/**\n * Utility Class\n */\n\nvar NetworkUtil = /*#__PURE__*/function () {\n /**\n * @ignore\n */\n function NetworkUtil() {\n classCallCheck(this, NetworkUtil);\n }\n /**\n * Find the center position of the network considering the bounding boxes\n *\n * @param {Array.} allNodes\n * @param {Array.} [specificNodes=[]]\n * @returns {{minX: number, maxX: number, minY: number, maxY: number}}\n * @static\n */\n\n\n createClass(NetworkUtil, null, [{\n key: \"getRange\",\n value: function getRange(allNodes) {\n var specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var minY = 1e9,\n maxY = -1e9,\n minX = 1e9,\n maxX = -1e9,\n node;\n\n if (specificNodes.length > 0) {\n for (var i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n\n if (minX > node.shape.boundingBox.left) {\n minX = node.shape.boundingBox.left;\n }\n\n if (maxX < node.shape.boundingBox.right) {\n maxX = node.shape.boundingBox.right;\n }\n\n if (minY > node.shape.boundingBox.top) {\n minY = node.shape.boundingBox.top;\n } // top is negative, bottom is positive\n\n\n if (maxY < node.shape.boundingBox.bottom) {\n maxY = node.shape.boundingBox.bottom;\n } // top is negative, bottom is positive\n\n }\n }\n\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n\n return {\n minX: minX,\n maxX: maxX,\n minY: minY,\n maxY: maxY\n };\n }\n /**\n * Find the center position of the network\n *\n * @param {Array.} allNodes\n * @param {Array.} [specificNodes=[]]\n * @returns {{minX: number, maxX: number, minY: number, maxY: number}}\n * @static\n */\n\n }, {\n key: \"getRangeCore\",\n value: function getRangeCore(allNodes) {\n var specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var minY = 1e9,\n maxY = -1e9,\n minX = 1e9,\n maxX = -1e9,\n node;\n\n if (specificNodes.length > 0) {\n for (var i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n\n if (minX > node.x) {\n minX = node.x;\n }\n\n if (maxX < node.x) {\n maxX = node.x;\n }\n\n if (minY > node.y) {\n minY = node.y;\n } // top is negative, bottom is positive\n\n\n if (maxY < node.y) {\n maxY = node.y;\n } // top is negative, bottom is positive\n\n }\n }\n\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n\n return {\n minX: minX,\n maxX: maxX,\n minY: minY,\n maxY: maxY\n };\n }\n /**\n * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n * @returns {{x: number, y: number}}\n * @static\n */\n\n }, {\n key: \"findCenter\",\n value: function findCenter(range) {\n return {\n x: 0.5 * (range.maxX + range.minX),\n y: 0.5 * (range.maxY + range.minY)\n };\n }\n /**\n * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes.\n * @param {vis.Item} item\n * @param {'node'|undefined} type\n * @returns {{}}\n * @static\n */\n\n }, {\n key: \"cloneOptions\",\n value: function cloneOptions(item, type) {\n var clonedOptions = {};\n\n if (type === undefined || type === 'node') {\n deepExtend(clonedOptions, item.options, true);\n clonedOptions.x = item.x;\n clonedOptions.y = item.y;\n clonedOptions.amountOfConnections = item.edges.length;\n } else {\n deepExtend(clonedOptions, item.options, true);\n }\n\n return clonedOptions;\n }\n }]);\n\n return NetworkUtil;\n}();\n\nfunction _createSuper$s(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$s(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$s() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * A Cluster is a special Node that allows a group of Nodes positioned closely together\n * to be represented by a single Cluster Node.\n *\n * @extends Node\n */\n\nvar Cluster = /*#__PURE__*/function (_Node) {\n inherits(Cluster, _Node);\n\n var _super = _createSuper$s(Cluster);\n\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Array.}imagelist\n * @param {Array} grouplist\n * @param {Object} globalOptions\n * @param {Object} defaultOptions Global default options for nodes\n */\n function Cluster(options, body, imagelist, grouplist, globalOptions, defaultOptions) {\n var _this;\n\n classCallCheck(this, Cluster);\n\n _this = _super.call(this, options, body, imagelist, grouplist, globalOptions, defaultOptions);\n _this.isCluster = true;\n _this.containedNodes = {};\n _this.containedEdges = {};\n return _this;\n }\n /**\n * Transfer child cluster data to current and disconnect the child cluster.\n *\n * Please consult the header comment in 'Clustering.js' for the fields set here.\n *\n * @param {string|number} childClusterId id of child cluster to open\n */\n\n\n createClass(Cluster, [{\n key: \"_openChildCluster\",\n value: function _openChildCluster(childClusterId) {\n var _this2 = this;\n\n var childCluster = this.body.nodes[childClusterId];\n\n if (this.containedNodes[childClusterId] === undefined) {\n throw new Error('node with id: ' + childClusterId + ' not in current cluster');\n }\n\n if (!childCluster.isCluster) {\n throw new Error('node with id: ' + childClusterId + ' is not a cluster');\n } // Disconnect child cluster from current cluster\n\n\n delete this.containedNodes[childClusterId];\n forEach$3(childCluster.edges, function (edge) {\n delete _this2.containedEdges[edge.id];\n }); // Transfer nodes and edges\n\n forEach$3(childCluster.containedNodes, function (node, nodeId) {\n _this2.containedNodes[nodeId] = node;\n });\n childCluster.containedNodes = {};\n forEach$3(childCluster.containedEdges, function (edge, edgeId) {\n _this2.containedEdges[edgeId] = edge;\n });\n childCluster.containedEdges = {}; // Transfer edges within cluster edges which are clustered\n\n forEach$3(childCluster.edges, function (clusterEdge) {\n forEach$3(_this2.edges, function (parentClusterEdge) {\n var _context, _context2;\n\n // Assumption: a clustered edge can only be present in a single clustering edge\n // Not tested here\n var index = indexOf$3(_context = parentClusterEdge.clusteringEdgeReplacingIds).call(_context, clusterEdge.id);\n\n if (index === -1) return;\n forEach$3(clusterEdge.clusteringEdgeReplacingIds, function (srcId) {\n parentClusterEdge.clusteringEdgeReplacingIds.push(srcId); // Maintain correct bookkeeping for transferred edge\n\n _this2.body.edges[srcId].edgeReplacedById = parentClusterEdge.id;\n }); // Remove cluster edge from parent cluster edge\n\n splice$2(_context2 = parentClusterEdge.clusteringEdgeReplacingIds).call(_context2, index, 1);\n });\n });\n childCluster.edges = [];\n }\n }]);\n\n return Cluster;\n}(Node);\n\n/**\n * The clustering engine\n */\n\nvar ClusterEngine = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n */\n function ClusterEngine(body) {\n var _this = this;\n\n classCallCheck(this, ClusterEngine);\n\n this.body = body;\n this.clusteredNodes = {}; // key: node id, value: { clusterId: , node: }\n\n this.clusteredEdges = {}; // key: edge id, value: restore information for given edge\n\n this.options = {};\n this.defaultOptions = {};\n\n assign$2(this.options, this.defaultOptions);\n\n this.body.emitter.on('_resetData', function () {\n _this.clusteredNodes = {};\n _this.clusteredEdges = {};\n });\n }\n /**\n *\n * @param {number} hubsize\n * @param {Object} options\n */\n\n\n createClass(ClusterEngine, [{\n key: \"clusterByHubsize\",\n value: function clusterByHubsize(hubsize, options) {\n if (hubsize === undefined) {\n hubsize = this._getHubSize();\n } else if (_typeof_1(hubsize) === \"object\") {\n options = this._checkOptions(hubsize);\n hubsize = this._getHubSize();\n }\n\n var nodesToCluster = [];\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n var node = this.body.nodes[this.body.nodeIndices[i]];\n\n if (node.edges.length >= hubsize) {\n nodesToCluster.push(node.id);\n }\n }\n\n for (var _i = 0; _i < nodesToCluster.length; _i++) {\n this.clusterByConnection(nodesToCluster[_i], options, true);\n }\n\n this.body.emitter.emit('_dataChanged');\n }\n /**\n * loop over all nodes, check if they adhere to the condition and cluster if needed.\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n\n }, {\n key: \"cluster\",\n value: function cluster() {\n var _this2 = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (options.joinCondition === undefined) {\n throw new Error(\"Cannot call clusterByNodeData without a joinCondition function in the options.\");\n } // check if the options object is fine, append if needed\n\n\n options = this._checkOptions(options);\n var childNodesObj = {};\n var childEdgesObj = {}; // collect the nodes that will be in the cluster\n\n forEach$3(this.body.nodes, function (node, nodeId) {\n if (node.options && options.joinCondition(node.options) === true) {\n childNodesObj[nodeId] = node; // collect the edges that will be in the cluster\n\n forEach$3(node.edges, function (edge) {\n if (_this2.clusteredEdges[edge.id] === undefined) {\n childEdgesObj[edge.id] = edge;\n }\n });\n }\n });\n\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n /**\n * Cluster all nodes in the network that have only X edges\n * @param {number} edgeCount\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n\n }, {\n key: \"clusterByEdgeCount\",\n value: function clusterByEdgeCount(edgeCount, options) {\n var _this3 = this;\n\n var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n options = this._checkOptions(options);\n var clusters = [];\n var usedNodes = {};\n var edge, edges, relevantEdgeCount; // collect the nodes that will be in the cluster\n\n var _loop = function _loop(i) {\n var childNodesObj = {};\n var childEdgesObj = {};\n var nodeId = _this3.body.nodeIndices[i];\n var node = _this3.body.nodes[nodeId]; // if this node is already used in another cluster this session, we do not have to re-evaluate it.\n\n if (usedNodes[nodeId] === undefined) {\n relevantEdgeCount = 0;\n edges = [];\n\n for (var j = 0; j < node.edges.length; j++) {\n edge = node.edges[j];\n\n if (_this3.clusteredEdges[edge.id] === undefined) {\n if (edge.toId !== edge.fromId) {\n relevantEdgeCount++;\n }\n\n edges.push(edge);\n }\n } // this node qualifies, we collect its neighbours to start the clustering process.\n\n\n if (relevantEdgeCount === edgeCount) {\n var checkJoinCondition = function checkJoinCondition(node) {\n if (options.joinCondition === undefined || options.joinCondition === null) {\n return true;\n }\n\n var clonedOptions = NetworkUtil.cloneOptions(node);\n return options.joinCondition(clonedOptions);\n };\n\n var gatheringSuccessful = true;\n\n for (var _j = 0; _j < edges.length; _j++) {\n edge = edges[_j];\n\n var childNodeId = _this3._getConnectedId(edge, nodeId); // add the nodes to the list by the join condition.\n\n\n if (checkJoinCondition(node)) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[nodeId] = node;\n childNodesObj[childNodeId] = _this3.body.nodes[childNodeId];\n usedNodes[nodeId] = true;\n } else {\n // this node does not qualify after all.\n gatheringSuccessful = false;\n break;\n }\n } // add to the cluster queue\n\n\n if (keys$3(childNodesObj).length > 0 && keys$3(childEdgesObj).length > 0 && gatheringSuccessful === true) {\n /**\n * Search for cluster data that contains any of the node id's\n * @returns {Boolean} true if no joinCondition, otherwise return value of joinCondition\n */\n var findClusterData = function findClusterData() {\n for (var n = 0; n < clusters.length; ++n) {\n // Search for a cluster containing any of the node id's\n for (var m in childNodesObj) {\n if (clusters[n].nodes[m] !== undefined) {\n return clusters[n];\n }\n }\n }\n\n return undefined;\n }; // If any of the found nodes is part of a cluster found in this method,\n // add the current values to that cluster\n\n\n var foundCluster = findClusterData();\n\n if (foundCluster !== undefined) {\n // Add nodes to found cluster if not present\n for (var m in childNodesObj) {\n if (foundCluster.nodes[m] === undefined) {\n foundCluster.nodes[m] = childNodesObj[m];\n }\n } // Add edges to found cluster, if not present\n\n\n for (var _m in childEdgesObj) {\n if (foundCluster.edges[_m] === undefined) {\n foundCluster.edges[_m] = childEdgesObj[_m];\n }\n }\n } else {\n // Create a new cluster group\n clusters.push({\n nodes: childNodesObj,\n edges: childEdgesObj\n });\n }\n }\n }\n }\n };\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n _loop(i);\n }\n\n for (var _i2 = 0; _i2 < clusters.length; _i2++) {\n this._cluster(clusters[_i2].nodes, clusters[_i2].edges, options, false);\n }\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n /**\n * Cluster all nodes in the network that have only 1 edge\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n\n }, {\n key: \"clusterOutliers\",\n value: function clusterOutliers(options) {\n var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n this.clusterByEdgeCount(1, options, refreshData);\n }\n /**\n * Cluster all nodes in the network that have only 2 edge\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n\n }, {\n key: \"clusterBridges\",\n value: function clusterBridges(options) {\n var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n this.clusterByEdgeCount(2, options, refreshData);\n }\n /**\n * suck all connected nodes of a node into the node.\n * @param {Node.id} nodeId\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n\n }, {\n key: \"clusterByConnection\",\n value: function clusterByConnection(nodeId, options) {\n var _context;\n\n var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n // kill conditions\n if (nodeId === undefined) {\n throw new Error(\"No nodeId supplied to clusterByConnection!\");\n }\n\n if (this.body.nodes[nodeId] === undefined) {\n throw new Error(\"The nodeId given to clusterByConnection does not exist!\");\n }\n\n var node = this.body.nodes[nodeId];\n options = this._checkOptions(options, node);\n\n if (options.clusterNodeProperties.x === undefined) {\n options.clusterNodeProperties.x = node.x;\n }\n\n if (options.clusterNodeProperties.y === undefined) {\n options.clusterNodeProperties.y = node.y;\n }\n\n if (options.clusterNodeProperties.fixed === undefined) {\n options.clusterNodeProperties.fixed = {};\n options.clusterNodeProperties.fixed.x = node.options.fixed.x;\n options.clusterNodeProperties.fixed.y = node.options.fixed.y;\n }\n\n var childNodesObj = {};\n var childEdgesObj = {};\n var parentNodeId = node.id;\n var parentClonedOptions = NetworkUtil.cloneOptions(node);\n childNodesObj[parentNodeId] = node; // collect the nodes that will be in the cluster\n\n for (var i = 0; i < node.edges.length; i++) {\n var edge = node.edges[i];\n\n if (this.clusteredEdges[edge.id] === undefined) {\n var childNodeId = this._getConnectedId(edge, parentNodeId); // if the child node is not in a cluster\n\n\n if (this.clusteredNodes[childNodeId] === undefined) {\n if (childNodeId !== parentNodeId) {\n if (options.joinCondition === undefined) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n } else {\n // clone the options and insert some additional parameters that could be interesting.\n var childClonedOptions = NetworkUtil.cloneOptions(this.body.nodes[childNodeId]);\n\n if (options.joinCondition(parentClonedOptions, childClonedOptions) === true) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n }\n }\n } else {\n // swallow the edge if it is self-referencing.\n childEdgesObj[edge.id] = edge;\n }\n }\n }\n }\n\n var childNodeIDs = map$2(_context = keys$3(childNodesObj)).call(_context, function (childNode) {\n return childNodesObj[childNode].id;\n });\n\n for (var childNodeKey in childNodesObj) {\n if (!Object.prototype.hasOwnProperty.call(childNodesObj, childNodeKey)) continue;\n var childNode = childNodesObj[childNodeKey];\n\n for (var y = 0; y < childNode.edges.length; y++) {\n var childEdge = childNode.edges[y];\n\n if (indexOf$3(childNodeIDs).call(childNodeIDs, this._getConnectedId(childEdge, childNode.id)) > -1) {\n childEdgesObj[childEdge.id] = childEdge;\n }\n }\n }\n\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n /**\n * This function creates the edges that will be attached to the cluster\n * It looks for edges that are connected to the nodes from the \"outside' of the cluster.\n *\n * @param {{Node.id: vis.Node}} childNodesObj\n * @param {{vis.Edge.id: vis.Edge}} childEdgesObj\n * @param {Object} clusterNodeProperties\n * @param {Object} clusterEdgeProperties\n * @private\n */\n\n }, {\n key: \"_createClusterEdges\",\n value: function _createClusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, clusterEdgeProperties) {\n var edge, childNodeId, childNode, toId, fromId, otherNodeId; // loop over all child nodes and their edges to find edges going out of the cluster\n // these edges will be replaced by clusterEdges.\n\n var childKeys = keys$3(childNodesObj);\n\n var createEdges = [];\n\n for (var i = 0; i < childKeys.length; i++) {\n childNodeId = childKeys[i];\n childNode = childNodesObj[childNodeId]; // construct new edges from the cluster to others\n\n for (var j = 0; j < childNode.edges.length; j++) {\n edge = childNode.edges[j]; // we only handle edges that are visible to the system, not the disabled ones from the clustering process.\n\n if (this.clusteredEdges[edge.id] === undefined) {\n // self-referencing edges will be added to the \"hidden\" list\n if (edge.toId == edge.fromId) {\n childEdgesObj[edge.id] = edge;\n } else {\n // set up the from and to.\n if (edge.toId == childNodeId) {\n // this is a double equals because ints and strings can be interchanged here.\n toId = clusterNodeProperties.id;\n fromId = edge.fromId;\n otherNodeId = fromId;\n } else {\n toId = edge.toId;\n fromId = clusterNodeProperties.id;\n otherNodeId = toId;\n }\n } // Only edges from the cluster outwards are being replaced.\n\n\n if (childNodesObj[otherNodeId] === undefined) {\n createEdges.push({\n edge: edge,\n fromId: fromId,\n toId: toId\n });\n }\n }\n }\n } //\n // Here we actually create the replacement edges.\n //\n // We could not do this in the loop above as the creation process\n // would add an edge to the edges array we are iterating over.\n //\n // NOTE: a clustered edge can have multiple base edges!\n //\n\n\n var newEdges = [];\n /**\n * Find a cluster edge which matches the given created edge.\n * @param {vis.Edge} createdEdge\n * @returns {vis.Edge}\n */\n\n var getNewEdge = function getNewEdge(createdEdge) {\n for (var _j2 = 0; _j2 < newEdges.length; _j2++) {\n var newEdge = newEdges[_j2]; // We replace both to and from edges with a single cluster edge\n\n var matchToDirection = createdEdge.fromId === newEdge.fromId && createdEdge.toId === newEdge.toId;\n var matchFromDirection = createdEdge.fromId === newEdge.toId && createdEdge.toId === newEdge.fromId;\n\n if (matchToDirection || matchFromDirection) {\n return newEdge;\n }\n }\n\n return null;\n };\n\n for (var _j3 = 0; _j3 < createEdges.length; _j3++) {\n var createdEdge = createEdges[_j3];\n var _edge = createdEdge.edge;\n var newEdge = getNewEdge(createdEdge);\n\n if (newEdge === null) {\n // Create a clustered edge for this connection\n newEdge = this._createClusteredEdge(createdEdge.fromId, createdEdge.toId, _edge, clusterEdgeProperties);\n newEdges.push(newEdge);\n } else {\n newEdge.clusteringEdgeReplacingIds.push(_edge.id);\n } // also reference the new edge in the old edge\n\n\n this.body.edges[_edge.id].edgeReplacedById = newEdge.id; // hide the replaced edge\n\n this._backupEdgeOptions(_edge);\n\n _edge.setOptions({\n physics: false\n });\n }\n }\n /**\n * This function checks the options that can be supplied to the different cluster functions\n * for certain fields and inserts defaults if needed\n * @param {Object} options\n * @returns {*}\n * @private\n */\n\n }, {\n key: \"_checkOptions\",\n value: function _checkOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (options.clusterEdgeProperties === undefined) {\n options.clusterEdgeProperties = {};\n }\n\n if (options.clusterNodeProperties === undefined) {\n options.clusterNodeProperties = {};\n }\n\n return options;\n }\n /**\n *\n * @param {Object} childNodesObj | object with node objects, id as keys, same as childNodes except it also contains a source node\n * @param {Object} childEdgesObj | object with edge objects, id as keys\n * @param {Array} options | object with {clusterNodeProperties, clusterEdgeProperties, processProperties}\n * @param {boolean} refreshData | when true, do not wrap up\n * @private\n */\n\n }, {\n key: \"_cluster\",\n value: function _cluster(childNodesObj, childEdgesObj, options) {\n var refreshData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n // Remove nodes which are already clustered\n var tmpNodesToRemove = [];\n\n for (var nodeId in childNodesObj) {\n if (Object.prototype.hasOwnProperty.call(childNodesObj, nodeId)) {\n if (this.clusteredNodes[nodeId] !== undefined) {\n tmpNodesToRemove.push(nodeId);\n }\n }\n }\n\n for (var n = 0; n < tmpNodesToRemove.length; ++n) {\n delete childNodesObj[tmpNodesToRemove[n]];\n } // kill condition: no nodes don't bother\n\n\n if (keys$3(childNodesObj).length == 0) {\n return;\n } // allow clusters of 1 if options allow\n\n\n if (keys$3(childNodesObj).length == 1 && options.clusterNodeProperties.allowSingleNodeCluster != true) {\n return;\n }\n\n var clusterNodeProperties = deepExtend({}, options.clusterNodeProperties); // construct the clusterNodeProperties\n\n if (options.processProperties !== undefined) {\n // get the childNode options\n var childNodesOptions = [];\n\n for (var _nodeId in childNodesObj) {\n if (Object.prototype.hasOwnProperty.call(childNodesObj, _nodeId)) {\n var clonedOptions = NetworkUtil.cloneOptions(childNodesObj[_nodeId]);\n childNodesOptions.push(clonedOptions);\n }\n } // get cluster properties based on childNodes\n\n\n var childEdgesOptions = [];\n\n for (var edgeId in childEdgesObj) {\n if (Object.prototype.hasOwnProperty.call(childEdgesObj, edgeId)) {\n // these cluster edges will be removed on creation of the cluster.\n if (edgeId.substr(0, 12) !== \"clusterEdge:\") {\n var _clonedOptions = NetworkUtil.cloneOptions(childEdgesObj[edgeId], 'edge');\n\n childEdgesOptions.push(_clonedOptions);\n }\n }\n }\n\n clusterNodeProperties = options.processProperties(clusterNodeProperties, childNodesOptions, childEdgesOptions);\n\n if (!clusterNodeProperties) {\n throw new Error(\"The processProperties function does not return properties!\");\n }\n } // check if we have an unique id;\n\n\n if (clusterNodeProperties.id === undefined) {\n clusterNodeProperties.id = 'cluster:' + v4();\n }\n\n var clusterId = clusterNodeProperties.id;\n\n if (clusterNodeProperties.label === undefined) {\n clusterNodeProperties.label = 'cluster';\n } // give the clusterNode a position if it does not have one.\n\n\n var pos = undefined;\n\n if (clusterNodeProperties.x === undefined) {\n pos = this._getClusterPosition(childNodesObj);\n clusterNodeProperties.x = pos.x;\n }\n\n if (clusterNodeProperties.y === undefined) {\n if (pos === undefined) {\n pos = this._getClusterPosition(childNodesObj);\n }\n\n clusterNodeProperties.y = pos.y;\n } // force the ID to remain the same\n\n\n clusterNodeProperties.id = clusterId; // create the cluster Node\n // Note that allowSingleNodeCluster, if present, is stored in the options as well\n\n var clusterNode = this.body.functions.createNode(clusterNodeProperties, Cluster);\n clusterNode.containedNodes = childNodesObj;\n clusterNode.containedEdges = childEdgesObj; // cache a copy from the cluster edge properties if we have to reconnect others later on\n\n clusterNode.clusterEdgeProperties = options.clusterEdgeProperties; // finally put the cluster node into global\n\n this.body.nodes[clusterNodeProperties.id] = clusterNode;\n\n this._clusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, options.clusterEdgeProperties); // set ID to undefined so no duplicates arise\n\n\n clusterNodeProperties.id = undefined; // wrap up\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n /**\n *\n * @param {Edge} edge\n * @private\n */\n\n }, {\n key: \"_backupEdgeOptions\",\n value: function _backupEdgeOptions(edge) {\n if (this.clusteredEdges[edge.id] === undefined) {\n this.clusteredEdges[edge.id] = {\n physics: edge.options.physics\n };\n }\n }\n /**\n *\n * @param {Edge} edge\n * @private\n */\n\n }, {\n key: \"_restoreEdge\",\n value: function _restoreEdge(edge) {\n var originalOptions = this.clusteredEdges[edge.id];\n\n if (originalOptions !== undefined) {\n edge.setOptions({\n physics: originalOptions.physics\n });\n delete this.clusteredEdges[edge.id];\n }\n }\n /**\n * Check if a node is a cluster.\n * @param {Node.id} nodeId\n * @returns {*}\n */\n\n }, {\n key: \"isCluster\",\n value: function isCluster(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].isCluster === true;\n } else {\n console.log(\"Node does not exist.\");\n return false;\n }\n }\n /**\n * get the position of the cluster node based on what's inside\n * @param {object} childNodesObj | object with node objects, id as keys\n * @returns {{x: number, y: number}}\n * @private\n */\n\n }, {\n key: \"_getClusterPosition\",\n value: function _getClusterPosition(childNodesObj) {\n var childKeys = keys$3(childNodesObj);\n\n var minX = childNodesObj[childKeys[0]].x;\n var maxX = childNodesObj[childKeys[0]].x;\n var minY = childNodesObj[childKeys[0]].y;\n var maxY = childNodesObj[childKeys[0]].y;\n var node;\n\n for (var i = 1; i < childKeys.length; i++) {\n node = childNodesObj[childKeys[i]];\n minX = node.x < minX ? node.x : minX;\n maxX = node.x > maxX ? node.x : maxX;\n minY = node.y < minY ? node.y : minY;\n maxY = node.y > maxY ? node.y : maxY;\n }\n\n return {\n x: 0.5 * (minX + maxX),\n y: 0.5 * (minY + maxY)\n };\n }\n /**\n * Open a cluster by calling this function.\n * @param {vis.Edge.id} clusterNodeId | the ID of the cluster node\n * @param {Object} options\n * @param {boolean} refreshData | wrap up afterwards if not true\n */\n\n }, {\n key: \"openCluster\",\n value: function openCluster(clusterNodeId, options) {\n var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n // kill conditions\n if (clusterNodeId === undefined) {\n throw new Error(\"No clusterNodeId supplied to openCluster.\");\n }\n\n var clusterNode = this.body.nodes[clusterNodeId];\n\n if (clusterNode === undefined) {\n throw new Error(\"The clusterNodeId supplied to openCluster does not exist.\");\n }\n\n if (clusterNode.isCluster !== true || clusterNode.containedNodes === undefined || clusterNode.containedEdges === undefined) {\n throw new Error(\"The node:\" + clusterNodeId + \" is not a valid cluster.\");\n } // Check if current cluster is clustered itself\n\n\n var stack = this.findNode(clusterNodeId);\n var parentIndex = indexOf$3(stack).call(stack, clusterNodeId) - 1;\n\n if (parentIndex >= 0) {\n // Current cluster is clustered; transfer contained nodes and edges to parent\n var parentClusterNodeId = stack[parentIndex];\n var parentClusterNode = this.body.nodes[parentClusterNodeId]; // clustering.clusteredNodes and clustering.clusteredEdges remain unchanged\n\n parentClusterNode._openChildCluster(clusterNodeId); // All components of child cluster node have been transferred. It can die now.\n\n\n delete this.body.nodes[clusterNodeId];\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n\n return;\n } // main body \n\n\n var containedNodes = clusterNode.containedNodes;\n var containedEdges = clusterNode.containedEdges; // allow the user to position the nodes after release.\n\n if (options !== undefined && options.releaseFunction !== undefined && typeof options.releaseFunction === 'function') {\n var positions = {};\n var clusterPosition = {\n x: clusterNode.x,\n y: clusterNode.y\n };\n\n for (var nodeId in containedNodes) {\n if (Object.prototype.hasOwnProperty.call(containedNodes, nodeId)) {\n var containedNode = this.body.nodes[nodeId];\n positions[nodeId] = {\n x: containedNode.x,\n y: containedNode.y\n };\n }\n }\n\n var newPositions = options.releaseFunction(clusterPosition, positions);\n\n for (var _nodeId2 in containedNodes) {\n if (Object.prototype.hasOwnProperty.call(containedNodes, _nodeId2)) {\n var _containedNode = this.body.nodes[_nodeId2];\n\n if (newPositions[_nodeId2] !== undefined) {\n _containedNode.x = newPositions[_nodeId2].x === undefined ? clusterNode.x : newPositions[_nodeId2].x;\n _containedNode.y = newPositions[_nodeId2].y === undefined ? clusterNode.y : newPositions[_nodeId2].y;\n }\n }\n }\n } else {\n // copy the position from the cluster\n forEach$3(containedNodes, function (containedNode) {\n // inherit position\n if (containedNode.options.fixed.x === false) {\n containedNode.x = clusterNode.x;\n }\n\n if (containedNode.options.fixed.y === false) {\n containedNode.y = clusterNode.y;\n }\n });\n } // release nodes\n\n\n for (var _nodeId3 in containedNodes) {\n if (Object.prototype.hasOwnProperty.call(containedNodes, _nodeId3)) {\n var _containedNode2 = this.body.nodes[_nodeId3]; // inherit speed\n\n _containedNode2.vx = clusterNode.vx;\n _containedNode2.vy = clusterNode.vy;\n\n _containedNode2.setOptions({\n physics: true\n });\n\n delete this.clusteredNodes[_nodeId3];\n }\n } // copy the clusterNode edges because we cannot iterate over an object that we add or remove from.\n\n\n var edgesToBeDeleted = [];\n\n for (var i = 0; i < clusterNode.edges.length; i++) {\n edgesToBeDeleted.push(clusterNode.edges[i]);\n } // actually handling the deleting.\n\n\n for (var _i3 = 0; _i3 < edgesToBeDeleted.length; _i3++) {\n var edge = edgesToBeDeleted[_i3];\n\n var otherNodeId = this._getConnectedId(edge, clusterNodeId);\n\n var otherNode = this.clusteredNodes[otherNodeId];\n\n for (var j = 0; j < edge.clusteringEdgeReplacingIds.length; j++) {\n var transferId = edge.clusteringEdgeReplacingIds[j];\n var transferEdge = this.body.edges[transferId];\n if (transferEdge === undefined) continue; // if the other node is in another cluster, we transfer ownership of this edge to the other cluster\n\n if (otherNode !== undefined) {\n // transfer ownership:\n var otherCluster = this.body.nodes[otherNode.clusterId];\n otherCluster.containedEdges[transferEdge.id] = transferEdge; // delete local reference\n\n delete containedEdges[transferEdge.id]; // get to and from\n\n var fromId = transferEdge.fromId;\n var toId = transferEdge.toId;\n\n if (transferEdge.toId == otherNodeId) {\n toId = otherNode.clusterId;\n } else {\n fromId = otherNode.clusterId;\n } // create new cluster edge from the otherCluster\n\n\n this._createClusteredEdge(fromId, toId, transferEdge, otherCluster.clusterEdgeProperties, {\n hidden: false,\n physics: true\n });\n } else {\n this._restoreEdge(transferEdge);\n }\n }\n\n edge.remove();\n } // handle the releasing of the edges\n\n\n for (var edgeId in containedEdges) {\n if (Object.prototype.hasOwnProperty.call(containedEdges, edgeId)) {\n this._restoreEdge(containedEdges[edgeId]);\n }\n } // remove clusterNode\n\n\n delete this.body.nodes[clusterNodeId];\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n /**\n *\n * @param {Cluster.id} clusterId\n * @returns {Array.}\n */\n\n }, {\n key: \"getNodesInCluster\",\n value: function getNodesInCluster(clusterId) {\n var nodesArray = [];\n\n if (this.isCluster(clusterId) === true) {\n var containedNodes = this.body.nodes[clusterId].containedNodes;\n\n for (var nodeId in containedNodes) {\n if (Object.prototype.hasOwnProperty.call(containedNodes, nodeId)) {\n nodesArray.push(this.body.nodes[nodeId].id);\n }\n }\n }\n\n return nodesArray;\n }\n /**\n * Get the stack clusterId's that a certain node resides in. cluster A -> cluster B -> cluster C -> node\n *\n * If a node can't be found in the chain, return an empty array.\n *\n * @param {string|number} nodeId\n * @returns {Array}\n */\n\n }, {\n key: \"findNode\",\n value: function findNode(nodeId) {\n var stack = [];\n var max = 100;\n var counter = 0;\n var node;\n\n while (this.clusteredNodes[nodeId] !== undefined && counter < max) {\n node = this.body.nodes[nodeId];\n if (node === undefined) return [];\n stack.push(node.id);\n nodeId = this.clusteredNodes[nodeId].clusterId;\n counter++;\n }\n\n node = this.body.nodes[nodeId];\n if (node === undefined) return [];\n stack.push(node.id);\n\n reverse$2(stack).call(stack);\n\n return stack;\n }\n /**\n * Using a clustered nodeId, update with the new options\n * @param {Node.id} clusteredNodeId\n * @param {object} newOptions\n */\n\n }, {\n key: \"updateClusteredNode\",\n value: function updateClusteredNode(clusteredNodeId, newOptions) {\n if (clusteredNodeId === undefined) {\n throw new Error(\"No clusteredNodeId supplied to updateClusteredNode.\");\n }\n\n if (newOptions === undefined) {\n throw new Error(\"No newOptions supplied to updateClusteredNode.\");\n }\n\n if (this.body.nodes[clusteredNodeId] === undefined) {\n throw new Error(\"The clusteredNodeId supplied to updateClusteredNode does not exist.\");\n }\n\n this.body.nodes[clusteredNodeId].setOptions(newOptions);\n this.body.emitter.emit('_dataChanged');\n }\n /**\n * Using a base edgeId, update all related clustered edges with the new options\n * @param {vis.Edge.id} startEdgeId\n * @param {object} newOptions\n */\n\n }, {\n key: \"updateEdge\",\n value: function updateEdge(startEdgeId, newOptions) {\n if (startEdgeId === undefined) {\n throw new Error(\"No startEdgeId supplied to updateEdge.\");\n }\n\n if (newOptions === undefined) {\n throw new Error(\"No newOptions supplied to updateEdge.\");\n }\n\n if (this.body.edges[startEdgeId] === undefined) {\n throw new Error(\"The startEdgeId supplied to updateEdge does not exist.\");\n }\n\n var allEdgeIds = this.getClusteredEdges(startEdgeId);\n\n for (var i = 0; i < allEdgeIds.length; i++) {\n var edge = this.body.edges[allEdgeIds[i]];\n edge.setOptions(newOptions);\n }\n\n this.body.emitter.emit('_dataChanged');\n }\n /**\n * Get a stack of clusterEdgeId's (+base edgeid) that a base edge is the same as. cluster edge C -> cluster edge B -> cluster edge A -> base edge(edgeId)\n * @param {vis.Edge.id} edgeId\n * @returns {Array.}\n */\n\n }, {\n key: \"getClusteredEdges\",\n value: function getClusteredEdges(edgeId) {\n var stack = [];\n var max = 100;\n var counter = 0;\n\n while (edgeId !== undefined && this.body.edges[edgeId] !== undefined && counter < max) {\n stack.push(this.body.edges[edgeId].id);\n edgeId = this.body.edges[edgeId].edgeReplacedById;\n counter++;\n }\n\n reverse$2(stack).call(stack);\n\n return stack;\n }\n /**\n * Get the base edge id of clusterEdgeId. cluster edge (clusteredEdgeId) -> cluster edge B -> cluster edge C -> base edge\n * @param {vis.Edge.id} clusteredEdgeId\n * @returns {vis.Edge.id} baseEdgeId\n *\n * TODO: deprecate in 5.0.0. Method getBaseEdges() is the correct one to use.\n */\n\n }, {\n key: \"getBaseEdge\",\n value: function getBaseEdge(clusteredEdgeId) {\n // Just kludge this by returning the first base edge id found\n return this.getBaseEdges(clusteredEdgeId)[0];\n }\n /**\n * Get all regular edges for this clustered edge id.\n *\n * @param {vis.Edge.id} clusteredEdgeId\n * @returns {Array.} all baseEdgeId's under this clustered edge\n */\n\n }, {\n key: \"getBaseEdges\",\n value: function getBaseEdges(clusteredEdgeId) {\n var IdsToHandle = [clusteredEdgeId];\n var doneIds = [];\n var foundIds = [];\n var max = 100;\n var counter = 0;\n\n while (IdsToHandle.length > 0 && counter < max) {\n var nextId = IdsToHandle.pop();\n if (nextId === undefined) continue; // Paranoia here and onwards\n\n var nextEdge = this.body.edges[nextId];\n if (nextEdge === undefined) continue;\n counter++;\n var replacingIds = nextEdge.clusteringEdgeReplacingIds;\n\n if (replacingIds === undefined) {\n // nextId is a base id\n foundIds.push(nextId);\n } else {\n // Another cluster edge, unravel this one as well\n for (var i = 0; i < replacingIds.length; ++i) {\n var replacingId = replacingIds[i]; // Don't add if already handled\n // TODO: never triggers; find a test-case which does\n\n if (indexOf$3(IdsToHandle).call(IdsToHandle, replacingIds) !== -1 || indexOf$3(doneIds).call(doneIds, replacingIds) !== -1) {\n continue;\n }\n\n IdsToHandle.push(replacingId);\n }\n }\n\n doneIds.push(nextId);\n }\n\n return foundIds;\n }\n /**\n * Get the Id the node is connected to\n * @param {vis.Edge} edge\n * @param {Node.id} nodeId\n * @returns {*}\n * @private\n */\n\n }, {\n key: \"_getConnectedId\",\n value: function _getConnectedId(edge, nodeId) {\n if (edge.toId != nodeId) {\n return edge.toId;\n } else if (edge.fromId != nodeId) {\n return edge.fromId;\n } else {\n return edge.fromId;\n }\n }\n /**\n * We determine how many connections denote an important hub.\n * We take the mean + 2*std as the important hub size. (Assuming a normal distribution of data, ~2.2%)\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_getHubSize\",\n value: function _getHubSize() {\n var average = 0;\n var averageSquared = 0;\n var hubCounter = 0;\n var largestHub = 0;\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n var node = this.body.nodes[this.body.nodeIndices[i]];\n\n if (node.edges.length > largestHub) {\n largestHub = node.edges.length;\n }\n\n average += node.edges.length;\n averageSquared += Math.pow(node.edges.length, 2);\n hubCounter += 1;\n }\n\n average = average / hubCounter;\n averageSquared = averageSquared / hubCounter;\n var variance = averageSquared - Math.pow(average, 2);\n var standardDeviation = Math.sqrt(variance);\n var hubThreshold = Math.floor(average + 2 * standardDeviation); // always have at least one to cluster\n\n if (hubThreshold > largestHub) {\n hubThreshold = largestHub;\n }\n\n return hubThreshold;\n }\n /**\n * Create an edge for the cluster representation.\n *\n * @param {Node.id} fromId\n * @param {Node.id} toId\n * @param {vis.Edge} baseEdge\n * @param {Object} clusterEdgeProperties\n * @param {Object} extraOptions\n * @returns {Edge} newly created clustered edge\n * @private\n */\n\n }, {\n key: \"_createClusteredEdge\",\n value: function _createClusteredEdge(fromId, toId, baseEdge, clusterEdgeProperties, extraOptions) {\n // copy the options of the edge we will replace\n var clonedOptions = NetworkUtil.cloneOptions(baseEdge, 'edge'); // make sure the properties of clusterEdges are superimposed on it\n\n deepExtend(clonedOptions, clusterEdgeProperties); // set up the edge\n\n clonedOptions.from = fromId;\n clonedOptions.to = toId;\n clonedOptions.id = 'clusterEdge:' + v4(); // apply the edge specific options to it if specified\n\n if (extraOptions !== undefined) {\n deepExtend(clonedOptions, extraOptions);\n }\n\n var newEdge = this.body.functions.createEdge(clonedOptions);\n newEdge.clusteringEdgeReplacingIds = [baseEdge.id];\n newEdge.connect(); // Register the new edge\n\n this.body.edges[newEdge.id] = newEdge;\n return newEdge;\n }\n /**\n * Add the passed child nodes and edges to the given cluster node.\n *\n * @param {Object|Node} childNodes hash of nodes or single node to add in cluster\n * @param {Object|Edge} childEdges hash of edges or single edge to take into account when clustering\n * @param {Node} clusterNode cluster node to add nodes and edges to\n * @param {Object} [clusterEdgeProperties]\n * @private\n */\n\n }, {\n key: \"_clusterEdges\",\n value: function _clusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties) {\n if (childEdges instanceof Edge) {\n var edge = childEdges;\n var obj = {};\n obj[edge.id] = edge;\n childEdges = obj;\n }\n\n if (childNodes instanceof Node) {\n var node = childNodes;\n var _obj = {};\n _obj[node.id] = node;\n childNodes = _obj;\n }\n\n if (clusterNode === undefined || clusterNode === null) {\n throw new Error(\"_clusterEdges: parameter clusterNode required\");\n }\n\n if (clusterEdgeProperties === undefined) {\n // Take the required properties from the cluster node\n clusterEdgeProperties = clusterNode.clusterEdgeProperties;\n } // create the new edges that will connect to the cluster.\n // All self-referencing edges will be added to childEdges here.\n\n\n this._createClusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties); // disable the childEdges\n\n\n for (var edgeId in childEdges) {\n if (Object.prototype.hasOwnProperty.call(childEdges, edgeId)) {\n if (this.body.edges[edgeId] !== undefined) {\n var _edge2 = this.body.edges[edgeId]; // cache the options before changing\n\n this._backupEdgeOptions(_edge2); // disable physics and hide the edge\n\n\n _edge2.setOptions({\n physics: false\n });\n }\n }\n } // disable the childNodes\n\n\n for (var nodeId in childNodes) {\n if (Object.prototype.hasOwnProperty.call(childNodes, nodeId)) {\n this.clusteredNodes[nodeId] = {\n clusterId: clusterNode.id,\n node: this.body.nodes[nodeId]\n };\n this.body.nodes[nodeId].setOptions({\n physics: false\n });\n }\n }\n }\n /**\n * Determine in which cluster given nodeId resides.\n *\n * If not in cluster, return undefined.\n *\n * NOTE: If you know a cleaner way to do this, please enlighten me (wimrijnders).\n *\n * @param {Node.id} nodeId\n * @returns {Node|undefined} Node instance for cluster, if present\n * @private\n */\n\n }, {\n key: \"_getClusterNodeForNode\",\n value: function _getClusterNodeForNode(nodeId) {\n if (nodeId === undefined) return undefined;\n var clusteredNode = this.clusteredNodes[nodeId]; // NOTE: If no cluster info found, it should actually be an error\n\n if (clusteredNode === undefined) return undefined;\n var clusterId = clusteredNode.clusterId;\n if (clusterId === undefined) return undefined;\n return this.body.nodes[clusterId];\n }\n /**\n * Internal helper function for conditionally removing items in array\n *\n * Done like this because Array.filter() is not fully supported by all IE's.\n *\n * @param {Array} arr\n * @param {function} callback\n * @returns {Array}\n * @private\n */\n\n }, {\n key: \"_filter\",\n value: function _filter(arr, callback) {\n var ret = [];\n forEach$3(arr, function (item) {\n if (callback(item)) {\n ret.push(item);\n }\n });\n return ret;\n }\n /**\n * Scan all edges for changes in clustering and adjust this if necessary.\n *\n * Call this (internally) after there has been a change in node or edge data.\n *\n * Pre: States of this.body.nodes and this.body.edges consistent\n * Pre: this.clusteredNodes and this.clusteredEdge consistent with containedNodes and containedEdges\n * of cluster nodes.\n */\n\n }, {\n key: \"_updateState\",\n value: function _updateState() {\n var _this4 = this;\n\n var nodeId;\n var deletedNodeIds = [];\n var deletedEdgeIds = {};\n /**\n * Utility function to iterate over clustering nodes only\n *\n * @param {Function} callback function to call for each cluster node\n */\n\n var eachClusterNode = function eachClusterNode(callback) {\n forEach$3(_this4.body.nodes, function (node) {\n if (node.isCluster === true) {\n callback(node);\n }\n });\n }; //\n // Remove deleted regular nodes from clustering\n //\n // Determine the deleted nodes\n\n\n for (nodeId in this.clusteredNodes) {\n if (!Object.prototype.hasOwnProperty.call(this.clusteredNodes, nodeId)) continue;\n var node = this.body.nodes[nodeId];\n\n if (node === undefined) {\n deletedNodeIds.push(nodeId);\n }\n } // Remove nodes from cluster nodes\n\n\n eachClusterNode(function (clusterNode) {\n for (var n = 0; n < deletedNodeIds.length; n++) {\n delete clusterNode.containedNodes[deletedNodeIds[n]];\n }\n }); // Remove nodes from cluster list\n\n for (var n = 0; n < deletedNodeIds.length; n++) {\n delete this.clusteredNodes[deletedNodeIds[n]];\n } //\n // Remove deleted edges from clustering\n //\n // Add the deleted clustered edges to the list\n\n\n forEach$3(this.clusteredEdges, function (edgeId) {\n var edge = _this4.body.edges[edgeId];\n\n if (edge === undefined || !edge.endPointsValid()) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n }); // Cluster nodes can also contain edges which are not clustered, \n // i.e. nodes 1-2 within cluster with an edge in between.\n // So the cluster nodes also need to be scanned for invalid edges\n\n eachClusterNode(function (clusterNode) {\n forEach$3(clusterNode.containedEdges, function (edge, edgeId) {\n if (!edge.endPointsValid() && !deletedEdgeIds[edgeId]) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n }); // Also scan for cluster edges which need to be removed in the active list.\n // Regular edges have been removed beforehand, so this only picks up the cluster edges.\n\n forEach$3(this.body.edges, function (edge, edgeId) {\n // Explicitly scan the contained edges for validity\n var isValid = true;\n var replacedIds = edge.clusteringEdgeReplacingIds;\n\n if (replacedIds !== undefined) {\n var numValid = 0;\n forEach$3(replacedIds, function (containedEdgeId) {\n var containedEdge = _this4.body.edges[containedEdgeId];\n\n if (containedEdge !== undefined && containedEdge.endPointsValid()) {\n numValid += 1;\n }\n });\n isValid = numValid > 0;\n }\n\n if (!edge.endPointsValid() || !isValid) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n }); // Remove edges from cluster nodes\n\n eachClusterNode(function (clusterNode) {\n forEach$3(deletedEdgeIds, function (deletedEdgeId) {\n delete clusterNode.containedEdges[deletedEdgeId];\n forEach$3(clusterNode.edges, function (edge, m) {\n if (edge.id === deletedEdgeId) {\n clusterNode.edges[m] = null; // Don't want to directly delete here, because in the loop\n\n return;\n }\n\n edge.clusteringEdgeReplacingIds = _this4._filter(edge.clusteringEdgeReplacingIds, function (id) {\n return !deletedEdgeIds[id];\n });\n }); // Clean up the nulls\n\n clusterNode.edges = _this4._filter(clusterNode.edges, function (item) {\n return item !== null;\n });\n });\n }); // Remove from cluster list\n\n forEach$3(deletedEdgeIds, function (edgeId) {\n delete _this4.clusteredEdges[edgeId];\n }); // Remove cluster edges from active list (this.body.edges).\n // deletedEdgeIds still contains id of regular edges, but these should all\n // be gone when you reach here.\n\n forEach$3(deletedEdgeIds, function (edgeId) {\n delete _this4.body.edges[edgeId];\n }); //\n // Check changed cluster state of edges\n //\n // Iterating over keys here, because edges may be removed in the loop\n\n var ids = keys$3(this.body.edges);\n\n forEach$3(ids, function (edgeId) {\n var edge = _this4.body.edges[edgeId];\n\n var shouldBeClustered = _this4._isClusteredNode(edge.fromId) || _this4._isClusteredNode(edge.toId);\n\n if (shouldBeClustered === _this4._isClusteredEdge(edge.id)) {\n return; // all is well\n }\n\n if (shouldBeClustered) {\n // add edge to clustering\n var clusterFrom = _this4._getClusterNodeForNode(edge.fromId);\n\n if (clusterFrom !== undefined) {\n _this4._clusterEdges(_this4.body.nodes[edge.fromId], edge, clusterFrom);\n }\n\n var clusterTo = _this4._getClusterNodeForNode(edge.toId);\n\n if (clusterTo !== undefined) {\n _this4._clusterEdges(_this4.body.nodes[edge.toId], edge, clusterTo);\n } // TODO: check that it works for both edges clustered\n // (This might be paranoia)\n\n } else {\n delete _this4._clusterEdges[edgeId];\n\n _this4._restoreEdge(edge); // This should not be happening, the state should\n // be properly updated at this point.\n // \n // If it *is* reached during normal operation, then we have to implement\n // undo clustering for this edge here.\n // throw new Error('remove edge from clustering not implemented!')\n\n }\n }); // Clusters may be nested to any level. Keep on opening until nothing to open\n\n var changed = false;\n var continueLoop = true;\n\n var _loop2 = function _loop2() {\n var clustersToOpen = []; // Determine the id's of clusters that need opening\n\n eachClusterNode(function (clusterNode) {\n var numNodes = keys$3(clusterNode.containedNodes).length;\n\n var allowSingle = clusterNode.options.allowSingleNodeCluster === true;\n\n if (allowSingle && numNodes < 1 || !allowSingle && numNodes < 2) {\n clustersToOpen.push(clusterNode.id);\n }\n }); // Open them\n\n for (var _n = 0; _n < clustersToOpen.length; ++_n) {\n _this4.openCluster(clustersToOpen[_n], {}, false\n /* Don't refresh, we're in an refresh/update already */\n );\n }\n\n continueLoop = clustersToOpen.length > 0;\n changed = changed || continueLoop;\n };\n\n while (continueLoop) {\n _loop2();\n }\n\n if (changed) {\n this._updateState(); // Redo this method (recursion possible! should be safe)\n\n }\n }\n /**\n * Determine if node with given id is part of a cluster.\n *\n * @param {Node.id} nodeId\n * @return {boolean} true if part of a cluster.\n */\n\n }, {\n key: \"_isClusteredNode\",\n value: function _isClusteredNode(nodeId) {\n return this.clusteredNodes[nodeId] !== undefined;\n }\n /**\n * Determine if edge with given id is not visible due to clustering.\n *\n * An edge is considered clustered if:\n * - it is directly replaced by a clustering edge\n * - any of its connecting nodes is in a cluster\n *\n * @param {vis.Edge.id} edgeId\n * @return {boolean} true if part of a cluster.\n */\n\n }, {\n key: \"_isClusteredEdge\",\n value: function _isClusteredEdge(edgeId) {\n return this.clusteredEdges[edgeId] !== undefined;\n }\n }]);\n\n return ClusterEngine;\n}();\n\n/**\n * Initializes window.requestAnimationFrame() to a usable form.\n *\n * Specifically, set up this method for the case of running on node.js with jsdom enabled.\n *\n * NOTES:\n *\n * * On node.js, when calling this directly outside of this class, `window` is not defined.\n * This happens even if jsdom is used.\n * * For node.js + jsdom, `window` is available at the moment the constructor is called.\n * For this reason, the called is placed within the constructor.\n * * Even then, `window.requestAnimationFrame()` is not defined, so it still needs to be added.\n * * During unit testing, it happens that the window object is reset during execution, causing\n * a runtime error due to missing `requestAnimationFrame()`. This needs to be compensated for,\n * see `_requestNextFrame()`.\n * * Since this is a global object, it may affect other modules besides `Network`. With normal\n * usage, this does not cause any problems. During unit testing, errors may occur. These have\n * been compensated for, see comment block in _requestNextFrame().\n *\n * @private\n */\n\nfunction _initRequestAnimationFrame() {\n var func;\n\n if (window !== undefined) {\n func = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;\n }\n\n if (func === undefined) {\n // window or method not present, setting mock requestAnimationFrame\n window.requestAnimationFrame = function (callback) {\n //console.log(\"Called mock requestAnimationFrame\");\n callback();\n };\n } else {\n window.requestAnimationFrame = func;\n }\n}\n/**\n * The canvas renderer\n */\n\n\nvar CanvasRenderer = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n function CanvasRenderer(body, canvas) {\n classCallCheck(this, CanvasRenderer);\n\n _initRequestAnimationFrame();\n\n this.body = body;\n this.canvas = canvas;\n this.redrawRequested = false;\n this.renderTimer = undefined;\n this.requiresTimeout = true;\n this.renderingActive = false;\n this.renderRequests = 0;\n this.allowRedraw = true;\n this.dragging = false;\n this.zooming = false;\n this.options = {};\n this.defaultOptions = {\n hideEdgesOnDrag: false,\n hideEdgesOnZoom: false,\n hideNodesOnDrag: false\n };\n\n assign$2(this.options, this.defaultOptions);\n\n this._determineBrowserMethod();\n\n this.bindEventListeners();\n }\n /**\n * Binds event listeners\n */\n\n\n createClass(CanvasRenderer, [{\n key: \"bindEventListeners\",\n value: function bindEventListeners() {\n var _this = this,\n _context2;\n\n this.body.emitter.on(\"dragStart\", function () {\n _this.dragging = true;\n });\n this.body.emitter.on(\"dragEnd\", function () {\n _this.dragging = false;\n });\n this.body.emitter.on(\"zoom\", function () {\n _this.zooming = true;\n window.clearTimeout(_this.zoomTimeoutId);\n _this.zoomTimeoutId = window.setTimeout(function () {\n var _context;\n\n _this.zooming = false;\n\n bind$2(_context = _this._requestRedraw).call(_context, _this)();\n }, 250);\n });\n this.body.emitter.on(\"_resizeNodes\", function () {\n _this._resizeNodes();\n });\n this.body.emitter.on(\"_redraw\", function () {\n if (_this.renderingActive === false) {\n _this._redraw();\n }\n });\n this.body.emitter.on(\"_blockRedraw\", function () {\n _this.allowRedraw = false;\n });\n this.body.emitter.on(\"_allowRedraw\", function () {\n _this.allowRedraw = true;\n _this.redrawRequested = false;\n });\n this.body.emitter.on(\"_requestRedraw\", bind$2(_context2 = this._requestRedraw).call(_context2, this));\n this.body.emitter.on(\"_startRendering\", function () {\n _this.renderRequests += 1;\n _this.renderingActive = true;\n\n _this._startRendering();\n });\n this.body.emitter.on(\"_stopRendering\", function () {\n _this.renderRequests -= 1;\n _this.renderingActive = _this.renderRequests > 0;\n _this.renderTimer = undefined;\n });\n this.body.emitter.on('destroy', function () {\n _this.renderRequests = 0;\n _this.allowRedraw = false;\n _this.renderingActive = false;\n\n if (_this.requiresTimeout === true) {\n clearTimeout(_this.renderTimer);\n } else {\n window.cancelAnimationFrame(_this.renderTimer);\n }\n\n _this.body.emitter.off();\n });\n }\n /**\n *\n * @param {Object} options\n */\n\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options !== undefined) {\n var fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag'];\n selectiveDeepExtend(fields, this.options, options);\n }\n }\n /**\n * Prepare the drawing of the next frame.\n *\n * Calls the callback when the next frame can or will be drawn.\n *\n * @param {function} callback\n * @param {number} delay - timeout case only, wait this number of milliseconds\n * @returns {function|undefined}\n * @private\n */\n\n }, {\n key: \"_requestNextFrame\",\n value: function _requestNextFrame(callback, delay) {\n // During unit testing, it happens that the mock window object is reset while\n // the next frame is still pending. Then, either 'window' is not present, or\n // 'requestAnimationFrame()' is not present because it is not defined on the\n // mock window object.\n //\n // As a consequence, unrelated unit tests may appear to fail, even if the problem\n // described happens in the current unit test.\n //\n // This is not something that will happen in normal operation, but we still need\n // to take it into account.\n //\n if (typeof window === 'undefined') return; // Doing `if (window === undefined)` does not work here!\n\n var timer;\n var myWindow = window; // Grab a reference to reduce the possibility that 'window' is reset\n // while running this method.\n\n if (this.requiresTimeout === true) {\n // wait given number of milliseconds and perform the animation step function\n timer = myWindow.setTimeout(callback, delay);\n } else {\n if (myWindow.requestAnimationFrame) {\n timer = myWindow.requestAnimationFrame(callback);\n }\n }\n\n return timer;\n }\n /**\n *\n * @private\n */\n\n }, {\n key: \"_startRendering\",\n value: function _startRendering() {\n if (this.renderingActive === true) {\n if (this.renderTimer === undefined) {\n var _context3;\n\n this.renderTimer = this._requestNextFrame(bind$2(_context3 = this._renderStep).call(_context3, this), this.simulationInterval);\n }\n }\n }\n /**\n *\n * @private\n */\n\n }, {\n key: \"_renderStep\",\n value: function _renderStep() {\n if (this.renderingActive === true) {\n // reset the renderTimer so a new scheduled animation step can be set\n this.renderTimer = undefined;\n\n if (this.requiresTimeout === true) {\n // this schedules a new simulation step\n this._startRendering();\n }\n\n this._redraw();\n\n if (this.requiresTimeout === false) {\n // this schedules a new simulation step\n this._startRendering();\n }\n }\n }\n /**\n * Redraw the network with the current data\n * chart will be resized too.\n */\n\n }, {\n key: \"redraw\",\n value: function redraw() {\n this.body.emitter.emit('setSize');\n\n this._redraw();\n }\n /**\n * Redraw the network with the current data\n * @private\n */\n\n }, {\n key: \"_requestRedraw\",\n value: function _requestRedraw() {\n var _this2 = this;\n\n if (this.redrawRequested !== true && this.renderingActive === false && this.allowRedraw === true) {\n this.redrawRequested = true;\n\n this._requestNextFrame(function () {\n _this2._redraw(false);\n }, 0);\n }\n }\n /**\n * Redraw the network with the current data\n * @param {boolean} [hidden=false] | Used to get the first estimate of the node sizes.\n * Only the nodes are drawn after which they are quickly drawn over.\n * @private\n */\n\n }, {\n key: \"_redraw\",\n value: function _redraw() {\n var hidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (this.allowRedraw === true) {\n this.body.emitter.emit(\"initRedraw\");\n this.redrawRequested = false; // when the container div was hidden, this fixes it back up!\n\n if (this.canvas.frame.canvas.width === 0 || this.canvas.frame.canvas.height === 0) {\n this.canvas.setSize();\n }\n\n this.canvas.setTransform();\n var ctx = this.canvas.getContext(); // clear the canvas\n\n var w = this.canvas.frame.canvas.clientWidth;\n var h = this.canvas.frame.canvas.clientHeight;\n ctx.clearRect(0, 0, w, h); // if the div is hidden, we stop the redraw here for performance.\n\n if (this.canvas.frame.clientWidth === 0) {\n return;\n } // set scaling and translation\n\n\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n ctx.beginPath();\n this.body.emitter.emit(\"beforeDrawing\", ctx);\n ctx.closePath();\n\n if (hidden === false) {\n if ((this.dragging === false || this.dragging === true && this.options.hideEdgesOnDrag === false) && (this.zooming === false || this.zooming === true && this.options.hideEdgesOnZoom === false)) {\n this._drawEdges(ctx);\n }\n }\n\n if (this.dragging === false || this.dragging === true && this.options.hideNodesOnDrag === false) {\n this._drawNodes(ctx, hidden);\n } // draw the arrows last so they will be at the top\n\n\n if (hidden === false) {\n if ((this.dragging === false || this.dragging === true && this.options.hideEdgesOnDrag === false) && (this.zooming === false || this.zooming === true && this.options.hideEdgesOnZoom === false)) {\n this._drawArrows(ctx);\n }\n }\n\n if (hidden === false) {\n this._drawSelectionBox(ctx);\n }\n\n ctx.beginPath();\n this.body.emitter.emit(\"afterDrawing\", ctx);\n ctx.closePath(); // restore original scaling and translation\n\n ctx.restore();\n\n if (hidden === true) {\n ctx.clearRect(0, 0, w, h);\n }\n }\n }\n /**\n * Redraw all nodes\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [alwaysShow]\n * @private\n */\n\n }, {\n key: \"_resizeNodes\",\n value: function _resizeNodes() {\n this.canvas.setTransform();\n var ctx = this.canvas.getContext();\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n var nodes = this.body.nodes;\n var node; // resize all nodes\n\n for (var nodeId in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, nodeId)) {\n node = nodes[nodeId];\n node.resize(ctx);\n node.updateBoundingBox(ctx, node.selected);\n }\n } // restore original scaling and translation\n\n\n ctx.restore();\n }\n /**\n * Redraw all nodes\n *\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @param {boolean} [alwaysShow]\n * @private\n */\n\n }, {\n key: \"_drawNodes\",\n value: function _drawNodes(ctx) {\n var alwaysShow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var nodes = this.body.nodes;\n var nodeIndices = this.body.nodeIndices;\n var node;\n var selected = [];\n var hovered = [];\n var margin = 20;\n var topLeft = this.canvas.DOMtoCanvas({\n x: -margin,\n y: -margin\n });\n var bottomRight = this.canvas.DOMtoCanvas({\n x: this.canvas.frame.canvas.clientWidth + margin,\n y: this.canvas.frame.canvas.clientHeight + margin\n });\n var viewableArea = {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x\n }; // draw unselected nodes;\n\n for (var _i = 0; _i < nodeIndices.length; _i++) {\n node = nodes[nodeIndices[_i]]; // set selected and hovered nodes aside\n\n if (node.hover) {\n hovered.push(nodeIndices[_i]);\n } else if (node.isSelected()) {\n selected.push(nodeIndices[_i]);\n } else {\n if (alwaysShow === true) {\n node.draw(ctx);\n } else if (node.isBoundingBoxOverlappingWith(viewableArea) === true) {\n node.draw(ctx);\n } else {\n node.updateBoundingBox(ctx, node.selected);\n }\n }\n }\n\n var i;\n var selectedLength = selected.length;\n var hoveredLength = hovered.length; // draw the selected nodes on top\n\n for (i = 0; i < selectedLength; i++) {\n node = nodes[selected[i]];\n node.draw(ctx);\n } // draw hovered nodes above everything else: fixes https://github.com/visjs/vis-network/issues/226\n\n\n for (i = 0; i < hoveredLength; i++) {\n node = nodes[hovered[i]];\n node.draw(ctx);\n }\n }\n /**\n * Redraw all edges\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @private\n */\n\n }, {\n key: \"_drawEdges\",\n value: function _drawEdges(ctx) {\n var edges = this.body.edges;\n var edgeIndices = this.body.edgeIndices;\n\n for (var i = 0; i < edgeIndices.length; i++) {\n var edge = edges[edgeIndices[i]];\n\n if (edge.connected === true) {\n edge.draw(ctx);\n }\n }\n }\n /**\n * Redraw all arrows\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @private\n */\n\n }, {\n key: \"_drawArrows\",\n value: function _drawArrows(ctx) {\n var edges = this.body.edges;\n var edgeIndices = this.body.edgeIndices;\n\n for (var i = 0; i < edgeIndices.length; i++) {\n var edge = edges[edgeIndices[i]];\n\n if (edge.connected === true) {\n edge.drawArrows(ctx);\n }\n }\n }\n /**\n * Determine if the browser requires a setTimeout or a requestAnimationFrame. This was required because\n * some implementations (safari and IE9) did not support requestAnimationFrame\n * @private\n */\n\n }, {\n key: \"_determineBrowserMethod\",\n value: function _determineBrowserMethod() {\n if (typeof window !== 'undefined') {\n var browserType = navigator.userAgent.toLowerCase();\n this.requiresTimeout = false;\n\n if (indexOf$3(browserType).call(browserType, 'msie 9.0') != -1) {\n // IE 9\n this.requiresTimeout = true;\n } else if (indexOf$3(browserType).call(browserType, 'safari') != -1) {\n // safari\n if (indexOf$3(browserType).call(browserType, 'chrome') <= -1) {\n this.requiresTimeout = true;\n }\n }\n } else {\n this.requiresTimeout = true;\n }\n }\n /**\n * Redraw selection box\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @private\n */\n\n }, {\n key: \"_drawSelectionBox\",\n value: function _drawSelectionBox(ctx) {\n if (this.body.selectionBox.show) {\n ctx.beginPath();\n var width = this.body.selectionBox.position.end.x - this.body.selectionBox.position.start.x;\n var height = this.body.selectionBox.position.end.y - this.body.selectionBox.position.start.y;\n ctx.rect(this.body.selectionBox.position.start.x, this.body.selectionBox.position.start.y, width, height);\n ctx.fillStyle = \"rgba(151, 194, 252, 0.2)\";\n ctx.fillRect(this.body.selectionBox.position.start.x, this.body.selectionBox.position.start.y, width, height);\n ctx.strokeStyle = \"rgba(151, 194, 252, 1)\";\n ctx.stroke();\n } else {\n ctx.closePath();\n }\n }\n }]);\n\n return CanvasRenderer;\n}();\n\nvar setInterval = path.setInterval;\n\nvar setInterval$1 = setInterval;\n\n/**\n * Register a touch event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\nfunction onTouch(hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFirst) {\n callback(event);\n }\n };\n\n hammer.on('hammer.input', callback.inputHandler);\n}\n/**\n * Register a release event, taking place after a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n * @returns {*}\n */\n\nfunction onRelease(hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFinal) {\n callback(event);\n }\n };\n\n return hammer.on('hammer.input', callback.inputHandler);\n}\n\n/**\n * Create the main frame for the Network.\n * This function is executed once when a Network object is created. The frame\n * contains a canvas, and this canvas contains all objects like the axis and\n * nodes.\n */\n\nvar Canvas = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n */\n function Canvas(body) {\n var _context;\n\n classCallCheck(this, Canvas);\n\n this.body = body;\n this.pixelRatio = 1;\n this.resizeTimer = undefined;\n this.resizeFunction = bind$2(_context = this._onResize).call(_context, this);\n this.cameraState = {};\n this.initialized = false;\n this.canvasViewCenter = {};\n this.options = {};\n this.defaultOptions = {\n autoResize: true,\n height: '100%',\n width: '100%'\n };\n\n assign$2(this.options, this.defaultOptions);\n\n this.bindEventListeners();\n }\n /**\n * Binds event listeners\n */\n\n\n createClass(Canvas, [{\n key: \"bindEventListeners\",\n value: function bindEventListeners() {\n var _this = this,\n _context2;\n\n // bind the events\n this.body.emitter.once(\"resize\", function (obj) {\n if (obj.width !== 0) {\n _this.body.view.translation.x = obj.width * 0.5;\n }\n\n if (obj.height !== 0) {\n _this.body.view.translation.y = obj.height * 0.5;\n }\n });\n this.body.emitter.on(\"setSize\", bind$2(_context2 = this.setSize).call(_context2, this));\n this.body.emitter.on(\"destroy\", function () {\n _this.hammerFrame.destroy();\n\n _this.hammer.destroy();\n\n _this._cleanUp();\n });\n }\n /**\n * @param {Object} options\n */\n\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var _this2 = this;\n\n if (options !== undefined) {\n var fields = ['width', 'height', 'autoResize'];\n selectiveDeepExtend(fields, this.options, options);\n }\n\n if (this.options.autoResize === true) {\n var _context3;\n\n // automatically adapt to a changing size of the browser.\n this._cleanUp();\n\n this.resizeTimer = setInterval$1(function () {\n var changed = _this2.setSize();\n\n if (changed === true) {\n _this2.body.emitter.emit(\"_requestRedraw\");\n }\n }, 1000);\n this.resizeFunction = bind$2(_context3 = this._onResize).call(_context3, this);\n addEventListener(window, 'resize', this.resizeFunction);\n }\n }\n /**\n * @private\n */\n\n }, {\n key: \"_cleanUp\",\n value: function _cleanUp() {\n // automatically adapt to a changing size of the browser.\n if (this.resizeTimer !== undefined) {\n clearInterval(this.resizeTimer);\n }\n\n removeEventListener(window, 'resize', this.resizeFunction);\n this.resizeFunction = undefined;\n }\n /**\n * @private\n */\n\n }, {\n key: \"_onResize\",\n value: function _onResize() {\n this.setSize();\n this.body.emitter.emit(\"_redraw\");\n }\n /**\n * Get and store the cameraState\n *\n * @param {number} [pixelRatio=this.pixelRatio]\n * @private\n */\n\n }, {\n key: \"_getCameraState\",\n value: function _getCameraState() {\n var pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.pixelRatio;\n\n if (this.initialized === true) {\n this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio;\n this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio;\n this.cameraState.scale = this.body.view.scale;\n this.cameraState.position = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.width / pixelRatio,\n y: 0.5 * this.frame.canvas.height / pixelRatio\n });\n }\n }\n /**\n * Set the cameraState\n * @private\n */\n\n }, {\n key: \"_setCameraState\",\n value: function _setCameraState() {\n if (this.cameraState.scale !== undefined && this.frame.canvas.clientWidth !== 0 && this.frame.canvas.clientHeight !== 0 && this.pixelRatio !== 0 && this.cameraState.previousWidth > 0 && this.cameraState.previousHeight > 0) {\n var widthRatio = this.frame.canvas.width / this.pixelRatio / this.cameraState.previousWidth;\n var heightRatio = this.frame.canvas.height / this.pixelRatio / this.cameraState.previousHeight;\n var newScale = this.cameraState.scale;\n\n if (widthRatio != 1 && heightRatio != 1) {\n newScale = this.cameraState.scale * 0.5 * (widthRatio + heightRatio);\n } else if (widthRatio != 1) {\n newScale = this.cameraState.scale * widthRatio;\n } else if (heightRatio != 1) {\n newScale = this.cameraState.scale * heightRatio;\n }\n\n this.body.view.scale = newScale; // this comes from the view module.\n\n var currentViewCenter = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.clientWidth,\n y: 0.5 * this.frame.canvas.clientHeight\n });\n var distanceFromCenter = {\n // offset from view, distance view has to change by these x and y to center the node\n x: currentViewCenter.x - this.cameraState.position.x,\n y: currentViewCenter.y - this.cameraState.position.y\n };\n this.body.view.translation.x += distanceFromCenter.x * this.body.view.scale;\n this.body.view.translation.y += distanceFromCenter.y * this.body.view.scale;\n }\n }\n /**\n *\n * @param {number|string} value\n * @returns {string}\n * @private\n */\n\n }, {\n key: \"_prepareValue\",\n value: function _prepareValue(value) {\n if (typeof value === 'number') {\n return value + 'px';\n } else if (typeof value === 'string') {\n if (indexOf$3(value).call(value, '%') !== -1 || indexOf$3(value).call(value, 'px') !== -1) {\n return value;\n } else if (indexOf$3(value).call(value, '%') === -1) {\n return value + 'px';\n }\n }\n\n throw new Error('Could not use the value supplied for width or height:' + value);\n }\n /**\n * Create the HTML\n */\n\n }, {\n key: \"_create\",\n value: function _create() {\n // remove all elements from the container element.\n while (this.body.container.hasChildNodes()) {\n this.body.container.removeChild(this.body.container.firstChild);\n }\n\n this.frame = document.createElement('div');\n this.frame.className = 'vis-network';\n this.frame.style.position = 'relative';\n this.frame.style.overflow = 'hidden';\n this.frame.tabIndex = 900; // tab index is required for keycharm to bind keystrokes to the div instead of the window\n //////////////////////////////////////////////////////////////////\n\n this.frame.canvas = document.createElement(\"canvas\");\n this.frame.canvas.style.position = 'relative';\n this.frame.appendChild(this.frame.canvas);\n\n if (!this.frame.canvas.getContext) {\n var noCanvas = document.createElement('DIV');\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold';\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.frame.canvas.appendChild(noCanvas);\n } else {\n this._setPixelRatio();\n\n this.setTransform();\n } // add the frame to the container element\n\n\n this.body.container.appendChild(this.frame);\n this.body.view.scale = 1;\n this.body.view.translation = {\n x: 0.5 * this.frame.canvas.clientWidth,\n y: 0.5 * this.frame.canvas.clientHeight\n };\n\n this._bindHammer();\n }\n /**\n * This function binds hammer, it can be repeated over and over due to the uniqueness check.\n * @private\n */\n\n }, {\n key: \"_bindHammer\",\n value: function _bindHammer() {\n var _this3 = this;\n\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n }\n\n this.drag = {};\n this.pinch = {}; // init hammer\n\n this.hammer = new hammer(this.frame.canvas);\n this.hammer.get('pinch').set({\n enable: true\n }); // enable to get better response, todo: test on mobile.\n\n this.hammer.get('pan').set({\n threshold: 5,\n direction: hammer.DIRECTION_ALL\n });\n onTouch(this.hammer, function (event) {\n _this3.body.eventListeners.onTouch(event);\n });\n this.hammer.on('tap', function (event) {\n _this3.body.eventListeners.onTap(event);\n });\n this.hammer.on('doubletap', function (event) {\n _this3.body.eventListeners.onDoubleTap(event);\n });\n this.hammer.on('press', function (event) {\n _this3.body.eventListeners.onHold(event);\n });\n this.hammer.on('panstart', function (event) {\n _this3.body.eventListeners.onDragStart(event);\n });\n this.hammer.on('panmove', function (event) {\n _this3.body.eventListeners.onDrag(event);\n });\n this.hammer.on('panend', function (event) {\n _this3.body.eventListeners.onDragEnd(event);\n });\n this.hammer.on('pinch', function (event) {\n _this3.body.eventListeners.onPinch(event);\n }); // TODO: neatly cleanup these handlers when re-creating the Canvas, IF these are done with hammer, event.stopPropagation will not work?\n\n this.frame.canvas.addEventListener('wheel', function (event) {\n _this3.body.eventListeners.onMouseWheel(event);\n });\n this.frame.canvas.addEventListener('mousemove', function (event) {\n _this3.body.eventListeners.onMouseMove(event);\n });\n this.frame.canvas.addEventListener('contextmenu', function (event) {\n _this3.body.eventListeners.onContext(event);\n });\n this.hammerFrame = new hammer(this.frame);\n onRelease(this.hammerFrame, function (event) {\n _this3.body.eventListeners.onRelease(event);\n });\n }\n /**\n * Set a new size for the network\n * @param {string} width Width in pixels or percentage (for example '800px'\n * or '50%')\n * @param {string} height Height in pixels or percentage (for example '400px'\n * or '30%')\n * @returns {boolean}\n */\n\n }, {\n key: \"setSize\",\n value: function setSize() {\n var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.width;\n var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.height;\n width = this._prepareValue(width);\n height = this._prepareValue(height);\n var emitEvent = false;\n var oldWidth = this.frame.canvas.width;\n var oldHeight = this.frame.canvas.height; // update the pixel ratio\n //\n // NOTE: Comment in following is rather inconsistent; this is the ONLY place in the code\n // where it is assumed that the pixel ratio could change at runtime.\n // The only way I can think of this happening is a rotating screen or tablet; but then\n // there should be a mechanism for reloading the data (TODO: check if this is present).\n //\n // If the assumption is true (i.e. pixel ratio can change at runtime), then *all* usage\n // of pixel ratio must be overhauled for this.\n //\n // For the time being, I will humor the assumption here, and in the rest of the code assume it is\n // constant.\n\n var previousRatio = this.pixelRatio; // we cache this because the camera state storage needs the old value\n\n this._setPixelRatio();\n\n if (width != this.options.width || height != this.options.height || this.frame.style.width != width || this.frame.style.height != height) {\n this._getCameraState(previousRatio);\n\n this.frame.style.width = width;\n this.frame.style.height = height;\n this.frame.canvas.style.width = '100%';\n this.frame.canvas.style.height = '100%';\n this.frame.canvas.width = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n this.frame.canvas.height = Math.round(this.frame.canvas.clientHeight * this.pixelRatio);\n this.options.width = width;\n this.options.height = height;\n this.canvasViewCenter = {\n x: 0.5 * this.frame.clientWidth,\n y: 0.5 * this.frame.clientHeight\n };\n emitEvent = true;\n } else {\n // this would adapt the width of the canvas to the width from 100% if and only if\n // there is a change.\n var newWidth = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n var newHeight = Math.round(this.frame.canvas.clientHeight * this.pixelRatio); // store the camera if there is a change in size.\n\n if (this.frame.canvas.width !== newWidth || this.frame.canvas.height !== newHeight) {\n this._getCameraState(previousRatio);\n }\n\n if (this.frame.canvas.width !== newWidth) {\n this.frame.canvas.width = newWidth;\n emitEvent = true;\n }\n\n if (this.frame.canvas.height !== newHeight) {\n this.frame.canvas.height = newHeight;\n emitEvent = true;\n }\n }\n\n if (emitEvent === true) {\n this.body.emitter.emit('resize', {\n width: Math.round(this.frame.canvas.width / this.pixelRatio),\n height: Math.round(this.frame.canvas.height / this.pixelRatio),\n oldWidth: Math.round(oldWidth / this.pixelRatio),\n oldHeight: Math.round(oldHeight / this.pixelRatio)\n }); // restore the camera on change.\n\n this._setCameraState();\n } // set initialized so the get and set camera will work from now on.\n\n\n this.initialized = true;\n return emitEvent;\n }\n /**\n *\n * @returns {CanvasRenderingContext2D}\n */\n\n }, {\n key: \"getContext\",\n value: function getContext() {\n return this.frame.canvas.getContext(\"2d\");\n }\n /**\n * Determine the pixel ratio for various browsers.\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_determinePixelRatio\",\n value: function _determinePixelRatio() {\n var ctx = this.getContext();\n\n if (ctx === undefined) {\n throw new Error(\"Could not get canvax context\");\n }\n\n var numerator = 1;\n\n if (typeof window !== 'undefined') {\n // (window !== undefined) doesn't work here!\n // Protection during unit tests, where 'window' can be missing\n numerator = window.devicePixelRatio || 1;\n }\n\n var denominator = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;\n return numerator / denominator;\n }\n /**\n * Lazy determination of pixel ratio.\n *\n * @private\n */\n\n }, {\n key: \"_setPixelRatio\",\n value: function _setPixelRatio() {\n this.pixelRatio = this._determinePixelRatio();\n }\n /**\n * Set the transform in the contained context, based on its pixelRatio\n */\n\n }, {\n key: \"setTransform\",\n value: function setTransform() {\n var ctx = this.getContext();\n\n if (ctx === undefined) {\n throw new Error(\"Could not get canvax context\");\n }\n\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n /**\n * Convert the X coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} x\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_XconvertDOMtoCanvas\",\n value: function _XconvertDOMtoCanvas(x) {\n return (x - this.body.view.translation.x) / this.body.view.scale;\n }\n /**\n * Convert the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the X coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} x\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_XconvertCanvasToDOM\",\n value: function _XconvertCanvasToDOM(x) {\n return x * this.body.view.scale + this.body.view.translation.x;\n }\n /**\n * Convert the Y coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} y\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_YconvertDOMtoCanvas\",\n value: function _YconvertDOMtoCanvas(y) {\n return (y - this.body.view.translation.y) / this.body.view.scale;\n }\n /**\n * Convert the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the Y coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} y\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_YconvertCanvasToDOM\",\n value: function _YconvertCanvasToDOM(y) {\n return y * this.body.view.scale + this.body.view.translation.y;\n }\n /**\n * @param {point} pos\n * @returns {point}\n */\n\n }, {\n key: \"canvasToDOM\",\n value: function canvasToDOM(pos) {\n return {\n x: this._XconvertCanvasToDOM(pos.x),\n y: this._YconvertCanvasToDOM(pos.y)\n };\n }\n /**\n *\n * @param {point} pos\n * @returns {point}\n */\n\n }, {\n key: \"DOMtoCanvas\",\n value: function DOMtoCanvas(pos) {\n return {\n x: this._XconvertDOMtoCanvas(pos.x),\n y: this._YconvertDOMtoCanvas(pos.y)\n };\n }\n }]);\n\n return Canvas;\n}();\n\n/**\n * The view\n */\n\nvar View = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n function View(body, canvas) {\n var _context,\n _this = this,\n _context2;\n\n classCallCheck(this, View);\n\n this.body = body;\n this.canvas = canvas;\n this.animationSpeed = 1 / this.renderRefreshRate;\n this.animationEasingFunction = \"easeInOutQuint\";\n this.easingTime = 0;\n this.sourceScale = 0;\n this.targetScale = 0;\n this.sourceTranslation = 0;\n this.targetTranslation = 0;\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n this.touchTime = 0;\n this.viewFunction = undefined;\n this.body.emitter.on(\"fit\", bind$2(_context = this.fit).call(_context, this));\n this.body.emitter.on(\"animationFinished\", function () {\n _this.body.emitter.emit(\"_stopRendering\");\n });\n this.body.emitter.on(\"unlockNode\", bind$2(_context2 = this.releaseNode).call(_context2, this));\n }\n /**\n *\n * @param {Object} [options={}]\n */\n\n\n createClass(View, [{\n key: \"setOptions\",\n value: function setOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.options = options;\n }\n /**\n * This function zooms out to fit all data on screen based on amount of nodes\n * @param {Object} [options={{nodes=Array}}]\n * @param {boolean} [initialZoom=false] | zoom based on fitted formula or range, true = fitted, default = false;\n */\n\n }, {\n key: \"fit\",\n value: function fit() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n nodes: []\n };\n var initialZoom = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var range;\n var zoomLevel;\n options = assign$2({}, options);\n\n if (options.nodes === undefined || options.nodes.length === 0) {\n options.nodes = this.body.nodeIndices;\n }\n\n var canvasWidth = this.canvas.frame.canvas.clientWidth;\n var canvasHeight = this.canvas.frame.canvas.clientHeight;\n\n if (canvasWidth === 0 || canvasHeight === 0) {\n // There's no point in trying to fit into zero sized canvas. This could\n // potentially even result in invalid values being computed. For example\n // for network without nodes and zero sized canvas the zoom level would\n // end up being computed as 0/0 which results in NaN. In any other case\n // this would be 0/something which is again pointless to compute.\n zoomLevel = 1;\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n } else if (initialZoom === true) {\n // check if more than half of the nodes have a predefined position. If so, we use the range, not the approximation.\n var positionDefined = 0;\n\n for (var nodeId in this.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) {\n var node = this.body.nodes[nodeId];\n\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n }\n }\n\n if (positionDefined > 0.5 * this.body.nodeIndices.length) {\n this.fit(options, false);\n return;\n }\n\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n var numberOfNodes = this.body.nodeIndices.length;\n zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good.\n // correct for larger canvasses.\n\n var factor = Math.min(canvasWidth / 600, canvasHeight / 600);\n zoomLevel *= factor;\n } else {\n this.body.emitter.emit(\"_resizeNodes\");\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n var xDistance = Math.abs(range.maxX - range.minX) * 1.1;\n var yDistance = Math.abs(range.maxY - range.minY) * 1.1;\n var xZoomLevel = canvasWidth / xDistance;\n var yZoomLevel = canvasHeight / yDistance;\n zoomLevel = xZoomLevel <= yZoomLevel ? xZoomLevel : yZoomLevel;\n }\n\n if (zoomLevel > 1.0) {\n zoomLevel = 1.0;\n } else if (zoomLevel === 0) {\n zoomLevel = 1.0;\n }\n\n var center = NetworkUtil.findCenter(range);\n var animationOptions = {\n position: center,\n scale: zoomLevel,\n animation: options.animation\n };\n this.moveTo(animationOptions);\n } // animation\n\n /**\n * Center a node in view.\n *\n * @param {number} nodeId\n * @param {number} [options]\n */\n\n }, {\n key: \"focus\",\n value: function focus(nodeId) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (this.body.nodes[nodeId] !== undefined) {\n var nodePosition = {\n x: this.body.nodes[nodeId].x,\n y: this.body.nodes[nodeId].y\n };\n options.position = nodePosition;\n options.lockedOnNode = nodeId;\n this.moveTo(options);\n } else {\n console.log(\"Node: \" + nodeId + \" cannot be found.\");\n }\n }\n /**\n *\n * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels\n * | options.scale = number // scale to move to\n * | options.position = {x:number, y:number} // position to move to\n * | options.animation = {duration:number, easingFunction:String} || Boolean // position to move to\n */\n\n }, {\n key: \"moveTo\",\n value: function moveTo(options) {\n if (options === undefined) {\n options = {};\n return;\n }\n\n if (options.offset != null) {\n if (options.offset.x != null) {\n // Coerce and verify that x is valid.\n options.offset.x = +options.offset.x;\n\n if (!_isFinite$2(options.offset.x)) {\n throw new TypeError('The option \"offset.x\" has to be a finite number.');\n }\n } else {\n options.offset.x = 0;\n }\n\n if (options.offset.y != null) {\n // Coerce and verify that y is valid.\n options.offset.y = +options.offset.y;\n\n if (!_isFinite$2(options.offset.y)) {\n throw new TypeError('The option \"offset.y\" has to be a finite number.');\n }\n } else {\n options.offset.x = 0;\n }\n } else {\n options.offset = {\n x: 0,\n y: 0\n };\n }\n\n if (options.position != null) {\n if (options.position.x != null) {\n // Coerce and verify that x is valid.\n options.position.x = +options.position.x;\n\n if (!_isFinite$2(options.position.x)) {\n throw new TypeError('The option \"position.x\" has to be a finite number.');\n }\n } else {\n options.position.x = 0;\n }\n\n if (options.position.y != null) {\n // Coerce and verify that y is valid.\n options.position.y = +options.position.y;\n\n if (!_isFinite$2(options.position.y)) {\n throw new TypeError('The option \"position.y\" has to be a finite number.');\n }\n } else {\n options.position.x = 0;\n }\n } else {\n options.position = this.getViewPosition();\n }\n\n if (options.scale != null) {\n // Coerce and verify that the scale is valid.\n options.scale = +options.scale;\n\n if (!(options.scale > 0)) {\n throw new TypeError('The option \"scale\" has to be a number greater than zero.');\n }\n } else {\n options.scale = this.body.view.scale;\n }\n\n if (options.animation === undefined) {\n options.animation = {\n duration: 0\n };\n }\n\n if (options.animation === false) {\n options.animation = {\n duration: 0\n };\n }\n\n if (options.animation === true) {\n options.animation = {};\n }\n\n if (options.animation.duration === undefined) {\n options.animation.duration = 1000;\n } // default duration\n\n\n if (options.animation.easingFunction === undefined) {\n options.animation.easingFunction = \"easeInOutQuad\";\n } // default easing function\n\n\n this.animateView(options);\n }\n /**\n *\n * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels\n * | options.time = number // animation time in milliseconds\n * | options.scale = number // scale to animate to\n * | options.position = {x:number, y:number} // position to animate to\n * | options.easingFunction = String // linear, easeInQuad, easeOutQuad, easeInOutQuad,\n * // easeInCubic, easeOutCubic, easeInOutCubic,\n * // easeInQuart, easeOutQuart, easeInOutQuart,\n * // easeInQuint, easeOutQuint, easeInOutQuint\n */\n\n }, {\n key: \"animateView\",\n value: function animateView(options) {\n if (options === undefined) {\n return;\n }\n\n this.animationEasingFunction = options.animation.easingFunction; // release if something focussed on the node\n\n this.releaseNode();\n\n if (options.locked === true) {\n this.lockedOnNodeId = options.lockedOnNode;\n this.lockedOnNodeOffset = options.offset;\n } // forcefully complete the old animation if it was still running\n\n\n if (this.easingTime != 0) {\n this._transitionRedraw(true); // by setting easingtime to 1, we finish the animation.\n\n }\n\n this.sourceScale = this.body.view.scale;\n this.sourceTranslation = this.body.view.translation;\n this.targetScale = options.scale; // set the scale so the viewCenter is based on the correct zoom level. This is overridden in the transitionRedraw\n // but at least then we'll have the target transition\n\n this.body.view.scale = this.targetScale;\n var viewCenter = this.canvas.DOMtoCanvas({\n x: 0.5 * this.canvas.frame.canvas.clientWidth,\n y: 0.5 * this.canvas.frame.canvas.clientHeight\n });\n var distanceFromCenter = {\n // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - options.position.x,\n y: viewCenter.y - options.position.y\n };\n this.targetTranslation = {\n x: this.sourceTranslation.x + distanceFromCenter.x * this.targetScale + options.offset.x,\n y: this.sourceTranslation.y + distanceFromCenter.y * this.targetScale + options.offset.y\n }; // if the time is set to 0, don't do an animation\n\n if (options.animation.duration === 0) {\n if (this.lockedOnNodeId != undefined) {\n var _context3;\n\n this.viewFunction = bind$2(_context3 = this._lockedRedraw).call(_context3, this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n } else {\n this.body.view.scale = this.targetScale;\n this.body.view.translation = this.targetTranslation;\n this.body.emitter.emit(\"_requestRedraw\");\n }\n } else {\n var _context4;\n\n this.animationSpeed = 1 / (60 * options.animation.duration * 0.001) || 1 / 60; // 60 for 60 seconds, 0.001 for milli's\n\n this.animationEasingFunction = options.animation.easingFunction;\n this.viewFunction = bind$2(_context4 = this._transitionRedraw).call(_context4, this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n /**\n * used to animate smoothly by hijacking the redraw function.\n * @private\n */\n\n }, {\n key: \"_lockedRedraw\",\n value: function _lockedRedraw() {\n var nodePosition = {\n x: this.body.nodes[this.lockedOnNodeId].x,\n y: this.body.nodes[this.lockedOnNodeId].y\n };\n var viewCenter = this.canvas.DOMtoCanvas({\n x: 0.5 * this.canvas.frame.canvas.clientWidth,\n y: 0.5 * this.canvas.frame.canvas.clientHeight\n });\n var distanceFromCenter = {\n // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - nodePosition.x,\n y: viewCenter.y - nodePosition.y\n };\n var sourceTranslation = this.body.view.translation;\n var targetTranslation = {\n x: sourceTranslation.x + distanceFromCenter.x * this.body.view.scale + this.lockedOnNodeOffset.x,\n y: sourceTranslation.y + distanceFromCenter.y * this.body.view.scale + this.lockedOnNodeOffset.y\n };\n this.body.view.translation = targetTranslation;\n }\n /**\n * Resets state of a locked on Node\n */\n\n }, {\n key: \"releaseNode\",\n value: function releaseNode() {\n if (this.lockedOnNodeId !== undefined && this.viewFunction !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n }\n }\n /**\n * @param {boolean} [finished=false]\n * @private\n */\n\n }, {\n key: \"_transitionRedraw\",\n value: function _transitionRedraw() {\n var finished = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.easingTime += this.animationSpeed;\n this.easingTime = finished === true ? 1.0 : this.easingTime;\n var progress = easingFunctions[this.animationEasingFunction](this.easingTime);\n this.body.view.scale = this.sourceScale + (this.targetScale - this.sourceScale) * progress;\n this.body.view.translation = {\n x: this.sourceTranslation.x + (this.targetTranslation.x - this.sourceTranslation.x) * progress,\n y: this.sourceTranslation.y + (this.targetTranslation.y - this.sourceTranslation.y) * progress\n }; // cleanup\n\n if (this.easingTime >= 1.0) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.easingTime = 0;\n\n if (this.lockedOnNodeId != undefined) {\n var _context5;\n\n this.viewFunction = bind$2(_context5 = this._lockedRedraw).call(_context5, this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n }\n\n this.body.emitter.emit(\"animationFinished\");\n }\n }\n /**\n *\n * @returns {number}\n */\n\n }, {\n key: \"getScale\",\n value: function getScale() {\n return this.body.view.scale;\n }\n /**\n *\n * @returns {{x: number, y: number}}\n */\n\n }, {\n key: \"getViewPosition\",\n value: function getViewPosition() {\n return this.canvas.DOMtoCanvas({\n x: 0.5 * this.canvas.frame.canvas.clientWidth,\n y: 0.5 * this.canvas.frame.canvas.clientHeight\n });\n }\n }]);\n\n return View;\n}();\n\nvar css_248z$1 = \"div.vis-network div.vis-navigation div.vis-button {\\n width:34px;\\n height:34px;\\n -moz-border-radius: 17px;\\n border-radius: 17px;\\n position:absolute;\\n display:inline-block;\\n background-position: 2px 2px;\\n background-repeat:no-repeat;\\n cursor: pointer;\\n -webkit-touch-callout: none;\\n -webkit-user-select: none;\\n -khtml-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n}\\n\\ndiv.vis-network div.vis-navigation div.vis-button:hover {\\n box-shadow: 0 0 3px 3px rgba(56, 207, 21, 0.30);\\n}\\n\\ndiv.vis-network div.vis-navigation div.vis-button:active {\\n box-shadow: 0 0 1px 3px rgba(56, 207, 21, 0.95);\\n}\\n\\ndiv.vis-network div.vis-navigation div.vis-button.vis-up {\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAABphJREFUeNqcV2twU9cR/nbPlVTHxpKRbNnBLyEbPyJisLEcPwgwUMKQtjNJAzNJZkgNNJOmJaZAaDKlxaXDTIBAcJtOOzSYKSkdiimhAdIMjyT4bYgBYxA2BgcUQPLrCiGDR4qt2x+yXTASFt1/957d7zt3z3d39xDCMQWUfgAz/RI/T4pSTAJpAGL8rECAXX7QFQGq9wOHOxYO1oCgjAdJj1wtB095Giv9TFuZAIWHAziATMPhTAwiHgUkYPXFJu92lMP/2MTpB1AKUCVEgNAcleUo1M+2F8TO6crSTncb1QleAOj2OTSX3Ge1p+Va42m5JrnzbnsCE8Ov+EHgpa0LPLvCJjZ/whuIlN8wAcXG+e1LUn9hm238QU84p1Ld83nsXvuO7Lq+LzKYGAT6/dn58m/HJTYf4O3EShkT8Irpzab1Uz9sGevT5+tWn+j6NB4A5hp/5NSr43xjfd5rW5tT9e3OAhCBiCua5/WsDEls/hdvYklZSwDefmrT8eXmtzuDkb5YZ33p9ndylICAVjWxf39xw/5g5Luv/9H84ZWNcwNEypZT87rXjqyJB85UYDMJYN3U7UdLJ6/6JlgqV517teRqf9uTlug8e1zEk27HgD22o98WsTBh8fWxvjm6ApdONbGvse8LM5NUPOm1Cfabuz3nACAgxX0QEFTJAnjNvLJ+Sepb14KRHnN+Ev+1XJOhZs3Qu1mbG97J2NQgsXroa1dtxrGuf8cHi1mUtPTay0lv1DMJSCRVLtoX+FgGgDQNysBAcez89l9nbbsQSji7rlXkEhjPxb/QatHOcFu0M9zz419oFSRhj/3PuaHiyqasv1Con9NGxHAYUsoCxAqImbYSgCWmFbZQwdsur7N0eC4m6tT6/jUZ750Zeb82c+OZGLWh/2p/W+Kfrmy0hIp/aVKpTSIJEqu2QgFx2iE8CwDp0RbH7Ljng/4yXr+XT3QdyhYsodS0slGr0g2OrEUK7eCrKW82SqzCVz3/yfb6vRwM4xn9rN7JkRkOQRLmfJn2LBPxQjDBqp9lD7XbX7X8pKTP160zR2bdeiX5jYeU/nLSTztNkem3XL5eXbltRUkonBxdgZ2IIUmahUxERQSCVT+rK5hzQ89xQ6P8VaaK1f5VmRvqQ4G+lba+nlnlb5brMhvlk7FBiaPzuwQEmEQhg5BOxMjWTncHc2501cQLkjDTsMCWpyuRQxFP0xXIJfp5FyVW4Zy7KajC06ItbiIGg6ZITBxDxIgbrr1jTSM0fibGIHz8O9sKK0GAibEua9spANh4aY2VmcEg+DEkiBgR/L2hYFgGtcErkQQAMVJgBxyy9hboZzv32v+Kpr7qbEECTAIMAoaJa3qPTmNiiAAgJAjk6J5xhu6HDAIgQYGLmI29PocmMcI8MNYvT1ckfzD9H/ub5br4e4Me9WfOKqtyX6Ud2cwC449PRamifDm6Auc0rTXokci+Xo1EAgBckiDuYGLjpTvntcGIA+SFcp6uUAaAI879VhWrRteYAqn/edq758brXJ1327QMhgJcZjA3EBjNrgZjOG1PkAjyTGENMjZPq5ECQ0MDE9ERBqFZrk0OJ3i4x/7vyIjBxGERt3takgVJEAp9xq3f769WiPDNvSsJdT3HDOEASPelmoBRYT3Kzt5uMtwauJEgSOCpwrk1DIJCoNUMwj9v7MweP9XSQ8/hJPp496fZTAICvLqcyv2B7nRbrgCA03JN5h8ub7A8VqpB437xHvsOy3l3cyaB4L2uqxhti1WLMcSgZQCw7+bOooO3Pk4JBZIYYXISMV5sKH59UePM10GESRGpIf/bE92HU452HywSJIGIllctrhp6YAK5+fHds0lLtJFMXNwkV6fFqA29mROefqiMJj1h6um4a5vY/92dKGaBxIhU5zJTWW2cJmEgGOmeb3c8FxAfb9mdf2RzyGGv5MvU7QwuEySwKHFp/c/M71zA/2F7b1RajnYdLAqMukMVu2YcfmDYE2MD7H+7/Xlq6cRIJqm4zXM+qd3TGjVBir43KSLlXjiELe5TsX+3/yW/ST45PaAHbKmccWh12AP93JNZywj0kSABIobpiXRHjtZ6faout2tyZMadGLXBCxBcvl6NfaAz+tKdFmObpzWl2+tIIBACYy0t/yj34M7HvsKUK+CGassvicX7alYDwwq+vykIEqPVa+Q9gdYk5+V+UE7lj3+FGbuBM/X5JUT8QwIVSSSZiTgmoFR2MfiqYFFPfjpkyrfWPopwxP47AP1pK1g9/dqeAAAAAElFTkSuQmCC');\\n bottom:50px;\\n left:55px;\\n}\\ndiv.vis-network div.vis-navigation div.vis-button.vis-down {\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAABpdJREFUeNqcV21QlNcVfp5zX9ikoAvLEsAIIgsoHwpqWAQUNKLNaNv8iZ1JMkNG6/Qj/dDUyCSTtCHpmEkwVk3TToZRMjXj5MOG2KidjIkxQYSAQUAtX6IgIN8su8KCoOzbH4sk4q5g77/33uee555z7rnneYmZDB2MKcJKlyYbqOsZVIgGEOgSHQoy4AKbFFjqAo5dWn/rNAh9OpO852oeJHYxtrmEu4WALhMbxG2ZE9uFAlImDRLY/t/y0b3Ig+u+iWOKsAlgIZSb0OIf15kWtKo1NXh1d5xxiSPEN2wUAHrGOg11jirjWVtJyFnb6YgrzoYwocClu0DI5guPDb43Y2LLp/Iaqf9JCGSErGvIifxd7aqQn/TOJCvFvZ8Hf9haEH+m/6sFQgHBv1Sts/15WmJLkeyl6FuFwFPzny1/ZdE7Nfg/xhv1uUmH2w6kggQp+yqze7d5JbZ8Im+KpucSwI6EN7/cYtlxZarBCts3ptfrtq9odjaGKihE+sV0vRC3u8RqWmmbij149W+Wd5p2rnET6bsqsntyb6+pO3KqkE8FvLxo74lNUX9s9uTJb8/9fG2L81KoogJFYfCm3b9usNq0MXxzw1RsUkDqQICPqf/b/q8sQi3j4WdmtV47OFgNAO6r+DEUFAtFAc9YtpXmRP6hxVsI24cvhyoqnFtrK6jM7isgBa3Dl0O94TeGb255MvzXpUIFjVrhxo/dzgoARBuwFQJkBK9reCnurxfvXX8CRW3yW1G749vT2Br7ysW0oNX1pKDTPG+rm1gHRbibAHLm/7522sKnQCZqFgCUaBCqaS/bEw9vqtWoQROf3dBBiT6KTACImZ3YueqhDdOWjDbFQ4IzIl4elNUX5begU1HD6lPRmULKeghhDcpqnUmZuD3+nkgTH6gZEE9ctlZSoGmG9UIynSCsQVndMyX+IZGiBoHMjHh2SreCglClaSBiSEG8cYnD24bv7CWms/3FocO3hnw13plTggAFb196NdlPM44tC0zrSg5ItXmyEz070UEKCMRqQgkkBQ9NvL2eSJ+revoJTORSpoT6do4/7/7UShBFHQexM+HdfyUHWO8iN/uaRzX3/QjUSLlnqM72F4cCRIY5u9Zf+Y+BAv4AvzpkQ7WAIBRujA/7Vg6cia9xlId6InafVEAAGnQMUCSkb6zTMPdBy8hU3JjrphIq+CrD+Mvxeyumrr+4IH9y7o2GF5eDghuuGx4L2zbWZ9Dc0RoQRbkkFNRdP2/0BH7EtLJLKCjr+zqh2l5u8haZ847vTBW24kRFQXKAtcsT5oqz3igQENIoECkjBJUDZSGewBlBj/ammjLrdX1c/t70ero34gMte9IByLLAjPrUwKweT5jawQshdIuGMiF5XEBU2koivBl9NeEfJeYHwuxtI81zPrn2z6ip60c6DkV1jLTOCTaE2HNjd5Z4s9MwWBOhqEHp/I9cWDtUrJNoHm4KO9P7hdnTBoMYXI8Gb6gVCg63FS53jg9O5tA57tSOdHywnCAygrJrfcTgUe5U2cvNHSPtYYoKCWlrTgsIneB2AfFR+4F4b6f9ZdTzF6P8Ytud407/dy/nL7k9X9i8J9l5y+Ef6RfbnjPvWa8N5suez+KFCgqyPY95Lnd3stv2AcBZ2+mFbze+lui1xc3dXCUUlPafXNx4/aKxcajWWNp/MklRw8/mPFntbd+h1oLE847KhQQxejVg36QQqD0MPTzHv42Ux+uGasJNBnPfwllJd71kkX7RQ3WDNf7dox3BLcNNs6vt34bbbvYHJhlTGp6O+JVHb0/2HJtX1PH+aqECqG/5YN1nlXcokGvvO6vCc4x+QskotxVHB/qa+xbOWuzw8NB3nuo+Ht0z2hHsuGU3GrWAoZfi3jrxgHpw3BPpobaCH7vbqOw6mHI836vYW3Eqcq9AtioqbJy7ufQ3lhfu8sR+s9+3vL8klACsQSu7AnxMY1MxH7YXJp7oPpLulrrj+9575Ni2aeVt1teWfEWfHQLCaspseHzOU7VWU+aM5G2NoyL4i+6j8XWDNQsmGsKu/cv+nTtjQb/mm7hfENyvqEAK5v8opjPJaL26KGBpd5TfguuBvuZRgBgY6zO0jlyZXXe9JqR+8MK8ntHOMHfHIkhu2b/0yIH7/oXJ0yFlxYnPUdRbvuILgO7+y+91l6Ka6M+cnCf4fMSypXvymHf/vzBTD3CuNGUFKT8lmK5Rs5ASqKiBlAGBXFaiSuni0fkp1pJ7Ed4e/xsAqLk46EWsG1EAAAAASUVORK5CYII=');\\n bottom:10px;\\n left:55px;\\n}\\ndiv.vis-network div.vis-navigation div.vis-button.vis-left {\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAABt5JREFUeNqsl2lUlOcVx//3Pi9DZRsGBgYiS2RYBQKIjAhEJW4pNrXNMbZpWtTGNkttYmJMG5soSZckRk+0p+dYPYY0Gk0ihlhRj63GhVUgBhDD5oIOy8AAMwzD4lCYtx+GqCQKuNyP7/Pc+3u2+7/3JUzEZFBYLh62S7yIZDmVBEIBqOwsQ4DNdtBFASq2A4cuZAwVgCCPF5LGHM0Chz+E1XamzUyAzCMO7IhMI+5MDCK+HpCANd+U2rYgC/Y7BoflYgVA2RAOoNYtyjDTe45+hk96e5QywaJR+NsAwDhocK61VCjLTYWaclNB0OW+en8mhl22g8C/rn7U+uGEwdov+C0i+Q0mIFWzoD7zwVU1czQ/6pjIreR3HPX5VL9jalHXiQgmBoH+XLHAtH5csDaXtxDLLzIBv5jyfOmG2H9U4S7snbpX43KaPpgBIhDx1rPzOlbfPC5GQT/nd1mS1zABa6PfPf5y5F/rcJeWpp7fPkly6f7KXBRCoOSATFfXll19x74HDsvFCghsJAG8HrvlvytCXm7EPVqc5wyzp5NX15muE1omKXXyMnd9yy5r5Q3wPghvJzrLAlimXV38+7D1DbhPFq1M6O4b6rPVWKsCBfHi5EWWv9TkQBYAEPpLvERMC9N8FtRvjt9dPl6wwo5jPvuas7WV5jNqEjz8wA+CBsaan+w9x1hrrXJtuaZX97ooLfqPLCUEGRR+iOwAsF2X98Uc30W3fb02u41frVqeVmo6FUkkwCAwCWxJ2Ls/0TPFNBb8TNdp9WvnVz4OAKdmX2QOzcMsAAjziDGMBd3asCF6SXHyknJTfqQTK+zpvhnVKT5zawCgzFTgN94pJXvP7gxxjTAIkpB+MnSWRMQZYEDnPVt/K4ejbZ/77726Lb6h95tAAiPELaJ1bcTbRfGeM8xv1azWSeyEa0P9igk+Nr1+oNFfkpwzJCJKIQA679ntN08yDXYo3qh+LuUrc0E4EcNL4dP7VNDzpU8FP3vpekoQQ5CEw4bPdEfa9+sAgEZUmkmAAAS5hLQ9p11XGO+pM8V5JLUfMeQARDMlEMKIGFOVCZYb0C7Fz0oeXmIZ6nZzYoV9od/jVS+GbahUOnn9b7T6sEOviUGyA8bMDlUa0W79wBW/bZf+lrY98cDBUI8YCxGDgHCJiVVEDN8R7QWAE8Z/+1mGut2i3eP1r0S+XRztkdBzq6NbF7WpbF3UprKxjvfHxbrfttla/QBArVDbJJIAQCURMRg8ugrKIAKBSNxzHtN3VdmxY0iQYSZmTeegwTlgknYAAB7RZBh2Nm7urbeeC1r19ROT52kWn3shfH2Fu1AO3RxjY/0fdac7/hPPJMDE11GC+HpBJmIEuAS3Oa6w01lybMbMgvgCE6O255zy24DeCr/Bvckn9+u8ZjXYIYvjxoMJy8oeXZrT9GHIqMWTwA2oI6cFMeDIcAiSEOyibXsmZG0hAFzuq1OyY6xBAnMJgdPOmks08zU/bbsB9x18P37PqS/b8+o/a96ZcLm3PmBH46Z5x40HW1eFvl4Uq0w0MwiCBOb7/qTsd6GvVY537DXWas1Iw1AiNJnOgwJi+bXhAbE08OnvaXSIW0TvYw88eaF/uM/WNdju3m5r9TlhPBzVNNDoPGC/5tRma/GJ80xqjPPUjVuvP2narrMOWd1Jlv/E1fN782UiNPZf9C/qOKa+ndOz2j+cz046sn+6KrVOsODirpOxld0lUxmEBK/ktvGgFd2l6taBZn9BAtEz5xYIvAn4/8rFKkgstAyZ6Yf+S67ezlkiSU73XXRV6xqh93TyssR4JF75efBvymLdE03jgT/Wb5tutLWpGbTm7wHZxQQAT+yDuKLyHRIk4cnAZ4pfCF9/HvfR9uh3xBxtz00BANsVDylnac6wAICaHMiBmW5NRLy4trcq0MtZ3RnpHme5H9AvjYeCc1t3pzMJgOSVnyw4eHZUB9Kyu68iMFPpysSppab8UJVC3Rnp/pDlXqF7mnYsdKQbv7cr6fDGW/Zczbt6jgUtV6kIlFxuyg/tH+6zJXmlGe8G+mlzdsyB1j3pTAwZ9q3/Sspbc9tmDwD0H3UffXCFlyuTlFpnPRdYb612c5c8+idPCu6fCLDKUubzsf6fSaWm0wmO9hbvZU8fDR2zoZ97OuppAu0UJEDEmOISZohT6q7Gek5rD3GN6FEp1DaAYB7sdNYPXPao7anS1Fmrg402g7+jYhGIaOXOaQc+uONfmCwZXJIf8xKx2KRgxYgOS+CROuyoyQKCxIhkOr4T6JWgxGnvZ1HWnf/CfHcBXxcnpRHxYwRKkUjSErFKkAQiNjP4kmBRTHbKm5KkKxwL+K39fwDX1XGF8ct++QAAAABJRU5ErkJggg==');\\n bottom:10px;\\n left:15px;\\n}\\ndiv.vis-network div.vis-navigation div.vis-button.vis-right {\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAABs1JREFUeNqsl3tQlOcVxp9z3m+XygK7C4sLxkW5o4CAkYssFSkRjabjJEOSJm1IbZx2krapiZdeprW0NVVJ0pqMM0kYJQlqkoZImGioE1ItiCAgIsFwE4Es99vCslwChf36xy5EW1A0Pn9+73fO772e93kJC5EMCszFd20SbyFZNpJAAACtjWUI8KAN1CRAJTbg9LXNU+dBkG+Xkm7Zmg4OWoUdNqZXmQCZHQFsz0yOcCYGEc8mJGDnl2UTh5AO2x2DA3OxDaAsCDvQ32VF11qP9aZYz6SeFeooi17pPQEAvZNdTnWWKnWFuVhfYT7v0zza4M3EsMk2EPgnNZusby8Y7P8x/5lI/gMTYNSnNKQt/0Xtev1DfQtZlaK+M54fmDJXXhg4G8zEINBfqlLMe28L9s/lQ8Tyr5iAJ32fK/tj+OFq3IUO1O+JyGk7GgsiEPFrlQ/07bixXdwEPckHWZJ3MgG7Qw9+/mLIS/W4SyXoNvQskpyHLg1e8CNQ3NI0laoje7Tg/8CBudgGgQwSwO/DD322ze/FFnxLRWhiBzUK94GLA2f9mSTjfU+7mjqyrVe+AX8I4aGgShbA0/47Sn4ZuLcR90ih6qih0anRiVprtUEQb43bYtlXmwNZAEDAj/ACMW1M8ExpeDXyWMVCEl4yF7vntR/zLeov8JJlWfZR+Y3N92+cx/reOmu1quNrk27EWW0xvWspJcigoNNkA4C3Yk59vH7xltvu3ktDxe7PX34ilQCQfeci1j2xfn94ZrGCneY8uxcHCnW/vbr9EQD4d2ITc8AprAOAQLewroVAAaB8oMiLiRHvmVy7znNTjWCFrXKoJOSHFQ+kvnF9f+jco07s91MFdwmSkHQuYB0T8WYwIcYj0bTQdRufGlFKJMFVaCb/GvZW6aGI4yeXOwd2mr/u05zsyDY+W5X64Nm+fO85NpuJiCFJTpslIoonADEeiT2zIzIXuh+o25PQNtbsNVMOBUn2g08MiSTHN3uZjNTEDr4dnX/6H+1H/XPasmKvW+sMGfW/MXzende4K3h/ibvSYxIAItyie/K7cgCitQxCIBFjpTrKMgM+WPfrhLbxFi9iMQtlYjAJSCSBSYBAIPBNI3p86TPXj8bk56R4PVylFE626uFLQc9efiTVPDmgBIAAtzALEYNBQRITa4kYix21FwBax655CVagPLk7806Pj1qo/7MraF/FQ14/aMhszYhvGqn3KTef89rklWrSKXUTkn3mtJK9Bzf3XJA0e/PcrdgxIwSCDPmbZMQgABJkDBKzvn+yy2npIv9xAPB1Ceo2jTZ7Gc8afipIgEhAkACDwcSQQZBIIGnx5it7gg+U3wgcnbZKR1r+FnW+v2DVtDwtXCXNSKz797oAwDzZ7ySRAIBBFsTXmBh1w1+oZ4J3h+wv9lUFdbMDOrO+5IAqWIGZthuV13nC77nKRx8r7PssyibLIkoT1/h65HsfzWyu5tF6NYNB4EYJzKUETqgcLNVv0D/cDQBrNAnm9+LOfTLfNB5u2hf5z+6TMexYji+tVdrM5leMbWOtSwQx/F1C2rcuebIqwSO568a4WmuN3mEYSiUi+pRl2l1pLvYBsKArUKVwnZRYgdHpMWVG4+/WXhwoDBXE7OmkHzJ6JNemLfv51bniGqzVPoIkyLbpfK7ZMFIkE6FlrMn7Ql+BbiHg+zXGbgLjylDpyosD58KZmKM0cfWHI9//aD5o1VCZrnO83VuQQOja5PMCfwK8n3K2ChIbLVOD9KB36le3A+u/s2Q81C2yRavQmQNdVnamLnmq4nHD9jpB0rwm77jpjTW9E906Bu18fWlWCQHAox9CtGoXTwmS8IThZyXPB+29inuoE6bMsDM9ufEAMNHqJuU8ljMtAKA2B7IhzaWNiLfWjVQb3J10/SGuEZZ7Af1X7+lluZ3HkpgEQPL291M+qbzJgXQcG60ypKlVTGwsMxcFaJW6/hDXVZZvCz3RlrmRiQHwy9nRn2bM6bnas4cLfH6s1RIorsJcFDA2PToR7Z7QezfQD9qzwvI6TyTZC47ttXeiT+2c1+wBgOndoTPLt7mrmCRjvfULQ4O1xsVVchu7b9GysYUAqy3lnsdNb0aXmQuj7PYWL2etuRl6S0OfXLjiGQIdEY6K5esc2BWhjvkqXLO6x08VPKxV6iYAwuBkv5NpvNmtbrhaX2+tWdY70eVNINhtLW0/sjrv6B0/YdJlcGlR2AvE4hUlKwHQ7BU5cz8LRx0HaPY7gXb53L/67+mUfudPmP/twOWS6AQi/j6B4iWS/IlYK+yGYJDB1wWLErLRKd/omOJbAWf03wEAyO9m+/TtS3AAAAAASUVORK5CYII=');\\n bottom:10px;\\n left:95px;\\n}\\ndiv.vis-network div.vis-navigation div.vis-button.vis-zoomIn {\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAABiBJREFUeNqkV2tQlOcVfp7zvgvDRe66y8htXUBR1GoFI+BtFJvRtjPJBGeaH2a8DGmbttgSTWbSJEw6TWOsrbbpTIeJZGqaTipTa6LJZDTVUTYQdNAohoso6qLucnERN0Axcb/8+HaJUHDX9Pz6vnnPe57vXJ5zzkeEIwaYcwBL/VrW0TCKqZANINEvBhSk3w9eUmC9HzjcsfarOhBGKJN84GkVJHcetvqFu4SAIYELYlpm4LpQQMqoQQKVnzeO7EYV/A8NnHMAGwHWQJmAjtg895LkFa7FU1d258UvGLBGpI4AQM9dd2TrwNn4016n9bS3LqNzsD1VKPAbfhCyqflR31thAzv+La+QxotCoNi6pn1D1s9aVli/3xtOVk72fjT1XVf17E9uHZspFBD8zdk13pdCAjsOyG6KUSEEnrT/tPHluW+cw7eQ19q2z6/t2rsYJEjZ07S6d+ukwI5/yQ7RxnYC2DZnx8dbHNs6xxs85T2R9GprZcmVwYs2BYWsmBzP83m7nIVJS73jdfdd+7PjjUu/XWUCGTtPre7ZHjxTY3Kq8DoV8Ou5u49snPGrKxN58syZ9aVXBztsigoUBd+Xt2NbfZ8llaVvah+vOz9hcX+CJenWp7eOOYS6ePpTU1w39vk+AwCzFPdDQbFGFPCUY2v9hqxfXJ0shNeHLtsUFc6UequbVvdVkwLX0GXbZPpl6Zuu/ij9x/VCBU1dU7bfdFYAIDsSFRCgeOqa9hfy/nDhwfwTKOrRd0U95n0iqch9+cKS5JVtpMCdkllhAhugCHcRwAb7z1tCEp8CCXAWAJRoCFXIYnti+sYWTQ0tll0wQMk+hGUAkBOX714xbV1IyuhxHhIMC/iR5OV9M2JmuhU1Vh7PXiakrIUQhcnLXeHQxPT4GyAtFqgwgAPF5iIFWkeu1SSLCKAweXn3/ZR5rXV7SddQpy3YDoNems9qTI5hGCitm1MOAAx0aaFCerTd84zjBed3Egq9ADA/rqD7Q3ctQC4REDmkYHb8goGgsR2tz5V0DV+xUdQoqAQ81RybU4IgFWgACgpaLLCIBUo0bv63y/aXy6+WBHWz4/IHSIGAuVooiaRgWqD3AsDVoQ6bEgtOrfJUhwrf0WUtk+r8sL6wvHvk5ijVUiJSRrQZuURtfoGMuaCoRyfP/yMy0XykgAA0DPRTxNp31x2ZFuUYBgB7bK7HNdhpKz6WXq6oQCooKghMKhkgji77vBoA1jkXlAvVfRQjFMUcmxSkRWd6gpjeu32R2kxTvyhKh1DQeud8fFBh26zfOe0xuR4JgAbzywCoRSzfeDUKatJKUQK+CjKiHZ6nZ2xzBnU7B9vixTy7qCHSQEhJU3+DtdT6mAcAFiWUeP/xyPH3Jwrfo3XzysemRcEA8F5RY8h6aPE1WwMLQ4OQ/EBANHmdGWHlzZyxk3ayB0m771yGooYy+KE0l35x0iBxZehS6ie9R1PCMaDvCzWDXA4hZ283ptwcvp6qqDBnyao6AWEQrBQQ/7y+d3YoA+NBTAaElo973p8tVFCQyipW+c3pdNu7BwBOe+tm/eniK/kPFWowpMfvuKrzzw80zSKIkWsJe0bHYu163BNwMwDsv7G36ODNtzMnM5IWZfeQgscbisvLPl1aDhLTo7I8k+n/p+dw5pGeg0WKGiS31K6vvTdmA7nx9uDZ9A3xMUIpbvSezE6MSOmbNWXewHhD6dH23o7BlqQvvrwTK6KQFpXl2WyvcE6LTB2eCPSdrurvmcUnO/cVfPD6pMteyfGs3QKpUFQoS9tU/xPH8xe+Tdd693pN/pHug0Xmqntvz1uLDo9Z9v5nnrn+dvujrI1JMUJd3OY7n97ua46douOGpkdlDoUDeG7g1NS/u/5a0Og9scCsB+ysWXSoMuyFftWJvM0E31SBjmWPznHPjy+8NjdhYfeMmJl3EiNSRgCi/25fpGu4M671zjlrm685s2fEnUoQ5lrLLW8uPLj3oX9hqgxIw8n8X1LU7yMkItCHzREZrGQV6ONmy5TggHk247sL/1jFqof/hRn/AWfqC0pI+QHBIk3tICXRrFTpF8hlJaqefh6yFxQ6HwQYlK8HAKyt3WsWxl7fAAAAAElFTkSuQmCC');\\n bottom:10px;\\n right:15px;\\n}\\ndiv.vis-network div.vis-navigation div.vis-button.vis-zoomOut {\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAABV5JREFUeNq0l2tQVVUYht/3W/vACMr16IFRQDiAgChpgiikMqY1WjnN9KsfGOXYTOVgkvbDUsZuXrK0qZmGUSvNspjI8TZOmo6AGBoZYly8YB6Qw80DBwQ6jJ3dj30OZZmiwvtv77XW96y91l7v9y1iMNLBuCI84tZkIXU9gwqxAILdokNBOtzgJQWWuYEDFxfcLAGh3y0k79iaD4mfjOVu4WYhoItngBiR6RkuFJAyEJBA3m/lri3Ih/uewXFFyAG4A8oAWkcm2meEzrFNH53Vkhg4xWnxCXcBQGu/3bfGeTbwjKPUcsZRElnfUxcuFLh1Nwh5vurx7s8GDbZ+L+tI/U0hkGGZX5c9/pXqOZYn2gazK8Vth0fvsRUknbx+bIJQQPCts/Mda+4KthbJFoqeKwSejX6pfO2kjytxH1pfuyqlsGH7dJAgZWvFo23L/9muboF+JxtE0/OEwMqJG46uSHinFvepTPO8lhGaX+fPHSdjCKaPy/b3v7az58h/wHFFyIHCRirgjUlbfsiJWXEFD6iUoOkdQaaQ6z9dP2YVahljF4+yXdvZ/evf4G+hQk2sEAUsti4vWxa35gKGSBMDp3T23OxxVXdXRijKovSFzrerC6ELAMT6IhcCZIyeX7c68YPzGGLlxq89PyM0q5YU2M1RuQAg0EERbiaA7Ohl1RgmPTM2p1qjBk1Mm6GDErsfswAgLiDZPmfMwrbhAqeHzm6P8Z9gV9SQdTx2lpCyAEKkhc62YZiVEjTdRgo0zXeBRnImAaSFzm7xdjjtOBGyvmZVZkNvfZjXDhU14+BToFEDKRAQpAJ0HRTjP6XHpYUKEX7RzS9bV5c+FJTmAICUgNSWQ/ZCgJwhIOJIQVLgFKcXvKHm9cyGvithFDUAFQqECho1CBUIggYapAJ1QEFBExNMYoISDU1/NIR9cvndTG/c2IBkp2fC8ZpQgknBGI/3AsDvvRfDlJhwem5zwYMs7VNlaUtbXE1h3mezj9mlGSsXrBkzkFsGKGoDmedBJLfLjxQQgAYdHRSxtPfbfceNsPYBQPTI+GZbT31YxrGIpYoKpIKigkAgFOggNBrbQBBCBaEM2L+iGGmTgnF+Uc1epqO/3VejAoAOUZSLQkFN17lAb4eVCe+VRvvHN4sH6t1feqAmMUGoPHvvhdLzTjzfKoj0sza/GLOy1Bu3vqc20Pgl5YIGkVOEZFZ0nLLMszzdDADTgjIdX6Uf3zfUx6m6u8riKRhOCcmDAqLCURo53Oe4rrsyUlGD0nlIqubdKNZJXOm9FH6y7Yh5uKBnO8vNTX2N4YoKE2fMLREQOsE8AfFN4/ak4QIfbd2XJFRQkLx85ruN7NTp2AoAZxwlCR9dWJc81NDdtoLkc86KBIJwXQ3aOpCPqwuhR2SPbCBlUc2NyogQX3N7wqgU51BAf2w9EFXUtCtLqADqS76ev6/ilgrk2q6esxHZgf5CySh3FMcG+5jbE0ZNdj4odHdDwWPGcZNNO1MPbrxtzdW4s+tI5HPBwQTTzziKY3v/7HGlhmS23g90T+OO5L1Nu7MMw3Fv/Tx1f97/FnsAYPui8/D4nBB/oZZR230uoq67auQoLaB37Iio3sEAK52nR39p+zS13HFiilHeYtOOabdC71jQzz2R+ALBbcrjWNF+cfaUwLSrk4KmtsT4T+gK9jG7AKKjv93X1lcfUNNVaantropqddnDCcIoa7lk29S92+/5CpOvQ04VJ79KUe/7iI/Hh40U6c3PyuPjhmWKN8G8Fvnw1A/zmX/vV5h/T+CXstRMUp4kOFOjZiUlWBkFQYdALitRZXRzf3RqWumdgF79NQDBOa2V/iYSHAAAAABJRU5ErkJggg==');\\n bottom:10px;\\n right:55px;\\n}\\ndiv.vis-network div.vis-navigation div.vis-button.vis-zoomExtends {\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAABptJREFUeNqsl21QlNcVx///cx9hIipuAJHasgHlRdw0xay7yK7smg6sb2DSdtqZduLUNENmOk1tQuM4U7UzTvshSRlFZzoNCWSSSTJp+6VNkLCAeQHBoCCgqNBE0wUqL+KuwIiiZZ9+eHa3aAS3Sf8zO8/L3nt+95x7z7n3YWlpKUQEJAEgch9+Jola9xEC2ADBVgAOKqwCYAqKDgUJBIHPBWwFWQNdbyZFBwAC0GGIAHQSj3/8HHRdhzYbdDfwg4IjAsGvICgXAroYBiCEDkBBACBZoyST4gDwQqh7mQ4cEkhQD0EBIIggRMQAh2EiEvEYAGrdR3YSqIYCIEDaotVDeYnu/ryEjSOr43PHl8WmTBPA6PRQ7IWJrvhT/ubkU/7m1EvX+1KEUh7Ug+WkPEXgdUSkR+xrd0NJ4qjr8AEI9pGAI7mo78mHfnF+Y/K2K7iHUheuvJG6cOUNz/LvDwPobrpSl/Ruf2VOy9UPs4RSTSANwH4Y449EVdnt9ojHIeghCHYLgR+n/7zt4Np32tIWZU4hSpnjVk1t/caPfOO3/f++MNH5TVJcisoEoo4ksgbsXwYfdR1+kQplQuCFNS82Pp/9+158RTkTC0ce0OKutQeOp5PME0qcUBqyBmwGOC8vz4AWVOyE4CUqYO/Dh+p3pj//Bb6mHllqCyxd8ODVT69+uFKoOYTSnzFg7SJpzHFNQYWiQrUIsCN9V+uOh375zz179pSGI1FSUuK12+2+aGDt7e3muro6T/h57969lZdvDrT+ZbA6n0B1nfPVN7e0PjMjIgIIdkEAR1JR329yDvaE0+l/hQKA1Wr1bd682SsikUW7K+O3PesTNvaSAiXaLhGBvO86RFEoJ4Adac+eDxsgiZKSEm9NTY3n5MmT5mjBHR0d5vr6es+mTZu8SqnI+x+s+Ol5jRo0auX1jtepQaEAADKWWIbcy7ZGUmb79u1eu93uI+mtra31HLj5TGDs9rBJICCNn1GRCKGCUJAUuzzw6CfbTB6Px7t27VofAG/YXl6Ceyw9LmvIN3UxZUafKRACWyCELcHVP3vk4fDabDZf+2N/D9g+fsLEEFSooFGDogZNFkBRgSCsTcWm066jgRAU4et/F5u9nxRosmCLRmE+QdgSXCNzhW/s9rDJ63wVJx77V+V8YS6UNaW8BdOcqzx+3Ujt0F8Bcr1GMIMU5CzJHZ+rg6IGCYV2PimoyIK6lzIWrxkPTVGmRoqJFCyLTZmeq4MB5f3BVADnbpcQkzStUQMAk0YKBPfzxlhA95NQQe43QBotBECAFFyZHo6dz6CKCizAPFPivzUWqxm2AqIgnwkFvZNn4uczGK3Hah7wpet98UZ85R8aKScIcXYEWpMLkx8fvleHpNjlAWtTsakQa0pVKGcJQqMGUqCHBvfdjp/gTP6xwFzg85PdyaH2J4SUowKiw3889e4KBACnT582W5uKTV2uusAdUFlgzBcFQoFGDT35HwW+82mhqaenxwwA4WtYfRNnUkMZUqsJpEkn8cXU5yktYw2JjsTCMQDwer0ekt6GhgZPUVGRd3fu7qjqdU9Mj7mlpcVD0tvS0uKxWCyVANB5rS3x8s3BFEUFgTTLtuZndQHLBMSfB6pyZtfqMDQ3NzfqTcJisficTqc3BI+8bxh9L8corarM3fnDoIT+rACAU/7m7MOfHbCEwQDQ2Njo6erqinqTOHfuXNjjiI23+ystZ8c7smmkWgVJcN++fRARfLDhlacEUqVEQ1nm77xPrHjSh/+Djo3WmN/s/6OHEOgIPr2h63tVuq5Dud1ukETWoK3zorkzTiiONn/TKlNM4lj24m+Pf13o2wOVHqGA5MsAXjKPrDaqnMvlQnjTzhy0Nlw0d5oI5p3yN62amrk+ve5B5+hXgb47WGX52+V3NgoFOvQKAGUkkTqcbZy5XC7XHYf4zEFr3aXU7jih5uidPPOtvsmzixZr8VMrHjBHddLsHj+Z9Fb/n9a1+T/JDaXey0IpEzEKkHnU8Jj79++PeEwSSimQRGP+Gz8j5DVFBVKQtjBj6JGlNt/D8Y+OpMdlTphiEqcB4tqtsVjfjUtLLkx0J/dOnjWPTg+lEARIEHwaQJVQIYggACC/qxi6rn8ZHL4XETSsf0MU1HOk/CFGYgAwskUqY5eBitRxzn7/a0V1EEBwdqkN6jPI7y4xPmHmC5unbWdQRMqP2d86qANOksU6gvmArNQRNClqABnQgYuK0krI+wCOAyH3DK/vqOXhaf3PAO7mIRjDNV25AAAAAElFTkSuQmCC');\\n bottom:50px;\\n right:15px;\\n}\\n\";\nstyleInject(css_248z$1);\n\n/**\n * Navigation Handler\n */\n\nvar NavigationHandler = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n function NavigationHandler(body, canvas) {\n var _this = this;\n\n classCallCheck(this, NavigationHandler);\n\n this.body = body;\n this.canvas = canvas;\n this.iconsCreated = false;\n this.navigationHammers = [];\n this.boundFunctions = {};\n this.touchTime = 0;\n this.activated = false;\n this.body.emitter.on(\"activate\", function () {\n _this.activated = true;\n\n _this.configureKeyboardBindings();\n });\n this.body.emitter.on(\"deactivate\", function () {\n _this.activated = false;\n\n _this.configureKeyboardBindings();\n });\n this.body.emitter.on(\"destroy\", function () {\n if (_this.keycharm !== undefined) {\n _this.keycharm.destroy();\n }\n });\n this.options = {};\n }\n /**\n *\n * @param {Object} options\n */\n\n\n createClass(NavigationHandler, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options !== undefined) {\n this.options = options;\n this.create();\n }\n }\n /**\n * Creates or refreshes navigation and sets key bindings\n */\n\n }, {\n key: \"create\",\n value: function create() {\n if (this.options.navigationButtons === true) {\n if (this.iconsCreated === false) {\n this.loadNavigationElements();\n }\n } else if (this.iconsCreated === true) {\n this.cleanNavigation();\n }\n\n this.configureKeyboardBindings();\n }\n /**\n * Cleans up previous navigation items\n */\n\n }, {\n key: \"cleanNavigation\",\n value: function cleanNavigation() {\n // clean hammer bindings\n if (this.navigationHammers.length != 0) {\n for (var i = 0; i < this.navigationHammers.length; i++) {\n this.navigationHammers[i].destroy();\n }\n\n this.navigationHammers = [];\n } // clean up previous navigation items\n\n\n if (this.navigationDOM && this.navigationDOM['wrapper'] && this.navigationDOM['wrapper'].parentNode) {\n this.navigationDOM['wrapper'].parentNode.removeChild(this.navigationDOM['wrapper']);\n }\n\n this.iconsCreated = false;\n }\n /**\n * Creation of the navigation controls nodes. They are drawn over the rest of the nodes and are not affected by scale and translation\n * they have a triggerFunction which is called on click. If the position of the navigation controls is dependent\n * on this.frame.canvas.clientWidth or this.frame.canvas.clientHeight, we flag horizontalAlignLeft and verticalAlignTop false.\n * This means that the location will be corrected by the _relocateNavigation function on a size change of the canvas.\n *\n * @private\n */\n\n }, {\n key: \"loadNavigationElements\",\n value: function loadNavigationElements() {\n var _this2 = this;\n\n this.cleanNavigation();\n this.navigationDOM = {};\n var navigationDivs = ['up', 'down', 'left', 'right', 'zoomIn', 'zoomOut', 'zoomExtends'];\n var navigationDivActions = ['_moveUp', '_moveDown', '_moveLeft', '_moveRight', '_zoomIn', '_zoomOut', '_fit'];\n this.navigationDOM['wrapper'] = document.createElement('div');\n this.navigationDOM['wrapper'].className = 'vis-navigation';\n this.canvas.frame.appendChild(this.navigationDOM['wrapper']);\n\n for (var i = 0; i < navigationDivs.length; i++) {\n this.navigationDOM[navigationDivs[i]] = document.createElement('div');\n this.navigationDOM[navigationDivs[i]].className = 'vis-button vis-' + navigationDivs[i];\n this.navigationDOM['wrapper'].appendChild(this.navigationDOM[navigationDivs[i]]);\n var hammer$1 = new hammer(this.navigationDOM[navigationDivs[i]]);\n\n if (navigationDivActions[i] === \"_fit\") {\n var _context;\n\n onTouch(hammer$1, bind$2(_context = this._fit).call(_context, this));\n } else {\n var _context2;\n\n onTouch(hammer$1, bind$2(_context2 = this.bindToRedraw).call(_context2, this, navigationDivActions[i]));\n }\n\n this.navigationHammers.push(hammer$1);\n } // use a hammer for the release so we do not require the one used in the rest of the network\n // the one the rest uses can be overloaded by the manipulation system.\n\n\n var hammerFrame = new hammer(this.canvas.frame);\n onRelease(hammerFrame, function () {\n _this2._stopMovement();\n });\n this.navigationHammers.push(hammerFrame);\n this.iconsCreated = true;\n }\n /**\n *\n * @param {string} action\n */\n\n }, {\n key: \"bindToRedraw\",\n value: function bindToRedraw(action) {\n if (this.boundFunctions[action] === undefined) {\n var _context3;\n\n this.boundFunctions[action] = bind$2(_context3 = this[action]).call(_context3, this);\n this.body.emitter.on(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n /**\n *\n * @param {string} action\n */\n\n }, {\n key: \"unbindFromRedraw\",\n value: function unbindFromRedraw(action) {\n if (this.boundFunctions[action] !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_stopRendering\");\n delete this.boundFunctions[action];\n }\n }\n /**\n * this stops all movement induced by the navigation buttons\n *\n * @private\n */\n\n }, {\n key: \"_fit\",\n value: function _fit() {\n if (new Date().valueOf() - this.touchTime > 700) {\n // TODO: fix ugly hack to avoid hammer's double fireing of event (because we use release?)\n this.body.emitter.emit(\"fit\", {\n duration: 700\n });\n this.touchTime = new Date().valueOf();\n }\n }\n /**\n * this stops all movement induced by the navigation buttons\n *\n * @private\n */\n\n }, {\n key: \"_stopMovement\",\n value: function _stopMovement() {\n for (var boundAction in this.boundFunctions) {\n if (Object.prototype.hasOwnProperty.call(this.boundFunctions, boundAction)) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[boundAction]);\n this.body.emitter.emit(\"_stopRendering\");\n }\n }\n\n this.boundFunctions = {};\n }\n /**\n *\n * @private\n */\n\n }, {\n key: \"_moveUp\",\n value: function _moveUp() {\n this.body.view.translation.y += this.options.keyboard.speed.y;\n }\n /**\n *\n * @private\n */\n\n }, {\n key: \"_moveDown\",\n value: function _moveDown() {\n this.body.view.translation.y -= this.options.keyboard.speed.y;\n }\n /**\n *\n * @private\n */\n\n }, {\n key: \"_moveLeft\",\n value: function _moveLeft() {\n this.body.view.translation.x += this.options.keyboard.speed.x;\n }\n /**\n *\n * @private\n */\n\n }, {\n key: \"_moveRight\",\n value: function _moveRight() {\n this.body.view.translation.x -= this.options.keyboard.speed.x;\n }\n /**\n *\n * @private\n */\n\n }, {\n key: \"_zoomIn\",\n value: function _zoomIn() {\n var scaleOld = this.body.view.scale;\n var scale = this.body.view.scale * (1 + this.options.keyboard.speed.zoom);\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n this.body.view.scale = scale;\n this.body.view.translation = {\n x: tx,\n y: ty\n };\n this.body.emitter.emit('zoom', {\n direction: '+',\n scale: this.body.view.scale,\n pointer: null\n });\n }\n /**\n *\n * @private\n */\n\n }, {\n key: \"_zoomOut\",\n value: function _zoomOut() {\n var scaleOld = this.body.view.scale;\n var scale = this.body.view.scale / (1 + this.options.keyboard.speed.zoom);\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n this.body.view.scale = scale;\n this.body.view.translation = {\n x: tx,\n y: ty\n };\n this.body.emitter.emit('zoom', {\n direction: '-',\n scale: this.body.view.scale,\n pointer: null\n });\n }\n /**\n * bind all keys using keycharm.\n */\n\n }, {\n key: \"configureKeyboardBindings\",\n value: function configureKeyboardBindings() {\n var _this3 = this;\n\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n\n if (this.options.keyboard.enabled === true) {\n if (this.options.keyboard.bindToWindow === true) {\n this.keycharm = keycharm({\n container: window,\n preventDefault: true\n });\n } else {\n this.keycharm = keycharm({\n container: this.canvas.frame,\n preventDefault: true\n });\n }\n\n this.keycharm.reset();\n\n if (this.activated === true) {\n var _context4, _context5, _context6, _context7, _context8, _context9, _context10, _context11, _context12, _context13, _context14, _context15, _context16, _context17, _context18, _context19, _context20, _context21, _context22, _context23, _context24, _context25, _context26, _context27;\n\n bind$2(_context4 = this.keycharm).call(_context4, \"up\", function () {\n _this3.bindToRedraw(\"_moveUp\");\n }, \"keydown\");\n\n bind$2(_context5 = this.keycharm).call(_context5, \"down\", function () {\n _this3.bindToRedraw(\"_moveDown\");\n }, \"keydown\");\n\n bind$2(_context6 = this.keycharm).call(_context6, \"left\", function () {\n _this3.bindToRedraw(\"_moveLeft\");\n }, \"keydown\");\n\n bind$2(_context7 = this.keycharm).call(_context7, \"right\", function () {\n _this3.bindToRedraw(\"_moveRight\");\n }, \"keydown\");\n\n bind$2(_context8 = this.keycharm).call(_context8, \"=\", function () {\n _this3.bindToRedraw(\"_zoomIn\");\n }, \"keydown\");\n\n bind$2(_context9 = this.keycharm).call(_context9, \"num+\", function () {\n _this3.bindToRedraw(\"_zoomIn\");\n }, \"keydown\");\n\n bind$2(_context10 = this.keycharm).call(_context10, \"num-\", function () {\n _this3.bindToRedraw(\"_zoomOut\");\n }, \"keydown\");\n\n bind$2(_context11 = this.keycharm).call(_context11, \"-\", function () {\n _this3.bindToRedraw(\"_zoomOut\");\n }, \"keydown\");\n\n bind$2(_context12 = this.keycharm).call(_context12, \"[\", function () {\n _this3.bindToRedraw(\"_zoomOut\");\n }, \"keydown\");\n\n bind$2(_context13 = this.keycharm).call(_context13, \"]\", function () {\n _this3.bindToRedraw(\"_zoomIn\");\n }, \"keydown\");\n\n bind$2(_context14 = this.keycharm).call(_context14, \"pageup\", function () {\n _this3.bindToRedraw(\"_zoomIn\");\n }, \"keydown\");\n\n bind$2(_context15 = this.keycharm).call(_context15, \"pagedown\", function () {\n _this3.bindToRedraw(\"_zoomOut\");\n }, \"keydown\");\n\n bind$2(_context16 = this.keycharm).call(_context16, \"up\", function () {\n _this3.unbindFromRedraw(\"_moveUp\");\n }, \"keyup\");\n\n bind$2(_context17 = this.keycharm).call(_context17, \"down\", function () {\n _this3.unbindFromRedraw(\"_moveDown\");\n }, \"keyup\");\n\n bind$2(_context18 = this.keycharm).call(_context18, \"left\", function () {\n _this3.unbindFromRedraw(\"_moveLeft\");\n }, \"keyup\");\n\n bind$2(_context19 = this.keycharm).call(_context19, \"right\", function () {\n _this3.unbindFromRedraw(\"_moveRight\");\n }, \"keyup\");\n\n bind$2(_context20 = this.keycharm).call(_context20, \"=\", function () {\n _this3.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\");\n\n bind$2(_context21 = this.keycharm).call(_context21, \"num+\", function () {\n _this3.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\");\n\n bind$2(_context22 = this.keycharm).call(_context22, \"num-\", function () {\n _this3.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\");\n\n bind$2(_context23 = this.keycharm).call(_context23, \"-\", function () {\n _this3.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\");\n\n bind$2(_context24 = this.keycharm).call(_context24, \"[\", function () {\n _this3.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\");\n\n bind$2(_context25 = this.keycharm).call(_context25, \"]\", function () {\n _this3.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\");\n\n bind$2(_context26 = this.keycharm).call(_context26, \"pageup\", function () {\n _this3.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\");\n\n bind$2(_context27 = this.keycharm).call(_context27, \"pagedown\", function () {\n _this3.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\");\n }\n }\n }\n }]);\n\n return NavigationHandler;\n}();\n\nvar css_248z$2 = \"div.vis-tooltip {\\n position: absolute;\\n visibility: hidden;\\n padding: 5px;\\n white-space: nowrap;\\n\\n font-family: verdana;\\n font-size:14px;\\n color:#000000;\\n background-color: #f5f4ed;\\n\\n -moz-border-radius: 3px;\\n -webkit-border-radius: 3px;\\n border-radius: 3px;\\n border: 1px solid #808074;\\n\\n box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);\\n pointer-events: none;\\n\\n z-index: 5;\\n}\\n\";\nstyleInject(css_248z$2);\n\n/**\n * Popup is a class to create a popup window with some text\n */\n\nvar Popup = /*#__PURE__*/function () {\n /**\n * @param {Element} container The container object.\n * @param {string} overflowMethod How the popup should act to overflowing ('flip' or 'cap')\n */\n function Popup(container, overflowMethod) {\n classCallCheck(this, Popup);\n\n this.container = container;\n this.overflowMethod = overflowMethod || 'cap';\n this.x = 0;\n this.y = 0;\n this.padding = 5;\n this.hidden = false; // create the frame\n\n this.frame = document.createElement('div');\n this.frame.className = 'vis-tooltip';\n this.container.appendChild(this.frame);\n }\n /**\n * @param {number} x Horizontal position of the popup window\n * @param {number} y Vertical position of the popup window\n */\n\n\n createClass(Popup, [{\n key: \"setPosition\",\n value: function setPosition(x, y) {\n this.x = _parseInt$2(x);\n this.y = _parseInt$2(y);\n }\n /**\n * Set the content for the popup window. This can be HTML code or text.\n * @param {string | Element} content\n */\n\n }, {\n key: \"setText\",\n value: function setText(content) {\n if (content instanceof Element) {\n this.frame.innerHTML = '';\n this.frame.appendChild(content);\n } else {\n this.frame.innerHTML = content; // string containing text or HTML\n }\n }\n /**\n * Show the popup window\n * @param {boolean} [doShow] Show or hide the window\n */\n\n }, {\n key: \"show\",\n value: function show(doShow) {\n if (doShow === undefined) {\n doShow = true;\n }\n\n if (doShow === true) {\n var height = this.frame.clientHeight;\n var width = this.frame.clientWidth;\n var maxHeight = this.frame.parentNode.clientHeight;\n var maxWidth = this.frame.parentNode.clientWidth;\n var left = 0,\n top = 0;\n\n if (this.overflowMethod == 'flip') {\n var isLeft = false,\n isTop = true; // Where around the position it's located\n\n if (this.y - height < this.padding) {\n isTop = false;\n }\n\n if (this.x + width > maxWidth - this.padding) {\n isLeft = true;\n }\n\n if (isLeft) {\n left = this.x - width;\n } else {\n left = this.x;\n }\n\n if (isTop) {\n top = this.y - height;\n } else {\n top = this.y;\n }\n } else {\n top = this.y - height;\n\n if (top + height + this.padding > maxHeight) {\n top = maxHeight - height - this.padding;\n }\n\n if (top < this.padding) {\n top = this.padding;\n }\n\n left = this.x;\n\n if (left + width + this.padding > maxWidth) {\n left = maxWidth - width - this.padding;\n }\n\n if (left < this.padding) {\n left = this.padding;\n }\n }\n\n this.frame.style.left = left + \"px\";\n this.frame.style.top = top + \"px\";\n this.frame.style.visibility = \"visible\";\n this.hidden = false;\n } else {\n this.hide();\n }\n }\n /**\n * Hide the popup window\n */\n\n }, {\n key: \"hide\",\n value: function hide() {\n this.hidden = true;\n this.frame.style.left = \"0\";\n this.frame.style.top = \"0\";\n this.frame.style.visibility = \"hidden\";\n }\n /**\n * Remove the popup window\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.frame.parentNode.removeChild(this.frame); // Remove element from DOM\n }\n }]);\n\n return Popup;\n}();\n\n/**\n * Handler for interactions\n */\n\nvar InteractionHandler = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n * @param {SelectionHandler} selectionHandler\n */\n function InteractionHandler(body, canvas, selectionHandler) {\n var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10, _context11, _context12, _context13;\n\n classCallCheck(this, InteractionHandler);\n\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n this.navigationHandler = new NavigationHandler(body, canvas); // bind the events from hammer to functions in this object\n\n this.body.eventListeners.onTap = bind$2(_context = this.onTap).call(_context, this);\n this.body.eventListeners.onTouch = bind$2(_context2 = this.onTouch).call(_context2, this);\n this.body.eventListeners.onDoubleTap = bind$2(_context3 = this.onDoubleTap).call(_context3, this);\n this.body.eventListeners.onHold = bind$2(_context4 = this.onHold).call(_context4, this);\n this.body.eventListeners.onDragStart = bind$2(_context5 = this.onDragStart).call(_context5, this);\n this.body.eventListeners.onDrag = bind$2(_context6 = this.onDrag).call(_context6, this);\n this.body.eventListeners.onDragEnd = bind$2(_context7 = this.onDragEnd).call(_context7, this);\n this.body.eventListeners.onMouseWheel = bind$2(_context8 = this.onMouseWheel).call(_context8, this);\n this.body.eventListeners.onPinch = bind$2(_context9 = this.onPinch).call(_context9, this);\n this.body.eventListeners.onMouseMove = bind$2(_context10 = this.onMouseMove).call(_context10, this);\n this.body.eventListeners.onRelease = bind$2(_context11 = this.onRelease).call(_context11, this);\n this.body.eventListeners.onContext = bind$2(_context12 = this.onContext).call(_context12, this);\n this.touchTime = 0;\n this.drag = {};\n this.pinch = {};\n this.popup = undefined;\n this.popupObj = undefined;\n this.popupTimer = undefined;\n this.body.functions.getPointer = bind$2(_context13 = this.getPointer).call(_context13, this);\n this.options = {};\n this.defaultOptions = {\n dragNodes: true,\n dragView: true,\n hover: false,\n keyboard: {\n enabled: false,\n speed: {\n x: 10,\n y: 10,\n zoom: 0.02\n },\n bindToWindow: true\n },\n navigationButtons: false,\n tooltipDelay: 300,\n zoomView: true,\n zoomSpeed: 1\n };\n\n assign$2(this.options, this.defaultOptions);\n\n this.bindEventListeners();\n }\n /**\n * Binds event listeners\n */\n\n\n createClass(InteractionHandler, [{\n key: \"bindEventListeners\",\n value: function bindEventListeners() {\n var _this = this;\n\n this.body.emitter.on('destroy', function () {\n clearTimeout(_this.popupTimer);\n delete _this.body.functions.getPointer;\n });\n }\n /**\n *\n * @param {Object} options\n */\n\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options !== undefined) {\n // extend all but the values in fields\n var fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag', 'keyboard', 'multiselect', 'selectable', 'selectConnectedEdges'];\n selectiveNotDeepExtend(fields, this.options, options); // merge the keyboard options in.\n\n mergeOptions(this.options, options, 'keyboard');\n\n if (options.tooltip) {\n assign$2(this.options.tooltip, options.tooltip);\n\n if (options.tooltip.color) {\n this.options.tooltip.color = parseColor(options.tooltip.color);\n }\n }\n }\n\n this.navigationHandler.setOptions(this.options);\n }\n /**\n * Get the pointer location from a touch location\n * @param {{x: number, y: number}} touch\n * @return {{x: number, y: number}} pointer\n * @private\n */\n\n }, {\n key: \"getPointer\",\n value: function getPointer(touch) {\n return {\n x: touch.x - getAbsoluteLeft(this.canvas.frame.canvas),\n y: touch.y - getAbsoluteTop(this.canvas.frame.canvas)\n };\n }\n /**\n * On start of a touch gesture, store the pointer\n * @param {Event} event The event\n * @private\n */\n\n }, {\n key: \"onTouch\",\n value: function onTouch(event) {\n if (new Date().valueOf() - this.touchTime > 50) {\n this.drag.pointer = this.getPointer(event.center);\n this.drag.pinched = false;\n this.pinch.scale = this.body.view.scale; // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n\n this.touchTime = new Date().valueOf();\n }\n }\n /**\n * handle tap/click event: select/unselect a node\n * @param {Event} event\n * @private\n */\n\n }, {\n key: \"onTap\",\n value: function onTap(event) {\n var pointer = this.getPointer(event.center);\n var multiselect = this.selectionHandler.options.multiselect && (event.changedPointers[0].ctrlKey || event.changedPointers[0].metaKey);\n this.checkSelectionChanges(pointer, event, multiselect);\n\n this.selectionHandler._generateClickEvent('click', event, pointer);\n }\n /**\n * handle doubletap event\n * @param {Event} event\n * @private\n */\n\n }, {\n key: \"onDoubleTap\",\n value: function onDoubleTap(event) {\n var pointer = this.getPointer(event.center);\n\n this.selectionHandler._generateClickEvent('doubleClick', event, pointer);\n }\n /**\n * handle long tap event: multi select nodes\n * @param {Event} event\n * @private\n */\n\n }, {\n key: \"onHold\",\n value: function onHold(event) {\n var pointer = this.getPointer(event.center);\n var multiselect = this.selectionHandler.options.multiselect;\n this.checkSelectionChanges(pointer, event, multiselect);\n\n this.selectionHandler._generateClickEvent('click', event, pointer);\n\n this.selectionHandler._generateClickEvent('hold', event, pointer);\n }\n /**\n * handle the release of the screen\n *\n * @param {Event} event\n * @private\n */\n\n }, {\n key: \"onRelease\",\n value: function onRelease(event) {\n if (new Date().valueOf() - this.touchTime > 10) {\n var pointer = this.getPointer(event.center);\n\n this.selectionHandler._generateClickEvent('release', event, pointer); // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n\n\n this.touchTime = new Date().valueOf();\n }\n }\n /**\n *\n * @param {Event} event\n */\n\n }, {\n key: \"onContext\",\n value: function onContext(event) {\n var pointer = this.getPointer({\n x: event.clientX,\n y: event.clientY\n });\n\n this.selectionHandler._generateClickEvent('oncontext', event, pointer);\n }\n /**\n * Select and deselect nodes depending current selection change.\n *\n * For changing nodes, select/deselect events are fired.\n *\n * NOTE: For a given edge, if one connecting node is deselected and with the same\n * click the other node is selected, no events for the edge will fire.\n * It was selected and it will remain selected.\n *\n * TODO: This is all SelectionHandler calls; the method should be moved to there.\n *\n * @param {{x: number, y: number}} pointer\n * @param {Event} event\n * @param {boolean} [add=false]\n */\n\n }, {\n key: \"checkSelectionChanges\",\n value: function checkSelectionChanges(pointer, event) {\n var add = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var previousSelection = this.selectionHandler.getSelection();\n var selected = false;\n\n if (add === true) {\n selected = this.selectionHandler.selectAdditionalOnPoint(pointer);\n } else {\n selected = this.selectionHandler.selectOnPoint(pointer);\n }\n\n var currentSelection = this.selectionHandler.getSelection(); // See NOTE in method comment for the reason to do it like this\n\n var deselectedItems = this._determineDifference(previousSelection, currentSelection);\n\n var selectedItems = this._determineDifference(currentSelection, previousSelection);\n\n if (deselectedItems.edges.length > 0) {\n this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection);\n\n selected = true;\n }\n\n if (deselectedItems.nodes.length > 0) {\n this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection);\n\n selected = true;\n }\n\n if (selectedItems.nodes.length > 0) {\n this.selectionHandler._generateClickEvent('selectNode', event, pointer);\n\n selected = true;\n }\n\n if (selectedItems.edges.length > 0) {\n this.selectionHandler._generateClickEvent('selectEdge', event, pointer);\n\n selected = true;\n } // fire the select event if anything has been selected or deselected\n\n\n if (selected === true) {\n // select or unselect\n this.selectionHandler._generateClickEvent('select', event, pointer);\n }\n }\n /**\n * Remove all node and edge id's from the first set that are present in the second one.\n *\n * @param {{nodes: Array., edges: Array.}} firstSet\n * @param {{nodes: Array., edges: Array.}} secondSet\n * @returns {{nodes: Array., edges: Array.}}\n * @private\n */\n\n }, {\n key: \"_determineDifference\",\n value: function _determineDifference(firstSet, secondSet) {\n var arrayDiff = function arrayDiff(firstArr, secondArr) {\n var result = [];\n\n for (var i = 0; i < firstArr.length; i++) {\n var value = firstArr[i];\n\n if (indexOf$3(secondArr).call(secondArr, value) === -1) {\n result.push(value);\n }\n }\n\n return result;\n };\n\n return {\n nodes: arrayDiff(firstSet.nodes, secondSet.nodes),\n edges: arrayDiff(firstSet.edges, secondSet.edges)\n };\n }\n /**\n * This function is called by onDragStart.\n * It is separated out because we can then overload it for the datamanipulation system.\n *\n * @param {Event} event\n * @private\n */\n\n }, {\n key: \"onDragStart\",\n value: function onDragStart(event) {\n // if already dragging, do not start\n // this can happen on touch screens with multiple fingers\n if (this.drag.dragging) {\n return;\n } //in case the touch event was triggered on an external div, do the initial touch now.\n\n\n if (this.drag.pointer === undefined) {\n this.onTouch(event);\n } // note: drag.pointer is set in onTouch to get the initial touch location\n\n\n var node = this.selectionHandler.getNodeAt(this.drag.pointer);\n this.drag.dragging = true;\n this.drag.selection = [];\n this.drag.translation = assign$2({}, this.body.view.translation); // copy the object\n\n this.drag.nodeId = undefined;\n\n if (event.srcEvent.shiftKey) {\n this.body.selectionBox.show = true;\n var pointer = this.getPointer(event.center);\n this.body.selectionBox.position.start = {\n x: this.canvas._XconvertDOMtoCanvas(pointer.x),\n y: this.canvas._YconvertDOMtoCanvas(pointer.y)\n };\n this.body.selectionBox.position.end = {\n x: this.canvas._XconvertDOMtoCanvas(pointer.x),\n y: this.canvas._YconvertDOMtoCanvas(pointer.y)\n };\n }\n\n if (node !== undefined && this.options.dragNodes === true) {\n this.drag.nodeId = node.id; // select the clicked node if not yet selected\n\n if (node.isSelected() === false) {\n this.selectionHandler.unselectAll();\n this.selectionHandler.selectObject(node);\n } // after select to contain the node\n\n\n this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer);\n\n var selection = this.selectionHandler.selectionObj.nodes; // create an array with the selected nodes and their original location and status\n\n for (var nodeId in selection) {\n if (Object.prototype.hasOwnProperty.call(selection, nodeId)) {\n var object = selection[nodeId];\n var s = {\n id: object.id,\n node: object,\n // store original x, y, xFixed and yFixed, make the node temporarily Fixed\n x: object.x,\n y: object.y,\n xFixed: object.options.fixed.x,\n yFixed: object.options.fixed.y\n };\n object.options.fixed.x = true;\n object.options.fixed.y = true;\n this.drag.selection.push(s);\n }\n }\n } else {\n // fallback if no node is selected and thus the view is dragged.\n this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer, undefined, true);\n }\n }\n /**\n * handle drag event\n * @param {Event} event\n * @private\n */\n\n }, {\n key: \"onDrag\",\n value: function onDrag(event) {\n var _this2 = this;\n\n if (this.drag.pinched === true) {\n return;\n } // remove the focus on node if it is focussed on by the focusOnNode\n\n\n this.body.emitter.emit('unlockNode');\n var pointer = this.getPointer(event.center);\n var selection = this.drag.selection;\n\n if (selection && selection.length && this.options.dragNodes === true) {\n this.selectionHandler._generateClickEvent('dragging', event, pointer); // calculate delta's and new location\n\n\n var deltaX = pointer.x - this.drag.pointer.x;\n var deltaY = pointer.y - this.drag.pointer.y; // update position of all selected nodes\n\n forEach$2(selection).call(selection, function (selection) {\n var node = selection.node; // only move the node if it was not fixed initially\n\n if (selection.xFixed === false) {\n node.x = _this2.canvas._XconvertDOMtoCanvas(_this2.canvas._XconvertCanvasToDOM(selection.x) + deltaX);\n } // only move the node if it was not fixed initially\n\n\n if (selection.yFixed === false) {\n node.y = _this2.canvas._YconvertDOMtoCanvas(_this2.canvas._YconvertCanvasToDOM(selection.y) + deltaY);\n }\n }); // start the simulation of the physics\n\n\n this.body.emitter.emit('startSimulation');\n } else {\n // create selection box\n if (event.srcEvent.shiftKey) {\n this.selectionHandler._generateClickEvent('dragging', event, pointer, undefined, true); // if the drag was not started properly because the click started outside the network div, start it now.\n\n\n if (this.drag.pointer === undefined) {\n this.onDragStart(event);\n return;\n }\n\n this.body.selectionBox.position.end = {\n x: this.canvas._XconvertDOMtoCanvas(pointer.x),\n y: this.canvas._YconvertDOMtoCanvas(pointer.y)\n };\n this.body.emitter.emit('_requestRedraw');\n } // move the network\n\n\n if (this.options.dragView === true && !event.srcEvent.shiftKey) {\n this.selectionHandler._generateClickEvent('dragging', event, pointer, undefined, true); // if the drag was not started properly because the click started outside the network div, start it now.\n\n\n if (this.drag.pointer === undefined) {\n this.onDragStart(event);\n return;\n }\n\n var diffX = pointer.x - this.drag.pointer.x;\n var diffY = pointer.y - this.drag.pointer.y;\n this.body.view.translation = {\n x: this.drag.translation.x + diffX,\n y: this.drag.translation.y + diffY\n };\n this.body.emitter.emit('_requestRedraw');\n }\n }\n }\n /**\n * handle drag start event\n * @param {Event} event\n * @private\n */\n\n }, {\n key: \"onDragEnd\",\n value: function onDragEnd(event) {\n var _this3 = this;\n\n this.drag.dragging = false;\n\n if (this.body.selectionBox.show) {\n var _context14;\n\n this.body.selectionBox.show = false;\n var selectionBoxPosition = this.body.selectionBox.position;\n var selectionBoxPositionMinMax = {\n minX: Math.min(selectionBoxPosition.start.x, selectionBoxPosition.end.x),\n minY: Math.min(selectionBoxPosition.start.y, selectionBoxPosition.end.y),\n maxX: Math.max(selectionBoxPosition.start.x, selectionBoxPosition.end.x),\n maxY: Math.max(selectionBoxPosition.start.y, selectionBoxPosition.end.y)\n };\n\n var toBeSelectedNodes = filter$2(_context14 = this.body.nodeIndices).call(_context14, function (nodeId) {\n var node = _this3.body.nodes[nodeId];\n return node.x >= selectionBoxPositionMinMax.minX && node.x <= selectionBoxPositionMinMax.maxX && node.y >= selectionBoxPositionMinMax.minY && node.y <= selectionBoxPositionMinMax.maxY;\n });\n\n forEach$2(toBeSelectedNodes).call(toBeSelectedNodes, function (nodeId) {\n return _this3.selectionHandler.selectObject(_this3.body.nodes[nodeId]);\n });\n\n this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center), undefined, true);\n\n this.body.emitter.emit('_requestRedraw');\n } else {\n var selection = this.drag.selection;\n\n if (selection && selection.length) {\n forEach$2(selection).call(selection, function (s) {\n // restore original xFixed and yFixed\n s.node.options.fixed.x = s.xFixed;\n s.node.options.fixed.y = s.yFixed;\n });\n\n this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center));\n\n this.body.emitter.emit('startSimulation');\n } else {\n this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center), undefined, true);\n\n this.body.emitter.emit('_requestRedraw');\n }\n }\n }\n /**\n * Handle pinch event\n * @param {Event} event The event\n * @private\n */\n\n }, {\n key: \"onPinch\",\n value: function onPinch(event) {\n var pointer = this.getPointer(event.center);\n this.drag.pinched = true;\n\n if (this.pinch['scale'] === undefined) {\n this.pinch.scale = 1;\n } // TODO: enabled moving while pinching?\n\n\n var scale = this.pinch.scale * event.scale;\n this.zoom(scale, pointer);\n }\n /**\n * Zoom the network in or out\n * @param {number} scale a number around 1, and between 0.01 and 10\n * @param {{x: number, y: number}} pointer Position on screen\n * @private\n */\n\n }, {\n key: \"zoom\",\n value: function zoom(scale, pointer) {\n if (this.options.zoomView === true) {\n var scaleOld = this.body.view.scale;\n\n if (scale < 0.00001) {\n scale = 0.00001;\n }\n\n if (scale > 10) {\n scale = 10;\n }\n\n var preScaleDragPointer = undefined;\n\n if (this.drag !== undefined) {\n if (this.drag.dragging === true) {\n preScaleDragPointer = this.canvas.DOMtoCanvas(this.drag.pointer);\n }\n } // + this.canvas.frame.canvas.clientHeight / 2\n\n\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * pointer.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * pointer.y + translation.y * scaleFrac;\n this.body.view.scale = scale;\n this.body.view.translation = {\n x: tx,\n y: ty\n };\n\n if (preScaleDragPointer != undefined) {\n var postScaleDragPointer = this.canvas.canvasToDOM(preScaleDragPointer);\n this.drag.pointer.x = postScaleDragPointer.x;\n this.drag.pointer.y = postScaleDragPointer.y;\n }\n\n this.body.emitter.emit('_requestRedraw');\n\n if (scaleOld < scale) {\n this.body.emitter.emit('zoom', {\n direction: '+',\n scale: this.body.view.scale,\n pointer: pointer\n });\n } else {\n this.body.emitter.emit('zoom', {\n direction: '-',\n scale: this.body.view.scale,\n pointer: pointer\n });\n }\n }\n }\n /**\n * Event handler for mouse wheel event, used to zoom the timeline\n * See http://adomas.org/javascript-mouse-wheel/\n * https://github.com/EightMedia/hammer.js/issues/256\n * @param {MouseEvent} event\n * @private\n */\n\n }, {\n key: \"onMouseWheel\",\n value: function onMouseWheel(event) {\n if (this.options.zoomView === true) {\n // If delta is nonzero, handle it.\n // Basically, delta is now positive if wheel was scrolled up,\n // and negative, if wheel was scrolled down.\n if (event.deltaY !== 0) {\n // calculate the new scale\n var scale = this.body.view.scale;\n scale *= 1 + (event.deltaY < 0 ? 1 : -1) * (this.options.zoomSpeed * 0.1); // calculate the pointer location\n\n var pointer = this.getPointer({\n x: event.clientX,\n y: event.clientY\n }); // apply the new scale\n\n this.zoom(scale, pointer);\n } // Prevent default actions caused by mouse wheel.\n\n\n event.preventDefault();\n }\n }\n /**\n * Mouse move handler for checking whether the title moves over a node with a title.\n * @param {Event} event\n * @private\n */\n\n }, {\n key: \"onMouseMove\",\n value: function onMouseMove(event) {\n var _this4 = this;\n\n var pointer = this.getPointer({\n x: event.clientX,\n y: event.clientY\n });\n var popupVisible = false; // check if the previously selected node is still selected\n\n if (this.popup !== undefined) {\n if (this.popup.hidden === false) {\n this._checkHidePopup(pointer);\n } // if the popup was not hidden above\n\n\n if (this.popup.hidden === false) {\n popupVisible = true;\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.show();\n }\n } // if we bind the keyboard to the div, we have to highlight it to use it. This highlights it on mouse over.\n\n\n if (this.options.keyboard.bindToWindow === false && this.options.keyboard.enabled === true) {\n this.canvas.frame.focus();\n } // start a timeout that will check if the mouse is positioned above an element\n\n\n if (popupVisible === false) {\n if (this.popupTimer !== undefined) {\n clearInterval(this.popupTimer); // stop any running calculationTimer\n\n this.popupTimer = undefined;\n }\n\n if (!this.drag.dragging) {\n this.popupTimer = setTimeout$2(function () {\n return _this4._checkShowPopup(pointer);\n }, this.options.tooltipDelay);\n }\n } // adding hover highlights\n\n\n if (this.options.hover === true) {\n this.selectionHandler.hoverObject(event, pointer);\n }\n }\n /**\n * Check if there is an element on the given position in the network\n * (a node or edge). If so, and if this element has a title,\n * show a popup window with its title.\n *\n * @param {{x:number, y:number}} pointer\n * @private\n */\n\n }, {\n key: \"_checkShowPopup\",\n value: function _checkShowPopup(pointer) {\n var x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n\n var y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n\n var pointerObj = {\n left: x,\n top: y,\n right: x,\n bottom: y\n };\n var previousPopupObjId = this.popupObj === undefined ? undefined : this.popupObj.id;\n var nodeUnderCursor = false;\n var popupType = 'node'; // check if a node is under the cursor.\n\n if (this.popupObj === undefined) {\n // search the nodes for overlap, select the top one in case of multiple nodes\n var nodeIndices = this.body.nodeIndices;\n var nodes = this.body.nodes;\n var node;\n var overlappingNodes = [];\n\n for (var i = 0; i < nodeIndices.length; i++) {\n node = nodes[nodeIndices[i]];\n\n if (node.isOverlappingWith(pointerObj) === true) {\n nodeUnderCursor = true;\n\n if (node.getTitle() !== undefined) {\n overlappingNodes.push(nodeIndices[i]);\n }\n }\n }\n\n if (overlappingNodes.length > 0) {\n // if there are overlapping nodes, select the last one, this is the one which is drawn on top of the others\n this.popupObj = nodes[overlappingNodes[overlappingNodes.length - 1]]; // if you hover over a node, the title of the edge is not supposed to be shown.\n\n nodeUnderCursor = true;\n }\n }\n\n if (this.popupObj === undefined && nodeUnderCursor === false) {\n // search the edges for overlap\n var edgeIndices = this.body.edgeIndices;\n var edges = this.body.edges;\n var edge;\n var overlappingEdges = [];\n\n for (var _i = 0; _i < edgeIndices.length; _i++) {\n edge = edges[edgeIndices[_i]];\n\n if (edge.isOverlappingWith(pointerObj) === true) {\n if (edge.connected === true && edge.getTitle() !== undefined) {\n overlappingEdges.push(edgeIndices[_i]);\n }\n }\n }\n\n if (overlappingEdges.length > 0) {\n this.popupObj = edges[overlappingEdges[overlappingEdges.length - 1]];\n popupType = 'edge';\n }\n }\n\n if (this.popupObj !== undefined) {\n // show popup message window\n if (this.popupObj.id !== previousPopupObjId) {\n if (this.popup === undefined) {\n this.popup = new Popup(this.canvas.frame);\n }\n\n this.popup.popupTargetType = popupType;\n this.popup.popupTargetId = this.popupObj.id; // adjust a small offset such that the mouse cursor is located in the\n // bottom left location of the popup, and you can easily move over the\n // popup area\n\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.setText(this.popupObj.getTitle());\n this.popup.show();\n this.body.emitter.emit('showPopup', this.popupObj.id);\n }\n } else {\n if (this.popup !== undefined) {\n this.popup.hide();\n this.body.emitter.emit('hidePopup');\n }\n }\n }\n /**\n * Check if the popup must be hidden, which is the case when the mouse is no\n * longer hovering on the object\n * @param {{x:number, y:number}} pointer\n * @private\n */\n\n }, {\n key: \"_checkHidePopup\",\n value: function _checkHidePopup(pointer) {\n var pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n var stillOnObj = false;\n\n if (this.popup.popupTargetType === 'node') {\n if (this.body.nodes[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.nodes[this.popup.popupTargetId].isOverlappingWith(pointerObj); // if the mouse is still one the node, we have to check if it is not also on one that is drawn on top of it.\n // we initially only check stillOnObj because this is much faster.\n\n if (stillOnObj === true) {\n var overNode = this.selectionHandler.getNodeAt(pointer);\n stillOnObj = overNode === undefined ? false : overNode.id === this.popup.popupTargetId;\n }\n }\n } else {\n if (this.selectionHandler.getNodeAt(pointer) === undefined) {\n if (this.body.edges[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.edges[this.popup.popupTargetId].isOverlappingWith(pointerObj);\n }\n }\n }\n\n if (stillOnObj === false) {\n this.popupObj = undefined;\n this.popup.hide();\n this.body.emitter.emit('hidePopup');\n }\n }\n }]);\n\n return InteractionHandler;\n}();\n\n/**\n * The handler for selections\n */\n\nvar SelectionHandler = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n function SelectionHandler(body, canvas) {\n var _this = this;\n\n classCallCheck(this, SelectionHandler);\n\n this.body = body;\n this.canvas = canvas;\n this.selectionObj = {\n nodes: [],\n edges: []\n };\n this.hoverObj = {\n nodes: {},\n edges: {}\n };\n this.options = {};\n this.defaultOptions = {\n multiselect: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true\n };\n\n assign$2(this.options, this.defaultOptions);\n\n this.body.emitter.on(\"_dataChanged\", function () {\n _this.updateSelection();\n });\n }\n /**\n *\n * @param {Object} [options]\n */\n\n\n createClass(SelectionHandler, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options !== undefined) {\n var fields = ['multiselect', 'hoverConnectedEdges', 'selectable', 'selectConnectedEdges'];\n selectiveDeepExtend(fields, this.options, options);\n }\n }\n /**\n * handles the selection part of the tap;\n *\n * @param {{x: number, y: number}} pointer\n * @returns {boolean}\n */\n\n }, {\n key: \"selectOnPoint\",\n value: function selectOnPoint(pointer) {\n var selected = false;\n\n if (this.options.selectable === true) {\n var obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer); // unselect after getting the objects in order to restore width and height.\n\n this.unselectAll();\n\n if (obj !== undefined) {\n selected = this.selectObject(obj);\n }\n\n this.body.emitter.emit(\"_requestRedraw\");\n }\n\n return selected;\n }\n /**\n *\n * @param {{x: number, y: number}} pointer\n * @returns {boolean}\n */\n\n }, {\n key: \"selectAdditionalOnPoint\",\n value: function selectAdditionalOnPoint(pointer) {\n var selectionChanged = false;\n\n if (this.options.selectable === true) {\n var obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);\n\n if (obj !== undefined) {\n selectionChanged = true;\n\n if (obj.isSelected() === true) {\n this.deselectObject(obj);\n } else {\n this.selectObject(obj);\n }\n\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n\n return selectionChanged;\n }\n /**\n * Create an object containing the standard fields for an event.\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse\n * @returns {{}}\n * @private\n */\n\n }, {\n key: \"_initBaseEvent\",\n value: function _initBaseEvent(event, pointer) {\n var properties = {};\n properties['pointer'] = {\n DOM: {\n x: pointer.x,\n y: pointer.y\n },\n canvas: this.canvas.DOMtoCanvas(pointer)\n };\n properties['event'] = event;\n return properties;\n }\n /**\n * Generate an event which the user can catch.\n *\n * This adds some extra data to the event with respect to cursor position and\n * selected nodes and edges.\n *\n * @param {string} eventType Name of event to send\n * @param {Event} event\n * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse\n * @param {Object|undefined} oldSelection If present, selection state before event occured\n * @param {boolean|undefined} [emptySelection=false] Indicate if selection data should be passed\n */\n\n }, {\n key: \"_generateClickEvent\",\n value: function _generateClickEvent(eventType, event, pointer, oldSelection) {\n var emptySelection = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n var properties = this._initBaseEvent(event, pointer);\n\n if (emptySelection === true) {\n properties.nodes = [];\n properties.edges = [];\n } else {\n var tmp = this.getSelection();\n properties.nodes = tmp.nodes;\n properties.edges = tmp.edges;\n }\n\n if (oldSelection !== undefined) {\n properties['previousSelection'] = oldSelection;\n }\n\n if (eventType == 'click') {\n // For the time being, restrict this functionality to\n // just the click event.\n properties.items = this.getClickedItems(pointer);\n }\n\n if (event.controlEdge !== undefined) {\n properties.controlEdge = event.controlEdge;\n }\n\n this.body.emitter.emit(eventType, properties);\n }\n /**\n *\n * @param {Object} obj\n * @param {boolean} [highlightEdges=this.options.selectConnectedEdges]\n * @returns {boolean}\n */\n\n }, {\n key: \"selectObject\",\n value: function selectObject(obj) {\n var highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.selectConnectedEdges;\n\n if (obj !== undefined) {\n if (obj instanceof Node) {\n if (highlightEdges === true) {\n this._selectConnectedEdges(obj);\n }\n }\n\n obj.select();\n\n this._addToSelection(obj);\n\n return true;\n }\n\n return false;\n }\n /**\n *\n * @param {Object} obj\n */\n\n }, {\n key: \"deselectObject\",\n value: function deselectObject(obj) {\n if (obj.isSelected() === true) {\n obj.selected = false;\n\n this._removeFromSelection(obj);\n }\n }\n /**\n * retrieve all nodes overlapping with given object\n * @param {Object} object An object with parameters left, top, right, bottom\n * @return {number[]} An array with id's of the overlapping nodes\n * @private\n */\n\n }, {\n key: \"_getAllNodesOverlappingWith\",\n value: function _getAllNodesOverlappingWith(object) {\n var overlappingNodes = [];\n var nodes = this.body.nodes;\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n var nodeId = this.body.nodeIndices[i];\n\n if (nodes[nodeId].isOverlappingWith(object)) {\n overlappingNodes.push(nodeId);\n }\n }\n\n return overlappingNodes;\n }\n /**\n * Return a position object in canvasspace from a single point in screenspace\n *\n * @param {{x: number, y: number}} pointer\n * @returns {{left: number, top: number, right: number, bottom: number}}\n * @private\n */\n\n }, {\n key: \"_pointerToPositionObject\",\n value: function _pointerToPositionObject(pointer) {\n var canvasPos = this.canvas.DOMtoCanvas(pointer);\n return {\n left: canvasPos.x - 1,\n top: canvasPos.y + 1,\n right: canvasPos.x + 1,\n bottom: canvasPos.y - 1\n };\n }\n /**\n * Get the top node at the passed point (like a click)\n *\n * @param {{x: number, y: number}} pointer\n * @param {boolean} [returnNode=true]\n * @return {Node | undefined} node\n */\n\n }, {\n key: \"getNodeAt\",\n value: function getNodeAt(pointer) {\n var returnNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n // we first check if this is an navigation controls element\n var positionObject = this._pointerToPositionObject(pointer);\n\n var overlappingNodes = this._getAllNodesOverlappingWith(positionObject); // if there are overlapping nodes, select the last one, this is the\n // one which is drawn on top of the others\n\n\n if (overlappingNodes.length > 0) {\n if (returnNode === true) {\n return this.body.nodes[overlappingNodes[overlappingNodes.length - 1]];\n } else {\n return overlappingNodes[overlappingNodes.length - 1];\n }\n } else {\n return undefined;\n }\n }\n /**\n * retrieve all edges overlapping with given object, selector is around center\n * @param {Object} object An object with parameters left, top, right, bottom\n * @param {number[]} overlappingEdges An array with id's of the overlapping nodes\n * @private\n */\n\n }, {\n key: \"_getEdgesOverlappingWith\",\n value: function _getEdgesOverlappingWith(object, overlappingEdges) {\n var edges = this.body.edges;\n\n for (var i = 0; i < this.body.edgeIndices.length; i++) {\n var edgeId = this.body.edgeIndices[i];\n\n if (edges[edgeId].isOverlappingWith(object)) {\n overlappingEdges.push(edgeId);\n }\n }\n }\n /**\n * retrieve all nodes overlapping with given object\n * @param {Object} object An object with parameters left, top, right, bottom\n * @return {number[]} An array with id's of the overlapping nodes\n * @private\n */\n\n }, {\n key: \"_getAllEdgesOverlappingWith\",\n value: function _getAllEdgesOverlappingWith(object) {\n var overlappingEdges = [];\n\n this._getEdgesOverlappingWith(object, overlappingEdges);\n\n return overlappingEdges;\n }\n /**\n * Get the edges nearest to the passed point (like a click)\n *\n * @param {{x: number, y: number}} pointer\n * @param {boolean} [returnEdge=true]\n * @return {Edge | undefined} node\n */\n\n }, {\n key: \"getEdgeAt\",\n value: function getEdgeAt(pointer) {\n var returnEdge = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n // Iterate over edges, pick closest within 10\n var canvasPos = this.canvas.DOMtoCanvas(pointer);\n var mindist = 10;\n var overlappingEdge = null;\n var edges = this.body.edges;\n\n for (var i = 0; i < this.body.edgeIndices.length; i++) {\n var edgeId = this.body.edgeIndices[i];\n var edge = edges[edgeId];\n\n if (edge.connected) {\n var xFrom = edge.from.x;\n var yFrom = edge.from.y;\n var xTo = edge.to.x;\n var yTo = edge.to.y;\n var dist = edge.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, canvasPos.x, canvasPos.y);\n\n if (dist < mindist) {\n overlappingEdge = edgeId;\n mindist = dist;\n }\n }\n }\n\n if (overlappingEdge !== null) {\n if (returnEdge === true) {\n return this.body.edges[overlappingEdge];\n } else {\n return overlappingEdge;\n }\n } else {\n return undefined;\n }\n }\n /**\n * Add object to the selection array.\n *\n * @param {Object} obj\n * @private\n */\n\n }, {\n key: \"_addToSelection\",\n value: function _addToSelection(obj) {\n if (obj instanceof Node) {\n this.selectionObj.nodes[obj.id] = obj;\n } else {\n this.selectionObj.edges[obj.id] = obj;\n }\n }\n /**\n * Add object to the selection array.\n *\n * @param {Object} obj\n * @private\n */\n\n }, {\n key: \"_addToHover\",\n value: function _addToHover(obj) {\n if (obj instanceof Node) {\n this.hoverObj.nodes[obj.id] = obj;\n } else {\n this.hoverObj.edges[obj.id] = obj;\n }\n }\n /**\n * Remove a single option from selection.\n *\n * @param {Object} obj\n * @private\n */\n\n }, {\n key: \"_removeFromSelection\",\n value: function _removeFromSelection(obj) {\n if (obj instanceof Node) {\n delete this.selectionObj.nodes[obj.id];\n\n this._unselectConnectedEdges(obj);\n } else {\n delete this.selectionObj.edges[obj.id];\n }\n }\n /**\n * Unselect all. The selectionObj is useful for this.\n */\n\n }, {\n key: \"unselectAll\",\n value: function unselectAll() {\n for (var nodeId in this.selectionObj.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.nodes, nodeId)) {\n this.selectionObj.nodes[nodeId].unselect();\n }\n }\n\n for (var edgeId in this.selectionObj.edges) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.edges, edgeId)) {\n this.selectionObj.edges[edgeId].unselect();\n }\n }\n\n this.selectionObj = {\n nodes: {},\n edges: {}\n };\n }\n /**\n * return the number of selected nodes\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_getSelectedNodeCount\",\n value: function _getSelectedNodeCount() {\n var count = 0;\n\n for (var nodeId in this.selectionObj.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.nodes, nodeId)) {\n count += 1;\n }\n }\n\n return count;\n }\n /**\n * return the selected node\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_getSelectedNode\",\n value: function _getSelectedNode() {\n for (var nodeId in this.selectionObj.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.nodes, nodeId)) {\n return this.selectionObj.nodes[nodeId];\n }\n }\n\n return undefined;\n }\n /**\n * return the selected edge\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_getSelectedEdge\",\n value: function _getSelectedEdge() {\n for (var edgeId in this.selectionObj.edges) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.edges, edgeId)) {\n return this.selectionObj.edges[edgeId];\n }\n }\n\n return undefined;\n }\n /**\n * return the number of selected edges\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_getSelectedEdgeCount\",\n value: function _getSelectedEdgeCount() {\n var count = 0;\n\n for (var edgeId in this.selectionObj.edges) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.edges, edgeId)) {\n count += 1;\n }\n }\n\n return count;\n }\n /**\n * return the number of selected objects.\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_getSelectedObjectCount\",\n value: function _getSelectedObjectCount() {\n var count = 0;\n\n for (var nodeId in this.selectionObj.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.nodes, nodeId)) {\n count += 1;\n }\n }\n\n for (var edgeId in this.selectionObj.edges) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.edges, edgeId)) {\n count += 1;\n }\n }\n\n return count;\n }\n /**\n * Check if anything is selected\n *\n * @returns {boolean}\n * @private\n */\n\n }, {\n key: \"_selectionIsEmpty\",\n value: function _selectionIsEmpty() {\n for (var nodeId in this.selectionObj.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.nodes, nodeId)) {\n return false;\n }\n }\n\n for (var edgeId in this.selectionObj.edges) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.edges, edgeId)) {\n return false;\n }\n }\n\n return true;\n }\n /**\n * check if one of the selected nodes is a cluster.\n *\n * @returns {boolean}\n * @private\n */\n\n }, {\n key: \"_clusterInSelection\",\n value: function _clusterInSelection() {\n for (var nodeId in this.selectionObj.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.nodes, nodeId)) {\n if (this.selectionObj.nodes[nodeId].clusterSize > 1) {\n return true;\n }\n }\n }\n\n return false;\n }\n /**\n * select the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n\n }, {\n key: \"_selectConnectedEdges\",\n value: function _selectConnectedEdges(node) {\n for (var i = 0; i < node.edges.length; i++) {\n var edge = node.edges[i];\n edge.select();\n\n this._addToSelection(edge);\n }\n }\n /**\n * select the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n\n }, {\n key: \"_hoverConnectedEdges\",\n value: function _hoverConnectedEdges(node) {\n for (var i = 0; i < node.edges.length; i++) {\n var edge = node.edges[i];\n edge.hover = true;\n\n this._addToHover(edge);\n }\n }\n /**\n * unselect the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n\n }, {\n key: \"_unselectConnectedEdges\",\n value: function _unselectConnectedEdges(node) {\n for (var i = 0; i < node.edges.length; i++) {\n var edge = node.edges[i];\n edge.unselect();\n\n this._removeFromSelection(edge);\n }\n }\n /**\n * Remove the highlight from a node or edge, in response to mouse movement\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse\n * @param {Node|vis.Edge} object\n * @private\n */\n\n }, {\n key: \"emitBlurEvent\",\n value: function emitBlurEvent(event, pointer, object) {\n var properties = this._initBaseEvent(event, pointer);\n\n if (object.hover === true) {\n object.hover = false;\n\n if (object instanceof Node) {\n properties.node = object.id;\n this.body.emitter.emit(\"blurNode\", properties);\n } else {\n properties.edge = object.id;\n this.body.emitter.emit(\"blurEdge\", properties);\n }\n }\n }\n /**\n * Create the highlight for a node or edge, in response to mouse movement\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse\n * @param {Node|vis.Edge} object\n * @returns {boolean} hoverChanged\n * @private\n */\n\n }, {\n key: \"emitHoverEvent\",\n value: function emitHoverEvent(event, pointer, object) {\n var properties = this._initBaseEvent(event, pointer);\n\n var hoverChanged = false;\n\n if (object.hover === false) {\n object.hover = true;\n\n this._addToHover(object);\n\n hoverChanged = true;\n\n if (object instanceof Node) {\n properties.node = object.id;\n this.body.emitter.emit(\"hoverNode\", properties);\n } else {\n properties.edge = object.id;\n this.body.emitter.emit(\"hoverEdge\", properties);\n }\n }\n\n return hoverChanged;\n }\n /**\n * Perform actions in response to a mouse movement.\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer | object with the x and y screen coordinates of the mouse\n */\n\n }, {\n key: \"hoverObject\",\n value: function hoverObject(event, pointer) {\n var object = this.getNodeAt(pointer);\n\n if (object === undefined) {\n object = this.getEdgeAt(pointer);\n }\n\n var hoverChanged = false; // remove all node hover highlights\n\n for (var nodeId in this.hoverObj.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.hoverObj.nodes, nodeId)) {\n if (object === undefined || object instanceof Node && object.id != nodeId || object instanceof Edge) {\n this.emitBlurEvent(event, pointer, this.hoverObj.nodes[nodeId]);\n delete this.hoverObj.nodes[nodeId];\n hoverChanged = true;\n }\n }\n } // removing all edge hover highlights\n\n\n for (var edgeId in this.hoverObj.edges) {\n if (Object.prototype.hasOwnProperty.call(this.hoverObj.edges, edgeId)) {\n // if the hover has been changed here it means that the node has been hovered over or off\n // we then do not use the emitBlurEvent method here.\n if (hoverChanged === true) {\n this.hoverObj.edges[edgeId].hover = false;\n delete this.hoverObj.edges[edgeId];\n } // if the blur remains the same and the object is undefined (mouse off) or another\n // edge has been hovered, or another node has been hovered we blur the edge.\n else if (object === undefined || object instanceof Edge && object.id != edgeId || object instanceof Node && !object.hover) {\n this.emitBlurEvent(event, pointer, this.hoverObj.edges[edgeId]);\n delete this.hoverObj.edges[edgeId];\n hoverChanged = true;\n }\n }\n }\n\n if (object !== undefined) {\n var hoveredEdgesCount = keys$3(this.hoverObj.edges).length;\n\n var hoveredNodesCount = keys$3(this.hoverObj.nodes).length;\n\n var newOnlyHoveredEdge = object instanceof Edge && hoveredEdgesCount === 0 && hoveredNodesCount === 0;\n var newOnlyHoveredNode = object instanceof Node && hoveredEdgesCount === 0 && hoveredNodesCount === 0;\n\n if (hoverChanged || newOnlyHoveredEdge || newOnlyHoveredNode) {\n hoverChanged = this.emitHoverEvent(event, pointer, object);\n }\n\n if (object instanceof Node && this.options.hoverConnectedEdges === true) {\n this._hoverConnectedEdges(object);\n }\n }\n\n if (hoverChanged === true) {\n this.body.emitter.emit('_requestRedraw');\n }\n }\n /**\n *\n * retrieve the currently selected objects\n * @return {{nodes: Array., edges: Array.}} selection\n */\n\n }, {\n key: \"getSelection\",\n value: function getSelection() {\n var nodeIds = this.getSelectedNodes();\n var edgeIds = this.getSelectedEdges();\n return {\n nodes: nodeIds,\n edges: edgeIds\n };\n }\n /**\n *\n * retrieve the currently selected nodes\n * @return {string[]} selection An array with the ids of the\n * selected nodes.\n */\n\n }, {\n key: \"getSelectedNodes\",\n value: function getSelectedNodes() {\n var idArray = [];\n\n if (this.options.selectable === true) {\n for (var nodeId in this.selectionObj.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.nodes, nodeId)) {\n idArray.push(this.selectionObj.nodes[nodeId].id);\n }\n }\n }\n\n return idArray;\n }\n /**\n *\n * retrieve the currently selected edges\n * @return {Array} selection An array with the ids of the\n * selected nodes.\n */\n\n }, {\n key: \"getSelectedEdges\",\n value: function getSelectedEdges() {\n var idArray = [];\n\n if (this.options.selectable === true) {\n for (var edgeId in this.selectionObj.edges) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.edges, edgeId)) {\n idArray.push(this.selectionObj.edges[edgeId].id);\n }\n }\n }\n\n return idArray;\n }\n /**\n * Updates the current selection\n * @param {{nodes: Array., edges: Array.}} selection\n * @param {Object} options Options\n */\n\n }, {\n key: \"setSelection\",\n value: function setSelection(selection) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var i, id;\n if (!selection || !selection.nodes && !selection.edges) throw 'Selection must be an object with nodes and/or edges properties'; // first unselect any selected node, if option is true or undefined\n\n if (options.unselectAll || options.unselectAll === undefined) {\n this.unselectAll();\n }\n\n if (selection.nodes) {\n for (i = 0; i < selection.nodes.length; i++) {\n id = selection.nodes[i];\n var node = this.body.nodes[id];\n\n if (!node) {\n throw new RangeError('Node with id \"' + id + '\" not found');\n } // don't select edges with it\n\n\n this.selectObject(node, options.highlightEdges);\n }\n }\n\n if (selection.edges) {\n for (i = 0; i < selection.edges.length; i++) {\n id = selection.edges[i];\n var edge = this.body.edges[id];\n\n if (!edge) {\n throw new RangeError('Edge with id \"' + id + '\" not found');\n }\n\n this.selectObject(edge);\n }\n }\n\n this.body.emitter.emit('_requestRedraw');\n }\n /**\n * select zero or more nodes with the option to highlight edges\n * @param {number[] | string[]} selection An array with the ids of the\n * selected nodes.\n * @param {boolean} [highlightEdges]\n */\n\n }, {\n key: \"selectNodes\",\n value: function selectNodes(selection) {\n var highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (!selection || selection.length === undefined) throw 'Selection must be an array with ids';\n this.setSelection({\n nodes: selection\n }, {\n highlightEdges: highlightEdges\n });\n }\n /**\n * select zero or more edges\n * @param {number[] | string[]} selection An array with the ids of the\n * selected nodes.\n */\n\n }, {\n key: \"selectEdges\",\n value: function selectEdges(selection) {\n if (!selection || selection.length === undefined) throw 'Selection must be an array with ids';\n this.setSelection({\n edges: selection\n });\n }\n /**\n * Validate the selection: remove ids of nodes which no longer exist\n * @private\n */\n\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n for (var nodeId in this.selectionObj.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.nodes, nodeId)) {\n if (!Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) {\n delete this.selectionObj.nodes[nodeId];\n }\n }\n }\n\n for (var edgeId in this.selectionObj.edges) {\n if (Object.prototype.hasOwnProperty.call(this.selectionObj.edges, edgeId)) {\n if (!Object.prototype.hasOwnProperty.call(this.body.edges, edgeId)) {\n delete this.selectionObj.edges[edgeId];\n }\n }\n }\n }\n /**\n * Determine all the visual elements clicked which are on the given point.\n *\n * All elements are returned; this includes nodes, edges and their labels.\n * The order returned is from highest to lowest, i.e. element 0 of the return\n * value is the topmost item clicked on.\n *\n * The return value consists of an array of the following possible elements:\n *\n * - `{nodeId:number}` - node with given id clicked on\n * - `{nodeId:number, labelId:0}` - label of node with given id clicked on\n * - `{edgeId:number}` - edge with given id clicked on\n * - `{edge:number, labelId:0}` - label of edge with given id clicked on\n *\n * ## NOTES\n *\n * - Currently, there is only one label associated with a node or an edge,\n * but this is expected to change somewhere in the future.\n * - Since there is no z-indexing yet, it is not really possible to set the nodes and\n * edges in the correct order. For the time being, nodes come first.\n *\n * @param {point} pointer mouse position in screen coordinates\n * @returns {Array.}\n * @private\n */\n\n }, {\n key: \"getClickedItems\",\n value: function getClickedItems(pointer) {\n var point = this.canvas.DOMtoCanvas(pointer);\n var items = []; // Note reverse order; we want the topmost clicked items to be first in the array\n // Also note that selected nodes are disregarded here; these normally display on top\n\n var nodeIndices = this.body.nodeIndices;\n var nodes = this.body.nodes;\n\n for (var i = nodeIndices.length - 1; i >= 0; i--) {\n var node = nodes[nodeIndices[i]];\n var ret = node.getItemsOnPoint(point);\n items.push.apply(items, ret); // Append the return value to the running list.\n }\n\n var edgeIndices = this.body.edgeIndices;\n var edges = this.body.edges;\n\n for (var _i = edgeIndices.length - 1; _i >= 0; _i--) {\n var edge = edges[edgeIndices[_i]];\n\n var _ret = edge.getItemsOnPoint(point);\n\n items.push.apply(items, _ret); // Append the return value to the running list.\n }\n\n return items;\n }\n }]);\n\n return SelectionHandler;\n}();\n\nvar timsort = createCommonjsModule(function (module, exports) {\n /****\n * The MIT License\n *\n * Copyright (c) 2015 Marco Ziccardi\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n ****/\n (function (global, factory) {\n {\n factory(exports);\n }\n })(commonjsGlobal, function (exports) {\n\n exports.__esModule = true;\n exports.sort = sort;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n }\n\n var DEFAULT_MIN_MERGE = 32;\n var DEFAULT_MIN_GALLOPING = 7;\n var DEFAULT_TMP_STORAGE_LENGTH = 256;\n var POWERS_OF_TEN = [1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9];\n\n function log10(x) {\n if (x < 1e5) {\n if (x < 1e2) {\n return x < 1e1 ? 0 : 1;\n }\n\n if (x < 1e4) {\n return x < 1e3 ? 2 : 3;\n }\n\n return 4;\n }\n\n if (x < 1e7) {\n return x < 1e6 ? 5 : 6;\n }\n\n if (x < 1e9) {\n return x < 1e8 ? 7 : 8;\n }\n\n return 9;\n }\n\n function alphabeticalCompare(a, b) {\n if (a === b) {\n return 0;\n }\n\n if (~~a === a && ~~b === b) {\n if (a === 0 || b === 0) {\n return a < b ? -1 : 1;\n }\n\n if (a < 0 || b < 0) {\n if (b >= 0) {\n return -1;\n }\n\n if (a >= 0) {\n return 1;\n }\n\n a = -a;\n b = -b;\n }\n\n var al = log10(a);\n var bl = log10(b);\n var t = 0;\n\n if (al < bl) {\n a *= POWERS_OF_TEN[bl - al - 1];\n b /= 10;\n t = -1;\n } else if (al > bl) {\n b *= POWERS_OF_TEN[al - bl - 1];\n a /= 10;\n t = 1;\n }\n\n if (a === b) {\n return t;\n }\n\n return a < b ? -1 : 1;\n }\n\n var aStr = String(a);\n var bStr = String(b);\n\n if (aStr === bStr) {\n return 0;\n }\n\n return aStr < bStr ? -1 : 1;\n }\n\n function minRunLength(n) {\n var r = 0;\n\n while (n >= DEFAULT_MIN_MERGE) {\n r |= n & 1;\n n >>= 1;\n }\n\n return n + r;\n }\n\n function makeAscendingRun(array, lo, hi, compare) {\n var runHi = lo + 1;\n\n if (runHi === hi) {\n return 1;\n }\n\n if (compare(array[runHi++], array[lo]) < 0) {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) {\n runHi++;\n }\n\n reverseRun(array, lo, runHi);\n } else {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) {\n runHi++;\n }\n }\n\n return runHi - lo;\n }\n\n function reverseRun(array, lo, hi) {\n hi--;\n\n while (lo < hi) {\n var t = array[lo];\n array[lo++] = array[hi];\n array[hi--] = t;\n }\n }\n\n function binaryInsertionSort(array, lo, hi, start, compare) {\n if (start === lo) {\n start++;\n }\n\n for (; start < hi; start++) {\n var pivot = array[start];\n var left = lo;\n var right = start;\n\n while (left < right) {\n var mid = left + right >>> 1;\n\n if (compare(pivot, array[mid]) < 0) {\n right = mid;\n } else {\n left = mid + 1;\n }\n }\n\n var n = start - left;\n\n switch (n) {\n case 3:\n array[left + 3] = array[left + 2];\n\n case 2:\n array[left + 2] = array[left + 1];\n\n case 1:\n array[left + 1] = array[left];\n break;\n\n default:\n while (n > 0) {\n array[left + n] = array[left + n - 1];\n n--;\n }\n\n }\n\n array[left] = pivot;\n }\n }\n\n function gallopLeft(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) > 0) {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n } else {\n maxOffset = hint + 1;\n\n while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n }\n\n lastOffset++;\n\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) > 0) {\n lastOffset = m + 1;\n } else {\n offset = m;\n }\n }\n\n return offset;\n }\n\n function gallopRight(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) < 0) {\n maxOffset = hint + 1;\n\n while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n } else {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n }\n\n lastOffset++;\n\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) < 0) {\n offset = m;\n } else {\n lastOffset = m + 1;\n }\n }\n\n return offset;\n }\n\n var TimSort = function () {\n function TimSort(array, compare) {\n _classCallCheck(this, TimSort);\n\n this.array = null;\n this.compare = null;\n this.minGallop = DEFAULT_MIN_GALLOPING;\n this.length = 0;\n this.tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH;\n this.stackLength = 0;\n this.runStart = null;\n this.runLength = null;\n this.stackSize = 0;\n this.array = array;\n this.compare = compare;\n this.length = array.length;\n\n if (this.length < 2 * DEFAULT_TMP_STORAGE_LENGTH) {\n this.tmpStorageLength = this.length >>> 1;\n }\n\n this.tmp = new Array(this.tmpStorageLength);\n this.stackLength = this.length < 120 ? 5 : this.length < 1542 ? 10 : this.length < 119151 ? 19 : 40;\n this.runStart = new Array(this.stackLength);\n this.runLength = new Array(this.stackLength);\n }\n\n TimSort.prototype.pushRun = function pushRun(runStart, runLength) {\n this.runStart[this.stackSize] = runStart;\n this.runLength[this.stackSize] = runLength;\n this.stackSize += 1;\n };\n\n TimSort.prototype.mergeRuns = function mergeRuns() {\n while (this.stackSize > 1) {\n var n = this.stackSize - 2;\n\n if (n >= 1 && this.runLength[n - 1] <= this.runLength[n] + this.runLength[n + 1] || n >= 2 && this.runLength[n - 2] <= this.runLength[n] + this.runLength[n - 1]) {\n if (this.runLength[n - 1] < this.runLength[n + 1]) {\n n--;\n }\n } else if (this.runLength[n] > this.runLength[n + 1]) {\n break;\n }\n\n this.mergeAt(n);\n }\n };\n\n TimSort.prototype.forceMergeRuns = function forceMergeRuns() {\n while (this.stackSize > 1) {\n var n = this.stackSize - 2;\n\n if (n > 0 && this.runLength[n - 1] < this.runLength[n + 1]) {\n n--;\n }\n\n this.mergeAt(n);\n }\n };\n\n TimSort.prototype.mergeAt = function mergeAt(i) {\n var compare = this.compare;\n var array = this.array;\n var start1 = this.runStart[i];\n var length1 = this.runLength[i];\n var start2 = this.runStart[i + 1];\n var length2 = this.runLength[i + 1];\n this.runLength[i] = length1 + length2;\n\n if (i === this.stackSize - 3) {\n this.runStart[i + 1] = this.runStart[i + 2];\n this.runLength[i + 1] = this.runLength[i + 2];\n }\n\n this.stackSize--;\n var k = gallopRight(array[start2], array, start1, length1, 0, compare);\n start1 += k;\n length1 -= k;\n\n if (length1 === 0) {\n return;\n }\n\n length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare);\n\n if (length2 === 0) {\n return;\n }\n\n if (length1 <= length2) {\n this.mergeLow(start1, length1, start2, length2);\n } else {\n this.mergeHigh(start1, length1, start2, length2);\n }\n };\n\n TimSort.prototype.mergeLow = function mergeLow(start1, length1, start2, length2) {\n var compare = this.compare;\n var array = this.array;\n var tmp = this.tmp;\n var i = 0;\n\n for (i = 0; i < length1; i++) {\n tmp[i] = array[start1 + i];\n }\n\n var cursor1 = 0;\n var cursor2 = start2;\n var dest = start1;\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n\n return;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n array[dest + length2] = tmp[cursor1];\n return;\n }\n\n var minGallop = this.minGallop;\n\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n\n do {\n if (compare(array[cursor2], tmp[cursor1]) < 0) {\n array[dest++] = array[cursor2++];\n count2++;\n count1 = 0;\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest++] = tmp[cursor1++];\n count1++;\n count2 = 0;\n\n if (--length1 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare);\n\n if (count1 !== 0) {\n for (i = 0; i < count1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n\n dest += count1;\n cursor1 += count1;\n length1 -= count1;\n\n if (length1 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n\n count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare);\n\n if (count2 !== 0) {\n for (i = 0; i < count2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n dest += count2;\n cursor2 += count2;\n length2 -= count2;\n\n if (length2 === 0) {\n exit = true;\n break;\n }\n }\n\n array[dest++] = tmp[cursor1++];\n\n if (--length1 === 1) {\n exit = true;\n break;\n }\n\n minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (minGallop < 0) {\n minGallop = 0;\n }\n\n minGallop += 2;\n }\n\n this.minGallop = minGallop;\n\n if (minGallop < 1) {\n this.minGallop = 1;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n array[dest + length2] = tmp[cursor1];\n } else if (length1 === 0) {\n throw new Error('mergeLow preconditions were not respected');\n } else {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n }\n };\n\n TimSort.prototype.mergeHigh = function mergeHigh(start1, length1, start2, length2) {\n var compare = this.compare;\n var array = this.array;\n var tmp = this.tmp;\n var i = 0;\n\n for (i = 0; i < length2; i++) {\n tmp[i] = array[start2 + i];\n }\n\n var cursor1 = start1 + length1 - 1;\n var cursor2 = length2 - 1;\n var dest = start2 + length2 - 1;\n var customCursor = 0;\n var customDest = 0;\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n customCursor = dest - (length2 - 1);\n\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n\n return;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n return;\n }\n\n var minGallop = this.minGallop;\n\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n\n do {\n if (compare(tmp[cursor2], array[cursor1]) < 0) {\n array[dest--] = array[cursor1--];\n count1++;\n count2 = 0;\n\n if (--length1 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest--] = tmp[cursor2--];\n count2++;\n count1 = 0;\n\n if (--length2 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare);\n\n if (count1 !== 0) {\n dest -= count1;\n cursor1 -= count1;\n length1 -= count1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = count1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n if (length1 === 0) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = tmp[cursor2--];\n\n if (--length2 === 1) {\n exit = true;\n break;\n }\n\n count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare);\n\n if (count2 !== 0) {\n dest -= count2;\n cursor2 -= count2;\n length2 -= count2;\n customDest = dest + 1;\n customCursor = cursor2 + 1;\n\n for (i = 0; i < count2; i++) {\n array[customDest + i] = tmp[customCursor + i];\n }\n\n if (length2 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n exit = true;\n break;\n }\n\n minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (minGallop < 0) {\n minGallop = 0;\n }\n\n minGallop += 2;\n }\n\n this.minGallop = minGallop;\n\n if (minGallop < 1) {\n this.minGallop = 1;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n } else if (length2 === 0) {\n throw new Error('mergeHigh preconditions were not respected');\n } else {\n customCursor = dest - (length2 - 1);\n\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n }\n };\n\n return TimSort;\n }();\n\n function sort(array, compare, lo, hi) {\n if (!Array.isArray(array)) {\n throw new TypeError('Can only sort arrays');\n }\n\n if (!compare) {\n compare = alphabeticalCompare;\n } else if (typeof compare !== 'function') {\n hi = lo;\n lo = compare;\n compare = alphabeticalCompare;\n }\n\n if (!lo) {\n lo = 0;\n }\n\n if (!hi) {\n hi = array.length;\n }\n\n var remaining = hi - lo;\n\n if (remaining < 2) {\n return;\n }\n\n var runLength = 0;\n\n if (remaining < DEFAULT_MIN_MERGE) {\n runLength = makeAscendingRun(array, lo, hi, compare);\n binaryInsertionSort(array, lo, hi, lo + runLength, compare);\n return;\n }\n\n var ts = new TimSort(array, compare);\n var minRun = minRunLength(remaining);\n\n do {\n runLength = makeAscendingRun(array, lo, hi, compare);\n\n if (runLength < minRun) {\n var force = remaining;\n\n if (force > minRun) {\n force = minRun;\n }\n\n binaryInsertionSort(array, lo, lo + force, lo + runLength, compare);\n runLength = force;\n }\n\n ts.pushRun(lo, runLength);\n ts.mergeRuns();\n remaining -= runLength;\n lo += runLength;\n } while (remaining !== 0);\n\n ts.forceMergeRuns();\n }\n });\n});\n\nvar timsort$1 = timsort;\n\nfunction _createSuper$t(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$t(); return function _createSuperInternal() { var Super = getPrototypeOf$5(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf$5(this).constructor; result = construct$3(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$t() { if (typeof Reflect === \"undefined\" || !construct$3) return false; if (construct$3.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(construct$3(Date, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * Interface definition for direction strategy classes.\n *\n * This class describes the interface for the Strategy\n * pattern classes used to differentiate horizontal and vertical\n * direction of hierarchical results.\n *\n * For a given direction, one coordinate will be 'fixed', meaning that it is\n * determined by level.\n * The other coordinate is 'unfixed', meaning that the nodes on a given level\n * can still move along that coordinate. So:\n *\n * - `vertical` layout: `x` unfixed, `y` fixed per level\n * - `horizontal` layout: `x` fixed per level, `y` unfixed\n *\n * The local methods are stubs and should be regarded as abstract.\n * Derived classes **must** implement all the methods themselves.\n *\n * @private\n */\n\nvar DirectionInterface = /*#__PURE__*/function () {\n function DirectionInterface() {\n classCallCheck(this, DirectionInterface);\n }\n\n createClass(DirectionInterface, [{\n key: \"abstract\",\n\n /** @ignore **/\n value: function abstract() {\n throw new Error(\"Can't instantiate abstract class!\");\n }\n /**\n * This is a dummy call which is used to suppress the jsdoc errors of type:\n *\n * \"'param' is assigned a value but never used\"\n *\n * @ignore\n **/\n\n }, {\n key: \"fake_use\",\n value: function fake_use() {// Do nothing special\n }\n /**\n * Type to use to translate dynamic curves to, in the case of hierarchical layout.\n * Dynamic curves do not work for these.\n *\n * The value should be perpendicular to the actual direction of the layout.\n *\n * @return {string} Direction, either 'vertical' or 'horizontal'\n */\n\n }, {\n key: \"curveType\",\n value: function curveType() {\n return this.abstract();\n }\n /**\n * Return the value of the coordinate that is not fixed for this direction.\n *\n * @param {Node} node The node to read\n * @return {number} Value of the unfixed coordinate\n */\n\n }, {\n key: \"getPosition\",\n value: function getPosition(node) {\n this.fake_use(node);\n return this.abstract();\n }\n /**\n * Set the value of the coordinate that is not fixed for this direction.\n *\n * @param {Node} node The node to adjust\n * @param {number} position\n * @param {number} [level] if specified, the hierarchy level that this node should be fixed to\n */\n\n }, {\n key: \"setPosition\",\n value: function setPosition(node, position) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n this.fake_use(node, position, level);\n this.abstract();\n }\n /**\n * Get the width of a tree.\n *\n * A `tree` here is a subset of nodes within the network which are not connected to other nodes,\n * only among themselves. In essence, it is a sub-network.\n *\n * @param {number} index The index number of a tree\n * @return {number} the width of a tree in the view coordinates\n */\n\n }, {\n key: \"getTreeSize\",\n value: function getTreeSize(index) {\n this.fake_use(index);\n return this.abstract();\n }\n /**\n * Sort array of nodes on the unfixed coordinates.\n *\n * **Note:** chrome has non-stable sorting implementation, which\n * has a tendency to change the order of the array items,\n * even if the custom sort function returns 0.\n *\n * For this reason, an external sort implementation is used,\n * which has the added benefit of being faster than the standard\n * platforms implementation. This has been verified on `node.js`,\n * `firefox` and `chrome` (all linux).\n *\n * @param {Array.} nodeArray array of nodes to sort\n */\n\n }, {\n key: \"sort\",\n value: function sort(nodeArray) {\n this.fake_use(nodeArray);\n this.abstract();\n }\n /**\n * Assign the fixed coordinate of the node to the given level\n *\n * @param {Node} node The node to adjust\n * @param {number} level The level to fix to\n */\n\n }, {\n key: \"fix\",\n value: function fix(node, level) {\n this.fake_use(node, level);\n this.abstract();\n }\n /**\n * Add an offset to the unfixed coordinate of the given node. \n *\n * @param {NodeId} nodeId Id of the node to adjust\n * @param {number} diff Offset to add to the unfixed coordinate\n */\n\n }, {\n key: \"shift\",\n value: function shift(nodeId, diff) {\n this.fake_use(nodeId, diff);\n this.abstract();\n }\n }]);\n\n return DirectionInterface;\n}();\n/**\n * Vertical Strategy\n *\n * Coordinate `y` is fixed on levels, coordinate `x` is unfixed.\n *\n * @extends DirectionInterface\n * @private\n */\n\n\nvar VerticalStrategy = /*#__PURE__*/function (_DirectionInterface) {\n inherits(VerticalStrategy, _DirectionInterface);\n\n var _super = _createSuper$t(VerticalStrategy);\n\n /**\n * Constructor\n *\n * @param {Object} layout reference to the parent LayoutEngine instance.\n */\n function VerticalStrategy(layout) {\n var _this;\n\n classCallCheck(this, VerticalStrategy);\n\n _this = _super.call(this);\n _this.layout = layout;\n return _this;\n }\n /** @inheritdoc */\n\n\n createClass(VerticalStrategy, [{\n key: \"curveType\",\n value: function curveType() {\n return 'horizontal';\n }\n /** @inheritdoc */\n\n }, {\n key: \"getPosition\",\n value: function getPosition(node) {\n return node.x;\n }\n /** @inheritdoc */\n\n }, {\n key: \"setPosition\",\n value: function setPosition(node, position) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n\n if (level !== undefined) {\n this.layout.hierarchical.addToOrdering(node, level);\n }\n\n node.x = position;\n }\n /** @inheritdoc */\n\n }, {\n key: \"getTreeSize\",\n value: function getTreeSize(index) {\n var res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index);\n return {\n min: res.min_x,\n max: res.max_x\n };\n }\n /** @inheritdoc */\n\n }, {\n key: \"sort\",\n value: function sort$1(nodeArray) {\n timsort$1.sort(nodeArray, function (a, b) {\n return a.x - b.x;\n });\n }\n /** @inheritdoc */\n\n }, {\n key: \"fix\",\n value: function fix(node, level) {\n node.y = this.layout.options.hierarchical.levelSeparation * level;\n node.options.fixed.y = true;\n }\n /** @inheritdoc */\n\n }, {\n key: \"shift\",\n value: function shift(nodeId, diff) {\n this.layout.body.nodes[nodeId].x += diff;\n }\n }]);\n\n return VerticalStrategy;\n}(DirectionInterface);\n/**\n * Horizontal Strategy\n *\n * Coordinate `x` is fixed on levels, coordinate `y` is unfixed.\n *\n * @extends DirectionInterface\n * @private\n */\n\n\nvar HorizontalStrategy = /*#__PURE__*/function (_DirectionInterface2) {\n inherits(HorizontalStrategy, _DirectionInterface2);\n\n var _super2 = _createSuper$t(HorizontalStrategy);\n\n /**\n * Constructor\n *\n * @param {Object} layout reference to the parent LayoutEngine instance.\n */\n function HorizontalStrategy(layout) {\n var _this2;\n\n classCallCheck(this, HorizontalStrategy);\n\n _this2 = _super2.call(this);\n _this2.layout = layout;\n return _this2;\n }\n /** @inheritdoc */\n\n\n createClass(HorizontalStrategy, [{\n key: \"curveType\",\n value: function curveType() {\n return 'vertical';\n }\n /** @inheritdoc */\n\n }, {\n key: \"getPosition\",\n value: function getPosition(node) {\n return node.y;\n }\n /** @inheritdoc */\n\n }, {\n key: \"setPosition\",\n value: function setPosition(node, position) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n\n if (level !== undefined) {\n this.layout.hierarchical.addToOrdering(node, level);\n }\n\n node.y = position;\n }\n /** @inheritdoc */\n\n }, {\n key: \"getTreeSize\",\n value: function getTreeSize(index) {\n var res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index);\n return {\n min: res.min_y,\n max: res.max_y\n };\n }\n /** @inheritdoc */\n\n }, {\n key: \"sort\",\n value: function sort$1(nodeArray) {\n timsort$1.sort(nodeArray, function (a, b) {\n return a.y - b.y;\n });\n }\n /** @inheritdoc */\n\n }, {\n key: \"fix\",\n value: function fix(node, level) {\n node.x = this.layout.options.hierarchical.levelSeparation * level;\n node.options.fixed.x = true;\n }\n /** @inheritdoc */\n\n }, {\n key: \"shift\",\n value: function shift(nodeId, diff) {\n this.layout.body.nodes[nodeId].y += diff;\n }\n }]);\n\n return HorizontalStrategy;\n}(DirectionInterface);\n\nvar $every = arrayIteration.every;\nvar STRICT_METHOD$5 = arrayMethodIsStrict('every');\nvar USES_TO_LENGTH$9 = arrayMethodUsesToLength('every'); // `Array.prototype.every` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.every\n\n_export({\n target: 'Array',\n proto: true,\n forced: !STRICT_METHOD$5 || !USES_TO_LENGTH$9\n}, {\n every: function every(callbackfn\n /* , thisArg */\n ) {\n return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\nvar every = entryVirtual('Array').every;\n\nvar ArrayPrototype$i = Array.prototype;\n\nvar every_1 = function (it) {\n var own = it.every;\n return it === ArrayPrototype$i || it instanceof Array && own === ArrayPrototype$i.every ? every : own;\n};\n\nvar every$1 = every_1;\n\nvar every$2 = every$1;\n\nfunction _createForOfIteratorHelper$3(o, allowArrayLike) { var it; if (typeof symbol$4 === \"undefined\" || getIteratorMethod$1(o) == null) { if (isArray$5(o) || (it = _unsupportedIterableToArray$4(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = getIterator$1(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray$4(o, minLen) { var _context8; if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray$4(o, minLen); var n = slice$5(_context8 = Object.prototype.toString.call(o)).call(_context8, 8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return from_1$2(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$4(o, minLen); }\n\nfunction _arrayLikeToArray$4(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\r\n * Try to assign levels to nodes according to their positions in the cyclic “hierarchy”.\r\n *\r\n * @param nodes - Visible nodes of the graph.\r\n * @param levels - If present levels will be added to it, if not a new object will be created.\r\n *\r\n * @returns Populated node levels.\r\n */\nfunction fillLevelsByDirectionCyclic(nodes, levels) {\n var edges = new set$3();\n\n forEach$2(nodes).call(nodes, function (node) {\n var _context;\n\n forEach$2(_context = node.edges).call(_context, function (edge) {\n if (edge.connected) {\n edges.add(edge);\n }\n });\n });\n\n forEach$2(edges).call(edges, function (edge) {\n var fromId = edge.from.id;\n var toId = edge.to.id;\n\n if (levels[fromId] == null) {\n levels[fromId] = 0;\n }\n\n if (levels[toId] == null || levels[fromId] >= levels[toId]) {\n levels[toId] = levels[fromId] + 1;\n }\n });\n\n return levels;\n}\n/**\r\n * Assign levels to nodes according to their positions in the hierarchy. Leaves will be lined up at the bottom and all other nodes as close to their children as possible.\r\n *\r\n * @param nodes - Visible nodes of the graph.\r\n * @param levels - If present levels will be added to it, if not a new object will be created.\r\n *\r\n * @returns Populated node levels.\r\n */\n\n\nfunction fillLevelsByDirectionLeaves(nodes) {\n var levels = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : create$2(null);\n return fillLevelsByDirection( // Pick only leaves (nodes without children).\n function (node) {\n var _context2, _context3;\n\n return every$2(_context2 = filter$2(_context3 = node.edges // Take only visible nodes into account.\n ).call(_context3, function (edge) {\n return nodes.has(edge.toId);\n }) // Check that all edges lead to this node (leaf).\n ).call(_context2, function (edge) {\n return edge.to === node;\n });\n }, // Use the lowest level.\n function (newLevel, oldLevel) {\n return oldLevel > newLevel;\n }, // Go against the direction of the edges.\n \"from\", nodes, levels);\n}\n/**\r\n * Assign levels to nodes according to their positions in the hierarchy. Roots will be lined up at the top and all nodes as close to their parents as possible.\r\n *\r\n * @param nodes - Visible nodes of the graph.\r\n * @param levels - If present levels will be added to it, if not a new object will be created.\r\n *\r\n * @returns Populated node levels.\r\n */\n\nfunction fillLevelsByDirectionRoots(nodes) {\n var levels = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : create$2(null);\n return fillLevelsByDirection( // Pick only roots (nodes without parents).\n function (node) {\n var _context4, _context5;\n\n return every$2(_context4 = filter$2(_context5 = node.edges // Take only visible nodes into account.\n ).call(_context5, function (edge) {\n return nodes.has(edge.toId);\n }) // Check that all edges lead from this node (root).\n ).call(_context4, function (edge) {\n return edge.from === node;\n });\n }, // Use the highest level.\n function (newLevel, oldLevel) {\n return oldLevel < newLevel;\n }, // Go in the direction of the edges.\n \"to\", nodes, levels);\n}\n/**\r\n * Assign levels to nodes according to their positions in the hierarchy.\r\n *\r\n * @param isEntryNode - Checks and return true if the graph should be traversed from this node.\r\n * @param shouldLevelBeReplaced - Checks and returns true if the level of given node should be updated to the new value.\r\n * @param direction - Wheter the graph should be traversed in the direction of the edges `\"to\"` or in the other way `\"from\"`.\r\n * @param nodes - Visible nodes of the graph.\r\n * @param levels - If present levels will be added to it, if not a new object will be created.\r\n *\r\n * @returns Populated node levels.\r\n */\n\nfunction fillLevelsByDirection(isEntryNode, shouldLevelBeReplaced, direction, nodes, levels) {\n var limit = nodes.size;\n var edgeIdProp = direction + \"Id\";\n var newLevelDiff = direction === \"to\" ? 1 : -1;\n\n var _iterator = _createForOfIteratorHelper$3(nodes),\n _step;\n\n try {\n var _loop = function _loop() {\n var _step$value = slicedToArray(_step.value, 2),\n entryNodeId = _step$value[0],\n entryNode = _step$value[1];\n\n if ( // Skip if the node is not visible.\n !nodes.has(entryNodeId) || // Skip if the node is not an entry node.\n !isEntryNode(entryNode)) {\n return \"continue\";\n } // Line up all the entry nodes on level 0.\n\n\n levels[entryNodeId] = 0;\n var stack = [entryNode];\n var done = 0;\n var node = void 0;\n\n var _loop2 = function _loop2() {\n var _context6, _context7;\n\n if (!nodes.has(entryNodeId)) {\n // Skip if the node is not visible.\n return \"continue\";\n }\n\n var newLevel = levels[node.id] + newLevelDiff;\n\n forEach$2(_context6 = filter$2(_context7 = node.edges).call(_context7, function (edge) {\n return (// Ignore disconnected edges.\n edge.connected && // Ignore circular edges.\n edge.to !== edge.from && // Ignore edges leading to the node that's currently being processed.\n edge[direction] !== node && // Ignore edges connecting to an invisible node.\n nodes.has(edge.toId) && // Ignore edges connecting from an invisible node.\n nodes.has(edge.fromId)\n );\n })).call(_context6, function (edge) {\n var targetNodeId = edge[edgeIdProp];\n var oldLevel = levels[targetNodeId];\n\n if (oldLevel == null || shouldLevelBeReplaced(newLevel, oldLevel)) {\n levels[targetNodeId] = newLevel;\n stack.push(edge[direction]);\n }\n });\n\n if (done > limit) {\n // This would run forever on a cyclic graph.\n return {\n v: {\n v: fillLevelsByDirectionCyclic(nodes, levels)\n }\n };\n } else {\n ++done;\n }\n };\n\n while (node = stack.pop()) {\n var _ret2 = _loop2();\n\n switch (_ret2) {\n case \"continue\":\n continue;\n\n default:\n if (_typeof_1(_ret2) === \"object\") return _ret2.v;\n }\n }\n };\n\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _ret = _loop();\n\n switch (_ret) {\n case \"continue\":\n continue;\n\n default:\n if (_typeof_1(_ret) === \"object\") return _ret.v;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return levels;\n}\n\n/**\n * There's a mix-up with terms in the code. Following are the formal definitions:\n *\n * tree - a strict hierarchical network, i.e. every node has at most one parent\n * forest - a collection of trees. These distinct trees are thus not connected.\n *\n * So:\n * - in a network that is not a tree, there exist nodes with multiple parents.\n * - a network consisting of unconnected sub-networks, of which at least one\n * is not a tree, is not a forest.\n *\n * In the code, the definitions are:\n *\n * tree - any disconnected sub-network, strict hierarchical or not.\n * forest - a bunch of these sub-networks\n *\n * The difference between tree and not-tree is important in the code, notably within\n * to the block-shifting algorithm. The algorithm assumes formal trees and fails\n * for not-trees, often in a spectacular manner (search for 'exploding network' in the issues).\n *\n * In order to distinguish the definitions in the following code, the adjective 'formal' is\n * used. If 'formal' is absent, you must assume the non-formal definition.\n *\n * ----------------------------------------------------------------------------------\n * NOTES\n * =====\n *\n * A hierarchical layout is a different thing from a hierarchical network.\n * The layout is a way to arrange the nodes in the view; this can be done\n * on non-hierarchical networks as well. The converse is also possible.\n */\n/**\n * Container for derived data on current network, relating to hierarchy.\n *\n * @private\n */\n\nvar HierarchicalStatus = /*#__PURE__*/function () {\n /**\n * @ignore\n */\n function HierarchicalStatus() {\n classCallCheck(this, HierarchicalStatus);\n\n this.childrenReference = {}; // child id's per node id\n\n this.parentReference = {}; // parent id's per node id\n\n this.trees = {}; // tree id per node id; i.e. to which tree does given node id belong\n\n this.distributionOrdering = {}; // The nodes per level, in the display order\n\n this.levels = {}; // hierarchy level per node id\n\n this.distributionIndex = {}; // The position of the node in the level sorting order, per node id.\n\n this.isTree = false; // True if current network is a formal tree \n\n this.treeIndex = -1; // Highest tree id in current network.\n }\n /**\n * Add the relation between given nodes to the current state.\n *\n * @param {Node.id} parentNodeId\n * @param {Node.id} childNodeId\n */\n\n\n createClass(HierarchicalStatus, [{\n key: \"addRelation\",\n value: function addRelation(parentNodeId, childNodeId) {\n if (this.childrenReference[parentNodeId] === undefined) {\n this.childrenReference[parentNodeId] = [];\n }\n\n this.childrenReference[parentNodeId].push(childNodeId);\n\n if (this.parentReference[childNodeId] === undefined) {\n this.parentReference[childNodeId] = [];\n }\n\n this.parentReference[childNodeId].push(parentNodeId);\n }\n /**\n * Check if the current state is for a formal tree or formal forest.\n *\n * This is the case if every node has at most one parent.\n *\n * Pre: parentReference init'ed properly for current network\n */\n\n }, {\n key: \"checkIfTree\",\n value: function checkIfTree() {\n for (var i in this.parentReference) {\n if (this.parentReference[i].length > 1) {\n this.isTree = false;\n return;\n }\n }\n\n this.isTree = true;\n }\n /**\n * Return the number of separate trees in the current network.\n * @returns {number}\n */\n\n }, {\n key: \"numTrees\",\n value: function numTrees() {\n return this.treeIndex + 1; // This assumes the indexes are assigned consecitively\n }\n /**\n * Assign a tree id to a node\n * @param {Node} node\n * @param {string|number} treeId\n */\n\n }, {\n key: \"setTreeIndex\",\n value: function setTreeIndex(node, treeId) {\n if (treeId === undefined) return; // Don't bother\n\n if (this.trees[node.id] === undefined) {\n this.trees[node.id] = treeId;\n this.treeIndex = Math.max(treeId, this.treeIndex);\n }\n }\n /**\n * Ensure level for given id is defined.\n *\n * Sets level to zero for given node id if not already present\n *\n * @param {Node.id} nodeId\n */\n\n }, {\n key: \"ensureLevel\",\n value: function ensureLevel(nodeId) {\n if (this.levels[nodeId] === undefined) {\n this.levels[nodeId] = 0;\n }\n }\n /**\n * get the maximum level of a branch.\n *\n * TODO: Never entered; find a test case to test this!\n * @param {Node.id} nodeId\n * @returns {number}\n */\n\n }, {\n key: \"getMaxLevel\",\n value: function getMaxLevel(nodeId) {\n var _this = this;\n\n var accumulator = {};\n\n var _getMaxLevel = function _getMaxLevel(nodeId) {\n if (accumulator[nodeId] !== undefined) {\n return accumulator[nodeId];\n }\n\n var level = _this.levels[nodeId];\n\n if (_this.childrenReference[nodeId]) {\n var children = _this.childrenReference[nodeId];\n\n if (children.length > 0) {\n for (var i = 0; i < children.length; i++) {\n level = Math.max(level, _getMaxLevel(children[i]));\n }\n }\n }\n\n accumulator[nodeId] = level;\n return level;\n };\n\n return _getMaxLevel(nodeId);\n }\n /**\n *\n * @param {Node} nodeA\n * @param {Node} nodeB\n */\n\n }, {\n key: \"levelDownstream\",\n value: function levelDownstream(nodeA, nodeB) {\n if (this.levels[nodeB.id] === undefined) {\n // set initial level\n if (this.levels[nodeA.id] === undefined) {\n this.levels[nodeA.id] = 0;\n } // set level\n\n\n this.levels[nodeB.id] = this.levels[nodeA.id] + 1;\n }\n }\n /**\n * Small util method to set the minimum levels of the nodes to zero.\n *\n * @param {Array.} nodes\n */\n\n }, {\n key: \"setMinLevelToZero\",\n value: function setMinLevelToZero(nodes) {\n var minLevel = 1e9; // get the minimum level\n\n for (var nodeId in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, nodeId)) {\n if (this.levels[nodeId] !== undefined) {\n minLevel = Math.min(this.levels[nodeId], minLevel);\n }\n }\n } // subtract the minimum from the set so we have a range starting from 0\n\n\n for (var _nodeId in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, _nodeId)) {\n if (this.levels[_nodeId] !== undefined) {\n this.levels[_nodeId] -= minLevel;\n }\n }\n }\n }\n /**\n * Get the min and max xy-coordinates of a given tree\n *\n * @param {Array.} nodes\n * @param {number} index\n * @returns {{min_x: number, max_x: number, min_y: number, max_y: number}}\n */\n\n }, {\n key: \"getTreeSize\",\n value: function getTreeSize(nodes, index) {\n var min_x = 1e9;\n var max_x = -1e9;\n var min_y = 1e9;\n var max_y = -1e9;\n\n for (var nodeId in this.trees) {\n if (Object.prototype.hasOwnProperty.call(this.trees, nodeId)) {\n if (this.trees[nodeId] === index) {\n var node = nodes[nodeId];\n min_x = Math.min(node.x, min_x);\n max_x = Math.max(node.x, max_x);\n min_y = Math.min(node.y, min_y);\n max_y = Math.max(node.y, max_y);\n }\n }\n }\n\n return {\n min_x: min_x,\n max_x: max_x,\n min_y: min_y,\n max_y: max_y\n };\n }\n /**\n * Check if two nodes have the same parent(s)\n *\n * @param {Node} node1\n * @param {Node} node2\n * @return {boolean} true if the two nodes have a same ancestor node, false otherwise\n */\n\n }, {\n key: \"hasSameParent\",\n value: function hasSameParent(node1, node2) {\n var parents1 = this.parentReference[node1.id];\n var parents2 = this.parentReference[node2.id];\n\n if (parents1 === undefined || parents2 === undefined) {\n return false;\n }\n\n for (var i = 0; i < parents1.length; i++) {\n for (var j = 0; j < parents2.length; j++) {\n if (parents1[i] == parents2[j]) {\n return true;\n }\n }\n }\n\n return false;\n }\n /**\n * Check if two nodes are in the same tree.\n *\n * @param {Node} node1\n * @param {Node} node2\n * @return {Boolean} true if this is so, false otherwise\n */\n\n }, {\n key: \"inSameSubNetwork\",\n value: function inSameSubNetwork(node1, node2) {\n return this.trees[node1.id] === this.trees[node2.id];\n }\n /**\n * Get a list of the distinct levels in the current network\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getLevels\",\n value: function getLevels() {\n return keys$3(this.distributionOrdering);\n }\n /**\n * Add a node to the ordering per level\n *\n * @param {Node} node\n * @param {number} level\n */\n\n }, {\n key: \"addToOrdering\",\n value: function addToOrdering(node, level) {\n if (this.distributionOrdering[level] === undefined) {\n this.distributionOrdering[level] = [];\n }\n\n var isPresent = false;\n var curLevel = this.distributionOrdering[level];\n\n for (var n in curLevel) {\n //if (curLevel[n].id === node.id) {\n if (curLevel[n] === node) {\n isPresent = true;\n break;\n }\n }\n\n if (!isPresent) {\n this.distributionOrdering[level].push(node);\n this.distributionIndex[node.id] = this.distributionOrdering[level].length - 1;\n }\n }\n }]);\n\n return HierarchicalStatus;\n}();\n/**\n * The Layout Engine\n */\n\n\nvar LayoutEngine = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n */\n function LayoutEngine(body) {\n classCallCheck(this, LayoutEngine);\n\n this.body = body; // Make sure there always is some RNG because the setOptions method won't\n // set it unless there's a seed for it.\n\n this._resetRNG(Math.random() + \":\" + now$2());\n\n this.setPhysics = false;\n this.options = {};\n this.optionsBackup = {\n physics: {}\n };\n this.defaultOptions = {\n randomSeed: undefined,\n improvedLayout: true,\n clusterThreshold: 150,\n hierarchical: {\n enabled: false,\n levelSeparation: 150,\n nodeSpacing: 100,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n // UD, DU, LR, RL\n sortMethod: 'hubsize' // hubsize, directed\n\n }\n };\n\n assign$2(this.options, this.defaultOptions);\n\n this.bindEventListeners();\n }\n /**\n * Binds event listeners\n */\n\n\n createClass(LayoutEngine, [{\n key: \"bindEventListeners\",\n value: function bindEventListeners() {\n var _this2 = this;\n\n this.body.emitter.on('_dataChanged', function () {\n _this2.setupHierarchicalLayout();\n });\n this.body.emitter.on('_dataLoaded', function () {\n _this2.layoutNetwork();\n });\n this.body.emitter.on('_resetHierarchicalLayout', function () {\n _this2.setupHierarchicalLayout();\n });\n this.body.emitter.on('_adjustEdgesForHierarchicalLayout', function () {\n if (_this2.options.hierarchical.enabled !== true) {\n return;\n } // get the type of static smooth curve in case it is required\n\n\n var type = _this2.direction.curveType(); // force all edges into static smooth curves.\n\n\n _this2.body.emitter.emit('_forceDisableDynamicCurves', type, false);\n });\n }\n /**\n *\n * @param {Object} options\n * @param {Object} allOptions\n * @returns {Object}\n */\n\n }, {\n key: \"setOptions\",\n value: function setOptions(options, allOptions) {\n if (options !== undefined) {\n var hierarchical = this.options.hierarchical;\n var prevHierarchicalState = hierarchical.enabled;\n selectiveDeepExtend([\"randomSeed\", \"improvedLayout\", \"clusterThreshold\"], this.options, options);\n mergeOptions(this.options, options, 'hierarchical');\n\n if (options.randomSeed !== undefined) {\n this._resetRNG(options.randomSeed);\n }\n\n if (hierarchical.enabled === true) {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit('refresh', true);\n } // make sure the level separation is the right way up\n\n\n if (hierarchical.direction === 'RL' || hierarchical.direction === 'DU') {\n if (hierarchical.levelSeparation > 0) {\n hierarchical.levelSeparation *= -1;\n }\n } else {\n if (hierarchical.levelSeparation < 0) {\n hierarchical.levelSeparation *= -1;\n }\n }\n\n this.setDirectionStrategy();\n this.body.emitter.emit('_resetHierarchicalLayout'); // because the hierarchical system needs it's own physics and smooth curve settings,\n // we adapt the other options if needed.\n\n return this.adaptAllOptionsForHierarchicalLayout(allOptions);\n } else {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit('refresh');\n return deepExtend(allOptions, this.optionsBackup);\n }\n }\n }\n\n return allOptions;\n }\n /**\n * Reset the random number generator with given seed.\n *\n * @param {any} seed - The seed that will be forwarded the the RNG.\n */\n\n }, {\n key: \"_resetRNG\",\n value: function _resetRNG(seed) {\n this.initialRandomSeed = seed;\n this._rng = Alea(this.initialRandomSeed);\n }\n /**\n *\n * @param {Object} allOptions\n * @returns {Object}\n */\n\n }, {\n key: \"adaptAllOptionsForHierarchicalLayout\",\n value: function adaptAllOptionsForHierarchicalLayout(allOptions) {\n if (this.options.hierarchical.enabled === true) {\n var backupPhysics = this.optionsBackup.physics; // set the physics\n\n if (allOptions.physics === undefined || allOptions.physics === true) {\n allOptions.physics = {\n enabled: backupPhysics.enabled === undefined ? true : backupPhysics.enabled,\n solver: 'hierarchicalRepulsion'\n };\n backupPhysics.enabled = backupPhysics.enabled === undefined ? true : backupPhysics.enabled;\n backupPhysics.solver = backupPhysics.solver || 'barnesHut';\n } else if (_typeof_1(allOptions.physics) === 'object') {\n backupPhysics.enabled = allOptions.physics.enabled === undefined ? true : allOptions.physics.enabled;\n backupPhysics.solver = allOptions.physics.solver || 'barnesHut';\n allOptions.physics.solver = 'hierarchicalRepulsion';\n } else if (allOptions.physics !== false) {\n backupPhysics.solver = 'barnesHut';\n allOptions.physics = {\n solver: 'hierarchicalRepulsion'\n };\n } // get the type of static smooth curve in case it is required\n\n\n var type = this.direction.curveType(); // disable smooth curves if nothing is defined. If smooth curves have been turned on,\n // turn them into static smooth curves.\n\n if (allOptions.edges === undefined) {\n this.optionsBackup.edges = {\n smooth: {\n enabled: true,\n type: 'dynamic'\n }\n };\n allOptions.edges = {\n smooth: false\n };\n } else if (allOptions.edges.smooth === undefined) {\n this.optionsBackup.edges = {\n smooth: {\n enabled: true,\n type: 'dynamic'\n }\n };\n allOptions.edges.smooth = false;\n } else {\n if (typeof allOptions.edges.smooth === 'boolean') {\n this.optionsBackup.edges = {\n smooth: allOptions.edges.smooth\n };\n allOptions.edges.smooth = {\n enabled: allOptions.edges.smooth,\n type: type\n };\n } else {\n var smooth = allOptions.edges.smooth; // allow custom types except for dynamic\n\n if (smooth.type !== undefined && smooth.type !== 'dynamic') {\n type = smooth.type;\n } // TODO: this is options merging; see if the standard routines can be used here.\n\n\n this.optionsBackup.edges = {\n smooth: {\n enabled: smooth.enabled === undefined ? true : smooth.enabled,\n type: smooth.type === undefined ? 'dynamic' : smooth.type,\n roundness: smooth.roundness === undefined ? 0.5 : smooth.roundness,\n forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection\n }\n }; // NOTE: Copying an object to self; this is basically setting defaults for undefined variables\n\n allOptions.edges.smooth = {\n enabled: smooth.enabled === undefined ? true : smooth.enabled,\n type: type,\n roundness: smooth.roundness === undefined ? 0.5 : smooth.roundness,\n forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection\n };\n }\n } // Force all edges into static smooth curves.\n // Only applies to edges that do not use the global options for smooth.\n\n\n this.body.emitter.emit('_forceDisableDynamicCurves', type);\n }\n\n return allOptions;\n }\n /**\n *\n * @param {Array.} nodesArray\n */\n\n }, {\n key: \"positionInitially\",\n value: function positionInitially(nodesArray) {\n if (this.options.hierarchical.enabled !== true) {\n this._resetRNG(this.initialRandomSeed);\n\n var radius = nodesArray.length + 50;\n\n for (var i = 0; i < nodesArray.length; i++) {\n var node = nodesArray[i];\n\n var angle = 2 * Math.PI * this._rng();\n\n if (node.x === undefined) {\n node.x = radius * Math.cos(angle);\n }\n\n if (node.y === undefined) {\n node.y = radius * Math.sin(angle);\n }\n }\n }\n }\n /**\n * Use Kamada Kawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we\n * cluster them first to reduce the amount.\n */\n\n }, {\n key: \"layoutNetwork\",\n value: function layoutNetwork() {\n if (this.options.hierarchical.enabled !== true && this.options.improvedLayout === true) {\n var indices = this.body.nodeIndices; // first check if we should Kamada Kawai to layout. The threshold is if less than half of the visible\n // nodes have predefined positions we use this.\n\n var positionDefined = 0;\n\n for (var i = 0; i < indices.length; i++) {\n var node = this.body.nodes[indices[i]];\n\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n } // if less than half of the nodes have a predefined position we continue\n\n\n if (positionDefined < 0.5 * indices.length) {\n var MAX_LEVELS = 10;\n var level = 0;\n var clusterThreshold = this.options.clusterThreshold; //\n // Define the options for the hidden cluster nodes\n // These options don't propagate outside the clustering phase.\n //\n // Some options are explicitly disabled, because they may be set in group or default node options.\n // The clusters are never displayed, so most explicit settings here serve as performance optimizations.\n //\n // The explicit setting of 'shape' is to avoid `shape: 'image'`; images are not passed to the hidden\n // cluster nodes, leading to an exception on creation.\n //\n // All settings here are performance related, except when noted otherwise.\n //\n\n var clusterOptions = {\n clusterNodeProperties: {\n shape: 'ellipse',\n // Bugfix: avoid type 'image', no images supplied\n label: '',\n // avoid label handling\n group: '',\n // avoid group handling\n font: {\n multi: false\n } // avoid font propagation\n\n },\n clusterEdgeProperties: {\n label: '',\n // avoid label handling\n font: {\n multi: false\n },\n // avoid font propagation\n smooth: {\n enabled: false // avoid drawing penalty for complex edges\n\n }\n }\n }; // if there are a lot of nodes, we cluster before we run the algorithm.\n // NOTE: this part fails to find clusters for large scale-free networks, which should\n // be easily clusterable.\n // TODO: examine why this is so\n\n if (indices.length > clusterThreshold) {\n var startLength = indices.length;\n\n while (indices.length > clusterThreshold && level <= MAX_LEVELS) {\n //console.time(\"clustering\")\n level += 1;\n var before = indices.length; // if there are many nodes we do a hubsize cluster\n\n if (level % 3 === 0) {\n this.body.modules.clustering.clusterBridges(clusterOptions);\n } else {\n this.body.modules.clustering.clusterOutliers(clusterOptions);\n }\n\n var after = indices.length;\n\n if (before == after && level % 3 !== 0) {\n this._declusterAll();\n\n this.body.emitter.emit(\"_layoutFailed\");\n console.info(\"This network could not be positioned by this version of the improved layout algorithm.\" + \" Please disable improvedLayout for better performance.\");\n return;\n } //console.timeEnd(\"clustering\")\n //console.log(before,level,after);\n\n } // increase the size of the edges\n\n\n this.body.modules.kamadaKawai.setOptions({\n springLength: Math.max(150, 2 * startLength)\n });\n }\n\n if (level > MAX_LEVELS) {\n console.info(\"The clustering didn't succeed within the amount of interations allowed,\" + \" progressing with partial result.\");\n } // position the system for these nodes and edges\n\n\n this.body.modules.kamadaKawai.solve(indices, this.body.edgeIndices, true); // shift to center point\n\n this._shiftToCenter(); // perturb the nodes a little bit to force the physics to kick in\n\n\n var offset = 70;\n\n for (var _i = 0; _i < indices.length; _i++) {\n // Only perturb the nodes that aren't fixed\n var _node = this.body.nodes[indices[_i]];\n\n if (_node.predefinedPosition === false) {\n _node.x += (0.5 - this._rng()) * offset;\n _node.y += (0.5 - this._rng()) * offset;\n }\n } // uncluster all clusters\n\n\n this._declusterAll(); // reposition all bezier nodes.\n\n\n this.body.emitter.emit(\"_repositionBezierNodes\");\n }\n }\n }\n /**\n * Move all the nodes towards to the center so gravitational pull wil not move the nodes away from view\n * @private\n */\n\n }, {\n key: \"_shiftToCenter\",\n value: function _shiftToCenter() {\n var range = NetworkUtil.getRangeCore(this.body.nodes, this.body.nodeIndices);\n var center = NetworkUtil.findCenter(range);\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n var node = this.body.nodes[this.body.nodeIndices[i]];\n node.x -= center.x;\n node.y -= center.y;\n }\n }\n /**\n * Expands all clusters\n * @private\n */\n\n }, {\n key: \"_declusterAll\",\n value: function _declusterAll() {\n var clustersPresent = true;\n\n while (clustersPresent === true) {\n clustersPresent = false;\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n if (this.body.nodes[this.body.nodeIndices[i]].isCluster === true) {\n clustersPresent = true;\n this.body.modules.clustering.openCluster(this.body.nodeIndices[i], {}, false);\n }\n }\n\n if (clustersPresent === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n /**\n *\n * @returns {number|*}\n */\n\n }, {\n key: \"getSeed\",\n value: function getSeed() {\n return this.initialRandomSeed;\n }\n /**\n * This is the main function to layout the nodes in a hierarchical way.\n * It checks if the node details are supplied correctly\n *\n * @private\n */\n\n }, {\n key: \"setupHierarchicalLayout\",\n value: function setupHierarchicalLayout() {\n if (this.options.hierarchical.enabled === true && this.body.nodeIndices.length > 0) {\n // get the size of the largest hubs and check if the user has defined a level for a node.\n var node, nodeId;\n var definedLevel = false;\n var undefinedLevel = false;\n this.lastNodeOnLevel = {};\n this.hierarchical = new HierarchicalStatus();\n\n for (nodeId in this.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) {\n node = this.body.nodes[nodeId];\n\n if (node.options.level !== undefined) {\n definedLevel = true;\n this.hierarchical.levels[nodeId] = node.options.level;\n } else {\n undefinedLevel = true;\n }\n }\n } // if the user defined some levels but not all, alert and run without hierarchical layout\n\n\n if (undefinedLevel === true && definedLevel === true) {\n throw new Error('To use the hierarchical layout, nodes require either no predefined levels' + ' or levels have to be defined for all nodes.');\n } else {\n // define levels if undefined by the users. Based on hubsize.\n if (undefinedLevel === true) {\n var sortMethod = this.options.hierarchical.sortMethod;\n\n if (sortMethod === 'hubsize') {\n this._determineLevelsByHubsize();\n } else if (sortMethod === 'directed') {\n this._determineLevelsDirected();\n } else if (sortMethod === 'custom') {\n this._determineLevelsCustomCallback();\n }\n } // fallback for cases where there are nodes but no edges\n\n\n for (var _nodeId2 in this.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.body.nodes, _nodeId2)) {\n this.hierarchical.ensureLevel(_nodeId2);\n }\n } // check the distribution of the nodes per level.\n\n\n var distribution = this._getDistribution(); // get the parent children relations.\n\n\n this._generateMap(); // place the nodes on the canvas.\n\n\n this._placeNodesByHierarchy(distribution); // condense the whitespace.\n\n\n this._condenseHierarchy(); // shift to center so gravity does not have to do much\n\n\n this._shiftToCenter();\n }\n }\n }\n /**\n * @private\n */\n\n }, {\n key: \"_condenseHierarchy\",\n value: function _condenseHierarchy() {\n var _this3 = this;\n\n // Global var in this scope to define when the movement has stopped.\n var stillShifting = false;\n var branches = {}; // first we have some methods to help shifting trees around.\n // the main method to shift the trees\n\n var shiftTrees = function shiftTrees() {\n var treeSizes = getTreeSizes();\n var shiftBy = 0;\n\n for (var i = 0; i < treeSizes.length - 1; i++) {\n var diff = treeSizes[i].max - treeSizes[i + 1].min;\n shiftBy += diff + _this3.options.hierarchical.treeSpacing;\n shiftTree(i + 1, shiftBy);\n }\n }; // shift a single tree by an offset\n\n\n var shiftTree = function shiftTree(index, offset) {\n var trees = _this3.hierarchical.trees;\n\n for (var nodeId in trees) {\n if (Object.prototype.hasOwnProperty.call(trees, nodeId)) {\n if (trees[nodeId] === index) {\n _this3.direction.shift(nodeId, offset);\n }\n }\n }\n }; // get the width of all trees\n\n\n var getTreeSizes = function getTreeSizes() {\n var treeWidths = [];\n\n for (var i = 0; i < _this3.hierarchical.numTrees(); i++) {\n treeWidths.push(_this3.direction.getTreeSize(i));\n }\n\n return treeWidths;\n }; // get a map of all nodes in this branch\n\n\n var getBranchNodes = function getBranchNodes(source, map) {\n if (map[source.id]) {\n return;\n }\n\n map[source.id] = true;\n\n if (_this3.hierarchical.childrenReference[source.id]) {\n var children = _this3.hierarchical.childrenReference[source.id];\n\n if (children.length > 0) {\n for (var i = 0; i < children.length; i++) {\n getBranchNodes(_this3.body.nodes[children[i]], map);\n }\n }\n }\n }; // get a min max width as well as the maximum movement space it has on either sides\n // we use min max terminology because width and height can interchange depending on the direction of the layout\n\n\n var getBranchBoundary = function getBranchBoundary(branchMap) {\n var maxLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1e9;\n var minSpace = 1e9;\n var maxSpace = 1e9;\n var min = 1e9;\n var max = -1e9;\n\n for (var branchNode in branchMap) {\n if (Object.prototype.hasOwnProperty.call(branchMap, branchNode)) {\n var node = _this3.body.nodes[branchNode];\n var level = _this3.hierarchical.levels[node.id];\n\n var position = _this3.direction.getPosition(node); // get the space around the node.\n\n\n var _this3$_getSpaceAroun = _this3._getSpaceAroundNode(node, branchMap),\n _this3$_getSpaceAroun2 = slicedToArray(_this3$_getSpaceAroun, 2),\n minSpaceNode = _this3$_getSpaceAroun2[0],\n maxSpaceNode = _this3$_getSpaceAroun2[1];\n\n minSpace = Math.min(minSpaceNode, minSpace);\n maxSpace = Math.min(maxSpaceNode, maxSpace); // the width is only relevant for the levels two nodes have in common. This is why we filter on this.\n\n if (level <= maxLevel) {\n min = Math.min(position, min);\n max = Math.max(position, max);\n }\n }\n }\n\n return [min, max, minSpace, maxSpace];\n }; // check what the maximum level is these nodes have in common.\n\n\n var getCollisionLevel = function getCollisionLevel(node1, node2) {\n var maxLevel1 = _this3.hierarchical.getMaxLevel(node1.id);\n\n var maxLevel2 = _this3.hierarchical.getMaxLevel(node2.id);\n\n return Math.min(maxLevel1, maxLevel2);\n };\n /**\n * Condense elements. These can be nodes or branches depending on the callback.\n *\n * @param {function} callback\n * @param {Array.} levels\n * @param {*} centerParents\n */\n\n\n var shiftElementsCloser = function shiftElementsCloser(callback, levels, centerParents) {\n var hier = _this3.hierarchical;\n\n for (var i = 0; i < levels.length; i++) {\n var level = levels[i];\n var levelNodes = hier.distributionOrdering[level];\n\n if (levelNodes.length > 1) {\n for (var j = 0; j < levelNodes.length - 1; j++) {\n var node1 = levelNodes[j];\n var node2 = levelNodes[j + 1]; // NOTE: logic maintained as it was; if nodes have same ancestor,\n // then of course they are in the same sub-network.\n\n if (hier.hasSameParent(node1, node2) && hier.inSameSubNetwork(node1, node2)) {\n callback(node1, node2, centerParents);\n }\n }\n }\n }\n }; // callback for shifting branches\n\n\n var branchShiftCallback = function branchShiftCallback(node1, node2) {\n var centerParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n //window.CALLBACKS.push(() => {\n var pos1 = _this3.direction.getPosition(node1);\n\n var pos2 = _this3.direction.getPosition(node2);\n\n var diffAbs = Math.abs(pos2 - pos1);\n var nodeSpacing = _this3.options.hierarchical.nodeSpacing; //console.log(\"NOW CHECKING:\", node1.id, node2.id, diffAbs);\n\n if (diffAbs > nodeSpacing) {\n var branchNodes1 = {};\n var branchNodes2 = {};\n getBranchNodes(node1, branchNodes1);\n getBranchNodes(node2, branchNodes2); // check the largest distance between the branches\n\n var maxLevel = getCollisionLevel(node1, node2);\n var branchNodeBoundary1 = getBranchBoundary(branchNodes1, maxLevel);\n var branchNodeBoundary2 = getBranchBoundary(branchNodes2, maxLevel);\n var max1 = branchNodeBoundary1[1];\n var min2 = branchNodeBoundary2[0];\n var minSpace2 = branchNodeBoundary2[2]; //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id,\n // getBranchBoundary(branchNodes2, maxLevel), maxLevel);\n\n var diffBranch = Math.abs(max1 - min2);\n\n if (diffBranch > nodeSpacing) {\n var offset = max1 - min2 + nodeSpacing;\n\n if (offset < -minSpace2 + nodeSpacing) {\n offset = -minSpace2 + nodeSpacing; //console.log(\"RESETTING OFFSET\", max1 - min2 + this.options.hierarchical.nodeSpacing, -minSpace2, offset);\n }\n\n if (offset < 0) {\n //console.log(\"SHIFTING\", node2.id, offset);\n _this3._shiftBlock(node2.id, offset);\n\n stillShifting = true;\n if (centerParent === true) _this3._centerParent(node2);\n }\n }\n } //this.body.emitter.emit(\"_redraw\");})\n\n };\n\n var minimizeEdgeLength = function minimizeEdgeLength(iterations, node) {\n //window.CALLBACKS.push(() => {\n // console.log(\"ts\",node.id);\n var nodeId = node.id;\n var allEdges = node.edges;\n var nodeLevel = _this3.hierarchical.levels[node.id]; // gather constants\n\n var C2 = _this3.options.hierarchical.levelSeparation * _this3.options.hierarchical.levelSeparation;\n var referenceNodes = {};\n var aboveEdges = [];\n\n for (var i = 0; i < allEdges.length; i++) {\n var edge = allEdges[i];\n\n if (edge.toId != edge.fromId) {\n var otherNode = edge.toId == nodeId ? edge.from : edge.to;\n referenceNodes[allEdges[i].id] = otherNode;\n\n if (_this3.hierarchical.levels[otherNode.id] < nodeLevel) {\n aboveEdges.push(edge);\n }\n }\n } // differentiated sum of lengths based on only moving one node over one axis\n\n\n var getFx = function getFx(point, edges) {\n var sum = 0;\n\n for (var _i2 = 0; _i2 < edges.length; _i2++) {\n if (referenceNodes[edges[_i2].id] !== undefined) {\n var a = _this3.direction.getPosition(referenceNodes[edges[_i2].id]) - point;\n sum += a / Math.sqrt(a * a + C2);\n }\n }\n\n return sum;\n }; // doubly differentiated sum of lengths based on only moving one node over one axis\n\n\n var getDFx = function getDFx(point, edges) {\n var sum = 0;\n\n for (var _i3 = 0; _i3 < edges.length; _i3++) {\n if (referenceNodes[edges[_i3].id] !== undefined) {\n var a = _this3.direction.getPosition(referenceNodes[edges[_i3].id]) - point;\n sum -= C2 * Math.pow(a * a + C2, -1.5);\n }\n }\n\n return sum;\n };\n\n var getGuess = function getGuess(iterations, edges) {\n var guess = _this3.direction.getPosition(node); // Newton's method for optimization\n\n\n var guessMap = {};\n\n for (var _i4 = 0; _i4 < iterations; _i4++) {\n var fx = getFx(guess, edges);\n var dfx = getDFx(guess, edges); // we limit the movement to avoid instability.\n\n var limit = 40;\n var ratio = Math.max(-limit, Math.min(limit, Math.round(fx / dfx)));\n guess = guess - ratio; // reduce duplicates\n\n if (guessMap[guess] !== undefined) {\n break;\n }\n\n guessMap[guess] = _i4;\n }\n\n return guess;\n };\n\n var moveBranch = function moveBranch(guess) {\n // position node if there is space\n var nodePosition = _this3.direction.getPosition(node); // check movable area of the branch\n\n\n if (branches[node.id] === undefined) {\n var branchNodes = {};\n getBranchNodes(node, branchNodes);\n branches[node.id] = branchNodes;\n }\n\n var branchBoundary = getBranchBoundary(branches[node.id]);\n var minSpaceBranch = branchBoundary[2];\n var maxSpaceBranch = branchBoundary[3];\n var diff = guess - nodePosition; // check if we are allowed to move the node:\n\n var branchOffset = 0;\n\n if (diff > 0) {\n branchOffset = Math.min(diff, maxSpaceBranch - _this3.options.hierarchical.nodeSpacing);\n } else if (diff < 0) {\n branchOffset = -Math.min(-diff, minSpaceBranch - _this3.options.hierarchical.nodeSpacing);\n }\n\n if (branchOffset != 0) {\n //console.log(\"moving branch:\",branchOffset, maxSpaceBranch, minSpaceBranch)\n _this3._shiftBlock(node.id, branchOffset); //this.body.emitter.emit(\"_redraw\");\n\n\n stillShifting = true;\n }\n };\n\n var moveNode = function moveNode(guess) {\n var nodePosition = _this3.direction.getPosition(node); // position node if there is space\n\n\n var _this3$_getSpaceAroun3 = _this3._getSpaceAroundNode(node),\n _this3$_getSpaceAroun4 = slicedToArray(_this3$_getSpaceAroun3, 2),\n minSpace = _this3$_getSpaceAroun4[0],\n maxSpace = _this3$_getSpaceAroun4[1];\n\n var diff = guess - nodePosition; // check if we are allowed to move the node:\n\n var newPosition = nodePosition;\n\n if (diff > 0) {\n newPosition = Math.min(nodePosition + (maxSpace - _this3.options.hierarchical.nodeSpacing), guess);\n } else if (diff < 0) {\n newPosition = Math.max(nodePosition - (minSpace - _this3.options.hierarchical.nodeSpacing), guess);\n }\n\n if (newPosition !== nodePosition) {\n //console.log(\"moving Node:\",diff, minSpace, maxSpace);\n _this3.direction.setPosition(node, newPosition); //this.body.emitter.emit(\"_redraw\");\n\n\n stillShifting = true;\n }\n };\n\n var guess = getGuess(iterations, aboveEdges);\n moveBranch(guess);\n guess = getGuess(iterations, allEdges);\n moveNode(guess); //})\n }; // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n\n\n var minimizeEdgeLengthBottomUp = function minimizeEdgeLengthBottomUp(iterations) {\n var levels = _this3.hierarchical.getLevels();\n\n levels = reverse$2(levels).call(levels);\n\n for (var i = 0; i < iterations; i++) {\n stillShifting = false;\n\n for (var j = 0; j < levels.length; j++) {\n var level = levels[j];\n var levelNodes = _this3.hierarchical.distributionOrdering[level];\n\n for (var k = 0; k < levelNodes.length; k++) {\n minimizeEdgeLength(1000, levelNodes[k]);\n }\n }\n\n if (stillShifting !== true) {\n //console.log(\"FINISHED minimizeEdgeLengthBottomUp IN \" + i);\n break;\n }\n }\n }; // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n\n\n var shiftBranchesCloserBottomUp = function shiftBranchesCloserBottomUp(iterations) {\n var levels = _this3.hierarchical.getLevels();\n\n levels = reverse$2(levels).call(levels);\n\n for (var i = 0; i < iterations; i++) {\n stillShifting = false;\n shiftElementsCloser(branchShiftCallback, levels, true);\n\n if (stillShifting !== true) {\n //console.log(\"FINISHED shiftBranchesCloserBottomUp IN \" + (i+1));\n break;\n }\n }\n }; // center all parents\n\n\n var centerAllParents = function centerAllParents() {\n for (var nodeId in _this3.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(_this3.body.nodes, nodeId)) _this3._centerParent(_this3.body.nodes[nodeId]);\n }\n }; // center all parents\n\n\n var centerAllParentsBottomUp = function centerAllParentsBottomUp() {\n var levels = _this3.hierarchical.getLevels();\n\n levels = reverse$2(levels).call(levels);\n\n for (var i = 0; i < levels.length; i++) {\n var level = levels[i];\n var levelNodes = _this3.hierarchical.distributionOrdering[level];\n\n for (var j = 0; j < levelNodes.length; j++) {\n _this3._centerParent(levelNodes[j]);\n }\n }\n }; // the actual work is done here.\n\n\n if (this.options.hierarchical.blockShifting === true) {\n shiftBranchesCloserBottomUp(5);\n centerAllParents();\n } // minimize edge length\n\n\n if (this.options.hierarchical.edgeMinimization === true) {\n minimizeEdgeLengthBottomUp(20);\n }\n\n if (this.options.hierarchical.parentCentralization === true) {\n centerAllParentsBottomUp();\n }\n\n shiftTrees();\n }\n /**\n * This gives the space around the node. IF a map is supplied, it will only check against nodes NOT in the map.\n * This is used to only get the distances to nodes outside of a branch.\n * @param {Node} node\n * @param {{Node.id: vis.Node}} map\n * @returns {number[]}\n * @private\n */\n\n }, {\n key: \"_getSpaceAroundNode\",\n value: function _getSpaceAroundNode(node, map) {\n var useMap = true;\n\n if (map === undefined) {\n useMap = false;\n }\n\n var level = this.hierarchical.levels[node.id];\n\n if (level !== undefined) {\n var index = this.hierarchical.distributionIndex[node.id];\n var position = this.direction.getPosition(node);\n var ordering = this.hierarchical.distributionOrdering[level];\n var minSpace = 1e9;\n var maxSpace = 1e9;\n\n if (index !== 0) {\n var prevNode = ordering[index - 1];\n\n if (useMap === true && map[prevNode.id] === undefined || useMap === false) {\n var prevPos = this.direction.getPosition(prevNode);\n minSpace = position - prevPos;\n }\n }\n\n if (index != ordering.length - 1) {\n var nextNode = ordering[index + 1];\n\n if (useMap === true && map[nextNode.id] === undefined || useMap === false) {\n var nextPos = this.direction.getPosition(nextNode);\n maxSpace = Math.min(maxSpace, nextPos - position);\n }\n }\n\n return [minSpace, maxSpace];\n } else {\n return [0, 0];\n }\n }\n /**\n * We use this method to center a parent node and check if it does not cross other nodes when it does.\n * @param {Node} node\n * @private\n */\n\n }, {\n key: \"_centerParent\",\n value: function _centerParent(node) {\n if (this.hierarchical.parentReference[node.id]) {\n var parents = this.hierarchical.parentReference[node.id];\n\n for (var i = 0; i < parents.length; i++) {\n var parentId = parents[i];\n var parentNode = this.body.nodes[parentId];\n var children = this.hierarchical.childrenReference[parentId];\n\n if (children !== undefined) {\n // get the range of the children\n var newPosition = this._getCenterPosition(children);\n\n var position = this.direction.getPosition(parentNode);\n\n var _this$_getSpaceAround = this._getSpaceAroundNode(parentNode),\n _this$_getSpaceAround2 = slicedToArray(_this$_getSpaceAround, 2),\n minSpace = _this$_getSpaceAround2[0],\n maxSpace = _this$_getSpaceAround2[1];\n\n var diff = position - newPosition;\n\n if (diff < 0 && Math.abs(diff) < maxSpace - this.options.hierarchical.nodeSpacing || diff > 0 && Math.abs(diff) < minSpace - this.options.hierarchical.nodeSpacing) {\n this.direction.setPosition(parentNode, newPosition);\n }\n }\n }\n }\n }\n /**\n * This function places the nodes on the canvas based on the hierarchial distribution.\n *\n * @param {Object} distribution | obtained by the function this._getDistribution()\n * @private\n */\n\n }, {\n key: \"_placeNodesByHierarchy\",\n value: function _placeNodesByHierarchy(distribution) {\n this.positionedNodes = {}; // start placing all the level 0 nodes first. Then recursively position their branches.\n\n for (var level in distribution) {\n if (Object.prototype.hasOwnProperty.call(distribution, level)) {\n var _context;\n\n // sort nodes in level by position:\n var nodeArray = keys$3(distribution[level]);\n\n nodeArray = this._indexArrayToNodes(nodeArray);\n\n sort$2(_context = this.direction).call(_context, nodeArray);\n\n var handledNodeCount = 0;\n\n for (var i = 0; i < nodeArray.length; i++) {\n var node = nodeArray[i];\n\n if (this.positionedNodes[node.id] === undefined) {\n var spacing = this.options.hierarchical.nodeSpacing;\n var pos = spacing * handledNodeCount; // We get the X or Y values we need and store them in pos and previousPos.\n // The get and set make sure we get X or Y\n\n if (handledNodeCount > 0) {\n pos = this.direction.getPosition(nodeArray[i - 1]) + spacing;\n }\n\n this.direction.setPosition(node, pos, level);\n\n this._validatePositionAndContinue(node, level, pos);\n\n handledNodeCount++;\n }\n }\n }\n }\n }\n /**\n * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes\n * on a X position that ensures there will be no overlap.\n *\n * @param {Node.id} parentId\n * @param {number} parentLevel\n * @private\n */\n\n }, {\n key: \"_placeBranchNodes\",\n value: function _placeBranchNodes(parentId, parentLevel) {\n var _context2;\n\n var childRef = this.hierarchical.childrenReference[parentId]; // if this is not a parent, cancel the placing. This can happen with multiple parents to one child.\n\n if (childRef === undefined) {\n return;\n } // get a list of childNodes\n\n\n var childNodes = [];\n\n for (var i = 0; i < childRef.length; i++) {\n childNodes.push(this.body.nodes[childRef[i]]);\n } // use the positions to order the nodes.\n\n\n sort$2(_context2 = this.direction).call(_context2, childNodes); // position the childNodes\n\n\n for (var _i5 = 0; _i5 < childNodes.length; _i5++) {\n var childNode = childNodes[_i5];\n var childNodeLevel = this.hierarchical.levels[childNode.id]; // check if the child node is below the parent node and if it has already been positioned.\n\n if (childNodeLevel > parentLevel && this.positionedNodes[childNode.id] === undefined) {\n // get the amount of space required for this node. If parent the width is based on the amount of children.\n var spacing = this.options.hierarchical.nodeSpacing;\n var pos = void 0; // we get the X or Y values we need and store them in pos and previousPos.\n // The get and set make sure we get X or Y\n\n if (_i5 === 0) {\n pos = this.direction.getPosition(this.body.nodes[parentId]);\n } else {\n pos = this.direction.getPosition(childNodes[_i5 - 1]) + spacing;\n }\n\n this.direction.setPosition(childNode, pos, childNodeLevel);\n\n this._validatePositionAndContinue(childNode, childNodeLevel, pos);\n } else {\n return;\n }\n } // center the parent nodes.\n\n\n var center = this._getCenterPosition(childNodes);\n\n this.direction.setPosition(this.body.nodes[parentId], center, parentLevel);\n }\n /**\n * This method checks for overlap and if required shifts the branch. It also keeps records of positioned nodes.\n * Finally it will call _placeBranchNodes to place the branch nodes.\n * @param {Node} node\n * @param {number} level\n * @param {number} pos\n * @private\n */\n\n }, {\n key: \"_validatePositionAndContinue\",\n value: function _validatePositionAndContinue(node, level, pos) {\n // This method only works for formal trees and formal forests\n // Early exit if this is not the case\n if (!this.hierarchical.isTree) return; // if overlap has been detected, we shift the branch\n\n if (this.lastNodeOnLevel[level] !== undefined) {\n var previousPos = this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[level]]);\n\n if (pos - previousPos < this.options.hierarchical.nodeSpacing) {\n var diff = previousPos + this.options.hierarchical.nodeSpacing - pos;\n\n var sharedParent = this._findCommonParent(this.lastNodeOnLevel[level], node.id);\n\n this._shiftBlock(sharedParent.withChild, diff);\n }\n }\n\n this.lastNodeOnLevel[level] = node.id; // store change in position.\n\n this.positionedNodes[node.id] = true;\n\n this._placeBranchNodes(node.id, level);\n }\n /**\n * Receives an array with node indices and returns an array with the actual node references.\n * Used for sorting based on node properties.\n * @param {Array.} idArray\n * @returns {Array.}\n */\n\n }, {\n key: \"_indexArrayToNodes\",\n value: function _indexArrayToNodes(idArray) {\n var array = [];\n\n for (var i = 0; i < idArray.length; i++) {\n array.push(this.body.nodes[idArray[i]]);\n }\n\n return array;\n }\n /**\n * This function get the distribution of levels based on hubsize\n *\n * @returns {Object}\n * @private\n */\n\n }, {\n key: \"_getDistribution\",\n value: function _getDistribution() {\n var distribution = {};\n var nodeId, node; // we fix Y because the hierarchy is vertical,\n // we fix X so we do not give a node an x position for a second time.\n // the fix of X is removed after the x value has been set.\n\n for (nodeId in this.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) {\n node = this.body.nodes[nodeId];\n var level = this.hierarchical.levels[nodeId] === undefined ? 0 : this.hierarchical.levels[nodeId];\n this.direction.fix(node, level);\n\n if (distribution[level] === undefined) {\n distribution[level] = {};\n }\n\n distribution[level][nodeId] = node;\n }\n }\n\n return distribution;\n }\n /**\n * Return the active (i.e. visible) edges for this node\n *\n * @param {Node} node\n * @returns {Array.} Array of edge instances\n * @private\n */\n\n }, {\n key: \"_getActiveEdges\",\n value: function _getActiveEdges(node) {\n var _this4 = this;\n\n var result = [];\n forEach$3(node.edges, function (edge) {\n var _context3;\n\n if (indexOf$3(_context3 = _this4.body.edgeIndices).call(_context3, edge.id) !== -1) {\n result.push(edge);\n }\n });\n return result;\n }\n /**\n * Get the hubsizes for all active nodes.\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_getHubSizes\",\n value: function _getHubSizes() {\n var _this5 = this;\n\n var hubSizes = {};\n var nodeIds = this.body.nodeIndices;\n forEach$3(nodeIds, function (nodeId) {\n var node = _this5.body.nodes[nodeId];\n\n var hubSize = _this5._getActiveEdges(node).length;\n\n hubSizes[hubSize] = true;\n }); // Make an array of the size sorted descending\n\n var result = [];\n forEach$3(hubSizes, function (size) {\n result.push(Number(size));\n });\n\n sort$2(timsort$1).call(timsort$1, result, function (a, b) {\n return b - a;\n });\n\n return result;\n }\n /**\n * this function allocates nodes in levels based on the recursive branching from the largest hubs.\n *\n * @private\n */\n\n }, {\n key: \"_determineLevelsByHubsize\",\n value: function _determineLevelsByHubsize() {\n var _this6 = this;\n\n var levelDownstream = function levelDownstream(nodeA, nodeB) {\n _this6.hierarchical.levelDownstream(nodeA, nodeB);\n };\n\n var hubSizes = this._getHubSizes();\n\n var _loop = function _loop(i) {\n var hubSize = hubSizes[i];\n if (hubSize === 0) return \"break\";\n forEach$3(_this6.body.nodeIndices, function (nodeId) {\n var node = _this6.body.nodes[nodeId];\n\n if (hubSize === _this6._getActiveEdges(node).length) {\n _this6._crawlNetwork(levelDownstream, nodeId);\n }\n });\n };\n\n for (var i = 0; i < hubSizes.length; ++i) {\n var _ret = _loop(i);\n\n if (_ret === \"break\") break;\n }\n }\n /**\n * TODO: release feature\n * TODO: Determine if this feature is needed at all\n *\n * @private\n */\n\n }, {\n key: \"_determineLevelsCustomCallback\",\n value: function _determineLevelsCustomCallback() {\n var _this7 = this;\n\n var minLevel = 100000; // TODO: this should come from options.\n\n var customCallback = function customCallback(nodeA, nodeB, edge) {// eslint-disable-line no-unused-vars\n }; // TODO: perhaps move to HierarchicalStatus.\n // But I currently don't see the point, this method is not used.\n\n\n var levelByDirection = function levelByDirection(nodeA, nodeB, edge) {\n var levelA = _this7.hierarchical.levels[nodeA.id]; // set initial level\n\n if (levelA === undefined) {\n levelA = _this7.hierarchical.levels[nodeA.id] = minLevel;\n }\n\n var diff = customCallback(NetworkUtil.cloneOptions(nodeA, 'node'), NetworkUtil.cloneOptions(nodeB, 'node'), NetworkUtil.cloneOptions(edge, 'edge'));\n _this7.hierarchical.levels[nodeB.id] = levelA + diff;\n };\n\n this._crawlNetwork(levelByDirection);\n\n this.hierarchical.setMinLevelToZero(this.body.nodes);\n }\n /**\n * Allocate nodes in levels based on the direction of the edges.\n *\n * @private\n */\n\n }, {\n key: \"_determineLevelsDirected\",\n value: function _determineLevelsDirected() {\n var _context4,\n _this8 = this;\n\n var nodes = reduce$2(_context4 = this.body.nodeIndices).call(_context4, function (acc, id) {\n acc.set(id, _this8.body.nodes[id]);\n return acc;\n }, new map$5());\n\n var levels = this.hierarchical.levels;\n\n if (this.options.hierarchical.shakeTowards === \"roots\") {\n this.hierarchical.levels = fillLevelsByDirectionRoots(nodes, levels);\n } else {\n this.hierarchical.levels = fillLevelsByDirectionLeaves(nodes, levels);\n }\n\n this.hierarchical.setMinLevelToZero(this.body.nodes);\n }\n /**\n * Update the bookkeeping of parent and child.\n * @private\n */\n\n }, {\n key: \"_generateMap\",\n value: function _generateMap() {\n var _this9 = this;\n\n var fillInRelations = function fillInRelations(parentNode, childNode) {\n if (_this9.hierarchical.levels[childNode.id] > _this9.hierarchical.levels[parentNode.id]) {\n _this9.hierarchical.addRelation(parentNode.id, childNode.id);\n }\n };\n\n this._crawlNetwork(fillInRelations);\n\n this.hierarchical.checkIfTree();\n }\n /**\n * Crawl over the entire network and use a callback on each node couple that is connected to each other.\n * @param {function} [callback=function(){}] | will receive nodeA, nodeB and the connecting edge. A and B are distinct.\n * @param {Node.id} startingNodeId\n * @private\n */\n\n }, {\n key: \"_crawlNetwork\",\n value: function _crawlNetwork() {\n var _this10 = this;\n\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};\n var startingNodeId = arguments.length > 1 ? arguments[1] : undefined;\n var progress = {};\n\n var crawler = function crawler(node, tree) {\n if (progress[node.id] === undefined) {\n _this10.hierarchical.setTreeIndex(node, tree);\n\n progress[node.id] = true;\n var childNode;\n\n var edges = _this10._getActiveEdges(node);\n\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n\n if (edge.connected === true) {\n if (edge.toId == node.id) {\n // Not '===' because id's can be string and numeric\n childNode = edge.from;\n } else {\n childNode = edge.to;\n }\n\n if (node.id != childNode.id) {\n // Not '!==' because id's can be string and numeric\n callback(node, childNode, edge);\n crawler(childNode, tree);\n }\n }\n }\n }\n };\n\n if (startingNodeId === undefined) {\n // Crawl over all nodes\n var treeIndex = 0; // Serves to pass a unique id for the current distinct tree\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n var nodeId = this.body.nodeIndices[i];\n\n if (progress[nodeId] === undefined) {\n var node = this.body.nodes[nodeId];\n crawler(node, treeIndex);\n treeIndex += 1;\n }\n }\n } else {\n // Crawl from the given starting node\n var _node2 = this.body.nodes[startingNodeId];\n\n if (_node2 === undefined) {\n console.error(\"Node not found:\", startingNodeId);\n return;\n }\n\n crawler(_node2);\n }\n }\n /**\n * Shift a branch a certain distance\n * @param {Node.id} parentId\n * @param {number} diff\n * @private\n */\n\n }, {\n key: \"_shiftBlock\",\n value: function _shiftBlock(parentId, diff) {\n var _this11 = this;\n\n var progress = {};\n\n var shifter = function shifter(parentId) {\n if (progress[parentId]) {\n return;\n }\n\n progress[parentId] = true;\n\n _this11.direction.shift(parentId, diff);\n\n var childRef = _this11.hierarchical.childrenReference[parentId];\n\n if (childRef !== undefined) {\n for (var i = 0; i < childRef.length; i++) {\n shifter(childRef[i]);\n }\n }\n };\n\n shifter(parentId);\n }\n /**\n * Find a common parent between branches.\n * @param {Node.id} childA\n * @param {Node.id} childB\n * @returns {{foundParent, withChild}}\n * @private\n */\n\n }, {\n key: \"_findCommonParent\",\n value: function _findCommonParent(childA, childB) {\n var _this12 = this;\n\n var parents = {};\n\n var iterateParents = function iterateParents(parents, child) {\n var parentRef = _this12.hierarchical.parentReference[child];\n\n if (parentRef !== undefined) {\n for (var i = 0; i < parentRef.length; i++) {\n var parent = parentRef[i];\n parents[parent] = true;\n iterateParents(parents, parent);\n }\n }\n };\n\n var findParent = function findParent(parents, child) {\n var parentRef = _this12.hierarchical.parentReference[child];\n\n if (parentRef !== undefined) {\n for (var i = 0; i < parentRef.length; i++) {\n var parent = parentRef[i];\n\n if (parents[parent] !== undefined) {\n return {\n foundParent: parent,\n withChild: child\n };\n }\n\n var branch = findParent(parents, parent);\n\n if (branch.foundParent !== null) {\n return branch;\n }\n }\n }\n\n return {\n foundParent: null,\n withChild: child\n };\n };\n\n iterateParents(parents, childA);\n return findParent(parents, childB);\n }\n /**\n * Set the strategy pattern for handling the coordinates given the current direction.\n *\n * The individual instances contain all the operations and data specific to a layout direction.\n *\n * @param {Node} node\n * @param {{x: number, y: number}} position\n * @param {number} level\n * @param {boolean} [doNotUpdate=false]\n * @private\n */\n\n }, {\n key: \"setDirectionStrategy\",\n value: function setDirectionStrategy() {\n var isVertical = this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU';\n\n if (isVertical) {\n this.direction = new VerticalStrategy(this);\n } else {\n this.direction = new HorizontalStrategy(this);\n }\n }\n /**\n * Determine the center position of a branch from the passed list of child nodes\n *\n * This takes into account the positions of all the child nodes.\n * @param {Array.} childNodes Array of either child nodes or node id's\n * @return {number}\n * @private\n */\n\n }, {\n key: \"_getCenterPosition\",\n value: function _getCenterPosition(childNodes) {\n var minPos = 1e9;\n var maxPos = -1e9;\n\n for (var i = 0; i < childNodes.length; i++) {\n var childNode = void 0;\n\n if (childNodes[i].id !== undefined) {\n childNode = childNodes[i];\n } else {\n var childNodeId = childNodes[i];\n childNode = this.body.nodes[childNodeId];\n }\n\n var position = this.direction.getPosition(childNode);\n minPos = Math.min(minPos, position);\n maxPos = Math.max(maxPos, position);\n }\n\n return 0.5 * (minPos + maxPos);\n }\n }]);\n\n return LayoutEngine;\n}();\n\nvar css_248z$3 = \"div.vis-network div.vis-manipulation {\\n box-sizing: content-box;\\n\\n border-width: 0;\\n border-bottom: 1px;\\n border-style:solid;\\n border-color: #d6d9d8;\\n background: #ffffff; /* Old browsers */\\n background: -moz-linear-gradient(top, #ffffff 0%, #fcfcfc 48%, #fafafa 50%, #fcfcfc 100%); /* FF3.6+ */\\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(48%,#fcfcfc), color-stop(50%,#fafafa), color-stop(100%,#fcfcfc)); /* Chrome,Safari4+ */\\n background: -webkit-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* Chrome10+,Safari5.1+ */\\n background: -o-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* Opera 11.10+ */\\n background: -ms-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* IE10+ */\\n background: linear-gradient(to bottom, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* W3C */\\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc',GradientType=0 ); /* IE6-9 */\\n\\n padding-top:4px;\\n position: absolute;\\n left: 0;\\n top: 0;\\n width: 100%;\\n height: 28px;\\n}\\n\\ndiv.vis-network div.vis-edit-mode {\\n position:absolute;\\n left: 0;\\n top: 5px;\\n height: 30px;\\n}\\n\\n/* FIXME: shouldn't the vis-close button be a child of the vis-manipulation div? */\\n\\ndiv.vis-network div.vis-close {\\n position:absolute;\\n right: 0;\\n top: 0;\\n width: 30px;\\n height: 30px;\\n\\n background-position: 20px 3px;\\n background-repeat: no-repeat;\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAADvGaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjUtYzAyMSA3OS4xNTQ5MTEsIDIwMTMvMTAvMjktMTE6NDc6MTYgICAgICAgICI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgICAgICAgICAgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iCiAgICAgICAgICAgIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIKICAgICAgICAgICAgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8eG1wOkNyZWF0b3JUb29sPkFkb2JlIFBob3Rvc2hvcCBDQyAoV2luZG93cyk8L3htcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhtcDpDcmVhdGVEYXRlPjIwMTQtMDItMTRUMTE6NTU6MzUrMDE6MDA8L3htcDpDcmVhdGVEYXRlPgogICAgICAgICA8eG1wOk1ldGFkYXRhRGF0ZT4yMDE0LTAyLTE0VDEyOjA1OjE3KzAxOjAwPC94bXA6TWV0YWRhdGFEYXRlPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxNC0wMi0xNFQxMjowNToxNyswMTowMDwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXBNTTpJbnN0YW5jZUlEPnhtcC5paWQ6NjU0YmM5YmQtMWI2Yi1jYjRhLTllOWQtNWY2MzgxNDVjZjk0PC94bXBNTTpJbnN0YW5jZUlEPgogICAgICAgICA8eG1wTU06RG9jdW1lbnRJRD54bXAuZGlkOjk4MmM2MGIwLWUzZjMtMDk0MC04MjU0LTFiZTliNWE0ZTE4MzwveG1wTU06RG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD54bXAuZGlkOjk4MmM2MGIwLWUzZjMtMDk0MC04MjU0LTFiZTliNWE0ZTE4MzwveG1wTU06T3JpZ2luYWxEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06SGlzdG9yeT4KICAgICAgICAgICAgPHJkZjpTZXE+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPmNyZWF0ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0Omluc3RhbmNlSUQ+eG1wLmlpZDo5ODJjNjBiMC1lM2YzLTA5NDAtODI1NC0xYmU5YjVhNGUxODM8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTQtMDItMTRUMTE6NTU6MzUrMDE6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDQyAoV2luZG93cyk8L3N0RXZ0OnNvZnR3YXJlQWdlbnQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5zYXZlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjIxODYxNmM2LTM1MWMtNDI0OS04YWFkLWJkZDQ2ZTczNWE0NDwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNC0wMi0xNFQxMTo1NTozNSswMTowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmNoYW5nZWQ+Lzwvc3RFdnQ6Y2hhbmdlZD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPnNhdmVkPC9zdEV2dDphY3Rpb24+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6NjU0YmM5YmQtMWI2Yi1jYjRhLTllOWQtNWY2MzgxNDVjZjk0PC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE0LTAyLTE0VDEyOjA1OjE3KzAxOjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICAgICA8c3RFdnQ6Y2hhbmdlZD4vPC9zdEV2dDpjaGFuZ2VkPgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgPC9yZGY6U2VxPgogICAgICAgICA8L3htcE1NOkhpc3Rvcnk+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgICAgIDxwaG90b3Nob3A6Q29sb3JNb2RlPjM8L3Bob3Rvc2hvcDpDb2xvck1vZGU+CiAgICAgICAgIDxwaG90b3Nob3A6SUNDUHJvZmlsZT5zUkdCIElFQzYxOTY2LTIuMTwvcGhvdG9zaG9wOklDQ1Byb2ZpbGU+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyMDAwMC8xMDAwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+NzIwMDAwLzEwMDAwPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjE8L2V4aWY6Q29sb3JTcGFjZT4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjc8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+NzwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIAo8P3hwYWNrZXQgZW5kPSJ3Ij8+cZUZMwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAA2ElEQVR42gDLADT/AS0tLUQFBQUVFxcXtPHx8fPl5eUNCAgITCkpKesEHx8fGgYGBjH+/v4a+Pj4qgQEBFU6OjodMTExzwQUFBSvEBAQEfX19SD19fVqNDQ0CElJSd/9/f2vAwEBAfrn5+fkBwcHLRYWFgsXFxfz29vbo9LS0uwDDQ0NDfPz81orKysXIyMj+ODg4Avh4eEa/f391gMkJCRYPz8/KUhISOMCAgKh8fHxHRsbGx4UFBQQBDk5OeY7Ozv7CAgItPb29vMEBASaJSUlTQ0NDesDAEwpT0Ko8Ri2AAAAAElFTkSuQmCC');\\n cursor: pointer;\\n -webkit-touch-callout: none;\\n -webkit-user-select: none;\\n -khtml-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n}\\n\\ndiv.vis-network div.vis-close:hover {\\n opacity: 0.6;\\n}\\n\\ndiv.vis-network div.vis-manipulation div.vis-button,\\ndiv.vis-network div.vis-edit-mode div.vis-button {\\n float:left;\\n font-family: verdana;\\n font-size: 12px;\\n -moz-border-radius: 15px;\\n border-radius: 15px;\\n display:inline-block;\\n background-position: 0px 0px;\\n background-repeat:no-repeat;\\n height:24px;\\n margin-left: 10px;\\n /*vertical-align:middle;*/\\n cursor: pointer;\\n padding: 0px 8px 0px 8px;\\n -webkit-touch-callout: none;\\n -webkit-user-select: none;\\n -khtml-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n}\\n\\ndiv.vis-network div.vis-manipulation div.vis-button:hover {\\n box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.20);\\n}\\n\\ndiv.vis-network div.vis-manipulation div.vis-button:active {\\n box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.50);\\n}\\n\\ndiv.vis-network div.vis-manipulation div.vis-button.vis-back {\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAEEOaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjUtYzAyMSA3OS4xNTQ5MTEsIDIwMTMvMTAvMjktMTE6NDc6MTYgICAgICAgICI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgICAgICAgICAgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiCiAgICAgICAgICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpPC94bXA6Q3JlYXRvclRvb2w+CiAgICAgICAgIDx4bXA6Q3JlYXRlRGF0ZT4yMDE0LTAxLTIyVDE5OjI0OjUxKzAxOjAwPC94bXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhtcDpNZXRhZGF0YURhdGU+MjAxNC0wMi0wNFQxNTowMTowOSswMTowMDwveG1wOk1ldGFkYXRhRGF0ZT4KICAgICAgICAgPHhtcDpNb2RpZnlEYXRlPjIwMTQtMDItMDRUMTU6MDE6MDkrMDE6MDA8L3htcDpNb2RpZnlEYXRlPgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8eG1wTU06SW5zdGFuY2VJRD54bXAuaWlkOmI2YjQwMjVkLTAxNjQtMzU0OC1hOTdlLTQ4ZmYxMWM3NTYzMzwveG1wTU06SW5zdGFuY2VJRD4KICAgICAgICAgPHhtcE1NOkRvY3VtZW50SUQ+eG1wLmRpZDpFQTc2MkY5Njc0ODNFMzExOTQ4QkQxM0UyQkU3OTlBMTwveG1wTU06RG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD54bXAuZGlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC94bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpIaXN0b3J5PgogICAgICAgICAgICA8cmRmOlNlcT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+Y3JlYXRlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE0LTAxLTIyVDE5OjI0OjUxKzAxOjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPnNhdmVkPC9zdEV2dDphY3Rpb24+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6RUE2MEEyNEUxOTg0RTMxMUFEQUZFRkU2RUMzMzNFMDM8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTQtMDEtMjNUMTk6MTg6MDcrMDE6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICAgICA8c3RFdnQ6Y2hhbmdlZD4vPC9zdEV2dDpjaGFuZ2VkPgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+c2F2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0Omluc3RhbmNlSUQ+eG1wLmlpZDpmOWQ3OGY4ZC1lNzY0LTc1NDgtODZiNy1iNmQ1OGMzZDg2OTc8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTQtMDItMDRUMTU6MDE6MDkrMDE6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDQyAoV2luZG93cyk8L3N0RXZ0OnNvZnR3YXJlQWdlbnQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpjaGFuZ2VkPi88L3N0RXZ0OmNoYW5nZWQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5jb252ZXJ0ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnBhcmFtZXRlcnM+ZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZzwvc3RFdnQ6cGFyYW1ldGVycz4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPmRlcml2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnBhcmFtZXRlcnM+Y29udmVydGVkIGZyb20gYXBwbGljYXRpb24vdm5kLmFkb2JlLnBob3Rvc2hvcCB0byBpbWFnZS9wbmc8L3N0RXZ0OnBhcmFtZXRlcnM+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5zYXZlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOmI2YjQwMjVkLTAxNjQtMzU0OC1hOTdlLTQ4ZmYxMWM3NTYzMzwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNC0wMi0wNFQxNTowMTowOSswMTowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmNoYW5nZWQ+Lzwvc3RFdnQ6Y2hhbmdlZD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOlNlcT4KICAgICAgICAgPC94bXBNTTpIaXN0b3J5PgogICAgICAgICA8eG1wTU06RGVyaXZlZEZyb20gcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICA8c3RSZWY6aW5zdGFuY2VJRD54bXAuaWlkOmY5ZDc4ZjhkLWU3NjQtNzU0OC04NmI3LWI2ZDU4YzNkODY5Nzwvc3RSZWY6aW5zdGFuY2VJRD4KICAgICAgICAgICAgPHN0UmVmOmRvY3VtZW50SUQ+eG1wLmRpZDpFQTc2MkY5Njc0ODNFMzExOTQ4QkQxM0UyQkU3OTlBMTwvc3RSZWY6ZG9jdW1lbnRJRD4KICAgICAgICAgICAgPHN0UmVmOm9yaWdpbmFsRG9jdW1lbnRJRD54bXAuZGlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC9zdFJlZjpvcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDwveG1wTU06RGVyaXZlZEZyb20+CiAgICAgICAgIDxwaG90b3Nob3A6Q29sb3JNb2RlPjM8L3Bob3Rvc2hvcDpDb2xvck1vZGU+CiAgICAgICAgIDxwaG90b3Nob3A6SUNDUHJvZmlsZT5zUkdCIElFQzYxOTY2LTIuMTwvcGhvdG9zaG9wOklDQ1Byb2ZpbGU+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyMDA5MC8xMDAwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+NzIwMDkwLzEwMDAwPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjE8L2V4aWY6Q29sb3JTcGFjZT4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjI0PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjI0PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz4jq1U/AAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAVTSURBVHjanFVfTFNnFP+d77ve8qeVFbBrpcVgRrCRFikFByLxwSAaE32oRCHD6JMxxhhn8G2RxxH3MsOTbyYsmCAxPMmMMYtkIUYmK60OO0qAK23BFlNob0uh3x7WS5jLZPpLbm6+k/P9zrm5v9855PF4UFhYCABgjIExBgAgIqRSqRIi6gDQRkQ1RGTB3wgR0e8AHgH4Sa/XR/EBiAiJRAJ04cIF5Ofng4g2n0gkUkxENwF0c843LzHGQEQQQkCLExEA9ALotVgsUQAQQmgNQhJCbF5kjCEUCl0moj4t5na7fTU1NUpVVVXUYrEkASAcDhe8efOmxOfzWScmJqoBdBNR99LS0hWz2dynNSSEAF28eBGFhYVgjCEcDn9HRD1EhIMHD3o9Hs9kWVlZAh9BKBQqGB4edr58+dKZ+6JbJpOpBwBWV1fB6+rqIMsyIpHIFcZYL2MMra2tY5cuXRrfuXNnBtvAYDBk3G63oqpqZm5uzgrgSDKZjBoMhueZTAbc5XIhFouVEtFTxhiOHTs2dv78eS8+Efv374+oqpqZnZ21cs5PJJPJPlmWkyynnBuMMTQ0NHi7uro+mVyDx+Pxulwu71ZOlkqlSonoJhGhvb39s8k1nDx50ss5hyRJN9PpdKlERB2aWjSVaEilUvzBgwcORVEs5eXloXPnzk1sV8BkMiUdDofP7/dXZ7PZDilnIhw4cGBeS1pbW2P37t1zBwKBikQiUUREWFhYsHHO0d7evm0Ru90+/+rVq2rO+XGJiJxEhMrKyhgAjI6OWoeHh5tWVla+4JzDZrO9bW5unhwcHGzz+/32np4e+xaDbfoHAMxmc6ijo2O0oqIiJkkSNjY2HBIRmRljMJvNyWfPnln7+/tPMMZQXl6+0NbW9qK2tjYcj8floaEhqKpq+HCkbD3PzMwYBgYG0NXV9UuusFna2kEgELAQEQ4dOvSis7PzN41Ar9dnrl27NqCNkv/C3bt3zy4tLVmICJxzEBFJRBQmorLFxcWCqqqq0Pj4eO3Y2JhbUZTdra2tL2pra8OJRGLHnTt3zkqS9K+huHU4EhHMZnMoGo0W5OIh7nK5jjLGKq1W69vDhw8rRqMxMjc3t2t5eXnX5ORklc/nM+fl5SWnpqa+0uv1K/n5+Ws6nW5NluXNd15e3ppOp1uz2WyzZ86cGQ0Gg6ZAIFCZzWZ/lYjokRDiuN/vt7W0tMw3NTUpbrd78P79++5gMFgRiUTKHj58WMYYQ3V19etTp05tq6Lp6Wkb5xxCiEfc7XZPM8a6FxcXTfX19a/1en2Gcy5qamreNjY2/qGq6joRZe12+9Tp06e3JY/FYgWPHz8+mhvr3/CWlpbk+vp6PmOseWVlBS6XS9GSJUkSdrs93NDQ8Oe+ffvC/8fJIyMjddFo9Esi6pVleVjT2m0A8Hq9zqGhIefnjoknT544A4GAM/eDbxMReFNTE0pKSpKqqsaI6Pj8/LxVVdWM3W6PfCr5xMTE1zllXS0uLn6aSqXAGxsbodPpoNfrn6uqCs75EUVRrJFIZMfevXsXdTrdxseIE4mEPDIyUu/3++tynd8yGo29RIR0Og26fv06ioqKwBgD5xzv3r27zBjrIyJIkgSHwzFZWVmp7NmzJ1ZaWpoAgGg0WqgoSvHMzIw1GAw6tvjhitFo7NPW5fv370Hd3d0oKCgA53zTQMvLy+VCiKuSJH0rSdLmztZytIWv5RPRD0T0Y3Fx8dzWfby6ugopHo//w4mcc8iyPMc5v5FOp7/PZrOdQohWInIC2C2EgBBigYi8Qoifs9lsv06nWyIiaFxagXg8jr8GAGxuIe7LBeWhAAAAAElFTkSuQmCC');\\n}\\n\\ndiv.vis-network div.vis-manipulation div.vis-button.vis-none:hover {\\n box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.0);\\n cursor: default;\\n}\\ndiv.vis-network div.vis-manipulation div.vis-button.vis-none:active {\\n box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.0);\\n}\\ndiv.vis-network div.vis-manipulation div.vis-button.vis-none {\\n padding: 0;\\n}\\ndiv.vis-network div.vis-manipulation div.notification {\\n margin: 2px;\\n font-weight: bold;\\n}\\n\\ndiv.vis-network div.vis-manipulation div.vis-button.vis-add {\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAEEOaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjUtYzAyMSA3OS4xNTQ5MTEsIDIwMTMvMTAvMjktMTE6NDc6MTYgICAgICAgICI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgICAgICAgICAgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiCiAgICAgICAgICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpPC94bXA6Q3JlYXRvclRvb2w+CiAgICAgICAgIDx4bXA6Q3JlYXRlRGF0ZT4yMDE0LTAxLTIyVDE5OjI0OjUxKzAxOjAwPC94bXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhtcDpNZXRhZGF0YURhdGU+MjAxNC0wMi0wNFQxNDo0MDoyOSswMTowMDwveG1wOk1ldGFkYXRhRGF0ZT4KICAgICAgICAgPHhtcDpNb2RpZnlEYXRlPjIwMTQtMDItMDRUMTQ6NDA6MjkrMDE6MDA8L3htcDpNb2RpZnlEYXRlPgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8eG1wTU06SW5zdGFuY2VJRD54bXAuaWlkOjVkNWIwNmQwLTVmMjAtOGE0NC1hMzIwLWZmMTEzMzQwNDc0YjwveG1wTU06SW5zdGFuY2VJRD4KICAgICAgICAgPHhtcE1NOkRvY3VtZW50SUQ+eG1wLmRpZDpFQTc2MkY5Njc0ODNFMzExOTQ4QkQxM0UyQkU3OTlBMTwveG1wTU06RG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD54bXAuZGlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC94bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpIaXN0b3J5PgogICAgICAgICAgICA8cmRmOlNlcT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+Y3JlYXRlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE0LTAxLTIyVDE5OjI0OjUxKzAxOjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPnNhdmVkPC9zdEV2dDphY3Rpb24+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6RUE2MEEyNEUxOTg0RTMxMUFEQUZFRkU2RUMzMzNFMDM8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTQtMDEtMjNUMTk6MTg6MDcrMDE6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICAgICA8c3RFdnQ6Y2hhbmdlZD4vPC9zdEV2dDpjaGFuZ2VkPgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+c2F2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0Omluc3RhbmNlSUQ+eG1wLmlpZDo2OWVmYWE1NS01ZTI5LTIzNGUtYTUzMy0xNDkxYjM1NDNmYmE8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTQtMDItMDRUMTQ6NDA6MjkrMDE6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDQyAoV2luZG93cyk8L3N0RXZ0OnNvZnR3YXJlQWdlbnQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpjaGFuZ2VkPi88L3N0RXZ0OmNoYW5nZWQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5jb252ZXJ0ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnBhcmFtZXRlcnM+ZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZzwvc3RFdnQ6cGFyYW1ldGVycz4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPmRlcml2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnBhcmFtZXRlcnM+Y29udmVydGVkIGZyb20gYXBwbGljYXRpb24vdm5kLmFkb2JlLnBob3Rvc2hvcCB0byBpbWFnZS9wbmc8L3N0RXZ0OnBhcmFtZXRlcnM+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5zYXZlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjVkNWIwNmQwLTVmMjAtOGE0NC1hMzIwLWZmMTEzMzQwNDc0Yjwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNC0wMi0wNFQxNDo0MDoyOSswMTowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmNoYW5nZWQ+Lzwvc3RFdnQ6Y2hhbmdlZD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOlNlcT4KICAgICAgICAgPC94bXBNTTpIaXN0b3J5PgogICAgICAgICA8eG1wTU06RGVyaXZlZEZyb20gcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICA8c3RSZWY6aW5zdGFuY2VJRD54bXAuaWlkOjY5ZWZhYTU1LTVlMjktMjM0ZS1hNTMzLTE0OTFiMzU0M2ZiYTwvc3RSZWY6aW5zdGFuY2VJRD4KICAgICAgICAgICAgPHN0UmVmOmRvY3VtZW50SUQ+eG1wLmRpZDpFQTc2MkY5Njc0ODNFMzExOTQ4QkQxM0UyQkU3OTlBMTwvc3RSZWY6ZG9jdW1lbnRJRD4KICAgICAgICAgICAgPHN0UmVmOm9yaWdpbmFsRG9jdW1lbnRJRD54bXAuZGlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC9zdFJlZjpvcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDwveG1wTU06RGVyaXZlZEZyb20+CiAgICAgICAgIDxwaG90b3Nob3A6Q29sb3JNb2RlPjM8L3Bob3Rvc2hvcDpDb2xvck1vZGU+CiAgICAgICAgIDxwaG90b3Nob3A6SUNDUHJvZmlsZT5zUkdCIElFQzYxOTY2LTIuMTwvcGhvdG9zaG9wOklDQ1Byb2ZpbGU+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyMDA5MC8xMDAwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+NzIwMDkwLzEwMDAwPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjE8L2V4aWY6Q29sb3JTcGFjZT4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjI0PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjI0PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz5WKqp9AAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAYXSURBVHjafFZtUFTXGX7e9z27sveuMCwYV8ElrA7YSFYHtJUPkaaI0aRqG8wP00zUzljDINNSA/2ROtpO24SxnahlxjYd7SSjmUkymcxYlDhQPzHGisEVp8HwYWCVVVgEsrsuLnL74+5uqTF9Z+7cO/d8PO95zvO851BlZSV0XQcAMDOYGQBARDhX3JRmMDYZwLPMWAzGHACYIgwS46oBNBNwtOL8CwE8EkSEUCgE2rJlC2w2G4go8Zwo/bMDgnoG6gxLfAAAYvPDMCCszKTAMIAGAhrWnf15AAAMwwARIRKJgDZv3gy73Q4iAjPjxIr9VVOMRhbAYKB8zvrO0llrfEsdKwLZek6YAPSFvtSu3GtLawu0ZJ6625SHGBQB1T88t6MxvopgMAjaunUrdF0HM+P4yv27DMYeJmB1RqW3Jnf3tQX2p0L4P9EXuqEd7PmDp+XuMU9sRbvXnnt1TxxACgoKYLVacbzsQDUJGkSATe6qi28uPtzusM6Kxie6NHLGUX3lxVUNX9StPHnn4wy3njuUYcu6n2pNi66avcEXnByP/nv8aiaIyrqz2gO5A9+9FI1GIfn5+WhZdTAdjFMkwMvZOy7uWnTAOz3L4Yk71m3t69fdfTDoUGTBeHTUfiHQ6lo7Z2OXJvpDAChKe+aOCdKRKWxZ2+1qb3yyd3GYmRkQ7GQBVs99wfv6on3eR2k4PdTkDEbH7IuS8/svld/561PJS/pDk1/bzwx94pze7xc5v/H+YPY6r5BAkdrJzODTK46lE6PeYEJt7u+8j+OZwCBiEAgAoNgKJoEQf6PvNvdrXgtZoNhSf7q0KZ3B2AQmVMze0Jmt54S/DcDCVig2NcvEUGxJAE4Pl+YOr0iv6BRSIPAmBeBZAmHlE2sH4p1uhrq1s0MnnEQMBsf8wRASAICQQCCITN1X7/sOuc0kgOVp3/fPs2WHv+coG7gQOJUnLGsUCTxEjPzUohEA+NfIWUdtx0+efzA1kSSkIGyBAQNCKgHAEBAJ3u79U7kiAcWoem/gb5Fd33nrH3kp+SMWtuAB+GllMJxMjCx9QRgA3uiqL5kwHiTlpxb3smlfMDGYGPP1hcMAkJvs8ScpfdJspdj+MK6Pf+5+u29vyb4lR4+BGEziVESAkEpw6Av1OhUpHCz4qOXbzFWz4Ncdj/v/o08Lt92ODDgZDCEFJYoUGH4mzugP92puPTf0pD3H7wvfdFZdqSxnMtWjoGAAmG9fOLxjwesdjT2/XzIQ7ks3sycYMSEwGHNtWf5bkX5NkYCJBxUBXiGV0XHvosOt54Zey33j/K+8P33++vjnbiGJbbLE+J9SANAb6nJ2B79wcUwETAwQQ7fMjPzMvfP8ja87HUIKMOiaAqMZhrGmLdAy78eZrwwsTS0eObTs+IdtgVanxBUExqGbb5VzrIISGIoUXsmqbgEhJldCQWqRf27SvPAn/o8XmgLhZsUkR4ll37mhk3n94Z4OlzY/7NLcYZfm7o1z2zT4vsvUNSXqprBCkmiTFbPX90/fh8GIT2sf+zTPdDMf4dVnNg4z+E0ixsGeBs9jd5ViSgLHjCb/peaR+MD3d4/ZJg2llyuG2Vwy7QWAs8PNnn1f7vkGSGxAzE6mk+kxkx/p/4unffSCR0hAoL1EBCYiPNdWNcwkNQTCR7feWX6g+7f/A7I8rcw/U6UEe0Ndrhc/W7mtL9ztmqlSgstSS/zTJ28dalpOpkRryrwbhwBACgsLMWPGDOT4ll3qyeqAkJTdCF7P/CrUY/GkLL1rE+2hTbSH8+0Lb/WEuhzhyaA905blf9Vd/895WnZwLHrPevir/cvOB1oLYpTtLrm6oYGIMDExAaqtrUVKSgqYGSKCk0WHq5ikkWEWtNL0imv5qUW+RclLRjJsrhBAuH1/QL8R7HR4xy5nescuP23E6hOA6mLv+sb4uTw6Ogqqq6uDpmkQkcStorX4XRcM1FjZ+kvFFjCJKU1WpkNJJUqIMtX1RyLeX3JtQ0JRhmGYZ/L27duRnJycuFGISOJ9pqh5lrB6iYgqGOxRrOaa54DcZmKvkJxk8JHC9rKh+KVhOsD4+Dj+MwADIf8n5m4xGwAAAABJRU5ErkJggg==');\\n}\\n\\ndiv.vis-network div.vis-manipulation div.vis-button.vis-edit,\\ndiv.vis-network div.vis-edit-mode div.vis-button.vis-edit {\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAEEOaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjUtYzAyMSA3OS4xNTQ5MTEsIDIwMTMvMTAvMjktMTE6NDc6MTYgICAgICAgICI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgICAgICAgICAgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiCiAgICAgICAgICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpPC94bXA6Q3JlYXRvclRvb2w+CiAgICAgICAgIDx4bXA6Q3JlYXRlRGF0ZT4yMDE0LTAxLTIyVDE5OjI0OjUxKzAxOjAwPC94bXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhtcDpNZXRhZGF0YURhdGU+MjAxNC0wMi0wNVQxNDoxMjoyNSswMTowMDwveG1wOk1ldGFkYXRhRGF0ZT4KICAgICAgICAgPHhtcDpNb2RpZnlEYXRlPjIwMTQtMDItMDVUMTQ6MTI6MjUrMDE6MDA8L3htcDpNb2RpZnlEYXRlPgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8eG1wTU06SW5zdGFuY2VJRD54bXAuaWlkOjY5OTM3ZGZjLTJjNzQtYTU0YS05OTIzLTQyMmZhNDNkMjljNDwveG1wTU06SW5zdGFuY2VJRD4KICAgICAgICAgPHhtcE1NOkRvY3VtZW50SUQ+eG1wLmRpZDpFQTc2MkY5Njc0ODNFMzExOTQ4QkQxM0UyQkU3OTlBMTwveG1wTU06RG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD54bXAuZGlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC94bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpIaXN0b3J5PgogICAgICAgICAgICA8cmRmOlNlcT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+Y3JlYXRlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE0LTAxLTIyVDE5OjI0OjUxKzAxOjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPnNhdmVkPC9zdEV2dDphY3Rpb24+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6RUE2MEEyNEUxOTg0RTMxMUFEQUZFRkU2RUMzMzNFMDM8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTQtMDEtMjNUMTk6MTg6MDcrMDE6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICAgICA8c3RFdnQ6Y2hhbmdlZD4vPC9zdEV2dDpjaGFuZ2VkPgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+c2F2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0Omluc3RhbmNlSUQ+eG1wLmlpZDozOWNhNzE5ZC03YzNlLTUyNGEtYmY1NS03NGVmMmM1MzE0YTc8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTQtMDItMDVUMTQ6MTI6MjUrMDE6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDQyAoV2luZG93cyk8L3N0RXZ0OnNvZnR3YXJlQWdlbnQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpjaGFuZ2VkPi88L3N0RXZ0OmNoYW5nZWQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5jb252ZXJ0ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnBhcmFtZXRlcnM+ZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZzwvc3RFdnQ6cGFyYW1ldGVycz4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPmRlcml2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnBhcmFtZXRlcnM+Y29udmVydGVkIGZyb20gYXBwbGljYXRpb24vdm5kLmFkb2JlLnBob3Rvc2hvcCB0byBpbWFnZS9wbmc8L3N0RXZ0OnBhcmFtZXRlcnM+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5zYXZlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjY5OTM3ZGZjLTJjNzQtYTU0YS05OTIzLTQyMmZhNDNkMjljNDwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNC0wMi0wNVQxNDoxMjoyNSswMTowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmNoYW5nZWQ+Lzwvc3RFdnQ6Y2hhbmdlZD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOlNlcT4KICAgICAgICAgPC94bXBNTTpIaXN0b3J5PgogICAgICAgICA8eG1wTU06RGVyaXZlZEZyb20gcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICA8c3RSZWY6aW5zdGFuY2VJRD54bXAuaWlkOjM5Y2E3MTlkLTdjM2UtNTI0YS1iZjU1LTc0ZWYyYzUzMTRhNzwvc3RSZWY6aW5zdGFuY2VJRD4KICAgICAgICAgICAgPHN0UmVmOmRvY3VtZW50SUQ+eG1wLmRpZDpFQTc2MkY5Njc0ODNFMzExOTQ4QkQxM0UyQkU3OTlBMTwvc3RSZWY6ZG9jdW1lbnRJRD4KICAgICAgICAgICAgPHN0UmVmOm9yaWdpbmFsRG9jdW1lbnRJRD54bXAuZGlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC9zdFJlZjpvcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDwveG1wTU06RGVyaXZlZEZyb20+CiAgICAgICAgIDxwaG90b3Nob3A6Q29sb3JNb2RlPjM8L3Bob3Rvc2hvcDpDb2xvck1vZGU+CiAgICAgICAgIDxwaG90b3Nob3A6SUNDUHJvZmlsZT5zUkdCIElFQzYxOTY2LTIuMTwvcGhvdG9zaG9wOklDQ1Byb2ZpbGU+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyMDA5MC8xMDAwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+NzIwMDkwLzEwMDAwPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjE8L2V4aWY6Q29sb3JTcGFjZT4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjI0PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjI0PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz4ykninAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAYpSURBVHjafFZtTFvnFX7Oea+NudiY2Hwam4CBlgQwXdKREDKUoYg0jbRJ29RJ2VZ1mjRFUxSpA3VTfkzJfkQbS7spU6rtx5Z2UtppScjaHxvLuiatWi2jLEoMIUDCh23g2gbj7+tPuPvhOurawPl1dc99n+c55z33fV46ceIEZFkGADAziAgAQERoe/9ZK4GPM/AcgbsIXAcABCgMvkfAqAa89eDoJyF8LogIqqqChoaGYDAYHr8kItS8uc8iIH6iAa9IkAo5EAQX8pqmgUVBCBggYFgDhv0/GAsBgKZpICJkMhnQ4OAgZFkGEYGZUXmp+0cS+CKBwWA0DVRPOg5Zl2q6zaHyJlnVAMQXVTkwHrUqH0Xsvn+tdQAAMQDgpPLS2MViFY8rkGUZzIzaS/t/xqCzGggtz9e697zsnKhoLUtim4jOq/LE6x7X0nsh16dEZ5a/O3a2SCAOHjwInU6Hujd6ThJ4mCDQ+b2G232v7v6vwarPbQn8MGlMr+X0kpE3Wr5Zt5hL5HPhqYSdQIfKJ+yhxDPKWC6Xg+jt7UXD5b5KBt1kCHS85Ljd8/On3NupfnhFaZj4rWff1B98B1R/hnUmKd36bdtCNl4g0en4edNE/cXwLq8qMTMIPAQwmo/WuHvObA8+9c58k/dKtD0TyZWXN5YGA7ej7epKxspM//7SoNOdWc/Jyq2wiwhDzPxT8cP0jys3VMM7OmL0/77zn4Ydui3b8uiK0jD7RrA77c9Wd57cefPpF+2T6bWsFPWkaiPTCWvTsZpHFU+XrS+8G3AR08F6X+1FJvBxQQzHQOWk2SmrW4FPX/U2LVwPuDZj+fJKl2khPpeyAqA9rzR/YqwuiWXX8taN/CabGkrVuq9YJlkQQDjOAJ5jAhz9Vt9W4N5/rNp8I+vtMV/aZm4zLnUNNt0urdYnF68HWoJj4Wo1mLGUNRr8LEgDgNqeCh8xQIKOsgC7iAjVe83rT9zQa8uNM28u70kspessu8q8zq/V3NcZpVzb9+0zmVhOvvvrhaMVzrJg0zeq7xMVCCwdpnWSGBqjUyJwLTFgbvxie3w31uoWR1Y74r60rdxZqrR8q85t2W2MGCp12bm/KC3hyaSTiMhxuGrKcahqpbjOaDOoEhOEoFqJQCCJvqA85I6bfTdDjQlf2lbxVNlS6wt19yy7jRHZZlDnrinNj/6sHMhnNw2Ogco7O79e5fm/xQywRBBCEAuwn4gQ96bkYj4Vyuq9N1Z3Bj4Od5bs0MXt/dZZ21ctiqFan174q985P+Lfp+U1g7XDON/1ctP458WlVjLyJhOISZE0wM0S1QfuRC3lTjkJAKKEtNC9eIOhSh9xHLZOJRZTFuXDsEoStLkR/768ummsaJG9Pb9oe+9J+xaeSVokiQDSJphAo5uaBuWjiKP4QTqS1cUWU7ayesN66wu22frD1vmVW6GW6T8u9eVjGyZzs+w78Nqu0a2mbvVu1KEJQAgeZRL0liQYyx+GOmKeQpu0rMYsAJPNEFGD2dLodLIy6c9Ys7G8yeSUl3tf2/X3rcBVJSOv34l3sCBogi7z1LH/rBHjl4IJ93/ncQFAnjeImJD0Z8zuCwu9q3djDXqTlAKID5xv+9t2R8n8VcUFBljQ8Gyfe40BYBM4DwDLt8Kue79ZcFkbzfEdbUbv+oN4c9KTtsfm1MbYQqqh+2zrVZYKs/7Ef+byimt1POYiJhDhPBFBIiIEXhxfs7/dfYoIF+auBfYTE/pebx/V8hqBP2ODvD34yvuh/WCAmU75Bx6sIgaI/v5+6PV6JLqUsYr7dpDAoehs0h73pHTWrvKgThYbRSt9UmSjef3MpaUvBz4O72UmADgTOPJguGiZor+/HyUlJWBmJFz+D8xTtlUiOpbwpmrmrweeSXrT+g11k4SBN3RGKUcAVCVdFhyP1nreDbY//NPyEXUlU/Pp4XYycGT6V0Ux2WwWdO7cOZSWlkII8diX7SPPNgDaKdbxoNAxwATBAEkEEgSWCEQAqPAMwqvMdCEwMO0tVqZpWsGTT58+DaPR+PhGIYQAAAgh0P7B3ioW/B0iGiCGiwXbCuOHFSJys6AbYFye2T+xWhT3WYJEIoH/DQBMw3kes8OJPgAAAABJRU5ErkJggg==');\\n}\\n\\ndiv.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode {\\n background-color: #fcfcfc;\\n border: 1px solid #cccccc;\\n}\\n\\ndiv.vis-network div.vis-manipulation div.vis-button.vis-connect {\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAEEOaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjUtYzAyMSA3OS4xNTQ5MTEsIDIwMTMvMTAvMjktMTE6NDc6MTYgICAgICAgICI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgICAgICAgICAgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiCiAgICAgICAgICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpPC94bXA6Q3JlYXRvclRvb2w+CiAgICAgICAgIDx4bXA6Q3JlYXRlRGF0ZT4yMDE0LTAxLTIyVDE5OjI0OjUxKzAxOjAwPC94bXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhtcDpNZXRhZGF0YURhdGU+MjAxNC0wMi0wNFQxNDozODo1NyswMTowMDwveG1wOk1ldGFkYXRhRGF0ZT4KICAgICAgICAgPHhtcDpNb2RpZnlEYXRlPjIwMTQtMDItMDRUMTQ6Mzg6NTcrMDE6MDA8L3htcDpNb2RpZnlEYXRlPgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8eG1wTU06SW5zdGFuY2VJRD54bXAuaWlkOjlmYjUwMDU0LWE3ODEtMWQ0OC05ZTllLTU2ZWQ5YzhlYjdjNjwveG1wTU06SW5zdGFuY2VJRD4KICAgICAgICAgPHhtcE1NOkRvY3VtZW50SUQ+eG1wLmRpZDpFQTc2MkY5Njc0ODNFMzExOTQ4QkQxM0UyQkU3OTlBMTwveG1wTU06RG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD54bXAuZGlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC94bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpIaXN0b3J5PgogICAgICAgICAgICA8cmRmOlNlcT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+Y3JlYXRlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE0LTAxLTIyVDE5OjI0OjUxKzAxOjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPnNhdmVkPC9zdEV2dDphY3Rpb24+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6RUE2MEEyNEUxOTg0RTMxMUFEQUZFRkU2RUMzMzNFMDM8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTQtMDEtMjNUMTk6MTg6MDcrMDE6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICAgICA8c3RFdnQ6Y2hhbmdlZD4vPC9zdEV2dDpjaGFuZ2VkPgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+c2F2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0Omluc3RhbmNlSUQ+eG1wLmlpZDo3ZWRhMjI0MC0yYTQxLTNlNDQtYWM2My1iNzNiYTE5OWI3Y2E8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTQtMDItMDRUMTQ6Mzg6NTcrMDE6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDQyAoV2luZG93cyk8L3N0RXZ0OnNvZnR3YXJlQWdlbnQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpjaGFuZ2VkPi88L3N0RXZ0OmNoYW5nZWQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5jb252ZXJ0ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnBhcmFtZXRlcnM+ZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZzwvc3RFdnQ6cGFyYW1ldGVycz4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPmRlcml2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnBhcmFtZXRlcnM+Y29udmVydGVkIGZyb20gYXBwbGljYXRpb24vdm5kLmFkb2JlLnBob3Rvc2hvcCB0byBpbWFnZS9wbmc8L3N0RXZ0OnBhcmFtZXRlcnM+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5zYXZlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjlmYjUwMDU0LWE3ODEtMWQ0OC05ZTllLTU2ZWQ5YzhlYjdjNjwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNC0wMi0wNFQxNDozODo1NyswMTowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmNoYW5nZWQ+Lzwvc3RFdnQ6Y2hhbmdlZD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOlNlcT4KICAgICAgICAgPC94bXBNTTpIaXN0b3J5PgogICAgICAgICA8eG1wTU06RGVyaXZlZEZyb20gcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICA8c3RSZWY6aW5zdGFuY2VJRD54bXAuaWlkOjdlZGEyMjQwLTJhNDEtM2U0NC1hYzYzLWI3M2JhMTk5YjdjYTwvc3RSZWY6aW5zdGFuY2VJRD4KICAgICAgICAgICAgPHN0UmVmOmRvY3VtZW50SUQ+eG1wLmRpZDpFQTc2MkY5Njc0ODNFMzExOTQ4QkQxM0UyQkU3OTlBMTwvc3RSZWY6ZG9jdW1lbnRJRD4KICAgICAgICAgICAgPHN0UmVmOm9yaWdpbmFsRG9jdW1lbnRJRD54bXAuZGlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC9zdFJlZjpvcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDwveG1wTU06RGVyaXZlZEZyb20+CiAgICAgICAgIDxwaG90b3Nob3A6Q29sb3JNb2RlPjM8L3Bob3Rvc2hvcDpDb2xvck1vZGU+CiAgICAgICAgIDxwaG90b3Nob3A6SUNDUHJvZmlsZT5zUkdCIElFQzYxOTY2LTIuMTwvcGhvdG9zaG9wOklDQ1Byb2ZpbGU+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyMDA5MC8xMDAwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+NzIwMDkwLzEwMDAwPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjE8L2V4aWY6Q29sb3JTcGFjZT4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjI0PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjI0PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz4ubxs+AAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAUtSURBVHjajJZ/bNT1Gcdfz/P53PV6B4W7VltLqdAaplIOiMOoyxxJCSs/Gv/yB4gzJroAosmmDklwkYWR0bQsdmkykoojTpcsWYLxD/lRZdMQkTHRtkLZRqG0tIVe7662vTu43n32x/VKZ/jh89cn38/zvN7P5/l88zwf2blzJz6fDwARQUSm1n8s31CM0/VAnbNmsUPuAsDpgEO+Bg4C7//iyv5hvmMiQiqVQpqamvB6vVNwEeG1JZtCBrYi/MrkAwDNgjhwAlbzICBLA0rDb0+/839C6XQaaWxspLCw8Dp86cbNmqVFJQddE6KzdjZ9D89g+B6fSyCOcyn1nxil+O9xKg5HqWFSHGXLjrP7W/ICqVQK2bNnDz6fDxFh65KNvxbHDhF4rJj2bXPo+IGfcW5h5xL4f99P+FCEMIAob75x9t0dAMlkElNXV4e1lteXbNqiQoMaeOFOjrdU868SD2luYyEP6dUh+sYmSHeOU6GO5Z8VLx5+NNZxIpPJ5AS2L3upROCoCvz8Lo7vnkf77cAHhpiz/zIL9vWz8L8p/NvupmM0Q7pjnAoLqz8tDrc8MnQqYVUVhVdF4LEg7b+rvDn8wDDlH0WoPpukLJImSBaMwjcJqmwWts2jPZLG/8kwYVFeVdXXZcFf4yVDc2cNKfBFmD9X+0ncCP58F48eG+Feo2CAUkvs4dl0V/uJvdXLiiV+ut++n7YLSfxPfMMG54ChzB3WIesVWB2i82bw1AR6fJR7C4VsfYiv6u/k3A9nEgP4zXke8DiYHyAOMK+QxPIgnZ9GqSHr1itQJ8DK2fTerDQ+S/bHRXQJaHSCwNIZ2Xh+7+S3VAmwNMBA/tuPZtErgKquUmdMWIFlRURvdamRNEXGwIWrlP47pTMzLiunxghGMwTLvcTWlHAp77s4QNSrYMQtss6ZMgWqCm5cHoDHO1nbk6K8zEN8+3zatv2Hn1b59EqJZdxmYUERg9P9KwpIiAOTdWUWBXuLzB/vZG3P1Un4PNp2d1MbmyD45TWCxuCsQm0x56bHGHFYEZwxok7toAA9Sfw3hCcoL/NOwi9QO5wmWO1j4JEgZxTkodmcWRGkf3pcX0r8xoAaBixKu4U5/xwndM+0tpAvS6mP+PZK2nb1UBvPEKwKMLDvPj4ESGc55lGy303sdJKQdZB2rkMdctAB/4gzN+/Q2ENNd4LyUi/xN+bTtquX2thk5nk4wI3gAF+OMNcA1nFQDfK+BY5GqbkwWabTY5QZhXWlnNx1ntrY1Rz87fuvw29m/Sn8J+PUGAFj5T19baA1IspuBZp7cx1x4SwG1cEf+lgRSROs8jGwb+Ht4QB/GSSsAhYano39LWIBxNEIbP14hPDuiyS2VtJuHXQlKKvxM/jiXDq/D/xPlwifGMkJZB2NIoKpr69nxeiZxLHicFSFVWfGqBidIP3LSjrWltD94CyufF/4kQgPuVz2Lz93+dDRa9eu5QQ8Hg8/iXee+Dy4CKMs7xqn4nwKz9IirhQqmVuB42m8ey+x7LMoD6iAON782eChhqmRuXfvXgKBAKqKqtI0/8nNKrQI4BVYXkzHgzPpC88gWuHL/caXrhLoGiN0apSKr0ZZRBZM7q2w5ZnLR1oAnHOMjY0hra2tFBQUYIyZmstvVT1Z6eDlAuEVq7merxmwueNPDXy9PvybjKP5mctHLk4/XTKZRJqbm/H7/VNw1VyEMYbW4FN3WNWnnchKoy5sHeVGBRX6VWi3ymFx7r11Ix8MTX/y5C2RSPC/AQB61erowbpqSwAAAABJRU5ErkJggg==');\\n}\\n\\ndiv.vis-network div.vis-manipulation div.vis-button.vis-delete {\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAEEOaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjUtYzAyMSA3OS4xNTQ5MTEsIDIwMTMvMTAvMjktMTE6NDc6MTYgICAgICAgICI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgICAgICAgICAgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiCiAgICAgICAgICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpPC94bXA6Q3JlYXRvclRvb2w+CiAgICAgICAgIDx4bXA6Q3JlYXRlRGF0ZT4yMDE0LTAxLTIyVDE5OjI0OjUxKzAxOjAwPC94bXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhtcDpNZXRhZGF0YURhdGU+MjAxNC0wMi0wNFQxNDo0MTowNCswMTowMDwveG1wOk1ldGFkYXRhRGF0ZT4KICAgICAgICAgPHhtcDpNb2RpZnlEYXRlPjIwMTQtMDItMDRUMTQ6NDE6MDQrMDE6MDA8L3htcDpNb2RpZnlEYXRlPgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8eG1wTU06SW5zdGFuY2VJRD54bXAuaWlkOjc3NDkzYmUxLTEyZGItOTg0NC1iNDYyLTg2NGVmNGIzMzM3MTwveG1wTU06SW5zdGFuY2VJRD4KICAgICAgICAgPHhtcE1NOkRvY3VtZW50SUQ+eG1wLmRpZDpFQTc2MkY5Njc0ODNFMzExOTQ4QkQxM0UyQkU3OTlBMTwveG1wTU06RG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD54bXAuZGlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC94bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpIaXN0b3J5PgogICAgICAgICAgICA8cmRmOlNlcT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+Y3JlYXRlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE0LTAxLTIyVDE5OjI0OjUxKzAxOjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPnNhdmVkPC9zdEV2dDphY3Rpb24+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6RUE2MEEyNEUxOTg0RTMxMUFEQUZFRkU2RUMzMzNFMDM8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTQtMDEtMjNUMTk6MTg6MDcrMDE6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICAgICA8c3RFdnQ6Y2hhbmdlZD4vPC9zdEV2dDpjaGFuZ2VkPgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+c2F2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0Omluc3RhbmNlSUQ+eG1wLmlpZDowNmE3NWYwMy04MDdhLWUzNGYtYjk1Zi1jZGU2MjM0Mzg4OGY8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTQtMDItMDRUMTQ6NDE6MDQrMDE6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDQyAoV2luZG93cyk8L3N0RXZ0OnNvZnR3YXJlQWdlbnQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpjaGFuZ2VkPi88L3N0RXZ0OmNoYW5nZWQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5jb252ZXJ0ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnBhcmFtZXRlcnM+ZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZzwvc3RFdnQ6cGFyYW1ldGVycz4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPmRlcml2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnBhcmFtZXRlcnM+Y29udmVydGVkIGZyb20gYXBwbGljYXRpb24vdm5kLmFkb2JlLnBob3Rvc2hvcCB0byBpbWFnZS9wbmc8L3N0RXZ0OnBhcmFtZXRlcnM+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5zYXZlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjc3NDkzYmUxLTEyZGItOTg0NC1iNDYyLTg2NGVmNGIzMzM3MTwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNC0wMi0wNFQxNDo0MTowNCswMTowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmNoYW5nZWQ+Lzwvc3RFdnQ6Y2hhbmdlZD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOlNlcT4KICAgICAgICAgPC94bXBNTTpIaXN0b3J5PgogICAgICAgICA8eG1wTU06RGVyaXZlZEZyb20gcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICA8c3RSZWY6aW5zdGFuY2VJRD54bXAuaWlkOjA2YTc1ZjAzLTgwN2EtZTM0Zi1iOTVmLWNkZTYyMzQzODg4Zjwvc3RSZWY6aW5zdGFuY2VJRD4KICAgICAgICAgICAgPHN0UmVmOmRvY3VtZW50SUQ+eG1wLmRpZDpFQTc2MkY5Njc0ODNFMzExOTQ4QkQxM0UyQkU3OTlBMTwvc3RSZWY6ZG9jdW1lbnRJRD4KICAgICAgICAgICAgPHN0UmVmOm9yaWdpbmFsRG9jdW1lbnRJRD54bXAuZGlkOjczQjYyQUFEOTE4M0UzMTE5NDhCRDEzRTJCRTc5OUExPC9zdFJlZjpvcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDwveG1wTU06RGVyaXZlZEZyb20+CiAgICAgICAgIDxwaG90b3Nob3A6Q29sb3JNb2RlPjM8L3Bob3Rvc2hvcDpDb2xvck1vZGU+CiAgICAgICAgIDxwaG90b3Nob3A6SUNDUHJvZmlsZT5zUkdCIElFQzYxOTY2LTIuMTwvcGhvdG9zaG9wOklDQ1Byb2ZpbGU+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyMDA5MC8xMDAwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+NzIwMDkwLzEwMDAwPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjE8L2V4aWY6Q29sb3JTcGFjZT4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjI0PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjI0PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz4aYJzYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAYGSURBVHjalJZ7UJTnFcZ/73m/72PdJY1RbhoQp6lkXRAvmIYxdCUadLVOozPNtGObap1JsKipjiShbdoRbeKEiQHpQK3xj0xa03aamTbaTGyAYV1QGeqFi+JyiZFLAlmESBkWRmS3fyzslGkmnZ5/v/M873Oe75zzvqqoqAibzQaAiKCUAkApRdHIK/NFsx2NR91nOSILADDoJyzNaM4xxbtvPHh0iC+JiYkJ1OHDh4mJiUEpFSXPv/ziPC28TIiXDCOSrAClQDSEpsCwJPIhrEBRQpiSytXlQwDhcBilFPfu3UMVFxdjt9ujFTzfcLBADCoEEAFr1ZbrrNjch2vtEImPBgHob7fTcWE+bVXJNJ/NiFQlEGLvieXHKmYqGB8fRx05cgSbzYaIsPvywV8pKFaA7fGtLTzz61YWpo/xVTHQbufsq5lcez9zWuWhk5mvFwMEg0H0+vXrMU2Tn1wp3CtCiQ5DjGd3A/m/v8IDCZP8r4iNmyRrWx/j/5qktykZpXKzAjVDVxPzGqemptDr1q1jX3NRnIJarcDKK2hgR2ULXRfncv7UYv7xpovhnhiW5Mz+kefeSKO6LJ1A1xzEuk/Ojm4mRibpuZaMZW3OCtRUND60NmiICCIUShisx7a2sLMiQn4s77uEQgIabnqdfHIlgT1/qQeg8vs5dHhdCNB1wYn3RIiC995j26stjAbsNH+YiZJCESnS1Y/XxIXu8r4YIPv/VkVs3CTnTy2ms34xro1+sp9po6sxlTu34ultmsPVvy6is86FCHgO+DDs49zpjufBpCG+seYOC9OHaTidieicb9ouVAhKtouAseI710ma7pLuqwmgYfHqAFt+6WdLoQ/LBl11Lm7VudAa8vb72PCin9TlAWIsGGhLACD+kSAZnusYBii1XQAPYWDllt6ov2lrBkDBR2+6Ofuak2//3M+G/T4wAAPW7fPhKfRTVeqk9qQbFKRmDUTxS3N7QYGYmwzCkqklBGlPDEcTNv+sg9tNCbTXuvBWujE0bHrZj9JE1B/wU1Pm5PwJN6YBS9a2kVvQEcWnrh5GTFD3lxkYkqRMgYQlwVldUvDnen73LHTUuqitdKM0eAr9AFQfd1J/yo2aJn+2sn4Wdn5qEFODJskgBIjx5T0uCrQA08pnIjS9PERDjPnfOKXAMEBECUoGEIHBj+2zkt76UQ6dXheGAev3+cg74Kf6uJPqcicbfuond7cPy4SOiy7+tD9nFvZurx00KOk3CNEC+mE+vjSPBc7IWqgqTaPT60IMcO/xsXGa3HfKjRgRdbl7/KDg0jtubje6aHj7c7J3dgLQ2zoPwwQ91SooOQdAW1VKVMHty0kA5Bb48BycJn/LjWFGbLv4thvvb53kFvjJ+XEdWkPfjQVR/CcNKYgGMc8JWt5Fa2j+MIPPuyI2pa4IoHSkt6vLIuRaQ9q32khzt4GCxtNu6k46GeiIR2lIfDQQsafPzq1LGRGL9Gk9d+vrwewvfHPQOoexQVjxdB/auk/zmaUMdsfz6bVUtIalT7bxveP1ZHh6GPDPYeSzeD69kcpIfxymFWLNrka+ljhBTWkWwz2JiJT84YHnz2iPx0P20PkmRF5i6HYiwZFJsn/YzdezbzE3cQibY5xV266z6RfXohakb+xB9CjanCD9qTbW7Grk4WV38VZm0l6dhQiEw9taHSuDqrS0FIfDwXM3X9mHMsvRAk/sauDpQy38P+GtzOTGB9mEpkD0C2dS8n8zOjqK9ng8WJZFU+JTjasGvaCNXPpvJBPoMlm0OoDNMfWVxONfWNSUPUZ7TUQ56tCZlPwSgMnJSVRpaSmxsbFE1raw82ZxAZZRQUiBYUKGp5UlOX2krBzmoUVjiIKhHge9rfPo+Wcy3ZeXIYASgL1/X5RfMXMvj46OosrLy7HZbGitUUohIuzoem0RofALaOsghgWGjky0MiJTL8b0lOvI8hN1DKXKP0jd3TNTWDgcJhgMoo4ePYrD4Yi+KmaeLlprnrtXFo9h/AAlG1AqE8yFmBrC+jO0bgH9EVpO/1F2Dc5g//OAsbEx/j0Af+USsQynL1UAAAAASUVORK5CYII=');\\n}\\n/* top right bottom left */\\ndiv.vis-network div.vis-manipulation div.vis-label,\\ndiv.vis-network div.vis-edit-mode div.vis-label {\\n margin: 0 0 0 23px;\\n line-height: 25px;\\n}\\ndiv.vis-network div.vis-manipulation div.vis-separator-line {\\n float:left;\\n display:inline-block;\\n width:1px;\\n height:21px;\\n background-color: #bdbdbd;\\n margin: 0px 7px 0 15px; /*top right bottom left*/\\n}\\n\\n/* TODO: is this redundant?\\ndiv.network-navigation_wrapper {\\n position: absolute;\\n left: 0;\\n top: 0;\\n width: 100%;\\n height: 100%;\\n}\\n*/\\n\";\nstyleInject(css_248z$3);\n\n/**\n * Clears the toolbar div element of children\n *\n * @private\n */\n\nvar ManipulationSystem = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n * @param {SelectionHandler} selectionHandler\n * @param {InteractionHandler} interactionHandler\n */\n function ManipulationSystem(body, canvas, selectionHandler, interactionHandler) {\n var _this = this,\n _context,\n _context2;\n\n classCallCheck(this, ManipulationSystem);\n\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n this.interactionHandler = interactionHandler;\n this.editMode = false;\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n this.manipulationHammers = [];\n this.temporaryUIFunctions = {};\n this.temporaryEventFunctions = [];\n this.touchTime = 0;\n this.temporaryIds = {\n nodes: [],\n edges: []\n };\n this.guiEnabled = false;\n this.inMode = false;\n this.selectedControlNode = undefined;\n this.options = {};\n this.defaultOptions = {\n enabled: false,\n initiallyActive: false,\n addNode: true,\n addEdge: true,\n editNode: undefined,\n editEdge: true,\n deleteNode: true,\n deleteEdge: true,\n controlNodeStyle: {\n shape: 'dot',\n size: 6,\n color: {\n background: '#ff0000',\n border: '#3c3c3c',\n highlight: {\n background: '#07f968',\n border: '#3c3c3c'\n }\n },\n borderWidth: 2,\n borderWidthSelected: 2\n }\n };\n\n assign$2(this.options, this.defaultOptions);\n\n this.body.emitter.on('destroy', function () {\n _this._clean();\n });\n this.body.emitter.on('_dataChanged', bind$2(_context = this._restore).call(_context, this));\n this.body.emitter.on('_resetData', bind$2(_context2 = this._restore).call(_context2, this));\n }\n /**\n * If something changes in the data during editing, switch back to the initial datamanipulation state and close all edit modes.\n * @private\n */\n\n\n createClass(ManipulationSystem, [{\n key: \"_restore\",\n value: function _restore() {\n if (this.inMode !== false) {\n if (this.options.initiallyActive === true) {\n this.enableEditMode();\n } else {\n this.disableEditMode();\n }\n }\n }\n /**\n * Set the Options\n *\n * @param {Object} options\n * @param {Object} allOptions\n * @param {Object} globalOptions\n */\n\n }, {\n key: \"setOptions\",\n value: function setOptions(options, allOptions, globalOptions) {\n if (allOptions !== undefined) {\n if (allOptions.locale !== undefined) {\n this.options.locale = allOptions.locale;\n } else {\n this.options.locale = globalOptions.locale;\n }\n\n if (allOptions.locales !== undefined) {\n this.options.locales = allOptions.locales;\n } else {\n this.options.locales = globalOptions.locales;\n }\n }\n\n if (options !== undefined) {\n if (typeof options === 'boolean') {\n this.options.enabled = options;\n } else {\n this.options.enabled = true;\n deepExtend(this.options, options);\n }\n\n if (this.options.initiallyActive === true) {\n this.editMode = true;\n }\n\n this._setup();\n }\n }\n /**\n * Enable or disable edit-mode. Draws the DOM required and cleans up after itself.\n *\n * @private\n */\n\n }, {\n key: \"toggleEditMode\",\n value: function toggleEditMode() {\n if (this.editMode === true) {\n this.disableEditMode();\n } else {\n this.enableEditMode();\n }\n }\n /**\n * Enables Edit Mode\n */\n\n }, {\n key: \"enableEditMode\",\n value: function enableEditMode() {\n this.editMode = true;\n\n this._clean();\n\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = 'block';\n this.closeDiv.style.display = 'block';\n this.editModeDiv.style.display = 'none';\n this.showManipulatorToolbar();\n }\n }\n /**\n * Disables Edit Mode\n */\n\n }, {\n key: \"disableEditMode\",\n value: function disableEditMode() {\n this.editMode = false;\n\n this._clean();\n\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = 'none';\n this.closeDiv.style.display = 'none';\n this.editModeDiv.style.display = 'block';\n\n this._createEditButton();\n }\n }\n /**\n * Creates the main toolbar. Removes functions bound to the select event. Binds all the buttons of the toolbar.\n *\n * @private\n */\n\n }, {\n key: \"showManipulatorToolbar\",\n value: function showManipulatorToolbar() {\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean(); // reset global variables\n\n\n this.manipulationDOM = {}; // if the gui is enabled, draw all elements.\n\n if (this.guiEnabled === true) {\n var _context3, _context4;\n\n // a _restore will hide these menus\n this.editMode = true;\n this.manipulationDiv.style.display = 'block';\n this.closeDiv.style.display = 'block';\n\n var selectedNodeCount = this.selectionHandler._getSelectedNodeCount();\n\n var selectedEdgeCount = this.selectionHandler._getSelectedEdgeCount();\n\n var selectedTotalCount = selectedNodeCount + selectedEdgeCount;\n var locale = this.options.locales[this.options.locale];\n var needSeperator = false;\n\n if (this.options.addNode !== false) {\n this._createAddNodeButton(locale);\n\n needSeperator = true;\n }\n\n if (this.options.addEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(1);\n } else {\n needSeperator = true;\n }\n\n this._createAddEdgeButton(locale);\n }\n\n if (selectedNodeCount === 1 && typeof this.options.editNode === 'function') {\n if (needSeperator === true) {\n this._createSeperator(2);\n } else {\n needSeperator = true;\n }\n\n this._createEditNodeButton(locale);\n } else if (selectedEdgeCount === 1 && selectedNodeCount === 0 && this.options.editEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(3);\n } else {\n needSeperator = true;\n }\n\n this._createEditEdgeButton(locale);\n } // remove buttons\n\n\n if (selectedTotalCount !== 0) {\n if (selectedNodeCount > 0 && this.options.deleteNode !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n\n this._createDeleteButton(locale);\n } else if (selectedNodeCount === 0 && this.options.deleteEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n\n this._createDeleteButton(locale);\n }\n } // bind the close button\n\n\n this._bindHammerToDiv(this.closeDiv, bind$2(_context3 = this.toggleEditMode).call(_context3, this)); // refresh this bar based on what has been selected\n\n\n this._temporaryBindEvent('select', bind$2(_context4 = this.showManipulatorToolbar).call(_context4, this));\n } // redraw to show any possible changes\n\n\n this.body.emitter.emit('_redraw');\n }\n /**\n * Create the toolbar for adding Nodes\n */\n\n }, {\n key: \"addNodeMode\",\n value: function addNodeMode() {\n var _context6;\n\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n } // restore the state of any bound functions or events, remove control nodes, restore physics\n\n\n this._clean();\n\n this.inMode = 'addNode';\n\n if (this.guiEnabled === true) {\n var _context5;\n\n var locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n\n this._createBackButton(locale);\n\n this._createSeperator();\n\n this._createDescription(locale['addDescription'] || this.options.locales['en']['addDescription']); // bind the close button\n\n\n this._bindHammerToDiv(this.closeDiv, bind$2(_context5 = this.toggleEditMode).call(_context5, this));\n }\n\n this._temporaryBindEvent('click', bind$2(_context6 = this._performAddNode).call(_context6, this));\n }\n /**\n * call the bound function to handle the editing of the node. The node has to be selected.\n */\n\n }, {\n key: \"editNode\",\n value: function editNode() {\n var _this2 = this;\n\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n } // restore the state of any bound functions or events, remove control nodes, restore physics\n\n\n this._clean();\n\n var node = this.selectionHandler._getSelectedNode();\n\n if (node !== undefined) {\n this.inMode = 'editNode';\n\n if (typeof this.options.editNode === 'function') {\n if (node.isCluster !== true) {\n var data = deepExtend({}, node.options, false);\n data.x = node.x;\n data.y = node.y;\n\n if (this.options.editNode.length === 2) {\n this.options.editNode(data, function (finalizedData) {\n if (finalizedData !== null && finalizedData !== undefined && _this2.inMode === 'editNode') {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n _this2.body.data.nodes.getDataSet().update(finalizedData);\n }\n\n _this2.showManipulatorToolbar();\n });\n } else {\n throw new Error('The function for edit does not support two arguments (data, callback)');\n }\n } else {\n alert(this.options.locales[this.options.locale]['editClusterError'] || this.options.locales['en']['editClusterError']);\n }\n } else {\n throw new Error('No function has been configured to handle the editing of nodes.');\n }\n } else {\n this.showManipulatorToolbar();\n }\n }\n /**\n * create the toolbar to connect nodes\n */\n\n }, {\n key: \"addEdgeMode\",\n value: function addEdgeMode() {\n var _context8, _context9, _context10, _context11, _context12;\n\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n } // restore the state of any bound functions or events, remove control nodes, restore physics\n\n\n this._clean();\n\n this.inMode = 'addEdge';\n\n if (this.guiEnabled === true) {\n var _context7;\n\n var locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n\n this._createBackButton(locale);\n\n this._createSeperator();\n\n this._createDescription(locale['edgeDescription'] || this.options.locales['en']['edgeDescription']); // bind the close button\n\n\n this._bindHammerToDiv(this.closeDiv, bind$2(_context7 = this.toggleEditMode).call(_context7, this));\n } // temporarily overload functions\n\n\n this._temporaryBindUI('onTouch', bind$2(_context8 = this._handleConnect).call(_context8, this));\n\n this._temporaryBindUI('onDragEnd', bind$2(_context9 = this._finishConnect).call(_context9, this));\n\n this._temporaryBindUI('onDrag', bind$2(_context10 = this._dragControlNode).call(_context10, this));\n\n this._temporaryBindUI('onRelease', bind$2(_context11 = this._finishConnect).call(_context11, this));\n\n this._temporaryBindUI('onDragStart', bind$2(_context12 = this._dragStartEdge).call(_context12, this));\n\n this._temporaryBindUI('onHold', function () {});\n }\n /**\n * create the toolbar to edit edges\n */\n\n }, {\n key: \"editEdgeMode\",\n value: function editEdgeMode() {\n // when using the gui, enable edit mode if it wasn't already.\n if (this.editMode !== true) {\n this.enableEditMode();\n } // restore the state of any bound functions or events, remove control nodes, restore physics\n\n\n this._clean();\n\n this.inMode = 'editEdge';\n\n if (_typeof_1(this.options.editEdge) === 'object' && typeof this.options.editEdge.editWithoutDrag === \"function\") {\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0];\n\n if (this.edgeBeingEditedId !== undefined) {\n var edge = this.body.edges[this.edgeBeingEditedId];\n\n this._performEditEdge(edge.from.id, edge.to.id);\n\n return;\n }\n }\n\n if (this.guiEnabled === true) {\n var _context13;\n\n var locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n\n this._createBackButton(locale);\n\n this._createSeperator();\n\n this._createDescription(locale['editEdgeDescription'] || this.options.locales['en']['editEdgeDescription']); // bind the close button\n\n\n this._bindHammerToDiv(this.closeDiv, bind$2(_context13 = this.toggleEditMode).call(_context13, this));\n }\n\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0];\n\n if (this.edgeBeingEditedId !== undefined) {\n var _context14, _context15, _context16, _context17;\n\n var _edge = this.body.edges[this.edgeBeingEditedId]; // create control nodes\n\n var controlNodeFrom = this._getNewTargetNode(_edge.from.x, _edge.from.y);\n\n var controlNodeTo = this._getNewTargetNode(_edge.to.x, _edge.to.y);\n\n this.temporaryIds.nodes.push(controlNodeFrom.id);\n this.temporaryIds.nodes.push(controlNodeTo.id);\n this.body.nodes[controlNodeFrom.id] = controlNodeFrom;\n this.body.nodeIndices.push(controlNodeFrom.id);\n this.body.nodes[controlNodeTo.id] = controlNodeTo;\n this.body.nodeIndices.push(controlNodeTo.id); // temporarily overload UI functions, cleaned up automatically because of _temporaryBindUI\n\n this._temporaryBindUI('onTouch', bind$2(_context14 = this._controlNodeTouch).call(_context14, this)); // used to get the position\n\n\n this._temporaryBindUI('onTap', function () {}); // disabled\n\n\n this._temporaryBindUI('onHold', function () {}); // disabled\n\n\n this._temporaryBindUI('onDragStart', bind$2(_context15 = this._controlNodeDragStart).call(_context15, this)); // used to select control node\n\n\n this._temporaryBindUI('onDrag', bind$2(_context16 = this._controlNodeDrag).call(_context16, this)); // used to drag control node\n\n\n this._temporaryBindUI('onDragEnd', bind$2(_context17 = this._controlNodeDragEnd).call(_context17, this)); // used to connect or revert control nodes\n\n\n this._temporaryBindUI('onMouseMove', function () {}); // disabled\n // create function to position control nodes correctly on movement\n // automatically cleaned up because we use the temporary bind\n\n\n this._temporaryBindEvent('beforeDrawing', function (ctx) {\n var positions = _edge.edgeType.findBorderPositions(ctx);\n\n if (controlNodeFrom.selected === false) {\n controlNodeFrom.x = positions.from.x;\n controlNodeFrom.y = positions.from.y;\n }\n\n if (controlNodeTo.selected === false) {\n controlNodeTo.x = positions.to.x;\n controlNodeTo.y = positions.to.y;\n }\n });\n\n this.body.emitter.emit('_redraw');\n } else {\n this.showManipulatorToolbar();\n }\n }\n /**\n * delete everything in the selection\n */\n\n }, {\n key: \"deleteSelected\",\n value: function deleteSelected() {\n var _this3 = this;\n\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n } // restore the state of any bound functions or events, remove control nodes, restore physics\n\n\n this._clean();\n\n this.inMode = 'delete';\n var selectedNodes = this.selectionHandler.getSelectedNodes();\n var selectedEdges = this.selectionHandler.getSelectedEdges();\n var deleteFunction = undefined;\n\n if (selectedNodes.length > 0) {\n for (var i = 0; i < selectedNodes.length; i++) {\n if (this.body.nodes[selectedNodes[i]].isCluster === true) {\n alert(this.options.locales[this.options.locale]['deleteClusterError'] || this.options.locales['en']['deleteClusterError']);\n return;\n }\n }\n\n if (typeof this.options.deleteNode === 'function') {\n deleteFunction = this.options.deleteNode;\n }\n } else if (selectedEdges.length > 0) {\n if (typeof this.options.deleteEdge === 'function') {\n deleteFunction = this.options.deleteEdge;\n }\n }\n\n if (typeof deleteFunction === 'function') {\n var data = {\n nodes: selectedNodes,\n edges: selectedEdges\n };\n\n if (deleteFunction.length === 2) {\n deleteFunction(data, function (finalizedData) {\n if (finalizedData !== null && finalizedData !== undefined && _this3.inMode === 'delete') {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n _this3.body.data.edges.getDataSet().remove(finalizedData.edges);\n\n _this3.body.data.nodes.getDataSet().remove(finalizedData.nodes);\n\n _this3.body.emitter.emit('startSimulation');\n\n _this3.showManipulatorToolbar();\n } else {\n _this3.body.emitter.emit('startSimulation');\n\n _this3.showManipulatorToolbar();\n }\n });\n } else {\n throw new Error('The function for delete does not support two arguments (data, callback)');\n }\n } else {\n this.body.data.edges.getDataSet().remove(selectedEdges);\n this.body.data.nodes.getDataSet().remove(selectedNodes);\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n } //********************************************** PRIVATE ***************************************//\n\n /**\n * draw or remove the DOM\n * @private\n */\n\n }, {\n key: \"_setup\",\n value: function _setup() {\n if (this.options.enabled === true) {\n // Enable the GUI\n this.guiEnabled = true;\n\n this._createWrappers();\n\n if (this.editMode === false) {\n this._createEditButton();\n } else {\n this.showManipulatorToolbar();\n }\n } else {\n this._removeManipulationDOM(); // disable the gui\n\n\n this.guiEnabled = false;\n }\n }\n /**\n * create the div overlays that contain the DOM\n * @private\n */\n\n }, {\n key: \"_createWrappers\",\n value: function _createWrappers() {\n // load the manipulator HTML elements. All styling done in css.\n if (this.manipulationDiv === undefined) {\n this.manipulationDiv = document.createElement('div');\n this.manipulationDiv.className = 'vis-manipulation';\n\n if (this.editMode === true) {\n this.manipulationDiv.style.display = 'block';\n } else {\n this.manipulationDiv.style.display = 'none';\n }\n\n this.canvas.frame.appendChild(this.manipulationDiv);\n } // container for the edit button.\n\n\n if (this.editModeDiv === undefined) {\n this.editModeDiv = document.createElement('div');\n this.editModeDiv.className = 'vis-edit-mode';\n\n if (this.editMode === true) {\n this.editModeDiv.style.display = 'none';\n } else {\n this.editModeDiv.style.display = 'block';\n }\n\n this.canvas.frame.appendChild(this.editModeDiv);\n } // container for the close div button\n\n\n if (this.closeDiv === undefined) {\n this.closeDiv = document.createElement('div');\n this.closeDiv.className = 'vis-close';\n this.closeDiv.style.display = this.manipulationDiv.style.display;\n this.canvas.frame.appendChild(this.closeDiv);\n }\n }\n /**\n * generate a new target node. Used for creating new edges and editing edges\n *\n * @param {number} x\n * @param {number} y\n * @returns {Node}\n * @private\n */\n\n }, {\n key: \"_getNewTargetNode\",\n value: function _getNewTargetNode(x, y) {\n var controlNodeStyle = deepExtend({}, this.options.controlNodeStyle);\n controlNodeStyle.id = 'targetNode' + v4();\n controlNodeStyle.hidden = false;\n controlNodeStyle.physics = false;\n controlNodeStyle.x = x;\n controlNodeStyle.y = y; // we have to define the bounding box in order for the nodes to be drawn immediately\n\n var node = this.body.functions.createNode(controlNodeStyle);\n node.shape.boundingBox = {\n left: x,\n right: x,\n top: y,\n bottom: y\n };\n return node;\n }\n /**\n * Create the edit button\n */\n\n }, {\n key: \"_createEditButton\",\n value: function _createEditButton() {\n var _context18;\n\n // restore everything to it's original state (if applicable)\n this._clean(); // reset the manipulationDOM\n\n\n this.manipulationDOM = {}; // empty the editModeDiv\n\n recursiveDOMDelete(this.editModeDiv); // create the contents for the editMode button\n\n var locale = this.options.locales[this.options.locale];\n\n var button = this._createButton('editMode', 'vis-button vis-edit vis-edit-mode', locale['edit'] || this.options.locales['en']['edit']);\n\n this.editModeDiv.appendChild(button); // bind a hammer listener to the button, calling the function toggleEditMode.\n\n this._bindHammerToDiv(button, bind$2(_context18 = this.toggleEditMode).call(_context18, this));\n }\n /**\n * this function cleans up after everything this module does. Temporary elements, functions and events are removed, physics restored, hammers removed.\n * @private\n */\n\n }, {\n key: \"_clean\",\n value: function _clean() {\n // not in mode\n this.inMode = false; // _clean the divs\n\n if (this.guiEnabled === true) {\n recursiveDOMDelete(this.editModeDiv);\n recursiveDOMDelete(this.manipulationDiv); // removes all the bindings and overloads\n\n this._cleanManipulatorHammers();\n } // remove temporary nodes and edges\n\n\n this._cleanupTemporaryNodesAndEdges(); // restore overloaded UI functions\n\n\n this._unbindTemporaryUIs(); // remove the temporaryEventFunctions\n\n\n this._unbindTemporaryEvents(); // restore the physics if required\n\n\n this.body.emitter.emit('restorePhysics');\n }\n /**\n * Each dom element has it's own hammer. They are stored in this.manipulationHammers. This cleans them up.\n * @private\n */\n\n }, {\n key: \"_cleanManipulatorHammers\",\n value: function _cleanManipulatorHammers() {\n // _clean hammer bindings\n if (this.manipulationHammers.length != 0) {\n for (var i = 0; i < this.manipulationHammers.length; i++) {\n this.manipulationHammers[i].destroy();\n }\n\n this.manipulationHammers = [];\n }\n }\n /**\n * Remove all DOM elements created by this module.\n * @private\n */\n\n }, {\n key: \"_removeManipulationDOM\",\n value: function _removeManipulationDOM() {\n // removes all the bindings and overloads\n this._clean(); // empty the manipulation divs\n\n\n recursiveDOMDelete(this.manipulationDiv);\n recursiveDOMDelete(this.editModeDiv);\n recursiveDOMDelete(this.closeDiv); // remove the manipulation divs\n\n if (this.manipulationDiv) {\n this.canvas.frame.removeChild(this.manipulationDiv);\n }\n\n if (this.editModeDiv) {\n this.canvas.frame.removeChild(this.editModeDiv);\n }\n\n if (this.closeDiv) {\n this.canvas.frame.removeChild(this.closeDiv);\n } // set the references to undefined\n\n\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n }\n /**\n * create a seperator line. the index is to differentiate in the manipulation dom\n * @param {number} [index=1]\n * @private\n */\n\n }, {\n key: \"_createSeperator\",\n value: function _createSeperator() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n this.manipulationDOM['seperatorLineDiv' + index] = document.createElement('div');\n this.manipulationDOM['seperatorLineDiv' + index].className = 'vis-separator-line';\n this.manipulationDiv.appendChild(this.manipulationDOM['seperatorLineDiv' + index]);\n } // ---------------------- DOM functions for buttons --------------------------//\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n\n }, {\n key: \"_createAddNodeButton\",\n value: function _createAddNodeButton(locale) {\n var _context19;\n\n var button = this._createButton('addNode', 'vis-button vis-add', locale['addNode'] || this.options.locales['en']['addNode']);\n\n this.manipulationDiv.appendChild(button);\n\n this._bindHammerToDiv(button, bind$2(_context19 = this.addNodeMode).call(_context19, this));\n }\n /**\n *\n * @param {Locale} locale\n * @private\n */\n\n }, {\n key: \"_createAddEdgeButton\",\n value: function _createAddEdgeButton(locale) {\n var _context20;\n\n var button = this._createButton('addEdge', 'vis-button vis-connect', locale['addEdge'] || this.options.locales['en']['addEdge']);\n\n this.manipulationDiv.appendChild(button);\n\n this._bindHammerToDiv(button, bind$2(_context20 = this.addEdgeMode).call(_context20, this));\n }\n /**\n *\n * @param {Locale} locale\n * @private\n */\n\n }, {\n key: \"_createEditNodeButton\",\n value: function _createEditNodeButton(locale) {\n var _context21;\n\n var button = this._createButton('editNode', 'vis-button vis-edit', locale['editNode'] || this.options.locales['en']['editNode']);\n\n this.manipulationDiv.appendChild(button);\n\n this._bindHammerToDiv(button, bind$2(_context21 = this.editNode).call(_context21, this));\n }\n /**\n *\n * @param {Locale} locale\n * @private\n */\n\n }, {\n key: \"_createEditEdgeButton\",\n value: function _createEditEdgeButton(locale) {\n var _context22;\n\n var button = this._createButton('editEdge', 'vis-button vis-edit', locale['editEdge'] || this.options.locales['en']['editEdge']);\n\n this.manipulationDiv.appendChild(button);\n\n this._bindHammerToDiv(button, bind$2(_context22 = this.editEdgeMode).call(_context22, this));\n }\n /**\n *\n * @param {Locale} locale\n * @private\n */\n\n }, {\n key: \"_createDeleteButton\",\n value: function _createDeleteButton(locale) {\n var _context23;\n\n var deleteBtnClass;\n\n if (this.options.rtl) {\n deleteBtnClass = 'vis-button vis-delete-rtl';\n } else {\n deleteBtnClass = 'vis-button vis-delete';\n }\n\n var button = this._createButton('delete', deleteBtnClass, locale['del'] || this.options.locales['en']['del']);\n\n this.manipulationDiv.appendChild(button);\n\n this._bindHammerToDiv(button, bind$2(_context23 = this.deleteSelected).call(_context23, this));\n }\n /**\n *\n * @param {Locale} locale\n * @private\n */\n\n }, {\n key: \"_createBackButton\",\n value: function _createBackButton(locale) {\n var _context24;\n\n var button = this._createButton('back', 'vis-button vis-back', locale['back'] || this.options.locales['en']['back']);\n\n this.manipulationDiv.appendChild(button);\n\n this._bindHammerToDiv(button, bind$2(_context24 = this.showManipulatorToolbar).call(_context24, this));\n }\n /**\n *\n * @param {number|string} id\n * @param {string} className\n * @param {label} label\n * @param {string} labelClassName\n * @returns {HTMLElement}\n * @private\n */\n\n }, {\n key: \"_createButton\",\n value: function _createButton(id, className, label) {\n var labelClassName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'vis-label';\n this.manipulationDOM[id + 'Div'] = document.createElement('div');\n this.manipulationDOM[id + 'Div'].className = className;\n this.manipulationDOM[id + 'Label'] = document.createElement('div');\n this.manipulationDOM[id + 'Label'].className = labelClassName;\n this.manipulationDOM[id + 'Label'].innerHTML = label;\n this.manipulationDOM[id + 'Div'].appendChild(this.manipulationDOM[id + 'Label']);\n return this.manipulationDOM[id + 'Div'];\n }\n /**\n *\n * @param {Label} label\n * @private\n */\n\n }, {\n key: \"_createDescription\",\n value: function _createDescription(label) {\n this.manipulationDiv.appendChild(this._createButton('description', 'vis-button vis-none', label));\n } // -------------------------- End of DOM functions for buttons ------------------------------//\n\n /**\n * this binds an event until cleanup by the clean functions.\n * @param {Event} event The event\n * @param {function} newFunction\n * @private\n */\n\n }, {\n key: \"_temporaryBindEvent\",\n value: function _temporaryBindEvent(event, newFunction) {\n this.temporaryEventFunctions.push({\n event: event,\n boundFunction: newFunction\n });\n this.body.emitter.on(event, newFunction);\n }\n /**\n * this overrides an UI function until cleanup by the clean function\n * @param {string} UIfunctionName\n * @param {function} newFunction\n * @private\n */\n\n }, {\n key: \"_temporaryBindUI\",\n value: function _temporaryBindUI(UIfunctionName, newFunction) {\n if (this.body.eventListeners[UIfunctionName] !== undefined) {\n this.temporaryUIFunctions[UIfunctionName] = this.body.eventListeners[UIfunctionName];\n this.body.eventListeners[UIfunctionName] = newFunction;\n } else {\n throw new Error('This UI function does not exist. Typo? You tried: ' + UIfunctionName + ' possible are: ' + stringify$2(keys$3(this.body.eventListeners)));\n }\n }\n /**\n * Restore the overridden UI functions to their original state.\n *\n * @private\n */\n\n }, {\n key: \"_unbindTemporaryUIs\",\n value: function _unbindTemporaryUIs() {\n for (var functionName in this.temporaryUIFunctions) {\n if (Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions, functionName)) {\n this.body.eventListeners[functionName] = this.temporaryUIFunctions[functionName];\n delete this.temporaryUIFunctions[functionName];\n }\n }\n\n this.temporaryUIFunctions = {};\n }\n /**\n * Unbind the events created by _temporaryBindEvent\n * @private\n */\n\n }, {\n key: \"_unbindTemporaryEvents\",\n value: function _unbindTemporaryEvents() {\n for (var i = 0; i < this.temporaryEventFunctions.length; i++) {\n var eventName = this.temporaryEventFunctions[i].event;\n var boundFunction = this.temporaryEventFunctions[i].boundFunction;\n this.body.emitter.off(eventName, boundFunction);\n }\n\n this.temporaryEventFunctions = [];\n }\n /**\n * Bind an hammer instance to a DOM element.\n *\n * @param {Element} domElement\n * @param {function} boundFunction\n */\n\n }, {\n key: \"_bindHammerToDiv\",\n value: function _bindHammerToDiv(domElement, boundFunction) {\n var hammer$1 = new hammer(domElement, {});\n onTouch(hammer$1, boundFunction);\n this.manipulationHammers.push(hammer$1);\n }\n /**\n * Neatly clean up temporary edges and nodes\n * @private\n */\n\n }, {\n key: \"_cleanupTemporaryNodesAndEdges\",\n value: function _cleanupTemporaryNodesAndEdges() {\n // _clean temporary edges\n for (var i = 0; i < this.temporaryIds.edges.length; i++) {\n var _context25;\n\n this.body.edges[this.temporaryIds.edges[i]].disconnect();\n delete this.body.edges[this.temporaryIds.edges[i]];\n\n var indexTempEdge = indexOf$3(_context25 = this.body.edgeIndices).call(_context25, this.temporaryIds.edges[i]);\n\n if (indexTempEdge !== -1) {\n var _context26;\n\n splice$2(_context26 = this.body.edgeIndices).call(_context26, indexTempEdge, 1);\n }\n } // _clean temporary nodes\n\n\n for (var _i = 0; _i < this.temporaryIds.nodes.length; _i++) {\n var _context27;\n\n delete this.body.nodes[this.temporaryIds.nodes[_i]];\n\n var indexTempNode = indexOf$3(_context27 = this.body.nodeIndices).call(_context27, this.temporaryIds.nodes[_i]);\n\n if (indexTempNode !== -1) {\n var _context28;\n\n splice$2(_context28 = this.body.nodeIndices).call(_context28, indexTempNode, 1);\n }\n }\n\n this.temporaryIds = {\n nodes: [],\n edges: []\n };\n } // ------------------------------------------ EDIT EDGE FUNCTIONS -----------------------------------------//\n\n /**\n * the touch is used to get the position of the initial click\n * @param {Event} event The event\n * @private\n */\n\n }, {\n key: \"_controlNodeTouch\",\n value: function _controlNodeTouch(event) {\n this.selectionHandler.unselectAll();\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = assign$2({}, this.body.view.translation); // copy the object\n }\n /**\n * the drag start is used to mark one of the control nodes as selected.\n * @param {Event} event The event\n * @private\n */\n\n }, {\n key: \"_controlNodeDragStart\",\n value: function _controlNodeDragStart(event) {\n // eslint-disable-line no-unused-vars\n var pointer = this.lastTouch;\n\n var pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n var from = this.body.nodes[this.temporaryIds.nodes[0]];\n var to = this.body.nodes[this.temporaryIds.nodes[1]];\n var edge = this.body.edges[this.edgeBeingEditedId];\n this.selectedControlNode = undefined;\n var fromSelect = from.isOverlappingWith(pointerObj);\n var toSelect = to.isOverlappingWith(pointerObj);\n\n if (fromSelect === true) {\n this.selectedControlNode = from;\n edge.edgeType.from = from;\n } else if (toSelect === true) {\n this.selectedControlNode = to;\n edge.edgeType.to = to;\n } // we use the selection to find the node that is being dragged. We explicitly select it here.\n\n\n if (this.selectedControlNode !== undefined) {\n this.selectionHandler.selectObject(this.selectedControlNode);\n }\n\n this.body.emitter.emit('_redraw');\n }\n /**\n * dragging the control nodes or the canvas\n * @param {Event} event The event\n * @private\n */\n\n }, {\n key: \"_controlNodeDrag\",\n value: function _controlNodeDrag(event) {\n this.body.emitter.emit('disablePhysics');\n var pointer = this.body.functions.getPointer(event.center);\n var pos = this.canvas.DOMtoCanvas(pointer);\n\n if (this.selectedControlNode !== undefined) {\n this.selectedControlNode.x = pos.x;\n this.selectedControlNode.y = pos.y;\n } else {\n this.interactionHandler.onDrag(event);\n }\n\n this.body.emitter.emit('_redraw');\n }\n /**\n * connecting or restoring the control nodes.\n * @param {Event} event The event\n * @private\n */\n\n }, {\n key: \"_controlNodeDragEnd\",\n value: function _controlNodeDragEnd(event) {\n var pointer = this.body.functions.getPointer(event.center);\n\n var pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n var edge = this.body.edges[this.edgeBeingEditedId]; // if the node that was dragged is not a control node, return\n\n if (this.selectedControlNode === undefined) {\n return;\n } // we use the selection to find the node that is being dragged. We explicitly DEselect the control node here.\n\n\n this.selectionHandler.unselectAll();\n\n var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n\n var node = undefined;\n\n for (var i = overlappingNodeIds.length - 1; i >= 0; i--) {\n if (overlappingNodeIds[i] !== this.selectedControlNode.id) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n } // perform the connection\n\n\n if (node !== undefined && this.selectedControlNode !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']);\n } else {\n var from = this.body.nodes[this.temporaryIds.nodes[0]];\n\n if (this.selectedControlNode.id === from.id) {\n this._performEditEdge(node.id, edge.to.id);\n } else {\n this._performEditEdge(edge.from.id, node.id);\n }\n }\n } else {\n edge.updateEdgeType();\n this.body.emitter.emit('restorePhysics');\n }\n\n this.body.emitter.emit('_redraw');\n } // ------------------------------------ END OF EDIT EDGE FUNCTIONS -----------------------------------------//\n // ------------------------------------------- ADD EDGE FUNCTIONS -----------------------------------------//\n\n /**\n * the function bound to the selection event. It checks if you want to connect a cluster and changes the description\n * to walk the user through the process.\n *\n * @param {Event} event\n * @private\n */\n\n }, {\n key: \"_handleConnect\",\n value: function _handleConnect(event) {\n // check to avoid double fireing of this function.\n if (new Date().valueOf() - this.touchTime > 100) {\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = assign$2({}, this.body.view.translation); // copy the object\n\n this.interactionHandler.drag.pointer = this.lastTouch; // Drag pointer is not updated when adding edges\n\n this.interactionHandler.drag.translation = this.lastTouch.translation;\n var pointer = this.lastTouch;\n var node = this.selectionHandler.getNodeAt(pointer);\n\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']);\n } else {\n // create a node the temporary line can look at\n var targetNode = this._getNewTargetNode(node.x, node.y);\n\n this.body.nodes[targetNode.id] = targetNode;\n this.body.nodeIndices.push(targetNode.id); // create a temporary edge\n\n var connectionEdge = this.body.functions.createEdge({\n id: 'connectionEdge' + v4(),\n from: node.id,\n to: targetNode.id,\n physics: false,\n smooth: {\n enabled: true,\n type: 'continuous',\n roundness: 0.5\n }\n });\n this.body.edges[connectionEdge.id] = connectionEdge;\n this.body.edgeIndices.push(connectionEdge.id);\n this.temporaryIds.nodes.push(targetNode.id);\n this.temporaryIds.edges.push(connectionEdge.id);\n }\n }\n\n this.touchTime = new Date().valueOf();\n }\n }\n /**\n *\n * @param {Event} event\n * @private\n */\n\n }, {\n key: \"_dragControlNode\",\n value: function _dragControlNode(event) {\n var pointer = this.body.functions.getPointer(event.center);\n\n var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); // remember the edge id\n\n\n var connectFromId = undefined;\n\n if (this.temporaryIds.edges[0] !== undefined) {\n connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId;\n } // get the overlapping node but NOT the temporary node;\n\n\n var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n\n var node = undefined;\n\n for (var i = overlappingNodeIds.length - 1; i >= 0; i--) {\n var _context29;\n\n // if the node id is NOT a temporary node, accept the node.\n if (indexOf$3(_context29 = this.temporaryIds.nodes).call(_context29, overlappingNodeIds[i]) === -1) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n\n event.controlEdge = {\n from: connectFromId,\n to: node ? node.id : undefined\n };\n\n this.selectionHandler._generateClickEvent('controlNodeDragging', event, pointer);\n\n if (this.temporaryIds.nodes[0] !== undefined) {\n var targetNode = this.body.nodes[this.temporaryIds.nodes[0]]; // there is only one temp node in the add edge mode.\n\n targetNode.x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n targetNode.y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n this.body.emitter.emit('_redraw');\n } else {\n this.interactionHandler.onDrag(event);\n }\n }\n /**\n * Connect the new edge to the target if one exists, otherwise remove temp line\n * @param {Event} event The event\n * @private\n */\n\n }, {\n key: \"_finishConnect\",\n value: function _finishConnect(event) {\n var pointer = this.body.functions.getPointer(event.center);\n\n var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); // remember the edge id\n\n\n var connectFromId = undefined;\n\n if (this.temporaryIds.edges[0] !== undefined) {\n connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId;\n } // get the overlapping node but NOT the temporary node;\n\n\n var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n\n var node = undefined;\n\n for (var i = overlappingNodeIds.length - 1; i >= 0; i--) {\n var _context30;\n\n // if the node id is NOT a temporary node, accept the node.\n if (indexOf$3(_context30 = this.temporaryIds.nodes).call(_context30, overlappingNodeIds[i]) === -1) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n } // clean temporary nodes and edges.\n\n\n this._cleanupTemporaryNodesAndEdges(); // perform the connection\n\n\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']);\n } else {\n if (this.body.nodes[connectFromId] !== undefined && this.body.nodes[node.id] !== undefined) {\n this._performAddEdge(connectFromId, node.id);\n }\n }\n }\n\n event.controlEdge = {\n from: connectFromId,\n to: node ? node.id : undefined\n };\n\n this.selectionHandler._generateClickEvent('controlNodeDragEnd', event, pointer); // No need to do _generateclickevent('dragEnd') here, the regular dragEnd event fires.\n\n\n this.body.emitter.emit('_redraw');\n }\n /**\n *\n * @param {Event} event\n * @private\n */\n\n }, {\n key: \"_dragStartEdge\",\n value: function _dragStartEdge(event) {\n var pointer = this.lastTouch;\n\n this.selectionHandler._generateClickEvent('dragStart', event, pointer, undefined, true);\n } // --------------------------------------- END OF ADD EDGE FUNCTIONS -------------------------------------//\n // ------------------------------ Performing all the actual data manipulation ------------------------//\n\n /**\n * Adds a node on the specified location\n *\n * @param {Object} clickData\n * @private\n */\n\n }, {\n key: \"_performAddNode\",\n value: function _performAddNode(clickData) {\n var _this4 = this;\n\n var defaultData = {\n id: v4(),\n x: clickData.pointer.canvas.x,\n y: clickData.pointer.canvas.y,\n label: 'new'\n };\n\n if (typeof this.options.addNode === 'function') {\n if (this.options.addNode.length === 2) {\n this.options.addNode(defaultData, function (finalizedData) {\n if (finalizedData !== null && finalizedData !== undefined && _this4.inMode === 'addNode') {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n _this4.body.data.nodes.getDataSet().add(finalizedData);\n }\n\n _this4.showManipulatorToolbar();\n });\n } else {\n this.showManipulatorToolbar();\n throw new Error('The function for add does not support two arguments (data,callback)');\n }\n } else {\n this.body.data.nodes.getDataSet().add(defaultData);\n this.showManipulatorToolbar();\n }\n }\n /**\n * connect two nodes with a new edge.\n *\n * @param {Node.id} sourceNodeId\n * @param {Node.id} targetNodeId\n * @private\n */\n\n }, {\n key: \"_performAddEdge\",\n value: function _performAddEdge(sourceNodeId, targetNodeId) {\n var _this5 = this;\n\n var defaultData = {\n from: sourceNodeId,\n to: targetNodeId\n };\n\n if (typeof this.options.addEdge === 'function') {\n if (this.options.addEdge.length === 2) {\n this.options.addEdge(defaultData, function (finalizedData) {\n if (finalizedData !== null && finalizedData !== undefined && _this5.inMode === 'addEdge') {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n _this5.body.data.edges.getDataSet().add(finalizedData);\n\n _this5.selectionHandler.unselectAll();\n\n _this5.showManipulatorToolbar();\n }\n });\n } else {\n throw new Error('The function for connect does not support two arguments (data,callback)');\n }\n } else {\n this.body.data.edges.getDataSet().add(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n /**\n * connect two nodes with a new edge.\n *\n * @param {Node.id} sourceNodeId\n * @param {Node.id} targetNodeId\n * @private\n */\n\n }, {\n key: \"_performEditEdge\",\n value: function _performEditEdge(sourceNodeId, targetNodeId) {\n var _this6 = this;\n\n var defaultData = {\n id: this.edgeBeingEditedId,\n from: sourceNodeId,\n to: targetNodeId,\n label: this.body.data.edges.get(this.edgeBeingEditedId).label\n };\n var eeFunct = this.options.editEdge;\n\n if (_typeof_1(eeFunct) === 'object') {\n eeFunct = eeFunct.editWithoutDrag;\n }\n\n if (typeof eeFunct === 'function') {\n if (eeFunct.length === 2) {\n eeFunct(defaultData, function (finalizedData) {\n if (finalizedData === null || finalizedData === undefined || _this6.inMode !== 'editEdge') {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n _this6.body.edges[defaultData.id].updateEdgeType();\n\n _this6.body.emitter.emit('_redraw');\n\n _this6.showManipulatorToolbar();\n } else {\n _this6.body.data.edges.getDataSet().update(finalizedData);\n\n _this6.selectionHandler.unselectAll();\n\n _this6.showManipulatorToolbar();\n }\n });\n } else {\n throw new Error('The function for edit does not support two arguments (data, callback)');\n }\n } else {\n this.body.data.edges.getDataSet().update(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n }]);\n\n return ManipulationSystem;\n}();\n\nvar css_248z$4 = \"div.vis-configuration {\\n position:relative;\\n display:block;\\n float:left;\\n font-size:12px;\\n}\\n\\ndiv.vis-configuration-wrapper {\\n display:block;\\n width:700px;\\n}\\n\\ndiv.vis-configuration-wrapper::after {\\n clear: both;\\n content: \\\"\\\";\\n display: block;\\n}\\n\\ndiv.vis-configuration.vis-config-option-container{\\n display:block;\\n width:495px;\\n background-color: #ffffff;\\n border:2px solid #f7f8fa;\\n border-radius:4px;\\n margin-top:20px;\\n left:10px;\\n padding-left:5px;\\n}\\n\\ndiv.vis-configuration.vis-config-button{\\n display:block;\\n width:495px;\\n height:25px;\\n vertical-align: middle;\\n line-height:25px;\\n background-color: #f7f8fa;\\n border:2px solid #ceced0;\\n border-radius:4px;\\n margin-top:20px;\\n left:10px;\\n padding-left:5px;\\n cursor: pointer;\\n margin-bottom:30px;\\n}\\n\\ndiv.vis-configuration.vis-config-button.hover{\\n background-color: #4588e6;\\n border:2px solid #214373;\\n color:#ffffff;\\n}\\n\\ndiv.vis-configuration.vis-config-item{\\n display:block;\\n float:left;\\n width:495px;\\n height:25px;\\n vertical-align: middle;\\n line-height:25px;\\n}\\n\\n\\ndiv.vis-configuration.vis-config-item.vis-config-s2{\\n left:10px;\\n background-color: #f7f8fa;\\n padding-left:5px;\\n border-radius:3px;\\n}\\ndiv.vis-configuration.vis-config-item.vis-config-s3{\\n left:20px;\\n background-color: #e4e9f0;\\n padding-left:5px;\\n border-radius:3px;\\n}\\ndiv.vis-configuration.vis-config-item.vis-config-s4{\\n left:30px;\\n background-color: #cfd8e6;\\n padding-left:5px;\\n border-radius:3px;\\n}\\n\\ndiv.vis-configuration.vis-config-header{\\n font-size:18px;\\n font-weight: bold;\\n}\\n\\ndiv.vis-configuration.vis-config-label{\\n width:120px;\\n height:25px;\\n line-height: 25px;\\n}\\n\\ndiv.vis-configuration.vis-config-label.vis-config-s3{\\n width:110px;\\n}\\ndiv.vis-configuration.vis-config-label.vis-config-s4{\\n width:100px;\\n}\\n\\ndiv.vis-configuration.vis-config-colorBlock{\\n top:1px;\\n width:30px;\\n height:19px;\\n border:1px solid #444444;\\n border-radius:2px;\\n padding:0px;\\n margin:0px;\\n cursor:pointer;\\n}\\n\\ninput.vis-configuration.vis-config-checkbox {\\n left:-5px;\\n}\\n\\n\\ninput.vis-configuration.vis-config-rangeinput{\\n position:relative;\\n top:-5px;\\n width:60px;\\n /*height:13px;*/\\n padding:1px;\\n margin:0;\\n pointer-events:none;\\n}\\n\\ninput.vis-configuration.vis-config-range{\\n /*removes default webkit styles*/\\n -webkit-appearance: none;\\n\\n /*fix for FF unable to apply focus style bug */\\n border: 0px solid white;\\n background-color:rgba(0,0,0,0);\\n\\n /*required for proper track sizing in FF*/\\n width: 300px;\\n height:20px;\\n}\\ninput.vis-configuration.vis-config-range::-webkit-slider-runnable-track {\\n width: 300px;\\n height: 5px;\\n background: #dedede; /* Old browsers */\\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */\\n background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */\\n background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */\\n background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */\\n background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */\\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\\n\\n border: 1px solid #999999;\\n box-shadow: #aaaaaa 0px 0px 3px 0px;\\n border-radius: 3px;\\n}\\ninput.vis-configuration.vis-config-range::-webkit-slider-thumb {\\n -webkit-appearance: none;\\n border: 1px solid #14334b;\\n height: 17px;\\n width: 17px;\\n border-radius: 50%;\\n background: #3876c2; /* Old browsers */\\n background: -moz-linear-gradient(top, #3876c2 0%, #385380 100%); /* FF3.6+ */\\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3876c2), color-stop(100%,#385380)); /* Chrome,Safari4+ */\\n background: -webkit-linear-gradient(top, #3876c2 0%,#385380 100%); /* Chrome10+,Safari5.1+ */\\n background: -o-linear-gradient(top, #3876c2 0%,#385380 100%); /* Opera 11.10+ */\\n background: -ms-linear-gradient(top, #3876c2 0%,#385380 100%); /* IE10+ */\\n background: linear-gradient(to bottom, #3876c2 0%,#385380 100%); /* W3C */\\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380',GradientType=0 ); /* IE6-9 */\\n box-shadow: #111927 0px 0px 1px 0px;\\n margin-top: -7px;\\n}\\ninput.vis-configuration.vis-config-range:focus {\\n outline: none;\\n}\\ninput.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track {\\n background: #9d9d9d; /* Old browsers */\\n background: -moz-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* FF3.6+ */\\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#9d9d9d), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */\\n background: -webkit-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */\\n background: -o-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Opera 11.10+ */\\n background: -ms-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* IE10+ */\\n background: linear-gradient(to bottom, #9d9d9d 0%,#c8c8c8 99%); /* W3C */\\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\\n}\\n\\ninput.vis-configuration.vis-config-range::-moz-range-track {\\n width: 300px;\\n height: 10px;\\n background: #dedede; /* Old browsers */\\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */\\n background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */\\n background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */\\n background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */\\n background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */\\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\\n\\n border: 1px solid #999999;\\n box-shadow: #aaaaaa 0px 0px 3px 0px;\\n border-radius: 3px;\\n}\\ninput.vis-configuration.vis-config-range::-moz-range-thumb {\\n border: none;\\n height: 16px;\\n width: 16px;\\n\\n border-radius: 50%;\\n background: #385380;\\n}\\n\\n/*hide the outline behind the border*/\\ninput.vis-configuration.vis-config-range:-moz-focusring{\\n outline: 1px solid white;\\n outline-offset: -1px;\\n}\\n\\ninput.vis-configuration.vis-config-range::-ms-track {\\n width: 300px;\\n height: 5px;\\n\\n /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */\\n background: transparent;\\n\\n /*leave room for the larger thumb to overflow with a transparent border */\\n border-color: transparent;\\n border-width: 6px 0;\\n\\n /*remove default tick marks*/\\n color: transparent;\\n}\\ninput.vis-configuration.vis-config-range::-ms-fill-lower {\\n background: #777;\\n border-radius: 10px;\\n}\\ninput.vis-configuration.vis-config-range::-ms-fill-upper {\\n background: #ddd;\\n border-radius: 10px;\\n}\\ninput.vis-configuration.vis-config-range::-ms-thumb {\\n border: none;\\n height: 16px;\\n width: 16px;\\n border-radius: 50%;\\n background: #385380;\\n}\\ninput.vis-configuration.vis-config-range:focus::-ms-fill-lower {\\n background: #888;\\n}\\ninput.vis-configuration.vis-config-range:focus::-ms-fill-upper {\\n background: #ccc;\\n}\\n\\n.vis-configuration-popup {\\n position: absolute;\\n background: rgba(57, 76, 89, 0.85);\\n border: 2px solid #f2faff;\\n line-height:30px;\\n height:30px;\\n width:150px;\\n text-align:center;\\n color: #ffffff;\\n font-size:14px;\\n border-radius:4px;\\n -webkit-transition: opacity 0.3s ease-in-out;\\n -moz-transition: opacity 0.3s ease-in-out;\\n transition: opacity 0.3s ease-in-out;\\n}\\n.vis-configuration-popup:after, .vis-configuration-popup:before {\\n left: 100%;\\n top: 50%;\\n border: solid transparent;\\n content: \\\" \\\";\\n height: 0;\\n width: 0;\\n position: absolute;\\n pointer-events: none;\\n}\\n\\n.vis-configuration-popup:after {\\n border-color: rgba(136, 183, 213, 0);\\n border-left-color: rgba(57, 76, 89, 0.85);\\n border-width: 8px;\\n margin-top: -8px;\\n}\\n.vis-configuration-popup:before {\\n border-color: rgba(194, 225, 245, 0);\\n border-left-color: #f2faff;\\n border-width: 12px;\\n margin-top: -12px;\\n}\";\nstyleInject(css_248z$4);\n\nvar css_248z$5 = \"\\ndiv.vis-color-picker {\\n position:absolute;\\n top: 0px;\\n left: 30px;\\n margin-top:-140px;\\n margin-left:30px;\\n width:310px;\\n height:444px;\\n z-index: 1;\\n padding: 10px;\\n border-radius:15px;\\n background-color:#ffffff;\\n display: none;\\n box-shadow: rgba(0,0,0,0.5) 0px 0px 10px 0px;\\n}\\n\\ndiv.vis-color-picker div.vis-arrow {\\n position: absolute;\\n top:147px;\\n left:5px;\\n}\\n\\ndiv.vis-color-picker div.vis-arrow::after,\\ndiv.vis-color-picker div.vis-arrow::before {\\n right: 100%;\\n top: 50%;\\n border: solid transparent;\\n content: \\\" \\\";\\n height: 0;\\n width: 0;\\n position: absolute;\\n pointer-events: none;\\n}\\n\\ndiv.vis-color-picker div.vis-arrow:after {\\n border-color: rgba(255, 255, 255, 0);\\n border-right-color: #ffffff;\\n border-width: 30px;\\n margin-top: -30px;\\n}\\n\\ndiv.vis-color-picker div.vis-color {\\n position:absolute;\\n width: 289px;\\n height: 289px;\\n cursor: pointer;\\n}\\n\\n\\n\\ndiv.vis-color-picker div.vis-brightness {\\n position: absolute;\\n top:313px;\\n}\\n\\ndiv.vis-color-picker div.vis-opacity {\\n position:absolute;\\n top:350px;\\n}\\n\\ndiv.vis-color-picker div.vis-selector {\\n position:absolute;\\n top:137px;\\n left:137px;\\n width:15px;\\n height:15px;\\n border-radius:15px;\\n border:1px solid #ffffff;\\n background: #4c4c4c; /* Old browsers */\\n background: -moz-linear-gradient(top, #4c4c4c 0%, #595959 12%, #666666 25%, #474747 39%, #2c2c2c 50%, #000000 51%, #111111 60%, #2b2b2b 76%, #1c1c1c 91%, #131313 100%); /* FF3.6+ */\\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4c4c4c), color-stop(12%,#595959), color-stop(25%,#666666), color-stop(39%,#474747), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(60%,#111111), color-stop(76%,#2b2b2b), color-stop(91%,#1c1c1c), color-stop(100%,#131313)); /* Chrome,Safari4+ */\\n background: -webkit-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Chrome10+,Safari5.1+ */\\n background: -o-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Opera 11.10+ */\\n background: -ms-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* IE10+ */\\n background: linear-gradient(to bottom, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* W3C */\\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313',GradientType=0 ); /* IE6-9 */\\n}\\n\\n\\n\\ndiv.vis-color-picker div.vis-new-color {\\n position:absolute;\\n width:140px;\\n height:20px;\\n border:1px solid rgba(0,0,0,0.1);\\n border-radius:5px;\\n top:380px;\\n left:159px;\\n text-align:right;\\n padding-right:2px;\\n font-size:10px;\\n color:rgba(0,0,0,0.4);\\n vertical-align:middle;\\n line-height:20px;\\n\\n}\\n\\ndiv.vis-color-picker div.vis-initial-color {\\n position:absolute;\\n width:140px;\\n height:20px;\\n border:1px solid rgba(0,0,0,0.1);\\n border-radius:5px;\\n top:380px;\\n left:10px;\\n text-align:left;\\n padding-left:2px;\\n font-size:10px;\\n color:rgba(0,0,0,0.4);\\n vertical-align:middle;\\n line-height:20px;\\n}\\n\\ndiv.vis-color-picker div.vis-label {\\n position:absolute;\\n width:300px;\\n left:10px;\\n}\\n\\ndiv.vis-color-picker div.vis-label.vis-brightness {\\n top:300px;\\n}\\n\\ndiv.vis-color-picker div.vis-label.vis-opacity {\\n top:338px;\\n}\\n\\ndiv.vis-color-picker div.vis-button {\\n position:absolute;\\n width:68px;\\n height:25px;\\n border-radius:10px;\\n vertical-align: middle;\\n text-align:center;\\n line-height: 25px;\\n top:410px;\\n border:2px solid #d9d9d9;\\n background-color: #f7f7f7;\\n cursor:pointer;\\n}\\n\\ndiv.vis-color-picker div.vis-button.vis-cancel {\\n /*border:2px solid #ff4e33;*/\\n /*background-color: #ff7761;*/\\n left:5px;\\n}\\ndiv.vis-color-picker div.vis-button.vis-load {\\n /*border:2px solid #a153e6;*/\\n /*background-color: #cb8dff;*/\\n left:82px;\\n}\\ndiv.vis-color-picker div.vis-button.vis-apply {\\n /*border:2px solid #4588e6;*/\\n /*background-color: #82b6ff;*/\\n left:159px;\\n}\\ndiv.vis-color-picker div.vis-button.vis-save {\\n /*border:2px solid #45e655;*/\\n /*background-color: #6dff7c;*/\\n left:236px;\\n}\\n\\n\\ndiv.vis-color-picker input.vis-range {\\n width: 290px;\\n height:20px;\\n}\\n\\n/* TODO: is this redundant?\\ndiv.vis-color-picker input.vis-range-brightness {\\n width: 289px !important;\\n}\\n\\n\\ndiv.vis-color-picker input.vis-saturation-range {\\n width: 289px !important;\\n}*/\";\nstyleInject(css_248z$5);\n\nvar htmlColors = {\n black: '#000000',\n navy: '#000080',\n darkblue: '#00008B',\n mediumblue: '#0000CD',\n blue: '#0000FF',\n darkgreen: '#006400',\n green: '#008000',\n teal: '#008080',\n darkcyan: '#008B8B',\n deepskyblue: '#00BFFF',\n darkturquoise: '#00CED1',\n mediumspringgreen: '#00FA9A',\n lime: '#00FF00',\n springgreen: '#00FF7F',\n aqua: '#00FFFF',\n cyan: '#00FFFF',\n midnightblue: '#191970',\n dodgerblue: '#1E90FF',\n lightseagreen: '#20B2AA',\n forestgreen: '#228B22',\n seagreen: '#2E8B57',\n darkslategray: '#2F4F4F',\n limegreen: '#32CD32',\n mediumseagreen: '#3CB371',\n turquoise: '#40E0D0',\n royalblue: '#4169E1',\n steelblue: '#4682B4',\n darkslateblue: '#483D8B',\n mediumturquoise: '#48D1CC',\n indigo: '#4B0082',\n darkolivegreen: '#556B2F',\n cadetblue: '#5F9EA0',\n cornflowerblue: '#6495ED',\n mediumaquamarine: '#66CDAA',\n dimgray: '#696969',\n slateblue: '#6A5ACD',\n olivedrab: '#6B8E23',\n slategray: '#708090',\n lightslategray: '#778899',\n mediumslateblue: '#7B68EE',\n lawngreen: '#7CFC00',\n chartreuse: '#7FFF00',\n aquamarine: '#7FFFD4',\n maroon: '#800000',\n purple: '#800080',\n olive: '#808000',\n gray: '#808080',\n skyblue: '#87CEEB',\n lightskyblue: '#87CEFA',\n blueviolet: '#8A2BE2',\n darkred: '#8B0000',\n darkmagenta: '#8B008B',\n saddlebrown: '#8B4513',\n darkseagreen: '#8FBC8F',\n lightgreen: '#90EE90',\n mediumpurple: '#9370D8',\n darkviolet: '#9400D3',\n palegreen: '#98FB98',\n darkorchid: '#9932CC',\n yellowgreen: '#9ACD32',\n sienna: '#A0522D',\n brown: '#A52A2A',\n darkgray: '#A9A9A9',\n lightblue: '#ADD8E6',\n greenyellow: '#ADFF2F',\n paleturquoise: '#AFEEEE',\n lightsteelblue: '#B0C4DE',\n powderblue: '#B0E0E6',\n firebrick: '#B22222',\n darkgoldenrod: '#B8860B',\n mediumorchid: '#BA55D3',\n rosybrown: '#BC8F8F',\n darkkhaki: '#BDB76B',\n silver: '#C0C0C0',\n mediumvioletred: '#C71585',\n indianred: '#CD5C5C',\n peru: '#CD853F',\n chocolate: '#D2691E',\n tan: '#D2B48C',\n lightgrey: '#D3D3D3',\n palevioletred: '#D87093',\n thistle: '#D8BFD8',\n orchid: '#DA70D6',\n goldenrod: '#DAA520',\n crimson: '#DC143C',\n gainsboro: '#DCDCDC',\n plum: '#DDA0DD',\n burlywood: '#DEB887',\n lightcyan: '#E0FFFF',\n lavender: '#E6E6FA',\n darksalmon: '#E9967A',\n violet: '#EE82EE',\n palegoldenrod: '#EEE8AA',\n lightcoral: '#F08080',\n khaki: '#F0E68C',\n aliceblue: '#F0F8FF',\n honeydew: '#F0FFF0',\n azure: '#F0FFFF',\n sandybrown: '#F4A460',\n wheat: '#F5DEB3',\n beige: '#F5F5DC',\n whitesmoke: '#F5F5F5',\n mintcream: '#F5FFFA',\n ghostwhite: '#F8F8FF',\n salmon: '#FA8072',\n antiquewhite: '#FAEBD7',\n linen: '#FAF0E6',\n lightgoldenrodyellow: '#FAFAD2',\n oldlace: '#FDF5E6',\n red: '#FF0000',\n fuchsia: '#FF00FF',\n magenta: '#FF00FF',\n deeppink: '#FF1493',\n orangered: '#FF4500',\n tomato: '#FF6347',\n hotpink: '#FF69B4',\n coral: '#FF7F50',\n darkorange: '#FF8C00',\n lightsalmon: '#FFA07A',\n orange: '#FFA500',\n lightpink: '#FFB6C1',\n pink: '#FFC0CB',\n gold: '#FFD700',\n peachpuff: '#FFDAB9',\n navajowhite: '#FFDEAD',\n moccasin: '#FFE4B5',\n bisque: '#FFE4C4',\n mistyrose: '#FFE4E1',\n blanchedalmond: '#FFEBCD',\n papayawhip: '#FFEFD5',\n lavenderblush: '#FFF0F5',\n seashell: '#FFF5EE',\n cornsilk: '#FFF8DC',\n lemonchiffon: '#FFFACD',\n floralwhite: '#FFFAF0',\n snow: '#FFFAFA',\n yellow: '#FFFF00',\n lightyellow: '#FFFFE0',\n ivory: '#FFFFF0',\n white: '#FFFFFF'\n};\n/**\n * @param {number} [pixelRatio=1]\n */\n\nvar ColorPicker = /*#__PURE__*/function () {\n /**\n * @param {number} [pixelRatio=1]\n */\n function ColorPicker() {\n var pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n\n classCallCheck(this, ColorPicker);\n\n this.pixelRatio = pixelRatio;\n this.generated = false;\n this.centerCoordinates = {\n x: 289 / 2,\n y: 289 / 2\n };\n this.r = 289 * 0.49;\n this.color = {\n r: 255,\n g: 255,\n b: 255,\n a: 1.0\n };\n this.hueCircle = undefined;\n this.initialColor = {\n r: 255,\n g: 255,\n b: 255,\n a: 1.0\n };\n this.previousColor = undefined;\n this.applied = false; // bound by\n\n this.updateCallback = function () {};\n\n this.closeCallback = function () {}; // create all DOM elements\n\n\n this._create();\n }\n /**\n * this inserts the colorPicker into a div from the DOM\n * @param {Element} container\n */\n\n\n createClass(ColorPicker, [{\n key: \"insertTo\",\n value: function insertTo(container) {\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n this.hammer = undefined;\n }\n\n this.container = container;\n this.container.appendChild(this.frame);\n\n this._bindHammer();\n\n this._setSize();\n }\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param {function} callback\n */\n\n }, {\n key: \"setUpdateCallback\",\n value: function setUpdateCallback(callback) {\n if (typeof callback === 'function') {\n this.updateCallback = callback;\n } else {\n throw new Error(\"Function attempted to set as colorPicker update callback is not a function.\");\n }\n }\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param {function} callback\n */\n\n }, {\n key: \"setCloseCallback\",\n value: function setCloseCallback(callback) {\n if (typeof callback === 'function') {\n this.closeCallback = callback;\n } else {\n throw new Error(\"Function attempted to set as colorPicker closing callback is not a function.\");\n }\n }\n /**\n *\n * @param {string} color\n * @returns {String}\n * @private\n */\n\n }, {\n key: \"_isColorString\",\n value: function _isColorString(color) {\n if (typeof color === 'string') {\n return htmlColors[color];\n }\n }\n /**\n * Set the color of the colorPicker\n * Supported formats:\n * 'red' --> HTML color string\n * '#ffffff' --> hex string\n * 'rgb(255,255,255)' --> rgb string\n * 'rgba(255,255,255,1.0)' --> rgba string\n * {r:255,g:255,b:255} --> rgb object\n * {r:255,g:255,b:255,a:1.0} --> rgba object\n * @param {string|Object} color\n * @param {boolean} [setInitial=true]\n */\n\n }, {\n key: \"setColor\",\n value: function setColor(color) {\n var setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (color === 'none') {\n return;\n }\n\n var rgba; // if a html color shorthand is used, convert to hex\n\n var htmlColor = this._isColorString(color);\n\n if (htmlColor !== undefined) {\n color = htmlColor;\n } // check format\n\n\n if (isString(color) === true) {\n if (isValidRGB(color) === true) {\n var rgbaArray = color.substr(4).substr(0, color.length - 5).split(',');\n rgba = {\n r: rgbaArray[0],\n g: rgbaArray[1],\n b: rgbaArray[2],\n a: 1.0\n };\n } else if (isValidRGBA(color) === true) {\n var _rgbaArray = color.substr(5).substr(0, color.length - 6).split(',');\n\n rgba = {\n r: _rgbaArray[0],\n g: _rgbaArray[1],\n b: _rgbaArray[2],\n a: _rgbaArray[3]\n };\n } else if (isValidHex(color) === true) {\n var rgbObj = hexToRGB(color);\n rgba = {\n r: rgbObj.r,\n g: rgbObj.g,\n b: rgbObj.b,\n a: 1.0\n };\n }\n } else {\n if (color instanceof Object) {\n if (color.r !== undefined && color.g !== undefined && color.b !== undefined) {\n var alpha = color.a !== undefined ? color.a : '1.0';\n rgba = {\n r: color.r,\n g: color.g,\n b: color.b,\n a: alpha\n };\n }\n }\n } // set color\n\n\n if (rgba === undefined) {\n throw new Error(\"Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: \" + stringify$2(color));\n } else {\n this._setColor(rgba, setInitial);\n }\n }\n /**\n * this shows the color picker.\n * The hue circle is constructed once and stored.\n */\n\n }, {\n key: \"show\",\n value: function show() {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n\n this.applied = false;\n this.frame.style.display = 'block';\n\n this._generateHueCircle();\n } // ------------------------------------------ PRIVATE ----------------------------- //\n\n /**\n * Hide the picker. Is called by the cancel button.\n * Optional boolean to store the previous color for easy access later on.\n * @param {boolean} [storePrevious=true]\n * @private\n */\n\n }, {\n key: \"_hide\",\n value: function _hide() {\n var _this = this;\n\n var storePrevious = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n // store the previous color for next time;\n if (storePrevious === true) {\n this.previousColor = assign$2({}, this.color);\n }\n\n if (this.applied === true) {\n this.updateCallback(this.initialColor);\n }\n\n this.frame.style.display = 'none'; // call the closing callback, restoring the onclick method.\n // this is in a setTimeout because it will trigger the show again before the click is done.\n\n setTimeout$2(function () {\n if (_this.closeCallback !== undefined) {\n _this.closeCallback();\n\n _this.closeCallback = undefined;\n }\n }, 0);\n }\n /**\n * bound to the save button. Saves and hides.\n * @private\n */\n\n }, {\n key: \"_save\",\n value: function _save() {\n this.updateCallback(this.color);\n this.applied = false;\n\n this._hide();\n }\n /**\n * Bound to apply button. Saves but does not close. Is undone by the cancel button.\n * @private\n */\n\n }, {\n key: \"_apply\",\n value: function _apply() {\n this.applied = true;\n this.updateCallback(this.color);\n\n this._updatePicker(this.color);\n }\n /**\n * load the color from the previous session.\n * @private\n */\n\n }, {\n key: \"_loadLast\",\n value: function _loadLast() {\n if (this.previousColor !== undefined) {\n this.setColor(this.previousColor, false);\n } else {\n alert(\"There is no last color to load...\");\n }\n }\n /**\n * set the color, place the picker\n * @param {Object} rgba\n * @param {boolean} [setInitial=true]\n * @private\n */\n\n }, {\n key: \"_setColor\",\n value: function _setColor(rgba) {\n var setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n // store the initial color\n if (setInitial === true) {\n this.initialColor = assign$2({}, rgba);\n }\n\n this.color = rgba;\n var hsv = RGBToHSV(rgba.r, rgba.g, rgba.b);\n var angleConvert = 2 * Math.PI;\n var radius = this.r * hsv.s;\n var x = this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h);\n var y = this.centerCoordinates.y + radius * Math.cos(angleConvert * hsv.h);\n this.colorPickerSelector.style.left = x - 0.5 * this.colorPickerSelector.clientWidth + 'px';\n this.colorPickerSelector.style.top = y - 0.5 * this.colorPickerSelector.clientHeight + 'px';\n\n this._updatePicker(rgba);\n }\n /**\n * bound to opacity control\n * @param {number} value\n * @private\n */\n\n }, {\n key: \"_setOpacity\",\n value: function _setOpacity(value) {\n this.color.a = value / 100;\n\n this._updatePicker(this.color);\n }\n /**\n * bound to brightness control\n * @param {number} value\n * @private\n */\n\n }, {\n key: \"_setBrightness\",\n value: function _setBrightness(value) {\n var hsv = RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.v = value / 100;\n var rgba = HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba['a'] = this.color.a;\n this.color = rgba;\n\n this._updatePicker();\n }\n /**\n * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing.\n * @param {Object} rgba\n * @private\n */\n\n }, {\n key: \"_updatePicker\",\n value: function _updatePicker() {\n var rgba = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.color;\n var hsv = RGBToHSV(rgba.r, rgba.g, rgba.b);\n var ctx = this.colorPickerCanvas.getContext('2d');\n\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1);\n }\n\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); // clear the canvas\n\n var w = this.colorPickerCanvas.clientWidth;\n var h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n ctx.putImageData(this.hueCircle, 0, 0);\n ctx.fillStyle = 'rgba(0,0,0,' + (1 - hsv.v) + ')';\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n\n fill$2(ctx).call(ctx);\n\n this.brightnessRange.value = 100 * hsv.v;\n this.opacityRange.value = 100 * rgba.a;\n this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')';\n this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')';\n }\n /**\n * used by create to set the size of the canvas.\n * @private\n */\n\n }, {\n key: \"_setSize\",\n value: function _setSize() {\n this.colorPickerCanvas.style.width = '100%';\n this.colorPickerCanvas.style.height = '100%';\n this.colorPickerCanvas.width = 289 * this.pixelRatio;\n this.colorPickerCanvas.height = 289 * this.pixelRatio;\n }\n /**\n * create all dom elements\n * TODO: cleanup, lots of similar dom elements\n * @private\n */\n\n }, {\n key: \"_create\",\n value: function _create() {\n var _context, _context2, _context3, _context4;\n\n this.frame = document.createElement('div');\n this.frame.className = 'vis-color-picker';\n this.colorPickerDiv = document.createElement('div');\n this.colorPickerSelector = document.createElement('div');\n this.colorPickerSelector.className = 'vis-selector';\n this.colorPickerDiv.appendChild(this.colorPickerSelector);\n this.colorPickerCanvas = document.createElement('canvas');\n this.colorPickerDiv.appendChild(this.colorPickerCanvas);\n\n if (!this.colorPickerCanvas.getContext) {\n var noCanvas = document.createElement('DIV');\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold';\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.colorPickerCanvas.appendChild(noCanvas);\n } else {\n var ctx = this.colorPickerCanvas.getContext(\"2d\");\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1);\n this.colorPickerCanvas.getContext(\"2d\").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n\n this.colorPickerDiv.className = 'vis-color';\n this.opacityDiv = document.createElement('div');\n this.opacityDiv.className = 'vis-opacity';\n this.brightnessDiv = document.createElement('div');\n this.brightnessDiv.className = 'vis-brightness';\n this.arrowDiv = document.createElement('div');\n this.arrowDiv.className = 'vis-arrow';\n this.opacityRange = document.createElement('input');\n\n try {\n this.opacityRange.type = 'range'; // Not supported on IE9\n\n this.opacityRange.min = '0';\n this.opacityRange.max = '100';\n } // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n\n\n this.opacityRange.value = '100';\n this.opacityRange.className = 'vis-range';\n this.brightnessRange = document.createElement('input');\n\n try {\n this.brightnessRange.type = 'range'; // Not supported on IE9\n\n this.brightnessRange.min = '0';\n this.brightnessRange.max = '100';\n } // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n\n\n this.brightnessRange.value = '100';\n this.brightnessRange.className = 'vis-range';\n this.opacityDiv.appendChild(this.opacityRange);\n this.brightnessDiv.appendChild(this.brightnessRange);\n var me = this;\n\n this.opacityRange.onchange = function () {\n me._setOpacity(this.value);\n };\n\n this.opacityRange.oninput = function () {\n me._setOpacity(this.value);\n };\n\n this.brightnessRange.onchange = function () {\n me._setBrightness(this.value);\n };\n\n this.brightnessRange.oninput = function () {\n me._setBrightness(this.value);\n };\n\n this.brightnessLabel = document.createElement(\"div\");\n this.brightnessLabel.className = \"vis-label vis-brightness\";\n this.brightnessLabel.innerHTML = 'brightness:';\n this.opacityLabel = document.createElement(\"div\");\n this.opacityLabel.className = \"vis-label vis-opacity\";\n this.opacityLabel.innerHTML = 'opacity:';\n this.newColorDiv = document.createElement(\"div\");\n this.newColorDiv.className = \"vis-new-color\";\n this.newColorDiv.innerHTML = 'new';\n this.initialColorDiv = document.createElement(\"div\");\n this.initialColorDiv.className = \"vis-initial-color\";\n this.initialColorDiv.innerHTML = 'initial';\n this.cancelButton = document.createElement(\"div\");\n this.cancelButton.className = \"vis-button vis-cancel\";\n this.cancelButton.innerHTML = 'cancel';\n this.cancelButton.onclick = bind$2(_context = this._hide).call(_context, this, false);\n this.applyButton = document.createElement(\"div\");\n this.applyButton.className = \"vis-button vis-apply\";\n this.applyButton.innerHTML = 'apply';\n this.applyButton.onclick = bind$2(_context2 = this._apply).call(_context2, this);\n this.saveButton = document.createElement(\"div\");\n this.saveButton.className = \"vis-button vis-save\";\n this.saveButton.innerHTML = 'save';\n this.saveButton.onclick = bind$2(_context3 = this._save).call(_context3, this);\n this.loadButton = document.createElement(\"div\");\n this.loadButton.className = \"vis-button vis-load\";\n this.loadButton.innerHTML = 'load last';\n this.loadButton.onclick = bind$2(_context4 = this._loadLast).call(_context4, this);\n this.frame.appendChild(this.colorPickerDiv);\n this.frame.appendChild(this.arrowDiv);\n this.frame.appendChild(this.brightnessLabel);\n this.frame.appendChild(this.brightnessDiv);\n this.frame.appendChild(this.opacityLabel);\n this.frame.appendChild(this.opacityDiv);\n this.frame.appendChild(this.newColorDiv);\n this.frame.appendChild(this.initialColorDiv);\n this.frame.appendChild(this.cancelButton);\n this.frame.appendChild(this.applyButton);\n this.frame.appendChild(this.saveButton);\n this.frame.appendChild(this.loadButton);\n }\n /**\n * bind hammer to the color picker\n * @private\n */\n\n }, {\n key: \"_bindHammer\",\n value: function _bindHammer() {\n var _this2 = this;\n\n this.drag = {};\n this.pinch = {};\n this.hammer = new hammer(this.colorPickerCanvas);\n this.hammer.get('pinch').set({\n enable: true\n });\n onTouch(this.hammer, function (event) {\n _this2._moveSelector(event);\n });\n this.hammer.on('tap', function (event) {\n _this2._moveSelector(event);\n });\n this.hammer.on('panstart', function (event) {\n _this2._moveSelector(event);\n });\n this.hammer.on('panmove', function (event) {\n _this2._moveSelector(event);\n });\n this.hammer.on('panend', function (event) {\n _this2._moveSelector(event);\n });\n }\n /**\n * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown.\n * @private\n */\n\n }, {\n key: \"_generateHueCircle\",\n value: function _generateHueCircle() {\n if (this.generated === false) {\n var ctx = this.colorPickerCanvas.getContext('2d');\n\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1);\n }\n\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); // clear the canvas\n\n var w = this.colorPickerCanvas.clientWidth;\n var h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h); // draw hue circle\n\n var x, y, hue, sat;\n this.centerCoordinates = {\n x: w * 0.5,\n y: h * 0.5\n };\n this.r = 0.49 * w;\n var angleConvert = 2 * Math.PI / 360;\n var hfac = 1 / 360;\n var sfac = 1 / this.r;\n var rgb;\n\n for (hue = 0; hue < 360; hue++) {\n for (sat = 0; sat < this.r; sat++) {\n x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue);\n y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue);\n rgb = HSVToRGB(hue * hfac, sat * sfac, 1);\n ctx.fillStyle = 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')';\n ctx.fillRect(x - 0.5, y - 0.5, 2, 2);\n }\n }\n\n ctx.strokeStyle = 'rgba(0,0,0,1)';\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.stroke();\n this.hueCircle = ctx.getImageData(0, 0, w, h);\n }\n\n this.generated = true;\n }\n /**\n * move the selector. This is called by hammer functions.\n *\n * @param {Event} event The event\n * @private\n */\n\n }, {\n key: \"_moveSelector\",\n value: function _moveSelector(event) {\n var rect = this.colorPickerDiv.getBoundingClientRect();\n var left = event.center.x - rect.left;\n var top = event.center.y - rect.top;\n var centerY = 0.5 * this.colorPickerDiv.clientHeight;\n var centerX = 0.5 * this.colorPickerDiv.clientWidth;\n var x = left - centerX;\n var y = top - centerY;\n var angle = Math.atan2(x, y);\n var radius = 0.98 * Math.min(Math.sqrt(x * x + y * y), centerX);\n var newTop = Math.cos(angle) * radius + centerY;\n var newLeft = Math.sin(angle) * radius + centerX;\n this.colorPickerSelector.style.top = newTop - 0.5 * this.colorPickerSelector.clientHeight + 'px';\n this.colorPickerSelector.style.left = newLeft - 0.5 * this.colorPickerSelector.clientWidth + 'px'; // set color\n\n var h = angle / (2 * Math.PI);\n h = h < 0 ? h + 1 : h;\n var s = radius / this.r;\n var hsv = RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.h = h;\n hsv.s = s;\n var rgba = HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba['a'] = this.color.a;\n this.color = rgba; // update previews\n\n this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')';\n this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')';\n }\n }]);\n\n return ColorPicker;\n}();\n\n/**\n * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options.\n * Boolean options are recognised as Boolean\n * Number options should be written as array: [default value, min value, max value, stepsize]\n * Colors should be written as array: ['color', '#ffffff']\n * Strings with should be written as array: [option1, option2, option3, ..]\n *\n * The options are matched with their counterparts in each of the modules and the values used in the configuration are\n */\n\nvar Configurator = /*#__PURE__*/function () {\n /**\n * @param {Object} parentModule | the location where parentModule.setOptions() can be called\n * @param {Object} defaultContainer | the default container of the module\n * @param {Object} configureOptions | the fully configured and predefined options set found in allOptions.js\n * @param {number} pixelRatio | canvas pixel ratio\n */\n function Configurator(parentModule, defaultContainer, configureOptions) {\n var pixelRatio = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n\n classCallCheck(this, Configurator);\n\n this.parent = parentModule;\n this.changedOptions = [];\n this.container = defaultContainer;\n this.allowCreation = false;\n this.options = {};\n this.initialized = false;\n this.popupCounter = 0;\n this.defaultOptions = {\n enabled: false,\n filter: true,\n container: undefined,\n showButton: true\n };\n\n assign$2(this.options, this.defaultOptions);\n\n this.configureOptions = configureOptions;\n this.moduleOptions = {};\n this.domElements = [];\n this.popupDiv = {};\n this.popupLimit = 5;\n this.popupHistory = {};\n this.colorPicker = new ColorPicker(pixelRatio);\n this.wrapper = undefined;\n }\n /**\n * refresh all options.\n * Because all modules parse their options by themselves, we just use their options. We copy them here.\n *\n * @param {Object} options\n */\n\n\n createClass(Configurator, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options !== undefined) {\n // reset the popup history because the indices may have been changed.\n this.popupHistory = {};\n\n this._removePopup();\n\n var enabled = true;\n\n if (typeof options === 'string') {\n this.options.filter = options;\n } else if (options instanceof Array) {\n this.options.filter = options.join();\n } else if (_typeof_1(options) === 'object') {\n if (options == null) {\n throw new TypeError('options cannot be null');\n }\n\n if (options.container !== undefined) {\n this.options.container = options.container;\n }\n\n if (filter$2(options) !== undefined) {\n this.options.filter = filter$2(options);\n }\n\n if (options.showButton !== undefined) {\n this.options.showButton = options.showButton;\n }\n\n if (options.enabled !== undefined) {\n enabled = options.enabled;\n }\n } else if (typeof options === 'boolean') {\n this.options.filter = true;\n enabled = options;\n } else if (typeof options === 'function') {\n this.options.filter = options;\n enabled = true;\n }\n\n if (filter$2(this.options) === false) {\n enabled = false;\n }\n\n this.options.enabled = enabled;\n }\n\n this._clean();\n }\n /**\n *\n * @param {Object} moduleOptions\n */\n\n }, {\n key: \"setModuleOptions\",\n value: function setModuleOptions(moduleOptions) {\n this.moduleOptions = moduleOptions;\n\n if (this.options.enabled === true) {\n this._clean();\n\n if (this.options.container !== undefined) {\n this.container = this.options.container;\n }\n\n this._create();\n }\n }\n /**\n * Create all DOM elements\n * @private\n */\n\n }, {\n key: \"_create\",\n value: function _create() {\n this._clean();\n\n this.changedOptions = [];\n\n var filter = filter$2(this.options);\n\n var counter = 0;\n var show = false;\n\n for (var option in this.configureOptions) {\n if (Object.prototype.hasOwnProperty.call(this.configureOptions, option)) {\n this.allowCreation = false;\n show = false;\n\n if (typeof filter === 'function') {\n show = filter(option, []);\n show = show || this._handleObject(this.configureOptions[option], [option], true);\n } else if (filter === true || indexOf$3(filter).call(filter, option) !== -1) {\n show = true;\n }\n\n if (show !== false) {\n this.allowCreation = true; // linebreak between categories\n\n if (counter > 0) {\n this._makeItem([]);\n } // a header for the category\n\n\n this._makeHeader(option); // get the sub options\n\n\n this._handleObject(this.configureOptions[option], [option]);\n }\n\n counter++;\n }\n }\n\n this._makeButton();\n\n this._push(); //~ this.colorPicker.insertTo(this.container);\n\n }\n /**\n * draw all DOM elements on the screen\n * @private\n */\n\n }, {\n key: \"_push\",\n value: function _push() {\n this.wrapper = document.createElement('div');\n this.wrapper.className = 'vis-configuration-wrapper';\n this.container.appendChild(this.wrapper);\n\n for (var i = 0; i < this.domElements.length; i++) {\n this.wrapper.appendChild(this.domElements[i]);\n }\n\n this._showPopupIfNeeded();\n }\n /**\n * delete all DOM elements\n * @private\n */\n\n }, {\n key: \"_clean\",\n value: function _clean() {\n for (var i = 0; i < this.domElements.length; i++) {\n this.wrapper.removeChild(this.domElements[i]);\n }\n\n if (this.wrapper !== undefined) {\n this.container.removeChild(this.wrapper);\n this.wrapper = undefined;\n }\n\n this.domElements = [];\n\n this._removePopup();\n }\n /**\n * get the value from the actualOptions if it exists\n * @param {array} path | where to look for the actual option\n * @returns {*}\n * @private\n */\n\n }, {\n key: \"_getValue\",\n value: function _getValue(path) {\n var base = this.moduleOptions;\n\n for (var i = 0; i < path.length; i++) {\n if (base[path[i]] !== undefined) {\n base = base[path[i]];\n } else {\n base = undefined;\n break;\n }\n }\n\n return base;\n }\n /**\n * all option elements are wrapped in an item\n * @param {Array} path | where to look for the actual option\n * @param {Array.} domElements\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_makeItem\",\n value: function _makeItem(path) {\n if (this.allowCreation === true) {\n var item = document.createElement('div');\n item.className = 'vis-configuration vis-config-item vis-config-s' + path.length;\n\n for (var _len = arguments.length, domElements = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n domElements[_key - 1] = arguments[_key];\n }\n\n forEach$2(domElements).call(domElements, function (element) {\n item.appendChild(element);\n });\n\n this.domElements.push(item);\n return this.domElements.length;\n }\n\n return 0;\n }\n /**\n * header for major subjects\n * @param {string} name\n * @private\n */\n\n }, {\n key: \"_makeHeader\",\n value: function _makeHeader(name) {\n var div = document.createElement('div');\n div.className = 'vis-configuration vis-config-header';\n div.innerHTML = name;\n\n this._makeItem([], div);\n }\n /**\n * make a label, if it is an object label, it gets different styling.\n * @param {string} name\n * @param {array} path | where to look for the actual option\n * @param {string} objectLabel\n * @returns {HTMLElement}\n * @private\n */\n\n }, {\n key: \"_makeLabel\",\n value: function _makeLabel(name, path) {\n var objectLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var div = document.createElement('div');\n div.className = 'vis-configuration vis-config-label vis-config-s' + path.length;\n\n if (objectLabel === true) {\n div.innerHTML = '' + name + ':';\n } else {\n div.innerHTML = name + ':';\n }\n\n return div;\n }\n /**\n * make a dropdown list for multiple possible string optoins\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n\n }, {\n key: \"_makeDropdown\",\n value: function _makeDropdown(arr, value, path) {\n var select = document.createElement('select');\n select.className = 'vis-configuration vis-config-select';\n var selectedValue = 0;\n\n if (value !== undefined) {\n if (indexOf$3(arr).call(arr, value) !== -1) {\n selectedValue = indexOf$3(arr).call(arr, value);\n }\n }\n\n for (var i = 0; i < arr.length; i++) {\n var option = document.createElement('option');\n option.value = arr[i];\n\n if (i === selectedValue) {\n option.selected = 'selected';\n }\n\n option.innerHTML = arr[i];\n select.appendChild(option);\n }\n\n var me = this;\n\n select.onchange = function () {\n me._update(this.value, path);\n };\n\n var label = this._makeLabel(path[path.length - 1], path);\n\n this._makeItem(path, label, select);\n }\n /**\n * make a range object for numeric options\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n\n }, {\n key: \"_makeRange\",\n value: function _makeRange(arr, value, path) {\n var defaultValue = arr[0];\n var min = arr[1];\n var max = arr[2];\n var step = arr[3];\n var range = document.createElement('input');\n range.className = 'vis-configuration vis-config-range';\n\n try {\n range.type = 'range'; // not supported on IE9\n\n range.min = min;\n range.max = max;\n } // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n\n\n range.step = step; // set up the popup settings in case they are needed.\n\n var popupString = '';\n var popupValue = 0;\n\n if (value !== undefined) {\n var factor = 1.20;\n\n if (value < 0 && value * factor < min) {\n range.min = Math.ceil(value * factor);\n popupValue = range.min;\n popupString = 'range increased';\n } else if (value / factor < min) {\n range.min = Math.ceil(value / factor);\n popupValue = range.min;\n popupString = 'range increased';\n }\n\n if (value * factor > max && max !== 1) {\n range.max = Math.ceil(value * factor);\n popupValue = range.max;\n popupString = 'range increased';\n }\n\n range.value = value;\n } else {\n range.value = defaultValue;\n }\n\n var input = document.createElement('input');\n input.className = 'vis-configuration vis-config-rangeinput';\n input.value = range.value;\n var me = this;\n\n range.onchange = function () {\n input.value = this.value;\n\n me._update(Number(this.value), path);\n };\n\n range.oninput = function () {\n input.value = this.value;\n };\n\n var label = this._makeLabel(path[path.length - 1], path);\n\n var itemIndex = this._makeItem(path, label, range, input); // if a popup is needed AND it has not been shown for this value, show it.\n\n\n if (popupString !== '' && this.popupHistory[itemIndex] !== popupValue) {\n this.popupHistory[itemIndex] = popupValue;\n\n this._setupPopup(popupString, itemIndex);\n }\n }\n /**\n * make a button object\n * @private\n */\n\n }, {\n key: \"_makeButton\",\n value: function _makeButton() {\n var _this = this;\n\n if (this.options.showButton === true) {\n var generateButton = document.createElement('div');\n generateButton.className = 'vis-configuration vis-config-button';\n generateButton.innerHTML = 'generate options';\n\n generateButton.onclick = function () {\n _this._printOptions();\n };\n\n generateButton.onmouseover = function () {\n generateButton.className = 'vis-configuration vis-config-button hover';\n };\n\n generateButton.onmouseout = function () {\n generateButton.className = 'vis-configuration vis-config-button';\n };\n\n this.optionsContainer = document.createElement('div');\n this.optionsContainer.className = 'vis-configuration vis-config-option-container';\n this.domElements.push(this.optionsContainer);\n this.domElements.push(generateButton);\n }\n }\n /**\n * prepare the popup\n * @param {string} string\n * @param {number} index\n * @private\n */\n\n }, {\n key: \"_setupPopup\",\n value: function _setupPopup(string, index) {\n var _this2 = this;\n\n if (this.initialized === true && this.allowCreation === true && this.popupCounter < this.popupLimit) {\n var div = document.createElement(\"div\");\n div.id = \"vis-configuration-popup\";\n div.className = \"vis-configuration-popup\";\n div.innerHTML = string;\n\n div.onclick = function () {\n _this2._removePopup();\n };\n\n this.popupCounter += 1;\n this.popupDiv = {\n html: div,\n index: index\n };\n }\n }\n /**\n * remove the popup from the dom\n * @private\n */\n\n }, {\n key: \"_removePopup\",\n value: function _removePopup() {\n if (this.popupDiv.html !== undefined) {\n this.popupDiv.html.parentNode.removeChild(this.popupDiv.html);\n clearTimeout(this.popupDiv.hideTimeout);\n clearTimeout(this.popupDiv.deleteTimeout);\n this.popupDiv = {};\n }\n }\n /**\n * Show the popup if it is needed.\n * @private\n */\n\n }, {\n key: \"_showPopupIfNeeded\",\n value: function _showPopupIfNeeded() {\n var _this3 = this;\n\n if (this.popupDiv.html !== undefined) {\n var correspondingElement = this.domElements[this.popupDiv.index];\n var rect = correspondingElement.getBoundingClientRect();\n this.popupDiv.html.style.left = rect.left + \"px\";\n this.popupDiv.html.style.top = rect.top - 30 + \"px\"; // 30 is the height;\n\n document.body.appendChild(this.popupDiv.html);\n this.popupDiv.hideTimeout = setTimeout$2(function () {\n _this3.popupDiv.html.style.opacity = 0;\n }, 1500);\n this.popupDiv.deleteTimeout = setTimeout$2(function () {\n _this3._removePopup();\n }, 1800);\n }\n }\n /**\n * make a checkbox for boolean options.\n * @param {number} defaultValue\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n\n }, {\n key: \"_makeCheckbox\",\n value: function _makeCheckbox(defaultValue, value, path) {\n var checkbox = document.createElement('input');\n checkbox.type = 'checkbox';\n checkbox.className = 'vis-configuration vis-config-checkbox';\n checkbox.checked = defaultValue;\n\n if (value !== undefined) {\n checkbox.checked = value;\n\n if (value !== defaultValue) {\n if (_typeof_1(defaultValue) === 'object') {\n if (value !== defaultValue.enabled) {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n } else {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n }\n }\n\n var me = this;\n\n checkbox.onchange = function () {\n me._update(this.checked, path);\n };\n\n var label = this._makeLabel(path[path.length - 1], path);\n\n this._makeItem(path, label, checkbox);\n }\n /**\n * make a text input field for string options.\n * @param {number} defaultValue\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n\n }, {\n key: \"_makeTextInput\",\n value: function _makeTextInput(defaultValue, value, path) {\n var checkbox = document.createElement('input');\n checkbox.type = 'text';\n checkbox.className = 'vis-configuration vis-config-text';\n checkbox.value = value;\n\n if (value !== defaultValue) {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n\n var me = this;\n\n checkbox.onchange = function () {\n me._update(this.value, path);\n };\n\n var label = this._makeLabel(path[path.length - 1], path);\n\n this._makeItem(path, label, checkbox);\n }\n /**\n * make a color field with a color picker for color fields\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n\n }, {\n key: \"_makeColorField\",\n value: function _makeColorField(arr, value, path) {\n var _this4 = this;\n\n var defaultColor = arr[1];\n var div = document.createElement('div');\n value = value === undefined ? defaultColor : value;\n\n if (value !== 'none') {\n div.className = 'vis-configuration vis-config-colorBlock';\n div.style.backgroundColor = value;\n } else {\n div.className = 'vis-configuration vis-config-colorBlock none';\n }\n\n value = value === undefined ? defaultColor : value;\n\n div.onclick = function () {\n _this4._showColorPicker(value, div, path);\n };\n\n var label = this._makeLabel(path[path.length - 1], path);\n\n this._makeItem(path, label, div);\n }\n /**\n * used by the color buttons to call the color picker.\n * @param {number} value\n * @param {HTMLElement} div\n * @param {array} path | where to look for the actual option\n * @private\n */\n\n }, {\n key: \"_showColorPicker\",\n value: function _showColorPicker(value, div, path) {\n var _this5 = this;\n\n // clear the callback from this div\n div.onclick = function () {};\n\n this.colorPicker.insertTo(div);\n this.colorPicker.show();\n this.colorPicker.setColor(value);\n this.colorPicker.setUpdateCallback(function (color) {\n var colorString = 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + color.a + ')';\n div.style.backgroundColor = colorString;\n\n _this5._update(colorString, path);\n }); // on close of the colorpicker, restore the callback.\n\n this.colorPicker.setCloseCallback(function () {\n div.onclick = function () {\n _this5._showColorPicker(value, div, path);\n };\n });\n }\n /**\n * parse an object and draw the correct items\n * @param {Object} obj\n * @param {array} [path=[]] | where to look for the actual option\n * @param {boolean} [checkOnly=false]\n * @returns {boolean}\n * @private\n */\n\n }, {\n key: \"_handleObject\",\n value: function _handleObject(obj) {\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var checkOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var show = false;\n\n var filter = filter$2(this.options);\n\n var visibleInSet = false;\n\n for (var subObj in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, subObj)) {\n show = true;\n var item = obj[subObj];\n var newPath = copyAndExtendArray(path, subObj);\n\n if (typeof filter === 'function') {\n show = filter(subObj, path); // if needed we must go deeper into the object.\n\n if (show === false) {\n if (!(item instanceof Array) && typeof item !== 'string' && typeof item !== 'boolean' && item instanceof Object) {\n this.allowCreation = false;\n show = this._handleObject(item, newPath, true);\n this.allowCreation = checkOnly === false;\n }\n }\n }\n\n if (show !== false) {\n visibleInSet = true;\n\n var value = this._getValue(newPath);\n\n if (item instanceof Array) {\n this._handleArray(item, value, newPath);\n } else if (typeof item === 'string') {\n this._makeTextInput(item, value, newPath);\n } else if (typeof item === 'boolean') {\n this._makeCheckbox(item, value, newPath);\n } else if (item instanceof Object) {\n // collapse the physics options that are not enabled\n var draw = true;\n\n if (indexOf$3(path).call(path, 'physics') !== -1) {\n if (this.moduleOptions.physics.solver !== subObj && subObj !== 'wind') {\n draw = false;\n }\n }\n\n if (draw === true) {\n // initially collapse options with an disabled enabled option.\n if (item.enabled !== undefined) {\n var enabledPath = copyAndExtendArray(newPath, 'enabled');\n\n var enabledValue = this._getValue(enabledPath);\n\n if (enabledValue === true) {\n var label = this._makeLabel(subObj, newPath, true);\n\n this._makeItem(newPath, label);\n\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n } else {\n this._makeCheckbox(item, enabledValue, newPath);\n }\n } else {\n var _label = this._makeLabel(subObj, newPath, true);\n\n this._makeItem(newPath, _label);\n\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n }\n }\n } else {\n console.error('dont know how to handle', item, subObj, newPath);\n }\n }\n }\n }\n\n return visibleInSet;\n }\n /**\n * handle the array type of option\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n\n }, {\n key: \"_handleArray\",\n value: function _handleArray(arr, value, path) {\n if (typeof arr[0] === 'string' && arr[0] === 'color') {\n this._makeColorField(arr, value, path);\n\n if (arr[1] !== value) {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n } else if (typeof arr[0] === 'string') {\n this._makeDropdown(arr, value, path);\n\n if (arr[0] !== value) {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n } else if (typeof arr[0] === 'number') {\n this._makeRange(arr, value, path);\n\n if (arr[0] !== value) {\n this.changedOptions.push({\n path: path,\n value: Number(value)\n });\n }\n }\n }\n /**\n * called to update the network with the new settings.\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n\n }, {\n key: \"_update\",\n value: function _update(value, path) {\n var options = this._constructOptions(value, path);\n\n if (this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit) {\n this.parent.body.emitter.emit(\"configChange\", options);\n }\n\n this.initialized = true;\n this.parent.setOptions(options);\n }\n /**\n *\n * @param {string|Boolean} value\n * @param {Array.} path\n * @param {{}} optionsObj\n * @returns {{}}\n * @private\n */\n\n }, {\n key: \"_constructOptions\",\n value: function _constructOptions(value, path) {\n var optionsObj = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var pointer = optionsObj; // when dropdown boxes can be string or boolean, we typecast it into correct types\n\n value = value === 'true' ? true : value;\n value = value === 'false' ? false : value;\n\n for (var i = 0; i < path.length; i++) {\n if (path[i] !== 'global') {\n if (pointer[path[i]] === undefined) {\n pointer[path[i]] = {};\n }\n\n if (i !== path.length - 1) {\n pointer = pointer[path[i]];\n } else {\n pointer[path[i]] = value;\n }\n }\n }\n\n return optionsObj;\n }\n /**\n * @private\n */\n\n }, {\n key: \"_printOptions\",\n value: function _printOptions() {\n var options = this.getOptions();\n this.optionsContainer.innerHTML = '
var options = ' + stringify$2(options, null, 2) + '
';\n }\n /**\n *\n * @returns {{}} options\n */\n\n }, {\n key: \"getOptions\",\n value: function getOptions() {\n var options = {};\n\n for (var i = 0; i < this.changedOptions.length; i++) {\n this._constructOptions(this.changedOptions[i].value, this.changedOptions[i].path, options);\n }\n\n return options;\n }\n }]);\n\n return Configurator;\n}();\n\n/**\n * This object contains all possible options. It will check if the types are correct, if required if the option is one\n * of the allowed values.\n *\n * __any__ means that the name of the property does not matter.\n * __type__ is a required field for all objects and contains the allowed types of all objects\n */\nvar string = 'string';\nvar bool = 'boolean';\nvar number = 'number';\nvar array = 'array';\nvar object = 'object'; // should only be in a __type__ property\n\nvar dom = 'dom';\nvar any = 'any'; // List of endpoints\n\nvar endPoints = [\"arrow\", \"bar\", \"box\", \"circle\", \"crow\", \"curve\", \"diamond\", \"image\", \"inv_curve\", \"inv_triangle\", \"triangle\", \"vee\"];\nvar allOptions$1 = {\n configure: {\n enabled: {\n boolean: bool\n },\n filter: {\n boolean: bool,\n string: string,\n array: array,\n 'function': 'function'\n },\n container: {\n dom: dom\n },\n showButton: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool,\n string: string,\n array: array,\n 'function': 'function'\n }\n },\n edges: {\n arrows: {\n to: {\n enabled: {\n boolean: bool\n },\n scaleFactor: {\n number: number\n },\n type: {\n string: endPoints\n },\n imageHeight: {\n number: number\n },\n imageWidth: {\n number: number\n },\n src: {\n string: string\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n middle: {\n enabled: {\n boolean: bool\n },\n scaleFactor: {\n number: number\n },\n type: {\n string: endPoints\n },\n imageWidth: {\n number: number\n },\n imageHeight: {\n number: number\n },\n src: {\n string: string\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n from: {\n enabled: {\n boolean: bool\n },\n scaleFactor: {\n number: number\n },\n type: {\n string: endPoints\n },\n imageWidth: {\n number: number\n },\n imageHeight: {\n number: number\n },\n src: {\n string: string\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n __type__: {\n string: [\"from\", \"to\", \"middle\"],\n object: object\n }\n },\n endPointOffset: {\n from: {\n number: number\n },\n to: {\n number: number\n },\n __type__: {\n object: object,\n number: number\n }\n },\n arrowStrikethrough: {\n boolean: bool\n },\n background: {\n enabled: {\n boolean: bool\n },\n color: {\n string: string\n },\n size: {\n number: number\n },\n dashes: {\n boolean: bool,\n array: array\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n chosen: {\n label: {\n boolean: bool,\n 'function': 'function'\n },\n edge: {\n boolean: bool,\n 'function': 'function'\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n color: {\n color: {\n string: string\n },\n highlight: {\n string: string\n },\n hover: {\n string: string\n },\n inherit: {\n string: ['from', 'to', 'both'],\n boolean: bool\n },\n opacity: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n dashes: {\n boolean: bool,\n array: array\n },\n font: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n background: {\n string: string\n },\n strokeWidth: {\n number: number\n },\n // px\n strokeColor: {\n string: string\n },\n align: {\n string: ['horizontal', 'top', 'middle', 'bottom']\n },\n vadjust: {\n number: number\n },\n multi: {\n boolean: bool,\n string: string\n },\n bold: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n boldital: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n ital: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n mono: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n __type__: {\n object: object,\n string: string\n }\n },\n hidden: {\n boolean: bool\n },\n hoverWidth: {\n 'function': 'function',\n number: number\n },\n label: {\n string: string,\n 'undefined': 'undefined'\n },\n labelHighlightBold: {\n boolean: bool\n },\n length: {\n number: number,\n 'undefined': 'undefined'\n },\n physics: {\n boolean: bool\n },\n scaling: {\n min: {\n number: number\n },\n max: {\n number: number\n },\n label: {\n enabled: {\n boolean: bool\n },\n min: {\n number: number\n },\n max: {\n number: number\n },\n maxVisible: {\n number: number\n },\n drawThreshold: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n customScalingFunction: {\n 'function': 'function'\n },\n __type__: {\n object: object\n }\n },\n selectionWidth: {\n 'function': 'function',\n number: number\n },\n selfReferenceSize: {\n number: number\n },\n selfReference: {\n size: {\n number: number\n },\n angle: {\n number: number\n },\n renderBehindTheNode: {\n boolean: bool\n },\n __type__: {\n object: object\n }\n },\n shadow: {\n enabled: {\n boolean: bool\n },\n color: {\n string: string\n },\n size: {\n number: number\n },\n x: {\n number: number\n },\n y: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n smooth: {\n enabled: {\n boolean: bool\n },\n type: {\n string: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier']\n },\n roundness: {\n number: number\n },\n forceDirection: {\n string: ['horizontal', 'vertical', 'none'],\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n title: {\n string: string,\n 'undefined': 'undefined'\n },\n width: {\n number: number\n },\n widthConstraint: {\n maximum: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool,\n number: number\n }\n },\n value: {\n number: number,\n 'undefined': 'undefined'\n },\n __type__: {\n object: object\n }\n },\n groups: {\n useDefaultGroups: {\n boolean: bool\n },\n __any__: 'get from nodes, will be overwritten below',\n __type__: {\n object: object\n }\n },\n interaction: {\n dragNodes: {\n boolean: bool\n },\n dragView: {\n boolean: bool\n },\n hideEdgesOnDrag: {\n boolean: bool\n },\n hideEdgesOnZoom: {\n boolean: bool\n },\n hideNodesOnDrag: {\n boolean: bool\n },\n hover: {\n boolean: bool\n },\n keyboard: {\n enabled: {\n boolean: bool\n },\n speed: {\n x: {\n number: number\n },\n y: {\n number: number\n },\n zoom: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n bindToWindow: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n multiselect: {\n boolean: bool\n },\n navigationButtons: {\n boolean: bool\n },\n selectable: {\n boolean: bool\n },\n selectConnectedEdges: {\n boolean: bool\n },\n hoverConnectedEdges: {\n boolean: bool\n },\n tooltipDelay: {\n number: number\n },\n zoomView: {\n boolean: bool\n },\n zoomSpeed: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n layout: {\n randomSeed: {\n 'undefined': 'undefined',\n number: number,\n string: string\n },\n improvedLayout: {\n boolean: bool\n },\n clusterThreshold: {\n number: number\n },\n hierarchical: {\n enabled: {\n boolean: bool\n },\n levelSeparation: {\n number: number\n },\n nodeSpacing: {\n number: number\n },\n treeSpacing: {\n number: number\n },\n blockShifting: {\n boolean: bool\n },\n edgeMinimization: {\n boolean: bool\n },\n parentCentralization: {\n boolean: bool\n },\n direction: {\n string: ['UD', 'DU', 'LR', 'RL']\n },\n // UD, DU, LR, RL\n sortMethod: {\n string: ['hubsize', 'directed']\n },\n // hubsize, directed\n shakeTowards: {\n string: ['leaves', 'roots']\n },\n // leaves, roots\n __type__: {\n object: object,\n boolean: bool\n }\n },\n __type__: {\n object: object\n }\n },\n manipulation: {\n enabled: {\n boolean: bool\n },\n initiallyActive: {\n boolean: bool\n },\n addNode: {\n boolean: bool,\n 'function': 'function'\n },\n addEdge: {\n boolean: bool,\n 'function': 'function'\n },\n editNode: {\n 'function': 'function'\n },\n editEdge: {\n editWithoutDrag: {\n 'function': 'function'\n },\n __type__: {\n object: object,\n boolean: bool,\n 'function': 'function'\n }\n },\n deleteNode: {\n boolean: bool,\n 'function': 'function'\n },\n deleteEdge: {\n boolean: bool,\n 'function': 'function'\n },\n controlNodeStyle: 'get from nodes, will be overwritten below',\n __type__: {\n object: object,\n boolean: bool\n }\n },\n nodes: {\n borderWidth: {\n number: number\n },\n borderWidthSelected: {\n number: number,\n 'undefined': 'undefined'\n },\n brokenImage: {\n string: string,\n 'undefined': 'undefined'\n },\n chosen: {\n label: {\n boolean: bool,\n 'function': 'function'\n },\n node: {\n boolean: bool,\n 'function': 'function'\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n color: {\n border: {\n string: string\n },\n background: {\n string: string\n },\n highlight: {\n border: {\n string: string\n },\n background: {\n string: string\n },\n __type__: {\n object: object,\n string: string\n }\n },\n hover: {\n border: {\n string: string\n },\n background: {\n string: string\n },\n __type__: {\n object: object,\n string: string\n }\n },\n __type__: {\n object: object,\n string: string\n }\n },\n opacity: {\n number: number,\n 'undefined': 'undefined'\n },\n fixed: {\n x: {\n boolean: bool\n },\n y: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n font: {\n align: {\n string: string\n },\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n background: {\n string: string\n },\n strokeWidth: {\n number: number\n },\n // px\n strokeColor: {\n string: string\n },\n vadjust: {\n number: number\n },\n multi: {\n boolean: bool,\n string: string\n },\n bold: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n boldital: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n ital: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n mono: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n __type__: {\n object: object,\n string: string\n }\n },\n group: {\n string: string,\n number: number,\n 'undefined': 'undefined'\n },\n heightConstraint: {\n minimum: {\n number: number\n },\n valign: {\n string: string\n },\n __type__: {\n object: object,\n boolean: bool,\n number: number\n }\n },\n hidden: {\n boolean: bool\n },\n icon: {\n face: {\n string: string\n },\n code: {\n string: string\n },\n //'\\uf007',\n size: {\n number: number\n },\n //50,\n color: {\n string: string\n },\n weight: {\n string: string,\n number: number\n },\n __type__: {\n object: object\n }\n },\n id: {\n string: string,\n number: number\n },\n image: {\n selected: {\n string: string,\n 'undefined': 'undefined'\n },\n // --> URL\n unselected: {\n string: string,\n 'undefined': 'undefined'\n },\n // --> URL\n __type__: {\n object: object,\n string: string\n }\n },\n imagePadding: {\n top: {\n number: number\n },\n right: {\n number: number\n },\n bottom: {\n number: number\n },\n left: {\n number: number\n },\n __type__: {\n object: object,\n number: number\n }\n },\n label: {\n string: string,\n 'undefined': 'undefined'\n },\n labelHighlightBold: {\n boolean: bool\n },\n level: {\n number: number,\n 'undefined': 'undefined'\n },\n margin: {\n top: {\n number: number\n },\n right: {\n number: number\n },\n bottom: {\n number: number\n },\n left: {\n number: number\n },\n __type__: {\n object: object,\n number: number\n }\n },\n mass: {\n number: number\n },\n physics: {\n boolean: bool\n },\n scaling: {\n min: {\n number: number\n },\n max: {\n number: number\n },\n label: {\n enabled: {\n boolean: bool\n },\n min: {\n number: number\n },\n max: {\n number: number\n },\n maxVisible: {\n number: number\n },\n drawThreshold: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n customScalingFunction: {\n 'function': 'function'\n },\n __type__: {\n object: object\n }\n },\n shadow: {\n enabled: {\n boolean: bool\n },\n color: {\n string: string\n },\n size: {\n number: number\n },\n x: {\n number: number\n },\n y: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n shape: {\n string: ['custom', 'ellipse', 'circle', 'database', 'box', 'text', 'image', 'circularImage', 'diamond', 'dot', 'star', 'triangle', 'triangleDown', 'square', 'icon', 'hexagon']\n },\n customRenderer: {\n 'function': 'function'\n },\n shapeProperties: {\n borderDashes: {\n boolean: bool,\n array: array\n },\n borderRadius: {\n number: number\n },\n interpolation: {\n boolean: bool\n },\n useImageSize: {\n boolean: bool\n },\n useBorderWithImage: {\n boolean: bool\n },\n coordinateOrigin: {\n string: ['center', 'top-left']\n },\n __type__: {\n object: object\n }\n },\n size: {\n number: number\n },\n title: {\n string: string,\n dom: dom,\n 'undefined': 'undefined'\n },\n value: {\n number: number,\n 'undefined': 'undefined'\n },\n widthConstraint: {\n minimum: {\n number: number\n },\n maximum: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool,\n number: number\n }\n },\n x: {\n number: number\n },\n y: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n physics: {\n enabled: {\n boolean: bool\n },\n barnesHut: {\n theta: {\n number: number\n },\n gravitationalConstant: {\n number: number\n },\n centralGravity: {\n number: number\n },\n springLength: {\n number: number\n },\n springConstant: {\n number: number\n },\n damping: {\n number: number\n },\n avoidOverlap: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n forceAtlas2Based: {\n theta: {\n number: number\n },\n gravitationalConstant: {\n number: number\n },\n centralGravity: {\n number: number\n },\n springLength: {\n number: number\n },\n springConstant: {\n number: number\n },\n damping: {\n number: number\n },\n avoidOverlap: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n repulsion: {\n centralGravity: {\n number: number\n },\n springLength: {\n number: number\n },\n springConstant: {\n number: number\n },\n nodeDistance: {\n number: number\n },\n damping: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n hierarchicalRepulsion: {\n centralGravity: {\n number: number\n },\n springLength: {\n number: number\n },\n springConstant: {\n number: number\n },\n nodeDistance: {\n number: number\n },\n damping: {\n number: number\n },\n avoidOverlap: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n maxVelocity: {\n number: number\n },\n minVelocity: {\n number: number\n },\n // px/s\n solver: {\n string: ['barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based']\n },\n stabilization: {\n enabled: {\n boolean: bool\n },\n iterations: {\n number: number\n },\n // maximum number of iteration to stabilize\n updateInterval: {\n number: number\n },\n onlyDynamicEdges: {\n boolean: bool\n },\n fit: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n timestep: {\n number: number\n },\n adaptiveTimestep: {\n boolean: bool\n },\n wind: {\n x: {\n number: number\n },\n y: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n //globals :\n autoResize: {\n boolean: bool\n },\n clickToUse: {\n boolean: bool\n },\n locale: {\n string: string\n },\n locales: {\n __any__: {\n any: any\n },\n __type__: {\n object: object\n }\n },\n height: {\n string: string\n },\n width: {\n string: string\n },\n __type__: {\n object: object\n }\n};\nallOptions$1.groups.__any__ = allOptions$1.nodes;\nallOptions$1.manipulation.controlNodeStyle = allOptions$1.nodes;\n/**\n * This provides ranges, initial values, steps and dropdown menu choices for the\n * configuration.\n *\n * @remarks\n * Checkbox: `boolean`\n * The value supllied will be used as the initial value.\n *\n * Text field: `string`\n * The passed text will be used as the initial value. Any text will be\n * accepted afterwards.\n *\n * Number range: `[number, number, number, number]`\n * The meanings are `[initial value, min, max, step]`.\n *\n * Dropdown: `[Exclude, ...(string | number | boolean)[]]`\n * Translations for people with poor understanding of TypeScript: the first\n * value always has to be a string but never `\"color\"`, the rest can be any\n * combination of strings, numbers and booleans.\n *\n * Color picker: `[\"color\", string]`\n * The first value says this will be a color picker not a dropdown menu. The\n * next value is the initial color.\n */\n\nvar configureOptions = {\n nodes: {\n borderWidth: [1, 0, 10, 1],\n borderWidthSelected: [2, 0, 10, 1],\n color: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#97C2FC'],\n highlight: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#D2E5FF']\n },\n hover: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#D2E5FF']\n }\n },\n opacity: [0, 0, 1, 0.1],\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: ['color', '#343434'],\n size: [14, 0, 100, 1],\n // px\n face: ['arial', 'verdana', 'tahoma'],\n background: ['color', 'none'],\n strokeWidth: [0, 0, 50, 1],\n // px\n strokeColor: ['color', '#ffffff']\n },\n //group: 'string',\n hidden: false,\n labelHighlightBold: true,\n //icon: {\n // face: 'string', //'FontAwesome',\n // code: 'string', //'\\uf007',\n // size: [50, 0, 200, 1], //50,\n // color: ['color','#2B7CE9'] //'#aa00ff'\n //},\n //image: 'string', // --> URL\n physics: true,\n scaling: {\n min: [10, 0, 200, 1],\n max: [30, 0, 200, 1],\n label: {\n enabled: false,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n shape: ['ellipse', 'box', 'circle', 'database', 'diamond', 'dot', 'square', 'star', 'text', 'triangle', 'triangleDown', 'hexagon'],\n shapeProperties: {\n borderDashes: false,\n borderRadius: [6, 0, 20, 1],\n interpolation: true,\n useImageSize: false\n },\n size: [25, 0, 200, 1]\n },\n edges: {\n arrows: {\n to: {\n enabled: false,\n scaleFactor: [1, 0, 3, 0.05],\n type: 'arrow'\n },\n middle: {\n enabled: false,\n scaleFactor: [1, 0, 3, 0.05],\n type: 'arrow'\n },\n from: {\n enabled: false,\n scaleFactor: [1, 0, 3, 0.05],\n type: 'arrow'\n }\n },\n endPointOffset: {\n from: [0, -10, 10, 1],\n to: [0, -10, 10, 1]\n },\n arrowStrikethrough: true,\n color: {\n color: ['color', '#848484'],\n highlight: ['color', '#848484'],\n hover: ['color', '#848484'],\n inherit: ['from', 'to', 'both', true, false],\n opacity: [1, 0, 1, 0.05]\n },\n dashes: false,\n font: {\n color: ['color', '#343434'],\n size: [14, 0, 100, 1],\n // px\n face: ['arial', 'verdana', 'tahoma'],\n background: ['color', 'none'],\n strokeWidth: [2, 0, 50, 1],\n // px\n strokeColor: ['color', '#ffffff'],\n align: ['horizontal', 'top', 'middle', 'bottom']\n },\n hidden: false,\n hoverWidth: [1.5, 0, 5, 0.1],\n labelHighlightBold: true,\n physics: true,\n scaling: {\n min: [1, 0, 100, 1],\n max: [15, 0, 100, 1],\n label: {\n enabled: true,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n selectionWidth: [1.5, 0, 5, 0.1],\n selfReferenceSize: [20, 0, 200, 1],\n selfReference: {\n size: [20, 0, 200, 1],\n angle: [Math.PI / 2, -6 * Math.PI, 6 * Math.PI, Math.PI / 8],\n renderBehindTheNode: true\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n smooth: {\n enabled: true,\n type: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'],\n forceDirection: ['horizontal', 'vertical', 'none'],\n roundness: [0.5, 0, 1, 0.05]\n },\n width: [1, 0, 30, 1]\n },\n layout: {\n //randomSeed: [0, 0, 500, 1],\n //improvedLayout: true,\n hierarchical: {\n enabled: false,\n levelSeparation: [150, 20, 500, 5],\n nodeSpacing: [100, 20, 500, 5],\n treeSpacing: [200, 20, 500, 5],\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: ['UD', 'DU', 'LR', 'RL'],\n // UD, DU, LR, RL\n sortMethod: ['hubsize', 'directed'],\n // hubsize, directed\n shakeTowards: ['leaves', 'roots'] // leaves, roots\n\n }\n },\n interaction: {\n dragNodes: true,\n dragView: true,\n hideEdgesOnDrag: false,\n hideEdgesOnZoom: false,\n hideNodesOnDrag: false,\n hover: false,\n keyboard: {\n enabled: false,\n speed: {\n x: [10, 0, 40, 1],\n y: [10, 0, 40, 1],\n zoom: [0.02, 0, 0.1, 0.005]\n },\n bindToWindow: true\n },\n multiselect: false,\n navigationButtons: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true,\n tooltipDelay: [300, 0, 1000, 25],\n zoomView: true,\n zoomSpeed: [1, 0.1, 2, 0.1]\n },\n manipulation: {\n enabled: false,\n initiallyActive: false\n },\n physics: {\n enabled: true,\n barnesHut: {\n theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-2000, -30000, 0, 50],\n centralGravity: [0.3, 0, 10, 0.05],\n springLength: [95, 0, 500, 5],\n springConstant: [0.04, 0, 1.2, 0.005],\n damping: [0.09, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n forceAtlas2Based: {\n theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-50, -500, 0, 1],\n centralGravity: [0.01, 0, 1, 0.005],\n springLength: [95, 0, 500, 5],\n springConstant: [0.08, 0, 1.2, 0.005],\n damping: [0.4, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n repulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [200, 0, 500, 5],\n springConstant: [0.05, 0, 1.2, 0.005],\n nodeDistance: [100, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01]\n },\n hierarchicalRepulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [100, 0, 500, 5],\n springConstant: [0.01, 0, 1.2, 0.005],\n nodeDistance: [120, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n maxVelocity: [50, 0, 150, 1],\n minVelocity: [0.1, 0.01, 0.5, 0.01],\n solver: ['barnesHut', 'forceAtlas2Based', 'repulsion', 'hierarchicalRepulsion'],\n timestep: [0.5, 0.01, 1, 0.01],\n wind: {\n x: [0, -10, 10, 0.1],\n y: [0, -10, 10, 0.1]\n } //adaptiveTimestep: true\n\n }\n};\n\nvar options = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tallOptions: allOptions$1,\n\tconfigureOptions: configureOptions\n});\n\n/**\n * The Floyd–Warshall algorithm is an algorithm for finding shortest paths in\n * a weighted graph with positive or negative edge weights (but with no negative\n * cycles). - https://en.wikipedia.org/wiki/Floyd–Warshall_algorithm\n */\nvar FloydWarshall = /*#__PURE__*/function () {\n /**\n * @ignore\n */\n function FloydWarshall() {\n classCallCheck(this, FloydWarshall);\n }\n /**\n *\n * @param {Object} body\n * @param {Array.} nodesArray\n * @param {Array.} edgesArray\n * @returns {{}}\n */\n\n\n createClass(FloydWarshall, [{\n key: \"getDistances\",\n value: function getDistances(body, nodesArray, edgesArray) {\n var D_matrix = {};\n var edges = body.edges; // prepare matrix with large numbers\n\n for (var i = 0; i < nodesArray.length; i++) {\n var node = nodesArray[i];\n var cell = {};\n D_matrix[node] = cell;\n\n for (var j = 0; j < nodesArray.length; j++) {\n cell[nodesArray[j]] = i == j ? 0 : 1e9;\n }\n } // put the weights for the edges in. This assumes unidirectionality.\n\n\n for (var _i = 0; _i < edgesArray.length; _i++) {\n var edge = edges[edgesArray[_i]]; // edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix\n\n if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) {\n D_matrix[edge.fromId][edge.toId] = 1;\n D_matrix[edge.toId][edge.fromId] = 1;\n }\n }\n\n var nodeCount = nodesArray.length; // Adapted FloydWarshall based on unidirectionality to greatly reduce complexity.\n\n for (var k = 0; k < nodeCount; k++) {\n var knode = nodesArray[k];\n var kcolm = D_matrix[knode];\n\n for (var _i2 = 0; _i2 < nodeCount - 1; _i2++) {\n var inode = nodesArray[_i2];\n var icolm = D_matrix[inode];\n\n for (var _j = _i2 + 1; _j < nodeCount; _j++) {\n var jnode = nodesArray[_j];\n var jcolm = D_matrix[jnode];\n var val = Math.min(icolm[jnode], icolm[knode] + kcolm[jnode]);\n icolm[jnode] = val;\n jcolm[inode] = val;\n }\n }\n }\n\n return D_matrix;\n }\n }]);\n\n return FloydWarshall;\n}();\n\n/**\n * KamadaKawai positions the nodes initially based on\n *\n * \"AN ALGORITHM FOR DRAWING GENERAL UNDIRECTED GRAPHS\"\n * -- Tomihisa KAMADA and Satoru KAWAI in 1989\n *\n * Possible optimizations in the distance calculation can be implemented.\n */\n\nvar KamadaKawai = /*#__PURE__*/function () {\n /**\n * @param {Object} body\n * @param {number} edgeLength\n * @param {number} edgeStrength\n */\n function KamadaKawai(body, edgeLength, edgeStrength) {\n classCallCheck(this, KamadaKawai);\n\n this.body = body;\n this.springLength = edgeLength;\n this.springConstant = edgeStrength;\n this.distanceSolver = new FloydWarshall();\n }\n /**\n * Not sure if needed but can be used to update the spring length and spring constant\n * @param {Object} options\n */\n\n\n createClass(KamadaKawai, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options) {\n if (options.springLength) {\n this.springLength = options.springLength;\n }\n\n if (options.springConstant) {\n this.springConstant = options.springConstant;\n }\n }\n }\n /**\n * Position the system\n * @param {Array.} nodesArray\n * @param {Array.} edgesArray\n * @param {boolean} [ignoreClusters=false]\n */\n\n }, {\n key: \"solve\",\n value: function solve(nodesArray, edgesArray) {\n var ignoreClusters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n // get distance matrix\n var D_matrix = this.distanceSolver.getDistances(this.body, nodesArray, edgesArray); // distance matrix\n // get the L Matrix\n\n this._createL_matrix(D_matrix); // get the K Matrix\n\n\n this._createK_matrix(D_matrix); // initial E Matrix\n\n\n this._createE_matrix(); // calculate positions\n\n\n var threshold = 0.01;\n var innerThreshold = 1;\n var iterations = 0;\n var maxIterations = Math.max(1000, Math.min(10 * this.body.nodeIndices.length, 6000));\n var maxInnerIterations = 5;\n var maxEnergy = 1e9;\n var highE_nodeId = 0,\n dE_dx = 0,\n dE_dy = 0,\n delta_m = 0,\n subIterations = 0;\n\n while (maxEnergy > threshold && iterations < maxIterations) {\n iterations += 1;\n\n var _this$_getHighestEner = this._getHighestEnergyNode(ignoreClusters);\n\n var _this$_getHighestEner2 = slicedToArray(_this$_getHighestEner, 4);\n\n highE_nodeId = _this$_getHighestEner2[0];\n maxEnergy = _this$_getHighestEner2[1];\n dE_dx = _this$_getHighestEner2[2];\n dE_dy = _this$_getHighestEner2[3];\n delta_m = maxEnergy;\n subIterations = 0;\n\n while (delta_m > innerThreshold && subIterations < maxInnerIterations) {\n subIterations += 1;\n\n this._moveNode(highE_nodeId, dE_dx, dE_dy);\n\n var _this$_getEnergy = this._getEnergy(highE_nodeId);\n\n var _this$_getEnergy2 = slicedToArray(_this$_getEnergy, 3);\n\n delta_m = _this$_getEnergy2[0];\n dE_dx = _this$_getEnergy2[1];\n dE_dy = _this$_getEnergy2[2];\n }\n }\n }\n /**\n * get the node with the highest energy\n * @param {boolean} ignoreClusters\n * @returns {number[]}\n * @private\n */\n\n }, {\n key: \"_getHighestEnergyNode\",\n value: function _getHighestEnergyNode(ignoreClusters) {\n var nodesArray = this.body.nodeIndices;\n var nodes = this.body.nodes;\n var maxEnergy = 0;\n var maxEnergyNodeId = nodesArray[0];\n var dE_dx_max = 0,\n dE_dy_max = 0;\n\n for (var nodeIdx = 0; nodeIdx < nodesArray.length; nodeIdx++) {\n var m = nodesArray[nodeIdx]; // by not evaluating nodes with predefined positions we should only move nodes that have no positions.\n\n if (nodes[m].predefinedPosition === false || nodes[m].isCluster === true && ignoreClusters === true || nodes[m].options.fixed.x === true || nodes[m].options.fixed.y === true) {\n var _this$_getEnergy3 = this._getEnergy(m),\n _this$_getEnergy4 = slicedToArray(_this$_getEnergy3, 3),\n delta_m = _this$_getEnergy4[0],\n dE_dx = _this$_getEnergy4[1],\n dE_dy = _this$_getEnergy4[2];\n\n if (maxEnergy < delta_m) {\n maxEnergy = delta_m;\n maxEnergyNodeId = m;\n dE_dx_max = dE_dx;\n dE_dy_max = dE_dy;\n }\n }\n }\n\n return [maxEnergyNodeId, maxEnergy, dE_dx_max, dE_dy_max];\n }\n /**\n * calculate the energy of a single node\n * @param {Node.id} m\n * @returns {number[]}\n * @private\n */\n\n }, {\n key: \"_getEnergy\",\n value: function _getEnergy(m) {\n var _this$E_sums$m = slicedToArray(this.E_sums[m], 2),\n dE_dx = _this$E_sums$m[0],\n dE_dy = _this$E_sums$m[1];\n\n var delta_m = Math.sqrt(Math.pow(dE_dx, 2) + Math.pow(dE_dy, 2));\n return [delta_m, dE_dx, dE_dy];\n }\n /**\n * move the node based on it's energy\n * the dx and dy are calculated from the linear system proposed by Kamada and Kawai\n * @param {number} m\n * @param {number} dE_dx\n * @param {number} dE_dy\n * @private\n */\n\n }, {\n key: \"_moveNode\",\n value: function _moveNode(m, dE_dx, dE_dy) {\n var nodesArray = this.body.nodeIndices;\n var nodes = this.body.nodes;\n var d2E_dx2 = 0;\n var d2E_dxdy = 0;\n var d2E_dy2 = 0;\n var x_m = nodes[m].x;\n var y_m = nodes[m].y;\n var km = this.K_matrix[m];\n var lm = this.L_matrix[m];\n\n for (var iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n var i = nodesArray[iIdx];\n\n if (i !== m) {\n var x_i = nodes[i].x;\n var y_i = nodes[i].y;\n var kmat = km[i];\n var lmat = lm[i];\n var denominator = 1.0 / Math.pow(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2), 1.5);\n d2E_dx2 += kmat * (1 - lmat * Math.pow(y_m - y_i, 2) * denominator);\n d2E_dxdy += kmat * (lmat * (x_m - x_i) * (y_m - y_i) * denominator);\n d2E_dy2 += kmat * (1 - lmat * Math.pow(x_m - x_i, 2) * denominator);\n }\n } // make the variable names easier to make the solving of the linear system easier to read\n\n\n var A = d2E_dx2,\n B = d2E_dxdy,\n C = dE_dx,\n D = d2E_dy2,\n E = dE_dy; // solve the linear system for dx and dy\n\n var dy = (C / A + E / B) / (B / A - D / B);\n var dx = -(B * dy + C) / A; // move the node\n\n nodes[m].x += dx;\n nodes[m].y += dy; // Recalculate E_matrix (should be incremental)\n\n this._updateE_matrix(m);\n }\n /**\n * Create the L matrix: edge length times shortest path\n * @param {Object} D_matrix\n * @private\n */\n\n }, {\n key: \"_createL_matrix\",\n value: function _createL_matrix(D_matrix) {\n var nodesArray = this.body.nodeIndices;\n var edgeLength = this.springLength;\n this.L_matrix = [];\n\n for (var i = 0; i < nodesArray.length; i++) {\n this.L_matrix[nodesArray[i]] = {};\n\n for (var j = 0; j < nodesArray.length; j++) {\n this.L_matrix[nodesArray[i]][nodesArray[j]] = edgeLength * D_matrix[nodesArray[i]][nodesArray[j]];\n }\n }\n }\n /**\n * Create the K matrix: spring constants times shortest path\n * @param {Object} D_matrix\n * @private\n */\n\n }, {\n key: \"_createK_matrix\",\n value: function _createK_matrix(D_matrix) {\n var nodesArray = this.body.nodeIndices;\n var edgeStrength = this.springConstant;\n this.K_matrix = [];\n\n for (var i = 0; i < nodesArray.length; i++) {\n this.K_matrix[nodesArray[i]] = {};\n\n for (var j = 0; j < nodesArray.length; j++) {\n this.K_matrix[nodesArray[i]][nodesArray[j]] = edgeStrength * Math.pow(D_matrix[nodesArray[i]][nodesArray[j]], -2);\n }\n }\n }\n /**\n * Create matrix with all energies between nodes\n * @private\n */\n\n }, {\n key: \"_createE_matrix\",\n value: function _createE_matrix() {\n var nodesArray = this.body.nodeIndices;\n var nodes = this.body.nodes;\n this.E_matrix = {};\n this.E_sums = {};\n\n for (var mIdx = 0; mIdx < nodesArray.length; mIdx++) {\n this.E_matrix[nodesArray[mIdx]] = [];\n }\n\n for (var _mIdx = 0; _mIdx < nodesArray.length; _mIdx++) {\n var m = nodesArray[_mIdx];\n var x_m = nodes[m].x;\n var y_m = nodes[m].y;\n var dE_dx = 0;\n var dE_dy = 0;\n\n for (var iIdx = _mIdx; iIdx < nodesArray.length; iIdx++) {\n var i = nodesArray[iIdx];\n\n if (i !== m) {\n var x_i = nodes[i].x;\n var y_i = nodes[i].y;\n var denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2));\n this.E_matrix[m][iIdx] = [this.K_matrix[m][i] * (x_m - x_i - this.L_matrix[m][i] * (x_m - x_i) * denominator), this.K_matrix[m][i] * (y_m - y_i - this.L_matrix[m][i] * (y_m - y_i) * denominator)];\n this.E_matrix[i][_mIdx] = this.E_matrix[m][iIdx];\n dE_dx += this.E_matrix[m][iIdx][0];\n dE_dy += this.E_matrix[m][iIdx][1];\n }\n } //Store sum\n\n\n this.E_sums[m] = [dE_dx, dE_dy];\n }\n }\n /**\n * Update method, just doing single column (rows are auto-updated) (update all sums)\n *\n * @param {number} m\n * @private\n */\n\n }, {\n key: \"_updateE_matrix\",\n value: function _updateE_matrix(m) {\n var nodesArray = this.body.nodeIndices;\n var nodes = this.body.nodes;\n var colm = this.E_matrix[m];\n var kcolm = this.K_matrix[m];\n var lcolm = this.L_matrix[m];\n var x_m = nodes[m].x;\n var y_m = nodes[m].y;\n var dE_dx = 0;\n var dE_dy = 0;\n\n for (var iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n var i = nodesArray[iIdx];\n\n if (i !== m) {\n //Keep old energy value for sum modification below\n var cell = colm[iIdx];\n var oldDx = cell[0];\n var oldDy = cell[1]; //Calc new energy:\n\n var x_i = nodes[i].x;\n var y_i = nodes[i].y;\n var denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2));\n var dx = kcolm[i] * (x_m - x_i - lcolm[i] * (x_m - x_i) * denominator);\n var dy = kcolm[i] * (y_m - y_i - lcolm[i] * (y_m - y_i) * denominator);\n colm[iIdx] = [dx, dy];\n dE_dx += dx;\n dE_dy += dy; //add new energy to sum of each column\n\n var sum = this.E_sums[i];\n sum[0] += dx - oldDx;\n sum[1] += dy - oldDy;\n }\n } //Store sum at -1 index\n\n\n this.E_sums[m] = [dE_dx, dE_dy];\n }\n }]);\n\n return KamadaKawai;\n}();\n\n/**\n * Create a network visualization, displaying nodes and edges.\n *\n * @param {Element} container The DOM element in which the Network will\n * be created. Normally a div element.\n * @param {Object} data An object containing parameters\n * {Array} nodes\n * {Array} edges\n * @param {Object} options Options\n * @constructor Network\n */\n\nfunction Network(container, data, options) {\n var _context,\n _context2,\n _context3,\n _context4,\n _this = this;\n\n if (!(this instanceof Network)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n } // set constant values\n\n\n this.options = {};\n this.defaultOptions = {\n locale: 'en',\n locales: locales,\n clickToUse: false\n };\n\n assign$2(this.options, this.defaultOptions);\n /**\n * Containers for nodes and edges.\n *\n * 'edges' and 'nodes' contain the full definitions of all the network elements.\n * 'nodeIndices' and 'edgeIndices' contain the id's of the active elements.\n *\n * The distinction is important, because a defined node need not be active, i.e.\n * visible on the canvas. This happens in particular when clusters are defined, in\n * that case there will be nodes and edges not displayed.\n * The bottom line is that all code with actions related to visibility, *must* use\n * 'nodeIndices' and 'edgeIndices', not 'nodes' and 'edges' directly.\n */\n\n\n this.body = {\n container: container,\n // See comment above for following fields\n nodes: {},\n nodeIndices: [],\n edges: {},\n edgeIndices: [],\n emitter: {\n on: bind$2(_context = this.on).call(_context, this),\n off: bind$2(_context2 = this.off).call(_context2, this),\n emit: bind$2(_context3 = this.emit).call(_context3, this),\n once: bind$2(_context4 = this.once).call(_context4, this)\n },\n eventListeners: {\n onTap: function onTap() {},\n onTouch: function onTouch() {},\n onDoubleTap: function onDoubleTap() {},\n onHold: function onHold() {},\n onDragStart: function onDragStart() {},\n onDrag: function onDrag() {},\n onDragEnd: function onDragEnd() {},\n onMouseWheel: function onMouseWheel() {},\n onPinch: function onPinch() {},\n onMouseMove: function onMouseMove() {},\n onRelease: function onRelease() {},\n onContext: function onContext() {}\n },\n data: {\n nodes: null,\n // A DataSet or DataView\n edges: null // A DataSet or DataView\n\n },\n functions: {\n createNode: function createNode() {},\n createEdge: function createEdge() {},\n getPointer: function getPointer() {}\n },\n modules: {},\n view: {\n scale: 1,\n translation: {\n x: 0,\n y: 0\n }\n },\n selectionBox: {\n show: false,\n position: {\n start: {\n x: 0,\n y: 0\n },\n end: {\n x: 0,\n y: 0\n }\n }\n }\n }; // bind the event listeners\n\n this.bindEventListeners(); // setting up all modules\n\n this.images = new Images(function () {\n return _this.body.emitter.emit(\"_requestRedraw\");\n }); // object with images\n\n this.groups = new Groups(); // object with groups\n\n this.canvas = new Canvas(this.body); // DOM handler\n\n this.selectionHandler = new SelectionHandler(this.body, this.canvas); // Selection handler\n\n this.interactionHandler = new InteractionHandler(this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key\n\n this.view = new View(this.body, this.canvas); // camera handler, does animations and zooms\n\n this.renderer = new CanvasRenderer(this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into\n\n this.physics = new PhysicsEngine(this.body); // physics engine, does all the simulations\n\n this.layoutEngine = new LayoutEngine(this.body); // layout engine for inital layout and hierarchical layout\n\n this.clustering = new ClusterEngine(this.body); // clustering api\n\n this.manipulation = new ManipulationSystem(this.body, this.canvas, this.selectionHandler, this.interactionHandler); // data manipulation system\n\n this.nodesHandler = new NodesHandler(this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options\n\n this.edgesHandler = new EdgesHandler(this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options\n\n this.body.modules[\"kamadaKawai\"] = new KamadaKawai(this.body, 150, 0.05); // Layouting algorithm.\n\n this.body.modules[\"clustering\"] = this.clustering; // create the DOM elements\n\n this.canvas._create(); // apply options\n\n\n this.setOptions(options); // load data (the disable start variable will be the same as the enabled clustering)\n\n this.setData(data);\n} // Extend Network with an Emitter mixin\n\ncomponentEmitter(Network.prototype);\n/**\n * Set options\n * @param {Object} options\n */\n\nNetwork.prototype.setOptions = function (options) {\n var _this2 = this;\n\n if (options === null) {\n options = undefined; // This ensures that options handling doesn't crash in the handling\n }\n\n if (options !== undefined) {\n var errorFound = Validator.validate(options, allOptions$1);\n\n if (errorFound === true) {\n console.log('%cErrors have been found in the supplied options object.', printStyle);\n } // copy the global fields over\n\n\n var fields = ['locale', 'locales', 'clickToUse'];\n selectiveDeepExtend(fields, this.options, options); // normalize the locale or use English\n\n if (options.locale !== undefined) {\n options.locale = normalizeLanguageCode(options.locales || this.options.locales, options.locale);\n } // the hierarchical system can adapt the edges and the physics to it's own options because not all combinations work with the hierarichical system.\n\n\n options = this.layoutEngine.setOptions(options.layout, options);\n this.canvas.setOptions(options); // options for canvas are in globals\n // pass the options to the modules\n\n this.groups.setOptions(options.groups);\n this.nodesHandler.setOptions(options.nodes);\n this.edgesHandler.setOptions(options.edges);\n this.physics.setOptions(options.physics);\n this.manipulation.setOptions(options.manipulation, options, this.options); // manipulation uses the locales in the globals\n\n this.interactionHandler.setOptions(options.interaction);\n this.renderer.setOptions(options.interaction); // options for rendering are in interaction\n\n this.selectionHandler.setOptions(options.interaction); // options for selection are in interaction\n // reload the settings of the nodes to apply changes in groups that are not referenced by pointer.\n\n if (options.groups !== undefined) {\n this.body.emitter.emit(\"refreshNodes\");\n } // these two do not have options at the moment, here for completeness\n //this.view.setOptions(options.view);\n //this.clustering.setOptions(options.clustering);\n\n\n if ('configure' in options) {\n if (!this.configurator) {\n this.configurator = new Configurator(this, this.body.container, configureOptions, this.canvas.pixelRatio);\n }\n\n this.configurator.setOptions(options.configure);\n } // if the configuration system is enabled, copy all options and put them into the config system\n\n\n if (this.configurator && this.configurator.options.enabled === true) {\n var networkOptions = {\n nodes: {},\n edges: {},\n layout: {},\n interaction: {},\n manipulation: {},\n physics: {},\n global: {}\n };\n deepExtend(networkOptions.nodes, this.nodesHandler.options);\n deepExtend(networkOptions.edges, this.edgesHandler.options);\n deepExtend(networkOptions.layout, this.layoutEngine.options); // load the selectionHandler and render default options in to the interaction group\n\n deepExtend(networkOptions.interaction, this.selectionHandler.options);\n deepExtend(networkOptions.interaction, this.renderer.options);\n deepExtend(networkOptions.interaction, this.interactionHandler.options);\n deepExtend(networkOptions.manipulation, this.manipulation.options);\n deepExtend(networkOptions.physics, this.physics.options); // load globals into the global object\n\n deepExtend(networkOptions.global, this.canvas.options);\n deepExtend(networkOptions.global, this.options);\n this.configurator.setModuleOptions(networkOptions);\n } // handle network global options\n\n\n if (options.clickToUse !== undefined) {\n if (options.clickToUse === true) {\n if (this.activator === undefined) {\n this.activator = new Activator(this.canvas.frame);\n this.activator.on('change', function () {\n _this2.body.emitter.emit(\"activate\");\n });\n }\n } else {\n if (this.activator !== undefined) {\n this.activator.destroy();\n delete this.activator;\n }\n\n this.body.emitter.emit(\"activate\");\n }\n } else {\n this.body.emitter.emit(\"activate\");\n }\n\n this.canvas.setSize(); // start the physics simulation. Can be safely called multiple times.\n\n this.body.emitter.emit(\"startSimulation\");\n }\n};\n/**\n * Update the visible nodes and edges list with the most recent node state.\n *\n * Visible nodes are stored in this.body.nodeIndices.\n * Visible edges are stored in this.body.edgeIndices.\n * A node or edges is visible if it is not hidden or clustered.\n *\n * @private\n */\n\n\nNetwork.prototype._updateVisibleIndices = function () {\n var nodes = this.body.nodes;\n var edges = this.body.edges;\n this.body.nodeIndices = [];\n this.body.edgeIndices = [];\n\n for (var nodeId in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, nodeId)) {\n if (!this.clustering._isClusteredNode(nodeId) && nodes[nodeId].options.hidden === false) {\n this.body.nodeIndices.push(nodes[nodeId].id);\n }\n }\n }\n\n for (var edgeId in edges) {\n if (Object.prototype.hasOwnProperty.call(edges, edgeId)) {\n var edge = edges[edgeId]; // It can happen that this is executed *after* a node edge has been removed,\n // but *before* the edge itself has been removed. Taking this into account.\n\n var fromNode = nodes[edge.fromId];\n var toNode = nodes[edge.toId];\n var edgeNodesPresent = fromNode !== undefined && toNode !== undefined;\n var isVisible = !this.clustering._isClusteredEdge(edgeId) && edge.options.hidden === false && edgeNodesPresent && fromNode.options.hidden === false // Also hidden if any of its connecting nodes are hidden\n && toNode.options.hidden === false; // idem\n\n if (isVisible) {\n this.body.edgeIndices.push(edge.id);\n }\n }\n }\n};\n/**\n * Bind all events\n */\n\n\nNetwork.prototype.bindEventListeners = function () {\n var _this3 = this;\n\n // This event will trigger a rebuilding of the cache everything.\n // Used when nodes or edges have been added or removed.\n this.body.emitter.on(\"_dataChanged\", function () {\n _this3.edgesHandler._updateState();\n\n _this3.body.emitter.emit(\"_dataUpdated\");\n }); // this is called when options of EXISTING nodes or edges have changed.\n\n this.body.emitter.on(\"_dataUpdated\", function () {\n // Order important in following block\n _this3.clustering._updateState();\n\n _this3._updateVisibleIndices();\n\n _this3._updateValueRange(_this3.body.nodes);\n\n _this3._updateValueRange(_this3.body.edges); // start simulation (can be called safely, even if already running)\n\n\n _this3.body.emitter.emit(\"startSimulation\");\n\n _this3.body.emitter.emit(\"_requestRedraw\");\n });\n};\n/**\n * Set nodes and edges, and optionally options as well.\n *\n * @param {Object} data Object containing parameters:\n * {Array | DataSet | DataView} [nodes] Array with nodes\n * {Array | DataSet | DataView} [edges] Array with edges\n * {String} [dot] String containing data in DOT format\n * {String} [gephi] String containing data in gephi JSON format\n * {Options} [options] Object with options\n */\n\n\nNetwork.prototype.setData = function (data) {\n // reset the physics engine.\n this.body.emitter.emit(\"resetPhysics\");\n this.body.emitter.emit(\"_resetData\"); // unselect all to ensure no selections from old data are carried over.\n\n this.selectionHandler.unselectAll();\n\n if (data && data.dot && (data.nodes || data.edges)) {\n throw new SyntaxError('Data must contain either parameter \"dot\" or ' + ' parameter pair \"nodes\" and \"edges\", but not both.');\n } // set options\n\n\n this.setOptions(data && data.options); // set all data\n\n if (data && data.dot) {\n console.log('The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);'); // parse DOT file\n\n var dotData = DOTToGraph(data.dot);\n this.setData(dotData);\n return;\n } else if (data && data.gephi) {\n // parse DOT file\n console.log('The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);');\n var gephiData = parseGephi(data.gephi);\n this.setData(gephiData);\n return;\n } else {\n this.nodesHandler.setData(data && data.nodes, true);\n this.edgesHandler.setData(data && data.edges, true);\n } // emit change in data\n\n\n this.body.emitter.emit(\"_dataChanged\"); // emit data loaded\n\n this.body.emitter.emit(\"_dataLoaded\"); // find a stable position or start animating to a stable position\n\n this.body.emitter.emit(\"initPhysics\");\n};\n/**\n * Cleans up all bindings of the network, removing it fully from the memory IF the variable is set to null after calling this function.\n * var network = new vis.Network(..);\n * network.destroy();\n * network = null;\n */\n\n\nNetwork.prototype.destroy = function () {\n this.body.emitter.emit(\"destroy\"); // clear events\n\n this.body.emitter.off();\n this.off(); // delete modules\n\n delete this.groups;\n delete this.canvas;\n delete this.selectionHandler;\n delete this.interactionHandler;\n delete this.view;\n delete this.renderer;\n delete this.physics;\n delete this.layoutEngine;\n delete this.clustering;\n delete this.manipulation;\n delete this.nodesHandler;\n delete this.edgesHandler;\n delete this.configurator;\n delete this.images;\n\n for (var nodeId in this.body.nodes) {\n if (!Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) continue;\n delete this.body.nodes[nodeId];\n }\n\n for (var edgeId in this.body.edges) {\n if (!Object.prototype.hasOwnProperty.call(this.body.edges, edgeId)) continue;\n delete this.body.edges[edgeId];\n } // remove the container and everything inside it recursively\n\n\n recursiveDOMDelete(this.body.container);\n};\n/**\n * Update the values of all object in the given array according to the current\n * value range of the objects in the array.\n * @param {Object} obj An object containing a set of Edges or Nodes\n * The objects must have a method getValue() and\n * setValueRange(min, max).\n * @private\n */\n\n\nNetwork.prototype._updateValueRange = function (obj) {\n var id; // determine the range of the objects\n\n var valueMin = undefined;\n var valueMax = undefined;\n var valueTotal = 0;\n\n for (id in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, id)) {\n var value = obj[id].getValue();\n\n if (value !== undefined) {\n valueMin = valueMin === undefined ? value : Math.min(value, valueMin);\n valueMax = valueMax === undefined ? value : Math.max(value, valueMax);\n valueTotal += value;\n }\n }\n } // adjust the range of all objects\n\n\n if (valueMin !== undefined && valueMax !== undefined) {\n for (id in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, id)) {\n obj[id].setValueRange(valueMin, valueMax, valueTotal);\n }\n }\n }\n};\n/**\n * Returns true when the Network is active.\n * @returns {boolean}\n */\n\n\nNetwork.prototype.isActive = function () {\n return !this.activator || this.activator.active;\n};\n\nNetwork.prototype.setSize = function () {\n return this.canvas.setSize.apply(this.canvas, arguments);\n};\n\nNetwork.prototype.canvasToDOM = function () {\n return this.canvas.canvasToDOM.apply(this.canvas, arguments);\n};\n\nNetwork.prototype.DOMtoCanvas = function () {\n return this.canvas.DOMtoCanvas.apply(this.canvas, arguments);\n};\n/**\n * Nodes can be in clusters. Clusters can also be in clusters. This function returns and array of\n * nodeIds showing where the node is.\n *\n * If any nodeId in the chain, especially the first passed in as a parameter, is not present in\n * the current nodes list, an empty array is returned.\n *\n * Example:\n * cluster 'A' contains cluster 'B',\n * cluster 'B' contains cluster 'C',\n * cluster 'C' contains node 'fred'.\n * `jsnetwork.clustering.findNode('fred')` will return `['A','B','C','fred']`.\n *\n * @param {string|number} nodeId\n * @returns {Array}\n */\n\n\nNetwork.prototype.findNode = function () {\n return this.clustering.findNode.apply(this.clustering, arguments);\n};\n\nNetwork.prototype.isCluster = function () {\n return this.clustering.isCluster.apply(this.clustering, arguments);\n};\n\nNetwork.prototype.openCluster = function () {\n return this.clustering.openCluster.apply(this.clustering, arguments);\n};\n\nNetwork.prototype.cluster = function () {\n return this.clustering.cluster.apply(this.clustering, arguments);\n};\n\nNetwork.prototype.getNodesInCluster = function () {\n return this.clustering.getNodesInCluster.apply(this.clustering, arguments);\n};\n\nNetwork.prototype.clusterByConnection = function () {\n return this.clustering.clusterByConnection.apply(this.clustering, arguments);\n};\n\nNetwork.prototype.clusterByHubsize = function () {\n return this.clustering.clusterByHubsize.apply(this.clustering, arguments);\n};\n\nNetwork.prototype.updateClusteredNode = function () {\n return this.clustering.updateClusteredNode.apply(this.clustering, arguments);\n};\n\nNetwork.prototype.getClusteredEdges = function () {\n return this.clustering.getClusteredEdges.apply(this.clustering, arguments);\n};\n\nNetwork.prototype.getBaseEdge = function () {\n return this.clustering.getBaseEdge.apply(this.clustering, arguments);\n};\n\nNetwork.prototype.getBaseEdges = function () {\n return this.clustering.getBaseEdges.apply(this.clustering, arguments);\n};\n\nNetwork.prototype.updateEdge = function () {\n return this.clustering.updateEdge.apply(this.clustering, arguments);\n};\n/**\n * This method will cluster all nodes with 1 edge with their respective connected node.\n * The options object is explained in full below.\n *\n * @param {object} [options]\n * @returns {undefined}\n */\n\n\nNetwork.prototype.clusterOutliers = function () {\n return this.clustering.clusterOutliers.apply(this.clustering, arguments);\n};\n\nNetwork.prototype.getSeed = function () {\n return this.layoutEngine.getSeed.apply(this.layoutEngine, arguments);\n};\n\nNetwork.prototype.enableEditMode = function () {\n return this.manipulation.enableEditMode.apply(this.manipulation, arguments);\n};\n\nNetwork.prototype.disableEditMode = function () {\n return this.manipulation.disableEditMode.apply(this.manipulation, arguments);\n};\n\nNetwork.prototype.addNodeMode = function () {\n return this.manipulation.addNodeMode.apply(this.manipulation, arguments);\n};\n\nNetwork.prototype.editNode = function () {\n return this.manipulation.editNode.apply(this.manipulation, arguments);\n};\n\nNetwork.prototype.editNodeMode = function () {\n console.log(\"Deprecated: Please use editNode instead of editNodeMode.\");\n return this.manipulation.editNode.apply(this.manipulation, arguments);\n};\n\nNetwork.prototype.addEdgeMode = function () {\n return this.manipulation.addEdgeMode.apply(this.manipulation, arguments);\n};\n\nNetwork.prototype.editEdgeMode = function () {\n return this.manipulation.editEdgeMode.apply(this.manipulation, arguments);\n};\n\nNetwork.prototype.deleteSelected = function () {\n return this.manipulation.deleteSelected.apply(this.manipulation, arguments);\n};\n\nNetwork.prototype.getPositions = function () {\n return this.nodesHandler.getPositions.apply(this.nodesHandler, arguments);\n};\n\nNetwork.prototype.getPosition = function () {\n return this.nodesHandler.getPosition.apply(this.nodesHandler, arguments);\n};\n\nNetwork.prototype.storePositions = function () {\n return this.nodesHandler.storePositions.apply(this.nodesHandler, arguments);\n};\n\nNetwork.prototype.moveNode = function () {\n return this.nodesHandler.moveNode.apply(this.nodesHandler, arguments);\n};\n\nNetwork.prototype.getBoundingBox = function () {\n return this.nodesHandler.getBoundingBox.apply(this.nodesHandler, arguments);\n};\n\nNetwork.prototype.getConnectedNodes = function (objectId) {\n if (this.body.nodes[objectId] !== undefined) {\n return this.nodesHandler.getConnectedNodes.apply(this.nodesHandler, arguments);\n } else {\n return this.edgesHandler.getConnectedNodes.apply(this.edgesHandler, arguments);\n }\n};\n\nNetwork.prototype.getConnectedEdges = function () {\n return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler, arguments);\n};\n\nNetwork.prototype.startSimulation = function () {\n return this.physics.startSimulation.apply(this.physics, arguments);\n};\n\nNetwork.prototype.stopSimulation = function () {\n return this.physics.stopSimulation.apply(this.physics, arguments);\n};\n\nNetwork.prototype.stabilize = function () {\n return this.physics.stabilize.apply(this.physics, arguments);\n};\n\nNetwork.prototype.getSelection = function () {\n return this.selectionHandler.getSelection.apply(this.selectionHandler, arguments);\n};\n\nNetwork.prototype.setSelection = function () {\n return this.selectionHandler.setSelection.apply(this.selectionHandler, arguments);\n};\n\nNetwork.prototype.getSelectedNodes = function () {\n return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler, arguments);\n};\n\nNetwork.prototype.getSelectedEdges = function () {\n return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler, arguments);\n};\n\nNetwork.prototype.getNodeAt = function () {\n var node = this.selectionHandler.getNodeAt.apply(this.selectionHandler, arguments);\n\n if (node !== undefined && node.id !== undefined) {\n return node.id;\n }\n\n return node;\n};\n\nNetwork.prototype.getEdgeAt = function () {\n var edge = this.selectionHandler.getEdgeAt.apply(this.selectionHandler, arguments);\n\n if (edge !== undefined && edge.id !== undefined) {\n return edge.id;\n }\n\n return edge;\n};\n\nNetwork.prototype.selectNodes = function () {\n return this.selectionHandler.selectNodes.apply(this.selectionHandler, arguments);\n};\n\nNetwork.prototype.selectEdges = function () {\n return this.selectionHandler.selectEdges.apply(this.selectionHandler, arguments);\n};\n\nNetwork.prototype.unselectAll = function () {\n this.selectionHandler.unselectAll.apply(this.selectionHandler, arguments);\n this.redraw();\n};\n\nNetwork.prototype.redraw = function () {\n return this.renderer.redraw.apply(this.renderer, arguments);\n};\n\nNetwork.prototype.getScale = function () {\n return this.view.getScale.apply(this.view, arguments);\n};\n\nNetwork.prototype.getViewPosition = function () {\n return this.view.getViewPosition.apply(this.view, arguments);\n};\n\nNetwork.prototype.fit = function () {\n return this.view.fit.apply(this.view, arguments);\n};\n\nNetwork.prototype.moveTo = function () {\n return this.view.moveTo.apply(this.view, arguments);\n};\n\nNetwork.prototype.focus = function () {\n return this.view.focus.apply(this.view, arguments);\n};\n\nNetwork.prototype.releaseNode = function () {\n return this.view.releaseNode.apply(this.view, arguments);\n};\n\nNetwork.prototype.getOptionsFromConfigurator = function () {\n var options = {};\n\n if (this.configurator) {\n options = this.configurator.getOptions.apply(this.configurator);\n }\n\n return options;\n};\n\nvar parseDOTNetwork = DOTToGraph;\n// overflow in UMD builds. They all export vis namespace therefore reexporting\n// leads to loading vis to load vis to load vis…\n\nexport { DataSet, DataView, Network, Images as NetworkImages, Queue, index$1 as data, dotparser as networkDOTParser, gephiParser as networkGephiParser, options as networkOptions, parseDOTNetwork, parseGephi as parseGephiNetwork };\n//# sourceMappingURL=vis-network.js.map\n","\nvar rng;\n\nvar crypto = global.crypto || global.msCrypto; // for IE 11\nif (crypto && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n rng = function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n}\n\nif (!rng) {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var _rnds = new Array(16);\n rng = function() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n };\n}\n\nmodule.exports = rng;\n\n","// uuid.js\n//\n// Copyright (c) 2010-2012 Robert Kieffer\n// MIT License - http://opensource.org/licenses/mit-license.php\n\n// Unique ID creation requires a high quality random # generator. We feature\n// detect to determine the best RNG source, normalizing to a function that\n// returns 128-bits of randomness, since that's what's usually required\nvar _rng = require('./rng');\n\n// Maps for number <-> hex string conversion\nvar _byteToHex = [];\nvar _hexToByte = {};\nfor (var i = 0; i < 256; i++) {\n _byteToHex[i] = (i + 0x100).toString(16).substr(1);\n _hexToByte[_byteToHex[i]] = i;\n}\n\n// **`parse()` - Parse a UUID into it's component bytes**\nfunction parse(s, buf, offset) {\n var i = (buf && offset) || 0, ii = 0;\n\n buf = buf || [];\n s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) {\n if (ii < 16) { // Don't overflow!\n buf[i + ii++] = _hexToByte[oct];\n }\n });\n\n // Zero out remaining bytes if string was short\n while (ii < 16) {\n buf[i + ii++] = 0;\n }\n\n return buf;\n}\n\n// **`unparse()` - Convert UUID byte array (ala parse()) into a string**\nfunction unparse(buf, offset) {\n var i = offset || 0, bth = _byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]];\n}\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\n// random #'s we need to init node and clockseq\nvar _seedBytes = _rng();\n\n// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\nvar _nodeId = [\n _seedBytes[0] | 0x01,\n _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]\n];\n\n// Per 4.2.2, randomize (14 bit) clockseq\nvar _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;\n\n// Previous uuid creation time\nvar _lastMSecs = 0, _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n var node = options.node || _nodeId;\n for (var n = 0; n < 6; n++) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : unparse(b);\n}\n\n// **`v4()` - Generate random UUID**\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v4(options, buf, offset) {\n // Deprecated - 'format' argument, as supported in v1.2\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options == 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || _rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ii++) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || unparse(rnds);\n}\n\n// Export public API\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\nuuid.parse = parse;\nuuid.unparse = unparse;\n\nmodule.exports = uuid;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _defaultsDeep = require(\"lodash/fp/defaultsDeep\");\n\nvar _defaultsDeep2 = _interopRequireDefault(_defaultsDeep);\n\nvar _isEqual = require(\"lodash/isEqual\");\n\nvar _isEqual2 = _interopRequireDefault(_isEqual);\n\nvar _differenceWith = require(\"lodash/differenceWith\");\n\nvar _differenceWith2 = _interopRequireDefault(_differenceWith);\n\nvar _standalone = require(\"vis-network/standalone\");\n\nvar _uuid = require(\"uuid\");\n\nvar _uuid2 = _interopRequireDefault(_uuid);\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Graph = function (_Component) {\n _inherits(Graph, _Component);\n\n function Graph(props) {\n _classCallCheck(this, Graph);\n\n var _this = _possibleConstructorReturn(this, (Graph.__proto__ || Object.getPrototypeOf(Graph)).call(this, props));\n\n var identifier = props.identifier;\n\n _this.updateGraph = _this.updateGraph.bind(_this);\n _this.state = {\n identifier: identifier !== undefined ? identifier : _uuid2.default.v4()\n };\n _this.container = _react2.default.createRef();\n return _this;\n }\n\n _createClass(Graph, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.edges = new _standalone.DataSet(this.props.graph.edges);\n this.nodes = new _standalone.DataSet(this.props.graph.nodes);\n this.updateGraph();\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps, nextState) {\n var nodesChange = !(0, _isEqual2.default)(this.props.graph.nodes, nextProps.graph.nodes);\n var edgesChange = !(0, _isEqual2.default)(this.props.graph.edges, nextProps.graph.edges);\n var optionsChange = !(0, _isEqual2.default)(this.props.options, nextProps.options);\n var eventsChange = !(0, _isEqual2.default)(this.props.events, nextProps.events);\n\n if (nodesChange) {\n var idIsEqual = function idIsEqual(n1, n2) {\n return n1.id === n2.id;\n };\n var nodesRemoved = (0, _differenceWith2.default)(this.props.graph.nodes, nextProps.graph.nodes, idIsEqual);\n var nodesAdded = (0, _differenceWith2.default)(nextProps.graph.nodes, this.props.graph.nodes, idIsEqual);\n var nodesChanged = (0, _differenceWith2.default)((0, _differenceWith2.default)(nextProps.graph.nodes, this.props.graph.nodes, _isEqual2.default), nodesAdded);\n this.patchNodes({ nodesRemoved: nodesRemoved, nodesAdded: nodesAdded, nodesChanged: nodesChanged });\n }\n\n if (edgesChange) {\n var _idIsEqual = function _idIsEqual(p1, p2) {\n return p1.id === p2.id;\n };\n var edgesRemoved = (0, _differenceWith2.default)(this.props.graph.edges, nextProps.graph.edges, _idIsEqual);\n var edgesAdded = (0, _differenceWith2.default)(nextProps.graph.edges, this.props.graph.edges, _idIsEqual);\n var edgesChanged = (0, _differenceWith2.default)((0, _differenceWith2.default)(nextProps.graph.edges, this.props.graph.edges, _isEqual2.default), edgesAdded);\n this.patchEdges({ edgesRemoved: edgesRemoved, edgesAdded: edgesAdded, edgesChanged: edgesChanged });\n }\n\n if (optionsChange) {\n this.Network.setOptions(nextProps.options);\n }\n\n if (eventsChange) {\n var events = this.props.events || {};\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = Object.keys(events)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var eventName = _step.value;\n\n this.Network.off(eventName, events[eventName]);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n events = nextProps.events || {};\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = Object.keys(events)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var _eventName = _step2.value;\n\n this.Network.on(_eventName, events[_eventName]);\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n\n return false;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.updateGraph();\n }\n }, {\n key: \"patchEdges\",\n value: function patchEdges(_ref) {\n var edgesRemoved = _ref.edgesRemoved,\n edgesAdded = _ref.edgesAdded,\n edgesChanged = _ref.edgesChanged;\n\n this.edges.remove(edgesRemoved);\n this.edges.add(edgesAdded);\n this.edges.update(edgesChanged);\n }\n }, {\n key: \"patchNodes\",\n value: function patchNodes(_ref2) {\n var nodesRemoved = _ref2.nodesRemoved,\n nodesAdded = _ref2.nodesAdded,\n nodesChanged = _ref2.nodesChanged;\n\n this.nodes.remove(nodesRemoved);\n this.nodes.add(nodesAdded);\n this.nodes.update(nodesChanged);\n }\n }, {\n key: \"updateGraph\",\n value: function updateGraph() {\n var defaultOptions = {\n physics: {\n stabilization: false\n },\n autoResize: false,\n edges: {\n smooth: false,\n color: \"#000000\",\n width: 0.5,\n arrows: {\n to: {\n enabled: true,\n scaleFactor: 0.5\n }\n }\n }\n };\n\n // merge user provied options with our default ones\n var options = (0, _defaultsDeep2.default)(defaultOptions, this.props.options);\n\n var data = {\n nodes: this.nodes,\n edges: this.edges\n };\n\n this.Network = new _standalone.Network(this.container.current, data, options);\n\n if (this.props.getNetwork) {\n this.props.getNetwork(this.Network);\n }\n\n if (this.props.getNodes) {\n this.props.getNodes(this.nodes);\n }\n\n if (this.props.getEdges) {\n this.props.getEdges(this.edges);\n }\n\n // Add user provied events to network\n var events = this.props.events || {};\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = Object.keys(events)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var eventName = _step3.value;\n\n this.Network.on(eventName, events[eventName]);\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var identifier = this.state.identifier;\n var style = this.props.style;\n\n return _react2.default.createElement(\"div\", {\n id: identifier,\n ref: this.container,\n style: style\n }, identifier);\n }\n }]);\n\n return Graph;\n}(_react.Component);\n\nGraph.defaultProps = {\n graph: {},\n style: { width: \"100%\", height: \"100%\" }\n};\nGraph.propTypes = {\n graph: _propTypes2.default.object,\n style: _propTypes2.default.object,\n getNetwork: _propTypes2.default.func,\n getNodes: _propTypes2.default.func,\n getEdges: _propTypes2.default.func\n};\n\nexports.default = Graph;","import React from 'react'\nimport Graph from 'react-vis-network-graph'\n\nexport default function NetworkGraph({ name, json_nodes, json_edges }) {\n const nodes = JSON.parse(json_nodes).map((node) => {\n return (\n {\n id: node.id,\n label: node.label,\n color: node.color,\n shape: node.shape,\n mass: node.mass,\n size: node.size,\n url: node.url\n }\n )\n })\n\n const edges = JSON.parse(json_edges).map((edge) => {\n return (\n { from: edge.from, to: edge.to }\n )\n })\n\n const graph = {\n nodes: nodes,\n edges: edges,\n }\n\n const options = {\n interaction: {navigationButtons: true},\n nodes: {\n font: {\n size: 12,\n color: '#000000',\n },\n borderWidth: 2,\n chosen: true,\n shape: 'box',\n margin: 10,\n },\n edges: {\n color: { inherit: true },\n width: 0.5,\n smooth: {\n type: \"continuous\",\n },\n },\n }\n\n const events = {\n selectNode: function (event) {\n const { nodes } = event;\n if (nodes.length === 1) {\n const node = graph.nodes.find(n => n.id === nodes[0]);\n if (node && node.url) {\n window.open(node.url, '_blank');\n }\n }\n }\n }\n\n return (\n <>\n
\n

Network Diagram centred on {name}

\n\n \n
\n \n )\n}\n","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({source, data}) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n }\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n typeof setImmediate === 'function',\n isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n if (utils.isFunction(options)) {\n options = {\n serialize: options\n };\n } \n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isHeaders(header)) {\n for (const [key, value] of header.entries()) {\n setHeader(value, key, rewrite);\n }\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n }\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs)\n }, threshold - passed);\n }\n }\n }\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n","import speedometer from \"./speedometer.js\";\nimport throttle from \"./throttle.js\";\nimport utils from \"../utils.js\";\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle(e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true\n };\n\n listener(data);\n }, freq);\n}\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n}\n\nexport const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n})(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n) : () => true;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, prop , caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop , caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop , caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport isURLSameOrigin from \"./isURLSameOrigin.js\";\nimport cookies from \"./cookies.js\";\nimport buildFullPath from \"../core/buildFullPath.js\";\nimport mergeConfig from \"../core/mergeConfig.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport buildURL from \"./buildURL.js\";\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\n","import utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {progressEventReducer} from '../helpers/progressEventReducer.js';\nimport resolveConfig from \"../helpers/resolveConfig.js\";\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let {responseType, onUploadProgress, onDownloadProgress} = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import CanceledError from \"../cancel/CanceledError.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n }\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT))\n }, timeout)\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n }\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n}\n\nexport default composeSignals;\n","\nexport const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n}\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n}\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n}\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n }\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport composeSignals from \"../helpers/composeSignals.js\";\nimport {trackStream} from \"../helpers/trackStream.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\nimport resolveConfig from \"../helpers/resolveConfig.js\";\nimport settle from \"../core/settle.js\";\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n}\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n })\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils.isBlob(body)) {\n return body.size;\n }\n\n if(utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n}\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n}\n\nexport default isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader)\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n })\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\n\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport fetchAdapter from './fetch.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","export const VERSION = \"1.7.8\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n }\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n validator.assertOptions(config, {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken')\n }, true);\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Error;\n","'use strict';\n\n/** @type {import('./eval')} */\nmodule.exports = EvalError;\n","'use strict';\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;\n","'use strict';\n\n/** @type {import('./ref')} */\nmodule.exports = ReferenceError;\n","'use strict';\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;\n","'use strict';\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;\n","'use strict';\n\n/** @type {import('./uri')} */\nmodule.exports = URIError;\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\nvar test = {\n\t__proto__: null,\n\tfoo: {}\n};\n\nvar $Object = Object;\n\n/** @type {import('.')} */\nmodule.exports = function hasProto() {\n\t// @ts-expect-error: TS errors on an inherited property for some reason\n\treturn { __proto__: test }.foo === test.foo\n\t\t&& !(test instanceof $Object);\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n","'use strict';\n\nvar undefined;\n\nvar $Error = require('es-errors');\nvar $EvalError = require('es-errors/eval');\nvar $RangeError = require('es-errors/range');\nvar $ReferenceError = require('es-errors/ref');\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\nvar $URIError = require('es-errors/uri');\n\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t__proto__: null,\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': $Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': $EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': $RangeError,\n\t'%ReferenceError%': $ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': $URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t__proto__: null,\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('hasown');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\n/** @type {import('.')} */\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nmodule.exports = $defineProperty;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\n\nvar gopd = require('gopd');\n\n/** @type {import('.')} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\treturn !!$defineProperty;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!$defineProperty) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar gOPD = require('gopd');\n\nvar $TypeError = require('es-errors/type');\nvar $floor = GetIntrinsic('%Math.floor%');\n\n/** @type {import('.')} */\nmodule.exports = function setFunctionLength(fn, length) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tif (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {\n\t\tthrow new $TypeError('`length` must be a positive 32-bit integer');\n\t}\n\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\n\tvar functionLengthIsConfigurable = true;\n\tvar functionLengthIsWritable = true;\n\tif ('length' in fn && gOPD) {\n\t\tvar desc = gOPD(fn, 'length');\n\t\tif (desc && !desc.configurable) {\n\t\t\tfunctionLengthIsConfigurable = false;\n\t\t}\n\t\tif (desc && !desc.writable) {\n\t\t\tfunctionLengthIsWritable = false;\n\t\t}\n\t}\n\n\tif (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length, true, true);\n\t\t} else {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\nvar setFunctionLength = require('set-function-length');\n\nvar $TypeError = require('es-errors/type');\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $defineProperty = require('es-define-property');\nvar $max = GetIntrinsic('%Math.max%');\n\nmodule.exports = function callBind(originalFunction) {\n\tif (typeof originalFunction !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\tvar func = $reflectApply(bind, $call, arguments);\n\treturn setFunctionLength(\n\t\tfunc,\n\t\t1 + $max(0, originalFunction.length - (arguments.length - 1)),\n\t\ttrue\n\t);\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","export default {}","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nvar quotes = {\n __proto__: null,\n 'double': '\"',\n single: \"'\"\n};\nvar quoteREs = {\n __proto__: null,\n 'double': /([\"\\\\])/g,\n single: /(['\\\\])/g\n};\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other\n /* eslint-env browser */\n if (typeof window !== 'undefined' && obj === window) {\n return '{ [object Window] }';\n }\n if (\n (typeof globalThis !== 'undefined' && obj === globalThis)\n || (typeof global !== 'undefined' && obj === global)\n ) {\n return '{ [object globalThis] }';\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var style = opts.quoteStyle || defaultStyle;\n var quoteChar = quotes[style];\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n var quoteRE = quoteREs[opts.quoteStyle || 'single'];\n quoteRE.lastIndex = 0;\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, quoteRE, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = require('es-errors/type');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n* This function traverses the list returning the node corresponding to the given key.\n*\n* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.\n*/\n/** @type {import('.').listGetNode} */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\t/** @type {typeof list | NonNullable<(typeof list)['next']>} */\n\tvar prev = list;\n\t/** @type {(typeof list)['next']} */\n\tvar curr;\n\tfor (; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\t// eslint-disable-next-line no-extra-parens\n\t\t\tcurr.next = /** @type {NonNullable} */ (list.next);\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\n/** @type {import('.').listGet} */\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\n/** @type {import('.').listSet} */\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = /** @type {import('.').ListNode} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t});\n\t}\n};\n/** @type {import('.').listHas} */\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\n/** @type {import('.')} */\nmodule.exports = function getSideChannel() {\n\t/** @type {WeakMap} */ var $wm;\n\t/** @type {Map} */ var $m;\n\t/** @type {import('.').RootNode} */ var $o;\n\n\t/** @type {import('.').Channel} */\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nvar Format = {\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n\nmodule.exports = {\n 'default': Format.RFC3986,\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return String(value);\n }\n },\n RFC1738: Format.RFC1738,\n RFC3986: Format.RFC3986\n};\n","'use strict';\n\nvar formats = require('./formats');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n while (queue.length > 1) {\n var item = queue.pop();\n var obj = item.obj[item.prop];\n\n if (isArray(obj)) {\n var compacted = [];\n\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n item.obj[item.prop] = compacted;\n }\n }\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? { __proto__: null } : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nvar merge = function merge(target, source, options) {\n /* eslint no-param-reassign: 0 */\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object' && typeof source !== 'function') {\n if (isArray(target)) {\n target.push(source);\n } else if (target && typeof target === 'object') {\n if (\n (options && (options.plainObjects || options.allowPrototypes))\n || !has.call(Object.prototype, source)\n ) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n var targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\n\nvar decode = function (str, defaultDecoder, charset) {\n var strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n } catch (e) {\n return strWithoutPlus;\n }\n};\n\nvar limit = 1024;\n\n/* eslint operator-linebreak: [2, \"before\"] */\n\nvar encode = function encode(str, defaultEncoder, charset, kind, format) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n } else if (typeof str !== 'string') {\n string = String(str);\n }\n\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n\n var out = '';\n for (var j = 0; j < string.length; j += limit) {\n var segment = string.length >= limit ? string.slice(j, j + limit) : string;\n var arr = [];\n\n for (var i = 0; i < segment.length; ++i) {\n var c = segment.charCodeAt(i);\n if (\n c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || (c >= 0x30 && c <= 0x39) // 0-9\n || (c >= 0x41 && c <= 0x5A) // a-z\n || (c >= 0x61 && c <= 0x7A) // A-Z\n || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )\n ) {\n arr[arr.length] = segment.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n arr[arr.length] = hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n arr[arr.length] = hexTable[0xC0 | (c >> 6)]\n + hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n arr[arr.length] = hexTable[0xE0 | (c >> 12)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF));\n\n arr[arr.length] = hexTable[0xF0 | (c >> 18)]\n + hexTable[0x80 | ((c >> 12) & 0x3F)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n }\n\n out += arr.join('');\n }\n\n return out;\n};\n\nvar compact = function compact(value) {\n var queue = [{ obj: { o: value }, prop: 'o' }];\n var refs = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n compactQueue(queue);\n\n return value;\n};\n\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nvar combine = function combine(a, b) {\n return [].concat(a, b);\n};\n\nvar maybeMap = function maybeMap(val, fn) {\n if (isArray(val)) {\n var mapped = [];\n for (var i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]));\n }\n return mapped;\n }\n return fn(val);\n};\n\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n combine: combine,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n maybeMap: maybeMap,\n merge: merge\n};\n","'use strict';\n\nvar getSideChannel = require('side-channel');\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) {\n return prefix + '[]';\n },\n comma: 'comma',\n indices: function indices(prefix, key) {\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) {\n return prefix;\n }\n};\n\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function (arr, valueOrArray) {\n push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaultFormat = formats['default'];\nvar defaults = {\n addQueryPrefix: false,\n allowDots: false,\n allowEmptyArrays: false,\n arrayFormat: 'indices',\n charset: 'utf-8',\n charsetSentinel: false,\n commaRoundTrip: false,\n delimiter: '&',\n encode: true,\n encodeDotInKeys: false,\n encoder: utils.encode,\n encodeValuesOnly: false,\n filter: void undefined,\n format: defaultFormat,\n formatter: formats.formatters[defaultFormat],\n // deprecated\n indices: false,\n serializeDate: function serializeDate(date) {\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n return typeof v === 'string'\n || typeof v === 'number'\n || typeof v === 'boolean'\n || typeof v === 'symbol'\n || typeof v === 'bigint';\n};\n\nvar sentinel = {};\n\nvar stringify = function stringify(\n object,\n prefix,\n generateArrayPrefix,\n commaRoundTrip,\n allowEmptyArrays,\n strictNullHandling,\n skipNulls,\n encodeDotInKeys,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n sideChannel\n) {\n var obj = object;\n\n var tmpSc = sideChannel;\n var step = 0;\n var findFlag = false;\n while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {\n // Where object last appeared in the ref tree\n var pos = tmpSc.get(object);\n step += 1;\n if (typeof pos !== 'undefined') {\n if (pos === step) {\n throw new RangeError('Cyclic object value');\n } else {\n findFlag = true; // Break while\n }\n }\n if (typeof tmpSc.get(sentinel) === 'undefined') {\n step = 0;\n }\n }\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n obj = utils.maybeMap(obj, function (value) {\n if (value instanceof Date) {\n return serializeDate(value);\n }\n return value;\n });\n }\n\n if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;\n }\n\n obj = '';\n }\n\n if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (generateArrayPrefix === 'comma' && isArray(obj)) {\n // we need to join elements in\n if (encodeValuesOnly && encoder) {\n obj = utils.maybeMap(obj, encoder);\n }\n objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];\n } else if (isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\\./g, '%2E') : String(prefix);\n\n var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;\n\n if (allowEmptyArrays && isArray(obj) && obj.length === 0) {\n return adjustedPrefix + '[]';\n }\n\n for (var j = 0; j < objKeys.length; ++j) {\n var key = objKeys[j];\n var value = typeof key === 'object' && key && typeof key.value !== 'undefined'\n ? key.value\n : obj[key];\n\n if (skipNulls && value === null) {\n continue;\n }\n\n var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\\./g, '%2E') : String(key);\n var keyPrefix = isArray(obj)\n ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix\n : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');\n\n sideChannel.set(object, step);\n var valueSideChannel = getSideChannel();\n valueSideChannel.set(sentinel, sideChannel);\n pushToArray(values, stringify(\n value,\n keyPrefix,\n generateArrayPrefix,\n commaRoundTrip,\n allowEmptyArrays,\n strictNullHandling,\n skipNulls,\n encodeDotInKeys,\n generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n valueSideChannel\n ));\n }\n\n return values;\n};\n\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {\n throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');\n }\n\n if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') {\n throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');\n }\n\n if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var charset = opts.charset || defaults.charset;\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n\n var format = formats['default'];\n if (typeof opts.format !== 'undefined') {\n if (!has.call(formats.formatters, opts.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n format = opts.format;\n }\n var formatter = formats.formatters[format];\n\n var filter = defaults.filter;\n if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n filter = opts.filter;\n }\n\n var arrayFormat;\n if (opts.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = opts.arrayFormat;\n } else if ('indices' in opts) {\n arrayFormat = opts.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = defaults.arrayFormat;\n }\n\n if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {\n throw new TypeError('`commaRoundTrip` must be a boolean, or absent');\n }\n\n var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;\n\n return {\n addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n allowDots: allowDots,\n allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,\n arrayFormat: arrayFormat,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n commaRoundTrip: !!opts.commaRoundTrip,\n delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys,\n encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n filter: filter,\n format: format,\n formatter: formatter,\n serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n sort: typeof opts.sort === 'function' ? opts.sort : null,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = normalizeStringifyOptions(opts);\n\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];\n var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip;\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (options.sort) {\n objKeys.sort(options.sort);\n }\n\n var sideChannel = getSideChannel();\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n var value = obj[key];\n\n if (options.skipNulls && value === null) {\n continue;\n }\n pushToArray(keys, stringify(\n value,\n key,\n generateArrayPrefix,\n commaRoundTrip,\n options.allowEmptyArrays,\n options.strictNullHandling,\n options.skipNulls,\n options.encodeDotInKeys,\n options.encode ? options.encoder : null,\n options.filter,\n options.sort,\n options.allowDots,\n options.serializeDate,\n options.format,\n options.formatter,\n options.encodeValuesOnly,\n options.charset,\n sideChannel\n ));\n }\n\n var joined = keys.join(options.delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n\n if (options.charsetSentinel) {\n if (options.charset === 'iso-8859-1') {\n // encodeURIComponent('✓'), the \"numeric entity\" representation of a checkmark\n prefix += 'utf8=%26%2310003%3B&';\n } else {\n // encodeURIComponent('✓')\n prefix += 'utf8=%E2%9C%93&';\n }\n }\n\n return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar defaults = {\n allowDots: false,\n allowEmptyArrays: false,\n allowPrototypes: false,\n allowSparse: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decodeDotInKeys: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n duplicates: 'combine',\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictDepth: false,\n strictNullHandling: false\n};\n\nvar interpretNumericEntities = function (str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\n\nvar parseArrayValue = function (val, options) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = { __proto__: null };\n\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n var key;\n var val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n val = utils.maybeMap(\n parseArrayValue(part.slice(pos + 1), options),\n function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n }\n );\n }\n\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(String(val));\n }\n\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n\n var existing = has.call(obj, key);\n if (existing && options.duplicates === 'combine') {\n obj[key] = utils.combine(obj[key], val);\n } else if (!existing || options.duplicates === 'last') {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function (chain, val, options, valuesParsed) {\n var leaf = valuesParsed ? val : parseArrayValue(val, options);\n\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n\n if (root === '[]' && options.parseArrays) {\n obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null))\n ? []\n : [].concat(leaf);\n } else {\n obj = options.plainObjects ? { __proto__: null } : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;\n var index = parseInt(decodedRoot, 10);\n if (!options.parseArrays && decodedRoot === '') {\n obj = { 0: leaf };\n } else if (\n !isNaN(index)\n && root !== decodedRoot\n && String(index) === decodedRoot\n && index >= 0\n && (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = leaf;\n } else if (decodedRoot !== '__proto__') {\n obj[decodedRoot] = leaf;\n }\n }\n\n leaf = obj;\n }\n\n return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, check strictDepth option for throw, else just add whatever is left\n\n if (segment) {\n if (options.strictDepth === true) {\n throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');\n }\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options, valuesParsed);\n};\n\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {\n throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');\n }\n\n if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') {\n throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');\n }\n\n if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n\n var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates;\n\n if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {\n throw new TypeError('The duplicates option must be either combine, first, or last');\n }\n\n var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;\n\n return {\n allowDots: allowDots,\n allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,\n duplicates: duplicates,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? { __proto__: null } : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? { __proto__: null } : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n\n if (options.allowSparse === true) {\n return obj;\n }\n\n return utils.compact(obj);\n};\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n","/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress\n * @license MIT */\n\n;(function(root, factory) {\n\n if (typeof define === 'function' && define.amd) {\n define(factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.NProgress = factory();\n }\n\n})(this, function() {\n var NProgress = {};\n\n NProgress.version = '0.2.0';\n\n var Settings = NProgress.settings = {\n minimum: 0.08,\n easing: 'ease',\n positionUsing: '',\n speed: 200,\n trickle: true,\n trickleRate: 0.02,\n trickleSpeed: 800,\n showSpinner: true,\n barSelector: '[role=\"bar\"]',\n spinnerSelector: '[role=\"spinner\"]',\n parent: 'body',\n template: '
'\n };\n\n /**\n * Updates configuration.\n *\n * NProgress.configure({\n * minimum: 0.1\n * });\n */\n NProgress.configure = function(options) {\n var key, value;\n for (key in options) {\n value = options[key];\n if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value;\n }\n\n return this;\n };\n\n /**\n * Last number.\n */\n\n NProgress.status = null;\n\n /**\n * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.\n *\n * NProgress.set(0.4);\n * NProgress.set(1.0);\n */\n\n NProgress.set = function(n) {\n var started = NProgress.isStarted();\n\n n = clamp(n, Settings.minimum, 1);\n NProgress.status = (n === 1 ? null : n);\n\n var progress = NProgress.render(!started),\n bar = progress.querySelector(Settings.barSelector),\n speed = Settings.speed,\n ease = Settings.easing;\n\n progress.offsetWidth; /* Repaint */\n\n queue(function(next) {\n // Set positionUsing if it hasn't already been set\n if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();\n\n // Add transition\n css(bar, barPositionCSS(n, speed, ease));\n\n if (n === 1) {\n // Fade out\n css(progress, { \n transition: 'none', \n opacity: 1 \n });\n progress.offsetWidth; /* Repaint */\n\n setTimeout(function() {\n css(progress, { \n transition: 'all ' + speed + 'ms linear', \n opacity: 0 \n });\n setTimeout(function() {\n NProgress.remove();\n next();\n }, speed);\n }, speed);\n } else {\n setTimeout(next, speed);\n }\n });\n\n return this;\n };\n\n NProgress.isStarted = function() {\n return typeof NProgress.status === 'number';\n };\n\n /**\n * Shows the progress bar.\n * This is the same as setting the status to 0%, except that it doesn't go backwards.\n *\n * NProgress.start();\n *\n */\n NProgress.start = function() {\n if (!NProgress.status) NProgress.set(0);\n\n var work = function() {\n setTimeout(function() {\n if (!NProgress.status) return;\n NProgress.trickle();\n work();\n }, Settings.trickleSpeed);\n };\n\n if (Settings.trickle) work();\n\n return this;\n };\n\n /**\n * Hides the progress bar.\n * This is the *sort of* the same as setting the status to 100%, with the\n * difference being `done()` makes some placebo effect of some realistic motion.\n *\n * NProgress.done();\n *\n * If `true` is passed, it will show the progress bar even if its hidden.\n *\n * NProgress.done(true);\n */\n\n NProgress.done = function(force) {\n if (!force && !NProgress.status) return this;\n\n return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);\n };\n\n /**\n * Increments by a random amount.\n */\n\n NProgress.inc = function(amount) {\n var n = NProgress.status;\n\n if (!n) {\n return NProgress.start();\n } else {\n if (typeof amount !== 'number') {\n amount = (1 - n) * clamp(Math.random() * n, 0.1, 0.95);\n }\n\n n = clamp(n + amount, 0, 0.994);\n return NProgress.set(n);\n }\n };\n\n NProgress.trickle = function() {\n return NProgress.inc(Math.random() * Settings.trickleRate);\n };\n\n /**\n * Waits for all supplied jQuery promises and\n * increases the progress as the promises resolve.\n *\n * @param $promise jQUery Promise\n */\n (function() {\n var initial = 0, current = 0;\n\n NProgress.promise = function($promise) {\n if (!$promise || $promise.state() === \"resolved\") {\n return this;\n }\n\n if (current === 0) {\n NProgress.start();\n }\n\n initial++;\n current++;\n\n $promise.always(function() {\n current--;\n if (current === 0) {\n initial = 0;\n NProgress.done();\n } else {\n NProgress.set((initial - current) / initial);\n }\n });\n\n return this;\n };\n\n })();\n\n /**\n * (Internal) renders the progress bar markup based on the `template`\n * setting.\n */\n\n NProgress.render = function(fromStart) {\n if (NProgress.isRendered()) return document.getElementById('nprogress');\n\n addClass(document.documentElement, 'nprogress-busy');\n \n var progress = document.createElement('div');\n progress.id = 'nprogress';\n progress.innerHTML = Settings.template;\n\n var bar = progress.querySelector(Settings.barSelector),\n perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0),\n parent = document.querySelector(Settings.parent),\n spinner;\n \n css(bar, {\n transition: 'all 0 linear',\n transform: 'translate3d(' + perc + '%,0,0)'\n });\n\n if (!Settings.showSpinner) {\n spinner = progress.querySelector(Settings.spinnerSelector);\n spinner && removeElement(spinner);\n }\n\n if (parent != document.body) {\n addClass(parent, 'nprogress-custom-parent');\n }\n\n parent.appendChild(progress);\n return progress;\n };\n\n /**\n * Removes the element. Opposite of render().\n */\n\n NProgress.remove = function() {\n removeClass(document.documentElement, 'nprogress-busy');\n removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent');\n var progress = document.getElementById('nprogress');\n progress && removeElement(progress);\n };\n\n /**\n * Checks if the progress bar is rendered.\n */\n\n NProgress.isRendered = function() {\n return !!document.getElementById('nprogress');\n };\n\n /**\n * Determine which positioning CSS rule to use.\n */\n\n NProgress.getPositioningCSS = function() {\n // Sniff on document.body.style\n var bodyStyle = document.body.style;\n\n // Sniff prefixes\n var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :\n ('MozTransform' in bodyStyle) ? 'Moz' :\n ('msTransform' in bodyStyle) ? 'ms' :\n ('OTransform' in bodyStyle) ? 'O' : '';\n\n if (vendorPrefix + 'Perspective' in bodyStyle) {\n // Modern browsers with 3D support, e.g. Webkit, IE10\n return 'translate3d';\n } else if (vendorPrefix + 'Transform' in bodyStyle) {\n // Browsers without 3D support, e.g. IE9\n return 'translate';\n } else {\n // Browsers without translate() support, e.g. IE7-8\n return 'margin';\n }\n };\n\n /**\n * Helpers\n */\n\n function clamp(n, min, max) {\n if (n < min) return min;\n if (n > max) return max;\n return n;\n }\n\n /**\n * (Internal) converts a percentage (`0..1`) to a bar translateX\n * percentage (`-100%..0%`).\n */\n\n function toBarPerc(n) {\n return (-1 + n) * 100;\n }\n\n\n /**\n * (Internal) returns the correct CSS for changing the bar's\n * position given an n percentage, and speed and ease from Settings\n */\n\n function barPositionCSS(n, speed, ease) {\n var barCSS;\n\n if (Settings.positionUsing === 'translate3d') {\n barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };\n } else if (Settings.positionUsing === 'translate') {\n barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' };\n } else {\n barCSS = { 'margin-left': toBarPerc(n)+'%' };\n }\n\n barCSS.transition = 'all '+speed+'ms '+ease;\n\n return barCSS;\n }\n\n /**\n * (Internal) Queues a function to be executed.\n */\n\n var queue = (function() {\n var pending = [];\n \n function next() {\n var fn = pending.shift();\n if (fn) {\n fn(next);\n }\n }\n\n return function(fn) {\n pending.push(fn);\n if (pending.length == 1) next();\n };\n })();\n\n /**\n * (Internal) Applies css properties to an element, similar to the jQuery \n * css method.\n *\n * While this helper does assist with vendor prefixed property names, it \n * does not perform any manipulation of values prior to setting styles.\n */\n\n var css = (function() {\n var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],\n cssProps = {};\n\n function camelCase(string) {\n return string.replace(/^-ms-/, 'ms-').replace(/-([\\da-z])/gi, function(match, letter) {\n return letter.toUpperCase();\n });\n }\n\n function getVendorProp(name) {\n var style = document.body.style;\n if (name in style) return name;\n\n var i = cssPrefixes.length,\n capName = name.charAt(0).toUpperCase() + name.slice(1),\n vendorName;\n while (i--) {\n vendorName = cssPrefixes[i] + capName;\n if (vendorName in style) return vendorName;\n }\n\n return name;\n }\n\n function getStyleProp(name) {\n name = camelCase(name);\n return cssProps[name] || (cssProps[name] = getVendorProp(name));\n }\n\n function applyCss(element, prop, value) {\n prop = getStyleProp(prop);\n element.style[prop] = value;\n }\n\n return function(element, properties) {\n var args = arguments,\n prop, \n value;\n\n if (args.length == 2) {\n for (prop in properties) {\n value = properties[prop];\n if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value);\n }\n } else {\n applyCss(element, args[1], args[2]);\n }\n }\n })();\n\n /**\n * (Internal) Determines if an element or space separated list of class names contains a class name.\n */\n\n function hasClass(element, name) {\n var list = typeof element == 'string' ? element : classList(element);\n return list.indexOf(' ' + name + ' ') >= 0;\n }\n\n /**\n * (Internal) Adds a class to an element.\n */\n\n function addClass(element, name) {\n var oldList = classList(element),\n newList = oldList + name;\n\n if (hasClass(oldList, name)) return; \n\n // Trim the opening space.\n element.className = newList.substring(1);\n }\n\n /**\n * (Internal) Removes a class from an element.\n */\n\n function removeClass(element, name) {\n var oldList = classList(element),\n newList;\n\n if (!hasClass(element, name)) return;\n\n // Replace the class name.\n newList = oldList.replace(' ' + name + ' ', ' ');\n\n // Trim the opening and closing spaces.\n element.className = newList.substring(1, newList.length - 1);\n }\n\n /**\n * (Internal) Gets a space separated list of the class names on the element. \n * The list is wrapped with a single space on each end to facilitate finding \n * matches within the list.\n */\n\n function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }\n\n /**\n * (Internal) Removes an element from the DOM.\n */\n\n function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }\n\n return NProgress;\n});\n\n","import{default as _}from\"axios\";function L(t,e){let i;return function(...n){clearTimeout(i),i=setTimeout(()=>t.apply(this,n),e)}}function m(t,e){return document.dispatchEvent(new CustomEvent(`inertia:${t}`,e))}var M=t=>m(\"before\",{cancelable:!0,detail:{visit:t}}),H=t=>m(\"error\",{detail:{errors:t}}),$=t=>m(\"exception\",{cancelable:!0,detail:{exception:t}}),N=t=>m(\"finish\",{detail:{visit:t}}),q=t=>m(\"invalid\",{cancelable:!0,detail:{response:t}}),x=t=>m(\"navigate\",{detail:{page:t}}),W=t=>m(\"progress\",{detail:{progress:t}}),X=t=>m(\"start\",{detail:{visit:t}}),K=t=>m(\"success\",{detail:{page:t}});function I(t){return t instanceof File||t instanceof Blob||t instanceof FileList&&t.length>0||t instanceof FormData&&Array.from(t.values()).some(e=>I(e))||typeof t==\"object\"&&t!==null&&Object.values(t).some(e=>I(e))}function A(t,e=new FormData,i=null){t=t||{};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&z(e,J(i,n),t[n]);return e}function J(t,e){return t?t+\"[\"+e+\"]\":e}function z(t,e,i){if(Array.isArray(i))return Array.from(i.keys()).forEach(n=>z(t,J(e,n.toString()),i[n]));if(i instanceof Date)return t.append(e,i.toISOString());if(i instanceof File)return t.append(e,i,i.name);if(i instanceof Blob)return t.append(e,i);if(typeof i==\"boolean\")return t.append(e,i?\"1\":\"0\");if(typeof i==\"string\")return t.append(e,i);if(typeof i==\"number\")return t.append(e,`${i}`);if(i==null)return t.append(e,\"\");A(i,t,e)}var B={modal:null,listener:null,show(t){typeof t==\"object\"&&(t=`All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.
${JSON.stringify(t)}`);let e=document.createElement(\"html\");e.innerHTML=t,e.querySelectorAll(\"a\").forEach(n=>n.setAttribute(\"target\",\"_top\")),this.modal=document.createElement(\"div\"),this.modal.style.position=\"fixed\",this.modal.style.width=\"100vw\",this.modal.style.height=\"100vh\",this.modal.style.padding=\"50px\",this.modal.style.boxSizing=\"border-box\",this.modal.style.backgroundColor=\"rgba(0, 0, 0, .6)\",this.modal.style.zIndex=2e5,this.modal.addEventListener(\"click\",()=>this.hide());let i=document.createElement(\"iframe\");if(i.style.backgroundColor=\"white\",i.style.borderRadius=\"5px\",i.style.width=\"100%\",i.style.height=\"100%\",this.modal.appendChild(i),document.body.prepend(this.modal),document.body.style.overflow=\"hidden\",!i.contentWindow)throw new Error(\"iframe not yet ready.\");i.contentWindow.document.open(),i.contentWindow.document.write(e.outerHTML),i.contentWindow.document.close(),this.listener=this.hideOnEscape.bind(this),document.addEventListener(\"keydown\",this.listener)},hide(){this.modal.outerHTML=\"\",this.modal=null,document.body.style.overflow=\"visible\",document.removeEventListener(\"keydown\",this.listener)},hideOnEscape(t){t.keyCode===27&&this.hide()}};import ne from\"deepmerge\";import*as O from\"qs\";function b(t){return new URL(t.toString(),window.location.toString())}function k(t,e,i,n=\"brackets\"){let s=/^https?:\\/\\//.test(e.toString()),l=s||e.toString().startsWith(\"/\"),h=!l&&!e.toString().startsWith(\"#\")&&!e.toString().startsWith(\"?\"),g=e.toString().includes(\"?\")||t===\"get\"&&Object.keys(i).length,f=e.toString().includes(\"#\"),c=new URL(e.toString(),\"http://localhost\");return t===\"get\"&&Object.keys(i).length&&(c.search=O.stringify(ne(O.parse(c.search,{ignoreQueryPrefix:!0}),i),{encodeValuesOnly:!0,arrayFormat:n}),i={}),[[s?`${c.protocol}//${c.host}`:\"\",l?c.pathname:\"\",h?c.pathname.substring(1):\"\",g?c.search:\"\",f?c.hash:\"\"].join(\"\"),i]}function w(t){return t=new URL(t.href),t.hash=\"\",t}var Q=typeof window>\"u\",C=class{constructor(){this.visitId=null}init({initialPage:e,resolveComponent:i,swapComponent:n}){this.page=e,this.resolveComponent=i,this.swapComponent=n,this.setNavigationType(),this.clearRememberedStateOnReload(),this.isBackForwardVisit()?this.handleBackForwardVisit(this.page):this.isLocationVisit()?this.handleLocationVisit(this.page):this.handleInitialPageVisit(this.page),this.setupEventListeners()}setNavigationType(){this.navigationType=window.performance&&window.performance.getEntriesByType(\"navigation\").length>0?window.performance.getEntriesByType(\"navigation\")[0].type:\"navigate\"}clearRememberedStateOnReload(){this.navigationType===\"reload\"&&window.history.state?.rememberedState&&delete window.history.state.rememberedState}handleInitialPageVisit(e){this.page.url+=window.location.hash,this.setPage(e,{preserveState:!0}).then(()=>x(e))}setupEventListeners(){window.addEventListener(\"popstate\",this.handlePopstateEvent.bind(this)),document.addEventListener(\"scroll\",L(this.handleScrollEvent.bind(this),100),!0)}scrollRegions(){return document.querySelectorAll(\"[scroll-region]\")}handleScrollEvent(e){typeof e.target.hasAttribute==\"function\"&&e.target.hasAttribute(\"scroll-region\")&&this.saveScrollPositions()}saveScrollPositions(){this.replaceState({...this.page,scrollRegions:Array.from(this.scrollRegions()).map(e=>({top:e.scrollTop,left:e.scrollLeft}))})}resetScrollPositions(){window.scrollTo(0,0),this.scrollRegions().forEach(e=>{typeof e.scrollTo==\"function\"?e.scrollTo(0,0):(e.scrollTop=0,e.scrollLeft=0)}),this.saveScrollPositions(),window.location.hash&&setTimeout(()=>document.getElementById(window.location.hash.slice(1))?.scrollIntoView())}restoreScrollPositions(){this.page.scrollRegions&&this.scrollRegions().forEach((e,i)=>{let n=this.page.scrollRegions[i];if(n)typeof e.scrollTo==\"function\"?e.scrollTo(n.left,n.top):(e.scrollTop=n.top,e.scrollLeft=n.left);else return})}isBackForwardVisit(){return window.history.state&&this.navigationType===\"back_forward\"}handleBackForwardVisit(e){window.history.state.version=e.version,this.setPage(window.history.state,{preserveScroll:!0,preserveState:!0}).then(()=>{this.restoreScrollPositions(),x(e)})}locationVisit(e,i){try{let n={preserveScroll:i};window.sessionStorage.setItem(\"inertiaLocationVisit\",JSON.stringify(n)),window.location.href=e.href,w(window.location).href===w(e).href&&window.location.reload()}catch{return!1}}isLocationVisit(){try{return window.sessionStorage.getItem(\"inertiaLocationVisit\")!==null}catch{return!1}}handleLocationVisit(e){let i=JSON.parse(window.sessionStorage.getItem(\"inertiaLocationVisit\")||\"\");window.sessionStorage.removeItem(\"inertiaLocationVisit\"),e.url+=window.location.hash,e.rememberedState=window.history.state?.rememberedState??{},e.scrollRegions=window.history.state?.scrollRegions??[],this.setPage(e,{preserveScroll:i.preserveScroll,preserveState:!0}).then(()=>{i.preserveScroll&&this.restoreScrollPositions(),x(e)})}isLocationVisitResponse(e){return!!(e&&e.status===409&&e.headers[\"x-inertia-location\"])}isInertiaResponse(e){return!!e?.headers[\"x-inertia\"]}createVisitId(){return this.visitId={},this.visitId}cancelVisit(e,{cancelled:i=!1,interrupted:n=!1}){e&&!e.completed&&!e.cancelled&&!e.interrupted&&(e.cancelToken.abort(),e.onCancel(),e.completed=!1,e.cancelled=i,e.interrupted=n,N(e),e.onFinish(e))}finishVisit(e){!e.cancelled&&!e.interrupted&&(e.completed=!0,e.cancelled=!1,e.interrupted=!1,N(e),e.onFinish(e))}resolvePreserveOption(e,i){return typeof e==\"function\"?e(i):e===\"errors\"?Object.keys(i.props.errors||{}).length>0:e}cancel(){this.activeVisit&&this.cancelVisit(this.activeVisit,{cancelled:!0})}visit(e,{method:i=\"get\",data:n={},replace:s=!1,preserveScroll:l=!1,preserveState:h=!1,only:g=[],except:f=[],headers:c={},errorBag:o=\"\",forceFormData:v=!1,onCancelToken:T=()=>{},onBefore:d=()=>{},onStart:p=()=>{},onProgress:P=()=>{},onFinish:y=()=>{},onCancel:ie=()=>{},onSuccess:D=()=>{},onError:U=()=>{},queryStringArrayFormat:F=\"brackets\"}={}){let S=typeof e==\"string\"?b(e):e;if((I(n)||v)&&!(n instanceof FormData)&&(n=A(n)),!(n instanceof FormData)){let[r,a]=k(i,S,n,F);S=b(r),n=a}let R={url:S,method:i,data:n,replace:s,preserveScroll:l,preserveState:h,only:g,except:f,headers:c,errorBag:o,forceFormData:v,queryStringArrayFormat:F,cancelled:!1,completed:!1,interrupted:!1};if(d(R)===!1||!M(R))return;this.activeVisit&&this.cancelVisit(this.activeVisit,{interrupted:!0}),this.saveScrollPositions();let G=this.createVisitId();this.activeVisit={...R,onCancelToken:T,onBefore:d,onStart:p,onProgress:P,onFinish:y,onCancel:ie,onSuccess:D,onError:U,queryStringArrayFormat:F,cancelToken:new AbortController},T({cancel:()=>{this.activeVisit&&this.cancelVisit(this.activeVisit,{cancelled:!0})}}),X(R),p(R);let j=!!(g.length||f.length);_({method:i,url:w(S).href,data:i===\"get\"?{}:n,params:i===\"get\"?n:{},signal:this.activeVisit.cancelToken.signal,headers:{...c,Accept:\"text/html, application/xhtml+xml\",\"X-Requested-With\":\"XMLHttpRequest\",\"X-Inertia\":!0,...j?{\"X-Inertia-Partial-Component\":this.page.component}:{},...g.length?{\"X-Inertia-Partial-Data\":g.join(\",\")}:{},...f.length?{\"X-Inertia-Partial-Except\":f.join(\",\")}:{},...o&&o.length?{\"X-Inertia-Error-Bag\":o}:{},...this.page.version?{\"X-Inertia-Version\":this.page.version}:{}},onUploadProgress:r=>{n instanceof FormData&&(r.percentage=r.progress?Math.round(r.progress*100):0,W(r),P(r))}}).then(r=>{if(!this.isInertiaResponse(r))return Promise.reject({response:r});let a=r.data;j&&a.component===this.page.component&&(a.props={...this.page.props,...a.props}),l=this.resolvePreserveOption(l,a),h=this.resolvePreserveOption(h,a),h&&window.history.state?.rememberedState&&a.component===this.page.component&&(a.rememberedState=window.history.state.rememberedState);let E=S,V=b(a.url);return E.hash&&!V.hash&&w(E).href===V.href&&(V.hash=E.hash,a.url=V.href),this.setPage(a,{visitId:G,replace:s,preserveScroll:l,preserveState:h})}).then(()=>{let r=this.page.props.errors||{};if(Object.keys(r).length>0){let a=o?r[o]?r[o]:{}:r;return H(a),U(a)}return K(this.page),D(this.page)}).catch(r=>{if(this.isInertiaResponse(r.response))return this.setPage(r.response.data,{visitId:G});if(this.isLocationVisitResponse(r.response)){let a=b(r.response.headers[\"x-inertia-location\"]),E=S;E.hash&&!a.hash&&w(E).href===a.href&&(a.hash=E.hash),this.locationVisit(a,l===!0)}else if(r.response)q(r.response)&&B.show(r.response.data);else return Promise.reject(r)}).then(()=>{this.activeVisit&&this.finishVisit(this.activeVisit)}).catch(r=>{if(!_.isCancel(r)){let a=$(r);if(this.activeVisit&&this.finishVisit(this.activeVisit),a)return Promise.reject(r)}})}setPage(e,{visitId:i=this.createVisitId(),replace:n=!1,preserveScroll:s=!1,preserveState:l=!1}={}){return Promise.resolve(this.resolveComponent(e.component)).then(h=>{i===this.visitId&&(e.scrollRegions=e.scrollRegions||[],e.rememberedState=e.rememberedState||{},n=n||b(e.url).href===window.location.href,n?this.replaceState(e):this.pushState(e),this.swapComponent({component:h,page:e,preserveState:l}).then(()=>{s||this.resetScrollPositions(),n||x(e)}))})}pushState(e){this.page=e,window.history.pushState(e,\"\",e.url)}replaceState(e){this.page=e,window.history.replaceState(e,\"\",e.url)}handlePopstateEvent(e){if(e.state!==null){let i=e.state,n=this.createVisitId();Promise.resolve(this.resolveComponent(i.component)).then(s=>{n===this.visitId&&(this.page=i,this.swapComponent({component:s,page:i,preserveState:!1}).then(()=>{this.restoreScrollPositions(),x(i)}))})}else{let i=b(this.page.url);i.hash=window.location.hash,this.replaceState({...this.page,url:i.href}),this.resetScrollPositions()}}get(e,i={},n={}){return this.visit(e,{...n,method:\"get\",data:i})}reload(e={}){return this.visit(window.location.href,{...e,preserveScroll:!0,preserveState:!0})}replace(e,i={}){return console.warn(`Inertia.replace() has been deprecated and will be removed in a future release. Please use Inertia.${i.method??\"get\"}() instead.`),this.visit(e,{preserveState:!0,...i,replace:!0})}post(e,i={},n={}){return this.visit(e,{preserveState:!0,...n,method:\"post\",data:i})}put(e,i={},n={}){return this.visit(e,{preserveState:!0,...n,method:\"put\",data:i})}patch(e,i={},n={}){return this.visit(e,{preserveState:!0,...n,method:\"patch\",data:i})}delete(e,i={}){return this.visit(e,{preserveState:!0,...i,method:\"delete\"})}remember(e,i=\"default\"){Q||this.replaceState({...this.page,rememberedState:{...this.page?.rememberedState,[i]:e}})}restore(e=\"default\"){if(!Q)return window.history.state?.rememberedState?.[e]}on(e,i){let n=s=>{let l=i(s);s.cancelable&&!s.defaultPrevented&&l===!1&&s.preventDefault()};return document.addEventListener(`inertia:${e}`,n),()=>document.removeEventListener(`inertia:${e}`,n)}};var re={buildDOMElement(t){let e=document.createElement(\"template\");e.innerHTML=t;let i=e.content.firstChild;if(!t.startsWith(\"