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AAY,EAAQ,YACtB,EAAO,OAAO,CAAC,QAYvB,OANI,EAAQ,YACV,EAAO,EAAK,KAAI,SAAU,GACxB,OAAO,EAAE,KAAK,IAChB,KAGK,CACT","file":"/npm/dotty@0.1.2/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/dotty@0.1.2/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","//\n// Dotty makes it easy to programmatically access arbitrarily nested objects and\n// their properties.\n//\n\n//\n// `object` is an object, `path` is the path to the property you want to check\n// for existence of.\n//\n// `path` can be provided as either a `\"string.separated.with.dots\"` or as\n// `[\"an\", \"array\"]`.\n//\n// Returns `true` if the path can be completely resolved, `false` otherwise.\n//\n\nvar exists = (module.exports.exists = function exists(object, path) {\n  if (typeof path === \"string\") {\n    path = path.split(\".\");\n  }\n\n  if (!(path instanceof Array) || path.length === 0) {\n    return false;\n  }\n\n  path = path.slice();\n\n  var key = path.shift();\n\n  if (typeof object !== \"object\" || object === null) {\n    return false;\n  }\n\n  if (path.length === 0) {\n    return Object.hasOwnProperty.apply(object, [key]);\n  } else {\n    return exists(object[key], path);\n  }\n});\n\n//\n// These arguments are the same as those for `exists`.\n//\n// The return value, however, is the property you're trying to access, or\n// `undefined` if it can't be found. This means you won't be able to tell\n// the difference between an unresolved path and an undefined property, so you\n// should not use `get` to check for the existence of a property. Use `exists`\n// instead.\n//\n\nvar get = (module.exports.get = function get(object, path) {\n  if (typeof path === \"string\") {\n    path = path.split(\".\");\n  }\n\n  if (!(path instanceof Array) || path.length === 0) {\n    return;\n  }\n\n  path = path.slice();\n\n  var key = path.shift();\n\n  if (typeof object !== \"object\" || object === null) {\n    return;\n  }\n\n  if (path.length === 0) {\n    return object[key];\n  }\n\n  if (path.length) {\n    return get(object[key], path);\n  }\n});\n\n//\n// Arguments are similar to `exists` and `get`, with the exception that path\n// components are regexes with some special cases. If a path component is `\"*\"`\n// on its own, it'll be converted to `/.*/`.\n//\n// The return value is an array of values where the key path matches the\n// specified criterion. If none match, an empty array will be returned.\n//\n// If an action function is specified, that action will be applied to each\n// match. Action params are value, parent and key.\n//\n\nvar search = (module.exports.search = function search(object, path, action) {\n  if (typeof path === \"string\") {\n    path = path.split(\".\");\n  }\n\n  if (!(path instanceof Array) || path.length === 0) {\n    return;\n  }\n\n  path = path.slice();\n\n  var key = path.shift();\n\n  if (typeof object !== \"object\" || object === null) {\n    return;\n  }\n\n  if (key === \"*\") {\n    key = \".*\";\n  }\n\n  if (typeof key === \"string\") {\n    key = new RegExp(key);\n  }\n\n  if (path.length === 0) {\n    return Object.keys(object)\n      .filter(key.test.bind(key))\n      .map(function (k) {\n        var value = object[k];\n        if (action) {\n          action(value, object, k);\n        }\n        return value;\n      });\n  } else {\n    return Array.prototype.concat.apply(\n      [],\n      Object.keys(object)\n        .filter(key.test.bind(key))\n        .map(function (k) {\n          return search(object[k], path, action);\n        })\n    );\n  }\n});\n\n//\n// Perform a search and remove the matched keys.\n// The return value is the same object argument with modifications.\n//\n\nvar removeSearch = (module.exports.removeSearch = function removeSearch(\n  object,\n  path\n) {\n  search(object, path, function (value, object, key) {\n    delete object[key];\n  });\n  return object;\n});\n\n//\n// The first two arguments for `put` are the same as `exists` and `get`.\n//\n// The third argument is a value to `put` at the `path` of the `object`.\n// Objects in the middle will be created if they don't exist, or added to if\n// they do. If a value is encountered in the middle of the path that is *not*\n// an object, it will not be overwritten.\n//\n// The return value is `true` in the case that the value was `put`\n// successfully, or `false` otherwise.\n//\n\nvar put = (module.exports.put = function put(object, path, value) {\n  if (typeof path === \"string\") {\n    path = path.split(\".\");\n  }\n\n  if (!(path instanceof Array) || path.length === 0) {\n    return false;\n  }\n\n  path = path.slice();\n\n  var key = \"\" + path.shift();\n\n  if (typeof object !== \"object\" || object === null || key === \"__proto__\") {\n    return false;\n  }\n  if (path.length === 0) {\n    object[key] = value;\n  } else {\n    if (typeof object[key] === \"undefined\") {\n      object[key] = {};\n    }\n\n    if (typeof object[key] !== \"object\" || object[key] === null) {\n      return false;\n    }\n\n    return put(object[key], path, value);\n  }\n\n  return true;\n});\n\n//\n// `remove` is like `put` in reverse!\n//\n// The return value is `true` in the case that the value existed and was removed\n// successfully, or `false` otherwise.\n//\n\nvar remove = (module.exports.remove = function remove(object, path, value) {\n  if (typeof path === \"string\") {\n    path = path.split(\".\");\n  }\n\n  if (!(path instanceof Array) || path.length === 0) {\n    return false;\n  }\n\n  path = path.slice();\n\n  var key = path.shift();\n\n  if (typeof object !== \"object\" || object === null) {\n    return false;\n  }\n\n  if (path.length === 0) {\n    if (!Object.hasOwnProperty.call(object, key)) {\n      return false;\n    }\n\n    delete object[key];\n\n    return true;\n  } else {\n    return remove(object[key], path, value);\n  }\n});\n\n//\n// `deepKeys` creates a list of all possible key paths for a given object.\n//\n// The return value is always an array, the members of which are paths in array\n// format. If you want them in dot-notation format, do something like this:\n//\n// ```js\n// dotty.deepKeys(obj).map(function(e) {\n//   return e.join(\".\");\n// });\n// ```\n//\n// *Note: this will probably explode on recursive objects. Be careful.*\n//\n\nvar deepKeys = (module.exports.deepKeys = function deepKeys(\n  object,\n  options,\n  prefix\n) {\n  options = options || {};\n\n  if (typeof prefix === \"undefined\") {\n    prefix = [];\n  }\n\n  var keys = [];\n\n  for (var k in object) {\n    if (!Object.hasOwnProperty.call(object, k)) {\n      continue;\n    }\n\n    if (!options.leavesOnly || typeof object[k] !== \"object\") {\n      keys.push(prefix.concat([k]));\n    }\n\n    if (typeof object[k] === \"object\" && object[k] !== null) {\n      keys = keys.concat(\n        deepKeys(\n          object[k],\n          { leavesOnly: options.leavesOnly },\n          prefix.concat([k])\n        )\n      );\n    }\n  }\n\n  if (options.asStrings) {\n    keys = keys.map(function (e) {\n      return e.join(\".\");\n    });\n  }\n\n  return keys;\n});\n"]}