Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ses

Package Overview
Dependencies
Maintainers
3
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ses - npm Package Compare versions

Comparing version 0.11.0 to 0.11.1

src/get-source-url.js

2

dist/lockdown.umd.min.js

@@ -1,1 +0,1 @@

!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";const{assign:t,create:e,defineProperties:r,entries:o,freeze:n,getOwnPropertyDescriptor:a,getOwnPropertyDescriptors:i,getOwnPropertyNames:s,getPrototypeOf:c,is:p,isExtensible:l,keys:u,prototype:y,seal:f,setPrototypeOf:g,values:d}=Object,m=Object.fromEntries||(t=>{const e={};for(const[r,o]of t)e[r]=o;return e}),h=(t,e,o)=>r(t,{[e]:o}),{apply:P,construct:b,get:S,set:w}=Reflect,{isArray:E,prototype:T}=Array,{revocable:I}=Proxy,{prototype:v}=RegExp,{prototype:A}=String,{prototype:k}=WeakMap,F=t=>(e,...r)=>P(t,e,r),x=F(y.hasOwnProperty),U=(F(T.filter),F(T.join)),_=(F(T.push),F(T.pop)),R=F(T.includes),O=F(v.test),M=(F(A.match),F(A.search)),C=F(A.slice),$=F(A.split),N=(F(k.get),F(k.set),F(k.has),n({__proto__:null}));let G;function L(){if(void 0===G){const t=new WeakSet,e=Function.prototype.toString,r={toString(){const r=P(e,this,[]);return r.endsWith(") { [native code] }")||!t.has(this)?r:`function ${this.name}() { [native code] }`}};h(Function.prototype,"toString",{value:r.toString}),G=n(e=>t.add(e))}return G}const j={Infinity:1/0,NaN:NaN,undefined:void 0},B={isFinite:"isFinite",isNaN:"isNaN",parseFloat:"parseFloat",parseInt:"parseInt",decodeURI:"decodeURI",decodeURIComponent:"decodeURIComponent",encodeURI:"encodeURI",encodeURIComponent:"encodeURIComponent",Array:"Array",ArrayBuffer:"ArrayBuffer",BigInt:"BigInt",BigInt64Array:"BigInt64Array",BigUint64Array:"BigUint64Array",Boolean:"Boolean",DataView:"DataView",EvalError:"EvalError",Float32Array:"Float32Array",Float64Array:"Float64Array",Int8Array:"Int8Array",Int16Array:"Int16Array",Int32Array:"Int32Array",Map:"Map",Number:"Number",Object:"Object",Promise:"Promise",Proxy:"Proxy",RangeError:"RangeError",ReferenceError:"ReferenceError",Set:"Set",String:"String",Symbol:"Symbol",SyntaxError:"SyntaxError",TypeError:"TypeError",Uint8Array:"Uint8Array",Uint8ClampedArray:"Uint8ClampedArray",Uint16Array:"Uint16Array",Uint32Array:"Uint32Array",URIError:"URIError",WeakMap:"WeakMap",WeakSet:"WeakSet",JSON:"JSON",Reflect:"Reflect",escape:"escape",unescape:"unescape",lockdown:"lockdown",harden:"harden",HandledPromise:"HandledPromise",StaticModuleRecord:"StaticModuleRecord"},D={Date:"%InitialDate%",Error:"%InitialError%",RegExp:"%InitialRegExp%",Math:"%InitialMath%",getStackString:"%InitialGetStackString%"},W={Date:"%SharedDate%",Error:"%SharedError%",RegExp:"%SharedRegExp%",Math:"%SharedMath%"},z=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError],V={"[[Proto]]":"%FunctionPrototype%",length:"number",name:"string"},Y=V,q={get:Y,set:"undefined"},H={get:Y,set:Y};function J(t){return t===q||t===H}function K(t){return{"[[Proto]]":"%SharedError%",prototype:t}}function Q(t){return{"[[Proto]]":"%ErrorPrototype%",constructor:t,message:"string",name:"string",toString:!1}}function X(t){return{"[[Proto]]":"%TypedArray%",BYTES_PER_ELEMENT:"number",prototype:t}}function Z(t){return{"[[Proto]]":"%TypedArrayPrototype%",BYTES_PER_ELEMENT:"number",constructor:t}}const tt={E:"number",LN10:"number",LN2:"number",LOG10E:"number",LOG2E:"number",PI:"number",SQRT1_2:"number",SQRT2:"number","@@toStringTag":"string",abs:Y,acos:Y,acosh:Y,asin:Y,asinh:Y,atan:Y,atanh:Y,atan2:Y,cbrt:Y,ceil:Y,clz32:Y,cos:Y,cosh:Y,exp:Y,expm1:Y,floor:Y,fround:Y,hypot:Y,imul:Y,log:Y,log1p:Y,log10:Y,log2:Y,max:Y,min:Y,pow:Y,round:Y,sign:Y,sin:Y,sinh:Y,sqrt:Y,tan:Y,tanh:Y,trunc:Y},et={"[[Proto]]":null,"%ThrowTypeError%":Y,Infinity:"number",NaN:"number",undefined:"undefined","%UniqueEval%":Y,isFinite:Y,isNaN:Y,parseFloat:Y,parseInt:Y,decodeURI:Y,decodeURIComponent:Y,encodeURI:Y,encodeURIComponent:Y,Object:{"[[Proto]]":"%FunctionPrototype%",assign:Y,create:Y,defineProperties:Y,defineProperty:Y,entries:Y,freeze:Y,fromEntries:Y,getOwnPropertyDescriptor:Y,getOwnPropertyDescriptors:Y,getOwnPropertyNames:Y,getOwnPropertySymbols:Y,getPrototypeOf:Y,is:Y,isExtensible:Y,isFrozen:Y,isSealed:Y,keys:Y,preventExtensions:Y,prototype:"%ObjectPrototype%",seal:Y,setPrototypeOf:Y,values:Y},"%ObjectPrototype%":{"[[Proto]]":null,constructor:"Object",hasOwnProperty:Y,isPrototypeOf:Y,propertyIsEnumerable:Y,toLocaleString:Y,toString:Y,valueOf:Y,"--proto--":H,__defineGetter__:Y,__defineSetter__:Y,__lookupGetter__:Y,__lookupSetter__:Y},"%UniqueFunction%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%FunctionPrototype%"},"%InertFunction%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%FunctionPrototype%"},"%FunctionPrototype%":{apply:Y,bind:Y,call:Y,constructor:"%InertFunction%",toString:Y,"@@hasInstance":Y,caller:!1,arguments:!1},Boolean:{"[[Proto]]":"%FunctionPrototype%",prototype:"%BooleanPrototype%"},"%BooleanPrototype%":{constructor:"Boolean",toString:Y,valueOf:Y},Symbol:{"[[Proto]]":"%FunctionPrototype%",asyncIterator:"symbol",for:Y,hasInstance:"symbol",isConcatSpreadable:"symbol",iterator:"symbol",keyFor:Y,match:"symbol",matchAll:"symbol",prototype:"%SymbolPrototype%",replace:"symbol",search:"symbol",species:"symbol",split:"symbol",toPrimitive:"symbol",toStringTag:"symbol",unscopables:"symbol"},"%SymbolPrototype%":{constructor:"Symbol",description:q,toString:Y,valueOf:Y,"@@toPrimitive":Y,"@@toStringTag":"string"},"%InitialError%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%ErrorPrototype%",captureStackTrace:Y,stackTraceLimit:H,prepareStackTrace:H},"%SharedError%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%ErrorPrototype%",captureStackTrace:Y,stackTraceLimit:H,prepareStackTrace:H},"%ErrorPrototype%":{constructor:"%SharedError%",message:"string",name:"string",toString:Y},EvalError:K("%EvalErrorPrototype%"),RangeError:K("%RangeErrorPrototype%"),ReferenceError:K("%ReferenceErrorPrototype%"),SyntaxError:K("%SyntaxErrorPrototype%"),TypeError:K("%TypeErrorPrototype%"),URIError:K("%URIErrorPrototype%"),"%EvalErrorPrototype%":Q("EvalError"),"%RangeErrorPrototype%":Q("RangeError"),"%ReferenceErrorPrototype%":Q("ReferenceError"),"%SyntaxErrorPrototype%":Q("SyntaxError"),"%TypeErrorPrototype%":Q("TypeError"),"%URIErrorPrototype%":Q("URIError"),Number:{"[[Proto]]":"%FunctionPrototype%",EPSILON:"number",isFinite:Y,isInteger:Y,isNaN:Y,isSafeInteger:Y,MAX_SAFE_INTEGER:"number",MAX_VALUE:"number",MIN_SAFE_INTEGER:"number",MIN_VALUE:"number",NaN:"number",NEGATIVE_INFINITY:"number",parseFloat:Y,parseInt:Y,POSITIVE_INFINITY:"number",prototype:"%NumberPrototype%"},"%NumberPrototype%":{constructor:"Number",toExponential:Y,toFixed:Y,toLocaleString:Y,toPrecision:Y,toString:Y,valueOf:Y},BigInt:{"[[Proto]]":"%FunctionPrototype%",asIntN:Y,asUintN:Y,prototype:"%BigIntPrototype%"},"%BigIntPrototype%":{constructor:"BigInt",toLocaleString:Y,toString:Y,valueOf:Y,"@@toStringTag":"string"},"%InitialMath%":{...tt,random:Y},"%SharedMath%":tt,"%InitialDate%":{"[[Proto]]":"%FunctionPrototype%",now:Y,parse:Y,prototype:"%DatePrototype%",UTC:Y},"%SharedDate%":{"[[Proto]]":"%FunctionPrototype%",now:Y,parse:Y,prototype:"%DatePrototype%",UTC:Y},"%DatePrototype%":{constructor:"%SharedDate%",getDate:Y,getDay:Y,getFullYear:Y,getHours:Y,getMilliseconds:Y,getMinutes:Y,getMonth:Y,getSeconds:Y,getTime:Y,getTimezoneOffset:Y,getUTCDate:Y,getUTCDay:Y,getUTCFullYear:Y,getUTCHours:Y,getUTCMilliseconds:Y,getUTCMinutes:Y,getUTCMonth:Y,getUTCSeconds:Y,setDate:Y,setFullYear:Y,setHours:Y,setMilliseconds:Y,setMinutes:Y,setMonth:Y,setSeconds:Y,setTime:Y,setUTCDate:Y,setUTCFullYear:Y,setUTCHours:Y,setUTCMilliseconds:Y,setUTCMinutes:Y,setUTCMonth:Y,setUTCSeconds:Y,toDateString:Y,toISOString:Y,toJSON:Y,toLocaleDateString:Y,toLocaleString:Y,toLocaleTimeString:Y,toString:Y,toTimeString:Y,toUTCString:Y,valueOf:Y,"@@toPrimitive":Y,getYear:Y,setYear:Y,toGMTString:Y},String:{"[[Proto]]":"%FunctionPrototype%",fromCharCode:Y,fromCodePoint:Y,prototype:"%StringPrototype%",raw:Y},"%StringPrototype%":{length:"number",charAt:Y,charCodeAt:Y,codePointAt:Y,concat:Y,constructor:"String",endsWith:Y,includes:Y,indexOf:Y,lastIndexOf:Y,localeCompare:Y,match:Y,matchAll:Y,normalize:Y,padEnd:Y,padStart:Y,repeat:Y,replace:Y,search:Y,slice:Y,split:Y,startsWith:Y,substring:Y,toLocaleLowerCase:Y,toLocaleUpperCase:Y,toLowerCase:Y,toString:Y,toUpperCase:Y,trim:Y,trimEnd:Y,trimStart:Y,valueOf:Y,"@@iterator":Y,substr:Y,anchor:Y,big:Y,blink:Y,bold:Y,fixed:Y,fontcolor:Y,fontsize:Y,italics:Y,link:Y,small:Y,strike:Y,sub:Y,sup:Y,trimLeft:Y,trimRight:Y},"%StringIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:Y,"@@toStringTag":"string"},"%InitialRegExp%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%RegExpPrototype%","@@species":q,input:!1,$_:!1,lastMatch:!1,"$&":!1,lastParen:!1,"$+":!1,leftContext:!1,"$`":!1,rightContext:!1,"$'":!1,$1:!1,$2:!1,$3:!1,$4:!1,$5:!1,$6:!1,$7:!1,$8:!1,$9:!1},"%SharedRegExp%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%RegExpPrototype%","@@species":q},"%RegExpPrototype%":{constructor:"%SharedRegExp%",exec:Y,dotAll:q,flags:q,global:q,ignoreCase:q,"@@match":Y,"@@matchAll":Y,multiline:q,"@@replace":Y,"@@search":Y,source:q,"@@split":Y,sticky:q,test:Y,toString:Y,unicode:q,compile:!1},"%RegExpStringIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:Y,"@@toStringTag":"string"},Array:{"[[Proto]]":"%FunctionPrototype%",from:Y,isArray:Y,of:Y,prototype:"%ArrayPrototype%","@@species":q},"%ArrayPrototype%":{length:"number",concat:Y,constructor:"Array",copyWithin:Y,entries:Y,every:Y,fill:Y,filter:Y,find:Y,findIndex:Y,flat:Y,flatMap:Y,forEach:Y,includes:Y,indexOf:Y,join:Y,keys:Y,lastIndexOf:Y,map:Y,pop:Y,push:Y,reduce:Y,reduceRight:Y,reverse:Y,shift:Y,slice:Y,some:Y,sort:Y,splice:Y,toLocaleString:Y,toString:Y,unshift:Y,values:Y,"@@iterator":Y,"@@unscopables":{"[[Proto]]":null,copyWithin:"boolean",entries:"boolean",fill:"boolean",find:"boolean",findIndex:"boolean",flat:"boolean",flatMap:"boolean",includes:"boolean",keys:"boolean",values:"boolean"}},"%ArrayIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:Y,"@@toStringTag":"string"},"%TypedArray%":{"[[Proto]]":"%FunctionPrototype%",from:Y,of:Y,prototype:"%TypedArrayPrototype%","@@species":q},"%TypedArrayPrototype%":{buffer:q,byteLength:q,byteOffset:q,constructor:"%TypedArray%",copyWithin:Y,entries:Y,every:Y,fill:Y,filter:Y,find:Y,findIndex:Y,forEach:Y,includes:Y,indexOf:Y,join:Y,keys:Y,lastIndexOf:Y,length:q,map:Y,reduce:Y,reduceRight:Y,reverse:Y,set:Y,slice:Y,some:Y,sort:Y,subarray:Y,toLocaleString:Y,toString:Y,values:Y,"@@iterator":Y,"@@toStringTag":q},BigInt64Array:X("%BigInt64ArrayPrototype%"),BigUint64Array:X("%BigUint64ArrayPrototype%"),Float32Array:X("%Float32ArrayPrototype%"),Float64Array:X("%Float64ArrayPrototype%"),Int16Array:X("%Int16ArrayPrototype%"),Int32Array:X("%Int32ArrayPrototype%"),Int8Array:X("%Int8ArrayPrototype%"),Uint16Array:X("%Uint16ArrayPrototype%"),Uint32Array:X("%Uint32ArrayPrototype%"),Uint8Array:X("%Uint8ArrayPrototype%"),Uint8ClampedArray:X("%Uint8ClampedArrayPrototype%"),"%BigInt64ArrayPrototype%":Z("BigInt64Array"),"%BigUint64ArrayPrototype%":Z("BigUint64Array"),"%Float32ArrayPrototype%":Z("Float32Array"),"%Float64ArrayPrototype%":Z("Float64Array"),"%Int16ArrayPrototype%":Z("Int16Array"),"%Int32ArrayPrototype%":Z("Int32Array"),"%Int8ArrayPrototype%":Z("Int8Array"),"%Uint16ArrayPrototype%":Z("Uint16Array"),"%Uint32ArrayPrototype%":Z("Uint32Array"),"%Uint8ArrayPrototype%":Z("Uint8Array"),"%Uint8ClampedArrayPrototype%":Z("Uint8ClampedArray"),Map:{"[[Proto]]":"%FunctionPrototype%","@@species":q,prototype:"%MapPrototype%"},"%MapPrototype%":{clear:Y,constructor:"Map",delete:Y,entries:Y,forEach:Y,get:Y,has:Y,keys:Y,set:Y,size:q,values:Y,"@@iterator":Y,"@@toStringTag":"string"},"%MapIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:Y,"@@toStringTag":"string"},Set:{"[[Proto]]":"%FunctionPrototype%",prototype:"%SetPrototype%","@@species":q},"%SetPrototype%":{add:Y,clear:Y,constructor:"Set",delete:Y,entries:Y,forEach:Y,has:Y,keys:Y,size:q,values:Y,"@@iterator":Y,"@@toStringTag":"string"},"%SetIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:Y,"@@toStringTag":"string"},WeakMap:{"[[Proto]]":"%FunctionPrototype%",prototype:"%WeakMapPrototype%"},"%WeakMapPrototype%":{constructor:"WeakMap",delete:Y,get:Y,has:Y,set:Y,"@@toStringTag":"string"},WeakSet:{"[[Proto]]":"%FunctionPrototype%",prototype:"%WeakSetPrototype%"},"%WeakSetPrototype%":{add:Y,constructor:"WeakSet",delete:Y,has:Y,"@@toStringTag":"string"},ArrayBuffer:{"[[Proto]]":"%FunctionPrototype%",isView:Y,prototype:"%ArrayBufferPrototype%","@@species":q},"%ArrayBufferPrototype%":{byteLength:q,constructor:"ArrayBuffer",slice:Y,"@@toStringTag":"string"},SharedArrayBuffer:!1,"%SharedArrayBufferPrototype%":!1,DataView:{"[[Proto]]":"%FunctionPrototype%",prototype:"%DataViewPrototype%"},"%DataViewPrototype%":{buffer:q,byteLength:q,byteOffset:q,constructor:"DataView",getBigInt64:Y,getBigUint64:Y,getFloat32:Y,getFloat64:Y,getInt8:Y,getInt16:Y,getInt32:Y,getUint8:Y,getUint16:Y,getUint32:Y,setBigInt64:Y,setBigUint64:Y,setFloat32:Y,setFloat64:Y,setInt8:Y,setInt16:Y,setInt32:Y,setUint8:Y,setUint16:Y,setUint32:Y,"@@toStringTag":"string"},Atomics:!1,JSON:{parse:Y,stringify:Y,"@@toStringTag":"string"},"%IteratorPrototype%":{"@@iterator":Y},"%AsyncIteratorPrototype%":{"@@asyncIterator":Y},"%InertGeneratorFunction%":{"[[Proto]]":"%InertFunction%",prototype:"%Generator%"},"%Generator%":{"[[Proto]]":"%FunctionPrototype%",constructor:"%InertGeneratorFunction%",prototype:"%GeneratorPrototype%","@@toStringTag":"string"},"%InertAsyncGeneratorFunction%":{"[[Proto]]":"%InertFunction%",prototype:"%AsyncGenerator%"},"%AsyncGenerator%":{"[[Proto]]":"%FunctionPrototype%",constructor:"%InertAsyncGeneratorFunction%",prototype:"%AsyncGeneratorPrototype%","@@toStringTag":"string"},"%GeneratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",constructor:"%Generator%",next:Y,return:Y,throw:Y,"@@toStringTag":"string"},"%AsyncGeneratorPrototype%":{"[[Proto]]":"%AsyncIteratorPrototype%",constructor:"%AsyncGenerator%",next:Y,return:Y,throw:Y,"@@toStringTag":"string"},HandledPromise:{"[[Proto]]":"Promise",applyFunction:Y,applyFunctionSendOnly:Y,applyMethod:Y,applyMethodSendOnly:Y,get:Y,getSendOnly:Y,prototype:"%PromisePrototype%",resolve:Y},Promise:{"[[Proto]]":"%FunctionPrototype%",all:Y,allSettled:Y,prototype:"%PromisePrototype%",race:Y,reject:Y,resolve:Y,"@@species":q},"%PromisePrototype%":{catch:Y,constructor:"Promise",finally:Y,then:Y,"@@toStringTag":"string"},"%InertAsyncFunction%":{"[[Proto]]":"%InertFunction%",prototype:"%AsyncFunctionPrototype%"},"%AsyncFunctionPrototype%":{"[[Proto]]":"%FunctionPrototype%",constructor:"%InertAsyncFunction%","@@toStringTag":"string"},Reflect:{apply:Y,construct:Y,defineProperty:Y,deleteProperty:Y,get:Y,getOwnPropertyDescriptor:Y,getPrototypeOf:Y,has:Y,isExtensible:Y,ownKeys:Y,preventExtensions:Y,set:Y,setPrototypeOf:Y},Proxy:{"[[Proto]]":"%FunctionPrototype%",revocable:Y},escape:Y,unescape:Y,"%UniqueCompartment%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%CompartmentPrototype%",toString:Y},"%InertCompartment%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%CompartmentPrototype%",toString:Y},"%CompartmentPrototype%":{constructor:"%InertCompartment%",evaluate:Y,globalThis:q,name:q,toString:Y},lockdown:Y,harden:Y,"%InitialGetStackString%":Y};function rt(t,e,r){if(x(t,e)){const o=a(t,e);if(!Object.is(o.value,r.value)||o.get!==r.get||o.set!==r.set||o.writable!==r.writable||o.enumerable!==r.enumerable||o.configurable!==r.configurable)throw new Error("Conflicting definitions of "+e)}h(t,e,r)}function ot(t,e){const r={__proto__:null};for(const[n,a]of o(e))x(t,n)&&(r[a]=t[n]);return r}function nt(){const t={__proto__:null};let e;const r={addIntrinsics(e){!function(t,e){for(const[r,n]of o(e))rt(t,r,n)}(t,i(e))},completePrototypes(){for(const[e,r]of o(t)){if(r!==Object(r))continue;if(!x(r,"prototype"))continue;const o=et[e];if("object"!=typeof o)throw new Error("Expected permit object at whitelist."+e);const n=o.prototype;if(!n)throw new Error(e+".prototype property not whitelisted");if("string"!=typeof n||!x(et,n))throw new Error(`Unrecognized ${e}.prototype whitelist entry`);const a=r.prototype;if(x(t,n)){if(t[n]!==a)throw new Error("Conflicting bindings of "+n)}else t[n]=a}},finalIntrinsics:()=>(n(t),e=new WeakSet(d(t).filter(t=>"function"==typeof t)),t),isPseudoNative(t){if(!e)throw new Error("isPseudoNative can only be called after finalIntrinsics");return e.has(t)}};return r.addIntrinsics(j),r.addIntrinsics(ot(globalThis,B)),r}const at=function(t={},e={},r={}){throw new TypeError("Not available")};function it(t){return c(t).constructor}const{freeze:st,getOwnPropertyDescriptors:ct,getPrototypeOf:pt}=Object,{ownKeys:lt}=Reflect;const{apply:ut,ownKeys:yt}=Reflect,ft=(t=>(e,...r)=>ut(t,e,r))(Object.prototype.hasOwnProperty);function gt(t,e){if("string"==typeof e)return e;if("symbol"==typeof e)return"@@"+e.toString().slice(14,-1);throw new TypeError(`Unexpected property name type ${t} ${e}`)}function dt(t,e){const r=["undefined","boolean","number","string","symbol"];function o(e,o,n,a){if("object"==typeof a)return s(e,o,a),!0;if(!1===a)return!1;if("string"==typeof a)if("prototype"===n||"constructor"===n){if(ft(t,a)){if(o!==t[a])throw new TypeError("Does not match whitelist "+e);return!0}}else if(r.includes(a)){if(typeof o!==a)throw new TypeError(`At ${e} expected ${a} not ${typeof o}`);return!0}throw new TypeError(`Unexpected whitelist permit ${a} at ${e}`)}function n(t,e,r,n){const i=a(e,r);if(ft(i,"value")){if(J(n))throw new TypeError("Accessor expected at "+t);return o(t,i.value,r,n)}if(!J(n))throw new TypeError("Accessor not expected at "+t);return o(t+"<get>",i.get,r,n.get)&&o(t+"<set>",i.set,r,n.set)}function i(t,r,o){const n="__proto__"===o?"--proto--":o;return ft(r,n)?r[n]:"function"==typeof t&&(e(t),ft(V,n))?V[n]:void 0}function s(e,r,o){if(void 0===r)return;!function(e,r,o){if(r!==Object(r))throw new TypeError(`Object expected: ${e}, ${r}, ${o}`);const n=c(r);if(null!==n||null!==o){if(void 0!==o&&"string"!=typeof o)throw new TypeError(`Malformed whitelist permit ${e}.__proto__`);if(n!==t[o||"%ObjectPrototype%"])throw new Error(`Unexpected intrinsic ${e}.__proto__ at ${o}`)}}(e,r,o["[[Proto]]"]);for(const t of yt(r)){const a=gt(e,t),s=`${e}.${a}`,c=i(r,o,a);c&&n(s,r,t,c)||(!1!==c&&console.log("Removing "+s),delete r[t])}}s("intrinsics",t,et)}var mt={"%ObjectPrototype%":"*","%ArrayPrototype%":"*","%FunctionPrototype%":{constructor:!0,bind:!0,name:!0,toString:!0},"%ErrorPrototype%":{constructor:!0,message:!0,name:!0,toString:!0},"%TypeErrorPrototype%":{constructor:!0,message:!0,name:!0},"%SyntaxErrorPrototype%":{message:!0},"%RangeErrorPrototype%":{message:!0},"%URIErrorPrototype%":{message:!0},"%EvalErrorPrototype%":{message:!0},"%ReferenceErrorPrototype%":{message:!0},"%PromisePrototype%":{constructor:!0},"%TypedArrayPrototype%":"*","%Generator%":{constructor:!0,name:!0,toString:!0},"%IteratorPrototype%":"*"};const{ownKeys:ht}=Reflect;function Pt(t){return null!==t&&"object"==typeof t}const bt=t=>(t=""+t).length>=1&&"aeiouAEIOU".includes(t[0])?"an "+t:"a "+t;n(bt);const St=t=>{const e=new Set;return JSON.stringify(t,(t,r)=>{if("object"==typeof r&&null!==r){if(e.has(r))return"<**seen**>";e.add(r)}return r})};n(St);const wt=new WeakMap,Et=t=>{const e=n({toString:n(()=>St(t))});return wt.set(e,t),e};n(Et);const Tt=new WeakMap,It=(t,...e)=>{const r=n({__proto__:null});return Tt.set(r,{template:t,args:e}),r};n(It);const vt=({template:t,args:e})=>{const r=[t[0]];for(let o=0;o<e.length;o+=1){let n=e[o];wt.has(n)&&(n=wt.get(n));const a=(r.pop()||"").replace(/ $/,"");""!==a&&r.push(a);const i=t[o+1].replace(/^ /,"");r.push(n,i)}return""===r[r.length-1]&&r.pop(),r},At=new WeakMap,kt=(t,e)=>{const r=new e((({template:t,args:e})=>{const r=[t[0]];for(let o=0;o<e.length;o+=1){const n=e[o];let a;a=wt.has(n)?""+n:n instanceof Error?`(${bt(n.name)})`:`(${bt(typeof n)})`,r.push(a,t[o+1])}return r.join("")})(t));return At.set(r,vt(t)),r},Ft=new WeakMap,xt=new WeakMap,Ut=(t,e)=>{"string"==typeof e&&(e=It([e]));const r=Tt.get(e);if(void 0===r)throw new Error("unrecognized details "+e);const o=vt(r),n=xt.get(t);if(void 0!==n)for(const e of n)e(t,o);else{const e=Ft.get(t);void 0!==e?e.push(o):Ft.set(t,[o])}};n(Ut);const _t={getStackString:globalThis.getStackString||(t=>{if(!("stack"in t))return"";const e=""+t.stack,r=e.indexOf("\n");return e.startsWith(" ")||-1===r?e:e.slice(r+1)}),takeMessageLogArgs:t=>{const e=At.get(t);return At.delete(t),e},takeNoteLogArgsArray:(t,e)=>{const r=Ft.get(t);if(Ft.delete(t),void 0!==e){const r=xt.get(t);r?r.push(e):xt.set(t,[e])}return r||[]}};n(_t);const Rt=e=>{const r=(t=It`Assert failed`,r=Error)=>{"string"==typeof t&&(t=It([t]));const o=Tt.get(t);if(void 0===o)throw new Error("unrecognized details "+t);const n=kt(o,r);throw void 0!==e&&e(n),n};function o(t,e=It`Check failed`,o=Error){if(!t)throw r(e,o)}n(r);const a=(t,e,r=It`Expected ${t} is same as ${e}`,n=RangeError)=>{o(p(t,e),r,n)};n(a);const i=(t,e,r)=>{o("string"==typeof e,It`${Et(e)} must be a string`),void 0===r&&(r=It([""," must be "+bt(e)],t)),a(typeof t,e,r,TypeError)};n(i);const s=t(o,{fail:r,equal:a,typeof:i,string:(t,e)=>i(t,"string",e),note:Ut,details:It,quote:Et});return n(s)};n(Rt);const Ot=Rt(),{details:Mt,quote:Ct}=Ot,$t=/^(\w*[a-z])Locale([A-Z]\w*)$/,Nt={localeCompare(t){if(null==this)throw new TypeError('Cannot localeCompare with null or undefined "this" value');const e=""+this;return e<(t=""+t)?-1:e>t?1:(Ot(e===t,Mt`expected ${Ct(e)} and ${Ct(t)} to compare`),0)}}.localeCompare;const Gt=["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","let","static","enum","implements","package","protected","interface","private","public","await","null","true","false","this","arguments"],Lt=new RegExp("^[a-zA-Z_$][\\w$]*$");function jt(t){return"eval"!==t&&!R(Gt,t)&&O(Lt,t)}function Bt(t,e){const r=a(t,e);return!1===r.configurable&&!1===r.writable&&x(r,"value")}const{details:Dt,quote:Wt}=Ot,zt=eval,Vt=new Proxy(N,{get(t,e){Ot.fail(Dt`Please report unexpected scope handler trap: ${Wt(String(e))}`)}});function Yt(t,e){const r=M(t,e);return r<0?-1:$(C(t,0,r),"\n").length}const qt=new RegExp("(?:\x3c!--|--\x3e)");const Ht=new RegExp("\\bimport\\s*(?:\\(|/[/*])");const Jt=new RegExp("\\beval\\s*(?:\\(|/[/*])");function Kt(t){return t=function(t){const e=Yt(t,Jt);if(e<0)return t;throw new SyntaxError("possible direct eval expression rejected around line "+e)}(t=function(t){const e=Yt(t,Ht);if(e<0)return t;throw new SyntaxError("possible import expression rejected around line "+e)}(t=function(t){const e=Yt(t,qt);if(e<0)return t;throw new SyntaxError("possible html comment syntax rejected around line "+e)}(t)))}const Qt=Function;function Xt(t=[]){const e=function(t){return 0===t.length?"":`const {${U(t,",")}} = this;`}(t);return Qt(`\n with (this) {\n ${e}\n return function() {\n 'use strict';\n return eval(arguments[0]);\n };\n }\n `)}const{details:Zt}=Ot;function te(t,e,r={},{localTransforms:o=[],globalTransforms:n=[],sloppyGlobalsMode:i=!1}={}){t=function(t,e){for(const r of e)t=r(t);return t}(t,[...o,...n,Kt]);const c=function(t,e={},{sloppyGlobalsMode:r=!1}={}){return{__proto__:Vt,useUnsafeEvaluator:!1,get(r,o){if("symbol"!=typeof o)return"eval"===o&&!0===this.useUnsafeEvaluator?(this.useUnsafeEvaluator=!1,zt):o in e?S(e,o,t):S(t,o)},set(r,o,n){if(o in e){return"value"in a(e,o)?w(e,o,n):w(e,o,n,t)}return w(t,o,n)},has:(o,n)=>!!(r||"eval"===n||n in e||n in t||n in globalThis),getPrototypeOf:()=>null,getOwnPropertyDescriptor(t,e){const r=JSON.stringify(String(e));console.warn("getOwnPropertyDescriptor trap on scopeHandler for "+r,(new Error).stack)}}}(e,r,{sloppyGlobalsMode:i}),p=I(N,c),l=Xt(function(t,e={}){const r=s(t),o=s(e),n=o.filter(t=>jt(t)&&Bt(e,t));return[...r.filter(e=>!o.includes(e)&&jt(e)&&Bt(t,e)),...n]}(e,r)),u=P(l,p.proxy,[]);let y;c.useUnsafeEvaluator=!0;try{return P(u,e,[t])}catch(t){throw y=t,t}finally{!0===c.useUnsafeEvaluator&&(p.revoke(),Ot.fail(Zt`handler did not revoke useUnsafeEvaluator ${y}`))}}const ee=(t,e={})=>r=>"string"!=typeof r?r:te(r,t,{},e),re=Function;function oe(t,e={}){const o=function(r){const o=""+(_(arguments)||""),n=""+U(arguments,",");new re(n,o);const a=`(function anonymous(${n}\n) {\n${o}\n})`;return te(a,t,{},e)};return r(o,{prototype:{value:Function.prototype,writable:!1,enumerable:!1,configurable:!1}}),Ot(c(Function)===Function.prototype,"Function prototype is the same accross compartments"),Ot(c(o)===Function.prototype,"Function constructor prototype is the same accross compartments"),o}function ne(t,e,r,n,a,{globalTransforms:i,nativeBrander:s}){for(const[e,r]of o(j))h(t,e,{value:r,writable:!1,enumerable:!1,configurable:!1});for(const[r,n]of o(B))x(e,n)&&h(t,r,{value:e[n],writable:!0,enumerable:!1,configurable:!0});for(const[n,a]of o(r))x(e,a)&&h(t,n,{value:e[a],writable:!0,enumerable:!1,configurable:!0});const c={globalThis:t,eval:ee(t,{globalTransforms:i}),Function:oe(t,{globalTransforms:i})};c.Compartment=n(n,e,s);for(const[e,r]of o(c))h(t,e,{value:r,writable:!0,enumerable:!1,configurable:!0}),"function"==typeof r&&s(r)}const ae=n([["debug","debug"],["log","log"],["info","info"],["warn","warn"],["error","error"],["trace","log"],["dirxml","log"],["group","log"],["groupCollapsed","log"]]),ie=n([["assert","error"],["timeLog","log"],["clear",void 0],["count","info"],["countReset",void 0],["dir","log"],["groupEnd","log"],["table","log"],["time","info"],["timeEnd","info"],["profile",void 0],["profileEnd",void 0],["timeStamp",void 0]]),se=n([...ae,...ie]);n(()=>{let t=[];const e=m(se.map(([e,r])=>{const o=(...r)=>{t.push([e,...r])};return h(o,"name",{value:e}),[e,n(o)]}));n(e);const r=()=>{const e=n(t);return t=[],e};n(r);return n({loggingConsole:e,takeLog:r})});const ce={NOTE:"ERROR_NOTE:",MESSAGE:"ERROR_MESSAGE:"};n(ce);const pe=(t,e)=>{const{getStackString:r,takeMessageLogArgs:o,takeNoteLogArgsArray:a}=e;let i=0;const s=new WeakMap,c=t=>{let e;return s.has(t)?e=s.get(t):(i+=1,s.set(t,i),e=i),`${t.name}#${e}`},p=(t,e)=>t.map(t=>t instanceof Error?(e.push(t),`(${c(t)})`):t),l=(e,r,o,n)=>{const a=c(e),i=r===ce.MESSAGE?a+":":`${a} ${r}`,s=p(o,n);t.debug(i,...s)},u=(e,r)=>{if(r.length>=1){t.groupCollapsed(e);try{for(const t of r)g(t)}finally{t.groupEnd()}}},y=new WeakSet,f=(t,e)=>{const r=[];l(t,ce.NOTE,e,r),u(c(t),r)},g=e=>{if(y.has(e))return;const n=c(e);y.add(e);const i=[],s=o(e),p=a(e,f);void 0===s?t.debug(n+":",e.message):l(e,ce.MESSAGE,s,i);let g=r(e);"string"==typeof g&&g.length>=1&&!g.endsWith("\n")&&(g+="\n"),t.debug("",g);for(const t of p)l(e,ce.NOTE,t,i);u(n,i)},d=ae.map(([e,r])=>{const o=(...r)=>{const o=[],n=p(r,o);t[e](...n),u("",o)};return h(o,"name",{value:e}),[e,n(o)]}),P=ie.filter(([e,r])=>e in t).map(([e,r])=>{const o=(...r)=>{t[e](...r)};return h(o,"name",{value:e}),[e,n(o)]}),b=m([...d,...P]);return n(b)};n(pe);n((t,e,r)=>{const o=se.filter(([e,r])=>e in t).map(([r,o])=>[r,n((...n)=>{(void 0===o||e.canLog(o))&&t[r](...n)})]),a=m(o);return n(a)});const le=console,ue=["getTypeName","getFunctionName","getMethodName","getFileName","getLineNumber","getColumnNumber","getEvalOrigin","isToplevel","isEval","isNative","isConstructor","isAsync","getPosition","getScriptNameOrSourceURL","toString"],ye=t=>{const e=m(ue.map(e=>[e,()=>t[e]()]));return Object.create(e,{})},fe=t=>!0,ge=t=>"\n at "+t,de=(t,e)=>[...e.filter(fe).map(ge)].join("");function me(t,e,o){const n=new WeakMap,a={captureStackTrace(e,r=a.captureStackTrace){"function"!=typeof t.captureStackTrace?Reflect.set(e,"stack",""):t.captureStackTrace(e,r)},getStackString(t){n.has(t)||t.stack;const e=n.get(t);return e?de(0,e):""},prepareStackTrace(t,e){if(n.set(t,e),"unsafe"===o){return`${t}${de(0,e)}`}return""}},i=a.prepareStackTrace;t.prepareStackTrace=i;const s=new WeakSet([i]),c=t=>{if(s.has(t))return t;const e={prepareStackTrace:(e,r)=>(n.set(e,r),t(e,(t=>t.map(ye))(r)))};return s.add(e.prepareStackTrace),e.prepareStackTrace};return r(e,{captureStackTrace:{value:a.captureStackTrace,writable:!0,enumerable:!1,configurable:!0},stackTraceLimit:{get(){if("number"==typeof t.stackTraceLimit)return t.stackTraceLimit},set(e){"number"!=typeof t.stackTraceLimit||(t.stackTraceLimit=e)},enumerable:!1,configurable:!0},prepareStackTrace:{get:()=>t.prepareStackTrace,set(e){if("function"==typeof e){const r=c(e);t.prepareStackTrace=r}else t.prepareStackTrace=i},enumerable:!1,configurable:!0}}),a.getStackString}const he={getStackString:t=>""};const{details:Pe,quote:be}=Ot;let Se,we=!1;const Ee=function(){if(arguments.length>=1)throw new TypeError("makeHardener no longer takes any options");const t=new WeakSet,{harden:e}={harden(e){const r=new Set,o=new Map,n=new WeakMap;function a(e,o){if(Object(e)!==e)return;const a=typeof e;if("object"!==a&&"function"!==a)throw new TypeError("Unexpected typeof: "+a);t.has(e)||r.has(e)||(r.add(e),n.set(e,o))}function i(t){st(t);const e=pt(t),r=ct(t),i=n.get(t)||"unknown";null===e||o.has(e)||(o.set(e,i),n.set(e,i+".__proto__")),lt(r).forEach(t=>{const e=`${i}.${String(t)}`,o=r[t];"value"in o?a(o.value,""+e):(a(o.get,e+"(get)"),a(o.set,e+"(set)"))})}return a(e),r.forEach(i),o.forEach((e,o)=>{if(!r.has(o)&&!t.has(o)){let t;try{t=`prototype ${o} of ${e} is not already in the fringeSet`}catch(r){t="a prototype of something is not already in the fringeset (and .toString failed)";try{console.log(t),console.log("the prototype:",o),console.log("of something:",e)}catch(t){}}throw new TypeError(t)}}),r.forEach(t.add,t),e}};return e}(),Te=()=>!1;function Ie(t,o,n,p={}){p={...Se,...p};const{dateTaming:l="safe",errorTaming:f="safe",mathTaming:d="safe",regExpTaming:m="safe",localeTaming:S="safe",consoleTaming:w="safe",...E}=p,T=Reflect.ownKeys(E);if(Ot(0===T.length,Pe`lockdown(): non supported option ${be(T)}`),Se){for(const t of u(Se))Ot(p[t]===Se[t],Pe`lockdown(): cannot re-invoke with different option ${be(t)}`);return Te}Se={dateTaming:l,errorTaming:f,mathTaming:d,regExpTaming:m,localeTaming:S,consoleTaming:w};const I=nt();I.addIntrinsics(function(){try{(0,Function.prototype.constructor)("return 1")}catch(t){return{}}const t={};function e(e,o,n){let a;try{a=(0,eval)(n)}catch(t){if(t instanceof SyntaxError)return;throw t}const i=c(a),s=function(){throw new TypeError("Not available")};r(s,{prototype:{value:i},name:{value:e,writable:!1,enumerable:!1,configurable:!0}}),r(i,{constructor:{value:s}}),s!==Function.prototype.constructor&&g(s,Function.prototype.constructor),t[o]=s}return e("Function","%InertFunction%","(function(){})"),e("GeneratorFunction","%InertGeneratorFunction%","(function*(){})"),e("AsyncFunction","%InertAsyncFunction%","(async function(){})"),e("AsyncGeneratorFunction","%InertAsyncGeneratorFunction%","(async function*(){})"),t}()),I.addIntrinsics(function(t="safe"){if("safe"!==t&&"unsafe"!==t)throw new Error("unrecognized dateTaming "+t);const e=Date,o=e.prototype,n={now:()=>NaN},a=({powers:t="none"}={})=>{let n;return n="original"===t?function(...t){return void 0===new.target?Reflect.apply(e,void 0,t):Reflect.construct(e,t,new.target)}:function(...t){return void 0===new.target?"Invalid Date":(0===t.length&&(t=[NaN]),Reflect.construct(e,t,new.target))},r(n,{length:{value:7},prototype:{value:o,writable:!1,enumerable:!1,configurable:!1},parse:{value:Date.parse,writable:!0,enumerable:!1,configurable:!0},UTC:{value:Date.UTC,writable:!0,enumerable:!1,configurable:!0}}),n},i=a({powers:"original"}),s=a({power:"none"});return r(i,{now:{value:Date.now,writable:!0,enumerable:!1,configurable:!0}}),r(s,{now:{value:n.now,writable:!0,enumerable:!1,configurable:!0}}),r(o,{constructor:{value:s}}),{"%InitialDate%":i,"%SharedDate%":s}}(l)),I.addIntrinsics(function(t="safe"){if("safe"!==t&&"unsafe"!==t)throw new Error("unrecognized errorTaming "+t);const e=Error,o=e.prototype,n="function"==typeof e.captureStackTrace?"v8":"unknown",a=(t={})=>{const a=function(...t){let r;return r=void 0===new.target?P(e,this,t):b(e,t,new.target),"v8"===n&&e.captureStackTrace(r,a),r};return r(a,{length:{value:1},prototype:{value:o,writable:!1,enumerable:!1,configurable:!1}}),a},i=a({powers:"original"}),s=a({powers:"none"});r(o,{constructor:{value:s}});for(const t of z)g(t,s);let c=he.getStackString;return"v8"===n&&(c=me(e,i,t)),{"%InitialGetStackString%":c,"%InitialError%":i,"%SharedError%":s}}(f)),I.addIntrinsics(function(t="safe"){if("safe"!==t&&"unsafe"!==t)throw new Error("unrecognized mathTaming "+t);const r=Math,o=r,{random:n,...a}=i(r);return{"%InitialMath%":o,"%SharedMath%":e(Object.prototype,a)}}(d)),I.addIntrinsics(function(t="safe"){if("safe"!==t&&"unsafe"!==t)throw new Error("unrecognized regExpTaming "+t);const e=RegExp,o=e.prototype,n=(t={})=>{const n=function(...t){return void 0===new.target?e(...t):Reflect.construct(e,t,new.target)};return r(n,{length:{value:2},prototype:{value:o,writable:!1,enumerable:!1,configurable:!1},[Symbol.species]:a(e,Symbol.species)}),n},i=n(),s=n();return"unsafe"!==t&&delete o.compile,r(o,{constructor:{value:s}}),{"%InitialRegExp%":i,"%SharedRegExp%":s}}(m)),I.addIntrinsics(n()),I.completePrototypes();const v=I.finalIntrinsics();let A;"unsafe"!==f&&(A=v["%InitialGetStackString%"]);const k=((t="safe",e)=>{if("safe"!==t&&"unsafe"!==t)throw new Error("unrecognized consoleTaming "+t);if("unsafe"===t)return{console:le};let r;r=void 0===e?_t:{..._t,getStackString:e};return{console:pe(le,r)}})(w,A);globalThis.console=k.console,function(t,e="safe"){if("safe"!==e&&"unsafe"!==e)throw new Error("unrecognized dateTaming "+e);if("unsafe"!==e){h(String.prototype,"localeCompare",{value:Nt});for(const e of s(t)){const r=t[e];if(r===Object(r))for(const t of s(r)){const e=$t.exec(t);if(e){Ot("function"==typeof r[t],Mt`expected ${Ct(t)} to be a function`);const o=`${e[1]}${e[2]}`,n=r[o];Ot("function"==typeof n,Mt`function ${Ct(o)} not found`),h(r,t,{value:n})}}}}}(v,S);const F=L();return dt(v,F),function(){try{(0,Object.prototype.__lookupGetter__)("x")}catch(t){return}function t(t){if(null==t)throw new TypeError("can't convert undefined or null to object");return Object(t)}function e(t){return"symbol"==typeof t?t:""+t}function o(t,e){if("function"!=typeof t)throw TypeError(`invalid ${e} usage`);return t}r(y,{__defineGetter__:{value:function(e,r){const n=t(this);h(n,e,{get:o(r,"getter"),enumerable:!0,configurable:!0})}},__defineSetter__:{value:function(e,r){const n=t(this);h(n,e,{set:o(r,"setter"),enumerable:!0,configurable:!0})}},__lookupGetter__:{value:function(r){let o,n=t(this);for(r=e(r);n&&!(o=a(n,r));)n=c(n);return o&&o.get}},__lookupSetter__:{value:function(r){let o,n=t(this);for(r=e(r);n&&!(o=a(n,r));)n=c(n);return o&&o.set}}})}(),ne(globalThis,v,D,t,0,{nativeBrander:F}),function(){return function(t){function e(t,e,r,o){if("value"in o&&o.configurable){const{value:a}=o;function n(){return a}h(n,"originalValue",{value:a,writable:!1,enumerable:!1,configurable:!1}),h(e,r,{get:n,set:function(o){if(e===this)throw new TypeError(`Cannot assign to read only property '${r}' of '${t}'`);x(this,r)?this[r]=o:h(this,r,{value:o,writable:!0,enumerable:!0,configurable:!0})},enumerable:o.enumerable,configurable:o.configurable})}}function r(t,r,o){const n=a(r,o);n&&e(t,r,o,n)}function o(t,r){const o=i(r);o&&ht(o).forEach(n=>e(t,r,n,o[n]))}!function t(e,n,i){for(const c of s(i)){const s=a(n,c);if(!s||s.get||s.set)continue;const p=`${e}.${c}`,l=i[c];if(!0===l)r(p,n,c);else if("*"===l)o(p,s.value);else{if(!Pt(l))throw new TypeError("Unexpected override enablement plan "+p);t(p,s.value,l)}}}("root",t,mt)}(v),Ee(v),we=!0,!0}}const ve=new WeakMap,Ae={constructor:at,get globalThis(){return ve.get(this).globalObject},get name(){return ve.get(this).name},evaluate(t,o={}){if("string"!=typeof t)throw new TypeError("first argument of evaluate() must be a string");const{transforms:n=[],sloppyGlobalsMode:a=!1,__moduleShimLexicals__:s}=o,c=[...n],p=ve.get(this);let{globalTransforms:l}=p;const{globalObject:u,globalLexicals:y}=p;let f=y;return void 0!==s&&(l=void 0,f=e(null,i(y)),r(f,i(s))),te(t,u,f,{globalTransforms:l,localTransforms:c,sloppyGlobalsMode:a})},toString:()=>"[object Compartment]"};r(at,{prototype:{value:Ae}});const ke=(e,r,o)=>{function a(a={},i={},c={}){if(void 0===new.target)throw new TypeError("Class constructor Compartment cannot be invoked without 'new'");const{name:p="<unknown>",transforms:l=[],__shimTransforms__:u=[],globalLexicals:y={}}=c,f=[...l,...u],g={};ne(g,r,W,e,this.constructor.prototype,{globalTransforms:f,nativeBrander:o}),t(g,a);const d=s(y).filter(t=>!jt(t));if(d.length)throw new Error(`Cannot create compartment with invalid names for global lexicals: ${d.join(", ")}; these names would not be lexically mentionable`);ve.set(this,{name:p,globalTransforms:f,globalObject:g,globalLexicals:n({...y})})}return a.prototype=Ae,a},Fe=L(),xe=ke(ke,function(t){const e=nt();return e.addIntrinsics(ot(t,W)),e.finalIntrinsics()}(globalThis),Fe);t(globalThis,{harden:t=>(Ot(we,"Cannot harden before lockdown"),Ee(t)),lockdown:((t,e,r)=>(e={})=>Ie(t,0,r,e)())(ke,0,(function(){const t=Function.prototype.constructor,e=typeof Symbol&&Symbol.iterator||"@@iterator",r=typeof Symbol&&Symbol.matchAll||"@@matchAll",o=a(arguments,"callee").get,n=(new String)[e](),i=c(n),s=RegExp.prototype[r]&&(new RegExp)[r](),p=s&&c(s),l=(new Array)[e](),u=c(l),y=c(Float32Array),f=(new Map)[e](),g=c(f),d=(new Set)[e](),m=c(d),h=c(u);function*P(){}const b=it(P),S=b.prototype;async function*w(){}const E=it(w),T=E.prototype,I=T.prototype,v=c(I);async function A(){}const k=it(A),F={"%InertFunction%":t,"%ArrayIteratorPrototype%":u,"%InertAsyncFunction%":k,"%AsyncGenerator%":T,"%InertAsyncGeneratorFunction%":E,"%AsyncGeneratorPrototype%":I,"%AsyncIteratorPrototype%":v,"%Generator%":S,"%InertGeneratorFunction%":b,"%IteratorPrototype%":h,"%MapIteratorPrototype%":g,"%RegExpStringIteratorPrototype%":p,"%SetIteratorPrototype%":m,"%StringIteratorPrototype%":i,"%ThrowTypeError%":o,"%TypedArray%":y,"%InertCompartment%":at};return F})),Compartment:xe,assert:Ot})}));
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";const{assign:t,create:e,defineProperties:r,entries:o,freeze:n,getOwnPropertyDescriptor:a,getOwnPropertyDescriptors:i,getOwnPropertyNames:s,getPrototypeOf:c,is:p,isExtensible:l,keys:u,prototype:y,seal:g,setPrototypeOf:f,values:d}=Object,m=Object.fromEntries||(t=>{const e={};for(const[r,o]of t)e[r]=o;return e}),P=(t,e,o)=>r(t,{[e]:o}),{apply:b,construct:h,get:S,set:E}=Reflect,{isArray:w,prototype:T}=Array,{revocable:I}=Proxy,{prototype:v}=RegExp,{prototype:A}=String,{prototype:_}=WeakMap,k=t=>(e,...r)=>b(t,e,r),F=k(y.hasOwnProperty),x=(k(T.filter),k(T.join)),U=(k(T.push),k(T.pop)),R=k(T.includes),O=k(v.test),$=(k(A.match),k(A.search)),M=k(A.slice),C=k(A.split),N=(k(_.get),k(_.set),k(_.has),n({__proto__:null}));let L;function G(){if(void 0===L){const t=new WeakSet,e=Function.prototype.toString,r={toString(){const r=b(e,this,[]);return r.endsWith(") { [native code] }")||!t.has(this)?r:`function ${this.name}() { [native code] }`}};P(Function.prototype,"toString",{value:r.toString}),L=n(e=>t.add(e))}return L}const j={Infinity:1/0,NaN:NaN,undefined:void 0},B={isFinite:"isFinite",isNaN:"isNaN",parseFloat:"parseFloat",parseInt:"parseInt",decodeURI:"decodeURI",decodeURIComponent:"decodeURIComponent",encodeURI:"encodeURI",encodeURIComponent:"encodeURIComponent",Array:"Array",ArrayBuffer:"ArrayBuffer",BigInt:"BigInt",BigInt64Array:"BigInt64Array",BigUint64Array:"BigUint64Array",Boolean:"Boolean",DataView:"DataView",EvalError:"EvalError",Float32Array:"Float32Array",Float64Array:"Float64Array",Int8Array:"Int8Array",Int16Array:"Int16Array",Int32Array:"Int32Array",Map:"Map",Number:"Number",Object:"Object",Promise:"Promise",Proxy:"Proxy",RangeError:"RangeError",ReferenceError:"ReferenceError",Set:"Set",String:"String",Symbol:"Symbol",SyntaxError:"SyntaxError",TypeError:"TypeError",Uint8Array:"Uint8Array",Uint8ClampedArray:"Uint8ClampedArray",Uint16Array:"Uint16Array",Uint32Array:"Uint32Array",URIError:"URIError",WeakMap:"WeakMap",WeakSet:"WeakSet",JSON:"JSON",Reflect:"Reflect",escape:"escape",unescape:"unescape",lockdown:"lockdown",harden:"harden",HandledPromise:"HandledPromise",StaticModuleRecord:"StaticModuleRecord"},D={Date:"%InitialDate%",Error:"%InitialError%",RegExp:"%InitialRegExp%",Math:"%InitialMath%",getStackString:"%InitialGetStackString%"},W={Date:"%SharedDate%",Error:"%SharedError%",RegExp:"%SharedRegExp%",Math:"%SharedMath%"},z=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError],V={"[[Proto]]":"%FunctionPrototype%",length:"number",name:"string"},H=V,Y={get:H,set:"undefined"},q={get:H,set:H};function J(t){return t===Y||t===q}function Z(t){return{"[[Proto]]":"%SharedError%",prototype:t}}function K(t){return{"[[Proto]]":"%ErrorPrototype%",constructor:t,message:"string",name:"string",toString:!1}}function Q(t){return{"[[Proto]]":"%TypedArray%",BYTES_PER_ELEMENT:"number",prototype:t}}function X(t){return{"[[Proto]]":"%TypedArrayPrototype%",BYTES_PER_ELEMENT:"number",constructor:t}}const tt={E:"number",LN10:"number",LN2:"number",LOG10E:"number",LOG2E:"number",PI:"number",SQRT1_2:"number",SQRT2:"number","@@toStringTag":"string",abs:H,acos:H,acosh:H,asin:H,asinh:H,atan:H,atanh:H,atan2:H,cbrt:H,ceil:H,clz32:H,cos:H,cosh:H,exp:H,expm1:H,floor:H,fround:H,hypot:H,imul:H,log:H,log1p:H,log10:H,log2:H,max:H,min:H,pow:H,round:H,sign:H,sin:H,sinh:H,sqrt:H,tan:H,tanh:H,trunc:H,idiv:!1,idivmod:!1,imod:!1,imuldiv:!1,irem:!1,mod:!1},et={"[[Proto]]":null,"%ThrowTypeError%":H,Infinity:"number",NaN:"number",undefined:"undefined","%UniqueEval%":H,isFinite:H,isNaN:H,parseFloat:H,parseInt:H,decodeURI:H,decodeURIComponent:H,encodeURI:H,encodeURIComponent:H,Object:{"[[Proto]]":"%FunctionPrototype%",assign:H,create:H,defineProperties:H,defineProperty:H,entries:H,freeze:H,fromEntries:H,getOwnPropertyDescriptor:H,getOwnPropertyDescriptors:H,getOwnPropertyNames:H,getOwnPropertySymbols:H,getPrototypeOf:H,is:H,isExtensible:H,isFrozen:H,isSealed:H,keys:H,preventExtensions:H,prototype:"%ObjectPrototype%",seal:H,setPrototypeOf:H,values:H},"%ObjectPrototype%":{"[[Proto]]":null,constructor:"Object",hasOwnProperty:H,isPrototypeOf:H,propertyIsEnumerable:H,toLocaleString:H,toString:H,valueOf:H,"--proto--":q,__defineGetter__:H,__defineSetter__:H,__lookupGetter__:H,__lookupSetter__:H},"%UniqueFunction%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%FunctionPrototype%"},"%InertFunction%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%FunctionPrototype%"},"%FunctionPrototype%":{apply:H,bind:H,call:H,constructor:"%InertFunction%",toString:H,"@@hasInstance":H,caller:!1,arguments:!1},Boolean:{"[[Proto]]":"%FunctionPrototype%",prototype:"%BooleanPrototype%"},"%BooleanPrototype%":{constructor:"Boolean",toString:H,valueOf:H},Symbol:{"[[Proto]]":"%FunctionPrototype%",asyncIterator:"symbol",for:H,hasInstance:"symbol",isConcatSpreadable:"symbol",iterator:"symbol",keyFor:H,match:"symbol",matchAll:"symbol",prototype:"%SymbolPrototype%",replace:"symbol",search:"symbol",species:"symbol",split:"symbol",toPrimitive:"symbol",toStringTag:"symbol",unscopables:"symbol"},"%SymbolPrototype%":{constructor:"Symbol",description:Y,toString:H,valueOf:H,"@@toPrimitive":H,"@@toStringTag":"string"},"%InitialError%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%ErrorPrototype%",captureStackTrace:H,stackTraceLimit:q,prepareStackTrace:q},"%SharedError%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%ErrorPrototype%",captureStackTrace:H,stackTraceLimit:q,prepareStackTrace:q},"%ErrorPrototype%":{constructor:"%SharedError%",message:"string",name:"string",toString:H},EvalError:Z("%EvalErrorPrototype%"),RangeError:Z("%RangeErrorPrototype%"),ReferenceError:Z("%ReferenceErrorPrototype%"),SyntaxError:Z("%SyntaxErrorPrototype%"),TypeError:Z("%TypeErrorPrototype%"),URIError:Z("%URIErrorPrototype%"),"%EvalErrorPrototype%":K("EvalError"),"%RangeErrorPrototype%":K("RangeError"),"%ReferenceErrorPrototype%":K("ReferenceError"),"%SyntaxErrorPrototype%":K("SyntaxError"),"%TypeErrorPrototype%":K("TypeError"),"%URIErrorPrototype%":K("URIError"),Number:{"[[Proto]]":"%FunctionPrototype%",EPSILON:"number",isFinite:H,isInteger:H,isNaN:H,isSafeInteger:H,MAX_SAFE_INTEGER:"number",MAX_VALUE:"number",MIN_SAFE_INTEGER:"number",MIN_VALUE:"number",NaN:"number",NEGATIVE_INFINITY:"number",parseFloat:H,parseInt:H,POSITIVE_INFINITY:"number",prototype:"%NumberPrototype%"},"%NumberPrototype%":{constructor:"Number",toExponential:H,toFixed:H,toLocaleString:H,toPrecision:H,toString:H,valueOf:H},BigInt:{"[[Proto]]":"%FunctionPrototype%",asIntN:H,asUintN:H,prototype:"%BigIntPrototype%",bitLength:!1,fromArrayBuffer:!1},"%BigIntPrototype%":{constructor:"BigInt",toLocaleString:H,toString:H,valueOf:H,"@@toStringTag":"string"},"%InitialMath%":{...tt,random:H},"%SharedMath%":tt,"%InitialDate%":{"[[Proto]]":"%FunctionPrototype%",now:H,parse:H,prototype:"%DatePrototype%",UTC:H},"%SharedDate%":{"[[Proto]]":"%FunctionPrototype%",now:H,parse:H,prototype:"%DatePrototype%",UTC:H},"%DatePrototype%":{constructor:"%SharedDate%",getDate:H,getDay:H,getFullYear:H,getHours:H,getMilliseconds:H,getMinutes:H,getMonth:H,getSeconds:H,getTime:H,getTimezoneOffset:H,getUTCDate:H,getUTCDay:H,getUTCFullYear:H,getUTCHours:H,getUTCMilliseconds:H,getUTCMinutes:H,getUTCMonth:H,getUTCSeconds:H,setDate:H,setFullYear:H,setHours:H,setMilliseconds:H,setMinutes:H,setMonth:H,setSeconds:H,setTime:H,setUTCDate:H,setUTCFullYear:H,setUTCHours:H,setUTCMilliseconds:H,setUTCMinutes:H,setUTCMonth:H,setUTCSeconds:H,toDateString:H,toISOString:H,toJSON:H,toLocaleDateString:H,toLocaleString:H,toLocaleTimeString:H,toString:H,toTimeString:H,toUTCString:H,valueOf:H,"@@toPrimitive":H,getYear:H,setYear:H,toGMTString:H},String:{"[[Proto]]":"%FunctionPrototype%",fromCharCode:H,fromCodePoint:H,prototype:"%StringPrototype%",raw:H,fromArrayBuffer:!1},"%StringPrototype%":{length:"number",charAt:H,charCodeAt:H,codePointAt:H,concat:H,constructor:"String",endsWith:H,includes:H,indexOf:H,lastIndexOf:H,localeCompare:H,match:H,matchAll:H,normalize:H,padEnd:H,padStart:H,repeat:H,replace:H,replaceAll:H,search:H,slice:H,split:H,startsWith:H,substring:H,toLocaleLowerCase:H,toLocaleUpperCase:H,toLowerCase:H,toString:H,toUpperCase:H,trim:H,trimEnd:H,trimStart:H,valueOf:H,"@@iterator":H,substr:H,anchor:H,big:H,blink:H,bold:H,fixed:H,fontcolor:H,fontsize:H,italics:H,link:H,small:H,strike:H,sub:H,sup:H,trimLeft:H,trimRight:H,compare:!1},"%StringIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:H,"@@toStringTag":"string"},"%InitialRegExp%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%RegExpPrototype%","@@species":Y,input:!1,$_:!1,lastMatch:!1,"$&":!1,lastParen:!1,"$+":!1,leftContext:!1,"$`":!1,rightContext:!1,"$'":!1,$1:!1,$2:!1,$3:!1,$4:!1,$5:!1,$6:!1,$7:!1,$8:!1,$9:!1},"%SharedRegExp%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%RegExpPrototype%","@@species":Y},"%RegExpPrototype%":{constructor:"%SharedRegExp%",exec:H,dotAll:Y,flags:Y,global:Y,ignoreCase:Y,"@@match":H,"@@matchAll":H,multiline:Y,"@@replace":H,"@@search":H,source:Y,"@@split":H,sticky:Y,test:H,toString:H,unicode:Y,compile:!1},"%RegExpStringIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:H,"@@toStringTag":"string"},Array:{"[[Proto]]":"%FunctionPrototype%",from:H,isArray:H,of:H,prototype:"%ArrayPrototype%","@@species":Y},"%ArrayPrototype%":{length:"number",concat:H,constructor:"Array",copyWithin:H,entries:H,every:H,fill:H,filter:H,find:H,findIndex:H,flat:H,flatMap:H,forEach:H,includes:H,indexOf:H,join:H,keys:H,lastIndexOf:H,map:H,pop:H,push:H,reduce:H,reduceRight:H,reverse:H,shift:H,slice:H,some:H,sort:H,splice:H,toLocaleString:H,toString:H,unshift:H,values:H,"@@iterator":H,"@@unscopables":{"[[Proto]]":null,copyWithin:"boolean",entries:"boolean",fill:"boolean",find:"boolean",findIndex:"boolean",flat:"boolean",flatMap:"boolean",includes:"boolean",keys:"boolean",values:"boolean"}},"%ArrayIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:H,"@@toStringTag":"string"},"%TypedArray%":{"[[Proto]]":"%FunctionPrototype%",from:H,of:H,prototype:"%TypedArrayPrototype%","@@species":Y},"%TypedArrayPrototype%":{buffer:Y,byteLength:Y,byteOffset:Y,constructor:"%TypedArray%",copyWithin:H,entries:H,every:H,fill:H,filter:H,find:H,findIndex:H,forEach:H,includes:H,indexOf:H,join:H,keys:H,lastIndexOf:H,length:Y,map:H,reduce:H,reduceRight:H,reverse:H,set:H,slice:H,some:H,sort:H,subarray:H,toLocaleString:H,toString:H,values:H,"@@iterator":H,"@@toStringTag":Y},BigInt64Array:Q("%BigInt64ArrayPrototype%"),BigUint64Array:Q("%BigUint64ArrayPrototype%"),Float32Array:Q("%Float32ArrayPrototype%"),Float64Array:Q("%Float64ArrayPrototype%"),Int16Array:Q("%Int16ArrayPrototype%"),Int32Array:Q("%Int32ArrayPrototype%"),Int8Array:Q("%Int8ArrayPrototype%"),Uint16Array:Q("%Uint16ArrayPrototype%"),Uint32Array:Q("%Uint32ArrayPrototype%"),Uint8Array:Q("%Uint8ArrayPrototype%"),Uint8ClampedArray:Q("%Uint8ClampedArrayPrototype%"),"%BigInt64ArrayPrototype%":X("BigInt64Array"),"%BigUint64ArrayPrototype%":X("BigUint64Array"),"%Float32ArrayPrototype%":X("Float32Array"),"%Float64ArrayPrototype%":X("Float64Array"),"%Int16ArrayPrototype%":X("Int16Array"),"%Int32ArrayPrototype%":X("Int32Array"),"%Int8ArrayPrototype%":X("Int8Array"),"%Uint16ArrayPrototype%":X("Uint16Array"),"%Uint32ArrayPrototype%":X("Uint32Array"),"%Uint8ArrayPrototype%":X("Uint8Array"),"%Uint8ClampedArrayPrototype%":X("Uint8ClampedArray"),Map:{"[[Proto]]":"%FunctionPrototype%","@@species":Y,prototype:"%MapPrototype%"},"%MapPrototype%":{clear:H,constructor:"Map",delete:H,entries:H,forEach:H,get:H,has:H,keys:H,set:H,size:Y,values:H,"@@iterator":H,"@@toStringTag":"string"},"%MapIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:H,"@@toStringTag":"string"},Set:{"[[Proto]]":"%FunctionPrototype%",prototype:"%SetPrototype%","@@species":Y},"%SetPrototype%":{add:H,clear:H,constructor:"Set",delete:H,entries:H,forEach:H,has:H,keys:H,size:Y,values:H,"@@iterator":H,"@@toStringTag":"string"},"%SetIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:H,"@@toStringTag":"string"},WeakMap:{"[[Proto]]":"%FunctionPrototype%",prototype:"%WeakMapPrototype%"},"%WeakMapPrototype%":{constructor:"WeakMap",delete:H,get:H,has:H,set:H,"@@toStringTag":"string"},WeakSet:{"[[Proto]]":"%FunctionPrototype%",prototype:"%WeakSetPrototype%"},"%WeakSetPrototype%":{add:H,constructor:"WeakSet",delete:H,has:H,"@@toStringTag":"string"},ArrayBuffer:{"[[Proto]]":"%FunctionPrototype%",isView:H,prototype:"%ArrayBufferPrototype%","@@species":Y,fromString:!1,fromBigInt:!1},"%ArrayBufferPrototype%":{byteLength:Y,constructor:"ArrayBuffer",slice:H,"@@toStringTag":"string",concat:!1},SharedArrayBuffer:!1,"%SharedArrayBufferPrototype%":!1,DataView:{"[[Proto]]":"%FunctionPrototype%",prototype:"%DataViewPrototype%"},"%DataViewPrototype%":{buffer:Y,byteLength:Y,byteOffset:Y,constructor:"DataView",getBigInt64:H,getBigUint64:H,getFloat32:H,getFloat64:H,getInt8:H,getInt16:H,getInt32:H,getUint8:H,getUint16:H,getUint32:H,setBigInt64:H,setBigUint64:H,setFloat32:H,setFloat64:H,setInt8:H,setInt16:H,setInt32:H,setUint8:H,setUint16:H,setUint32:H,"@@toStringTag":"string"},Atomics:!1,JSON:{parse:H,stringify:H,"@@toStringTag":"string"},"%IteratorPrototype%":{"@@iterator":H},"%AsyncIteratorPrototype%":{"@@asyncIterator":H},"%InertGeneratorFunction%":{"[[Proto]]":"%InertFunction%",prototype:"%Generator%"},"%Generator%":{"[[Proto]]":"%FunctionPrototype%",constructor:"%InertGeneratorFunction%",prototype:"%GeneratorPrototype%","@@toStringTag":"string"},"%InertAsyncGeneratorFunction%":{"[[Proto]]":"%InertFunction%",prototype:"%AsyncGenerator%"},"%AsyncGenerator%":{"[[Proto]]":"%FunctionPrototype%",constructor:"%InertAsyncGeneratorFunction%",prototype:"%AsyncGeneratorPrototype%","@@toStringTag":"string"},"%GeneratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",constructor:"%Generator%",next:H,return:H,throw:H,"@@toStringTag":"string"},"%AsyncGeneratorPrototype%":{"[[Proto]]":"%AsyncIteratorPrototype%",constructor:"%AsyncGenerator%",next:H,return:H,throw:H,"@@toStringTag":"string"},HandledPromise:{"[[Proto]]":"Promise",applyFunction:H,applyFunctionSendOnly:H,applyMethod:H,applyMethodSendOnly:H,get:H,getSendOnly:H,prototype:"%PromisePrototype%",resolve:H},Promise:{"[[Proto]]":"%FunctionPrototype%",all:H,allSettled:H,any:!1,prototype:"%PromisePrototype%",race:H,reject:H,resolve:H,"@@species":Y},"%PromisePrototype%":{catch:H,constructor:"Promise",finally:H,then:H,"@@toStringTag":"string"},"%InertAsyncFunction%":{"[[Proto]]":"%InertFunction%",prototype:"%AsyncFunctionPrototype%"},"%AsyncFunctionPrototype%":{"[[Proto]]":"%FunctionPrototype%",constructor:"%InertAsyncFunction%","@@toStringTag":"string"},Reflect:{apply:H,construct:H,defineProperty:H,deleteProperty:H,get:H,getOwnPropertyDescriptor:H,getPrototypeOf:H,has:H,isExtensible:H,ownKeys:H,preventExtensions:H,set:H,setPrototypeOf:H,"@@toStringTag":"string"},Proxy:{"[[Proto]]":"%FunctionPrototype%",revocable:H},escape:H,unescape:H,"%UniqueCompartment%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%CompartmentPrototype%",toString:H},"%InertCompartment%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%CompartmentPrototype%",toString:H},"%CompartmentPrototype%":{constructor:"%InertCompartment%",evaluate:H,globalThis:Y,name:Y,toString:H},lockdown:H,harden:H,"%InitialGetStackString%":H};function rt(t,e,r){if(F(t,e)){const o=a(t,e);if(!Object.is(o.value,r.value)||o.get!==r.get||o.set!==r.set||o.writable!==r.writable||o.enumerable!==r.enumerable||o.configurable!==r.configurable)throw new Error("Conflicting definitions of "+e)}P(t,e,r)}function ot(t,e){const r={__proto__:null};for(const[n,a]of o(e))F(t,n)&&(r[a]=t[n]);return r}function nt(){const t={__proto__:null};let e;const r={addIntrinsics(e){!function(t,e){for(const[r,n]of o(e))rt(t,r,n)}(t,i(e))},completePrototypes(){for(const[e,r]of o(t)){if(r!==Object(r))continue;if(!F(r,"prototype"))continue;const o=et[e];if("object"!=typeof o)throw new Error("Expected permit object at whitelist."+e);const n=o.prototype;if(!n)throw new Error(e+".prototype property not whitelisted");if("string"!=typeof n||!F(et,n))throw new Error(`Unrecognized ${e}.prototype whitelist entry`);const a=r.prototype;if(F(t,n)){if(t[n]!==a)throw new Error("Conflicting bindings of "+n)}else t[n]=a}},finalIntrinsics:()=>(n(t),e=new WeakSet(d(t).filter(t=>"function"==typeof t)),t),isPseudoNative(t){if(!e)throw new Error("isPseudoNative can only be called after finalIntrinsics");return e.has(t)}};return r.addIntrinsics(j),r.addIntrinsics(ot(globalThis,B)),r}const at=function(t={},e={},r={}){throw new TypeError("Not available")};function it(t){return c(t).constructor}const{freeze:st,getOwnPropertyDescriptors:ct,getPrototypeOf:pt}=Object,{ownKeys:lt}=Reflect;const{apply:ut,ownKeys:yt}=Reflect,gt=(t=>(e,...r)=>ut(t,e,r))(Object.prototype.hasOwnProperty);function ft(t,e){if("string"==typeof e)return e;if("symbol"==typeof e)return"@@"+e.toString().slice(14,-1);throw new TypeError(`Unexpected property name type ${t} ${e}`)}function dt(t,e){const r=["undefined","boolean","number","string","symbol"];function o(e,o,n,a){if("object"==typeof a)return s(e,o,a),!0;if(!1===a)return!1;if("string"==typeof a)if("prototype"===n||"constructor"===n){if(gt(t,a)){if(o!==t[a])throw new TypeError("Does not match whitelist "+e);return!0}}else if(r.includes(a)){if(typeof o!==a)throw new TypeError(`At ${e} expected ${a} not ${typeof o}`);return!0}throw new TypeError(`Unexpected whitelist permit ${a} at ${e}`)}function n(t,e,r,n){const i=a(e,r);if(gt(i,"value")){if(J(n))throw new TypeError("Accessor expected at "+t);return o(t,i.value,r,n)}if(!J(n))throw new TypeError("Accessor not expected at "+t);return o(t+"<get>",i.get,r,n.get)&&o(t+"<set>",i.set,r,n.set)}function i(t,r,o){const n="__proto__"===o?"--proto--":o;return gt(r,n)?r[n]:"function"==typeof t&&(e(t),gt(V,n))?V[n]:void 0}function s(e,r,o){if(void 0===r)return;!function(e,r,o){if(r!==Object(r))throw new TypeError(`Object expected: ${e}, ${r}, ${o}`);const n=c(r);if(null!==n||null!==o){if(void 0!==o&&"string"!=typeof o)throw new TypeError(`Malformed whitelist permit ${e}.__proto__`);if(n!==t[o||"%ObjectPrototype%"])throw new Error(`Unexpected intrinsic ${e}.__proto__ at ${o}`)}}(e,r,o["[[Proto]]"]);for(const t of yt(r)){const a=ft(e,t),s=`${e}.${a}`,c=i(r,o,a);c&&n(s,r,t,c)||(!1!==c&&console.log("Removing "+s),delete r[t])}}s("intrinsics",t,et)}const mt={"%ObjectPrototype%":"*","%ArrayPrototype%":"*","%FunctionPrototype%":{constructor:!0,bind:!0,name:!0,toString:!0},"%ErrorPrototype%":{constructor:!0,message:!0,name:!0,toString:!0},"%TypeErrorPrototype%":{constructor:!0,message:!0,name:!0},"%SyntaxErrorPrototype%":{message:!0},"%RangeErrorPrototype%":{message:!0},"%URIErrorPrototype%":{message:!0},"%EvalErrorPrototype%":{message:!0},"%ReferenceErrorPrototype%":{message:!0},"%PromisePrototype%":{constructor:!0},"%TypedArrayPrototype%":"*","%Generator%":{constructor:!0,name:!0,toString:!0},"%IteratorPrototype%":"*"},Pt={"%ObjectPrototype%":{toString:!0},"%FunctionPrototype%":{toString:!0},"%ErrorPrototype%":{name:!0}},{ownKeys:bt}=Reflect;function ht(t){return null!==t&&"object"==typeof t}const St=t=>(t=""+t).length>=1&&"aeiouAEIOU".includes(t[0])?"an "+t:"a "+t;n(St);const Et=t=>{const e=new Set;return JSON.stringify(t,(t,r)=>{if("object"==typeof r&&null!==r){if(e.has(r))return"<**seen**>";e.add(r)}return r})};n(Et);const wt=new WeakMap,Tt=t=>{const e=n({toString:n(()=>Et(t))});return wt.set(e,t),e};n(Tt);const It=new WeakMap,vt=(t,...e)=>{const r=n({__proto__:null});return It.set(r,{template:t,args:e}),r};n(vt);const At=({template:t,args:e})=>{const r=[t[0]];for(let o=0;o<e.length;o+=1){let n=e[o];wt.has(n)&&(n=wt.get(n));const a=(r.pop()||"").replace(/ $/,"");""!==a&&r.push(a);const i=t[o+1].replace(/^ /,"");r.push(n,i)}return""===r[r.length-1]&&r.pop(),r},_t=new WeakMap,kt=(t=vt`Assert failed`,e=Error)=>{"string"==typeof t&&(t=vt([t]));const r=It.get(t);if(void 0===r)throw new Error("unrecognized details "+t);const o=new e((({template:t,args:e})=>{const r=[t[0]];for(let o=0;o<e.length;o+=1){const n=e[o];let a;a=wt.has(n)?""+n:n instanceof Error?`(${St(n.name)})`:`(${St(typeof n)})`,r.push(a,t[o+1])}return r.join("")})(r));return _t.set(o,At(r)),o};n(kt);const Ft=new WeakMap,xt=new WeakMap,Ut=(t,e)=>{"string"==typeof e&&(e=vt([e]));const r=It.get(e);if(void 0===r)throw new Error("unrecognized details "+e);const o=At(r),n=xt.get(t);if(void 0!==n)for(const e of n)e(t,o);else{const e=Ft.get(t);void 0!==e?e.push(o):Ft.set(t,[o])}};n(Ut);const Rt={getStackString:globalThis.getStackString||(t=>{if(!("stack"in t))return"";const e=""+t.stack,r=e.indexOf("\n");return e.startsWith(" ")||-1===r?e:e.slice(r+1)}),takeMessageLogArgs:t=>{const e=_t.get(t);return _t.delete(t),e},takeNoteLogArgsArray:(t,e)=>{const r=Ft.get(t);if(Ft.delete(t),void 0!==e){const r=xt.get(t);r?r.push(e):xt.set(t,[e])}return r||[]}};n(Rt);const Ot=e=>{const r=(t=vt`Assert failed`,r=Error)=>{const o=kt(t,r);throw void 0!==e&&e(o),o};function o(t,e=vt`Check failed`,o=Error){if(!t)throw r(e,o)}n(r);const a=(t,e,r=vt`Expected ${t} is same as ${e}`,n=RangeError)=>{o(p(t,e),r,n)};n(a);const i=(t,e,r)=>{o("string"==typeof e,vt`${Tt(e)} must be a string`),void 0===r&&(r=vt([""," must be "+St(e)],t)),a(typeof t,e,r,TypeError)};n(i);const s=t(o,{error:kt,fail:r,equal:a,typeof:i,string:(t,e)=>i(t,"string",e),note:Ut,details:vt,quote:Tt});return n(s)};n(Ot);const $t=Ot(),{details:Mt,quote:Ct}=$t,Nt=/^(\w*[a-z])Locale([A-Z]\w*)$/,Lt={localeCompare(t){if(null==this)throw new TypeError('Cannot localeCompare with null or undefined "this" value');const e=""+this;return e<(t=""+t)?-1:e>t?1:($t(e===t,Mt`expected ${Ct(e)} and ${Ct(t)} to compare`),0)}}.localeCompare;const Gt=["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","let","static","enum","implements","package","protected","interface","private","public","await","null","true","false","this","arguments"],jt=new RegExp("^[a-zA-Z_$][\\w$]*$");function Bt(t){return"eval"!==t&&!R(Gt,t)&&O(jt,t)}function Dt(t,e){const r=a(t,e);return!1===r.configurable&&!1===r.writable&&F(r,"value")}const{details:Wt,quote:zt}=$t,Vt=eval,Ht=new Proxy(N,{get(t,e){$t.fail(Wt`Please report unexpected scope handler trap: ${zt(String(e))}`)}});const Yt=new RegExp("(?:\\s*//\\s*[@#]\\s*([a-zA-Z][a-zA-Z0-9]*)\\s*=\\s*([^\\s\\*]*)|/\\*\\s*[@#]\\s*([a-zA-Z][a-zA-Z0-9]*)\\s*=\\s*([^\\s\\*]*)\\s*\\*/)\\s*$");function qt(t){let e="<unknown>";for(;t.length>0;){const r=Yt.exec(t);if(null===r)break;t=t.slice(0,t.length-r[0].length),"sourceURL"===r[3]?e=r[4]:"sourceURL"===r[1]&&(e=r[2])}return e}function Jt(t,e){const r=$(t,e);return r<0?-1:C(M(t,0,r),"\n").length}const Zt=new RegExp("(?:\x3c!--|--\x3e)","g");function Kt(t){return t.replace(Zt,t=>"<"===t[0]?"< ! --":"-- >")}const Qt=new RegExp("\\bimport(\\s*(?:\\(|/[/*]))","g");function Xt(t){return t.replace(Qt,(t,e)=>"__import__"+e)}const te=new RegExp("\\beval(\\s*\\()","g");function ee(t){const e=Jt(t,te);if(e<0)return t;const r=qt(t);throw new SyntaxError(`Possible direct eval expression rejected at ${r}:${e}. (SES_EVAL_REJECTED)`)}function re(t){return t=function(t){const e=Jt(t,Qt);if(e<0)return t;const r=qt(t);throw new SyntaxError(`Possible import expression rejected at ${r}:${e}. (SES_IMPORT_REJECTED)`)}(t=function(t){const e=Jt(t,Zt);if(e<0)return t;const r=qt(t);throw new SyntaxError(`Possible HTML comment rejected at ${r}:${e}. (SES_HTML_COMMENT_REJECTED)`)}(t))}const oe=Function;function ne(t=[]){const e=function(t){return 0===t.length?"":`const {${x(t,",")}} = this;`}(t);return oe(`\n with (this) {\n ${e}\n return function() {\n 'use strict';\n return eval(arguments[0]);\n };\n }\n `)}const{details:ae}=$t;function ie(t,e,r={},{localTransforms:o=[],globalTransforms:n=[],sloppyGlobalsMode:i=!1}={}){t=function(t,e){for(const r of e)t=r(t);return t}(t,[...o,...n,re]);const c=function(t,e={},{sloppyGlobalsMode:r=!1}={}){return{__proto__:Ht,useUnsafeEvaluator:!1,get(r,o){if("symbol"!=typeof o)return"eval"===o&&!0===this.useUnsafeEvaluator?(this.useUnsafeEvaluator=!1,Vt):o in e?S(e,o,t):S(t,o)},set(r,o,n){if(o in e){return"value"in a(e,o)?E(e,o,n):E(e,o,n,t)}return E(t,o,n)},has:(o,n)=>!!(r||"eval"===n||n in e||n in t||n in globalThis),getPrototypeOf:()=>null,getOwnPropertyDescriptor(t,e){const r=JSON.stringify(String(e));console.warn("getOwnPropertyDescriptor trap on scopeHandler for "+r,(new Error).stack)}}}(e,r,{sloppyGlobalsMode:i}),p=I(N,c),l=ne(function(t,e={}){const r=s(t),o=s(e),n=o.filter(t=>Bt(t)&&Dt(e,t));return[...r.filter(e=>!o.includes(e)&&Bt(e)&&Dt(t,e)),...n]}(e,r)),u=b(l,p.proxy,[]);let y;c.useUnsafeEvaluator=!0;try{return b(u,e,[t])}catch(t){throw y=t,t}finally{!0===c.useUnsafeEvaluator&&(p.revoke(),$t.fail(ae`handler did not revoke useUnsafeEvaluator ${y}`))}}const se=(t,e={})=>r=>"string"!=typeof r?r:ie(r,t,{},e),ce=Function;function pe(t,e={}){const o=function(r){const o=""+(U(arguments)||""),n=""+x(arguments,",");new ce(n,o);const a=`(function anonymous(${n}\n) {\n${o}\n})`;return ie(a,t,{},e)};return r(o,{prototype:{value:Function.prototype,writable:!1,enumerable:!1,configurable:!1}}),$t(c(Function)===Function.prototype,"Function prototype is the same accross compartments"),$t(c(o)===Function.prototype,"Function constructor prototype is the same accross compartments"),o}function le(t,e,r,n,a,{globalTransforms:i,nativeBrander:s}){for(const[e,r]of o(j))P(t,e,{value:r,writable:!1,enumerable:!1,configurable:!1});for(const[r,n]of o(B))F(e,n)&&P(t,r,{value:e[n],writable:!0,enumerable:!1,configurable:!0});for(const[n,a]of o(r))F(e,a)&&P(t,n,{value:e[a],writable:!0,enumerable:!1,configurable:!0});const c={globalThis:t,eval:se(t,{globalTransforms:i}),Function:pe(t,{globalTransforms:i})};c.Compartment=n(n,e,s);for(const[e,r]of o(c))P(t,e,{value:r,writable:!0,enumerable:!1,configurable:!0}),"function"==typeof r&&s(r)}const ue=n([["debug","debug"],["log","log"],["info","info"],["warn","warn"],["error","error"],["trace","log"],["dirxml","log"],["group","log"],["groupCollapsed","log"]]),ye=n([["assert","error"],["timeLog","log"],["clear",void 0],["count","info"],["countReset",void 0],["dir","log"],["groupEnd","log"],["table","log"],["time","info"],["timeEnd","info"],["profile",void 0],["profileEnd",void 0],["timeStamp",void 0]]),ge=n([...ue,...ye]);n(()=>{let t=[];const e=m(ge.map(([e,r])=>{const o=(...r)=>{t.push([e,...r])};return P(o,"name",{value:e}),[e,n(o)]}));n(e);const r=()=>{const e=n(t);return t=[],e};n(r);return n({loggingConsole:e,takeLog:r})});const fe={NOTE:"ERROR_NOTE:",MESSAGE:"ERROR_MESSAGE:"};n(fe);const de=(t,e)=>{const{getStackString:r,takeMessageLogArgs:o,takeNoteLogArgsArray:a}=e;let i=0;const s=new WeakMap,c=t=>{let e;return s.has(t)?e=s.get(t):(i+=1,s.set(t,i),e=i),`${t.name}#${e}`},p=(t,e)=>t.map(t=>t instanceof Error?(e.push(t),`(${c(t)})`):t),l=(e,r,o,n)=>{const a=c(e),i=r===fe.MESSAGE?a+":":`${a} ${r}`,s=p(o,n);t.debug(i,...s)},u=(e,r)=>{if(r.length>=1){let o;o=1===r.length?"Nested error":`Nested ${r.length} errors`,void 0!==e&&(o=`${o} under ${e}`),t.group(o);try{for(const t of r)f(t)}finally{t.groupEnd()}}},y=new WeakSet,g=(t,e)=>{const r=[];l(t,fe.NOTE,e,r),u(c(t),r)},f=e=>{if(y.has(e))return;const n=c(e);y.add(e);const i=[],s=o(e),p=a(e,g);void 0===s?t.debug(n+":",e.message):l(e,fe.MESSAGE,s,i);let f=r(e);"string"==typeof f&&f.length>=1&&!f.endsWith("\n")&&(f+="\n"),t.debug("",f);for(const t of p)l(e,fe.NOTE,t,i);u(n,i)},d=ue.map(([e,r])=>{const o=(...r)=>{const o=[],n=p(r,o);t[e](...n),u(void 0,o)};return P(o,"name",{value:e}),[e,n(o)]}),b=ye.filter(([e,r])=>e in t).map(([e,r])=>{const o=(...r)=>{t[e](...r)};return P(o,"name",{value:e}),[e,n(o)]}),h=m([...d,...b]);return n(h)};n(de);n((t,e,r)=>{const o=ge.filter(([e,r])=>e in t).map(([r,o])=>[r,n((...n)=>{(void 0===o||e.canLog(o))&&t[r](...n)})]),a=m(o);return n(a)});const me=console,Pe=["getTypeName","getFunctionName","getMethodName","getFileName","getLineNumber","getColumnNumber","getEvalOrigin","isToplevel","isEval","isNative","isConstructor","isAsync","getPosition","getScriptNameOrSourceURL","toString"],be=t=>{const e=m(Pe.map(e=>[e,()=>t[e]()]));return Object.create(e,{})},he=t=>!0,Se=t=>"\n at "+t,Ee=(t,e)=>[...e.filter(he).map(Se)].join("");function we(t,e,o){const n=new WeakMap,a={captureStackTrace(e,r=a.captureStackTrace){"function"!=typeof t.captureStackTrace?Reflect.set(e,"stack",""):t.captureStackTrace(e,r)},getStackString(t){n.has(t)||t.stack;const e=n.get(t);return e?Ee(0,e):""},prepareStackTrace(t,e){if(n.set(t,e),"unsafe"===o){return`${t}${Ee(0,e)}`}return""}},i=a.prepareStackTrace;t.prepareStackTrace=i;const s=new WeakSet([i]),c=t=>{if(s.has(t))return t;const e={prepareStackTrace:(e,r)=>(n.set(e,r),t(e,(t=>t.map(be))(r)))};return s.add(e.prepareStackTrace),e.prepareStackTrace};return r(e,{captureStackTrace:{value:a.captureStackTrace,writable:!0,enumerable:!1,configurable:!0},stackTraceLimit:{get(){if("number"==typeof t.stackTraceLimit)return t.stackTraceLimit},set(e){"number"!=typeof t.stackTraceLimit||(t.stackTraceLimit=e)},enumerable:!1,configurable:!0},prepareStackTrace:{get:()=>t.prepareStackTrace,set(e){if("function"==typeof e){const r=c(e);t.prepareStackTrace=r}else t.prepareStackTrace=i},enumerable:!1,configurable:!0}}),a.getStackString}const Te={getStackString:t=>""};const{details:Ie,quote:ve}=$t;let Ae,_e=!1;const ke=function(){const t=new WeakSet,{harden:e}={harden(e){const r=new Set,o=new WeakMap;function n(e,n){if(Object(e)!==e)return;const a=typeof e;if("object"!==a&&"function"!==a)throw new TypeError("Unexpected typeof: "+a);t.has(e)||r.has(e)||(r.add(e),o.set(e,n))}function a(t){st(t);const e=o.get(t)||"unknown",r=ct(t);n(pt(t),e+".__proto__"),lt(r).forEach(t=>{const o=`${e}.${String(t)}`,a=r[t];"value"in a?n(a.value,""+o):(n(a.get,o+"(get)"),n(a.set,o+"(set)"))})}return n(e),r.forEach(a),r.forEach(t.add,t),e}};return e}(),Fe=()=>!1;function xe(t,o,n,p={}){p={...Ae,...p};const{dateTaming:l="safe",errorTaming:g="safe",mathTaming:d="safe",regExpTaming:m="safe",localeTaming:S="safe",consoleTaming:E="safe",overrideTaming:w="moderate",...T}=p,I=Reflect.ownKeys(T);if($t(0===I.length,Ie`lockdown(): non supported option ${ve(I)}`),Ae){for(const t of u(Ae))$t(p[t]===Ae[t],Ie`lockdown(): cannot re-invoke with different option ${ve(t)}`);return Fe}Ae={dateTaming:l,errorTaming:g,mathTaming:d,regExpTaming:m,localeTaming:S,consoleTaming:E,overrideTaming:w};const v=nt();v.addIntrinsics(function(){try{(0,Function.prototype.constructor)("return 1")}catch(t){return{}}const t={};function e(e,o,n){let a;try{a=(0,eval)(n)}catch(t){if(t instanceof SyntaxError)return;throw t}const i=c(a),s=function(){throw new TypeError("Not available")};r(s,{prototype:{value:i},name:{value:e,writable:!1,enumerable:!1,configurable:!0}}),r(i,{constructor:{value:s}}),s!==Function.prototype.constructor&&f(s,Function.prototype.constructor),t[o]=s}return e("Function","%InertFunction%","(function(){})"),e("GeneratorFunction","%InertGeneratorFunction%","(function*(){})"),e("AsyncFunction","%InertAsyncFunction%","(async function(){})"),e("AsyncGeneratorFunction","%InertAsyncGeneratorFunction%","(async function*(){})"),t}()),v.addIntrinsics(function(t="safe"){if("safe"!==t&&"unsafe"!==t)throw new Error("unrecognized dateTaming "+t);const e=Date,o=e.prototype,n={now:()=>NaN},a=({powers:t="none"}={})=>{let n;return n="original"===t?function(...t){return void 0===new.target?Reflect.apply(e,void 0,t):Reflect.construct(e,t,new.target)}:function(...t){return void 0===new.target?"Invalid Date":(0===t.length&&(t=[NaN]),Reflect.construct(e,t,new.target))},r(n,{length:{value:7},prototype:{value:o,writable:!1,enumerable:!1,configurable:!1},parse:{value:Date.parse,writable:!0,enumerable:!1,configurable:!0},UTC:{value:Date.UTC,writable:!0,enumerable:!1,configurable:!0}}),n},i=a({powers:"original"}),s=a({power:"none"});return r(i,{now:{value:Date.now,writable:!0,enumerable:!1,configurable:!0}}),r(s,{now:{value:n.now,writable:!0,enumerable:!1,configurable:!0}}),r(o,{constructor:{value:s}}),{"%InitialDate%":i,"%SharedDate%":s}}(l)),v.addIntrinsics(function(t="safe"){if("safe"!==t&&"unsafe"!==t)throw new Error("unrecognized errorTaming "+t);const e=Error,o=e.prototype,n="function"==typeof e.captureStackTrace?"v8":"unknown",a=(t={})=>{const a=function(...t){let r;return r=void 0===new.target?b(e,this,t):h(e,t,new.target),"v8"===n&&e.captureStackTrace(r,a),r};return r(a,{length:{value:1},prototype:{value:o,writable:!1,enumerable:!1,configurable:!1}}),a},i=a({powers:"original"}),s=a({powers:"none"});r(o,{constructor:{value:s}});for(const t of z)f(t,s);let c=Te.getStackString;return"v8"===n&&(c=we(e,i,t)),{"%InitialGetStackString%":c,"%InitialError%":i,"%SharedError%":s}}(g)),v.addIntrinsics(function(t="safe"){if("safe"!==t&&"unsafe"!==t)throw new Error("unrecognized mathTaming "+t);const r=Math,o=r,{random:n,...a}=i(r);return{"%InitialMath%":o,"%SharedMath%":e(Object.prototype,a)}}(d)),v.addIntrinsics(function(t="safe"){if("safe"!==t&&"unsafe"!==t)throw new Error("unrecognized regExpTaming "+t);const e=RegExp,o=e.prototype,n=(t={})=>{const n=function(...t){return void 0===new.target?e(...t):Reflect.construct(e,t,new.target)};return r(n,{length:{value:2},prototype:{value:o,writable:!1,enumerable:!1,configurable:!1},[Symbol.species]:a(e,Symbol.species)}),n},i=n(),s=n();return"unsafe"!==t&&delete o.compile,r(o,{constructor:{value:s}}),{"%InitialRegExp%":i,"%SharedRegExp%":s}}(m)),v.addIntrinsics(n()),v.completePrototypes();const A=v.finalIntrinsics();let _;"unsafe"!==g&&(_=A["%InitialGetStackString%"]);const k=((t="safe",e)=>{if("safe"!==t&&"unsafe"!==t)throw new Error("unrecognized consoleTaming "+t);if("unsafe"===t)return{console:me};let r;r=void 0===e?Rt:{...Rt,getStackString:e};return{console:de(me,r)}})(E,_);globalThis.console=k.console,function(t,e="safe"){if("safe"!==e&&"unsafe"!==e)throw new Error("unrecognized dateTaming "+e);if("unsafe"!==e){P(String.prototype,"localeCompare",{value:Lt});for(const e of s(t)){const r=t[e];if(r===Object(r))for(const t of s(r)){const e=Nt.exec(t);if(e){$t("function"==typeof r[t],Mt`expected ${Ct(t)} to be a function`);const o=`${e[1]}${e[2]}`,n=r[o];$t("function"==typeof n,Mt`function ${Ct(o)} not found`),P(r,t,{value:n})}}}}}(A,S);const x=G();return dt(A,x),function(){try{(0,Object.prototype.__lookupGetter__)("x")}catch(t){return}function t(t){if(null==t)throw new TypeError("can't convert undefined or null to object");return Object(t)}function e(t){return"symbol"==typeof t?t:""+t}function o(t,e){if("function"!=typeof t)throw TypeError(`invalid ${e} usage`);return t}r(y,{__defineGetter__:{value:function(e,r){const n=t(this);P(n,e,{get:o(r,"getter"),enumerable:!0,configurable:!0})}},__defineSetter__:{value:function(e,r){const n=t(this);P(n,e,{set:o(r,"setter"),enumerable:!0,configurable:!0})}},__lookupGetter__:{value:function(r){let o,n=t(this);for(r=e(r);n&&!(o=a(n,r));)n=c(n);return o&&o.get}},__lookupSetter__:{value:function(r){let o,n=t(this);for(r=e(r);n&&!(o=a(n,r));)n=c(n);return o&&o.set}}})}(),le(globalThis,A,D,t,0,{nativeBrander:x}),function(){return function(t,e){function r(t,e,r,o){if("value"in o&&o.configurable){const{value:a}=o;function n(){return a}P(n,"originalValue",{value:a,writable:!1,enumerable:!1,configurable:!1}),P(e,r,{get:n,set:function(o){if(e===this)throw new TypeError(`Cannot assign to read only property '${String(r)}' of '${t}'`);F(this,r)?this[r]=o:P(this,r,{value:o,writable:!0,enumerable:!0,configurable:!0})},enumerable:o.enumerable,configurable:o.configurable})}}function o(t,e,o){const n=a(e,o);n&&r(t,e,o,n)}function n(t,e){const o=i(e);o&&bt(o).forEach(n=>r(t,e,n,o[n]))}let c;switch(e){case"min":c=Pt;break;case"moderate":c=mt;break;default:throw new Error("unrecognized overrideTaming "+e)}!function t(e,r,i){for(const c of s(i)){const s=a(r,c);if(!s||s.get||s.set)continue;const p=`${e}.${String(c)}`,l=i[c];if(!0===l)o(p,r,c);else if("*"===l)n(p,s.value);else{if(!ht(l))throw new TypeError("Unexpected override enablement plan "+p);t(p,s.value,l)}}}("root",t,c)}(A,w),ke(A),_e=!0,!0}}const Ue=new WeakMap,Re={constructor:at,get globalThis(){return Ue.get(this).globalObject},get name(){return Ue.get(this).name},evaluate(t,o={}){if("string"!=typeof t)throw new TypeError("first argument of evaluate() must be a string");const{transforms:n=[],sloppyGlobalsMode:a=!1,__moduleShimLexicals__:s,__evadeHtmlCommentTest__:c=!1,__evadeImportExpressionTest__:p=!1,__rejectSomeDirectEvalExpressions__:l=!0}=o,u=[...n];!0===c&&u.push(Kt),!0===p&&u.push(Xt),!0===l&&u.push(ee);const y=Ue.get(this);let{globalTransforms:g}=y;const{globalObject:f,globalLexicals:d}=y;let m=d;return void 0!==s&&(g=void 0,m=e(null,i(d)),r(m,i(s))),ie(t,f,m,{globalTransforms:g,localTransforms:u,sloppyGlobalsMode:a})},toString:()=>"[object Compartment]"};r(at,{prototype:{value:Re}});const Oe=(e,r,o)=>{function a(a={},i={},c={}){if(void 0===new.target)throw new TypeError("Class constructor Compartment cannot be invoked without 'new'");const{name:p="<unknown>",transforms:l=[],__shimTransforms__:u=[],globalLexicals:y={}}=c,g=[...l,...u],f={};le(f,r,W,e,this.constructor.prototype,{globalTransforms:g,nativeBrander:o}),t(f,a);const d=s(y).filter(t=>!Bt(t));if(d.length)throw new Error(`Cannot create compartment with invalid names for global lexicals: ${d.join(", ")}; these names would not be lexically mentionable`);Ue.set(this,{name:p,globalTransforms:g,globalObject:f,globalLexicals:n({...y})})}return a.prototype=Re,a},$e=G(),Me=Oe(Oe,function(t){const e=nt();return e.addIntrinsics(ot(t,W)),e.finalIntrinsics()}(globalThis),$e);t(globalThis,{harden:t=>($t(_e,"Cannot harden before lockdown"),ke(t)),lockdown:((t,e,r)=>(e={})=>xe(t,0,r,e)())(Oe,0,(function(){const t=Function.prototype.constructor,e=typeof Symbol&&Symbol.iterator||"@@iterator",r=typeof Symbol&&Symbol.matchAll||"@@matchAll",o=a(arguments,"callee").get,n=(new String)[e](),i=c(n),s=RegExp.prototype[r]&&(new RegExp)[r](),p=s&&c(s),l=(new Array)[e](),u=c(l),y=c(Float32Array),g=(new Map)[e](),f=c(g),d=(new Set)[e](),m=c(d),P=c(u);function*b(){}const h=it(b),S=h.prototype;async function*E(){}const w=it(E),T=w.prototype,I=T.prototype,v=c(I);async function A(){}const _=it(A),k={"%InertFunction%":t,"%ArrayIteratorPrototype%":u,"%InertAsyncFunction%":_,"%AsyncGenerator%":T,"%InertAsyncGeneratorFunction%":w,"%AsyncGeneratorPrototype%":I,"%AsyncIteratorPrototype%":v,"%Generator%":S,"%InertGeneratorFunction%":h,"%IteratorPrototype%":P,"%MapIteratorPrototype%":f,"%RegExpStringIteratorPrototype%":p,"%SetIteratorPrototype%":m,"%StringIteratorPrototype%":i,"%ThrowTypeError%":o,"%TypedArray%":y,"%InertCompartment%":at};return k})),Compartment:Me,assert:$t})}));
{
"name": "ses",
"version": "0.11.0",
"version": "0.11.1",
"private": false,
"description": "Secure ECMAScript",
"keywords": [
"confinement",
"isolation",
"secure execution",
"third-party code"
],
"author": "Agoric",
"license": "Apache-2.0",
"homepage": "https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/Agoric/SES-shim.git"
},
"bugs": {
"url": "https://github.com/Agoric/SES-shim/issues"
},
"type": "module",
"types": "./index.d.ts",
"main": "./dist/ses.cjs",
"module": "./ses.js",
"browser": "./dist/ses.umd.js",
"types": "./index.d.ts",
"unpkg": "./dist/ses.umd.js",

