1 line
7.2 KiB
JSON
1 line
7.2 KiB
JSON
|
{"ast":null,"code":"var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\n\nvar global = require('../internals/global');\n\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar isObject = require('../internals/is-object');\n\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar hasOwn = require('../internals/has-own-property');\n\nvar shared = require('../internals/shared-store');\n\nvar sharedKey = require('../internals/shared-key');\n\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = global.TypeError;\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function enforce(it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function getterFor(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 (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = uncurryThis(store.get);\n var wmhas = uncurryThis(store.has);\n var wmset = uncurryThis(store.set);\n\n set = function set(it, metadata) {\n if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset(store, it, metadata);\n return metadata;\n };\n\n get = function get(it) {\n return wmget(store, it) || {};\n };\n\n has = function has(it) {\n return wmhas(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n\n set = function set(it, metadata) {\n if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n\n get = function get(it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n\n has = function has(it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};","map":{"version":3,"names":["NATIVE_WEAK_MAP","require","global","uncurryThis","isObject","createNonEnumerableProperty","hasOwn","shared","sharedKey","hiddenKeys","OBJECT_ALREADY_INITIALIZED","TypeError","WeakMap","set","get","has","enforce","it","getterFor","TYPE","state","type","store","wmget","wmhas","wmset","metadata","facade","STATE","module","exports"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/core-js/internals/internal-state.js"],"sourcesContent":["var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = global.TypeError;\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = uncurryThis(store.get);\n var wmhas = uncurryThis(store.has);\n var wmset = uncurryThis(store.set);\n set = function (it, metadata) {\n if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset(
|