{"version":3,"names":["undefined","PF","DeepMerge","REACT_ELEMENT_TYPE","Symbol","for","defaultIsMergeableObject","value","isNonNullObject","stringValue","Object","prototype","toString","call","$$typeof","isReactElement","isSpecial","cloneUnlessOtherwiseSpecified","options","clone","isMergeableObject","deepmerge","val","Array","isArray","getKeys","target","keys","concat","getOwnPropertySymbols","filter","symbol","propertyIsEnumerable","getEnumerableOwnPropertySymbols","propertyIsOnObject","object","property","_","mergeObject","source","destination","forEach","key","hasOwnProperty","propertyIsUnsafe","customMerge","getMergeFunction","arrayMerge","defaultArrayMerge","destinationArray","sourceArray","sourceIsArray","all","array","Error","reduce","prev","next","merge"],"sources":["pf.js.deepmerge.js"],"sourcesContent":["if (PF.DeepMerge === undefined) {\r\nPF.DeepMerge = {};\r\n\r\n(() => {\r\n\t// https://github.com/TehShrike/is-mergeable-object\r\n\tfunction isMergeableObject(value) {\r\n\t\treturn isNonNullObject(value)\r\n\t\t\t&& !isSpecial(value)\r\n\t}\r\n\r\n\tfunction isNonNullObject(value) {\r\n\t\treturn !!value && typeof value === 'object'\r\n\t}\r\n\r\n\tfunction isSpecial(value) {\r\n\t\tvar stringValue = Object.prototype.toString.call(value)\r\n\r\n\t\treturn stringValue === '[object RegExp]'\r\n\t\t\t|| stringValue === '[object Date]'\r\n\t\t\t|| isReactElement(value)\r\n\t}\r\n\r\n\t// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\r\n\tvar canUseSymbol = typeof Symbol === 'function' && Symbol.for\r\n\tvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7\r\n\r\n\tfunction isReactElement(value) {\r\n\t\treturn value.$$typeof === REACT_ELEMENT_TYPE\r\n\t}\r\n\r\n\r\n\t// https://github.com/TehShrike/deepmerge\r\n\tvar defaultIsMergeableObject = isMergeableObject\r\n\r\n\tfunction emptyTarget(val) {\r\n\t\treturn Array.isArray(val) ? [] : {}\r\n\t}\r\n\r\n\tfunction cloneUnlessOtherwiseSpecified(value, options) {\r\n\t\treturn (options.clone !== false && options.isMergeableObject(value))\r\n\t\t\t? deepmerge(emptyTarget(value), value, options)\r\n\t\t\t: value\r\n\t}\r\n\r\n\tfunction defaultArrayMerge(target, source, options) {\r\n\t\treturn target.concat(source).map(function(element) {\r\n\t\t\treturn cloneUnlessOtherwiseSpecified(element, options)\r\n\t\t})\r\n\t}\r\n\r\n\tfunction getMergeFunction(key, options) {\r\n\t\tif (!options.customMerge) {\r\n\t\t\treturn deepmerge\r\n\t\t}\r\n\t\tvar customMerge = options.customMerge(key)\r\n\t\treturn typeof customMerge === 'function' ? customMerge : deepmerge\r\n\t}\r\n\r\n\tfunction getEnumerableOwnPropertySymbols(target) {\r\n\t\treturn Object.getOwnPropertySymbols\r\n\t\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\r\n\t\t\t\treturn target.propertyIsEnumerable(symbol)\r\n\t\t\t})\r\n\t\t\t: []\r\n\t}\r\n\r\n\tfunction getKeys(target) {\r\n\t\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\r\n\t}\r\n\r\n\tfunction propertyIsOnObject(object, property) {\r\n\t\ttry {\r\n\t\t\treturn property in object\r\n\t\t} catch(_) {\r\n\t\t\treturn false\r\n\t\t}\r\n\t}\r\n\r\n\t// Protects from prototype poisoning and unexpected merging up the prototype chain.\r\n\tfunction propertyIsUnsafe(target, key) {\r\n\t\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\r\n\t\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\r\n\t\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\r\n\t}\r\n\r\n\tfunction mergeObject(target, source, options) {\r\n\t\tvar destination = {}\r\n\t\tif (options.isMergeableObject(target)) {\r\n\t\t\tgetKeys(target).forEach(function(key) {\r\n\t\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options)\r\n\t\t\t})\r\n\t\t}\r\n\t\tgetKeys(source).forEach(function(key) {\r\n\t\t\tif (propertyIsUnsafe(target, key)) {\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\r\n\t\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\r\n\t\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options)\r\n\t\t\t} else {\r\n\t\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options)\r\n\t\t\t}\r\n\t\t})\r\n\t\treturn destination\r\n\t}\r\n\r\n\tfunction deepmerge(target, source, options) {\r\n\t\toptions = options || {}\r\n\t\tconst defaultArrayMerge = (destinationArray, sourceArray, options) => sourceArray; // overwrite whole array\r\n\t\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge\r\n\t\toptions.isMergeableObject = options.isMergeableObject || defaultIsMergeableObject\r\n\t\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\r\n\t\t// implementations can use it. The caller may not replace it.\r\n\t\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified\r\n\r\n\t\tvar sourceIsArray = Array.isArray(source)\r\n\t\tvar targetIsArray = Array.isArray(target)\r\n\t\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray\r\n\r\n\t\tif (!sourceAndTargetTypesMatch) {\r\n\t\t\treturn cloneUnlessOtherwiseSpecified(source, options)\r\n\t\t} else if (sourceIsArray) {\r\n\t\t\treturn options.arrayMerge(target, source, options)\r\n\t\t} else {\r\n\t\t\treturn mergeObject(target, source, options)\r\n\t\t}\r\n\t}\r\n\r\n\tdeepmerge.all = function deepmergeAll(array, options) {\r\n\t\tif (!Array.isArray(array)) {\r\n\t\t\tthrow new Error('first argument should be an array')\r\n\t\t}\r\n\r\n\t\treturn array.reduce(function(prev, next) {\r\n\t\t\treturn deepmerge(prev, next, options)\r\n\t\t}, {})\r\n\t}\r\n\r\n\tPF.DeepMerge.merge = deepmerge;\r\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