@@ -27,10 +42,10 @@ "exports": {

"scripts": {
"prepublish": "yarn clean && yarn build",
"depcheck": "depcheck",
"prepublish": "yarn run clean && yarn build",
"clean": "rm -rf dist",
"lint": "eslint '**/*.js'",
"lint": "yarn lint:types && yarn lint:js",
"lint:types": "tsc --build jsconfig.json",
"lint:js": "eslint '**/*.js'",
"lint-fix": "eslint --fix '**/*.js'",
"qt": "tap --no-esm --no-coverage --reporter spec 'test/**/*.test.js'",
"test": "yarn build && yarn qt",
"test262": "tap --no-esm --no-coverage --reporter spec test262/*.js",
"test": "yarn build && yarn ava",
"qt": "yarn ava",
"test:platform-compatability": "node test/package/test.cjs",

@@ -42,6 +57,7 @@ "build": "rollup --config rollup.config.js",

"@agoric/babel-standalone": "^7.9.5",
"@agoric/make-hardener": "^0.1.0",
"@agoric/make-hardener": "^0.1.2",
"@agoric/transform-module": "^0.4.1"
},
"devDependencies": {
"@agoric/eslint-config": "^0.1.0",
"@agoric/test262-runner": "~0.1.0",

@@ -51,8 +67,2 @@ "@rollup/plugin-commonjs": "^13.0.0",

"babel-eslint": "^10.0.3",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-prettier": "^3.1.2",
"http-server": "^0.12.1",

@@ -62,19 +72,19 @@ "prettier": "^1.19.1",

"sinon": "8.0.4",
"tap": "14.10.5",
"tape": "4.12.1"
"ava": "^3.12.1"
},
"keywords": [
"confinement",
"isolation",
"secure execution",
"third-party code"
],
"homepage": "https://github.com/Agoric/SES-shim",
"repository": {
"type": "git",
"url": "git+https://github.com/Agoric/SES-shim.git"
"ava": {
"files": [
"*test*/**/test-*.js"
],
"require": []
},
"bugs": {
"url": "https://github.com/Agoric/SES-shim/issues"
"eslintConfig": {
"extends": [
"@agoric"
]
},
"prettier": {
"trailingComma": "all",
"singleQuote": true
},
"files": [

@@ -81,0 +91,0 @@ "LICENSE*",

@@ -33,8 +33,15 @@ # Secure EcmaScript (SES)

SES introduces the `lockdown()` function.
Calling `lockdown()` alters the surrounding execution enviornment, or
Calling `lockdown()` alters the surrounding execution environment, or
**realm**, such that no two programs running in the same realm can observe or
interfere with each other until they have been introduced.
To this end, `lockdown()` freezes all objects accessible to any program in the
realm.
To do this, `lockdown()` tamper-proofs all of the JavaScript intrinsics, to
prevent **prototype pollution**.
After that, no program can subvert the methods of these objects (preventing
some **man in the middle attacks**).
Also, no program can use these mutable objects to pass notes to parties that
haven't been expressly introduced (preventing some **covert communication
channels**).
Lockdown freezes all objects accessible to any program in the realm.
The set of accessible objects includes but is not limited to: `globalThis`,

@@ -44,6 +51,9 @@ `[].__proto__`, `{}.__proto__`, `(() => {}).__proto__` `(async () =>

The `lockdown()` function also **tames** some of those accessible objects
that have powers that would otherwise allow programs to observe or interfere
with one another like clocks, random number generators, and regular
expressions.
The `lockdown()` function also **tames** some objects including regular
expressions, locale methods, and errors.
A tamed `RexExp` does not have the deprecated `compile` method.
A tamed error does not have a V8 `stack`, but the `console` can still see the
stack.
Lockdown replaces locale methods like `String.prototype.localeCompare` with
lexical versions that do not reveal the user locale.

@@ -60,2 +70,6 @@ ```js

Lockdown does not erase any powerful objects from the initial global scope.
Instead, **Compartments** give complete control over what powerful objects
exist for client code.
### Harden

@@ -101,4 +115,4 @@

the same batch of intrinsics like `Array` with the surrounding compartment.
The concept of a compartment implies the existence of a "start compartment",
the initial execution environment of a **realm**.
The concept of a compartment implies an **initial compartment**, the initial
execution environment of a **realm**.

@@ -144,2 +158,59 @@ In the following example, we create a compartment endowed with a `print()`

The global scope of every compartment includes a shallow, specialized copy of
the JavaScript intrinsics, omitting `Date.now` and `Math.random`.
Comaprtments leave these out since they can be used as covert communication
channels between programs.
However, a compartment may be expressly given access to these objects
through:
* the first argument to the compartment constructor or
* by assigning them to the compartment's `globalThis` after construction.
```js
const powerfulCompartment = new Compartment({ Math });
powerfulCompartment.globalThis.Date = Date;
```
### Compartment + Lockdown
Together, Compartment and lockdown isolate client code in an environment with
limited powers and communication channels.
A compartment has only the capabilities it is expressly given and cannot modify
any of the shared intrinsics.
Every compartment gets its own globals, including such objects as the
`Function` constructor.
Yet, compartment and lockdown do not break `instanceof` for any of these
intrinsics types!
All of the evaluators in one compartment are captured by that compartment's
global scope, including `Function`, indirect `eval`, dynamic `import`, and its
own `Compartment` constructor for child compartments.
For example, the `Function` constructor in one compartment creates functions
that evaluate in the global scope of that compartment.
```js
const f = new Function("return this");
f() === globalThis
// true
```
Lockdown prepares for compartments with separate globals by freezing
their shared prototypes and replacing their prototype constructors
with powerless dummies.
So, `Function` is different in two compartments, `Function.prototype` is the
same, and `Function` is not the same as `Function.prototype.constructor`.
The `Function.prototype.constructor` can only throw exceptions.
So, a function passed between compartments does not carry access to
its compartment's globals along with it.
Yet, `f instanceof Function` works, even when `f` and `Function` are
from different compartments.
The `globalThis` in each compartment is mutable.
This can and should be frozen before running any dynamic code in that
compartment, yet is not strictly necessary if the compartment only
runs code from a single party.
### Modules
Any code executed within a compartment shares a set of module instances.

@@ -351,3 +422,3 @@ For modules to work within a compartment, the creator must provide

### Imperfect emulation
### Enabling Override by Assignment

@@ -368,2 +439,50 @@ JavaScript suffers from the so-called

The file [src/enablements.js](src/enablements.js) exports two different
whitelists definining which data properties to convert to enable override by
assignment, `moderateEnablements` and `minEnablements`.
```js
lockdown({ overrideTaming: 'moderate' });
```
To select the moderate enablements, set the optional `overrideTaming` option to
`lockdown` to the string `'moderate'`.
This is intended to be fairly minimal, but we expand it as needed, when we
encounter code which should run under SES but is prevented from doing so
by the override mistake. As we encouter these we list them in the comments
next to each enablement. This process has rapidly converged. We rarely come
across any more such cases. If you find one, please file an issue. Thanks.
Unfortunately, the VSCode debugger's object inspector, when showing the
properties of an object,
show the own properties *plus any inherited accessor properties*.
Even the moderate taming creates so many accessors on widely shared prototypes
as to make the object inspector useless. To create a pleasant debugging
experience where possible, use the `'min'` enablements instead.
```js
lockdown({ overrideTaming: 'min' });
```
The `'min'` enablements setting serves two purposes: it enables a pleasant
debugging experience in VSCode, and it helps ensure that new code does not
depend on anything more than these being enabled, which is good practice.
All code from Agoric will be compatible with both settings.
:warning: Compatibility notice: Currently if the `overrideTaming` option is
omitted, it defaults to `moderate`, ensuring compatibility with the code
written before we introduced this option.
We are likely to make two changes which will cause
fewer enablements, which may break some old code. We will of course bump the
version number appropriately to indicate this.
* We are likely to change the default from `'moderate'` to `'min'`. Code
that depends on the moderate taming can prepare by stating their
dependency explicitly using the `overrideTaming` option.
* Currently the moderate taming enables all own data properties of
`Object.prototype`, `Array.prototype` and more.
This is way more than necessary,
resulting in the VSCode debugging debacle. Instead, we are likely to
explicitly enumerate all the properties to enable, and to enumerate far
fewer. Again, as we encounter cases, we'll expand to accomodate, and
expect to again rapidly coverge.
## Bug Disclosure

@@ -370,0 +489,0 @@

@@ -76,2 +76,4 @@ /**

* http://web.archive.org/web/20160805225710/http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming
*
* @param {(thisArg: Object, ...args: any[]) => any} fn
*/

@@ -102,2 +104,4 @@ export const uncurryThis = fn => (thisArg, ...args) => apply(fn, thisArg, args);

* Return the constructor from an instance.
*
* @param {Function} fn
*/

@@ -104,0 +108,0 @@ export const getConstructorOf = fn =>

@@ -16,2 +16,7 @@ // This module exports both Compartment and StaticModuleRecord because they

import { InertCompartment } from './inert.js';
import {
evadeHtmlCommentTest,
evadeImportExpressionTest,
rejectSomeDirectEvalExpressions,
} from './transforms.js';

@@ -34,6 +39,5 @@ // privateFields captures the private state for each compartment.

* @param {string} source is a JavaScript program grammar construction.
* @param {{
* transforms: Array<Transform>,
* sloppyGlobalsMode: bool,
* }} options.
* @param {Object} [options]
* @param {Array<Transform>} [options.transforms]
* @param {bool} [options.sloppyGlobalsMode]
*/

@@ -53,4 +57,16 @@ evaluate(source, options = {}) {

__moduleShimLexicals__ = undefined,
__evadeHtmlCommentTest__ = false,
__evadeImportExpressionTest__ = false,
__rejectSomeDirectEvalExpressions__ = true, // Note default on
} = options;
const localTransforms = [...transforms];
if (__evadeHtmlCommentTest__ === true) {
localTransforms.push(evadeHtmlCommentTest);
}
if (__evadeImportExpressionTest__ === true) {
localTransforms.push(evadeImportExpressionTest);
}
if (__rejectSomeDirectEvalExpressions__ === true) {
localTransforms.push(rejectSomeDirectEvalExpressions);
}

@@ -105,2 +121,10 @@ const compartmentFields = privateFields.get(this);

* code in a context bound to a new global creates a new compartment.
*
* @param {Object} endowments
* @param {Object} _moduleMap
* @param {Object} [options]
* @param {string} [options.name]
* @param {Array<Transform>} [options.transforms]
* @param {Array<Transform>} [options.__shimTransforms__]
* @param {Object} [options.globalLexicals]
*/

@@ -110,3 +134,3 @@ function Compartment(endowments = {}, _moduleMap = {}, options = {}) {

throw new TypeError(
`Class constructor Compartment cannot be invoked without 'new'`,
"Class constructor Compartment cannot be invoked without 'new'",
);

@@ -113,0 +137,0 @@ }

@@ -14,3 +14,3 @@ // Adapted from SES/Caja

import enablements from './enablements.js';
import { moderateEnablements, minEnablements } from './enablements.js';

@@ -74,4 +74,5 @@ const { ownKeys } = Reflect;

* @param {Record<string, any>} intrinsics
* @param {'min' | 'moderate'} overrideTaming
*/
export default function enablePropertyOverrides(intrinsics) {
export default function enablePropertyOverrides(intrinsics, overrideTaming) {
function enable(path, obj, prop, desc) {

@@ -94,3 +95,5 @@ if ('value' in desc && desc.configurable) {

throw new TypeError(
`Cannot assign to read only property '${prop}' of '${path}'`,
`Cannot assign to read only property '${String(
prop,
)}' of '${path}'`,
);

@@ -132,2 +135,5 @@ }

}
// TypeScript does not allow symbols to be used as indexes because it
// cannot recokon types of symbolized properties.
// @ts-ignore
ownKeys(descs).forEach(prop => enable(path, obj, prop, descs[prop]));

@@ -146,4 +152,6 @@ }

// Plan has no symbol keys and we use getOwnPropertyNames()
// to avoid issues with stringification of property name.
const subPath = `${path}.${prop}`;
// so `prop` cannot only be a string, not a symbol. We coerce it in place
// with `String(..)` anyway just as good hygiene, since these paths are just
// for diagnostic purposes.
const subPath = `${path}.${String(prop)}`;
const subPlan = plan[prop];

@@ -163,4 +171,19 @@

let plan;
switch (overrideTaming) {
case 'min': {
plan = minEnablements;
break;
}
case 'moderate': {
plan = moderateEnablements;
break;
}
default: {
throw new Error(`unrecognized overrideTaming ${overrideTaming}`);
}
}
// Do the repair.
enableProperties('root', intrinsics, enablements);
enableProperties('root', intrinsics, plan);
}
/**
* @fileoverview Exports {@code enablements}, a recursively defined
* @file Exports {@code enablements}, a recursively defined
* JSON record defining the optimum set of intrinsics properties

@@ -59,3 +59,3 @@ * that need to be "repaired" before hardening is applied on

export default {
export const moderateEnablements = {
'%ObjectPrototype%': '*',

@@ -69,3 +69,3 @@

name: true,
toString: true,
toString: true, // set by "rollup"
},

@@ -76,3 +76,3 @@

message: true,
name: true, // set by "precond"
name: true, // set by "precond", "ava"
toString: true, // set by "bluebird"

@@ -121,1 +121,15 @@ },

};
export const minEnablements = {
'%ObjectPrototype%': {
toString: true,
},
'%FunctionPrototype%': {
toString: true, // set by "rollup"
},
'%ErrorPrototype%': {
name: true, // set by "precond", "ava"
},
};

@@ -84,3 +84,3 @@ // Copyright (C) 2019 Agoric, under Apache License 2.0

// Keep in mind that the vast majority of calls to `details` creates
// a details token that is never used, so this path much remain as fast as
// a details token that is never used, so this path must remain as fast as
// possible. Hence we store what we've got with little processing, postponing

@@ -117,3 +117,3 @@ // all the work to happen only if needed, for example, if an assertion fails.

* @param {HiddenDetails} hiddenDetails
* @return {LogArgs}
* @returns {LogArgs}
*/

@@ -152,18 +152,24 @@ const getLogArgs = ({ template, args }) => {

/**
* @param {HiddenDetails} hiddenDetails
* @param {ErrorConstructor} ErrorConstructor
* @return {Error}
* @type {AssertMakeError}
*/
const makeDetailedError = (hiddenDetails, ErrorConstructor) => {
const makeError = (
optDetails = details`Assert failed`,
ErrorConstructor = Error,
) => {
if (typeof optDetails === 'string') {
// If it is a string, use it as the literal part of the template so
// it doesn't get quoted.
optDetails = details([optDetails]);
}
const hiddenDetails = hiddenDetailsMap.get(optDetails);
if (hiddenDetails === undefined) {
throw new Error(`unrecognized details ${optDetails}`);
}
const messageString = getMessageString(hiddenDetails);
const error = new ErrorConstructor(messageString);
hiddenMessageLogArgs.set(error, getLogArgs(hiddenDetails));
// TODO Having a `debugger` statement in production code is
// controversial
// eslint-disable-next-line no-debugger
debugger;
// If we get rid of the `debugger` statement above, the next line is a
// particularly fruitful place to put a breakpoint.
// The next line is a particularly fruitful place to put a breakpoint.
return error;
};
freeze(makeError);

@@ -287,2 +293,3 @@ // /////////////////////////////////////////////////////////////////////////////

* `optRaise(error)` would still happen.
*
* @param {((error: Error) => void)=} optRaise

@@ -297,12 +304,3 @@ * @returns {Assert}

) => {
if (typeof optDetails === 'string') {
// If it is a string, use it as the literal part of the template so
// it doesn't get quoted.
optDetails = details([optDetails]);
}
const hiddenDetails = hiddenDetailsMap.get(optDetails);
if (hiddenDetails === undefined) {
throw new Error(`unrecognized details ${optDetails}`);
}
const error = makeDetailedError(hiddenDetails, ErrorConstructor);
const error = makeError(optDetails, ErrorConstructor);
if (optRaise !== undefined) {

@@ -366,2 +364,3 @@ optRaise(error);

const assert = assign(baseAssert, {
error: makeError,
fail,

@@ -368,0 +367,0 @@ equal,

@@ -86,22 +86,22 @@ // @ts-check

*
const consoleOmittedProperties = freeze([
'memory', // Chrome
'exception', // FF, MDN
'_ignoreErrors', // Node
'_stderr', // Node
'_stderrErrorHandler', // Node
'_stdout', // Node
'_stdoutErrorHandler', // Node
'_times', // Node
'context', // Chrome, Node
'record', // Safari
'recordEnd', // Safari
* const consoleOmittedProperties = freeze([
* 'memory', // Chrome
* 'exception', // FF, MDN
* '_ignoreErrors', // Node
* '_stderr', // Node
* '_stderrErrorHandler', // Node
* '_stdout', // Node
* '_stdoutErrorHandler', // Node
* '_times', // Node
* 'context', // Chrome, Node
* 'record', // Safari
* 'recordEnd', // Safari
*
* 'screenshot', // Safari
* // Symbols
* '@@toStringTag', // Chrome: "Object", Safari: "Console"
* // A variety of other symbols also seen on Node
* ]);
*/
'screenshot', // Safari
// Symbols
'@@toStringTag', // Chrome: "Object", Safari: "Console"
// A variety of other symbols also seen on Node
]);
*/
// /////////////////////////////////////////////////////////////////////////////

@@ -207,2 +207,3 @@

* @param {readonly any[]} logArgs
* @param {Array<Error>} subErrorsSink
*/

@@ -220,9 +221,18 @@ const logErrorInfo = (error, kind, logArgs, subErrorsSink) => {

*
* @param {string} label
* @param {string | undefined} optTag
* @param {Error[]} subErrors
* @returns {void}
*/
const logSubErrors = (label, subErrors) => {
const logSubErrors = (optTag = undefined, subErrors) => {
if (subErrors.length >= 1) {
baseConsole.groupCollapsed(label);
let label;
if (subErrors.length === 1) {
label = `Nested error`;
} else {
label = `Nested ${subErrors.length} errors`;
}
if (optTag !== undefined) {
label = `${label} under ${optTag}`;
}
baseConsole.group(label);
try {

@@ -293,3 +303,3 @@ for (const subError of subErrors) {

baseConsole[level](...argTags);
logSubErrors('', subErrors);
logSubErrors(undefined, subErrors);
};

@@ -296,0 +306,0 @@ defineProperty(levelMethod, 'name', { value: level });

@@ -33,2 +33,3 @@ // @ts-check

* object identity.
*
* @param {any} payload

@@ -35,0 +36,0 @@ * @returns {string}

@@ -16,3 +16,3 @@ // @ts-check

*
* @param {string} consoleTaming,
* @param {"safe" | "unsafe"} consoleTaming
* @param {GetStackString=} optGetStackString

@@ -19,0 +19,0 @@ */

/// <reference types="ses"/>
// Much of this file is duplicated at
// https://github.com/Agoric/agoric-sdk/blob/master/packages/assert/src/types.js
// Coordinate edits until we refactor to avoid this duplication
/**

@@ -15,2 +19,14 @@ * @callback BaseAssert

/**
* @callback AssertMakeError
*
* The `assert.error` method, recording details for the console.
*
* The optional `optDetails` can be a string.
* @param {Details=} optDetails The details of what was asserted
* @param {ErrorConstructor=} ErrorConstructor An optional alternate error
* constructor to use.
* @returns {Error}
*/
/**
* @callback AssertFail

@@ -184,3 +200,3 @@ *

*
* @param {any} payload What to declassify
* @param {*} payload What to declassify
* @returns {StringablePayload} The declassified payload

@@ -207,3 +223,12 @@ */

*
* @typedef { typeof baseAssert & { typeof: AssertTypeof, fail: AssertFail, equal: AssertEqual, string: AssertString, note: AssertNote, details: DetailsTag, quote: AssertQuote } } Assert
* @typedef { BaseAssert & {
* typeof: AssertTypeof,
* error: AssertMakeError,
* fail: AssertFail,
* equal: AssertEqual,
* string: AssertString,
* note: AssertNote,
* details: DetailsTag,
* quote: AssertQuote
* } } Assert
*/

@@ -210,0 +235,0 @@

@@ -17,2 +17,10 @@ // Portions adapted from V8 - Copyright 2016 the V8 project authors.

* eval(), Function(), Evalutator.prototype.evaluate().
*
* @param {string} source
* @param {Object} globalObject
* @param {Objeect} localObject
* @param {Object} [options]
* @param {Array<Transform>} [options.localTransforms]
* @param {Array<Transform>} [options.globalTransforms]
* @param {bool} [options.sloppyGlobalsMode]
*/

@@ -19,0 +27,0 @@ export function performEval(

@@ -7,2 +7,4 @@ import { getOwnPropertyDescriptor, getPrototypeOf } from './commons.js';

* Helper function to improve readability, similar to Object.getPrototypeOf().
*
* @param {Object} obj
*/

@@ -17,2 +19,4 @@ function getConstructorOf(obj) {

* traversal from the global object.
*
* @returns {Object}
*/

@@ -19,0 +23,0 @@ export function getAnonymousIntrinsics() {

@@ -12,2 +12,11 @@ import { defineProperty, objectHasOwnProperty, entries } from './commons.js';

* `sharedGlobalPropertyNames`.
*
* @param {Object} globalObject
* @param {Object} intrinsics
* @param {Object} newGlobalPropertyNames
* @param {Function} makeCompartmentConstructor
* @param {Object} compartmentPrototype
* @param {Object} [options]
* @param {Array<Transform>} [options.globalTransforms]
* @param {(Object) => void} [options.nativeBrander]
*/

@@ -14,0 +23,0 @@ export function initGlobalObject(

@@ -120,3 +120,3 @@ import {

throw new Error(
`isPseudoNative can only be called after finalIntrinsics`,
'isPseudoNative can only be called after finalIntrinsics',
);

@@ -146,2 +146,4 @@ }

* *original* unsafe (feral, untamed) bindings of these global variables.
*
* @param {Object} globalObject
*/

@@ -148,0 +150,0 @@ export function getGlobalIntrinsics(globalObject) {

@@ -64,2 +64,9 @@ // Copyright (C) 2018 Agoric

// behaved record, with only own data properties.
//
// The `'overrideTaming'` is not a safety issue. Rather it is a tradeoff
// between code compatibility, which is better with the `'moderate'`
// setting, and tool compatibility, which is better with the `'min'`
// setting. See
// https://github.com/Agoric/SES-shim/blob/master/packages/ses/README.md#enabling-override-by-assignment)
// for an explanation of when to use which.
options = { ...firstOptions, ...options };

@@ -73,2 +80,3 @@ const {

consoleTaming = 'safe',
overrideTaming = 'moderate',

@@ -104,2 +112,3 @@ ...extraOptions

consoleTaming,
overrideTaming,
};

@@ -174,3 +183,3 @@

// Circumvent the override mistake.
enablePropertyOverrides(intrinsics);
enablePropertyOverrides(intrinsics, overrideTaming);

@@ -177,0 +186,0 @@ // Finally register and optionally freeze all the intrinsics. This

import { performEval } from './evaluate.js';
/**
/*
* makeEvalFunction()

@@ -5,0 +5,0 @@ * A safe version of the native eval function which relies on

@@ -12,2 +12,4 @@ import { arrayJoin } from './commons.js';

* destructring `this`.
*
* @param {Array<string>} constants
*/

@@ -26,2 +28,4 @@ function buildOptimizer(constants) {

* inserted.
*
* @param {Array<string>} [constants]
*/

@@ -28,0 +32,0 @@ export function makeEvaluateFactory(constants = []) {

@@ -15,3 +15,3 @@ import {

/**
/*
* makeFunctionConstructor()

@@ -18,0 +18,0 @@ * A safe version of the native Function which relies on

@@ -67,3 +67,3 @@ // For brevity, in this file, as in module-load.js, the term "moduleRecord"

throw new TypeError(
`importHook must return a StaticModuleRecord constructed within the same Realm, or a custom record with both imports and an execute method`,
'importHook must return a StaticModuleRecord constructed within the same Realm, or a custom record with both imports and an execute method',
);

@@ -77,3 +77,3 @@ } else {

throw new TypeError(
`importHook must return a StaticModuleRecord with both imports and an execute method`,
'importHook must return a StaticModuleRecord with both imports and an execute method',
);

@@ -80,0 +80,0 @@ }

@@ -79,3 +79,3 @@ // Compartments need a mechanism to link a module from one compartment

throw new TypeError(
`Cannot enumerate keys, the module has not yet begun to execute`,
'Cannot enumerate keys, the module has not yet begun to execute',
);

@@ -99,3 +99,3 @@ }

throw new TypeError(
`Cannot prevent extensions of module exports namespace, the module has not yet begun to execute`,
'Cannot prevent extensions of module exports namespace, the module has not yet begun to execute',
);

@@ -108,3 +108,3 @@ }

throw new TypeError(
`Cannot check extensibility of module exports namespace, the module has not yet begun to execute`,
'Cannot check extensibility of module exports namespace, the module has not yet begun to execute',
);

@@ -118,3 +118,3 @@ }

setPrototypeOf(_target, _proto) {
throw new TypeError(`Cannot set prototype of module exports namespace`);
throw new TypeError('Cannot set prototype of module exports namespace');
},

@@ -128,3 +128,3 @@ defineProperty(_target, name, _descriptor) {

throw new TypeError(
`Cannot call module exports namespace, it is not a function`,
'Cannot call module exports namespace, it is not a function',
);

@@ -134,3 +134,3 @@ },

throw new TypeError(
`Cannot construct module exports namespace, it is not a constructor`,
'Cannot construct module exports namespace, it is not a constructor',
);

@@ -137,0 +137,0 @@ },

@@ -33,3 +33,3 @@ // This module exports both Compartment and StaticModuleRecord because they

/**
/*
* StaticModuleRecord captures the effort of parsing and analyzing module text

@@ -97,3 +97,3 @@ * so a cache of StaticModuleRecords may be shared by multiple Compartments.

throw new TypeError(
`Compartment must be constructed with an importHook and a resolveHook for it to be able to load modules`,
'Compartment must be constructed with an importHook and a resolveHook for it to be able to load modules',
);

@@ -193,3 +193,3 @@ }

throw new TypeError(
`Class constructor Compartment cannot be invoked without 'new'`,
"Class constructor Compartment cannot be invoked without 'new'",
);

@@ -196,0 +196,0 @@ }

@@ -43,3 +43,3 @@ // Adapted from SES/Caja - Copyright (C) 2011 Google Inc.

if (obj === undefined || obj === null) {
throw new TypeError(`can't convert undefined or null to object`);
throw new TypeError("can't convert undefined or null to object");
}

@@ -46,0 +46,0 @@ return Object(obj);

@@ -97,2 +97,4 @@ import {

* safe and only prevent performance optimization.
*
* @param {string} name
*/

@@ -109,5 +111,4 @@ export function isValidIdentifierName(name) {

/**
/*
* isImmutableDataProperty
*
*/

@@ -145,2 +146,5 @@

* safe and only prevent performance optimization.
*
* @param {Object} globalObject
* @param {Object} localObject
*/

@@ -147,0 +151,0 @@ export function getScopeConstants(globalObject, localObject = {}) {

@@ -32,3 +32,3 @@ import {

/**
/*
* createScopeHandler()

@@ -39,7 +39,7 @@ * ScopeHandler manages a Proxy which serves as the global scope for the

* - allow the very first (and only the very first) use of 'eval' to map to
* the real (unsafe) eval function, so it acts as a 'direct eval' and can
* access its lexical scope (which maps to the 'with' binding, which the
* ScopeHandler also controls).
* the real (unsafe) eval function, so it acts as a 'direct eval' and can
* access its lexical scope (which maps to the 'with' binding, which the
* ScopeHandler also controls).
* - ensure that all subsequent uses of 'eval' map to the safeEvaluator,
* which lives as the 'eval' property of the safeGlobal.
* which lives as the 'eval' property of the safeGlobal.
* - route all other property lookups at the safeGlobal.

@@ -46,0 +46,0 @@ * - hide the unsafeGlobal which lives on the scope chain above the 'with'.

@@ -49,3 +49,3 @@ import { defineProperties, getPrototypeOf, setPrototypeOf } from './commons.js';

/**
/*
* The process to repair constructors:

@@ -52,0 +52,0 @@ * 1. Create an instance of the function by evaluating syntax

@@ -15,3 +15,3 @@ import { getOwnPropertyNames, defineProperty } from './commons.js';

throw new TypeError(
`Cannot localeCompare with null or undefined "this" value`,
'Cannot localeCompare with null or undefined "this" value',
);

@@ -18,0 +18,0 @@ }

@@ -0,6 +1,14 @@

// @ts-check
import { stringSearch, stringSlice, stringSplit } from './commons.js';
import { getSourceURL } from './get-source-url.js';
// Find the first occurence of the given pattern and return
// the location as the approximate line number.
/**
* Find the first occurence of the given pattern and return
* the location as the approximate line number.
*
* @param {string} src
* @param {RegExp} pattern
* @returns {number}
*/
function getLineNumber(src, pattern) {

@@ -14,104 +22,211 @@ const index = stringSearch(src, pattern);

// https://www.ecma-international.org/ecma-262/9.0/index.html#sec-html-like-comments
// explains that JavaScript parsers may or may not recognize html
// comment tokens "<" immediately followed by "!--" and "--"
// immediately followed by ">" in non-module source text, and treat
// them as a kind of line comment. Since otherwise both of these can
// appear in normal JavaScript source code as a sequence of operators,
// we have the terrifying possibility of the same source code parsing
// one way on one correct JavaScript implementation, and another way
// on another.
//
// This shim takes the conservative strategy of just rejecting source
// text that contains these strings anywhere. Note that this very
// source file is written strangely to avoid mentioning these
// character strings explicitly.
// /////////////////////////////////////////////////////////////////////////////
// We do not write the regexp in a straightforward way, so that an
// apparennt html comment does not appear in this file. Thus, we avoid
// rejection by the overly eager rejectDangerousSources.
const htmlCommentPattern = new RegExp(`(?:${'<'}!--|--${'>'})`, 'g');
const htmlCommentPattern = new RegExp(`(?:${'<'}!--|--${'>'})`);
/**
* Conservatively reject the source text if it may contain text that some
* JavaScript parsers may treat as an html-like comment. To reject without
* parsing, `rejectHtmlComments` will also reject some other text as well.
*
* https://www.ecma-international.org/ecma-262/9.0/index.html#sec-html-like-comments
* explains that JavaScript parsers may or may not recognize html
* comment tokens "<" immediately followed by "!--" and "--"
* immediately followed by ">" in non-module source text, and treat
* them as a kind of line comment. Since otherwise both of these can
* appear in normal JavaScript source code as a sequence of operators,
* we have the terrifying possibility of the same source code parsing
* one way on one correct JavaScript implementation, and another way
* on another.
*
* This shim takes the conservative strategy of just rejecting source
* text that contains these strings anywhere. Note that this very
* source file is written strangely to avoid mentioning these
* character strings explicitly.
*
* We do not write the regexp in a straightforward way, so that an
* apparennt html comment does not appear in this file. Thus, we avoid
* rejection by the overly eager rejectDangerousSources.
*
* @param {string} src
* @returns {string}
*/
export function rejectHtmlComments(src) {
const linenum = getLineNumber(src, htmlCommentPattern);
if (linenum < 0) {
const lineNumber = getLineNumber(src, htmlCommentPattern);
if (lineNumber < 0) {
return src;
}
const name = getSourceURL(src);
throw new SyntaxError(
`possible html comment syntax rejected around line ${linenum}`,
`Possible HTML comment rejected at ${name}:${lineNumber}. (SES_HTML_COMMENT_REJECTED)`,
);
}
// The proposed dynamic import expression is the only syntax currently
// proposed, that can appear in non-module JavaScript code, that
// enables direct access to the outside world that cannot be
// surpressed or intercepted without parsing and rewriting. Instead,
// this shim conservatively rejects any source text that seems to
// contain such an expression. To do this safely without parsing, we
// must also reject some valid programs, i.e., those containing
// apparent import expressions in literal strings or comments.
/**
* An optional transform to place ahead of `rejectHtmlComments` to evade *that*
* rejection. However, it may change the meaning of the program.
*
* This evasion replaces each alleged html comment with the space-separated
* JavaScript operator sequence that it may mean, assuming that it appears
* outside of a comment or literal string, in source code where the JS
* parser makes no special case for html comments (like module source code).
* In that case, this evasion preserves the meaning of the program, though it
* does change the souce column numbers on each effected line.
*
* If the html comment appeared in a literal (a string literal, regexp literal,
* or a template literal), then this evasion will change the meaning of the
* program by changing the text of that literal.
*
* If the html comment appeared in a JavaScript comment, then this evasion does
* not change the meaning of the program because it only changes the contents of
* those comments.
*
* @param { string } src
* @returns { string }
*/
export function evadeHtmlCommentTest(src) {
const replaceFn = match => (match[0] === '<' ? '< ! --' : '-- >');
return src.replace(htmlCommentPattern, replaceFn);
}
// The current conservative rule looks for the identifier "import"
// followed by either an open paren or something that looks like the
// beginning of a comment. We assume that we do not need to worry
// about html comment syntax because that was already rejected by
// rejectHtmlComments.
// /////////////////////////////////////////////////////////////////////////////
// this \s *must* match all kinds of syntax-defined whitespace. If e.g.
// U+2028 (LINE SEPARATOR) or U+2029 (PARAGRAPH SEPARATOR) is treated as
// whitespace by the parser, but not matched by /\s/, then this would admit
// an attack like: import\u2028('power.js') . We're trying to distinguish
// something like that from something like importnotreally('power.js') which
// is perfectly safe.
const importPattern = new RegExp('\\bimport(\\s*(?:\\(|/[/*]))', 'g');
const importPattern = new RegExp('\\bimport\\s*(?:\\(|/[/*])');
/**
* Conservatively reject the source text if it may contain a dynamic
* import expression. To reject without parsing, `rejectImportExpressions` will
* also reject some other text as well.
*
* The proposed dynamic import expression is the only syntax currently
* proposed, that can appear in non-module JavaScript code, that
* enables direct access to the outside world that cannot be
* surpressed or intercepted without parsing and rewriting. Instead,
* this shim conservatively rejects any source text that seems to
* contain such an expression. To do this safely without parsing, we
* must also reject some valid programs, i.e., those containing
* apparent import expressions in literal strings or comments.
*
* The current conservative rule looks for the identifier "import"
* followed by either an open paren or something that looks like the
* beginning of a comment. We assume that we do not need to worry
* about html comment syntax because that was already rejected by
* rejectHtmlComments.
*
* this \s *must* match all kinds of syntax-defined whitespace. If e.g.
* U+2028 (LINE SEPARATOR) or U+2029 (PARAGRAPH SEPARATOR) is treated as
* whitespace by the parser, but not matched by /\s/, then this would admit
* an attack like: import\u2028('power.js') . We're trying to distinguish
* something like that from something like importnotreally('power.js') which
* is perfectly safe.
*
* @param { string } src
* @returns { string }
*/
export function rejectImportExpressions(src) {
const linenum = getLineNumber(src, importPattern);
if (linenum < 0) {
const lineNumber = getLineNumber(src, importPattern);
if (lineNumber < 0) {
return src;
}
const name = getSourceURL(src);
throw new SyntaxError(
`possible import expression rejected around line ${linenum}`,
`Possible import expression rejected at ${name}:${lineNumber}. (SES_IMPORT_REJECTED)`,
);
}
// The shim cannot correctly emulate a direct eval as explained at
// https://github.com/Agoric/realms-shim/issues/12
// Without rejecting apparent direct eval syntax, we would
// accidentally evaluate these with an emulation of indirect eval. To
// prevent future compatibility problems, in shifting from use of the
// shim to genuine platform support for the proposal, we should
// instead statically reject code that seems to contain a direct eval
// expression.
//
// As with the dynamic import expression, to avoid a full parse, we do
// this approximately with a regexp, that will also reject strings
// that appear safely in comments or strings. Unlike dynamic import,
// if we miss some, this only creates future compat problems, not
// security problems. Thus, we are only trying to catch innocent
// occurrences, not malicious one. In particular, `(eval)(...)` is
// direct eval syntax that would not be caught by the following regexp.
/**
* An optional transform to place ahead of `rejectImportExpressions` to evade
* *that* rejection. However, it may change the meaning of the program.
*
* This evasion replaces each suspicious `import` identifier with `__import__`.
* If the alleged import expression appears in a JavaScript comment, this
* evasion will not change the meaning of the program. If it appears in a
* literal (string literal, regexp literal, or a template literal), then this
* evasion will change the contents of that literal. If it appears as code
* where it would be parsed as an expression, then it might or might not change
* the meaning of the program, depending on the binding, if any, of the lexical
* variable `__import__`.
*
* Finally, if the original appears in code where it is not parsed as an
* expression, for example `foo.import(path)`, then this evasion would rewrite
* to `foo.__import__(path)` which has a surprisingly different meaning.
*
* @param { string } src
* @returns { string }
*/
export function evadeImportExpressionTest(src) {
const replaceFn = (_, p1) => `__import__${p1}`;
return src.replace(importPattern, replaceFn);
}
const someDirectEvalPattern = new RegExp('\\beval\\s*(?:\\(|/[/*])');
// /////////////////////////////////////////////////////////////////////////////
// Exported for unit tests.
const someDirectEvalPattern = new RegExp('\\beval(\\s*\\()', 'g');
/**
* Heuristically reject some text that seems to contain a direct eval
* expression, with both false positives and false negavives. To reject without
* parsing, `rejectSomeDirectEvalExpressions` may will also reject some other
* text as well. It may also accept source text that contains a direct eval
* written oddly, such as `(eval)(src)`. This false negative is not a security
* vulnerability. Rather it is a compat hazard because it will execute as
* an indirect eval under the SES-shim but as a direct eval on platforms that
* support SES directly (like XS).
*
* The shim cannot correctly emulate a direct eval as explained at
* https://github.com/Agoric/realms-shim/issues/12
* If we did not reject direct eval syntax, we would
* accidentally evaluate these with an emulation of indirect eval. To
* prevent future compatibility problems, in shifting from use of the
* shim to genuine platform support for the proposal, we should
* instead statically reject code that seems to contain a direct eval
* expression.
*
* As with the dynamic import expression, to avoid a full parse, we do
* this approximately with a regexp, that will also reject strings
* that appear safely in comments or strings. Unlike dynamic import,
* if we miss some, this only creates future compat problems, not
* security problems. Thus, we are only trying to catch innocent
* occurrences, not malicious one. In particular, `(eval)(...)` is
* direct eval syntax that would not be caught by the following regexp.
*
* Exported for unit tests.
*
* @param { string } src
* @returns { string }
*/
export function rejectSomeDirectEvalExpressions(src) {
const linenum = getLineNumber(src, someDirectEvalPattern);
if (linenum < 0) {
const lineNumber = getLineNumber(src, someDirectEvalPattern);
if (lineNumber < 0) {
return src;
}
const name = getSourceURL(src);
throw new SyntaxError(
`possible direct eval expression rejected around line ${linenum}`,
`Possible direct eval expression rejected at ${name}:${lineNumber}. (SES_EVAL_REJECTED)`,
);
}
// /////////////////////////////////////////////////////////////////////////////
/**
* A transform that bundles together the transforms that must unconditionally
* happen last in order to ensure safe evaluation without parsing.
*
* @param {string} source
* @returns {string}
*/
export function mandatoryTransforms(source) {
source = rejectHtmlComments(source);
source = rejectImportExpressions(source);
source = rejectSomeDirectEvalExpressions(source);
return source;
}
/**
* Starting with `source`, apply each transform to the result of the
* previous one, returning the result of the last transformation.
*
* @param {string} source
* @param {((str: string) => string)[]} transforms
* @returns {string}
*/
export function applyTransforms(source, transforms) {

@@ -118,0 +233,0 @@ for (const transform of transforms) {

@@ -55,2 +55,5 @@ // Copyright (C) 2011 Google Inc.

* asStringPropertyName()
*
* @param {string} path
* @param {string | symbol} prop
*/

@@ -73,2 +76,5 @@ function asStringPropertyName(path, prop) {

* reflectively walking own property chains.
*
* @param {Object} intrinsics
* @param {(Object) => void} nativeBrander
*/

@@ -79,3 +85,3 @@ export default function whitelistIntrinsics(intrinsics, nativeBrander) {

/**
/*
* whitelistPrototype()

@@ -109,3 +115,3 @@ * Validate the object's [[prototype]] against a permit.

/**
/*
* isWhitelistPropertyValue()

@@ -165,3 +171,3 @@ * Whitelist a single property value against a permit.

/**
/*
* isWhitelistProperty()

@@ -189,3 +195,3 @@ * Whitelist a single property against a permit.

/**
/*
* getSubPermit()

@@ -209,3 +215,3 @@ */

/**
/*
* whitelistProperties()

@@ -212,0 +218,0 @@ * Whitelist all properties against a permit.

/**
* @fileoverview Exports {@code whitelist}, a recursively defined
* @file Exports {@code whitelist}, a recursively defined
* JSON record enumerating all intrinsics and their properties

@@ -7,2 +7,3 @@ * according to ECMA specs.

* @author JF Paradis
* @author Mark S. Miller
*/

@@ -19,3 +20,3 @@

export const constantProperties = {
// *** 18.1 Value Properties of the Global Object
// *** Value Properties of the Global Object

@@ -34,3 +35,3 @@ Infinity,

export const universalPropertyNames = {
// *** 18.2 Function Properties of the Global Object
// *** Function Properties of the Global Object

@@ -47,3 +48,3 @@ isFinite: 'isFinite',

// *** 18.3 Constructor Properties of the Global Object
// *** Constructor Properties of the Global Object

@@ -83,3 +84,3 @@ Array: 'Array',

// *** 18.4 Other Properties of the Global Object
// *** Other Properties of the Global Object

@@ -110,3 +111,3 @@ JSON: 'JSON',

export const initialGlobalPropertyNames = {
// *** 18.3 Constructor Properties of the Global Object
// *** Constructor Properties of the Global Object

@@ -117,3 +118,3 @@ Date: '%InitialDate%',

// *** 18.4 Other Properties of the Global Object
// *** Other Properties of the Global Object

@@ -128,2 +129,6 @@ Math: '%InitialMath%',

getStackString: '%InitialGetStackString%',
// TODO https://github.com/Agoric/SES-shim/issues/551
// Need initial WeakRef and FinalizationGroup in
// start compartment only.
};

@@ -138,3 +143,3 @@

export const sharedGlobalPropertyNames = {
// *** 18.3 Constructor Properties of the Global Object
// *** Constructor Properties of the Global Object

@@ -145,3 +150,3 @@ Date: '%SharedDate%',

// *** 18.4 Other Properties of the Global Object
// *** Other Properties of the Global Object

@@ -159,15 +164,15 @@ Math: '%SharedMath%',

export const uniqueGlobalPropertyNames = {
// *** 18.1 Value Properties of the Global Object
// *** Value Properties of the Global Object
globalThis: '%UniqueGlobalThis%',
// *** 18.2 Function Properties of the Global Object
// *** Function Properties of the Global Object
eval: '%UniqueEval%',
// *** 18.3 Constructor Properties of the Global Object
// *** Constructor Properties of the Global Object
Function: '%UniqueFunction%',
// *** 18.4 Other Properties of the Global Object
// *** Other Properties of the Global Object

@@ -183,2 +188,3 @@ // ESNext

// EcmaScript spec by the meta variable NativeError.
// TODO Add AggregateError https://github.com/Agoric/SES-shim/issues/550
export const NativeErrors = [

@@ -236,11 +242,7 @@ EvalError,

// 19.2.4 Function Instances
// Function Instances
export const FunctionInstance = {
// Mentioned in "19.2.4.3 prototype"
'[[Proto]]': '%FunctionPrototype%',
// 19.2.4.1 length
length: 'number',
// 19.2.4.2 name
name: 'string',
// 19.2.4.3 prototype
// Do not specify "prototype" here, since only Function instances that can

@@ -251,3 +253,3 @@ // be used as a constructor have a prototype property. For constructors,

// 25.7.4 AsyncFunction Instances
// AsyncFunction Instances
const AsyncFunctionInstance = {

@@ -283,9 +285,9 @@ // This property is not mentioned in ECMA 262, but is present in V8 and

// 19.5.6 NativeError Object Structure
// NativeError Object Structure
function NativeError(prototype) {
return {
// 19.5.6.2 Properties of the NativeError Constructors
// Properties of the NativeError Constructors
'[[Proto]]': '%SharedError%',
// 19.5.6.2.1 NativeError.prototype
// NativeError.prototype
prototype,

@@ -297,9 +299,6 @@ };

return {
// 19.5.6.3 Properties of the NativeError Prototype Objects
// Properties of the NativeError Prototype Objects
'[[Proto]]': '%ErrorPrototype%',
// 19.5.6.3.1 NativeError.prototype.constructor
constructor,
// 19.5.6.3.2 NativeError.prototype.message
message: 'string',
// 19.5.6.3.3 NativeError.prototype.name
name: 'string',

@@ -311,11 +310,8 @@ // Redundantly present only on v8. Safe to remove.

// 22.2.4 The TypedArray Constructors
// The TypedArray Constructors
function TypedArray(prototype) {
return {
// 22.2.5 Properties of the TypedArray Constructors
// Properties of the TypedArray Constructors
'[[Proto]]': '%TypedArray%',
// 22.2.5.1 TypedArray.BYTES_PER_ELEMENT
BYTES_PER_ELEMENT: 'number',
// 22.2.5.2 TypedArray.prototype
prototype,

@@ -327,7 +323,5 @@ };

return {
// 22.2.6 Properties of the TypedArray Prototype Objects
// Properties of the TypedArray Prototype Objects
'[[Proto]]': '%TypedArrayPrototype%',
// 22.2.6.1 TypedArray.prototype.BYTES_PER_ELEMENT
BYTES_PER_ELEMENT: 'number',
// 22.2.6.2TypedArray.prototype.constructor
constructor,

@@ -339,89 +333,57 @@ };

const SharedMath = {
// 20.3.1.1 Math.E
E: 'number',
// 20.3.1.2 Math.LN10
LN10: 'number',
// 20.3.1.3 Math.LN2
LN2: 'number',
// 20.3.1.4 Math.LOG10E
LOG10E: 'number',
// 20.3.1.5 Math.LOG2E
LOG2E: 'number',
// 20.3.1.6 Math.PI
PI: 'number',
// 20.3.1.7 Math.SQRT1_2
SQRT1_2: 'number',
// 20.3.1.8 Math.SQRT2
SQRT2: 'number',
// 20.3.1.9 Math [ @@toStringTag ]
'@@toStringTag': 'string',
// 20.3.2.1 Math.abs
abs: fn,
// 20.3.2.2 Math.acos
acos: fn,
// 20.3.2.3 Math.acosh
acosh: fn,
// 20.3.2.4 Math.asin
asin: fn,
// 20.3.2.5 Math.asinh
asinh: fn,
// 20.3.2.6 Math.atan
atan: fn,
// 20.3.2.7 Math.atanh
atanh: fn,
// 20.3.2.8 Math.atan2
atan2: fn,
// 20.3.2.9 Math.cbrt
cbrt: fn,
// 20.3.2.10 Math.ceil
ceil: fn,
// 20.3.2.11 Math.clz32
clz32: fn,
// 20.3.2.12 Math.cos
cos: fn,
// 20.3.2.13 Math.cosh
cosh: fn,
// 20.3.2.14 Math.exp
exp: fn,
// 20.3.2.15 Math.expm1
expm1: fn,
// 20.3.2.16 Math.floor
floor: fn,
// 20.3.2.17 Math.fround
fround: fn,
// 20.3.2.18 Math.hypot
hypot: fn,
// 20.3.2.19 Math.imul
imul: fn,
// 20.3.2.20 Math.log
log: fn,
// 20.3.2.21 Math.log1p
log1p: fn,
// 20.3.2.22 Math.log10
log10: fn,
// 20.3.2.23 Math.log2
log2: fn,
// 20.3.2.24 Math.max
max: fn,
// 20.3.2.25 Math.min
min: fn,
// 20.3.2.26Math.pow
pow: fn,
// 20.3.2.28 Math.round
round: fn,
// 20.3.2.29 Math.sign
sign: fn,
// 20.3.2.30 Math.sin
sin: fn,
// 20.3.2.31 Math.sinh
sinh: fn,
// 20.3.2.32 Math.sqrt
sqrt: fn,
// 20.3.2.33 Math.tan
tan: fn,
// 20.3.2.34 Math.tanh
tanh: fn,
// 20.3.2.35 Math.trunc
trunc: fn,
// 20.3.2.35Math.trunc
// See https://github.com/Moddable-OpenSource/moddable/issues/523
idiv: false,
// See https://github.com/Moddable-OpenSource/moddable/issues/523
idivmod: false,
// See https://github.com/Moddable-OpenSource/moddable/issues/523
imod: false,
// See https://github.com/Moddable-OpenSource/moddable/issues/523
imuldiv: false,
// See https://github.com/Moddable-OpenSource/moddable/issues/523
irem: false,
// See https://github.com/Moddable-OpenSource/moddable/issues/523
mod: false,
};

@@ -435,85 +397,51 @@

// 9.2.4.1 %ThrowTypeError%
// %ThrowTypeError%
'%ThrowTypeError%': fn,
// *** 18 The Global Object
// *** The Global Object
// *** 18.1 Value Properties of the Global Object
// 18.1.1 Infinity
// *** Value Properties of the Global Object
Infinity: 'number',
// 18.1.2 NaN
NaN: 'number',
// 18.1.3 undefined
undefined: 'undefined',
// *** 18.2 Function Properties of the Global Object
// *** Function Properties of the Global Object
// 18.2.1 eval
// eval
'%UniqueEval%': fn,
// 18.2.2 isFinite
isFinite: fn,
// 18.2.3 isNaN
isNaN: fn,
// 18.2.4 parseFloat
parseFloat: fn,
// 18.2.5 parseInt
parseInt: fn,
// 18.2.6.2 decodeURI
decodeURI: fn,
// 18.2.6.3 decodeURIComponent
decodeURIComponent: fn,
// 18.2.6.4 encodeURI
encodeURI: fn,
// 18.2.6.5 encodeURIComponent
encodeURIComponent: fn,
// *** 19 Fundamental Objects
// *** Fundamental Objects
Object: {
// 19.1.2 Properties of the Object Constructor
// Properties of the Object Constructor
'[[Proto]]': '%FunctionPrototype%',
// 19.1.2.1 Object.assign
assign: fn,
// 19.1.2.2 Object.create
create: fn,
// 19.1.2.3 Object.defineProperties
defineProperties: fn,
// 19.1.2.4 Object.defineProperty
defineProperty: fn,
// 19.1.2.5 Object.entries
entries: fn,
// 19.1.2.6 Object.freeze
freeze: fn,
// 19.1.2.7 Object.fromEntries
fromEntries: fn,
// 19.1.2.8 Object.getOwnPropertyDescriptor
getOwnPropertyDescriptor: fn,
// 19.1.2.9 Object.getOwnPropertyDescriptors
getOwnPropertyDescriptors: fn,
// 19.1.2.10 Object.getOwnPropertyNames
getOwnPropertyNames: fn,
// 19.1.2.11 Object.getOwnPropertySymbols
getOwnPropertySymbols: fn,
// 19.1.2.12 Object.getPrototypeOf
getPrototypeOf: fn,
// 19.1.2.13 Object.is
is: fn,
// 19.1.2.14 Object.isExtensible
isExtensible: fn,
// 19.1.2.15 Object.isFrozen
isFrozen: fn,
// 19.1.2.16 Object.isSealed
isSealed: fn,
// 19.1.2.17 Object.keys
keys: fn,
// 19.1.2.18 Object.preventExtensions
preventExtensions: fn,
// 19.1.2.19 Object.prototype
prototype: '%ObjectPrototype%',
// 19.1.2.20 Object.seal
seal: fn,
// 19.1.2.21 Object.setPrototypeOf
setPrototypeOf: fn,
// 19.1.2.22 Object.values
values: fn,

@@ -523,30 +451,18 @@ },

'%ObjectPrototype%': {
// 19.1.3 Properties of the Object Prototype Object
// Properties of the Object Prototype Object
'[[Proto]]': null,
// 19.1.3.1 Object.prototype.constructor
constructor: 'Object',
// 19.1.3.2 Object.prototype.hasOwnProperty
hasOwnProperty: fn,
// 19.1.3.3 Object.prototype.isPrototypeOf
isPrototypeOf: fn,
// 19.1.3.4 Object.prototype.propertyIsEnumerable
propertyIsEnumerable: fn,
// 19.1.3.5 Object.prototype.toLocaleString
toLocaleString: fn,
// 19.1.3.6 Object.prototype.toString
toString: fn,
// 19.1.3.7 Object.prototype.valueOf
valueOf: fn,
// B.2.2 Additional Properties of the Object.prototype Object
// Annex B: Additional Properties of the Object.prototype Object
// B.2.2.1 Object.prototype.__proto__
'--proto--': accessor,
// B.2.2.2 Object.prototype.__defineGetter__
__defineGetter__: fn,
// B.2.2.3 Object.prototype.__defineSetter__
__defineSetter__: fn,
// B.2.2.4 Object.prototype.__lookupGetter__
__lookupGetter__: fn,
// B.2.2.5 Object.prototype.__lookupSetter__
__lookupSetter__: fn,

@@ -556,5 +472,4 @@ },

'%UniqueFunction%': {
// 19.2.2 Properties of the Function Constructor
// Properties of the Function Constructor
'[[Proto]]': '%FunctionPrototype%',
// 19.2.2.2 Function.prototype
prototype: '%FunctionPrototype%',

@@ -569,16 +484,11 @@ },

'%FunctionPrototype%': {
// 19.2.3.1 Function.prototype.apply
apply: fn,
// 19.2.3.2 Function.prototype.bind
bind: fn,
// 19.2.3.3 Function.prototype.call
call: fn,
// 19.2.3.4 Function.prototype.constructor
constructor: '%InertFunction%', // TODO test
// 19.2.3.5 Function.prototype.toString
toString: fn,
// 19.2.3.6 Function.prototype [ @@hasInstance ]
'@@hasInstance': fn,
// non-std yet but proposed. To be removed if there
// proposed but not yet std yet. To be removed if there
caller: false,
// proposed but not yet std yet. To be removed if there
arguments: false,

@@ -588,5 +498,4 @@ },

Boolean: {
// 19.3.2 Properties of the Boolean Constructor
// Properties of the Boolean Constructor
'[[Proto]]': '%FunctionPrototype%',
// 19.3.2.1 Boolean.prototype
prototype: '%BooleanPrototype%',

@@ -596,7 +505,4 @@ },

'%BooleanPrototype%': {
// 19.3.3.1 Boolean.prototype.constructor
constructor: 'Boolean',
// 19.3.3.2 Boolean.prototype.toString
toString: fn,
// 19.3.3.3 Boolean.prototype.valueOf
valueOf: fn,

@@ -606,35 +512,19 @@ },

Symbol: {
// 19.4.2 Properties of the Symbol Constructor
// Properties of the Symbol Constructor
'[[Proto]]': '%FunctionPrototype%',
// 19.4.2.1 Symbol.asyncIterator
asyncIterator: 'symbol',
// 19.4.2.2 Symbol.for
for: fn,
// 19.4.2.3 Symbol.hasInstance
hasInstance: 'symbol',
// 19.4.2.4 Symbol.isConcatSpreadable
isConcatSpreadable: 'symbol',
// 19.4.2.5 Symbol.iterator
iterator: 'symbol',
// 19.4.2.6 Symbol.keyFor
keyFor: fn,
// 19.4.2.7 Symbol.match
match: 'symbol',
// 19.4.2.8 Symbol.matchAll
matchAll: 'symbol',
// 19.4.2.9 Symbol.prototype
prototype: '%SymbolPrototype%',
// 19.4.2.10 Symbol.replace
replace: 'symbol',
// 19.4.2.11 Symbol.search
search: 'symbol',
// 19.4.2.12 Symbol.species
species: 'symbol',
// 19.4.2.13 Symbol.split
split: 'symbol',
// 19.4.2.14 Symbol.toPrimitive
toPrimitive: 'symbol',
// 19.4.2.15 Symbol.toStringTag
toStringTag: 'symbol',
// 19.4.2.16 Symbol.unscopables
unscopables: 'symbol',

@@ -644,15 +534,8 @@ },

'%SymbolPrototype%': {
// 19.4.3 Properties of the Symbol Prototype Object
// 19.4.3.1 Symbol.prototype.constructor
// Properties of the Symbol Prototype Object
constructor: 'Symbol',
// 19.4.3.2 get Symbol.prototype.description
description: getter,
// 19.4.3.3 Symbol.prototype.toString
toString: fn,
// 19.4.3.4 Symbol.prototype.valueOf
valueOf: fn,
// 19.4.3.5 Symbol.prototype [ @@toPrimitive ]
'@@toPrimitive': fn,
// 19.4.3.6 Symbol.prototype [ @@toStringTag ]
'@@toStringTag': 'string',

@@ -662,5 +545,4 @@ },

'%InitialError%': {
// 19.5.2 Properties of the Error Constructor
// Properties of the Error Constructor
'[[Proto]]': '%FunctionPrototype%',
// 19.5.2.1 Error.prototype
prototype: '%ErrorPrototype%',

@@ -676,5 +558,4 @@ // Non standard, v8 only, used by tap

'%SharedError%': {
// 19.5.2 Properties of the Error Constructor
// Properties of the Error Constructor
'[[Proto]]': '%FunctionPrototype%',
// 19.5.2.1 Error.prototype
prototype: '%ErrorPrototype%',

@@ -690,9 +571,5 @@ // Non standard, v8 only, used by tap

'%ErrorPrototype%': {
// 19.5.3.1 Error.prototype.constructor
constructor: '%SharedError%',
// 19.5.3.2 Error.prototype.message
message: 'string',
// 19.5.3.3 Error.prototype.name
name: 'string',
// 19.5.3.4 Error.prototype.toString
toString: fn,

@@ -703,3 +580,3 @@ // proposed de-facto, assumed TODO

// 19.5.6.1.1 NativeError
// NativeError

@@ -720,36 +597,21 @@ EvalError: NativeError('%EvalErrorPrototype%'),

// *** 20 Numbers and Dates
// *** Numbers and Dates
Number: {
// 20.1.2 Properties of the Number Constructor
// Properties of the Number Constructor
'[[Proto]]': '%FunctionPrototype%',
// 20.1.2.1 Number.EPSILON
EPSILON: 'number',
// 20.1.2.2 Number.isFinite
isFinite: fn,
// 20.1.2.3 Number.isInteger
isInteger: fn,
// 20.1.2.4 Number.isNaN
isNaN: fn,
// 20.1.2.5 Number.isSafeInteger
isSafeInteger: fn,
// 20.1.2.6 Number.MAX_SAFE_INTEGER
MAX_SAFE_INTEGER: 'number',
// 20.1.2.7 Number.MAX_VALUE
MAX_VALUE: 'number',
// 20.1.2.8 Number.MIN_SAFE_INTEGER
MIN_SAFE_INTEGER: 'number',
// 20.1.2.9 Number.MIN_VALUE
MIN_VALUE: 'number',
// 20.1.2.10 Number.NaN
NaN: 'number',
// 20.1.2.11 Number.NEGATIVE_INFINITY
NEGATIVE_INFINITY: 'number',
// 20.1.2.12 Number.parseFloat
parseFloat: fn,
// 20.1.2.13 Number.parseInt
parseInt: fn,
// 20.1.2.14 Number.POSITIVE_INFINITY
POSITIVE_INFINITY: 'number',
// 20.1.2.15 Number.prototype
prototype: '%NumberPrototype%',

@@ -759,17 +621,9 @@ },

'%NumberPrototype%': {
// 20.1.3 Properties of the Number Prototype Object
// 20.1.3.1 Number.prototype.constructor
// Properties of the Number Prototype Object
constructor: 'Number',
// 20.1.3.2 Number.prototype.toExponential
toExponential: fn,
// 20.1.3.3 Number.prototype.toFixed
toFixed: fn,
// 20.1.3.4 Number.prototype.toLocaleString
toLocaleString: fn,
// 20.1.3.5 Number.prototype.toPrecision
toPrecision: fn,
// 20.1.3.6 Number.prototype.toString
toString: fn,
// 20.1.3.7 Number.prototype.valueOf
valueOf: fn,

@@ -779,22 +633,18 @@ },

BigInt: {
// 20.2.2Properties of the BigInt Constructor
// Properties of the BigInt Constructor
'[[Proto]]': '%FunctionPrototype%',
// 20.2.2.1 BigInt.asIntN
asIntN: fn,
// 20.2.2.2 BigInt.asUintN
asUintN: fn,
// 20.2.2.3 BigInt.prototype
prototype: '%BigIntPrototype%',
// See https://github.com/Moddable-OpenSource/moddable/issues/523
bitLength: false,
// See https://github.com/Moddable-OpenSource/moddable/issues/523
fromArrayBuffer: false,
},
'%BigIntPrototype%': {
// 20.2.3.1 BigInt.prototype.constructor
constructor: 'BigInt',
// 20.2.3.2 BigInt.prototype.toLocaleString
toLocaleString: fn,
// 20.2.3.3 BigInt.prototype.toString
toString: fn,
// 20.2.3.4 BigInt.prototype.valueOf
valueOf: fn,
// 20.2.3.5 BigInt.prototype [ @@toStringTag ]
'@@toStringTag': 'string',

@@ -805,3 +655,3 @@ },

...SharedMath,
// 20.3.2.27Math.random
// random is standard but omitted from SharedMath
random: fn,

@@ -813,11 +663,7 @@ },

'%InitialDate%': {
// 20.4.3 Properties of the Date Constructor
// Properties of the Date Constructor
'[[Proto]]': '%FunctionPrototype%',
// 20.4.3.1 Date.now
now: fn,
// 20.4.3.2 Date.parse
parse: fn,
// 20.4.3.3 Date.prototype
prototype: '%DatePrototype%',
// 20.4.3.4 Date.UTC
UTC: fn,

@@ -827,11 +673,7 @@ },

'%SharedDate%': {
// 20.4.3 Properties of the Date Constructor
// Properties of the Date Constructor
'[[Proto]]': '%FunctionPrototype%',
// 20.4.3.1 Date.now
now: fn,
// 20.4.3.2 Date.parse
parse: fn,
// 20.4.3.3 Date.prototype
prototype: '%DatePrototype%',
// 20.4.3.4 Date.UTC
UTC: fn,

@@ -841,228 +683,128 @@ },

'%DatePrototype%': {
// 20.4.4.1 Date.prototype.constructor
constructor: '%SharedDate%',
// 20.4.4.2 Date.prototype.getDate
getDate: fn,
// 20.4.4.3 Date.prototype.getDay
getDay: fn,
// 20.4.4.4 Date.prototype.getFullYear
getFullYear: fn,
// 20.4.4.5 Date.prototype.getHours
getHours: fn,
// 20.4.4.6 Date.prototype.getMilliseconds
getMilliseconds: fn,
// 20.4.4.7 Date.prototype.getMinutes
getMinutes: fn,
// 20.4.4.8 Date.prototype.getMonth
getMonth: fn,
// 20.4.4.9 Date.prototype.getSeconds
getSeconds: fn,
// 20.4.4.10 Date.prototype.getTime
getTime: fn,
// 20.4.4.11 Date.prototype.getTimezoneOffset
getTimezoneOffset: fn,
// 20.4.4.12 Date.prototype.getUTCDate
getUTCDate: fn,
// 20.4.4.13 Date.prototype.getUTCDay
getUTCDay: fn,
// 20.4.4.14 Date.prototype.getUTCFullYear
getUTCFullYear: fn,
// 20.4.4.15 Date.prototype.getUTCHours
getUTCHours: fn,
// 20.4.4.16 Date.prototype.getUTCMilliseconds
getUTCMilliseconds: fn,
// 20.4.4.17 Date.prototype.getUTCMinutes
getUTCMinutes: fn,
// 20.4.4.18 Date.prototype.getUTCMonth
getUTCMonth: fn,
// 20.4.4.19 Date.prototype.getUTCSeconds
getUTCSeconds: fn,
// 20.4.4.20 Date.prototype.setDate
setDate: fn,
// 20.4.4.21 Date.prototype.setFullYear
setFullYear: fn,
// 20.4.4.22 Date.prototype.setHours
setHours: fn,
// 20.4.4.23 Date.prototype.setMilliseconds
setMilliseconds: fn,
// 20.4.4.24 Date.prototype.setMinutes
setMinutes: fn,
// 20.4.4.25 Date.prototype.setMonth
setMonth: fn,
// 20.4.4.26 Date.prototype.setSeconds
setSeconds: fn,
// 20.4.4.27 Date.prototype.setTime
setTime: fn,
// 20.4.4.28 Date.prototype.setUTCDate
setUTCDate: fn,
// 20.4.4.29 Date.prototype.setUTCFullYear
setUTCFullYear: fn,
// 20.4.4.30 Date.prototype.setUTCHours
setUTCHours: fn,
// 20.4.4.31 Date.prototype.setUTCMilliseconds
setUTCMilliseconds: fn,
// 20.4.4.32 Date.prototype.setUTCMinutes
setUTCMinutes: fn,
// 20.4.4.33 Date.prototype.setUTCMonth
setUTCMonth: fn,
// 20.4.4.34 Date.prototype.setUTCSeconds
setUTCSeconds: fn,
// 20.4.4.35 Date.prototype.toDateString
toDateString: fn,
// 20.4.4.36 Date.prototype.toISOString
toISOString: fn,
// 20.4.4.37 Date.prototype.toJSON
toJSON: fn,
// 20.4.4.38 Date.prototype.toLocaleDateString
toLocaleDateString: fn,
// 20.4.4.39 Date.prototype.toLocaleString
toLocaleString: fn,
// 20.4.4.40 Date.prototype.toLocaleTimeString
toLocaleTimeString: fn,
// 20.4.4.41 Date.prototype.toString
toString: fn,
// 20.4.4.42 Date.prototype.toTimeString
toTimeString: fn,
// 20.4.4.43 Date.prototype.toUTCString
toUTCString: fn,
// 20.4.4.44 Date.prototype.valueOf
valueOf: fn,
// 20.4.4.45 Date.prototype [ @@toPrimitive ]
'@@toPrimitive': fn,
// B.2.4 Additional Properties of the Date.prototype Object
// B.2.4.1 Date.prototype.getYear
// Annex B: Additional Properties of the Date.prototype Object
getYear: fn,
// B.2.4.2 Date.prototype.setYear
setYear: fn,
// B.2.4.3 Date.prototype.toGMTString
toGMTString: fn,
},
// 21 Text Processing
// Text Processing
String: {
// 21.1.2 Properties of the String Constructor
// Properties of the String Constructor
'[[Proto]]': '%FunctionPrototype%',
// 21.1.2.1 String.fromCharCode
fromCharCode: fn,
// 21.1.2.2 String.fromCodePoint
fromCodePoint: fn,
// 21.1.2.3 String.prototype
prototype: '%StringPrototype%',
// 21.1.2.4 String.raw
raw: fn,
// See https://github.com/Moddable-OpenSource/moddable/issues/523
fromArrayBuffer: false,
},
'%StringPrototype%': {
// 21.1.3 Properties of the String Prototype Object
// Properties of the String Prototype Object
length: 'number',
// 21.1.3.1 String.prototype.charAt
charAt: fn,
// 21.1.3.2 String.prototype.charCodeAt
charCodeAt: fn,
// 21.1.3.3 String.prototype.codePointAt
codePointAt: fn,
// 21.1.3.4 String.prototype.concat
concat: fn,
// 21.1.3.5 String.prototype.constructor
constructor: 'String',
// 21.1.3.6 String.prototype.endsWith
endsWith: fn,
// 21.1.3.7 String.prototype.includes
includes: fn,
// 21.1.3.8 String.prototype.indexOf
indexOf: fn,
// 21.1.3.9 String.prototype.lastIndexOf
lastIndexOf: fn,
// 21.1.3.10 String.prototype.localeCompare
localeCompare: fn,
// 21.1.3.11 String.prototype.match
match: fn,
// 21.1.3.12 String.prototype.matchAll
matchAll: fn,
// 21.1.3.13 String.prototype.normalize
normalize: fn,
// 21.1.3.14 String.prototype.padEnd
padEnd: fn,
// 21.1.3.15 String.prototype.padStart
padStart: fn,
// 21.1.3.16 String.prototype.repeat
repeat: fn,
// 21.1.3.17 String.prototype.replace
replace: fn,
// 21.1.3.18 String.prototype.search
replaceAll: fn, // ES2021
search: fn,
// 21.1.3.19 String.prototype.slice
slice: fn,
// 21.1.3.20 String.prototype.split
split: fn,
// 21.1.3.21 String.prototype.startsWith
startsWith: fn,
// 21.1.3.22 String.prototype.substring
substring: fn,
// 21.1.3.23 String.prototype.toLocaleLowerCase
toLocaleLowerCase: fn,
// 21.1.3.24 String.prototype.toLocaleUpperCase
toLocaleUpperCase: fn,
// 21.1.3.25 String.prototype.toLowerCase
toLowerCase: fn,
// 21.1.3.26 String.prototype.
toString: fn,
// 21.1.3.27 String.prototype.toUpperCase
toUpperCase: fn,
// 21.1.3.28 String.prototype.trim
trim: fn,
// 21.1.3.29 String.prototype.trimEnd
trimEnd: fn,
// 21.1.3.30 String.prototype.trimStart
trimStart: fn,
// 21.1.3.31 String.prototype.valueOf
valueOf: fn,
// 21.1.3.32 String.prototype [ @@iterator ]
'@@iterator': fn,
// B.2.3 Additional Properties of the String.prototype Object
// B.2.3.1 String.prototype.substr
// Annex B: Additional Properties of the String.prototype Object
substr: fn,
// B.2.3.2 String.prototype.anchor
anchor: fn,
// B.2.3.3 String.prototype.big
big: fn,
// B.2.3.4 String.prototype.blink
blink: fn,
// B.2.3.5 String.prototype.bold
bold: fn,
// B.2.3.6 String.prototype.fixed
fixed: fn,
// B.2.3.7 String.prototype.fontcolor
fontcolor: fn,
// B.2.3.8 String.prototype.fontsize
fontsize: fn,
// B.2.3.9 String.prototype.italics
italics: fn,
// B.2.3.10 String.prototype.link
link: fn,
// B.2.3.11 String.prototype.small
small: fn,
// B.2.3.12 String.prototype.strike
strike: fn,
// B.2.3.13 String.prototype.sub
sub: fn,
// B.2.3.14 String.prototype.sup
sup: fn,
// B.2.3.15 String.prototype.trimLeft
trimLeft: fn,
// B.2.3.15 String.prototype.trimRight
trimRight: fn,
// See https://github.com/Moddable-OpenSource/moddable/issues/523
compare: false,
},
'%StringIteratorPrototype%': {
// 21.1.5.2 he %StringIteratorPrototype% Object
'[[Proto]]': '%IteratorPrototype%',
// 21.1.5.2.1 %StringIteratorPrototype%.next ( )
next: fn,
// 21.1.5.2.2 %StringIteratorPrototype% [ @@toStringTag ]
'@@toStringTag': 'string',

@@ -1072,7 +814,5 @@ },

'%InitialRegExp%': {
// 21.2.4 Properties of the RegExp Constructor
// Properties of the RegExp Constructor
'[[Proto]]': '%FunctionPrototype%',
// 21.2.4.1 RegExp.prototype
prototype: '%RegExpPrototype%',
// 21.2.4.2 get RegExp [ @@species ]
'@@species': getter,

@@ -1104,7 +844,5 @@

'%SharedRegExp%': {
// 21.2.4 Properties of the RegExp Constructor
// Properties of the RegExp Constructor
'[[Proto]]': '%FunctionPrototype%',
// 21.2.4.1 RegExp.prototype
prototype: '%RegExpPrototype%',
// 21.2.4.2 get RegExp [ @@species ]
'@@species': getter,

@@ -1114,41 +852,22 @@ },

'%RegExpPrototype%': {
// 21.2.5 Properties of the RegExp Prototype Object
// 21.2.5.1 RegExp.prototype.constructor
// Properties of the RegExp Prototype Object
constructor: '%SharedRegExp%',
// 21.2.5.2 RegExp.prototype.exec
exec: fn,
// 21.2.5.3 get RegExp.prototype.dotAll
dotAll: getter,
// 21.2.5.4 get RegExp.prototype.flags
flags: getter,
// 21.2.5.5 get RegExp.prototype.global
global: getter,
// 21.2.5.6 get RegExp.prototype.ignoreCase
ignoreCase: getter,
// 21.2.5.7 RegExp.prototype [ @@match ]
'@@match': fn,
// 21.2.5.8 RegExp.prototype [ @@matchAll ]
'@@matchAll': fn,
// 21.2.5.9 get RegExp.prototype.multiline
multiline: getter,
// 21.2.5.10 RegExp.prototype [ @@replace ]
'@@replace': fn,
// 21.2.5.11 RegExp.prototype [ @@search ]
'@@search': fn,
// 21.2.5.12 get RegExp.prototype.source
source: getter,
// 21.2.5.13 RegExp.prototype [ @@split ]
'@@split': fn,
// 21.2.5.14 get RegExp.prototype.sticky
sticky: getter,
// 21.2.5.15 RegExp.prototype.test
test: fn,
// 21.2.5.16 RegExp.prototype.toString
toString: fn,
// 21.2.5.17 get RegExp.prototype.unicode
unicode: getter,
// B.2.5 Additional Properties of the RegExp.prototype Object
// B.2.5.1 RegExp.prototype.compile
// Annex B: Additional Properties of the RegExp.prototype Object
compile: false, // UNSAFE and suppressed.

@@ -1158,24 +877,17 @@ },

'%RegExpStringIteratorPrototype%': {
// 21.2.7.1 The %RegExpStringIteratorPrototype% Object
// The %RegExpStringIteratorPrototype% Object
'[[Proto]]': '%IteratorPrototype%',
// 21.2.7.1.1 %RegExpStringIteratorPrototype%.next
next: fn,
// 21.2.7.1.2 %RegExpStringIteratorPrototype% [ @@toStringTag ]
'@@toStringTag': 'string',
},
// 22 Indexed Collections
// Indexed Collections
Array: {
// 22.1.2 Properties of the Array Constructor
// Properties of the Array Constructor
'[[Proto]]': '%FunctionPrototype%',
// 22.1.2.1 Array.from
from: fn,
// 22.1.2.2 Array.isArray
isArray: fn,
// 22.1.2.3 Array.of
of: fn,
// 22.1.2.4 Array.prototype
prototype: '%ArrayPrototype%',
// 22.1.2.5 get Array [ @@species ]
'@@species': getter,

@@ -1185,71 +897,37 @@ },

'%ArrayPrototype%': {
// 22.1.3 Properties of the Array Prototype Object
// Properties of the Array Prototype Object
length: 'number',
// 22.1.3.1 Array.prototype.concat
concat: fn,
// 22.1.3.2 Array.prototype.constructor
constructor: 'Array',
// 22.1.3.3 Array.prototype.copyWithin
copyWithin: fn,
// 22.1.3.4 Array.prototype.entries
entries: fn,
// 22.1.3.5 Array.prototype.every
every: fn,
// 22.1.3.6 Array.prototype.fill
fill: fn,
// 22.1.3.7 Array.prototype.filter
filter: fn,
// 22.1.3.8 Array.prototype.find
find: fn,
// 22.1.3.9 Array.prototype.findIndex
findIndex: fn,
// 22.1.3.10 Array.prototype.flat
flat: fn,
// 22.1.3.11 Array.prototype.flatMap
flatMap: fn,
// 22.1.3.12 Array.prototype.forEach
forEach: fn,
// 22.1.3.13 Array.prototype.includes
includes: fn,
// 22.1.3.14 Array.prototype.indexOf
indexOf: fn,
// 22.1.3.15 Array.prototype.join
join: fn,
// 22.1.3.16 Array.prototype.keys
keys: fn,
// 22.1.3.17 Array.prototype.lastIndexOf
lastIndexOf: fn,
// 22.1.3.18 Array.prototype.map
map: fn,
// 22.1.3.19 Array.prototype.pop
pop: fn,
// 22.1.3.20 Array.prototype.push
push: fn,
// 22.1.3.21 Array.prototype.reduce
reduce: fn,
// 22.1.3.22 Array.prototype.reduceRight
reduceRight: fn,
// 22.1.3.23 Array.prototype.reverse
reverse: fn,
// 22.1.3.24 Array.prototype.shift
shift: fn,
// 22.1.3.25 Array.prototype.slice
slice: fn,
// 22.1.3.26 Array.prototype.some
some: fn,
// 22.1.3.27 Array.prototype.sort
sort: fn,
// 22.1.3.28 Array.prototype.splice
splice: fn,
// 22.1.3.29 Array.prototype.toLocaleString
toLocaleString: fn,
// 22.1.3.30 Array.prototype.toString
toString: fn,
// 22.1.3.31 Array.prototype.unshift
unshift: fn,
// 22.1.3.32 Array.prototype.values
values: fn,
// 22.1.3.33 Array.prototype [ @@iterator ]
'@@iterator': fn,
// 22.1.3.34 Array.prototype [ @@unscopables ]
'@@unscopables': {

@@ -1271,22 +949,16 @@ '[[Proto]]': null,

'%ArrayIteratorPrototype%': {
// 22.1.5.2 The %ArrayIteratorPrototype% Object
// The %ArrayIteratorPrototype% Object
'[[Proto]]': '%IteratorPrototype%',
// 22.1.5.2.1 %ArrayIteratorPrototype%.next
next: fn,
// 22.1.5.2.2 %ArrayIteratorPrototype% [ @@toStringTag ]
'@@toStringTag': 'string',
},
// *** 22.2 TypedArray Objects
// *** TypedArray Objects
'%TypedArray%': {
// 22.2.2 Properties of the %TypedArray% Intrinsic Object
// Properties of the %TypedArray% Intrinsic Object
'[[Proto]]': '%FunctionPrototype%',
// 22.2.2.1 %TypedArray%.from
from: fn,
// 22.2.2.2 %TypedArray%.of
of: fn,
// 22.2.2.3 %TypedArray%.prototype
prototype: '%TypedArrayPrototype%',
// 22.2.2.4 get %TypedArray% [ @@species ]
'@@species': getter,

@@ -1296,69 +968,37 @@ },

'%TypedArrayPrototype%': {
// 22.2.3.1 get %TypedArray%.prototype.buffer
buffer: getter,
// 22.2.3.2 get %TypedArray%.prototype.byteLength
byteLength: getter,
// 22.2.3.3 get %TypedArray%.prototype.byteOffset
byteOffset: getter,
// 22.2.3.4 %TypedArray%.prototype.constructor
constructor: '%TypedArray%',
// 22.2.3.5 %TypedArray%.prototype.copyWithin
copyWithin: fn,
// 22.2.3.6 %TypedArray%.prototype.entries
entries: fn,
// 22.2.3.7 %TypedArray%.prototype.every
every: fn,
// 22.2.3.8 %TypedArray%.prototype.fill
fill: fn,
// 22.2.3.9 %TypedArray%.prototype.filter
filter: fn,
// 22.2.3.10 %TypedArray%.prototype.find
find: fn,
// 22.2.3.11 %TypedArray%.prototype.findIndex
findIndex: fn,
// 22.2.3.12 %TypedArray%.prototype.forEach
forEach: fn,
// 22.2.3.13 %TypedArray%.prototype.includes
includes: fn,
// 22.2.3.14 %TypedArray%.prototype.indexOf
indexOf: fn,
// 22.2.3.15 %TypedArray%.prototype.join
join: fn,
// 22.2.3.16 %TypedArray%.prototype.keys
keys: fn,
// 22.2.3.17 %TypedArray%.prototype.lastIndexOf
lastIndexOf: fn,
// 22.2.3.18 get %TypedArray%.prototype.length
length: getter,
// 22.2.3.19 %TypedArray%.prototype.map
map: fn,
// 22.2.3.20 %TypedArray%.prototype.reduce
reduce: fn,
// 22.2.3.21 %TypedArray%.prototype.reduceRight
reduceRight: fn,
// 22.2.3.22 %TypedArray%.prototype.reverse
reverse: fn,
// 22.2.3.23 %TypedArray%.prototype.set
set: fn,
// 22.2.3.24 %TypedArray%.prototype.slice
slice: fn,
// 22.2.3.25 %TypedArray%.prototype.some
some: fn,
// 22.2.3.26 %TypedArray%.prototype.sort
sort: fn,
// 22.2.3.27 %TypedArray%.prototype.subarray
subarray: fn,
// 22.2.3.28 %TypedArray%.prototype.toLocaleString
toLocaleString: fn,
// 22.2.3.29 %TypedArray%.prototype.toString
toString: fn,
// 22.2.3.30 %TypedArray%.prototype.values
values: fn,
// 22.2.3.31 %TypedArray%.prototype [ @@iterator ]
'@@iterator': fn,
// 22.2.3.32 get %TypedArray%.prototype [ @@toStringTag ]
'@@toStringTag': getter,
},
// 22.2.4 The TypedArray Constructors
// The TypedArray Constructors

@@ -1389,8 +1029,7 @@ BigInt64Array: TypedArray('%BigInt64ArrayPrototype%'),

// *** 23 Keyed Collections
// *** Keyed Collections
Map: {
// 23.1.2 Properties of the Map Constructor
// Properties of the Map Constructor
'[[Proto]]': '%FunctionPrototype%',
// 23.2.2.2 get Set [ @@species ]
'@@species': getter,

@@ -1401,27 +1040,14 @@ prototype: '%MapPrototype%',

'%MapPrototype%': {
// 23.1.3.1 Map.prototype.clear
clear: fn,
// 23.1.3.2 Map.prototype.constructor
constructor: 'Map',
// 23.1.3.3 Map.prototype.delete
delete: fn,
// 23.1.3.4 Map.prototype.entries
entries: fn,
// 23.1.3.5 Map.prototype.forEach
forEach: fn,
// 23.1.3.6 Map.prototype.get
get: fn,
// 23.1.3.7 Map.prototype.has
has: fn,
// 23.1.3.8 Map.prototype.keys
keys: fn,
// 23.1.3.9 Map.prototype.set
set: fn,
// 23.1.3.10 get Map.prototype.size
size: getter,
// 23.1.3.11 Map.prototype.values
values: fn,
// 23.1.3.12Map.prototype [ @@iterator ]
'@@iterator': fn,
// 23.1.3.13Map.prototype [ @@toStringTag ]
'@@toStringTag': 'string',

@@ -1431,7 +1057,5 @@ },

'%MapIteratorPrototype%': {
// 23.1.5.2 The %MapIteratorPrototype% Object
// The %MapIteratorPrototype% Object
'[[Proto]]': '%IteratorPrototype%',
// 23.1.5.2.1 %MapIteratorPrototype%.next
next: fn,
// 23.1.5.2.2 %MapIteratorPrototype% [ @@toStringTag ]
'@@toStringTag': 'string',

@@ -1441,7 +1065,5 @@ },

Set: {
// 23.2.2 Properties of the Set Constructor
// Properties of the Set Constructor
'[[Proto]]': '%FunctionPrototype%',
// 23.2.2.1 Set.prototype
prototype: '%SetPrototype%',
// 23.2.2.2 get Set [ @@species ]
'@@species': getter,

@@ -1451,25 +1073,13 @@ },

'%SetPrototype%': {
// 23.2.3.1 Set.prototype.add
add: fn,
// 23.2.3.2 Set.prototype.clear
clear: fn,
// 23.2.3.3 Set.prototype.constructor
constructor: 'Set',
// 23.2.3.4 Set.prototype.delete
delete: fn,
// 23.2.3.5 Set.prototype.entries
entries: fn,
// 23.2.3.6Set.prototype.forEach
forEach: fn,
// 23.2.3.7 Set.prototype.has
has: fn,
// 23.2.3.8 Set.prototype.keys
keys: fn,
// 23.2.3.9 get Set.prototype.size
size: getter,
// 23.2.3.10 Set.prototype.values
values: fn,
// 3.2.3.11 Set.prototype [ @@iterator ]
'@@iterator': fn,
// 23.2.3.12 Set.prototype [ @@toStringTag ]
'@@toStringTag': 'string',

@@ -1479,7 +1089,5 @@ },

'%SetIteratorPrototype%': {
// 23.2.5.2 The %SetIteratorPrototype% Object
// The %SetIteratorPrototype% Object
'[[Proto]]': '%IteratorPrototype%',
// 23.2.5.2.1 %SetIteratorPrototype%.next
next: fn,
// 23.2.5.2.2 %SetIteratorPrototype% [ @@toStringTag ]
'@@toStringTag': 'string',

@@ -1489,5 +1097,4 @@ },

WeakMap: {
// 23.3.2 Properties of the WeakMap Constructor
// Properties of the WeakMap Constructor
'[[Proto]]': '%FunctionPrototype%',
// 23.3.2.1 WeakMap.prototype
prototype: '%WeakMapPrototype%',

@@ -1497,13 +1104,7 @@ },

'%WeakMapPrototype%': {
// 23.3.3.1 WeakMap.prototype.constructor
constructor: 'WeakMap',
// 23.3.3.2 WeakMap.prototype.delete
delete: fn,
// 23.3.3.3 WeakMap.prototype.get
get: fn,
// 23.3.3.4 WeakMap.prototype.has
has: fn,
// 23.3.3.5 WeakMap.prototype.set
set: fn,
// 23.3.3.6 WeakMap.prototype [ @@toStringTag ]
'@@toStringTag': 'string',

@@ -1513,5 +1114,4 @@ },

WeakSet: {
// 23.4.2Properties of the WeakSet Constructor
// Properties of the WeakSet Constructor
'[[Proto]]': '%FunctionPrototype%',
// 23.4.2.1 WeakSet.prototype
prototype: '%WeakSetPrototype%',

@@ -1521,39 +1121,33 @@ },

'%WeakSetPrototype%': {
// 23.4.3.1 WeakSet.prototype.add
add: fn,
// 23.4.3.2 WeakSet.prototype.constructor
constructor: 'WeakSet',
// 23.4.3.3 WeakSet.prototype.delete
delete: fn,
// 23.4.3.4 WeakSet.prototype.has
has: fn,
// 23.4.3.5 WeakSet.prototype [ @@toStringTag ]
'@@toStringTag': 'string',
},
// *** 24 Structured Data
// *** Structured Data
ArrayBuffer: {
// 24.1.3 Properties of the ArrayBuffer Constructor
// Properties of the ArrayBuffer Constructor
'[[Proto]]': '%FunctionPrototype%',
// 24.1.3.1 ArrayBuffer.isView
isView: fn,
// 24.1.3.2 ArrayBuffer.prototype
prototype: '%ArrayBufferPrototype%',
// 24.1.3.3 get ArrayBuffer [ @@species ]
'@@species': getter,
// See https://github.com/Moddable-OpenSource/moddable/issues/523
fromString: false,
// See https://github.com/Moddable-OpenSource/moddable/issues/523
fromBigInt: false,
},
'%ArrayBufferPrototype%': {
// 24.1.4.1 get ArrayBuffer.prototype.byteLength
byteLength: getter,
// 24.1.4.2 ArrayBuffer.prototype.constructor
constructor: 'ArrayBuffer',
// 24.1.4.3 ArrayBuffer.prototype.slice
slice: fn,
// 24.1.4.4 ArrayBuffer.prototype [ @@toStringTag ]
'@@toStringTag': 'string',
// See https://github.com/Moddable-OpenSource/moddable/issues/523
concat: false,
},
// 24.2 SharedArrayBuffer Objects
// SharedArrayBuffer Objects
SharedArrayBuffer: false, // UNSAFE and purposely suppressed.

@@ -1563,5 +1157,4 @@ '%SharedArrayBufferPrototype%': false, // UNSAFE and purposely suppressed.

DataView: {
// 24.3.3 Properties of the DataView Constructor
// Properties of the DataView Constructor
'[[Proto]]': '%FunctionPrototype%',
// 24.3.3.1 DataView.prototype
prototype: '%DataViewPrototype%',

@@ -1571,71 +1164,42 @@ },

'%DataViewPrototype%': {
// 24.3.4.1 get DataView.prototype.buffer
buffer: getter,
// 24.3.4.2 get DataView.prototype.byteLength
byteLength: getter,
// 24.3.4.3 get DataView.prototype.byteOffset
byteOffset: getter,
// 24.3.4.4 DataView.prototype.constructor
constructor: 'DataView',
// 24.3.4.5 DataView.prototype.getBigInt64
getBigInt64: fn,
// 24.3.4.6 DataView.prototype.getBigUint64
getBigUint64: fn,
// 24.3.4.7 DataView.prototype.getFloat32
getFloat32: fn,
// 24.3.4.8 DataView.prototype.getFloat64
getFloat64: fn,
// 24.3.4.9 DataView.prototype.getInt8
getInt8: fn,
// 24.3.4.10 DataView.prototype.getInt16
getInt16: fn,
// 24.3.4.11 DataView.prototype.getInt32
getInt32: fn,
// 24.3.4.12 DataView.prototype.getUint8
getUint8: fn,
// 24.3.4.13 DataView.prototype.getUint16
getUint16: fn,
// 24.3.4.14 DataView.prototype.getUint32
getUint32: fn,
// 24.3.4.15 DataView.prototype.setBigInt64
setBigInt64: fn,
// 24.3.4.16 DataView.prototype.setBigUint64
setBigUint64: fn,
// 24.3.4.17 DataView.prototype.setFloat32
setFloat32: fn,
// 24.3.4.18 DataView.prototype.setFloat64
setFloat64: fn,
// 24.3.4.19 DataView.prototype.setInt8
setInt8: fn,
// 24.3.4.20 DataView.prototype.setInt16
setInt16: fn,
// 24.3.4.21 DataView.prototype.setInt32
setInt32: fn,
// 24.3.4.22 DataView.prototype.setUint8
setUint8: fn,
// 24.3.4.23 DataView.prototype.setUint16
setUint16: fn,
// 24.3.4.24 DataView.prototype.setUint32
setUint32: fn,
// 24.3.4.25 DataView.prototype [ @@toStringTag ]
'@@toStringTag': 'string',
},
// 24.4 Atomics
// Atomics
Atomics: false, // UNSAFE and suppressed.
JSON: {
// 24.5.1 JSON.parse
parse: fn,
// 24.5.2 JSON.stringify
stringify: fn,
// 24.5.3 JSON [ @@toStringTag ]
'@@toStringTag': 'string',
},
// *** 25 Control Abstraction Objects
// *** Control Abstraction Objects
'%IteratorPrototype%': {
// 25.1.2 The %IteratorPrototype% Object
// 25.1.2.1 %IteratorPrototype% [ @@iterator ]
// The %IteratorPrototype% Object
'@@iterator': fn,

@@ -1645,4 +1209,3 @@ },

'%AsyncIteratorPrototype%': {
// 25.1.3 The %AsyncIteratorPrototype% Object
// 25.1.3.1 %AsyncIteratorPrototype% [ @@asyncIterator ]
// The %AsyncIteratorPrototype% Object
'@@asyncIterator': fn,

@@ -1652,5 +1215,4 @@ },

'%InertGeneratorFunction%': {
// 25.2.2 Properties of the GeneratorFunction Constructor
// Properties of the GeneratorFunction Constructor
'[[Proto]]': '%InertFunction%',
// 25.2.2.2 GeneratorFunction.prototype
prototype: '%Generator%',

@@ -1660,9 +1222,6 @@ },

'%Generator%': {
// 25.2.3 Properties of the GeneratorFunction Prototype Object
// Properties of the GeneratorFunction Prototype Object
'[[Proto]]': '%FunctionPrototype%',
// 25.2.3.1 GeneratorFunction.prototype.constructor
constructor: '%InertGeneratorFunction%',
// 25.2.3.2 GeneratorFunction.prototype.prototype
prototype: '%GeneratorPrototype%',
// 25.2.3.3 GeneratorFunction.prototype [ @@toStringTag ]
'@@toStringTag': 'string',

@@ -1672,5 +1231,4 @@ },

'%InertAsyncGeneratorFunction%': {
// 25.3.2 Properties of the AsyncGeneratorFunction Constructor
// Properties of the AsyncGeneratorFunction Constructor
'[[Proto]]': '%InertFunction%',
// 25.3.2.2 AsyncGeneratorFunction.prototype
prototype: '%AsyncGenerator%',

@@ -1680,9 +1238,6 @@ },

'%AsyncGenerator%': {
// 25.3.3 Properties of the AsyncGeneratorFunction Prototype Object
// Properties of the AsyncGeneratorFunction Prototype Object
'[[Proto]]': '%FunctionPrototype%',
// 25.3.3.1 AsyncGeneratorFunction.prototype.constructor
constructor: '%InertAsyncGeneratorFunction%',
// 25.3.3.2 AsyncGeneratorFunction.prototype.prototype
prototype: '%AsyncGeneratorPrototype%',
// 25.3.3.3 AsyncGeneratorFunction.prototype [ @@toStringTag ]
'@@toStringTag': 'string',

@@ -1692,13 +1247,8 @@ },

'%GeneratorPrototype%': {
// 25.4.1 Properties of the Generator Prototype Object
// Properties of the Generator Prototype Object
'[[Proto]]': '%IteratorPrototype%',
// 25.4.1.1 Generator.prototype.constructor
constructor: '%Generator%',
// 25.4.1.2 Generator.prototype.next
next: fn,
// 25.4.1.3 Generator.prototype.return
return: fn,
// 25.4.1.4 Generator.prototype.throw
throw: fn,
// 25.4.1.5 Generator.prototype [ @@toStringTag ]
'@@toStringTag': 'string',

@@ -1708,13 +1258,8 @@ },

'%AsyncGeneratorPrototype%': {
// 25.5.1 Properties of the AsyncGenerator Prototype Object
// Properties of the AsyncGenerator Prototype Object
'[[Proto]]': '%AsyncIteratorPrototype%',
// 25.5.1.1 AsyncGenerator.prototype.constructor
constructor: '%AsyncGenerator%',
// 25.5.1.2 AsyncGenerator.prototype.next
next: fn,
// 25.5.1.3 AsyncGenerator.prototype.return
return: fn,
// 25.5.1.4 AsyncGenerator.prototype.throw
throw: fn,
// 25.5.1.5 AsyncGenerator.prototype [ @@toStringTag ]
'@@toStringTag': 'string',

@@ -1745,17 +1290,13 @@ },

Promise: {
// 25.6.4 Properties of the Promise Constructor
// Properties of the Promise Constructor
'[[Proto]]': '%FunctionPrototype%',
// 25.6.4.1 Promise.all
all: fn,
// 25.6.4.2 Promise.allSettled
allSettled: fn,
// 25.6.4.3Promise.prototype
// To transition from `false` to `fn` once we also have `AggregateError`
// TODO https://github.com/Agoric/SES-shim/issues/550
any: false, // ES2021
prototype: '%PromisePrototype%',
// 25.6.4.4 Promise.race
race: fn,
// 25.6.4.5 Promise.reject
reject: fn,
// 25.6.4.6 Promise.resolve
resolve: fn,
// 25.6.4.7 get Promise [ @@species ]
'@@species': getter,

@@ -1765,12 +1306,7 @@ },

'%PromisePrototype%': {
// 25.6.5 Properties of the Promise Prototype Object
// 25.6.5.1 Promise.prototype.catch
// Properties of the Promise Prototype Object
catch: fn,
// 25.6.5.2 Promise.prototype.constructor
constructor: 'Promise',
// 25.6.5.3 Promise.prototype.finally
finally: fn,
// 25.6.5.4 Promise.prototype.then
then: fn,
// 25.6.5.5 Promise.prototype [ @@toStringTag ]
'@@toStringTag': 'string',

@@ -1780,5 +1316,4 @@ },

'%InertAsyncFunction%': {
// 25.7.2 Properties of the AsyncFunction Constructor
// Properties of the AsyncFunction Constructor
'[[Proto]]': '%InertFunction%',
// 25.7.2.2 AsyncFunction.prototype
prototype: '%AsyncFunctionPrototype%',

@@ -1788,47 +1323,32 @@ },

'%AsyncFunctionPrototype%': {
// 25.7.3 Properties of the AsyncFunction Prototype Object
// Properties of the AsyncFunction Prototype Object
'[[Proto]]': '%FunctionPrototype%',
// 25.7.3.1 AsyncFunction.prototype.constructor
constructor: '%InertAsyncFunction%',
// 25.7.3.2 AsyncFunction.prototype [ @@toStringTag ]
'@@toStringTag': 'string',
},
// 26 Reflection
// Reflection
Reflect: {
// 26.1 The Reflect Object
// The Reflect Object
// Not a function object.
// 26.1.1 Reflect.apply
apply: fn,
// 26.1.2 Reflect.construct
construct: fn,
// 26.1.3 Reflect.defineProperty
defineProperty: fn,
// 26.1.4 Reflect.deleteProperty
deleteProperty: fn,
// 26.1.5 Reflect.get
get: fn,
// 26.1.6 Reflect.getOwnPropertyDescriptor
getOwnPropertyDescriptor: fn,
// 26.1.7 Reflect.getPrototypeOf
getPrototypeOf: fn,
// 26.1.8 Reflect.has
has: fn,
// 26.1.9 Reflect.isExtensible
isExtensible: fn,
// 26.1.10 Reflect.ownKeys
ownKeys: fn,
// 26.1.11 Reflect.preventExtensions
preventExtensions: fn,
// 26.1.12 Reflect.set
set: fn,
// 26.1.13 Reflect.setPrototypeOf
setPrototypeOf: fn,
'@@toStringTag': 'string',
},
Proxy: {
// 26.2.2 Properties of the Proxy Constructor
// Properties of the Proxy Constructor
'[[Proto]]': '%FunctionPrototype%',
// 26.2.2.1 Proxy.revocable
revocable: fn,

@@ -1839,10 +1359,8 @@ },

// B.2.1 Additional Properties of the Global Object
// Annex B: Additional Properties of the Global Object
// B.2.1.1 escape
escape: fn,
// B.2.1.2 unescape (
unescape: fn,
// ESNext
// Proposed

@@ -1849,0 +1367,0 @@ '%UniqueCompartment%': {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc