/usr/share/javascript/es5-shim/es5-sham.min.js is in libjs-es5-shim 4.5.9-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 | (function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define(factory)}else if(typeof exports==="object"){module.exports=factory()}else{root.returnExports=factory()}})(this,function(){var call=Function.call;var prototypeOfObject=Object.prototype;var owns=call.bind(prototypeOfObject.hasOwnProperty);var isEnumerable=call.bind(prototypeOfObject.propertyIsEnumerable);var toStr=call.bind(prototypeOfObject.toString);var defineGetter;var defineSetter;var lookupGetter;var lookupSetter;var supportsAccessors=owns(prototypeOfObject,"__defineGetter__");if(supportsAccessors){defineGetter=call.bind(prototypeOfObject.__defineGetter__);defineSetter=call.bind(prototypeOfObject.__defineSetter__);lookupGetter=call.bind(prototypeOfObject.__lookupGetter__);lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)}var isPrimitive=function isPrimitive(o){return o==null||typeof o!=="object"&&typeof o!=="function"};if(!Object.getPrototypeOf){Object.getPrototypeOf=function getPrototypeOf(object){var proto=object.__proto__;if(proto||proto===null){return proto}else if(toStr(object.constructor)==="[object Function]"){return object.constructor.prototype}else if(object instanceof Object){return prototypeOfObject}else{return null}}}var doesGetOwnPropertyDescriptorWork=function doesGetOwnPropertyDescriptorWork(object){try{object.sentinel=0;return Object.getOwnPropertyDescriptor(object,"sentinel").value===0}catch(exception){return false}};if(Object.defineProperty){var getOwnPropertyDescriptorWorksOnObject=doesGetOwnPropertyDescriptorWork({});var getOwnPropertyDescriptorWorksOnDom=typeof document==="undefined"||doesGetOwnPropertyDescriptorWork(document.createElement("div"));if(!getOwnPropertyDescriptorWorksOnDom||!getOwnPropertyDescriptorWorksOnObject){var getOwnPropertyDescriptorFallback=Object.getOwnPropertyDescriptor}}if(!Object.getOwnPropertyDescriptor||getOwnPropertyDescriptorFallback){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function getOwnPropertyDescriptor(object,property){if(isPrimitive(object)){throw new TypeError(ERR_NON_OBJECT+object)}if(getOwnPropertyDescriptorFallback){try{return getOwnPropertyDescriptorFallback.call(Object,object,property)}catch(exception){}}var descriptor;if(!owns(object,property)){return descriptor}descriptor={enumerable:isEnumerable(object,property),configurable:true};if(supportsAccessors){var prototype=object.__proto__;var notPrototypeOfObject=object!==prototypeOfObject;if(notPrototypeOfObject){object.__proto__=prototypeOfObject}var getter=lookupGetter(object,property);var setter=lookupSetter(object,property);if(notPrototypeOfObject){object.__proto__=prototype}if(getter||setter){if(getter){descriptor.get=getter}if(setter){descriptor.set=setter}return descriptor}}descriptor.value=object[property];descriptor.writable=true;return descriptor}}if(!Object.getOwnPropertyNames){Object.getOwnPropertyNames=function getOwnPropertyNames(object){return Object.keys(object)}}if(!Object.create){var createEmpty;var supportsProto=!({__proto__:null}instanceof Object);var shouldUseActiveX=function shouldUseActiveX(){if(!document.domain){return false}try{return!!new ActiveXObject("htmlfile")}catch(exception){return false}};var getEmptyViaActiveX=function getEmptyViaActiveX(){var empty;var xDoc;xDoc=new ActiveXObject("htmlfile");var script="script";xDoc.write("<"+script+"></"+script+">");xDoc.close();empty=xDoc.parentWindow.Object.prototype;xDoc=null;return empty};var getEmptyViaIFrame=function getEmptyViaIFrame(){var iframe=document.createElement("iframe");var parent=document.body||document.documentElement;var empty;iframe.style.display="none";parent.appendChild(iframe);iframe.src="javascript:";empty=iframe.contentWindow.Object.prototype;parent.removeChild(iframe);iframe=null;return empty};if(supportsProto||typeof document==="undefined"){createEmpty=function(){return{__proto__:null}}}else{createEmpty=function(){var empty=shouldUseActiveX()?getEmptyViaActiveX():getEmptyViaIFrame();delete empty.constructor;delete empty.hasOwnProperty;delete empty.propertyIsEnumerable;delete empty.isPrototypeOf;delete empty.toLocaleString;delete empty.toString;delete empty.valueOf;var Empty=function Empty(){};Empty.prototype=empty;createEmpty=function(){return new Empty};return new Empty}}Object.create=function create(prototype,properties){var object;var Type=function Type(){};if(prototype===null){object=createEmpty()}else{if(prototype!==null&&isPrimitive(prototype)){throw new TypeError("Object prototype may only be an Object or null")}Type.prototype=prototype;object=new Type;object.__proto__=prototype}if(properties!==void 0){Object.defineProperties(object,properties)}return object}}var doesDefinePropertyWork=function doesDefinePropertyWork(object){try{Object.defineProperty(object,"sentinel",{});return"sentinel"in object}catch(exception){return false}};if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({});var definePropertyWorksOnDom=typeof document==="undefined"||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom){var definePropertyFallback=Object.defineProperty,definePropertiesFallback=Object.defineProperties}}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ";var ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ";var ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function defineProperty(object,property,descriptor){if(isPrimitive(object)){throw new TypeError(ERR_NON_OBJECT_TARGET+object)}if(isPrimitive(descriptor)){throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor)}if(definePropertyFallback){try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}}if("value"in descriptor){if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject;delete object[property];object[property]=descriptor.value;object.__proto__=prototype}else{object[property]=descriptor.value}}else{var hasGetter="get"in descriptor;var hasSetter="set"in descriptor;if(!supportsAccessors&&(hasGetter||hasSetter)){throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED)}if(hasGetter){defineGetter(object,property,descriptor.get)}if(hasSetter){defineSetter(object,property,descriptor.set)}}return object}}if(!Object.defineProperties||definePropertiesFallback){Object.defineProperties=function defineProperties(object,properties){if(definePropertiesFallback){try{return definePropertiesFallback.call(Object,object,properties)}catch(exception){}}Object.keys(properties).forEach(function(property){if(property!=="__proto__"){Object.defineProperty(object,property,properties[property])}});return object}}if(!Object.seal){Object.seal=function seal(object){if(Object(object)!==object){throw new TypeError("Object.seal can only be called on Objects.")}return object}}if(!Object.freeze){Object.freeze=function freeze(object){if(Object(object)!==object){throw new TypeError("Object.freeze can only be called on Objects.")}return object}}try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function freeze(object){if(typeof object==="function"){return object}else{return freezeObject(object)}}}(Object.freeze)}if(!Object.preventExtensions){Object.preventExtensions=function preventExtensions(object){if(Object(object)!==object){throw new TypeError("Object.preventExtensions can only be called on Objects.")}return object}}if(!Object.isSealed){Object.isSealed=function isSealed(object){if(Object(object)!==object){throw new TypeError("Object.isSealed can only be called on Objects.")}return false}}if(!Object.isFrozen){Object.isFrozen=function isFrozen(object){if(Object(object)!==object){throw new TypeError("Object.isFrozen can only be called on Objects.")}return false}}if(!Object.isExtensible){Object.isExtensible=function isExtensible(object){if(Object(object)!==object){throw new TypeError("Object.isExtensible can only be called on Objects.")}var name="";while(owns(object,name)){name+="?"}object[name]=true;var returnValue=owns(object,name);delete object[name];return returnValue}}});
|