{"version":3,"sources":["jsdelivr-header.js","/npm/immutable-cursor@2.0.1/dist/cursor.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,IAAI,OAAS,QAAQ,WAEjB,WAAa,QAAQ,cAErB,YAAc,uBAAuB,YAEzC,SAAS,uBAAuB,GAAO,OAAO,GAAO,EAAI,WAAa,EAAM,CAAE,QAAS,EAAO,CAW9F,SAAS,WAAW,EAAM,EAAS,GACjC,IAAI,GAAO,EAAI,YAAY,SAAS,GAcpC,OAbyB,IAArB,UAAU,OACZ,EAAU,GACkB,mBAAZ,GAChB,EAAW,EACX,EAAU,IAEV,GAAU,EAAI,OAAO,cAAc,QAGb,IAAb,GACT,EAAK,MAAM,IAGN,EAAI,OAAO,YAAY,EAAM,EAAS,EAAK,MAAM,KAAK,GAAO,EAAK,KAC3E,CAEA,QAAQ,KAAO","file":"/npm/immutable-cursor@2.0.1/dist/cursor.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/immutable-cursor@2.0.1/dist/cursor.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nvar _utils = require('./utils');\n\nvar _atomStore = require('atom-store');\n\nvar _atomStore2 = _interopRequireDefault(_atomStore);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n *  Copyright (c) 2014-2015, Facebook, Inc.\n *  All rights reserved.\n *\n *  This source code is licensed under the BSD-style license found in the\n *  LICENSE file in the root directory of this source tree. An additional grant\n *  of patent rights can be found in the PATENTS file in the same directory.\n */\n\nfunction cursorFrom(data, keyPath, onChange) {\n  var atom = (0, _atomStore2.default)(data);\n  if (arguments.length === 1) {\n    keyPath = [];\n  } else if (typeof keyPath === 'function') {\n    onChange = keyPath;\n    keyPath = [];\n  } else {\n    keyPath = (0, _utils.valToKeyPath)(keyPath);\n  }\n\n  if (typeof onChange !== 'undefined') {\n    atom.watch(onChange);\n  }\n\n  return (0, _utils.makeCursor)(data, keyPath, atom.write.bind(atom), atom.read);\n}\n\nexports.from = cursorFrom;"]}