1 line
9.5 KiB
JSON
1 line
9.5 KiB
JSON
|
{"ast":null,"code":"/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\n\nvar definePropertiesModule = require('../internals/object-define-properties');\n\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar html = require('../internals/html');\n\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function EmptyConstructor() {\n /* empty */\n};\n\nvar scriptTag = function scriptTag(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 NullProtoObjectViaActiveX(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 NullProtoObjectViaIFrame() {\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 NullProtoObject() {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) {\n /* ignore */\n }\n\n _NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument); // WSH\n\n var length = enumBugKeys.length;\n\n while (length--) {\n delete _NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n }\n\n return _NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true; // `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es-x/no-object-create -- safe\n\nmodule.exports = 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 : definePropertiesModule.f(result, Properties);\n};","map":{"version":3,"names":["anObject","require","definePropertiesModule","enumBugKeys","hiddenKeys","html","documentCreateElement","sharedKey","GT","LT","PROTOTYPE","SCRIPT","IE_PROTO","EmptyConstructor","scriptTag","content","NullProtoObjectViaActiveX","activeXDocument","write","close","temp","parentWindow","Object","NullProtoObjectViaIFrame","iframe","JS","iframeDocument","style","display","appendChild","src","String","contentWindow","document","open","F","NullProtoObject","ActiveXObject","error","domain","length","module","exports","create","O","Properties","result","undefined","f"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/core-js/internals/object-create.js"],"sourcesContent":["/* global ActiveXObject -- old IE, WSH */\nva
|